if(void 0===window.lookfy||null===document.getElementById("lookfy-loaded")){try{window.lookfy=!0;var elem=document.createElement("div");elem.id="lookfy-loaded",elem.style.cssText="display:none;",null!==document.body&&document.body.appendChild(elem),window.console&&window.console.log&&console.log("%c This store is Powered by Lookfy ","background:#000;color: #dcf3fb","Visit https://apps.shopify.com/lookfy-lookbook-gallery-1/ for more info")}catch(r){console.error(r)}let t="";["test-store-gallery.myshopify.com","lookfy-testing.myshopify.com","lookfy-app.myshopify.com","lf-store-test-4.myshopify.com","quickstart-a6bb4c5c.myshopify.com","lf-nguyen-test-1.myshopify.com","lf-nguyen-test-2.myshopify.com"].includes(Shopify.shop)&&(t="--development");var lfBaseUrl=`//lookfy${t}.gadget.app/`,lfCustom=!1,lfUtils={productClass:"kt-button button--secondary",baseUrl:lfBaseUrl,ktPlaceholder:"https://cdn.shopify.com/s/files/1/0826/6983/0455/files/placeholder.jpg",imgEmbedded:140,imgColumn:500,lfLocale:Shopify.locale||window.lfIsoCode,lfCountry:Shopify.country||"",lfCartAdd:window.routes&&window.routes.cart_add_url?window.routes.cart_add_url:window.lfCartAdd,lfShopUrl:Shopify.shop||window.lfShopUrl,lightbox_active:"lf-lightbox-active",photoSwipeClass:"lf-photoSwipe-disabled",aniDelay:150,infoSvg:' ',loading:'
',errorSvg:' ',documentEvent:function(t,e={}){document.dispatchEvent(new CustomEvent(t,{detail:e}))},createDomEl:(t="div",e="",i="",s={},n={})=>{const o=document.createElement(t);e.trim()&&o.classList.add(...e.trim().split(/\s+/)),o.innerHTML=i;for(const[t,e]of Object.entries(s))o.setAttribute(t,e);for(const[t,e]of Object.entries(n))o.style[t]=e;return o},select:t=>document.querySelector(t),selectAll:t=>document.querySelectorAll(t),sendPixel:(t,e)=>{if(window.Shopify.analytics)Shopify.analytics.publish(t,e);else{var i=0;let s=setInterval((function(){window.Shopify.analytics&&(Shopify.analytics.publish(t,e),clearInterval(s)),++i>200&&clearInterval(s)}),100)}},isAdmin:()=>document.querySelector("#admin-bar-iframe")||window.Shopify.designMode,lfErrorPlaceholder:(t,e)=>{const i=lfUtils.createDomEl("div","lookfy-gallery-placeholder",`${this.errorSvg}
${e} `);t.appendChild(i)},mobileCheck:function(){return window.innerWidth<768||screen.width<768},lfDebounce:function(t){var e;return function(i){e&&clearTimeout(e),e=setTimeout(t,100,i)}},lightbox:function(t={}){(t={...{classes:"",control:' ',close:' ',heading:"",text:"",content:null,direction:"down",callback:()=>{},treshhold:100,starttime:100,closetime:400,photoSwipe:!0},...t}).heading&&(t.heading=`${t.heading} `);const e=lfUtils.createDomEl("div",`lf-lightbox-main ${t.classes}`,``);t.content&&e.querySelector(".lf-lightbox__content-info").appendChild(t.content);var i=e.querySelector(".lf-lightbox__control"),s=e.querySelector(".lf-lightbox__close"),n=e.querySelector(".lf-lightbox-content"),o="down"===t.direction,r="up"===t.direction,l="right"===t.direction,a="left"===t.direction,h={x:0,y:0},d={x:0,y:0},c="down"===t.direction||"up"===t.direction,p="right"===t.direction||"left"===t.direction,u={x:`translateX(${l?"110%":"-110%"})`,y:`translateY(${o?"110%":"-110%"})`};function f(){i.removeEventListener("touchmove",g),i.removeEventListener("touchend",y),n.style.transform=c?u.y:u.x,n.style.transition=`transform ${t.closetime}ms`,e.classList.remove("active"),document.body.classList.remove(lfUtils.lightbox_active,lfUtils.photoSwipeClass),setTimeout((()=>{n.style.transform="",n.style.transition="",t.callback(),setTimeout((()=>{e.remove()}),500)}),t.closetime)}function m(t){t.stopPropagation(),i.addEventListener("touchmove",g,{passive:!0}),i.addEventListener("touchend",y,{passive:!0}),d.x=t.touches[0].clientX,d.y=t.touches[0].clientY,n.style.transition="transform 0ms linear 0ms"}function g(t){t.stopPropagation(),h.x=t.touches[0].clientX-d.x,h.y=t.touches[0].clientY-d.y,c&&o&&h.y<=0||r&&0<=h.y||p&&l&&h.x<=0||a&&0<=h.x||(t=c?`translateY(${h.y}px)`:`translateX(${h.x}px)`,n.style.transform=t)}function y(e){e.stopPropagation(),n.style.transition="",n.style.transform="",(c&&(o&&h.y>=t.treshhold||r&&h.y<=-t.treshhold)||p&&(l&&h.x>=t.treshhold||a&&h.x<=-t.treshhold))&&f(),d={x:0,y:0},h={x:0,y:0}}new ResizeObserver((t=>{t.forEach((t=>{t.contentRect.width<576?i.addEventListener("touchstart",m,{passive:!0}):(i.removeEventListener("touchstart",m),i.removeEventListener("touchmove",g),i.removeEventListener("touchend",y))}))})).observe(document.documentElement),document.body.append(e),setTimeout((()=>{document.body.classList.add(lfUtils.lightbox_active),e.classList.add("active"),t.photoSwipe||document.body.classList.add(lfUtils.photoSwipeClass)}),t.starttime),e.addEventListener("click",(t=>{t.target.classList.contains("lf-lightbox-main")&&f()})),s?.addEventListener("click",(t=>{t.preventDefault(),f()}))},lightbox_close:function(t={}){lfUtils.selectAll(".lf-lightbox-main").forEach((t=>{const e=t.querySelector(".hotspot-item-detail");if(e){const i=lfUtils.select(`.kt-hotspot-item[data-id="${e.dataset.hotspot}"]`);i&&i.appendChild(t)}t.remove()})),document.body.classList.remove(lfUtils.lightbox_active,lfUtils.photoSwipeClass)},tooltip:function(t,e={}){e={content:".hotspot-item-detail",space:10,placement:"auto",size:"adapt",spacing:"collapse",style:"vertical",theme:"light",section:"",...e};var i,s,n,{placement:o,size:r,space:l,spacing:a,style:h,theme:d}=e,c=t.querySelector(e.content);const p=t.closest(".lookfy-gallery"),u=p?p.dataset.section:e.section;function f(e){t.classList.add("active"),"auto"==o&&(o=lfUtils.render_placement(t.getAttribute("data-left"),t.getAttribute("data-top"))),n="kttooltip__"+t.getAttribute("data-id")+"__"+Date.now()+Math.floor(100*Math.random()),s=lfUtils.createDomEl("div",`kt-tooltip placement-${o} kt-tooltip-${r} kt-tooltip-${a} kt-tooltip-${h}`,"",{id:n,"data-id":t.getAttribute("data-id")}),"adapt"!==r&&"none"!==r&&(s.classList.add("kt-ratio"),s.style.setProperty("--ratio-percent",lfUtils.render_ratio(r)));var l="#FFFFFF",p="#000000";"dark"==d&&(l="#000000",p="#FFFFFF"),s.style.setProperty("--tooltip-background",l),s.style.setProperty("--tooltip-color",p);const u=lfUtils.createDomEl("div","kt-tooltip-inner");u.appendChild(c),s.appendChild(u),window.lfTooltipParent?window.lfTooltipParent.appendChild(s):document.body.appendChild(s),s.addEventListener("mouseover",(function(t){clearTimeout(i)})),s.addEventListener("mouseout",(t=>{i=setTimeout((()=>{g()}),300)}))}function m(t){var i=t.currentTarget.getBoundingClientRect(),n=document.body,r=document.documentElement,l=window.pageYOffset||r.scrollTop||n.scrollTop,a=window.pageXOffset||r.scrollLeft||n.scrollLeft,h=0,d=0;(h="left"==o?a+i.left-s.offsetWidth-e.space:"right"==o?a+i.left+i.width+e.space:a+i.left-s.offsetWidth/2+i.width/2)<0?h=0:h+i.width>n.clientWidth&&(h=n.clientWidth-i.width),d="top"==o?l+i.top-e.space-s.offsetHeight:"bottom"==o?l+i.top+i.height+e.space:l+i.top-s.offsetHeight/2+i.height/2,s.style.left=h+"px",s.style.top=d+"px"}function g(){t&&(t.classList.remove("active"),s?.parentNode&&s.parentNode.removeChild(s),c&&t.appendChild(c))}t.addEventListener("touchend",(e=>{if(e.preventDefault(),"bottom"==window.lfTooltipPosition&&this.mobileCheck()){e.target.closest(".kt-hotspot-item");this.lightbox({classes:`shopify-section-${u}`,content:c,callback:()=>{t.appendChild(c)}})}else t.classList.contains("active")?g():(f(e),m(e))})),t.addEventListener("mouseover",(e=>{e.preventDefault(),"bottom"==window.lfTooltipPosition&&this.mobileCheck()||(i&&clearTimeout(i),t.classList.contains("active")||(f(e),m(e)),s&&s.addEventListener("mouseover",(t=>{t.preventDefault(),clearTimeout(i)})))})),t.addEventListener("mouseout",(t=>{t.preventDefault(),"bottom"==window.lfTooltipPosition&&this.mobileCheck()||(i=setTimeout((()=>{g()}),300))}))},hotspotsWrapper:(t,e={})=>{e={element:".kt-hotspots-wrapper",inner:".kt-image-item-box",...e};const i=t.querySelector(e.element),s=t.querySelector(e.inner);if(i&&s&&s.classList.contains("kt-ratio")){let t;n(),window.addEventListener("resize",(()=>{clearTimeout(t),t=setTimeout(n,200)}))}function n(){imagesLoaded(i,(()=>{const t=s||i,e=t.clientWidth,n=t.clientHeight,o=Number(i.getAttribute("data-width"))/Number(i.getAttribute("data-height")),r=e/n;let l="100%",a="100%";o<=1&&r>=1||oh?n.classList.add("popover-above"):n.classList.add("popover-below");break;case"cover":n.classList.add("popover-cover");break;default:n.classList.add("popover-below")}else{switch(e.preferredPosition){case"above":o=t.top+window.pageYOffset-l-e.space;break;case"mostSpace":o=a>h?t.top+window.pageYOffset-l-e.space:t.top+window.pageYOffset+r+e.space;break;case"cover":o=t.top+window.pageYOffset;break;default:o=t.top+window.pageYOffset+r+e.space}(s=window.pageXOffset+t.left-n.offsetWidth/2+t.width/2)<0?s=0:s+n.offsetWidth>window.innerWidth&&(s=window.innerWidth-n.offsetWidth),n.style.left=s+"px",n.style.top=o+"px"}}function r(){t.appendChild(s),n.remove(),i.classList.remove("active"),window.removeEventListener("scroll",l)}function l(){o()}i.addEventListener("click",(function(t){t.preventDefault(),i.classList.contains("active")?r():(!function(){i.classList.add("active"),(n=lfUtils.createDomEl("div",`lfPopover ${e.classes}`)).appendChild(s),"after"===e.appendTo?i.parentNode.insertBefore(n,i.nextSibling):document.body.appendChild(n);window.addEventListener("scroll",l)}(),o())})),document.addEventListener("click",(function(t){(function(t){for(var e=t.target;e;){if(e===s||e===i)return!0;e=e.parentNode}return!1})(t)||i.classList.contains("active")&&r()}))},truncatewords:function(t,e){return t.split(" ").splice(0,e).join(" ")},replace_desc:function(t,e){e||(e="");var i=t.match(/{{desc:(chars|words):(\d+)}}/g);return i&&i.length&&i.map((i=>{const s=i.split("{{desc:")[1].split(":"),n=s[0],o=parseInt(s[1]);if("chars"==n){const i=`{{desc:chars:${o}}}`;(r=e.slice(0,o))&&(r+="..."),t=t.replace(i,r)}else{const i=`{{desc:words:${o}}}`;var r;(r=this.truncatewords(e,o))&&(r+="..."),t=t.replace(i,r)}})),t},isMultiLang:function(){return window.lfLanguages&&window.lfLanguages.length?1!=window.lfLanguages.length:document.querySelector("link[hreflang]")},getCurrentLange:function(t,e){const i={add_to_cart_select:"Select {attribute_label}",add_all_to_cart:"Add All to Cart",add_to_cart:"Add to Cart",choose_options:"Choose Options",shop_now:"Shop Now",sold_out:"Sold Out",load_more:"Load More",badge_discount:"Off",sale:"Sale",description:"Description",in_this_photo:"In this Media",shop_the_look:"Shop the Look",view_full_details:"View Full Details"};var s=window.lfShopLang&&t in window.lfShopLang?window.lfShopLang[t]:i[t];return e||(e=window.lfIsoCode),e&&window.lfShopTrans&&window.lfShopTrans[e]&&window.lfShopTrans[e][t]&&""!=window.lfShopTrans[e][t]&&(s=window.lfShopTrans[e][t]),s||(s=i[t]),s},isMainLang:function(){return 2==Shopify.routes.root.split("/").length},getLinkLang:function(t,e="products"){if(t=`${e}/${t}`,Shopify.routes&&Shopify.routes.root)t=`${Shopify.routes.root}${t}`;else if(this.isMultiLang()&&lfLanguages){const e=lfLanguages.find((t=>t.shop_locale.locale===this.lfLocale));e&&!e.shop_locale.primary&&(t=`${t}`)}return t},add_custom_css:function(t){if(t&&t.length){var e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e)}},add_custom_js:function(t){if(t.length){var e=document.createElement("script");e.type="text/javascript",e.innerHTML=t,document.head.appendChild(e)}},lookfy_responsive:function(t){let e="";if(window.screen.width>992){const i=t.offsetWidth;i<768?e="lookfy-mobile":i<992?e="lookfy-large":i>1050&&(e="lookfy-xlarge")}return e},lfThemeDetector:function(){_getThemeName=function(){return _isBoomerangDataAvailable()?_getBoomerangThemeName():_isGlobalThemeAvailable()?_getGlobalThemeName():"Unknown"},_getThemeVersion=function(){return this._isBoomerangDataAvailable()?window.BOOMR.themeVersion:"0.0.0"},_isBoomerangDataAvailable=function(){return window.BOOMR&&window.BOOMR.themeId&&window.BOOMR.themeName&&window.BOOMR.themeVersion},_getBoomerangThemeName=function(){return window.BOOMR.themeName},_isGlobalThemeAvailable=function(){return window.Shopify&&window.Shopify.theme&&window.Shopify.theme.id&&window.Shopify.theme.name},_getGlobalThemeName=function(){return window.Shopify.theme.name};const t={themeName:_getThemeName(),themeVersion:_getThemeVersion()};switch(t.themeName.toLowerCase()){case"crave":case"sense":case"craft":case"taste":case"studio":case"trade":case"ride":case"colorblock":case"refresh":case"publisher":case"spotlight":case"generated data theme":case"theme fullstack":case"madrid":t.themeName="dawn";break;case"megamog":case"minimog - os 2.0":case"minimog - 0s 2.0":t.themeName="minimog";break;case"palo alto":t.themeName="paloalto";break;case"kalles":case"gecko":t.themeName="the4";break;default:t.themeName=t.themeName.toLowerCase().replace(/\s/g,"")}return window.lfThemeName?window.lfThemeName:t},render_icon:(t,e=1)=>({plus:' ',store:' ',tag:' ',number:`${e} `,none:""}[t]),render_ratio:t=>({landscape:"75%",portrait:"125%"}[t]||"100%"),flGetSizedImageUrl:function(t,e){if(null===e||null===t||""==t||void 0===t)return t;var i=t.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif|webp)(\?v=\d+)?$/i);if(null!==i){var s=t.split(i[0]),n=i[0];return s[0]+"_"+e+n}return t},render_carousel:function(t){const e={"--pn-color":"light"===t.pnTheme?"#000":"#FFF","--pn-background":"light"===t.pnTheme?"#FFF":"#000"};return"icon"===t.pnStyle&&(e["--pn-background"]="transparent",e["--pn-color"]="light"===t.pnTheme?"#FFF":"#000"),"circle"===t.pnStyle?e["--pn-radius"]="50%":"round"===t.pnStyle?e["--pn-radius"]="3px":e["--pn-radius"]="0px",e["--dot-color"]="dark"===t.dotsTheme?"#FFF":"#000",e["--dot-background"]="dark"===t.dotsTheme?"#000":"#FFF",e["--dot-radius"]="dot"===t.dotStyle?"50%":"0px",e["--dots-spacing"]="outside"===t.dotsPos?"25px":"0px",e},get_carousel:function(t,e,i){const s={...t,cellAlign:"left",wrapAround:!0,pageDots:!0};return s.autoplay&&(s.autoPlay=s.speed,delete s.autoplay),e>=4?i/e>=3?s.groupCells=!0:i>6&&(s.groupCells=2):3==e&&i/e>3&&(s.groupCells=!0),s},cart_formData:function(t,e=null){var i=null;if("dawn"==t&&e)i=e.getSectionsToRender().map((t=>t.id));else if("the4"==t)i="cart_data,mini_cart";else if("minimog"==t)i="cart-drawer";else if("xtra"==t)i="side-cart";else if("impact"==t){const t=document.getElementById("cart-drawer");if(t){const e=t.closest(".shopify-section")?.getAttribute("id")?.replace("shopify-section-","");i=`variant-added,${e}`}}else if("symmetry"==t){i=["page-header","cart-drawer"].map((t=>lfUtils.select(t))).filter((t=>t)).map((t=>t.dataset.sectionId)).join(",")}else"hongo"==t&&e?i=e.getSectionsToRender().map((t=>t.id)).join(","):"focal"==t?i="mini-cart":window.lfFormData&&(i=window.lfFormData);return i},render_space:function(t){return{collapse:[0,0],xsmall:[2,4],small:[4,8],large:[12,24],xlarge:[20,40],"2xlarge":[30,60]}[t]||[8,16]},render_badges:function(t){let e="";return 0==t.available?e='{{sold_out}} ':t.compare_at_price>t.price&&t.available&&(e='{{sale}} '),e&&(e=`${e}
`),e},render_price:function(t,e,i=!0){if(!t)return;var n=t;i&&t.variants&&t.variants.length>0&&(n=t.variants.find((t=>t.available))||t.variants[0]);const{compare_at_price:o=0,price:r=0,available:l=!1}=n,a=s(r),h=["lf-price"];l||h.push("lf-price--sold-out"),("compare_badge"===e||"compare"===e)&&o>r&&(h.push("lf-price--on-sale"),"compare_badge"===e&&h.push("lf-price--show-badge"));var d=``;if(d+=`
${a}
`,("compare_badge"==e||"compare"==e)&&o>r&&(d+=`
\n ${s(o)} \n ${a} \n
`),"compare_badge"==e&&o){const t=Math.round((o-r)/o*100);t>0&&(d+=`
${t}% `)}return d+="
"},render_header:function(t,e){const i=lfUtils.createDomEl("div","kt__header"),s=lfUtils.createDomEl("h2","kt__title",`${e.title} `);if(i.appendChild(s),2==t&&e.body){const t=lfUtils.createDomEl("p","kt__subtitle",e.body);i.appendChild(t)}return i},lfLayout:t=>({l_column:lfUtils.lfLayoutColumn(t),l_embedded:"default_embedded"===t,l_multi:"multiple_columns"===t,l_carousel:lfUtils.lfLayoutCarousel(t),l_spacing:lfUtils.lfLayoutSpacing(t)}),lfLayoutColumn:t=>["default_embedded","default_column","multiple_columns","column_carousel"].includes(t),lfLayoutSpacing:t=>["masonry","grid","row","list","carousel","multiple_columns","column_carousel"].includes(t),lfLayoutMasonry:t=>["masonry","grid"].includes(t),lfLayoutCarousel:t=>["carousel","column_carousel","multiple_columns"].includes(t),render_placement:(t,e)=>e<33.33?t<40?"right":t>80?"left":"bottom":e>66.66?t<40?"right":t>80?"left":"top":"top",stripHtml:function(t){let e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""},render_layer:function(t,e){e.desc=this.stripHtml(e.desc),t=t.replaceAll("##link##",e.link?``:"").replaceAll("##endlink##",e.link?" ":"").replaceAll("##lightbox##",'').replaceAll("##endlightbox##"," ");const i={"{{desc}}":e.desc,"{{title}}":e.text,"{{link}}":e.link,"{{alt}}":e.alt,"{{position}}":e.position,"{{products_count}}":e.products_count,"{{price}}":e.price,"{{tags}}":e.tags,"{{vendor}}":e.vendor,"{{badges}}":e.badges,"{{sale}}":this.getCurrentLange("sale"),"{{sold_out}}":this.getCurrentLange("sold_out")};return Object.entries(i).forEach((([e,i])=>{t=t.replaceAll(e,i||"")})),t=this.replace_desc(t,e.desc)},render_fonts:function(t){t.forEach((t=>{const e=document.head.querySelectorAll("link");if(!Array.from(e).some((e=>e.href===t.link))){const e=document.createElement("link");e.href=t.link,e.rel="stylesheet",document.head.appendChild(e)}}))},get:function(t,e=()=>{},i=()=>{},s=()=>{}){fetch(t).then((t=>{e&&e(t)})).catch((t=>{i&&i(t)})).finally((()=>{s&&s()}))},getJson:function(t,e=()=>{},i=()=>{},s=()=>{}){fetch(t).then((t=>t.json())).then((t=>{e&&e(t)})).catch((t=>{i&&i(t)})).finally((()=>{s&&s()}))},render_product_lightbox:(t,e,i,s={})=>{s={...{variants:'
',form:'
',body:``,accordions:``},...s};const n=lfUtils.createDomEl("div","product-lightbox-content",` ${s.body} ${s.form} ${s.accordions}
`,{"data-id":t}),o=window.lfProducts[t],r=lfProductOptions[t],l=n.querySelector(".lf-lightbox-product-title"),a=n.querySelector(".lf-lightbox-product-image"),h=n.querySelector(".lf-lightbox-product-prices"),d=(n.querySelector(".lf-lightbox-product-review"),n.querySelector(".lf-lightbox-product-desc")),c=a.querySelector("img");if(c.setAttribute("src",lfUtils.flGetSizedImageUrl(o.featured_image,a.dataset.width+"x")),c.dataset.img=o.featured_image,l.innerHTML=o.title,d&&(o.description?d.innerHTML=o.description:d.closest(".lf-lightbox-accordion-desc")?.remove()),o.variants?.length>0&&h){const t=o.variants.find((t=>t.available))||o;h.innerHTML=lfUtils.render_price(t)}const p=n.querySelector(".lf-lightbox-product-form");return lfUtils.render_productForm(e,i,o,r,p),n.querySelectorAll(".lf-lightbox-accordions .lf-lightbox-accordion-checkbox").forEach((t=>{const e=lfMakeID();t.id=e,t.nextElementSibling.htmlFor=e})),n},render_productForm:(t,e,i,s,n,o=null,r="")=>{o||(o=lfMakeID());var l="simple",a="",h="";n.dataset.section=o,h=' ',i.variants.length>1&&(l="variable"),0==i.available?a+=`${lfUtils.getCurrentLange("sold_out")} `:a+=`${lfUtils.getCurrentLange("add_to_cart")} ${lfUtils.loading} `,a+=`${lfUtils.getCurrentLange("view_full_details")} `;var d="";if(i.available){var c=s||i.options,p=i.variants.find((t=>t.available)),u=` `;if(i.variants.length>1)if("dropdown"==e.setup.variant){var f=[];const t=1==c.length?lfUtils.getCurrentLange("add_to_cart_select").replace("{attribute_label}",c[0].name):lfUtils.getCurrentLange("choose_options");f.push({id:"",option:t,disabled:!0}),i.variants.map(((t,e)=>{f.push({id:t.id,option:t.options.join(" / "),disabled:!t.available})}));const e=f.map(((t,e)=>{const i=t.disabled?"disabled":"",s=p.id==t.id?"selected":"";return`${t.option} `}));h+=`${e.join("")}
`}else{d="";c.map(((t,e)=>{var i=`${t.name} `;const s=`template--${o}${r}-${t.position}`;t.values.map(((t,e)=>{i+=`${t} `})),d+=`${i} `})),h+=d+u}else h+=u}const m=`${lfUtils.errorSvg}
`;n.innerHTML=`\n `,setTimeout((()=>{lfUtils.documentEvent("lookfyProductForm",{galleryElement:t,galleryData:e,product:i,sectionID:o,productForm:n})}),200)}};function isLfVideoContent(t){return t&&t.data&&"hotspots"===t.data.type&&"video"===t.data.media}function isLfHotspotContent(t){return t&&t.data&&"hotspots"===t.data.type}document.addEventListener("touchstart",(t=>{if(!document.getElementsByTagName("body")[0].classList.contains("lf-disable-tooltip")){const e=t.target.closest(".kt-tooltip"),i=lfUtils.select(".kt-tooltip");if(!e&&i){const t=i.getAttribute("id").split("__")[1];if(t){const e=lfUtils.select("[data-id="+t+"]");if(e){const t=i.querySelector(".hotspot-item-detail");e.appendChild(t),e.classList.remove("active"),i&&i.parentNode.removeChild(i)}}}}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).LfPhotoSwipe=e()}(this,(function(){"use strict";function t(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function e(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function i(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function s(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function n(t,e){return t.x===e.x&&t.y===e.y}function o(t,e,i){return Math.min(Math.max(t,e),i)}function r(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function l(t,e,i,s){t.style.transform=r(e,i,s)}function a(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function h(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const d="loading",c="loaded",p="error";function u(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let f=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{f=!0}}))}catch(t){}class m{constructor(){this.t=[]}add(t,e,i,s){this.i(t,e,i,s)}remove(t,e,i,s){this.i(t,e,i,s,!0)}removeAll(){this.t.forEach((t=>{this.i(t.target,t.type,t.listener,t.passive,!0,!0)})),this.t=[]}i(t,e,i,s,n,o){if(!t)return;const r=n?"removeEventListener":"addEventListener";e.split(" ").forEach((e=>{if(e){o||(n?this.t=this.t.filter((s=>s.type!==e||s.listener!==i||s.target!==t)):this.t.push({target:t,type:e,listener:i,passive:s}));const l=!!f&&{passive:s||!1};t[r](e,i,l)}}))}}function g(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function y(t,e,i,s,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,s,n)[t];else if(e.padding)o=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(o=e[i])}return Number(o)||0}function v(t,e,i,s){return{x:e.x-y("left",t,e,i,s)-y("right",t,e,i,s),y:e.y-y("top",t,e,i,s)-y("bottom",t,e,i,s)}}class w{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this.o("x"),this.o("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}o(t){const{pswp:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=y("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-i)/2)+s,this.max[t]=i>n?Math.round(n-i)+s:this.center[t],this.min[t]=i>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return o(e,this.max[t],this.min[t])}}class b{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,o=i.y/s.y;this.fit=Math.min(1,no?n:o),this.vFill=Math.min(1,o),this.initial=this.l(),this.secondary=this.u(),this.max=Math.max(this.initial,this.secondary,this.p()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}m(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}u(){let t=this.m("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}l(){return this.m("initial")||this.fit}p(){return this.m("max")||Math.max(1,4*this.fit)}}class S{constructor(e,i,s){this.data=e,this.index=i,this.pswp=s,this.isActive=i===s.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!s.opener.isOpen,this.zoomLevels=new b(s.options,e,i,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=t("pswp_lf__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new w(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,s=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,s)||t)&&this.content.setDisplayedSize(i,s)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){var t;return null===(t=this.content.placeholder)||void 0===t?void 0:t.element}zoomTo(t,e,s,n){const{pswp:r}=this;if(!this.isZoomable()||r.mainScroll.isShifted())return;r.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:s}),r.animations.stopAllPan();const l=this.currZoomLevel;n||(t=o(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,l),this.pan.y=this.calculateZoomToPanOffset("y",e,l),i(this.pan);const a=()=>{this.v(t),this.applyCurrentZoomPan()};s?r.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:s,easing:r.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(0==this.bounds.max[t]-this.bounds.min[t])return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this.g(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),e(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}g(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,l(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;e(this.panAreaSize,v(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return r(this.pan.x,this.pan.y,t)}v(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}class _{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&e(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:s}=this.gestures,{currSlide:n}=this.pswp;if("y"===s&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const i=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._("y",i,.6);const t=1-Math.abs(this.S(n.pan.y));this.pswp.applyBgOpacity(t),n.applyCurrentZoomPan()}}else this.M("x")||(this.M("y"),n&&(i(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(s=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this.P("x"),this.P("y"))}P(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:n}=i,r=s[t],l=this.pswp.bgOpacity<1&&"y"===t,a=r+function(t){return.995*t/(1-.995)}(e[t]);if(l){const t=this.S(r),e=this.S(a);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const h=n.correctPan(t,a);if(r===h)return;const d=h===a?1:.82,c=this.pswp.bgOpacity,p=h-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:h,velocity:e[t],dampingRatio:d,onUpdate:e=>{if(l&&this.pswp.bgOpacity<1){const t=1-(h-e)/p;this.pswp.applyBgOpacity(o(c+(1-c)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}M(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:r}=this.pswp,l=e[t]-s[t],a=r.x+l;if(!l||!o)return!1;if("x"===t&&!o.isPannable()&&!n)return r.moveTo(a,!0),!0;const{bounds:h}=o,d=o.pan[t]+l;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!n){const e=r.getCurrSlideX(),i=r.x-e,s=l>0,n=!s;if(d>h.min[t]&&s){if(h.min[t]<=this.startPan[t])return r.moveTo(a,!0),!0;this._(t,d)}else if(d0)return r.moveTo(Math.max(a,e),!0),!0;if(i<0)return r.moveTo(Math.min(a,e),!0),!0}else this._(t,d)}else"y"===t&&(r.isShifted()||h.min.y===h.max.y)||this._(t,d);return!1}S(t){var e,i;return(t-(null!==(e=null===(i=this.pswp.currSlide)||void 0===i?void 0:i.bounds.center.y)&&void 0!==e?e:0))/(this.pswp.viewportSize.y/3)}_(t,e,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:o}=s;if(o.correctPan(t,e)!==e||i){const s=Math.round(e-n[t]);n[t]+=s*(i||.35)}else n[t]=e}}function x(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}class C{constructor(t){this.gestures=t,this.C={x:0,y:0},this.T={x:0,y:0},this.A={x:0,y:0},this.D=!1,this.I=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this.I=t.currZoomLevel,e(this.C,t.pan)),this.gestures.pswp.animations.stopAllPan(),this.D=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const l=r.zoomLevels.min,a=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;x(this.T,e,n),x(this.A,t,i);let h=1/s(e,n)*s(t,i)*this.I;if(h>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this.D=!0),ha&&(h=a+.05*(h-a));r.pan.x=this.L("x",h),r.pan.y=this.L("y",h),r.setZoomLevel(h),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevels.zoomLevels.max?l=s.zoomLevels.max:(a=!1,l=r);const h=i.bgOpacity,d=i.bgOpacity<1,c=e({x:0,y:0},s.pan);let p=e({x:0,y:0},c);t&&(this.A.x=0,this.A.y=0,this.T.x=0,this.T.y=0,this.I=r,e(this.C,c)),a&&(p={x:this.L("x",l),y:this.L("y",l)}),s.setZoomLevel(l),p={x:s.bounds.correctPan("x",p.x),y:s.bounds.correctPan("y",p.y)},s.setZoomLevel(r);const u=!n(p,c);if(!u&&!a&&!d)return s.v(l),void s.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,u||a){if(u&&(s.pan.x=c.x+(p.x-c.x)*t,s.pan.y=c.y+(p.y-c.y)*t),a){const e=r+(l-r)*t;s.setZoomLevel(e)}s.applyCurrentZoomPan()}d&&i.bgOpacity<1&&i.applyBgOpacity(o(h+(1-h)*t,0,1))},onComplete:()=>{s.v(l),s.applyCurrentZoomPan()}})}}function k(t){return!!t.target.closest(".pswp_lf__container")}class E{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp_lf__img"),n=i.contains("pswp_lf__item")||i.contains("pswp_lf__zoom-wrap");s?this.k("imageClick",t,e):n&&this.k("bgClick",t,e)}tap(t,e){k(e)&&this.k("tap",t,e)}doubleTap(t,e){k(e)&&this.k("doubleTap",t,e)}k(t,e,i){var s;const{pswp:n}=this.gestures,{currSlide:o}=n,r=t+"Action",l=n.options[r];if(!n.dispatch(r,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof l)switch(l){case"close":case"next":n[l]();break;case"zoom":null==o||o.toggleZoom(e);break;case"zoom-or-close":null!=o&&o.isZoomable()&&o.zoomLevels.secondary!==o.zoomLevels.initial?o.toggleZoom(e):n.options.clickToCloseNonZoomable&&n.close();break;case"toggle-controls":null===(s=this.gestures.pswp.element)||void 0===s||s.classList.toggle("pswp_lf--ui-visible")}else l.call(n,e,i)}}class L{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this.Z={x:0,y:0},this.B={x:0,y:0},this.F=0,this.O=[],this.R="ontouchstart"in window,this.N=!!window.PointerEvent,this.supportsTouch=this.R||this.N&&navigator.maxTouchPoints>1,this.F=0,this.U=0,this.V=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this.G=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new _(this),this.zoomLevels=new C(this),this.tapHandler=new E(this),t.on("bindEvents",(()=>{t.events.add(t.scrollWrap,"click",this.$.bind(this)),this.N?this.q("pointer","down","up","cancel"):this.R?(this.q("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this.q("mouse","down","up")}))}q(t,e,i,s){const{pswp:n}=this,{events:o}=n,r=s?t+s:"";o.add(n.scrollWrap,t+e,this.onPointerDown.bind(this)),o.add(window,t+"move",this.onPointerMove.bind(this)),o.add(window,t+i,this.onPointerUp.bind(this)),r&&o.add(n.scrollWrap,r,this.onPointerUp.bind(this))}onPointerDown(t){const i="mousedown"===t.type||"mouse"===t.pointerType;if(i&&t.button>0)return;const{pswp:s}=this;s.opener.isOpen?s.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(s.mouseDetected(),this.H(t,"down")),s.animations.stopAll(),this.K(t,"down"),1===this.F&&(this.dragAxis=null,e(this.startP1,this.p1)),this.F>1?(this.W(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this.H(t,"move"),this.F&&(this.K(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this.F||this.isDragging?this.F>1&&!this.isZooming&&(this.j(),this.isZooming=!0,this.X(),this.zoomLevels.start(),this.Y(),this.J()):(this.dragAxis||this.tt(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this.W(),this.X(),this.U=Date.now(),this.V=!1,e(this.B,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this.Y(),this.J()))))}j(){this.isDragging&&(this.isDragging=!1,this.V||this.it(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this.F&&(this.K(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this.F&&(this.Y(),this.isDragging?this.j():this.isZooming||this.isMultitouch||this.st(t)),this.F<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this.F&&(this.dragAxis=null,this.X()))))}J(){(this.isDragging||this.isZooming)&&(this.it(),this.isDragging?n(this.p1,this.prevP1)||this.drag.change():n(this.p1,this.prevP1)&&n(this.p2,this.prevP2)||this.zoomLevels.change(),this.ht(),this.raf=requestAnimationFrame(this.J.bind(this)))}it(t){const i=Date.now(),s=i-this.U;s<50&&!t||(this.velocity.x=this.et("x",s),this.velocity.y=this.et("y",s),this.U=i,e(this.B,this.p1),this.V=!0)}st(t){const{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const n=this.pswp.options.doubleTapAction?300:0;this.G?(this.W(),s(this.Z,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(e(this.Z,this.startP1),this.G=setTimeout((()=>{this.tapHandler.tap(this.startP1,t),this.W()}),n))}W(){this.G&&(clearTimeout(this.G),this.G=null)}et(t,e){const i=this.p1[t]-this.B[t];return Math.abs(i)>1&&e>5?i/e:0}Y(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}H(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}K(t,i){if(this.N){const s=t,n=this.O.findIndex((t=>t.id===s.pointerId));"up"===i&&n>-1?this.O.splice(n,1):"down"===i&&-1===n?this.O.push(this.nt(s,{x:0,y:0})):n>-1&&this.nt(s,this.O[n]),this.F=this.O.length,this.F>0&&e(this.p1,this.O[0]),this.F>1&&e(this.p2,this.O[1])}else{const e=t;this.F=0,e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(this.nt(e.touches[0],this.p1),this.F++,e.touches.length>1&&(this.nt(e.touches[1],this.p2),this.F++)):(this.nt(t,this.p1),"up"===i?this.F=0:this.F++)}}ht(){e(this.prevP1,this.p1),e(this.prevP2,this.p2)}X(){e(this.startP1,this.p1),e(this.startP2,this.p2),this.ht()}tt(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}nt(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}$(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}class z{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this.ot=0,this.rt=0,this.lt=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach(((e,i)=>{s&&l(e.el,(i+this.lt)*this.slideWidth),t&&e.slide&&e.slide.resize()}))}resetPosition(){this.ot=0,this.rt=0,this.slideWidth=0,this.lt=-1}appendHolders(){this.itemHolders=[];for(let e=0;e<3;e++){const i=t("pswp_lf__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===e?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:s}=this;let n=s.potentialIndex+t;const o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const e=(t+o)%o;t=e<=o/2?e:e-o}else n<0?n=0:n>=o&&(n=o-1),t=n-s.potentialIndex;s.potentialIndex=n,this.ot-=t,s.animations.stopMainScroll();const r=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:r,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const e=(t+o)%o;t=e<=o/2?e:e-o}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(r),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this.ot}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this.rt-this.ot;if(!i)return;this.rt=this.ot,e.currIndex=e.potentialIndex;let s,n=Math.abs(i);n>=3&&(this.lt+=i+(i>0?-3:3),n=3);for(let t=0;t0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this.lt++,l(s.el,(this.lt+2)*this.slideWidth),e.setContent(s,e.currIndex-n+t+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this.lt--,l(s.el,this.lt*this.slideWidth),e.setContent(s,e.currIndex+n-t-2)));Math.abs(this.lt)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach(((t,e)=>{t.slide&&t.slide.setIsActive(1===e)})),e.currSlide=null===(t=this.itemHolders[1])||void 0===t?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this.ot-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&l(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:null!=e&&e})}}const D={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},P=(t,e)=>e?t:D[t];class I{constructor(t){this.pswp=t,this.ct=!1,t.on("bindEvents",(()=>{t.options.trapFocus&&(t.options.initialPointerPos||this.dt(),t.events.add(document,"focusin",this.ut.bind(this))),t.events.add(document,"keydown",this.vt.bind(this))}));const e=document.activeElement;t.on("destroy",(()=>{t.options.returnFocus&&e&&this.ct&&e.focus()}))}dt(){!this.ct&&this.pswp.element&&(this.pswp.element.focus(),this.ct=!0)}vt(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t))return;let i,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case P("Escape",o):e.options.escKey&&(i="close");break;case P("z",o):i="toggleZoom";break;case P("ArrowLeft",o):s="x";break;case P("ArrowUp",o):s="y";break;case P("ArrowRight",o):s="x",n=!0;break;case P("ArrowDown",o):n=!0,s="y";break;case P("Tab",o):this.dt()}if(s){t.preventDefault();const{currSlide:o}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=n?"next":"prev":o&&o.currZoomLevel>o.zoomLevels.fit&&(o.pan[s]+=n?-80:80,o.panTo(o.pan.x,o.pan.y))}i&&(t.preventDefault(),e[i]())}ut(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const A="cubic-bezier(.4,0,.22,1)";class T{constructor(t){var e;this.props=t;const{target:i,onComplete:s,transform:n,onFinish:o=()=>{},duration:r=333,easing:l=A}=t;this.onFinish=o;const h=n?"transform":"opacity",d=null!==(e=t[h])&&void 0!==e?e:"";this.ft=i,this.wt=s,this.gt=!1,this.yt=this.yt.bind(this),this._t=setTimeout((()=>{a(i,h,r,l),this._t=setTimeout((()=>{i.addEventListener("transitionend",this.yt,!1),i.addEventListener("transitioncancel",this.yt,!1),this._t=setTimeout((()=>{this.xt()}),r+500),i.style[h]=d}),30)}),0)}yt(t){t.target===this.ft&&this.xt()}xt(){this.gt||(this.gt=!0,this.onFinish(),this.wt&&this.wt())}destroy(){this._t&&clearTimeout(this._t),a(this.ft),this.ft.removeEventListener("transitionend",this.yt,!1),this.ft.removeEventListener("transitioncancel",this.yt,!1),this.gt||this.xt()}}class U{constructor(t,e,i){this.velocity=1e3*t,this.bt=e||.75,this.St=i||12,this.zt=this.St,this.bt<1&&(this.zt*=Math.sqrt(1-this.bt*this.bt))}easeFrame(t,e){let i,s=0;e/=1e3;const n=Math.E**(-this.bt*this.St*e);if(1===this.bt)i=this.velocity+this.St*t,s=(t+i*e)*n,this.velocity=s*-this.St+i*n;else if(this.bt<1){i=1/this.zt*(this.bt*this.St*t+this.velocity);const o=Math.cos(this.zt*e),r=Math.sin(this.zt*e);s=n*(t*o+i*r),this.velocity=s*-this.St*this.bt+n*(-this.zt*t*r+this.zt*i*o)}return s}}class M{constructor(t){this.props=t,this.Mt=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:o,onFinish:r=()=>{},dampingRatio:l,naturalFrequency:a}=t;this.onFinish=r;const h=new U(s,l,a);let d=Date.now(),c=e-i;const p=()=>{this.Mt&&(c=h.easeFrame(c,Date.now()-d),Math.abs(c)<1&&Math.abs(h.velocity)<50?(n(i),o&&o(),this.onFinish()):(d=Date.now(),n(c+i),this.Mt=requestAnimationFrame(p)))};this.Mt=requestAnimationFrame(p)}destroy(){this.Mt>=0&&cancelAnimationFrame(this.Mt),this.Mt=0}}class F{constructor(){this.activeAnimations=[]}startSpring(t){this.Pt(t,!0)}startTransition(t){this.Pt(t)}Pt(t,e){const i=e?new M(t):new T(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach((t=>{t.destroy()})),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isPan||(t.destroy(),!1)))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isMainScroll||(t.destroy(),!1)))}isPanRunning(){return this.activeAnimations.some((t=>t.props.isPan))}}class O{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this.Ct.bind(this))}Ct(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:s}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-s;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const n=e.currZoomLevel*i;e.zoomTo(n,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}}class ${constructor(e,i){var s;const n=i.name||i.className;let o=i.html;if(!1===e.options[n])return;"string"==typeof e.options[n+"SVG"]&&(o=e.options[n+"SVG"]),e.dispatch("uiElementCreate",{data:i});let r="";i.isButton?(r+="pswp_lf__button ",r+=i.className||`pswp_lf__button--${i.name}`):r+=i.className||`pswp_lf__${i.name}`;let l=i.isButton?i.tagName||"button":i.tagName||"div";l=l.toLowerCase();const a=t(r,l);if(i.isButton){"button"===l&&(a.type="button");let{title:t}=i;const{ariaLabel:s}=i;"string"==typeof e.options[n+"Title"]&&(t=e.options[n+"Title"]),t&&(a.title=t);const o=s||t;o&&a.setAttribute("aria-label",o)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='';return i=i.split("%d").join(e.size||32),e.outlineID&&(i+=' '),i+=e.inner,i+=" ",i}(o),i.onInit&&i.onInit(a,e),i.onClick&&(a.onclick=t=>{"string"==typeof i.onClick?e[i.onClick]():"function"==typeof i.onClick&&i.onClick(t,a,e)});const h=i.appendTo||"bar";let d=e.element;"bar"===h?(e.topBar||(e.topBar=t("pswp_lf__top-bar pswp_lf__hide-on-close","div",e.scrollWrap)),d=e.topBar):(a.classList.add("pswp_lf__hide-on-close"),"wrapper"===h&&(d=e.scrollWrap)),null===(s=d)||void 0===s||s.appendChild(e.applyFilters("uiElement",a,i))}}function q(t,e,i){t.classList.add("pswp_lf__button--arrow"),t.setAttribute("aria-controls","pswp_lf__items"),e.on("change",(()=>{e.options.loop||(t.disabled=i?!(e.currIndex0))}))}const N={name:"arrowPrev",className:"pswp_lf__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:' ',outlineID:"pswp_lf__icn-arrow"},onClick:"prev",onInit:q},W={name:"arrowNext",className:"pswp_lf__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:' ',outlineID:"pswp_lf__icn-arrow"},onClick:"next",onInit:(t,e)=>{q(t,e,!0)}},H={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:' ',outlineID:"pswp_lf__icn-close"},onClick:"close"},B={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:' ',outlineID:"pswp_lf__icn-zoom"},onClick:"toggleZoom"},j={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:' ',outlineID:"pswp_lf__icn-loading"},onInit:(t,e)=>{let i,s=null;const n=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp_lf__preloader--active",s))},o=()=>{var t;if(null===(t=e.currSlide)||void 0===t||!t.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout((()=>{var t;n(Boolean(null===(t=e.currSlide)||void 0===t?void 0:t.content.isLoading())),s=null}),e.options.preloaderDelay))};e.on("change",o),e.on("loadComplete",(t=>{e.currSlide===t.slide&&o()})),e.ui&&(e.ui.updatePreloaderVisibility=o)}},R={name:"counter",order:5,onInit:(t,e)=>{e.on("change",(()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()}))}};function Z(t,e){t.classList.toggle("pswp_lf--zoomed-in",e)}class G{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this.Tt=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[H,N,W,B,j,R],t.dispatch("uiRegister"),this.uiElementsData.sort(((t,e)=>(t.order||0)-(e.order||0))),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach((t=>{this.registerElement(t)})),t.on("change",(()=>{var e;null===(e=t.element)||void 0===e||e.classList.toggle("pswp_lf--one-slide",1===t.getNumItems())})),t.on("zoomPanUpdate",(()=>this.At()))}registerElement(t){this.isRegistered?this.items.push(new $(this.pswp,t)):this.uiElementsData.push(t)}At(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:s}=e;if(this.pswp.opener.isOpen||(s=e.zoomLevels.initial),s===this.Tt)return;this.Tt=s;const n=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(n)<.01||!e.isZoomable())return Z(t,!1),void t.classList.remove("pswp_lf--zoom-allowed");t.classList.add("pswp_lf--zoom-allowed"),Z(t,(s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=s),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp_lf--click-to-zoom")}}class V{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class X{constructor(e,i){if(this.element=t("pswp_lf__img pswp_lf__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(h(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=r(0,0,t/250)):h(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class J{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new X(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp_lf__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=t("pswp_lf__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=null!==(e=this.data.src)&&void 0!==e?e:"",s.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=d,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=c,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==c&&this.state!==p||this.removePlaceholder())}onError(){this.state=p,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d,this)}isError(){return this.state===p}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(h(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==p,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,i;let s=t("pswp_lf__error-msg","div");s.innerText=null!==(e=null===(i=this.instance.options)||void 0===i?void 0:i.errorMsg)&&void 0!==e?e:"",s=this.instance.applyFilters("contentErrorElement",s,this),this.element=t("pswp_lf__content pswp_lf__error-msg-container","div"),this.element.appendChild(s),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===p)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||u())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!u()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==c&&this.state!==p||this.removePlaceholder()))}}function Y(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:o}=e;if(o){let r;n=new b(o,t,-1),r=e.pswp?e.pswp.viewportSize:g(o,e);const l=v(o,r,t,i);n.update(s.width,s.height,l)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}class Q{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this.Dt=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return Y(i,e,t)}(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this.Dt.push(t),this.Dt.length>this.limit){const t=this.Dt.findIndex((t=>!t.isAttached&&!t.hasSlide));-1!==t&&this.Dt.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this.Dt.findIndex((e=>e.index===t));-1!==e&&this.Dt.splice(e,1)}getContentByIndex(t){return this.Dt.find((e=>e.index===t))}destroy(){this.Dt.forEach((t=>t.destroy())),this.Dt=[]}}const K=.003;class tt{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this.It=void 0,this.Et=!1,this.Lt=!1,this.kt=!1,this.Zt=!1,this.Bt=void 0,this.Ft=void 0,this.Ot=void 0,this.Rt=void 0,this.Nt=void 0,this.Ut=this.Ut.bind(this),t.on("firstZoomPan",this.Ut)}open(){this.Ut(),this.Pt()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this.It=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt(),setTimeout((()=>{this.Pt()}),this.Lt?30:0)}Ut(){if(this.pswp.off("firstZoomPan",this.Ut),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this.It=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt()}}Vt(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;var s,n;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this.Nt=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this.It=0,this.Nt=void 0):this.isOpening&&t.Gt?this.Nt=t.Gt:this.Nt=this.pswp.getThumbBounds(),this.Bt=null==e?void 0:e.getPlaceholderElement(),t.animations.stopAll(),this.Et=Boolean(this.It&&this.It>50),this.$t=Boolean(this.Nt)&&(null==e?void 0:e.content.usePlaceholder())&&(!this.isClosing||!t.mainScroll.isShifted()),this.$t?this.kt=null!==(s=i.showHideOpacity)&&void 0!==s&&s:(this.kt=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this.Zt=!this.kt&&this.pswp.options.bgOpacity>K,this.Ft=this.kt?t.element:t.bg,!this.Et)return this.It=0,this.$t=!1,this.Zt=!1,this.kt=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(K)),t.applyBgOpacity(1)));this.$t&&this.Nt&&this.Nt.innerRect?(this.Lt=!0,this.Ot=this.pswp.container,this.Rt=null===(n=this.pswp.currSlide)||void 0===n?void 0:n.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this.Lt=!1,this.isOpening?(this.kt?(t.element&&(t.element.style.opacity=String(K)),t.applyBgOpacity(1)):(this.Zt&&t.bg&&(t.bg.style.opacity=String(K)),t.element&&(t.element.style.opacity="1")),this.$t&&(this.qt(),this.Bt&&(this.Bt.style.willChange="transform",this.Bt.style.opacity=String(K)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this.Lt&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}Pt(){this.isOpening&&this.Et&&this.Bt&&"IMG"===this.Bt.tagName?new Promise((t=>{let e=!1,i=!0;var s;(s=this.Bt,"decode"in s?s.decode().catch((()=>{})):s.complete?Promise.resolve(s):new Promise(((t,e)=>{s.onload=()=>t(s),s.onerror=e}))).finally((()=>{e=!0,i||t(!0)})),setTimeout((()=>{i=!1,e&&t(!0)}),50),setTimeout(t,250)})).finally((()=>this.Ht())):this.Ht()}Ht(){var t,e;null===(t=this.pswp.element)||void 0===t||t.style.setProperty("--pswp-transition-duration",this.It+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(e=this.pswp.element)||void 0===e||e.classList.toggle("pswp_lf--ui-visible",this.isOpening),this.isOpening?(this.Bt&&(this.Bt.style.opacity="1"),this.Kt()):this.isClosing&&this.Wt(),this.Et||this.jt()}jt(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this.$t&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),null===(e=t.currSlide)||void 0===e||e.applyCurrentZoomPan()}}Kt(){const{pswp:t}=this;this.$t&&(this.Lt&&this.Ot&&this.Rt&&(this.Xt(this.Ot,"transform","translate3d(0,0,0)"),this.Xt(this.Rt,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this.Xt(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this.Zt&&t.bg&&this.Xt(t.bg,"opacity",String(t.options.bgOpacity)),this.kt&&t.element&&this.Xt(t.element,"opacity","1")}Wt(){const{pswp:t}=this;this.$t&&this.qt(!0),this.Zt&&t.bgOpacity>.01&&t.bg&&this.Xt(t.bg,"opacity","0"),this.kt&&t.element&&this.Xt(t.element,"opacity","0")}qt(t){if(!this.Nt)return;const{pswp:i}=this,{innerRect:s}=this.Nt,{currSlide:n,viewportSize:o}=i;if(this.Lt&&s&&this.Ot&&this.Rt){const e=-o.x+(this.Nt.x-s.x)+s.w,i=-o.y+(this.Nt.y-s.y)+s.h,n=o.x-s.w,a=o.y-s.h;t?(this.Xt(this.Ot,"transform",r(e,i)),this.Xt(this.Rt,"transform",r(n,a))):(l(this.Ot,e,i),l(this.Rt,n,a))}n&&(e(n.pan,s||this.Nt),n.currZoomLevel=this.Nt.w/n.width,t?this.Xt(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}Xt(t,e,i){if(!this.It)return void(t.style[e]=i);const{animations:s}=this.pswp,n={duration:this.It,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this.jt()},target:t};n[e]=i,s.startTransition(n)}}const et={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};return class extends class extends class{constructor(){this.Yt={},this.Jt={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,o;this.Jt[t]||(this.Jt[t]=[]),null===(s=this.Jt[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this.Jt[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(o=this.pswp)||void 0===o||o.addFilter(t,e,i)}removeFilter(t,e){this.Jt[t]&&(this.Jt[t]=this.Jt[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this.Jt[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this.Yt[t]||(this.Yt[t]=[]),null===(i=this.Yt[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this.Yt[t]&&(this.Yt[t]=this.Yt[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new V(t,e);return null===(i=this.Yt[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this.Qt(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new J(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this.Qt(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this.ti(n));const o=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",o.itemData,t)}Qt(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?function(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}(this.options.children,this.options.childSelector,t)||[]:[t]}ti(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;n&&(e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return Y(t,this,e)}}{constructor(t){super(),this.options=this.ii(t||{}),this.offset={x:0,y:0},this.si={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this.hi={},this.Gt=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new m,this.animations=new F,this.mainScroll=new z(this),this.gestures=new L(this),this.opener=new tt(this),this.keyboard=new I(this),this.contentLoader=new Q(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this.ei();let t="pswp_lf--open";return this.gestures.supportsTouch&&(t+=" pswp_lf--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new O(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this.hi=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this.hi,slide:void 0}),this.Gt=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",(()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this.ni.bind(this)),this.events.add(window,"scroll",this.oi.bind(this)),this.dispatch("bindEvents")})),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),o(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.appendHeavy()}))}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;null===(e=this.currSlide)||void 0===e||e.zoomTo(...t)}toggleZoom(){var t;null===(t=this.currSlide)||void 0===t||t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this.Yt={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(t=this.element)||void 0===t||t.remove(),this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.destroy()})),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach(((e,i)=>{var s,n;let o=(null!==(s=null===(n=this.currSlide)||void 0===n?void 0:n.index)&&void 0!==s?s:0)-1+i;var r;this.canLoop()&&(o=this.getLoopedIndex(o)),o===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,null===(r=e.slide)||void 0===r||r.setIsActive(!0)))})),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const s=this.getItemData(e);t.slide=new S(s,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const i=g(this.options,this);!t&&n(i,this.si)||(e(this.si,i),this.dispatch("beforeResize"),e(this.viewportSize,this.si),this.oi(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var t;this.hasMouse||(this.hasMouse=!0,null===(t=this.element)||void 0===t||t.classList.add("pswp_lf--has_mouse"))}ni(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout((()=>{this.updateSize()}),500)}oi(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}ei(){this.element=t("pswp_lf","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=t("pswp_lf__bg","div",this.element),this.scrollWrap=t("pswp_lf__scroll-wrap","section",this.element),this.container=t("pswp_lf__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp_lf__items"),this.mainScroll.appendHolders(),this.ui=new G(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const s=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(s.thumbBounds)return s.thumbBounds;const{element:n}=e;let o,r;if(n&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";r=n.matches(t)?n:n.querySelector(t)}return r=i.applyFilters("thumbEl",r,e,t),r&&(o=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),n=s.width/e,o=s.height/i,r=n>o?n:o,l=(s.width-e*r)/2,a=(s.height-i*r)/2,h={x:s.left+l,y:s.top+a,w:e*r};return h.innerRect={w:s.width,h:s.height,x:l,y:a},h}(r,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(r)),i.applyFilters("thumbBounds",o,e,t)}(this.currIndex,this.currSlide?this.currSlide.data:this.hi,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}ii(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...et,...t}}}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).LfPhotoSwipeLightbox=e()}(this,(function(){"use strict";function t(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function e(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const i="loading",s="loaded",n="error";function o(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function r(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class l{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class a{constructor(e,i){if(this.element=t("pswp_lf__img pswp_lf__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&("IMG"===this.element.tagName?(e(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(t,e,i){let s="translate3d(0px,0px,0)";return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}(0,0,t/250)):e(this.element,t,i))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class h{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new a(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp_lf__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=t("pswp_lf__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,s;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(e=this.data.src)&&void 0!==e?e:"",n.alt=null!==(s=this.data.alt)&&void 0!==s?s:"",this.state=i,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=s,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==s&&this.state!==n||this.removePlaceholder())}onError(){this.state=n,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===i,this)}isError(){return this.state===n}isImageContent(){return"image"===this.type}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(e(this.element,t,i),this.isImageContent()&&!this.isError()))){const e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==n,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,i;let s=t("pswp_lf__error-msg","div");s.innerText=null!==(e=null===(i=this.instance.options)||void 0===i?void 0:i.errorMsg)&&void 0!==e?e:"",s=this.instance.applyFilters("contentErrorElement",s,this),this.element=t("pswp_lf__content pswp_lf__error-msg-container","div"),this.element.appendChild(s),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===n)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||r())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!r()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==s&&this.state!==n||this.removePlaceholder()))}}function d(t,e,i,s,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,s,n)[t];else if(e.padding)o=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(o=e[i])}return Number(o)||0}class c{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,o=i.y/s.y;this.fit=Math.min(1,no?n:o),this.vFill=Math.min(1,o),this.initial=this.t(),this.secondary=this.i(),this.max=Math.max(this.initial,this.secondary,this.o()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}l(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}i(){let t=this.l("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}t(){return this.l("initial")||this.fit}o(){return this.l("max")||Math.max(1,4*this.fit)}}function p(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:o}=e;if(o){let r;n=new c(o,t,-1),r=e.pswp?e.pswp.viewportSize:function(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(o,e);const l=function(t,e,i,s){return{x:e.x-d("left",t,e,i,s)-d("right",t,e,i,s),y:e.y-d("top",t,e,i,s)-d("bottom",t,e,i,s)}}(o,r,t,i);n.update(s.width,s.height,l)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}return class extends class extends class{constructor(){this.u={},this.p={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,o;this.p[t]||(this.p[t]=[]),null===(s=this.p[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this.p[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(o=this.pswp)||void 0===o||o.addFilter(t,e,i)}removeFilter(t,e){this.p[t]&&(this.p[t]=this.p[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this.p[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this.u[t]||(this.u[t]=[]),null===(i=this.u[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this.u[t]&&(this.u[t]=this.u[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new l(t,e);return null===(i=this.u[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this.v(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new h(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this.v(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this.m(n));const o=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",o.itemData,t)}v(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?o(this.options.children,this.options.childSelector,t)||[]:[t]}m(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;n&&(e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return p(t,this,e)}}{constructor(t){super(),this.options=t||{},this.g=0,this.shouldOpen=!1,this._=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){o(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=o(this.options.children,this.options.childSelector,t.currentTarget).findIndex((t=>t===e||t.contains(e)));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=o(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if("function"==typeof(o=i.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(i.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}var o;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return p(i,e,t)}(t,this));const r=++this.g;Promise.all(s).then((t=>{if(this.shouldOpen){const e=t[0];this.I(e,r)}}))}I(t,e){if(e!==this.g&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this.u).forEach((t=>{var e;null===(e=this.u[t])||void 0===e||e.forEach((e=>{i.on(t,e)}))})),Object.keys(this.p).forEach((t=>{var e;null===(e=this.p[t])||void 0===e||e.forEach((e=>{i.addFilter(t,e.fn,e.priority)}))})),this._&&(i.contentLoader.addToCache(this._),this._=void 0),i.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),i.init()}destroy(){var t;null===(t=this.pswp)||void 0===t||t.destroy(),this.shouldOpen=!1,this.u={},o(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)}))}}}));class i{constructor(t,e){this.options=e,this.initLightboxEvents(t),t.on("init",(()=>{this.initPswpEvents(t.pswp)}))}light_render(t,e="normal",i=0){if(!t)return;const{content:s,container:n}=t,{element:o,data:r}=s;if(o&&r.hotspot>0&&!lfUtils.mobileCheck()){var l=380,a=1200,h=document.documentElement.clientWidth,d=document.documentElement.clientHeight,c=h-40,p=window.innerHeight-40,u=parseInt(r.width)/parseInt(r.height);a>c&&(a=c);var f=a=a-l-0,m=f/u;m>p&&(f=(m=p)*u),o.style.width=f+l+0+"px",o.style.height=m+"px";const t=`translate3d(${(h-(f+l+0))/2}px, ${(d-m)/2}px, 0px) scale3d(1, 1, 1)`;n.style.setProperty("--transform",t),n.style.transform=t,"timeout"==e&&setTimeout((()=>{o.style.width=f+l+0+"px",o.style.height=m+"px",n.style.transform=t,n.style.setProperty("--timeout",t)}),i)}}initLightboxEvents(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentRemove",this.onContentRemove.bind(this)),t.on("afterInit",(()=>{lfUtils.select(".pswp_lf").classList.add("pswp-lf"),document.querySelector(".pswp_lf").addEventListener("wheel",(t=>{const e=t.target,i="lf-productItems";(e.classList.contains(i)||e.closest(`.${i}`))&&t.stopPropagation()}),{capture:!0,passive:!0})})),t.on("calcSlideSize",(({slide:t})=>{this.light_render(t,"timeout")})),t.on("zoomPanUpdate",(({slide:t})=>{this.light_render(t)})),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("preventPointerEvent",this.preventPointerEvent.bind(this)),t.addFilter("domItemData",((t,e,i)=>("hotspots"===t.type&&i&&(t.hotspot=parseInt(i.dataset.hotspots)||0,t.media=i.dataset.pswpMedia||"image","video"===t.media&&(i.dataset.pswpVideoSources?t.videoSources=JSON.parse(i.dataset.pswpVideoSources):i.dataset.pswpVideoSrc?t.videoSrc=i.dataset.pswpVideoSrc:t.videoSrc=i.href,t.img=i.dataset.img),t.section=e.closest(".lookfy-gallery").dataset.section,t.hotspot>0&&i.dataset.imageId&&(t.imageId=i.dataset.imageId)),t)))}initPswpEvents(t){t.on("pointerDown",(e=>{const i=t.currSlide;if(isLfVideoContent(i)&&this.options.preventDragOffset){const s=e.originalEvent;if("pointerdown"===s.type){const n=Math.ceil(i.height*i.currZoomLevel)+i.bounds.center.y,o=s.pageY-t.offset.y;o>n-this.options.preventDragOffset&&o{isLfVideoContent(t.slide)&&!t.slide.isActive&&t.preventDefault()})),t.on("close",(()=>{if(isLfHotspotContent(t.currSlide.content)){isLfVideoContent(t.currSlide.content)&&(t.options.showHideAnimationType&&"zoom"!==t.options.showHideAnimationType||(t.options.showHideAnimationType="fade"),this.pauseVideo(t.currSlide.content));const e=t.container.querySelectorAll(".pswp__hotspots-container");t.hi.element.closest(".lookfy-gallery");e.forEach(((t,e)=>{const i=t.querySelector(".pswp__lightboxInfo").dataset.imageid;if(i){const e=document.getElementById(`${this.options.galleryData.sectionId}-${i}`);if(e){const i=t.querySelector(".lf-productItems");i&&e.appendChild(i);const s=t.querySelector(".kt-hotspots-wrapper");if(s){const t=s.querySelector(".kt-image-link");t?.classList.remove("lfHidden");const i=e.querySelector(".skinItemLayers"),n=e.querySelector(".kt-image-item-box");i?i.before(s):n&&n.appendChild(s)}}}}))}}))}onContentResize({content:t}){this.light_render(t.slide)}onContentLoad(t){const e=t.content;if(isLfHotspotContent(e)){const{data:i,type:s,slide:n}=e;if(!t.content)return;if(t.preventDefault(),e.element)return;e.type="hotspots",e.element=lfUtils.createDomEl("div","pswp__hotspots-container");const o=i.imageId?{"data-imageId":i.imageId}:{},r=lfUtils.createDomEl("div",`pswp__lightboxInfo shopify-section-${i.section}`,"",o),l=lfUtils.createDomEl("div","pswp__hotspots-wrap");if("video"==i.media){const t=lfUtils.createDomEl("video","",` `,{poster:i.img,autoplay:!0,loop:!0,muted:!0,width:i.width||i.vwidth||"auto",height:i.height||i.vheight||"auto"});t.muted=!0,t.setAttribute("muted","true"),t.setAttribute("playsinline",""),t.setAttribute("preload","auto"),l.appendChild(t)}else l.innerHTML=` `;r.appendChild(l),e.element.appendChild(r);const a=this.options.galleryData;if(i.imageId){const t=document.getElementById(`${i.section}-${i.imageId}`),e=lfUtils.createDomEl("div","pswp__productInfo",`${lfUtils.getCurrentLange("in_this_photo")} `);if(r.appendChild(e),lfUtils.mobileCheck()){const e=lfUtils.createDomEl("div","pswp__productInfo_mobile",`${lfUtils.getCurrentLange("shop_the_look")} `);r.appendChild(e);e.querySelector("a").addEventListener("click",(function(e){e.preventDefault();const i=t.querySelector(".lf-productItems");i&&lfUtils.lightbox({heading:lfUtils.getCurrentLange("in_this_photo"),classes:`shopify-section-${a.sectionId}`,content:i,callback:()=>{t.appendChild(i)},photoSwipe:!1})}))}}}}onContentAppend({content:t}){const{data:e,element:i,slide:s}=t;if(this.light_render(s,"timeout"),!e.imageId)return;const n=document.getElementById(`${e.section}-${e.imageId}`);if(!n)return;const o=i.querySelector(".pswp__hotspots-wrap");if(o){const t=n.querySelector(".kt-hotspots-wrapper"),e=t?.querySelector(".kt-image-link");e&&e.classList.add("lfHidden"),o.appendChild(t)}if(!lfUtils.mobileCheck()){const t=n.querySelector(".lf-productItems");t&&i.querySelector(".pswp__productInfo")?.appendChild(t)}}onContentRemove({content:t}){const{data:e,element:i,slide:s}=t;if(e.imageId){const t=document.getElementById(`${e.section}-${e.imageId}`);if(s){const{container:e}=s,i=e.querySelector(".kt-hotspots-wrapper");if(i){const e=i.querySelector(".kt-image-link");e&&e.classList.remove("lfHidden");const s=t.querySelector(".skinItemLayers"),n=t.querySelector(".kt-image-item-box");s?s.before(i):n&&n.appendChild(i)}if(!lfUtils.mobileCheck()){const i=e.querySelector(".lf-productItems");i&&t.appendChild(i)}}}}onContentDestroy({content:t}){isLfVideoContent(t)&&t._videoPosterImg&&(t._videoPosterImg.onload=t._videoPosterImg.onerror=null,t._videoPosterImg=null)}isKeepingPlaceholder(t,e){return!isLfVideoContent(e)&&t}isContentZoomable(t,e){return!isLfVideoContent(e)&&t}onContentActivate({content:t}){isLfVideoContent(t)&&this.options.autoplay&&this.playVideo(t)}onContentDeactivate({content:t}){isLfVideoContent(t)&&this.pauseVideo(t)}preloadVideoPoster(t,e){!t._videoPosterImg&&e&&(t._videoPosterImg=new Image,t._videoPosterImg.src=e,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=()=>{t.onLoaded()})}playVideo(t){t.element&&"video"==t.element.tagName&&t.element.play()}pauseVideo(t){t.element&&"video"==t.element.tagName&&t.element.pause()}preventPointerEvent(t,e,i){return("down"!=i||"SELECT"!=e.target.tagName)&&t}useContentPlaceholder(t,e){return!!isLfVideoContent(e)||t}}!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i)s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var l;"string"==typeof t&&(r=document.querySelectorAll(t)),r?(this.elements=(l=r,Array.isArray(l)?l:"object"==typeof l&&"number"==typeof l.length?[...l]:[l]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function l(t){this.img=t}function a(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new l(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new a(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},l.prototype=Object.create(e.prototype),l.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},l.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},l.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},l.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},l.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},l.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},l.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype=Object.create(l.prototype),a.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},a.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},a.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n})),!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,(function(t,e){"use strict";function i(i,o,l){(l=l||e||t.jQuery)&&(o.prototype.option||(o.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[i]=function(t){return"string"==typeof t?function(t,e,s){var n,o="$()."+i+'("'+e+'")';return t.each((function(t,a){var h=l.data(a,i);if(h){var d=h[e];if(d&&"_"!=e.charAt(0)){var c=d.apply(h,s);n=void 0===n?c:n}else r(o+" is not a valid method")}else r(i+" not initialized. Cannot call methods, i.e. "+o)})),void 0!==n?n:t}(this,t,n.call(arguments,1)):(function(t,e){t.each((function(t,s){var n=l.data(s,i);n?(n.option(e),n._init()):(n=new o(s,e),l.data(s,i,n))}))}(this,t),this)},s(l))}function s(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,o=t.console,r=void 0===o?function(){}:function(t){o.error(t)};return s(e||t.jQuery),i})),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},s=i[t]=i[t]||[];return-1==s.indexOf(e)&&s.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var s=i.indexOf(e);return-1!=s&&i.splice(s,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var s=this._onceEvents&&this._onceEvents[t],n=0;ne;e++)t[r[e]]=0;return t}();var a={};a.width=s.offsetWidth,a.height=s.offsetHeight;for(var h=a.isBorderBox="border-box"==o.boxSizing,d=0;l>d;d++){var c=r[d],p=o[c],u=parseFloat(p);a[c]=isNaN(u)?0:u}var f=a.paddingLeft+a.paddingRight,m=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,y=a.marginTop+a.marginBottom,v=a.borderLeftWidth+a.borderRightWidth,w=a.borderTopWidth+a.borderBottomWidth,b=h&&n,S=t(o.width);!1!==S&&(a.width=S+(b?0:f+v));var _=t(o.height);return!1!==_&&(a.height=_+(b?0:m+w)),a.innerWidth=a.width-(f+v),a.innerHeight=a.height-(m+w),a.outerWidth=a.width+g,a.outerHeight=a.height+y,a}}var n,o="undefined"==typeof console?function(){}:function(t){console.error(t)},r=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],l=r.length,a=!1;return s})),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;ir?"round":"floor"](o),this.cols=Math.max(o,1)},s.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},s._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=Math[e&&1>e?"round":"ceil"](t.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);for(var s=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),n={x:this.columnWidth*s.col,y:s.y},o=s.y+t.size.outerHeight,r=i+s.col,l=s.col;r>l;l++)this.colYs[l]=o;return n},s._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},s._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,s=0;i>s;s++)e[s]=this._getColGroupY(s,t);return e},s._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},s._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols;i=t>1&&i+t>this.cols?0:i;var s=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=s?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},s._manageStamp=function(t){var i=e(t),s=this._getElementOffset(t),n=this._getOption("originLeft")?s.left:s.right,o=n+i.outerWidth,r=Math.floor(n/this.columnWidth);r=Math.max(0,r);var l=Math.floor(o/this.columnWidth);l-=o%this.columnWidth?0:1,l=Math.min(this.cols-1,l);for(var a=(this._getOption("originTop")?s.top:s.bottom)+i.outerHeight,h=r;l>=h;h++)this.colYs[h]=Math.max(a,this.colYs[h])},s._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},s._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},s.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i})),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,(function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=i.length;function n(t){var i=getComputedStyle(t);return i||e("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}var o,r=!1;function l(){if(!r){r=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var s=n(e);o=200==Math.round(t(s.width)),a.isBoxSizeOuter=o,i.removeChild(e)}}function a(e){if(l(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var t=this.slides[0];if(t){var e=-this.x-t.target,i=e/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){!this.isPointerDown&&Math.round(100*this.x)==Math.round(100*t)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t,e,i){for(var s=0;s0?i:0;n.wrapShift(o),e-=n.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var s=this.cells.length,n=t;n0;){var n=this.cells[e];if(!n)break;s.push(n),e+=i,t-=n.size.outerWidth}return s},f._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",s=this.slideableWidth-this.getLastCell().size[i],n=s1))return t;var i=s.modulo(t,e),n=Math.abs(i-this.selectedIndex),o=Math.abs(i+e-this.selectedIndex),r=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&o=e&&(this.x+=this.slideableWidth)},f.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},f.next=function(t,e){this.select(this.selectedIndex+1,t,e)},f.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},f.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},f.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},f.selectCell=function(t,e,i){var s=this.queryCell(t);if(s){var n=this.getCellSlideIndex(s);this.select(n,e,i)}},f.getCellSlideIndex=function(t){for(var e=0;e *"),this.getCell(t))},f.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var n=[],o=e-t;o<=e+t;o++){var r=this.options.wrapAround?s.modulo(o,i):o,l=this.slides[r];l&&(n=n.concat(l.getCellElements()))}return n},f.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#.]?[\d/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},f.uiChange=function(){this.emitEvent("uiChange")},f.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},f.onresize=function(){this.watchCSS(),this.resize()},s.debounceMethod(u,"onresize",150),f.resize=function(){if(this.isActive&&!this.isAnimating&&!this.isDragging){this.getSize(),this.options.wrapAround&&(this.x=s.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},f.watchCSS=function(){this.options.watchCSS&&(-1!=a(this.element,":after").content.indexOf("flickitylf")?this.activate():this.deactivate())},f.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=u.keyboardHandlers[t.keyCode];i&&i.call(this)}},u.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},f.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},f.deactivate=function(){this.isActive&&(this.element.classList.remove("flickitylf-enabled"),this.element.classList.remove("flickitylf-rtl"),this.unselectSelectedSlide(),this.cells.forEach((function(t){t.destroy()})),this.element.removeChild(this.viewport),d(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},f.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),l&&this.$element&&l.removeData(this.element,"flickitylf"),delete this.element.flickitylfGUID,delete p[this.guid]},s.extend(f,r),u.data=function(t){var e=(t=s.getQueryElement(t))&&t.flickitylfGUID;return e&&p[e]},s.htmlInit(u,"flickitylf"),l&&l.bridget&&l.bridget("flickitylf",u),u.setJQuery=function(t){l=t},u.Cell=n,u.Slide=o,u})),function(t,e){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.Unipointer=e(t,t.EvEmitter)}(window,(function(t,e){function i(){}var s=i.prototype=Object.create(e.prototype);s.bindStartEvent=function(t){this._bindStartEvent(t,!0)},s.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},s._bindStartEvent=function(e,i){var s=(i=void 0===i||i)?"addEventListener":"removeEventListener",n="mousedown";"ontouchstart"in t?n="touchstart":t.PointerEvent&&(n="pointerdown"),e[s](n,this)},s.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},s.getTouch=function(t){for(var e=0;e3||Math.abs(t.y)>3},s.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},s._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},s._dragStart=function(t,e){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,e)},s.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},s._dragMove=function(t,e,i){this.isDragging&&this.dragMove(t,e,i)},s.dragMove=function(t,e,i){t.preventDefault(),this.emitEvent("dragMove",[t,e,i])},s._dragEnd=function(t,e){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,e)},s.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},s.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},s._staticClick=function(t,e){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,e),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},s.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},i.getPointerPoint=e.getPointerPoint,i})),function(t,e){"function"==typeof define&&define.amd?define("flickitylf/js/drag",["./flickitylf","unidragger/unidragger","fizzy-ui-utils/utils"],(function(i,s,n){return e(t,i,s,n)})):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickitylf"),require("unidragger"),require("fizzy-ui-utils")):t.Flickitylf=e(t,t.Flickitylf,t.Unidragger,t.fizzyUIUtils)}(window,(function(t,e,i,s){s.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var n=e.prototype;s.extend(n,i.prototype),n._touchActionValue="pan-y",n._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},n.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},n.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},n._uiChangeDrag=function(){delete this.isFreeScrolling},n.pointerDown=function(e,i){this.isDraggable?this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=r(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i)):this._pointerDownDefault(e,i)},n._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var o={INPUT:!0,TEXTAREA:!0,SELECT:!0};function r(){return{x:t.pageXOffset,y:t.pageYOffset}}return n.pointerDownFocus=function(t){o[t.target.nodeName]||this.focus()},n._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,s=o[t.target.nodeName];e||i||s||t.preventDefault()},n.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},n.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},n.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},n.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},n.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var s=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x%=this.slideableWidth);var n=this.dragStartPosition+i.x*s;if(!this.options.wrapAround&&this.slides.length){var o=Math.max(-this.slides[0].target,this.dragStartPosition);n=n>o?.5*(n+o):n;var r=Math.min(-this.getLastSlide().target,this.dragStartPosition);n=nthis.slides[0].target&&-s1,o=n?s.modulo(e,i):e,r=this.slides[o];if(!r)return null;var l=n?this.slideableWidth*Math.floor(e/i):0;return t-(r.target+l)},n.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},n.staticClick=function(t,e){var i=this.getParentCell(t.target),s=i&&i.element,n=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,s,n])},n.onscroll=function(){var t=r(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e})),function(t,e){"function"==typeof define&&define.amd?define("flickitylf/js/prev-next-button",["./flickitylf","unipointer/unipointer","fizzy-ui-utils/utils"],(function(i,s,n){return e(t,i,s,n)})):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickitylf"),require("unipointer"),require("fizzy-ui-utils")):e(t,t.Flickitylf,t.Unipointer,t.fizzyUIUtils)}(window,(function(t,e,i,s){"use strict";var n="http://www.w3.org/2000/svg";function o(t,e){this.direction=t,this.parent=e,this._create()}o.prototype=Object.create(i.prototype),o.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickitylf-button flickitylf-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},o.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},o.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},o.prototype.createSVG=function(){var t=document.createElementNS(n,"svg");t.setAttribute("class","flickitylf-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e=document.createElementNS(n,"path"),i=function(t){return"string"==typeof t?t:"M "+t.x0+",50 L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}(this.parent.options.arrowShape);return e.setAttribute("d",i),e.setAttribute("class","arrow"),this.isLeft||e.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(e),t},o.prototype.handleEvent=s.handleEvent,o.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},o.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},o.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},o.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)this.enable();else{var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()}},o.prototype.destroy=function(){this.deactivate(),this.allOff()},s.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var r=e.prototype;return r._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new o(-1,this),this.nextButton=new o(1,this),this.on("activate",this.activatePrevNextButtons))},r.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},r.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=o,e})),function(t,e){"function"==typeof define&&define.amd?define("flickitylf/js/page-dots",["./flickitylf","unipointer/unipointer","fizzy-ui-utils/utils"],(function(i,s,n){return e(t,i,s,n)})):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickitylf"),require("unipointer"),require("fizzy-ui-utils")):e(t,t.Flickitylf,t.Unipointer,t.fizzyUIUtils)}(window,(function(t,e,i,s){function n(t){this.parent=t,this._create()}n.prototype=Object.create(i.prototype),n.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickitylf-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},n.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},n.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},n.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},n.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],s=this.dots.length,n=s+t,o=s;o1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var t=this.slides[0];if(t){var e=-this.x-t.target,i=e/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){!this.isPointerDown&&Math.round(100*this.x)==Math.round(100*t)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t,e,i){for(var s=0;s0?i:0;n.wrapShift(o),e-=n.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var s=this.cells.length,n=t;n0;){var n=this.cells[e];if(!n)break;s.push(n),e+=i,t-=n.size.outerWidth}return s},f._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",s=this.slideableWidth-this.getLastCell().size[i],n=s1))return t;var i=s.modulo(t,e),n=Math.abs(i-this.selectedIndex),o=Math.abs(i+e-this.selectedIndex),r=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&o=e&&(this.x+=this.slideableWidth)},f.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},f.next=function(t,e){this.select(this.selectedIndex+1,t,e)},f.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},f.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},f.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},f.selectCell=function(t,e,i){var s=this.queryCell(t);if(s){var n=this.getCellSlideIndex(s);this.select(n,e,i)}},f.getCellSlideIndex=function(t){for(var e=0;e *"),this.getCell(t))},f.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var n=[],o=e-t;o<=e+t;o++){var r=this.options.wrapAround?s.modulo(o,i):o,l=this.slides[r];l&&(n=n.concat(l.getCellElements()))}return n},f.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#.]?[\d/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},f.uiChange=function(){this.emitEvent("uiChange")},f.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},f.onresize=function(){this.watchCSS(),this.resize()},s.debounceMethod(u,"onresize",150),f.resize=function(){if(this.isActive&&!this.isAnimating&&!this.isDragging){this.getSize(),this.options.wrapAround&&(this.x=s.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},f.watchCSS=function(){this.options.watchCSS&&(-1!=a(this.element,":after").content.indexOf("flickitylf")?this.activate():this.deactivate())},f.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=u.keyboardHandlers[t.keyCode];i&&i.call(this)}},u.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},f.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},f.deactivate=function(){this.isActive&&(this.element.classList.remove("flickitylf-enabled"),this.element.classList.remove("flickitylf-rtl"),this.unselectSelectedSlide(),this.cells.forEach((function(t){t.destroy()})),this.element.removeChild(this.viewport),d(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},f.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),l&&this.$element&&l.removeData(this.element,"flickitylf"),delete this.element.flickitylfGUID,delete p[this.guid]},s.extend(f,r),u.data=function(t){var e=(t=s.getQueryElement(t))&&t.flickitylfGUID;return e&&p[e]},s.htmlInit(u,"flickitylf"),l&&l.bridget&&l.bridget("flickitylf",u),u.setJQuery=function(t){l=t},u.Cell=n,u.Slide=o,u})),function(t,e){"function"==typeof define&&define.amd?define("flickitylf/js/drag",["./flickitylf","unidragger/unidragger","fizzy-ui-utils/utils"],(function(i,s,n){return e(t,i,s,n)})):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickitylf"),require("unidragger"),require("fizzy-ui-utils")):t.flickitylf=e(t,t.flickitylf,t.Unidragger,t.fizzyUIUtils)}(window,(function(t,e,i,s){s.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var n=e.prototype;s.extend(n,i.prototype),n._touchActionValue="pan-y",n._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},n.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},n.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},n._uiChangeDrag=function(){delete this.isFreeScrolling},n.pointerDown=function(e,i){this.isDraggable?this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=r(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i)):this._pointerDownDefault(e,i)},n._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var o={INPUT:!0,TEXTAREA:!0,SELECT:!0};function r(){return{x:t.pageXOffset,y:t.pageYOffset}}return n.pointerDownFocus=function(t){o[t.target.nodeName]||this.focus()},n._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,s=o[t.target.nodeName];e||i||s||t.preventDefault()},n.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},n.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},n.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},n.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},n.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var s=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x%=this.slideableWidth);var n=this.dragStartPosition+i.x*s;if(!this.options.wrapAround&&this.slides.length){var o=Math.max(-this.slides[0].target,this.dragStartPosition);n=n>o?.5*(n+o):n;var r=Math.min(-this.getLastSlide().target,this.dragStartPosition);n=nthis.slides[0].target&&-s1,o=n?s.modulo(e,i):e,r=this.slides[o];if(!r)return null;var l=n?this.slideableWidth*Math.floor(e/i):0;return t-(r.target+l)},n.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},n.staticClick=function(t,e){var i=this.getParentCell(t.target),s=i&&i.element,n=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,s,n])},n.onscroll=function(){var t=r(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e})),function(t,e){"function"==typeof define&&define.amd?define("flickitylf/js/prev-next-button",["./flickitylf","unipointer/unipointer","fizzy-ui-utils/utils"],(function(i,s,n){return e(t,i,s,n)})):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickitylf"),require("unipointer"),require("fizzy-ui-utils")):e(t,t.flickitylf,t.Unipointer,t.fizzyUIUtils)}(window,(function(t,e,i,s){"use strict";var n="http://www.w3.org/2000/svg";function o(t,e){this.direction=t,this.parent=e,this._create()}o.prototype=Object.create(i.prototype),o.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickitylf-button flickitylf-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},o.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},o.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},o.prototype.createSVG=function(){var t=document.createElementNS(n,"svg");t.setAttribute("class","flickitylf-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e=document.createElementNS(n,"path"),i=function(t){return"string"==typeof t?t:"M "+t.x0+",50 L "+t.x1+","+(t.y1+50)+" L "+t.x2+","+(t.y2+50)+" L "+t.x3+",50 L "+t.x2+","+(50-t.y2)+" L "+t.x1+","+(50-t.y1)+" Z"}(this.parent.options.arrowShape);return e.setAttribute("d",i),e.setAttribute("class","arrow"),this.isLeft||e.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(e),t},o.prototype.handleEvent=s.handleEvent,o.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},o.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},o.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},o.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)this.enable();else{var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()}},o.prototype.destroy=function(){this.deactivate(),this.allOff()},s.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var r=e.prototype;return r._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new o(-1,this),this.nextButton=new o(1,this),this.on("activate",this.activatePrevNextButtons))},r.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},r.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=o,e})),function(t,e){"function"==typeof define&&define.amd?define("flickitylf/js/page-dots",["./flickitylf","unipointer/unipointer","fizzy-ui-utils/utils"],(function(i,s,n){return e(t,i,s,n)})):"object"==typeof module&&module.exports?module.exports=e(t,require("./flickitylf"),require("unipointer"),require("fizzy-ui-utils")):e(t,t.flickitylf,t.Unipointer,t.fizzyUIUtils)}(window,(function(t,e,i,s){function n(t){this.parent=t,this._create()}n.prototype=Object.create(i.prototype),n.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickitylf-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},n.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},n.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},n.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},n.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],s=this.dots.length,n=s+t,o=s;o{money_format="${{amount}}","undefined"!=typeof lfMoneyFormat&&""!==lfMoneyFormat&&(money_format=lfMoneyFormat),"string"==typeof t&&(t=t.replace(".",""));var i="",s=/\{\{\s*(\w+)\s*\}\}/,n=e||money_format;function o(t,e){return void 0===t?e:t}function r(t,e,i,s){if(e=o(e,2),i=o(i,","),s=o(s,"."),isNaN(t)||null==t)return 0;var n=(t=(t/100).toFixed(e)).split(".");return n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+i)+(n[1]?s+n[1]:"")}switch(n.match(s)[1]){case"amount":i=r(t,2);break;case"amount_no_decimals":i=r(t,0);break;case"amount_with_comma_separator":i=r(t,2,".",",");break;case"amount_no_decimals_with_space_separator":i=r(t,0," ",",");break;case"amount_no_decimals_with_comma_separator":i=r(t,0,".",",")}return n.replace(s,i)},n=(t,e="",i="lf_animate__")=>new Promise(((s,n)=>{if(t.classList.contains("lf-appear")||t.classList.contains("lf-appear-done")){e.length||(e=t.dataset.animation)&&""!=e||(e="fadeIn");var o="lf-appear-childs";t.classList.contains("lf-appear-done")&&(o+="-done");const l=`${i}${e}`;if(t.classList.contains(o)){t.classList.remove("lf-appear-childs"),t.classList.add("lf-appear-childs-done");const a=t.querySelectorAll(".lf-appear-child");for(const h of a)h.classList.remove("lf-appear-child"),h.classList.add(`${i}animated`,l),h.addEventListener("animationend",r,{once:!0})}else t.classList.add(`${i}animated`,l),t.addEventListener("animationend",r,{once:!0});function r(t){t.stopPropagation(),t.target.classList.remove(`${i}animated`,l),t.target.classList.add(`${i}done`),s("Animation ended")}t.classList.contains("lf-appear")&&(t.classList.add("lf-appear-done"),t.classList.remove("lf-appear"))}}));function lfGallery(t,e={}){if(e={...e},!t.classList.contains("lf-active")){var i,s=parseInt(t.dataset.id);if(t.classList.add("lf-active"),!s)return;const e=lfUtils.isMultiLang()?`&lang=${lfUtils.lfLocale}&country=${lfUtils.lfCountry}`:"";let n={id:s,link:lfUtils.baseUrl+"gallery/"+s+"?shop="+Shopify.shop+e+"&url="+encodeURI(window.location.href.split("#")[0])};if(t.classList.contains("lookfy-gallery-reload")&&(n.link=n.link+"&reload=true"),t.classList.contains("lf-gallery-site")){const e=t.querySelector(".kt-type-main"),s=t.querySelectorAll("link"),o=document.head;s.forEach((t=>{o.appendChild(t)}));const r=t.dataset.section;n={...n,sectionId:r,layout:lfUtils.lfLayout(e.dataset.type),type:e.dataset.type,settings:JSON.parse(t.dataset.settings),h_settings:JSON.parse(t.dataset.h_settings),t_settings:JSON.parse(t.dataset.t_settings),setup:JSON.parse(t.dataset.setup),analytic:"true"===t.dataset.analytic,source:t.dataset.source,skin:t.dataset.skin};const{l_column:l,l_embedded:a,l_carousel:h,l_multi:d,spacing:c}=n.layout;n.animation=["carousel","column_carousel"].includes(n.type)||l?"none":n.settings.animate,n.layout.l_carousel&&(n.c_settings=JSON.parse(t.dataset.carousel)),lfGaleryCustom(t),i={type:n.type,shop:{setup:n.setup}},t.querySelectorAll(".lf-image-item").forEach(((e,s)=>{if(lfUtils.documentEvent("lookfyGalleryItem",{itemElement:e,galleryElement:t,galleryData:n,lightbox:!1,position:s}),!l){e.querySelectorAll(".kt-hotspots-wrapper .kt-hotspot-item").forEach(((s,o)=>{const l=s.querySelector(".hotspot-item-detail");var a=`kt-${r}-${s.dataset.did}-form-${l.dataset.id}`;const h=s.dataset.id,d={type:s.dataset.type,id:s.dataset.did};"product"==s.dataset.type&&(d.product={id:l.dataset.id});const c=e.querySelector(".lf-productItems");cloneHotspot(d,n,l,o,c,t,i,a,h)}))}}));if(e.querySelectorAll(".kt-hotspots-wrapper .hotspot-item-type-product").forEach(((e,s)=>{const n=e.closest(".kt-hotspot-item"),o=n.dataset.id,l=e.querySelector(".hotspot-item-price"),a=e.querySelector(".hotspot-item-image"),h=e.querySelector(".hotspot-item-title"),d={id:n.dataset.did,product:{id:e.dataset.id,handle:e.dataset.handle}};if(void 0===window.lfProducts||void 0===window.lfProducts[d.product.id]){const s=`kt-${r}-${d.id}-form-${d.product.id}`;var c=lfUtils.getLinkLang(d.product.handle);fetchProductDetail(r,t,i,s,o,a,e,c,h,l,d)}else lfHotspotProduct(r,null,window.lfProducts[e.dataset.id],null,l,a)})),l){const{desktop_columns:s,tablet_columns:o,mobile_columns:l,settings:a}=n.settings;e.querySelectorAll(".kt-lcolumn-item").forEach(((e,a)=>{const c=e.querySelector(".kt-products-column"),p=lfUtils.createDomEl("div","hotspot-item-products-list"),u=lfUtils.createDomEl("div",`kt-row kt-${s}-col-lg kt-${o}-col-md kt-${l}-col-sm`,"",{"data-lg":s,"data-md":o,"data-sm":l});"default_column"==n.type?(c.appendChild(u),embeddedClass="kt-column-row"):d||h?(u.classList.add("kt-carousel"),h&&"multiple_columns"!=n.type?(u.classList.remove("kt-row"),embeddedClass="kt-carousel-column-row"):embeddedClass="kt-multi-column-row",c.appendChild(u)):c.appendChild(p);const f=e.querySelectorAll(".kt-hotspots-wrapper .kt-hotspot-item");f.length&&n.settings.alltocart&&renderAllToCart(c,n.settings.alltocart_message);const m="default_embedded"==n.type?p:u;f.forEach(((e,s)=>{const o=e.querySelector(".hotspot-item-detail"),l=`kt-${r}-${e.dataset.did}-form-${o.dataset.id}`,a=e.dataset.id,h={type:e.dataset.type,id:e.dataset.did};"product"==e.dataset.type&&(h.product={id:o.dataset.id}),cloneHotspot(h,n,o,s,m,t,i,l,a)}))}))}const p=lfUtils.render_icon(n.h_settings.icon);if(p&&"number"!==n.h_settings.icon){e.querySelectorAll(".kt-hotspots-wrapper .kt-hotspot-item").forEach((t=>{const e=t.querySelector(".hotspot-item-icon span");e&&(e.innerHTML=p)}))}lfGaleryEvent(t,n),t.classList.contains("publish-status")&&lfUtils.getJson(lfUtils.baseUrl+"publish/"+Shopify.shop,(t=>{console.log(t)}))}else fetch(n.link).then((t=>{if(404==t.status)throw new Error(s+" Not_Found");return t.json()})).then((e=>{if(e&&!e.error){window.lfGalleriesInfo=window.lfGalleriesInfo||{},window.lfGalleriesInfo[s]=e,void 0===window.lfMoneyFormat&&(window.lfMoneyFormat=e.shop.moneyFormat),void 0===window.lfShopLang&&(window.lfShopLang=e.shop.lang,window.lfShopTrans=e.shop.trans),n.custom_css&&n.custom_css.length&&lfUtils.add_custom_css(n.custom_css);const c=lfUtils.lfLayout(e.type),{l_column:p,l_embedded:u,l_multi:f,l_carousel:m,l_spacing:g}=c,y=lfMakeID(),{settings:v,hotspot_settings:w,tooltip_settings:b,button:S}=e,_=["carousel","column_carousel"].indexOf(e.type)>=0||p?"none":v.animate,x=lfUtils.render_space(v.column_spacing);v.visibility&&v.visibility.length&&v.visibility.forEach((e=>t.classList.add(`lf-hide-${e}`)));var i=[];t.setAttribute("id",`lfGallery-${y}`),n={...n,layout:{...c,spacing:x},type:e.type,source:e.source,analytic:e.analytic,sectionId:y,settings:v,h_settings:w,t_settings:b,animation:_},e.skin&&(n.skin=e.skin,t.classList.add("lf-skin-"+n.skin.id),lfUtils.add_custom_css(e.skin.css)),e.shopColors&&e.shopColors.length&&e.shopColors.map((t=>{i.push(`--lf-color-${t.id}: ${t.color}`)}));var o=[];if(m){o.push(`dot-${v.dotsTheme}`,`dot-${v.dotsPos}`,`dot-${v.dotStyle}`,`pn-${v.pnStyle}`,`pn-${v.pnTheme}`),n.carousel={autoPlay:v.autoplay,pauseAutoPlayOnHover:v.pause_hover,speed:v.speed};const e=lfUtils.render_carousel(v);Object.keys(e).forEach((t=>{i.push(`${t}: ${e[t]}`)})),t.dataset.carousel=JSON.stringify(n.carousel)}const{desktop_columns:C,tablet_columns:k,mobile_columns:E}=v;t.dataset.video=e.shop.video,t.dataset.analytic=e.analytic,t.dataset.fbtracking=e.shop.fbTracking,t.dataset.setup=JSON.stringify(e.shop.setup),t.dataset.thirdparty=JSON.stringify(e.shop.thirdParty),t.dataset.settings=JSON.stringify(v),t.dataset.h_settings=JSON.stringify(w),t.dataset.t_settings=JSON.stringify(b),t.dataset.section=y,lfGaleryCustom(t);var r="0";"circle"==w.type?r=r="50%":"round"==w.type&&(r=r="3px");const L=w.effect?"block":"none",{sale_background:z,sale_text:D,soldout_text:P,soldout_background:I,radius:A}=e.shop.setup;i.push(`--col-lg: ${C}`,`--col-md: ${k}`,`--col-sm: ${E}`,`--hotspot-background: ${w.background}`,`--hotspot-border: ${w.border_color}`,`--hotspot-icon_color: ${w.icon_color}`,`--hotspot-effect: ${w.effect}-aninmation`,`--hotspot-icon: ${w.icon}`,`--hotspot-radius: ${r}`,`--hotspot-effect-display: ${L}`,`--kt-button-background: ${S.background}`,`--kt-button-color: ${S.color}`,`--kt-button-border: ${S.borderColor}`,`--kt-button-borderw: ${S.borderWidth}`,`--kt-button-radius: ${S.borderRadius}`,`--kt-button-hover-background: ${S.backgroundHover}`,`--kt-button-hover-color: ${S.colorHover}`,`--kt-button-hover-border: ${S.borderColorHover}`,`--kt-button-hover-radius: ${S.borderRadiusHover}`,`--color-badge-sale-background: ${e.shop.setup.sale_background}`,`--color-badge-sale-text: ${e.shop.setup.sale_text}`,`--color-badge-soldout-background: ${e.shop.setup.soldout_background}`,`--color-badge-soldout-text: ${e.shop.setup.soldout_text}`),e.shop.setup.radius&&i.push(`--badge-corner-radius: ${e.shop.setup.radius}`),(g||"default_column"==e.type)&&(i.push(`--grid-mobile-spacing: ${x[0]}px`),i.push(`--grid-desktop-spacing: ${x[1]}px`)),lfUtils.add_custom_css(`#lfGallery-${y},.shopify-section-${y}{${i.join(";")}}`);const T=parseInt(v.glayout)||0;if(0!=T&&!u&&"default_column"!=e.type){var l=lfUtils.render_header(T,e);t.appendChild(l)}lfUtils.lfLayoutMasonry(e.type)&&(t.dataset.guttermobile=x[0],t.dataset.gutter=x[1]);const U=e.images;var a=lfUtils.createDomEl("div",`kt-type-main kt-type-${e.type} kt-space-${v.column_spacing}`,"",{id:"lookfy-gallery-main-"+e.id});if(a.setAttribute("data-type",e.type),o.forEach((t=>{a.classList.add(t)})),"carousel"==e.type&&a.classList.add("kt-carousel"),t.appendChild(a),u?a.setAttribute("data-img",lfUtils.imgEmbedded):("default_column"==e.type||f||m)&&a.setAttribute("data-img",lfUtils.imgColumn),_&&"none"!=_&&!p&&a.classList.add("lf-appear","lf-appear-childs"),u?a.classList.add("kt-vertical-"+v.vertical):("default_column"==e.type||f||m)&&a.classList.add("kt-portrait-"+v.portrait),g&&"list"!=e.type&&"multiple_columns"!=e.type){"carousel"!=e.type&&"column_carousel"!=e.type&&a.classList.add("kt-row");const i=[`kt-${C}-col-lg`,`kt-${k}-col-md`,`kt-${E}-col-sm`];a.classList.add(...i),Object.assign(t.dataset,{lg:C,md:k,sm:E})}if(lfImagesRender(t,n,U,a,e.skin),["row","list","masonry"].indexOf(e.type)>=0&&e.cursor){var h=lfUtils.createDomEl("div","kt-loadmore","",{"data-page":0});t.appendChild(h);var d=lfUtils.createDomEl("a","kt-button",`${lfUtils.getCurrentLange("load_more")} ${lfUtils.loading}`,{href:"#"});h.appendChild(d)}lfGaleryEvent(t,n)}else e.error&&(console.log("Error:",s+".",e.error),lfUtils.isAdmin()&&lfUtils.lfErrorPlaceholder(t,e.error))})).catch((e=>{console.log("Error fetching gallery data:",e),t.classList.add("lookfy-error"),"Not_Found"==e&&t.classList.add("lookfy-404"),lfUtils.isAdmin()&&lfUtils.lfErrorPlaceholder(t,e)})).finally((()=>{const e=lfUtils.lookfy_responsive(t);e&&t.classList.add(e)}))}}function lfMakeID(t=6){const e="abcdefghijklmnopqrstuvwxyz",i="0123456789";let s="";for(let n=0;n{const g=L+a+1;var _=!0;const D=s.hotspots;if(s.handle&&(s.link=s.collection?lfUtils.getLinkLang(s.handle,"collections"):lfUtils.getLinkLang(s.handle)),s.handle&&z||s.handle&&"products"==i.source){_=!1;const e=s.product?".js":".json";lfUtils.getJson(s.link+e,(e=>{if(s.product)Object.assign(s,{title:e.title,desc:e.description,vendor:e.vendor,badges:lfUtils.render_badges(e),tags:e.tags?.join(", "),type:e.type,price:lfUtils.render_price(e,lfShop.setup.price,!1)});else{const{title:t,description:i,products_count:n=""}=e.collection;Object.assign(s,{title:t,desc:i,products_count:n})}lfUtils.documentEvent("lookfyGalleryItem",{itemElement:P,galleryElement:t,galleryData:i,lightbox:!1,skin:o,image:s,position:g,reload:!0})}),(t=>{console.log("Error",t)}))}const P=lfUtils.createDomEl("div","","",{"data-width":s.width,"data-height":s.height,id:p+"-gallery"+i.id+"-img"+g});if(l?(c.appendChild(P),d.push(P)):n.appendChild(P),v)P.classList.add("kt-lcolumn-item"),w?P.classList.add("kt-embedded-item"):("default_column"==i.type||S||b)&&P.classList.add("kt-columns-item"),y&&"none"!=y&&P.classList.add("lf-appear","lf-appear-childs");else if(P.classList.add("kt-grid__item","lf-image-item"),y&&"none"!=y&&(P.classList.add("lf-appear-child"),P.style.setProperty("animation-delay",a*lfUtils.aniDelay+"ms")),"grid"==i.type){const t=s.size.split(":"),e=["one","two","three"],i=["one","two","three"];P.classList.add(`masonry-${e[t[0]-1]}-column`),P.classList.add(`masonry-${i[t[1]-1]}-row`),P.style.setProperty("--column",t[0]),P.style.setProperty("--row",t[1]),P.dataset.column=t[0],P.dataset.row=t[1]}else"carousel"==i.type&&P.classList.add("carousel-cell");const I=lfUtils.createDomEl("div","kt-image-item-box");"row"!=i.type&&"carousel"!=i.type&&"list"!=i.type||"adapt"==u.size||(I.classList.add("kt-ratio"),I.style.setProperty("--ratio-percent",lfUtils.render_ratio(u.size)));const A=lfUtils.createDomEl("img","kt-image-item-main","",{width:s.width,height:s.height,loading:"lazy"}),T=lfUtils.createDomEl("video","kt-image-item-main"),U=s.video&&lfShop.video,M=document.createElement("img");var F="";s.image_second&&s.image_second.url&&!U&&(M.classList.add("kt-image-item-second"),M.width=s.image_second.width,M.height=s.image_second.height,M.setAttribute("loading","lazy"),F=s.image_second.url);var O=s.url;if("list"!=i.type){var $=parseInt(u.thumbnailwidth);if(isNaN($)&&($=1e3),"grid"==i.type){var q=s.size.split(":");$*=Math.max(parseInt(q[0]),parseInt(q[1]))}O=lfUtils.flGetSizedImageUrl(O,$+"x"),F&&(F=lfUtils.flGetSizedImageUrl(F,$+"x"))}A.src=O,A.alt=s.alt||s.text||s.title,F&&(M.src=F),U&&(T.poster=O,T.autoplay=!0,T.loop=!0,T.controls=!1,T.muted=!0,T.setAttribute("playsinline",""),T.setAttribute("preload","auto"),T.innerHTML=` `);const N=lfUtils.createDomEl("div","kt-hotspots-wrapper","",{"data-width":s.width,"data-height":s.height});u.disable_hotspots&&N.classList.add("lfHidden");const W=lfUtils.createDomEl("div",`kt-products-column kt-grid__item kt-products-column-${x}`),H=parseInt(u.glayout)||0;if((w||"default_column"==i.type)&&0!=H){var B=lfUtils.render_header(H,h);W.appendChild(B)}const j=lfUtils.createDomEl("div","hotspot-item-products-list"),R=lfUtils.createDomEl("div",`kt-row kt-${x}-col-lg kt-${C}-col-md kt-${k}-col-sm`,"",{"data-lg":x,"data-md":C,"data-sm":k}),Z=s.text||s.title||s.desc||s.alt,G=lfUtils.createDomEl("a","kt-image-lightbox",Z,{href:s.url});N.appendChild(G),u.popup&&!s.link||G.classList.add("lfHidden");const V=s.video&&lfShop.video?"video":"image";if(G.setAttribute("data-pswp-media",V),"video"===V&&(G.setAttribute("href",s.video),G.setAttribute("data-img",s.url),G.setAttribute("data-pswp-type","hotspots")),s.link?.length&&N.appendChild(lfUtils.createDomEl("a","kt-image-link",Z,{href:s.link,target:s.target})),D?.length?Object.assign(G.dataset,{imageId:`gallery${i.id}-img${g}`,pswpType:"hotspots",section:i.sectionId,hotspots:D.length,pswpWidth:s.width,pswpHeight:s.height}):Object.assign(G.dataset,{pswpWidth:s.width,pswpHeight:s.height}),v){const t=lfUtils.createDomEl("div","kt-image-column kt-grid__item"),n=lfUtils.createDomEl("div","kt-image-column-inner");if("adapt"!==u.size&&"none"!==u.size&&(t.classList.add("kt-ratio"),t.style.setProperty("--ratio-percent",lfUtils.render_ratio(u.size))),n.appendChild(A),F&&(n.appendChild(M),n.classList.add("second-image")),U&&n.appendChild(T),u.disable_hotspots&&s.link&&s.link.length){const t=lfUtils.createDomEl("a","kt-image-link","",{href:s.link,"aria-label":e.alt||s.text});"_blank"==s.target&&t.setAttribute("target","_blank"),n.appendChild(t)}n.appendChild(N);const o=lfUtils.createDomEl("div","lfSkinItemInner");o.appendChild(n),t.appendChild(o);const r=document.createElement("div");var X="kt-embedded-row";"default_column"==i.type?(W.appendChild(R),X="kt-column-row"):S||b?(R.classList.add("kt-carousel"),b&&"multiple_columns"!=i.type?(R.classList.remove("kt-row"),X="kt-carousel-column-row"):X="kt-multi-column-row",W.appendChild(R)):W.appendChild(j),D.length&&u.alltocart&&renderAllToCart(W,u.alltocart_message),r.classList.add("kt-row",X),r.appendChild(t),r.appendChild(W),I.appendChild(r)}else I.appendChild(A),U&&I.appendChild(T),F&&(I.appendChild(M),I.classList.add("second-image")),I.appendChild(N);const J=lfUtils.createDomEl("div","lf-productItems");if(P.appendChild(J),v)P.appendChild(I);else{const t=lfUtils.createDomEl("div","lfSkinItemInner");t.appendChild(I),P.appendChild(t)}D&&D.length&&D.forEach(((e,s)=>{if("product"==e.type&&void 0===e.product||"product"==e.type&&!e.product.handle||"link"==e.type&&!e.title)return;const n=p+"-hotspot-item-"+i.id+"-"+a+"-"+s,o=lfUtils.createDomEl("div",`kt-hotspot-item hotspot-${m.icon}`,"",{"data-id":n},{left:e.left+"%",top:e.top+"%"});N.appendChild(o);const r=lfUtils.createDomEl("div","hotspot-item-detail hotspot-item-type-link","",{"data-hotspot":n});"product"==e.type&&r.setAttribute("data-id",e.product.id);const l=lfUtils.createDomEl("div","hotspot-item-detail-inner","",{type:e.type});var d=e.url,c=e.title,g="link"==e.type&&e.target?' target="_blank" ':"";"product"==e.type&&(d=lfUtils.getLinkLang(e.product.handle),c=e.product.title),o.setAttribute("placement",f.placement),o.setAttribute("spacing",f.spacing),o.setAttribute("data-style",f.style),o.setAttribute("theme",f.theme),"auto"==f.placement&&(o.setAttribute("data-left",e.left),o.setAttribute("data-top",e.top)),"number"==m.icon&&(E=lfUtils.render_icon(m.icon,s+1));const y=lfUtils.createDomEl("span","hotspot-item-icon",`${E} `);o.appendChild(y);const w=d?""+c+" ":c,b=lfUtils.createDomEl("div","hotspot-item-image"),S=lfUtils.createDomEl("h4","hotspot-item-title",w);var _="product"==e.type?e.product.url:e.file;_||(_=lfUtils.ktPlaceholder),_==lfUtils.ktPlaceholder&&b.classList.add("hotspot-item-iempty");const x=lfUtils.flGetSizedImageUrl(_,lfUtils.imgEmbedded+"x"),C="default_embedded"==i.type?lfUtils.imgEmbedded:lfUtils.imgColumn,k=lfUtils.createDomEl("img","","",{src:x,alt:c,"data-img":_,"data-imgs":C});if("product"==e.type&&(k.width=lfUtils.imgEmbedded+"px",k.height="auto"),d){const t=lfUtils.createDomEl("a","","",{href:d,"aria-label":c});"link"==e.type&&e.target&&t.setAttribute("target","_blank"),t.appendChild(k),b.appendChild(t)}else b.appendChild(k);d||b.classList.add("hotspot-item-lempty");const L=lfUtils.createDomEl("div","hotspot-item-price"),z=lfUtils.createDomEl("div","hotspot-item-content"),D=lfUtils.createDomEl("div","hotspot-item-content-inner");z.appendChild(D);const P=lfUtils.createDomEl("div","hotspot-item-form",`${lfUtils.getCurrentLange("shop_now")} `);if(z.appendChild(P),"product"==e.type){var I=`kt-${p}-${e.id}-form-${e.product.id}`;if(void 0===window.lfProducts||void 0===window.lfProducts[e.product.id])fetchProductDetail(p,t,h,I,n,k,r,d,S,L,e);else{const i={galleryData:h,hotSpotProduct:r,productData:window.lfProducts[e.product.id],productForm:""};lfUtils.documentEvent("lookfyFetchProduct",i),lfUtils.documentEvent("lookfyfetchProductDetail",i),lfHotspotProductForm(p,t,h,window.lfProducts[e.product.id],I,n,e.id),lfHotspotProduct(p,r,window.lfProducts[e.product.id],S,L,k)}}var A;"product"==e.type&&e.product.review&&(A=lfUtils.createDomEl("div","ryviu-collection",` `)),"default_embedded"==i.type&&1==u.vertical?(hotspotHeader=lfUtils.createDomEl("div","hotspot-item-header"),hotspotHeader.appendChild(S),"product"==e.type&&e.product.review&&hotspotHeader.appendChild(A),D.appendChild(hotspotHeader),D.appendChild(L)):"default_embedded"==i.type&&2==u.vertical?(D.appendChild(S),hotspotMeta=lfUtils.createDomEl("div","hotspot-item-meta"),hotspotMeta.appendChild(L),"product"==e.type&&e.product.review&&hotspotMeta.appendChild(A),D.appendChild(hotspotMeta)):(D.appendChild(S),"product"==e.type&&e.product.review&&D.appendChild(A),D.appendChild(L)),l.appendChild(b),l.appendChild(z),r.appendChild(l),o.appendChild(r);const T=v?"default_embedded"==i.type?j:R:J;cloneHotspot(e,i,r,s,T,t,h,I,n)})),r||t.appendChild(n),_&&lfUtils.documentEvent("lookfyGalleryItem",{itemElement:P,galleryElement:t,galleryData:i,lightbox:!1,skin:o,image:s,position:g})})),l)return n.appendChild(c),d}function renderAllToCart(t,e=""){const i=lfUtils.createDomEl("div","alltocartall",`\n ${lfUtils.getCurrentLange("add_all_to_cart")}
\n ${lfUtils.loading}\n `);if(e&&""!=e){const t=lfUtils.createDomEl("div","alltocartall_msg",e);i.appendChild(t)}const s=lfUtils.createDomEl("div","cartall__error-message-wrapper cartall__error-message-wrapper--hidden",lfUtils.errorSvg,{role:"alert"});i.appendChild(s),t.appendChild(i)}function cloneHotspot(t,e,i,s,n,o,r,l,a){const{type:h,settings:d,animation:c,sectionId:p}=e,u=i.cloneNode(!0);u.classList.remove(...["detail","right","left","top","bottom"].map((t=>`hotspot-item-${t}`))),u.classList.add("hotspot-item-product"),u.setAttribute("id",a),lfUtils.lfLayoutColumn(h)&&u.classList.add("kt-grid__item"),n?.appendChild(u),"column_carousel"==h&&u.classList.add("carousel-cell"),c&&"none"!==c&&(u.classList.add("lf-appear-child"),u.style.setProperty("animation-delay",s*lfUtils.aniDelay+"ms")),"adapt"!==d.psize&&"none"!==d.psize&&(u.classList.add("kt-ratio"),u.style.setProperty("--ratio-percent",lfUtils.render_ratio(d.psize)));const f=u.querySelector(".hotspot-item-image img");if(f){const t="default_embedded"==h?lfUtils.imgEmbedded:lfUtils.imgColumn;f.src=lfUtils.flGetSizedImageUrl(f.dataset.img,`${t}x`)}if("product"===t.type&&window.lfProducts?.[t.product.id]){const e=window.lfProducts[t.product.id];lfHotspotProductForm(p,o,r,e,l,a,t.id);const s={galleryData:r,hotSpot:i,hotSpotProduct:u,productData:e,productForm:""};lfUtils.documentEvent("lookfyFetchProduct",s),lfUtils.documentEvent("lookfyfetchProductDetail",s)}}function fetchProductDetail(t,e,i,s,n,o,r,l,a,h,d){fetch(l+".js").then((t=>{if(404==t.status){console.log("Product Not Found -- "+lfUtils.lfShopUrl+l);const t=o.closest(".kt-hotspot-item");t&&t.remove();const e=document.getElementById(t.dataset.id);throw e&&e.remove(),new Error("Product_Not_Found")}return t.json()})).then((l=>{window.lfProducts=window.lfProducts||{},window.lfProducts[l.id]=l,window.lfProductOptions=window.lfProductOptions||{},window.lfProductOptions[l.id]=l.options;const c={galleryData:i,hotSpotProduct:r,productData:l,productForm:""};lfUtils.documentEvent("lookfyFetchProduct",c),lfUtils.documentEvent("lookfyfetchProductDetail",c),lfHotspotProduct(t,r,l,a,h,o),lfHotspotProductForm(t,e,i,l,s,n,d.id)})).catch((function(t){console.log("Fetch Error : ",t)}))}function lfHotspotProduct(t,e,i,s,n,o){if(e&&e.classList.replace("hotspot-item-type-link","hotspot-item-type-product"),i){if(s&&(s.querySelector("a").innerHTML=i.title),i.variants&&i.variants.length>0){var r=i.variants.find((t=>t.available));r&&n&&(n.innerHTML=lfUtils.render_price(r,lfShop.setup.price))}const t=o.getAttribute("src");if(o&&t&&t.indexOf(`files/placeholder_${lfUtils.imgEmbedded}x.jpg`)>=0&&i.featured_image){const t=lfUtils.flGetSizedImageUrl(i.featured_image,o.dataset.imgs+"x");o.setAttribute("src",t),o.dataset.img=i.featured_image;const e=o.closest(".kt-hotspot-item");if(e){const s=document.getElementById(e.dataset.id);if(s){const e=s.querySelector(".hotspot-item-image img");e.setAttribute("src",t),e.dataset.img=i.featured_image}}}}}function lfHotspotProductForm(t,e,i,s,n,o,r){r||(r=lfMakeID());var l="simple",a="";const h=document.getElementById(o);if(h){const v=h.closest(".hotspot-item-product");v.classList.remove("hotspot-item-type-link"),v.classList.add("hotspot-item-type-product");h.querySelector("h4.hotspot-item-title")&&(h.querySelector("h4.hotspot-item-title").querySelector("a").innerHTML=s.title);a="";const w=lfUtils.createDomEl("div","hotspot__error-message-wrapper lfHidden",lfUtils.errorSvg,{role:"alert"}),b=i.shop?.setup?i.shop.setup:JSON.parse(e.dataset.setup);if(0==s.available)a=`${lfUtils.getCurrentLange("sold_out")} `;else{var d=`${lfUtils.getCurrentLange("add_to_cart")} ${lfUtils.loading} `;a=' ';var c=lfProductOptions[s.id]||s.options,p=s.variants.find((t=>t.available)),u=!1;if(s.variants.length>1){l="variable";const e=1==c.length?lfUtils.getCurrentLange("add_to_cart_select").replace("{attribute_label}",c[0].name):lfUtils.getCurrentLange("choose_options");if("dropdown"==b.variant){u=!0;var f=[];f.push({id:"",option:e,disabled:!0}),s.variants.map(((t,e)=>{f.push({id:t.id,option:t.options.join(" / "),disabled:!t.available})}));const i=f.map(((t,e)=>{const i=t.disabled?"disabled":"",s=p.id==t.id?"selected":"";return`${t.option} `}));a+=`${i.join("")}
`}else a+=` `,a+=`${e} `}else a+=` `,u=!0;u&&(a+=d)}const S=h.querySelector(".hotspot-item-form");if(s.available&&h){const o=h.querySelector(".hotspot-item-price");o&&(1!=s.variants.length&&0!=s.available||h.classList.add("added"),p.compare_at_price&&o.setAttribute("data-compare_price",p.compare_at_price),o.setAttribute("data-price",p.price),o.innerHTML=lfUtils.render_price(p,lfShop.setup.price));var m="";if(s.variants.length>1&&"swatch"==b.variant){var g="";c.map(((e,i)=>{var s=`${e.name} `;const n=`template--${t}-${r}-${e.position}`;e.values.map(((t,e)=>{const i=t.replace(/"/g,""");s+=` `,s+=`${t} `})),g+=s=`${s} `})),g=`${g}
`,m=``}S.innerHTML=`"+m;const u=h.closest(".kt-carousel");if(u){var y=flickitylf.data(u);y&&y.resize()}lfUtils.documentEvent("lookfyProductForm",{galleryElement:e,galleryData:i,sectionID:t,productForm:S,product:s,row:e.querySelector(".kt-type-main")})}else S.innerHTML=a;const _="simple"===l||"dropdown"==b.variant?".hotspot-item-detail-inner":".kt-options-content";v.querySelector(_)?.appendChild(w),lfUtils.documentEvent("lookfyGalleryForm",{galleryElement:e})}}function lfGaleryCustom(t){lfCustom||(window.lfShop={fbtracking:t.dataset.fbtracking,setup:JSON.parse(t.dataset.setup),thirdparty:JSON.parse(t.dataset.thirdparty),video:"true"===t.dataset.video},lfCustom=!0,window.lfThemeInfo=lfUtils.lfThemeDetector(),window.lfCustomCss&&lfUtils.add_custom_css(window.lfCustomCss),window.lfCustomJs&&lfUtils.add_custom_js(window.lfCustomJs),document.body.classList.add(`lf-theme-${window.lfThemeInfo.themeName}`))}function lfGaleryEvent(t,e){const i=t.dataset,s=t.querySelector(".kt-type-main").dataset.type;e.type=s;const n={galleryData:e,galleryElement:t,row:t.querySelector(".kt-type-main"),h_settings:JSON.parse(i.h_settings),t_settings:JSON.parse(i.t_settings),settings:JSON.parse(i.settings)};["lookfyLoaded","lookfyCreated","lookfyCreated"+s,"lookfyGallery","lookfyGallery"+s].forEach((t=>lfUtils.documentEvent(t,n))),lfUtils.lfLayoutMasonry(s)&&lfUtils.documentEvent("lookfyGalleryMasonryLayout",n)}function layoutMasonry(t){const e=t.querySelectorAll(".kt-grid__item"),i=t.offsetWidth,s=window.innerWidth,n=s<768||lfUtils.mobileCheck()?parseInt(t.dataset.guttermobile):parseInt(t.dataset.gutter);let o;o=s<768||lfUtils.mobileCheck()?parseInt(t.dataset.sm):s<1024?parseInt(t.dataset.md):parseInt(t.dataset.lg);const r=Math.floor(i/o-n*(o-1)/o);e.forEach((t=>{const e=parseInt(t.dataset.column),o=parseInt(t.dataset.row);let l=r*e+n*(e-1),a=r*o+n*(o-1);l>i&&(l=i,a=i*o/e,a{if(t.classList.contains("added")){i++;t.querySelector(".hotspot-item-price")&&(n+=parseInt(t.querySelector(".hotspot-item-price").getAttribute("data-price")))}const e=t.querySelector(".kt-button-addtocart"),s=lfUtils.select(".lfPopover");if(e&&!e.classList.contains("disabled"))o++;else if(!e&&s){s.querySelector(".kt-button-addtocart").classList.contains("disabled")||o++}})),0!=e.length&&i==e.length&&o==e.length||(r=!1);const l=t.querySelector(".total-price");l&&(l.innerHTML=""+s(n)+" ");const a=t.querySelector(".alltocartall .kt-button");r?a.classList.remove("disabled"):a.classList.add("disabled")}function lfGetSectionInnerHTML(t,e=".shopify-section"){return(new DOMParser).parseFromString(t,"text/html").querySelector(e).innerHTML}document.addEventListener("lookfyGalleryItem",(t=>{const{galleryElement:e,itemElement:i,galleryData:s,lightbox:n,skin:o,image:r,position:l,reload:a}=t.detail,h=i.querySelector("video[autoplay]");if(h&&h.play(),i.classList.add("lf-img-enabled"),i.querySelectorAll(".kt-hotspot-item").forEach((t=>lfUtils.tooltip(t,{...s.t_settings,section:s.sectionId}))),s.layout.l_column){const t=i.querySelector(".kt-image-column");t&&lfUtils.hotspotsWrapper(t,{inner:".kt-image-column-inner"})}else lfUtils.hotspotsWrapper(i);const d=i.querySelector(".lfSkinItemInner");if(d){if(o){const t=(t,e,i)=>{if(i){const s=lfUtils.createDomEl("div",`skinItem${t}`,lfUtils.render_layer(i,{products_count:r.products_count||"",link:r.link||"",text:r.text||r.title||"",desc:r.desc||"",alt:r.alt||"",tags:r.tags||"",vendor:r.vendor||"",badges:r.badges||"",price:r.price||"",position:l}));e.appendChild(s)}},e=i.querySelector(".kt-image-item-box");if(t("Layers",e.querySelector(".kt-image-column-inner")||e,o.layers),t("Cards",d,o.cards),o.card&&o.cards){const t=i.querySelector(".skinItemCards");t&&(o.card.normal&&(t.dataset.lookfyNormalLayer=JSON.stringify(o.card.normal)),o.card.hover&&(t.dataset.lookfyEnter=JSON.stringify(o.card.hover)))}if(o.fontData&&lfUtils.render_fonts(o.fontData),o.layout&&(o.layout.normal&&(d.dataset.lookfyNormal=JSON.stringify(o.layout.normal)),o.layout.hover&&(d.dataset.lookfyEnter=JSON.stringify(o.layout.hover))),o.media){i.querySelectorAll(".kt-image-item-main").forEach((t=>{o.media.normal&&(t.dataset.lookfyNormalLayer=JSON.stringify(o.media.normal)),o.media.hover&&(t.dataset.lookfyEnter=JSON.stringify(o.media.hover))}));const t=i.querySelector(".kt-image-item-second");t&&(o.media.normal&&(t.dataset.lookfyNormalLayer=JSON.stringify(o.media.normal)),o.media.normal&&(t.dataset.lookfyEnter=JSON.stringify(o.media.hover)))}}var c={},p={};d.dataset.lookfyNormal&&(c=JSON.parse(d.dataset.lookfyNormal),p=JSON.parse(d.dataset.lookfyEnter),Object.assign(d.style,c));const t=d.querySelectorAll("[data-lookfy-normal-layer]");t.forEach((t=>{const e=JSON.parse(t.dataset.lookfyNormalLayer);Object.assign(t.style,e)})),d.addEventListener("mouseenter",(function(e){d.dataset.lookfyNormal&&Object.assign(d.style,p),t.forEach((t=>{const e=JSON.parse(t.dataset.lookfyEnter);t.removeAttribute("style"),Object.assign(t.style,e)}))})),d.addEventListener("mouseleave",(function(e){d.dataset.lookfyNormal&&Object.assign(d.style,c),t.forEach((t=>{const e=JSON.parse(t.dataset.lookfyNormalLayer);t.removeAttribute("style"),Object.assign(t.style,e)}))}));d.querySelectorAll(".layerContentLink").forEach((t=>{const e=t.closest(".lfSkinItemInner"),i=t.closest(".layer-item");i.classList.add("layer-action");const s=e.querySelector(".kt-image-link");if(s){let e=s.getAttribute("target");s.classList.add("lfHidden"),e&&t.classList.contains("link-url")&&t.setAttribute("target",e)}if(t.classList.contains("link-lightbox")){const t=e.querySelector(".kt-image-lightbox");t.classList.add("lfHidden"),i.addEventListener("click",(function(){t&&t.click()}))}}))}if(a&&["products","collections"].includes(s.source))if("masonry"==s.type){const t=Masonry.data(e.querySelector(".kt-type-main"));layoutMasonry(e),t?.layout()}else if("carousel"==s.type){const t=i.closest(".kt-carousel"),e=flickitylf.data(t);e?.resize()}i.querySelectorAll(".hotspot-item-form").forEach((t=>{const i=t.querySelector(".kt-button-link");i&&i.addEventListener("click",(t=>{t.preventDefault(),lfUtils.lightbox_close();const i=t.target.closest(".hotspot-item-type-product");i&&lfUtils.lightbox({classes:`shopify-section-${s.sectionId}`,heading:lfUtils.getCurrentLange("choose_options"),content:lfUtils.render_product_lightbox(i.dataset.id,e,s),photoSwipe:!1})}))}))})),document.addEventListener("lookfyGallery",(t=>{const{galleryElement:e,galleryData:i,row:s}=t.detail,o=s.classList.contains("lf-appear")?[s]:s.querySelectorAll(".lf-appear"),r=t=>{t.forEach((t=>{window.scrollY>=t.offsetTop-window.innerHeight&&n(t,i.animation)}))};r(o),window.addEventListener("scroll",(function(t){r(o)}));const l=lfUtils.lookfy_responsive(e);l&&e.classList.add(l)})),document.addEventListener("lookfyGallery",(t=>{const{galleryData:{type:e},row:i}=t.detail;lfUtils.lfLayoutColumn(e)&&i.querySelectorAll(".kt-lcolumn-item").forEach((t=>{const i=t.querySelectorAll(".hotspot-item-icon"),s="default_embedded"==e?".hotspot-item-products-list":".kt-products-column",n=t.querySelectorAll(`${s} .hotspot-item-product`);i.forEach(((t,e)=>{t.addEventListener("mouseover",(()=>{n.forEach(((t,i)=>{i!==e&&t.classList.add("for-hotspot--quiet")}))})),t.addEventListener("mouseout",(()=>{n.forEach((t=>t.classList.remove("for-hotspot--quiet")))}))}))}))})),document.addEventListener("lookfyGallery",(t=>{const{galleryElement:e,galleryData:i,row:s,settings:o,h_settings:r,t_settings:l}=t.detail,a=e.querySelector(".kt-loadmore");if(a){const t=a.querySelector("a");t.addEventListener("click",(o=>{o.preventDefault();const r=parseInt(a.getAttribute("data-page"))+1;t.classList.add("loading"),t.querySelector(".kt-loading-overlay__spinner").classList.remove("lfHidden"),fetch(i.link+"&site=true&page="+r).then((t=>t.json())).then((o=>{(o.cursor?(a.setAttribute("data-page",r),t.classList.remove("loading"),t.querySelector(".kt-loading-overlay__spinner").classList.add("lfHidden"),t.classList.add("added"),t.querySelector(".kt-loading-overlay__check").classList.remove("lfHidden"),setTimeout((function(){t.classList.remove("lfHidden","added"),t.querySelector(".kt-loading-overlay__check").classList.add("lfHidden")}),2e3)):a.classList.add("lfHidden"),"masonry"==i.type)?(h=lfImagesRender(e,i,o.images,s,o.skin,!0,!0,r))&&Masonry.data(s).appended(h):lfImagesRender(e,i,o.images,s,o.skin,!0,!1,r);const l=i.animation;if(l&&"none"!=l&&!i.layout.l_column){var h=s.querySelectorAll(".lf-appear-done");s.classList.contains("lf-appear-done")&&(h=[s]),h.forEach((function(t){n(t,l)}))}}))}))}})),document.addEventListener("lookfyGallery",(({detail:{galleryData:t,galleryElement:e}})=>{const s=new LfPhotoSwipeLightbox({gallery:"#lookfy-gallery-main-"+t.id,children:"a.kt-image-lightbox",pswpModule:LfPhotoSwipe,padding:{top:20,bottom:20,left:20,right:20}});new i(s,{autoplay:!0,galleryData:t,galleryElement:e,videoAttributes:{autoplay:"true",loop:"true",preload:"auto",playsinline:"",muted:"true"}});s.init()})),document.addEventListener("lookfyGallerycarousel",(t=>{const{galleryElement:e,row:i,settings:s}=t.detail,n=lfUtils.get_carousel(JSON.parse(e.getAttribute("data-carousel")),parseInt(e.dataset.lg),i.children.length),o=new flickitylf(i,n);o.on("dragStart",(()=>o.slider.childNodes.forEach((t=>t.style.pointerEvents="none")))),o.on("dragEnd",(()=>o.slider.childNodes.forEach((t=>t.style.pointerEvents="all")))),s.popup&&o.on("staticClick",(function(t,e,i,s){if(!i)return;const n=i.querySelector(".kt-image-lightbox");!1===n?.classList?.contains("lfHidden")&&n.click()}))})),document.addEventListener("lookfyGallerycolumn_carousel",(t=>{const{row:e,galleryElement:i}=t.detail;e.querySelectorAll(".kt-columns-item").forEach((t=>{const e=t.querySelector(".kt-products-column .kt-carousel");if(e){const n=lfUtils.get_carousel(JSON.parse(i.getAttribute("data-carousel")),parseInt(i.dataset.lg),e.children.length);var s=new flickitylf(e,n);t.querySelectorAll(".hotspot-item-icon").forEach(((t,e)=>{t.addEventListener("click",(()=>{s.select(e)})),t.addEventListener("touchstart",(()=>{s.select(e)}))}))}}))})),document.addEventListener("lookfyGallerymultiple_columns",(t=>{const{row:e,galleryElement:i}=t.detail;lfUtils.mobileCheck()&&e.querySelectorAll(".kt-products-column .kt-row").forEach((t=>{t.classList.remove("kt-row"),t.querySelectorAll(".hotspot-item-product").forEach((t=>t.classList.add("carousel-cell"))),new flickitylf(t,lfUtils.get_carousel(JSON.parse(i.getAttribute("data-carousel")),parseInt(i.dataset.lg),t.querySelectorAll(".hotspot-item-product").length))}))})),document.addEventListener("lookfyGalleryMasonryLayout",(t=>{const{row:e,galleryElement:i,galleryData:s}=t.detail;var n={itemSelector:".kt-grid__item",gutter:".gutter-sizer"};const o=lfUtils.createDomEl("div","gutter-sizer");if(e.appendChild(o),"grid"==s.type){const t=lfUtils.createDomEl("div","kt-grid__sizer kt-grid__item","",{"data-column":1,"data-row":1},{"--column":1,"--row":1});e.appendChild(t),n.columnWidth=".kt-grid__sizer",n.resize=!1,layoutMasonry(i)}const r=i.querySelector(".kt-type-main");var l=new Masonry(r,n);"grid"==s.type&&window.addEventListener("resize",lfUtils.lfDebounce((function(t){layoutMasonry(i),l.layout()}))),r.classList.add("masonry-enabled")})),document.addEventListener("lookfyProductForm",(t=>{const{galleryElement:e,galleryData:i,product:s,productForm:n,sectionID:o}=t.detail;if(!n)return;const{id:r}=s,l=lfProductOptions[r],a=n.querySelector(".kt-button-addtocart"),h=n.querySelector("form"),d=n.querySelector(".kt-select-options")||h,c=h.querySelector("[name=id]"),p=(e.querySelector(".kt-type-main")?.dataset.type,d?.dataset.hotspot||null),u=h.dataset.type;if(a&&(n.closest(".hotspot-item-product")?.classList.add("added"),a.addEventListener("click",(function(t){if(t.preventDefault(),a&&!a.classList.contains("disabled")){const t=lfUtils.select("cart-notification")||lfUtils.select("cart-drawer"),s=a.querySelector(".kt-loading-overlay__spinner"),o=a.querySelector(".kt-loading-overlay__check"),r=n.closest(".hotspot-item-product");var i=null;r?(i=r.querySelector(".hotspot__error-message-wrapper"),"variable"==u&&"swatch"==lfShop.setup.variant&&(i=d.querySelector(".hotspot__error-message-wrapper"))):i=n.querySelector(".lfProduct__error-message-wrapper"),a.classList.add("loading"),s.classList.remove("lfHidden"),i.classList.add("lfHidden");const l={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/javascript"}};l.headers["X-Requested-With"]="XMLHttpRequest",delete l.headers["Content-Type"];const c=new FormData(h),p=lfUtils.cart_formData(window.lfThemeInfo.themeName,t);p&&c.append("sections",p),c.append("sections_url",window.location.pathname),l.body=c,fetch(`${lfUtils.lfCartAdd}?lookfy-cart-call`,l).then((t=>t.json())).then((t=>{if(a.classList.add("added"),o.classList.remove("lfHidden"),setTimeout((function(){a.classList.remove("lfHidden","added"),o.classList.add("lfHidden")}),2e3),t.status){i.classList.remove("lfHidden"),i.querySelector(".error-message").innerHTML=t.description;var s=a.closest(".kt-carousel");if("variable"==u&&(s=n.closest(".kt-carousel")),s){var r=flickitylf.data(s);r&&r.resize()}}else{const i={galleryElement:e,cartDetail:t,form:n};lfUtils.documentEvent("lookfyCartAdded",i),lfUtils.documentEvent("lookfyCartAdded_"+window.lfThemeInfo.themeName,i)}})).catch((t=>{console.error("lookfyCartError",t),document.dispatchEvent(new CustomEvent("lookfyCartError",{detail:{error:t}}))})).finally((()=>{a.classList.remove("loading"),s.classList.add("lfHidden"),document.dispatchEvent(new CustomEvent("lookfyCartFinally",{}))}))}})),h))if("dropdown"===lfShop.setup.variant)n.querySelector(".kt-choose-select")?.addEventListener("change",(function(t){t.preventDefault();h.querySelector(".kt-choose-item");m()}));else{if(p){const t={classes:`shopify-section-${o}`};lfUtils.popover(n,t)}if("variable"===u){m();n.querySelectorAll(".variant-radio").forEach((t=>t.addEventListener("change",f)))}}function f(t){t.preventDefault();var e=[],i=null;l.map(((t,i)=>{var s=d.querySelectorAll('[name="'+t.name+'"]');if(!s.length){const e=lfUtils.select(".lfPopover"),i=p?`template--${o}-${p}-${t.position}`:`template--${o}-${t.position}`;s=e?lfUtils.select(".lfPopover").querySelectorAll('[name="'+i+'"]'):d.querySelectorAll('[name="'+i+'"]')}for(var n of s)n.checked&&e.push(n.value)})),2==e.length?e.push(null):1==e.length&&(e.push(null),e.push(null)),s.variants.map(((t,s)=>{t.option1==e[0]&&t.option2==e[1]&&t.option3==e[2]&&(i=t.id)})),c.value=i,m()}function m(){var t,i=null,n=null,r=null,d=[],u=[],f=[],m=[],g=!0,y=c.value,v=h.closest(".hotspot-item-product")||h.closest(".lf-lightbox-product-infos"),w=v.querySelector(".hotspot-item-price")||v.querySelector(".lf-lightbox-product-prices"),b=v.querySelector(".hotspot-item-image img")||v.querySelector(".lf-lightbox-product-image img");if(y){s.variants.map(((e,s)=>{y==e.id&&(i=e.option1,n=e.option2,r=e.option3,g=e.available,t=e),d.push(e.available),u.push(e.option1),f.push(e.option2),m.push(e.option3)})),l.map(((t,e)=>{t.values.map(((s,l)=>{var a=i,h=!0;1==e?a=n:2==e&&(a=r),u.forEach(((e,o)=>{1==t.position?u[o]==s&&d[o]&&(h=!1):2==t.position?e==i&&f[o]==s&&d[o]&&(h=!1):e==i&&f[o]==n&&m[o]==s&&d[o]&&(h=!1)}));const c=`template--${o}${p?"-"+p:""}-${t.position}-${l}`;var g=document.getElementById(c);g&&(h?g.classList.add("disabled"):g.classList.remove("disabled"),g.checked=a==s)}))})),g?a.classList.remove("disabled"):a.classList.add("disabled"),w.setAttribute("data-compare_price",t.compare_price),w.setAttribute("data-price",t.price),w.innerHTML=lfUtils.render_price(t,lfShop.setup.price);const c=t?.featured_image?.src?t.featured_image.src:b.getAttribute("data-img");b.src=lfUtils.flGetSizedImageUrl(c,b.dataset.imgs+"x");const v=h.closest(".kt-products-column");if(v&&e.querySelector(".alltocartall")){galleryRowCart(v.closest(".kt-lcolumn-item"))}}}})),document.addEventListener("lookfyGalleryForm",(t=>{const{galleryElement:e}=t.detail,i=e.querySelectorAll(".kt-products-column");function s(t){productSelected=[],productList=0;const e=t.target.closest(".kt-products-column").querySelectorAll(".hotspot-item-product");return productList=e.length,e.forEach((t=>{const e=t.querySelectorAll('input[name="id"]');e.length&&productSelected.push(e[0].value);const i=t.querySelectorAll('select[name="id"]');i.length&&productSelected.push(i[0].value)})),productSelected}function n(t){t.preventDefault();const i=t.target.closest(".kt-button");if(!i.classList.contains("disabled")){let o={items:s(t).map((t=>({id:t,quantity:1})))};const r=document.querySelector("cart-notification")||document.querySelector("cart-drawer"),l=lfUtils.cart_formData(window.lfThemeInfo.themeName,r);l&&(o.sections=l),o.sections_url=window.location.pathname,i.classList.add("loading"),i.querySelector(".kt-loading-overlay__spinner").classList.remove("lfHidden");var n=i.closest(".alltocartall").querySelector(".cartall__error-message-wrapper");n.classList.add("cartall__error-message-wrapper--hidden"),fetch(`${lfUtils.lfCartAdd}?lookfy-alltocart-call`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/javascript"},body:JSON.stringify(o)}).then((t=>t.json())).then((t=>{if(i.classList.add("added"),i.querySelector(".kt-loading-overlay__check").classList.remove("lfHidden"),setTimeout((function(){i.classList.remove("lfHidden","added"),i.querySelector(".kt-loading-overlay__check").classList.add("lfHidden")}),2e3),t.status)n.classList.remove("cartall__error-message-wrapper--hidden"),n.querySelector(".error-message").innerHTML=t.description;else{const i={galleryElement:e,cartDetail:t,products:!0};lfUtils.documentEvent("lookfyCartAdded",i),lfUtils.documentEvent("lookfyCartAdded_"+window.lfThemeInfo.themeName,i)}})).catch((t=>{console.error("Error:",t)})).finally((()=>{i.classList.remove("loading"),i.querySelector(".kt-loading-overlay__spinner").classList.add("lfHidden"),document.dispatchEvent(new CustomEvent("lookfyCartFinally",{}))}))}}i&&i.length>0&&i.forEach((t=>{const e=t.querySelector(".alltocartall");if(e){setTimeout((function(){galleryRowCart(t.closest(".kt-lcolumn-item"))}),500);const i=e.querySelector("a");i&&!i.classList.contains("working")&&(i.addEventListener("click",n),i.classList.add("working"))}}))})),document.addEventListener("lookfyGallery",(({detail:{galleryData:t,galleryElement:e}})=>{if(!t.analytic)return;const i={...t,href:window.location.href};e.querySelectorAll(".hotspot-item-title a, .hotspot-item-image a").forEach((t=>{t.addEventListener("click",(t=>{i.link=t.target.closest("a").getAttribute("href"),lfUtils.sendPixel("lf_click",i)}))}))})),document.addEventListener("lookfyCartAdded",(({detail:{cartDetail:t,galleryElement:e,products:i}})=>{const s=i?"lf_add_to_cart_all":"lf_add_to_cart";if("true"==e.dataset.analytic&&lfUtils.sendPixel(s,{id:e.dataset.id,cartDetail:t,href:window.location.href}),!lfShop.fbTracking&&"function"==typeof fbq)try{const{product_id:e,product_title:i,price:s}=t;fbq("track","AddToCart",{content_ids:[e],content_name:i,content_type:"product",value:s,contents:[{id:e,quantity:1}]},{eventID:`id_${Date.now()}`})}catch(t){console.log("Track AddToCart error:",t)}const n={cart:"/cart",checkout:"/checkout"}[lfShop.setup.redirect];n&&(window.location.href=n)})),document.addEventListener("lookfyCartFinished",(t=>{const e=lfUtils.select(".lfPopover");if(e){const t=e.querySelector(".kt-select-options"),i=document.getElementById(t.dataset.form).closest(".hotspot-item-form");i.querySelector(".kt-button").classList.remove("active"),i.appendChild(t),e.remove()}})),document.addEventListener("lookfyCartFinally",(t=>{if("dawn"==window.lfThemeInfo.themeName){const t=lfUtils.select("cart-notification")||lfUtils.select("cart-drawer");t&&t.classList.contains("is-empty")&&t.classList.remove("is-empty")}})),document.addEventListener("lookfyCartAdded_dawn",(t=>{const e=lfUtils.select("cart-notification")||lfUtils.select("cart-drawer");if("drawer"==lfShop.setup.redirect&&e){if(t.detail.products&&lfUtils.select("cart-notification")){document.getElementById("cart-icon-bubble").innerHTML=lfGetSectionInnerHTML(t.detail.cartDetail.sections["cart-icon-bubble"])}else e.renderContents(t.detail.cartDetail);lfUtils.documentEvent("lookfyCartFinished")}})),document.addEventListener("lookfyCartAdded_xtra",(function(t){"drawer"==lfShop.setup.redirect&&(ajaxCart.load(t.detail.cartDetail),lfUtils.documentEvent("lookfyCartFinished"))})),document.addEventListener("lookfyCartAdded_paloalto",(t=>{window.cart&&"drawer"==lfShop.setup.redirect&&(window.cart.getCart(),lfUtils.documentEvent("lookfyCartFinished"))})),document.addEventListener("lookfyCartAdded_the4",(t=>{"drawer"==lfShop.setup.redirect&&(window.T4SThemeSP.Cart.renderContents(t.detail.cartDetail.sections),window.T4SThemeSP.Drawer&&(window.T4SThemeSP.Drawer.opend($("#t4s-mini_cart")),lfUtils.documentEvent("lookfyCartFinished")))})),document.addEventListener("lookfyCartAdded_shella",(t=>{"drawer"==lfShop.setup.redirect&&lfUtils.getJson("/cart.js",(t=>{window.theme.Cart.updateHeaderCount(t),window.theme.Cart.updateValues(t),window.theme.Cart.updateFreeShipping(t),lfUtils.select(".header__btn-cart")?.click(),lfUtils.documentEvent("lookfyCartFinished")}))})),document.addEventListener("lookfyCartAdded_minimog",(t=>{const e=lfUtils.select("m-cart-drawer");if("drawer"==lfShop.setup.redirect&&e){e.onCartDrawerUpdate(),e.open();const t=lfUtils.select("foxkit-cart-goal");t&&t.updateProgress()}})),document.addEventListener("lookfyCartAdded_symmetry",(function(t){const e=t.detail.cartDetail,i=lfUtils.select("cart-drawer");"drawer"===lfShop.setup.redirect&&i&&(["page-header","cart-drawer"].map((t=>lfUtils.select(t))).filter((t=>t)).forEach((t=>{t.updateFromCartChange(e.sections[t.dataset.sectionId])})),lfUtils.select(".js-cart-drawer").open(),lfUtils.documentEvent("lookfyCartFinished"))})),document.addEventListener("lookfyCartAdded_impulse",(function(t){if("drawer"===lfShop.setup.redirect&&"drawer"==theme.settings.cartType){(new theme.CartDrawer).open(),lfUtils.documentEvent("lookfyCartFinished")}})),document.addEventListener("lookfyCartAdded_impact",(async t=>{const e=lfUtils.select("cart-drawer");if("drawer"===lfShop.setup.redirect&&e){const{cartDetail:{sections:e}}=t.detail||{};e&&Object.entries(e).forEach((([t,e])=>{let i=document.getElementById(`shopify-section-${t}`)||document.getElementById(t);i&&(i.innerHTML=lfGetSectionInnerHTML(e))})),lfUtils.getJson("/cart.js",(t=>{const e=lfUtils.select("cart-count");e&&(e.style.opacity=1,e.innerHTML=`${t.item_count} `,e.click(),lfUtils.documentEvent("lookfyCartFinished"))}))}})),document.addEventListener("lookfyCartAdded_hongo",(async t=>{const{cartDetail:{sections:e}}=t.detail,i=lfUtils.select("cart-notification");"drawer"===lfShop.setup.redirect&&i&&(i.updateContent(e),i.open(),lfUtils.getJson("/cart.js",(t=>{lfUtils.selectAll("span[data-cart-count]").forEach((e=>{e.innerText=t.item_count})),lfUtils.documentEvent("lookfyCartFinished")})))})),document.addEventListener("lookfyCartAdded_focal",(async t=>{const e=lfUtils.select("cart-drawer");"drawer"===lfShop.setup.redirect&&e&&lfUtils.getJson("/cart.js",(i=>{const s={detail:{cart:{...e,sections:t.detail.cartDetail.sections}}};e._rerenderCart(s),e.setAttribute("open","");const n=lfUtils.select("cart-count");n&&(n.textContent=i.item_count),lfUtils.documentEvent("lookfyCartFinished")}))})),document.addEventListener("lookfyCartAdded_broadcast",(async t=>{"drawer"===lfShop.setup.redirect&&window.cart&&window.cart.updateCart()})),document.addEventListener("lookfyCartAdded_prestige",(async t=>{if("drawer"===lfShop.setup.redirect){document.dispatchEvent(new CustomEvent("cart:refresh"));document.querySelector("[aria-controls='cart-drawer']").click()}}));const o=()=>{lfUtils.selectAll(".lookfy-gallery").forEach((t=>{t.classList.contains("lf-active")||lfGallery(t)}))};o();new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&o()}))})).observe(document.body,{attributes:!1,childList:!0,subtree:!0,characterDataOldValue:!1})}