(window.webpackJsonpLIS=window.webpackJsonpLIS||[]).push([[15],{556:function(n,t,e){"use strict";e.r(t),e.d(t,"ToubizSocialGrid",(function(){return c}));var i=e(84);function o(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(n)))return;var e=[],i=!0,o=!1,r=void 0;try{for(var a,c=n[Symbol.iterator]();!(i=(a=c.next()).done)&&(e.push(a.value),!t||e.length!==t);i=!0);}catch(n){o=!0,r=n}finally{try{i||null==c.return||c.return()}finally{if(o)throw r}}return e}(n,t)||function(n,t){if(!n)return;if("string"==typeof n)return r(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return r(n,t)}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}function a(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}var c=function(){function n(t){var e=this;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.node=t,this.containsFacebookPosts=null!==this.node.querySelector("[data-toubiz-social-grid-facebook-post]"),this.macyInstance=null,this.waitForDependencies().then((function(n){var t=o(n,1)[0].default;e.containsFacebookPosts?FB.Event.subscribe("xfbml.render",(function(){e.initializeView(t)})):e.initializeView(t)})).catch((function(n){console.warn(n)}))}var t,r,c;return t=n,(r=[{key:"onLoaded",value:function(){this.node.classList.add("tb-social-grid--loaded")}},{key:"initializeView",value:function(n){var t=this,e=this.node.querySelector("[data-toubiz-social-grid-items]");if(!e)return console.warn("## ToubizSocialGrid Warning - Masonry Layout not available\n                Container node for social grid items can not be found.\n                Enable masonry by including [data-toubiz-social-grid-items] in your markup."),void this.onLoaded();window.innerWidth<=600?this.onLoaded():(this.macyInstance=new n({container:e,columns:4,waitForImages:!0,margin:16,breakAt:{1024:2,600:1}}),this.macyInstance.on(this.macyInstance.constants.EVENT_IMAGE_COMPLETE,(function(){setTimeout((function(){var n=document.createEvent("HTMLEvents");n.initEvent("resize",!0,!1),window.dispatchEvent(n)}),1e3),t.onLoaded()})))}},{key:"waitForDependencies",value:function(){var n=[e.e(28).then(e.t.bind(null,532,7))];return this.containsFacebookPosts&&n.push(Object(i.b)("https://connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v3.2","fb-sdk")),Promise.all(n)}}])&&a(t.prototype,r),c&&a(t,c),n}()}}]);