(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");ithis.preventReveal=!0,this.addEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.addEventListener("scroll",this.onScrollHandler,!1),this.createObserver()}disconnectedCallback(){this.removeEventListener("preventHeaderReveal",this.hideHeaderOnScrollUp),window.removeEventListener("scroll",this.onScrollHandler)}createObserver(){let observer=new IntersectionObserver((entries,observer2)=>{this.headerBounds=entries[0].intersectionRect,observer2.disconnect()});this.header&&observer.observe(this.header)}onScroll(){if(this.header.querySelector("details-modal details").hasAttribute("open"))return;const scrollTop=window.pageYOffset||document.documentElement.scrollTop;if(this.headerIsAlwaysSticky&&scrollTop>this.header.offsetHeight+1&&(this.header.classList.add("shopify-section-header-sticky"),this.header.style.transform="translateY(-100%)"),this.headerIsAlwaysSticky&&scrollTop>this.header.offsetHeight+2&&(this.header.style.transition="background var(--duration-short), transform var(--duration-default)",this.header.style.transform="translateY(0)"),this.headerIsAlwaysSticky&&scrollTopthis.currentScrollTop&&scrollTop>this.headerBounds.bottom){if(this.predictiveSearch&&this.predictiveSearch.onFocusOut&&(this.predictiveSearch.onFocusOut(),this.predictiveSearch.onBlur()),this.preventHide)return;requestAnimationFrame(this.hide.bind(this))}else scrollTopthis.headerBounds.bottom?this.preventReveal?(window.clearTimeout(this.isScrolling),this.isScrolling=setTimeout(()=>{this.preventReveal=!1},66),requestAnimationFrame(this.hide.bind(this))):requestAnimationFrame(this.reveal.bind(this)):scrollTop<=this.headerBounds.top&&requestAnimationFrame(this.reset.bind(this));this.currentScrollTop=scrollTop}hide(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-hidden","shopify-section-header-sticky"),this.closeMenuDisclosure(),this.closeSearchModal())}reveal(){this.headerIsAlwaysSticky||(this.header.classList.add("shopify-section-header-sticky","animate"),this.header.classList.remove("shopify-section-header-hidden"))}reset(){this.headerIsAlwaysSticky||this.header.classList.remove("shopify-section-header-hidden","shopify-section-header-sticky","animate")}closeMenuDisclosure(){this.disclosures=this.disclosures||this.header.querySelectorAll("details-disclosure"),this.disclosures&&this.disclosures.forEach(disclosure=>disclosure.close())}closeSearchModal(){this.searchModal=this.searchModal||this.header.querySelector("details-modal"),this.searchModal.close(!1)}}customElements.define("sticky-header",StickyHeader)}catch(e){console.error(e)}}(),function(){if(__sections__["main-cart-footer"])try{class CartNote extends HTMLElement{constructor(){super(),this.addEventListener("change",debounce(event=>{const body=JSON.stringify({note:event.target.value});fetch(`${routes.cart_update_url}`,{...fetchConfig(),body})},300))}}customElements.define("cart-note",CartNote)}catch(e){console.error(e)}}(),function(){if(__sections__["main-product"])try{class ProductModal extends ModalDialog{constructor(){super()}hide(){super.hide(),window.pauseAllMedia()}show(opener){super.show(opener),this.showActiveMedia()}showActiveMedia(){this.querySelectorAll(`[data-media-id]:not([data-media-id="${this.openedBy.getAttribute("data-media-id")}"])`).forEach(element=>{element.classList.remove("active")});const activeMedia=this.querySelector(`[data-media-id="${this.openedBy.getAttribute("data-media-id")}"]`),activeMediaTemplate=activeMedia.querySelector("template"),activeMediaContent=activeMediaTemplate?activeMediaTemplate.content:null;activeMedia.classList.add("active"),activeMedia.scrollIntoView(),activeMedia.nodeName=="DEFERRED-MEDIA"&&activeMediaContent&&activeMediaContent.querySelector(".js-youtube")&&activeMediaContent.querySelector(".js-vimeo")&&activeMedia.loadContent()}}class RelatedProduct extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const related=html.querySelector(".related-product");related&&related.innerHTML.trim().length&&(this.innerHTML=related.innerHTML),$(".product-description-more").click(function(e){e.preventDefault(),$(this).closest(".product-description-short").next().show(),$(this).closest(".product-description-short").hide()}),$(".product-description-less").click(function(e){e.preventDefault(),$(this).closest(".product-description-full").prev().show(),$(this).closest(".product-description-full").hide()})}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}class RelatedSlider extends HTMLElement{constructor(){super();const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const relatedSlider=html.querySelector(`related-slider[data-id="${this.getAttribute("data-id")}"]`);relatedSlider&&relatedSlider.innerHTML.trim().length&&(this.innerHTML=relatedSlider.innerHTML);const slider=this.querySelector(".related-slider__list"),prevBtn=this.querySelector(".related-slider__button-prev"),nextBtn=this.querySelector(".related-slider__button-next");if(document.querySelector(".related-slider__list")){const productSlider=new Swiper(slider,{slidesPerView:1,spaceBetween:10,navigation:{nextEl:nextBtn,prevEl:prevBtn},breakpoints:{}})}const generateSrcset=(image,widths=[])=>{const imageUrl=new URL(image.src);return widths.filter(width=>width<=image.width).map(width=>(imageUrl.searchParams.set("width",width.toString()),`${imageUrl.href} ${width}w`)).join(", ")},createImageElement=(image,classes,sizes,productTitle)=>{const previewImage=image.preview_image,newImage=new Image(previewImage.width,previewImage.height);return newImage.className=classes,newImage.alt=image.alt||productTitle,newImage.sizes=sizes,newImage.src=previewImage.src,newImage.srcset=generateSrcset(previewImage,[165,360,533,720,940,1066]),newImage.loading="lazy",newImage};(()=>{document.querySelectorAll(".js-color-swatches-wrapper").forEach(wrapper=>{wrapper.querySelectorAll(".js-color-swatches input").forEach(input=>{input.addEventListener("click",event=>{const primaryImage=wrapper.querySelector(".media--first"),secondaryImage=wrapper.querySelector(".media--second"),handleProduct=wrapper.dataset.product;if(event.currentTarget.checked&&primaryImage){wrapper.querySelector(".js-color-swatches-link").setAttribute("href",event.currentTarget.dataset.variantLink),wrapper.querySelector('.card__add-to-cart button[name="add"]')&&(wrapper.querySelector('.card__add-to-cart button[name="add"]').setAttribute("aria-disabled",!1),wrapper.querySelector('.card__add-to-cart button[name="add"] > span').classList.remove("hidden"),wrapper.querySelector('.card__add-to-cart button[name="add"] .sold-out-message').classList.add("hidden"),wrapper.querySelector('.card__add-to-cart input[name="id"]').value=event.currentTarget.dataset.variantId);const currentColor=event.currentTarget.value;jQuery.getJSON(window.Shopify.routes.root+`products/${handleProduct}.js`,function(product){const variant=product.variants.filter(item=>item.featured_media!=null&&item.options.includes(currentColor))[0];if(variant){const newPrimaryImage=createImageElement(variant.featured_media,primaryImage.className,primaryImage.sizes,product.title);if(newPrimaryImage.src!==primaryImage.src){let flag=!1;if(secondaryImage){const secondaryImagePathname=new URL(secondaryImage.src).pathname,newPrimaryImagePathname=new URL(newPrimaryImage.src).pathname;secondaryImagePathname==newPrimaryImagePathname&&(primaryImage.remove(),secondaryImage.classList.remove("media--second"),secondaryImage.classList.add("media--first"),flag=!0)}flag==!1&&(primaryImage.animate({opacity:[1,0]},{duration:200,easing:"ease-in",fill:"forwards"}).finished,setTimeout(function(){primaryImage.replaceWith(newPrimaryImage),newPrimaryImage.animate({opacity:[0,1]},{duration:200,easing:"ease-in"}),secondaryImage&&secondaryImage.remove()},200))}}})}})})})})()}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-modal",ProductModal),customElements.define("related-product",RelatedProduct),customElements.define("related-slider",RelatedSlider)}catch(e){console.error(e)}}(),function(){if(__sections__["product-recommendations"])try{class ProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML);const generateSrcset=(image,widths=[])=>{const imageUrl=new URL(image.src);return widths.filter(width=>width<=image.width).map(width=>(imageUrl.searchParams.set("width",width.toString()),`${imageUrl.href} ${width}w`)).join(", ")},createImageElement=(image,classes,sizes,productTitle)=>{const previewImage=image.preview_image,newImage=new Image(previewImage.width,previewImage.height);return newImage.className=classes,newImage.alt=image.alt||productTitle,newImage.sizes=sizes,newImage.src=previewImage.src,newImage.srcset=generateSrcset(previewImage,[165,360,533,720,940,1066]),newImage.loading="lazy",newImage},checkSwatches=()=>{document.querySelectorAll(".js-color-swatches-wrapper").forEach(wrapper=>{wrapper.querySelectorAll(".js-color-swatches input").forEach(input=>{input.addEventListener("click",event=>{const primaryImage=wrapper.querySelector(".media--first"),secondaryImage=wrapper.querySelector(".media--second"),handleProduct=wrapper.dataset.product;if(event.currentTarget.checked&&primaryImage){wrapper.querySelector(".js-color-swatches-link").setAttribute("href",event.currentTarget.dataset.variantLink),wrapper.querySelector('.card__add-to-cart button[name="add"]')&&(wrapper.querySelector('.card__add-to-cart button[name="add"]').setAttribute("aria-disabled",!1),wrapper.querySelector('.card__add-to-cart button[name="add"] > span').classList.remove("hidden"),wrapper.querySelector('.card__add-to-cart button[name="add"] .sold-out-message').classList.add("hidden"),wrapper.querySelector('.card__add-to-cart input[name="id"]').value=event.currentTarget.dataset.variantId);const currentColor=event.currentTarget.value;jQuery.getJSON(window.Shopify.routes.root+`products/${handleProduct}.js`,function(product){const variant=product.variants.filter(item=>item.featured_media!=null&&item.options.includes(currentColor))[0];if(variant){const newPrimaryImage=createImageElement(variant.featured_media,primaryImage.className,primaryImage.sizes,product.title);if(newPrimaryImage.src!==primaryImage.src){let flag=!1;if(secondaryImage){const secondaryImagePathname=new URL(secondaryImage.src).pathname,newPrimaryImagePathname=new URL(newPrimaryImage.src).pathname;secondaryImagePathname==newPrimaryImagePathname&&(primaryImage.remove(),secondaryImage.classList.remove("media--second"),secondaryImage.classList.add("media--first"),flag=!0)}flag==!1&&(primaryImage.animate({opacity:[1,0]},{duration:200,easing:"ease-in",fill:"forwards"}).finished,setTimeout(function(){primaryImage.replaceWith(newPrimaryImage),newPrimaryImage.animate({opacity:[0,1]},{duration:200,easing:"ease-in"}),secondaryImage&&secondaryImage.remove()},200))}}})}})})})},initProductCarouselSliders=()=>{document.querySelectorAll(".product-recommendations-swiper").forEach(prodSlideshow=>{const productCount=parseInt(prodSlideshow.querySelector(".swiper-wrapper").getAttribute("data-count")),productCountMobile=parseInt(prodSlideshow.querySelector(".swiper-wrapper").getAttribute("data-count-mobile")),prodCardprodSlideshow=new Swiper(prodSlideshow,{loop:!1,autoHeight:!0,allowTouchMove:!0,slidesPerView:productCount,lazy:!0,preloadImages:!1,spaceBetween:24,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},on:{resize:function(){var windowWidth=window.innerWidth;productCount==6?windowWidth<576?this.params.slidesPerView=productCountMobile:windowWidth<750?this.params.slidesPerView=2:windowWidth<1200?this.params.slidesPerView=3:windowWidth<1360?this.params.slidesPerView=4:windowWidth<1600?this.params.slidesPerView=5:this.params.slidesPerView=6:productCount==5?windowWidth<576?this.params.slidesPerView=productCountMobile:windowWidth<750?this.params.slidesPerView=2:windowWidth<1200?this.params.slidesPerView=3:windowWidth<1360?this.params.slidesPerView=4:this.params.slidesPerView=5:productCount==4?windowWidth<576?this.params.slidesPerView=productCountMobile:windowWidth<750?this.params.slidesPerView=2:windowWidth<1200?this.params.slidesPerView=3:this.params.slidesPerView=4:productCount==3?windowWidth<576?this.params.slidesPerView=productCountMobile:windowWidth<750?this.params.slidesPerView=2:this.params.slidesPerView=3:productCount==2&&(windowWidth<576?this.params.slidesPerView=productCountMobile:this.params.slidesPerView=2)}}})})};checkSwatches(),initProductCarouselSliders()}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 200px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations)}catch(e){console.error(e)}}()})(); //# sourceMappingURL=/cdn/shop/t/7/compiled_assets/scripts.js.map?6805=