(window.webpackJsonpLIS=window.webpackJsonpLIS||[]).push([[12],{611:function(n,t,e){"use strict";e.r(t),e.d(t,"ToubizSocialGrid",(function(){return c}));var i=e(88);function o(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null==e)return;var i,o,r=[],a=!0,c=!1;try{for(e=e.call(n);!(a=(i=e.next()).done)&&(r.push(i.value),!t||r.length!==t);a=!0);}catch(n){c=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(c)throw o}}return r}(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,586,7))];return this.containsFacebookPosts&&n.push(Object(i.c)("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),Object.defineProperty(t,"prototype",{writable:!1}),n}()}}]);