!function(e){var t=function(t,i){return()=>{Pixlee.init({apiKey:i}),t.each((function(){const t=e(this),i=t.attr("id"),a=t.data("pixlee-widget-type"),d=t.data("pixlee-widget-id"),n=t.data("pixlee-account-id"),o=t.data("pixlee-sku-id"),c=o,l=t.data("pixlee-category-name"),r=t.data("pixlee-fallback-album-id");var s="addProductWidget";let g={widgetId:d,containerId:i,getCookieConsent:function(){let t=e.cookie("OptanonConsent");if(!t)return!0;let i=decodeURIComponent(t.replace(/\+/g," ")).split("&").filter((function(e){return e.indexOf("groups")>=0}));if(i.length){let e=i.toString().split("=")[1];if(void 0!==e&&-1!==e.indexOf("3:1"))return!1}return!0}()};"simple"===a&&(s="addSimpleWidget"),"product"===a&&(s="addProductWidget",g={...g,accountId:n,skuId:o,parent_category:c}),"category"===a&&(s="addCategoryWidget",g={...g,accountId:n,insensitiveCategoryName:l,fallbackAlbumId:r,fallbackThreshold:5}),Pixlee[s](g),t.parent(".elc-pixlee-v1").addClass("initialized"),t.parent(".elc-pixlee-v1").siblings(".ugc-headings").show()})),Pixlee.addSimpleWidget({widgetId:12345,subscribedEvents:["widgetLoaded","photoOpened","photoClosed","photoChanged","ctaClicked","ctaChanged","widgetNumPhotos","widgetLoadMore","widgetNavigated","uploaderOpened","uploadComplete","atcComplete","socialShare","widgetHidden"]})}};let i=!0;const a=(e,t)=>{e[0].isIntersecting&&i&&(!function(){var e=document.createElement("script");e.src="https://assets.pxlecdn.com/builds/20250410_143423_pixlee_widget_1_0_0.js",e.integrity="sha384-+WqdhWY4f7LtwXeskM7y6qg77xmP2eZ0J5f/bUJ7rmN+3ovTnWmbx2USqfS2FK+m",e.crossOrigin="anonymous",e.type="text/javascript";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),i=!1,t.disconnect())};Drupal.behaviors.elcPixleeV1={attached:!1,attach:function(i,d){if(this.attached)return;this.attached=!0;const n=document.getElementsByClassName("elc-ugc-v1"),o=e('[data-ugc-component="pixlee"]');o.length>0&&void 0!==d.elc_ugc_media&&(function(e,i){window.PixleeAsyncInit=t(e,i)}(o,d.elc_ugc_media.pixlee.apiKey),function(e){let t;t=new IntersectionObserver(a,{root:null,rootMargin:"500px",threshold:1}),t.observe(e)}(n[0])),n.length>0&&e(n[0]).find("div.ugc-headings").hide()}}}(jQuery); //# sourceMappingURL=pixlee.min.js.map