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",``);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.control}
${t.close}
`);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:`
\n
\n
\n

\n
\n
\n
`,accordions:`
\n
\n \n \n
\n
\n
\n
\n
`},...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+=``:a+=``,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``}));h+=`
`}else{d="";c.map(((t,e)=>{var i=`${t.name}`;const s=`template--${o}${r}-${t.position}`;t.values.map(((t,e)=>{i+=``})),d+=`
${i}
`})),h+=d+u}else h+=u}const m=`
${lfUtils.errorSvg}
`;n.innerHTML=`\n
\n
\n ${h}\n
${a}
\n
\n ${m}\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='",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;n