1(function(){var __snippets__={};(function(){for(var element=document.getElementById("snippets-script"),attribute=element?element.getAttribute("data-snippets"):"",snippets=attribute.split(",").filter(Boolean),i=0;i<snippets.length;i++)__snippets__[snippets[i]]=!0})(),(function(){if(!(!__snippets__["element.select"]&&!Shopify.designMode))try{class ElementSelect extends HTMLElement{constructor(){super(),this.select=null,this.buttonText=null,this.button=null}connectedCallback(){this.select=this.querySelector("select"),this.button=this.querySelector(".element-button"),this.select&&this.button&&this.init()}init(){this.buttonText=this.button.querySelector(".element-button__text")||this.button.querySelector("[data-button-text]"),this.updateButtonText(),this.button.addEventListener("click",e=>this.handleButtonClick(e)),this.select.addEventListener("keydown",e=>this.handleKeydown(e)),this.select.addEventListener("change",()=>this.updateButtonText()),this.select.addEventListener("focus",()=>this.handleFocus()),this.select.addEventListener("blur",()=>this.handleBlur())}handleButtonClick(e){e.preventDefault(),e.stopPropagation(),this.select.focus(),this.select.click()}handleKeydown(e){switch(e.key){case"Enter":case" ":e.preventDefault(),this.select.click();break;case"ArrowDown":case"ArrowUp":break;default:break}}updateButtonText(){if(!this.buttonText)return;const selectedOption=this.select.options[this.select.selectedIndex];selectedOption&&selectedOption.value!==""?this.buttonText.textContent=selectedOption.textContent:this.buttonText.textContent=this.select.getAttribute("aria-label")||"Select an option"}handleFocus(){this.classList.add("element-select__wrapper--focused")}handleBlur(){this.classList.remove("element-select__wrapper--focused")}disconnectedCallback(){this.button&&this.button.removeEventListener("click",e=>this.handleButtonClick(e)),this.select&&(this.select.removeEventListener("keydown",e=>this.handleKeydown(e)),this.select.removeEventListener("change",()=>this.updateButtonText()),this.select.removeEventListener("focus",()=>this.handleFocus()),this.select.removeEventListener("blur",()=>this.handleBlur()))}}customElements.define("element-select",ElementSelect)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["form.customer"]&&!Shopify.designMode))try{class FormCustomer extends HTMLElement{static emailPattern=/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;connectedCallback(){this.controller?.abort();const{signal}=this.controller=new AbortController,form=this.querySelector("form"),input=form?.querySelector('input[name="contact[email]"]');if(!input)return;const validate=()=>{const ok=FormCustomer.emailPattern.test(input.value.trim());input.setCustomValidity(ok?"":this.dataset.invalidMessage)};input.addEventListener("input",validate,{signal}),form.addEventListener("submit",e=>{validate(),form.reportValidity()||e.preventDefault()},{signal,passive:!1})}disconnectedCallback(){this.controller?.abort()}}customElements.define("form-customer",FormCustomer)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["form.product"]&&!Shopify.designMode))try{class ProductForm extends HTMLElement{constructor(){super(),this.form=this.querySelector("form"),this.submitButton=this.findSubmitButton(),this.form.addEventListener("submit",this.onSubmitHandler.bind(this))}findSubmitButton(){return this.form.querySelector('button[type="submit"], input[type="submit"]')}disableSubmitButton(){this.submitButton&&(this.submitButton.disabled=!0,this.submitButton.classList.add("product-form__submit-button--pulsing"))}enableSubmitButton(){this.submitButton&&(this.submitButton.disabled=!1,this.submitButton.classList.remove("product-form__submit-button--pulsing"))}async onSubmitHandler(evt){evt.preventDefault(),this.disableSubmitButton();let cartBeforeSubmission;try{cartBeforeSubmission=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json()}catch(error){console.error("Failed to get cart state before submission:",error),cartBeforeSubmission=null}const config={method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"}},formData=new FormData(this.form);this.dispatchEvent(new CustomEvent("product-form:submit:before",{bubbles:!0,detail:{form:formData},cancelable:!0})),await new Promise(resolve=>{queueMicrotask(resolve)}),config.body=formData;
1const cartRequestEvent=new CustomEvent("product-form:cart:request",{bubbles:!0,cancelable:!0,detail:{form:formData,config,cartBefore:cartBeforeSubmission,resolve:responseData2=>this.resolveCartRequest(responseData2),reject:error=>this.rejectCartRequest(error)}}),cartRequestHandled=!this.dispatchEvent(cartRequestEvent);let responseData;try{if(cartRequestHandled)responseData=await this.waitForCartResponse();else{const response=await fetch(`${window.Shopify.routes.root}cart/add.js`,config);if(responseData=await response.json(),!response.ok)throw responseData}const cartAfterSubmission=await(await fetch(`${window.Shopify.routes.root}cart.js`)).json();this.dispatchEvent(new CustomEvent("product-form:submit:success",{bubbles:!0,detail:{form:formData,response:responseData,cart:cartAfterSubmission}})),this.hasCartChanged(cartBeforeSubmission,cartAfterSubmission)&&this.dispatchEvent(new CustomEvent("product-form:cart:update",{bubbles:!0,detail:{cart:cartAfterSubmission,form:formData,response:responseData}}));const cartNavigationEvent=new CustomEvent("product-form:cart:navigate",{bubbles:!0,cancelable:!0,detail:{form:formData,response:responseData,cart:cartAfterSubmission}});!this.dispatchEvent(cartNavigationEvent)||(window.location.href=`${window.Shopify.routes.root}cart`)}catch(error){this.dispatchEvent(new CustomEvent("product-form:submit:error",{bubbles:!0,detail:{form:formData,cart:cartBeforeSubmission,error}}))}finally{this.enableSubmitButton()}}waitForCartResponse(){return new Promise((resolve,reject)=>{this._cartRequestResolver={resolve,reject};const timeout=setTimeout(()=>{this._cartRequestResolver&&(delete this._cartRequestResolver,reject(new Error("Cart request timeout - no response received from subscriber")))},3e4);this._cartRequestResolver.timeout=timeout})}resolveCartRequest(responseData){this._cartRequestResolver&&(clearTimeout(this._cartRequestResolver.timeout),this._cartRequestResolver.resolve(responseData),delete this._cartRequestResolver)}rejectCartRequest(error){this._cartRequestResolver&&(clearTimeout(this._cartRequestResolver.timeout),this._cartRequestResolver.reject(error),delete this._cartRequestResolver)}hasCartChanged(cartBefore,cartAfter){return!cartBefore||!cartAfter?!0:JSON.stringify(cartBefore)!==JSON.stringify(cartAfter)}}customElements.define("product-form",ProductForm)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["form.product.messages"]&&!Shopify.designMode))try{class ProductFormMessages extends HTMLElement{constructor(){super(),this.formId=this.dataset.formId,this.defaultErrorMessage=this.dataset.error,this.defaultSuccessMessage=this.dataset.success,this.abortController=new AbortController}connectedCallback(){this.cacheTemplate(),this.bindEvents()}disconnectedCallback(){this.abortController.abort()}cacheTemplate(){const template=this.querySelector("template");template&&(this.template=template.innerHTML,this.templateElement=template)}bindEvents(){const{signal}=this.abortController;document.addEventListener("product-form:submit:before",this.handleSubmitStart.bind(this),{signal}),document.addEventListener("product-form:submit:error",this.handleError.bind(this),{signal}),document.addEventListener("product-form:submit:success",this.handleSuccess.bind(this),{signal})}handleSubmitStart(e){e.target.form.getAttribute("id")===this.formId&&this.clearMessages()}handleSuccess(e){if(e.target.form.getAttribute("id")!==this.formId)return;let message=this.defaultSuccessMessage;const successMessageEvent=new CustomEvent("product-form:message:success",{bubbles:!0,cancelable:!0,detail:{form:e.target.form,response:e.detail.response,cart:e.detail.cart,message}});this.dispatchEvent(successMessageEvent)&&this.showMessage(successMessageEvent.detail.message)}handleError(e){if(e.target.form.getAttribute("id")!==this.formId)return;const error=e.detail.error;let message=this.defaultErrorMessage;error.description?message=error.description:error.message&&(message=error.message);const errorMessageEvent=new CustomEvent("product-form:message:error",{bubbles:!0,cancelable:!0,detail:{form:e.target.form,response:e.detail.response,cart:e.detail.cart,message}});this.dispatchEvent(errorMessageEvent)&&this.showMessage(errorMessageEvent.detail.message)}showMessage(message){if(this.clearMessages(),this.classList.remove("hide"),this.template){const messageContent=this.template.replace("<slot></slot>",message);this.innerHTML=messageContent}}clearMessages(){this.classList.add("hide"),this.templateElement&&(this.innerHTML=this.templateElement.outerHTML)}}customElements.define("product-form-messages",ProductFormMessages)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["layout.grid"]&&!Shopify.designMode))try{class LayoutGrid extends HTMLElement{constructor(){super()}connectedCallback(){this.attachShadowRoots(this)}attachShadowRoots(element){this.shadowRoot||element.querySelectorAll("template[shadowrootmode]").forEach(template=>{const mode=template.getAttribute("shadowrootmode"),shadowRoot=template.parentNode.attachShadow({mode});shadowRoot.appendChild(template.content),template.remove(),this.attachShadowRoots(shadowRoot)})}}customElements.define("layout-grid",LayoutGrid)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["layout.stack"]&&!Shopify.designMode))try{class LayoutStack extends HTMLElement{constructor(){super()}connectedCallback(){this.attachShadowRoots(this)}attachShadowRoots(element){this.shadowRoot||element.querySelectorAll("template[shadowrootmode]").forEach(template=>{const mode=template.getAttribute("shadowrootmode"),shadowRoot=template.parentNode.attachShadow({mode});shadowRoot.appendChild(template.content),template.remove(),this.attachShadowRoots(shadowRoot)})}}customElements.define("layout-stack",LayoutStack)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["layout.sticky-scroller"]&&!Shopify.designMode))try{class StickyScroller extends HTMLElement{constructor(){super(),this.resizeObserver=new ResizeObserver(()=>this.recalculateStyles()),this.abortController=new AbortController,this.isScrolling=!1,this.position="relative",this.lastKnownScrollY=0,this.initialTop=0,this.currentTop=0,this.boundOnScroll=this.onScroll.bind(this)}connectedCallback(){this.inView(this,this.setupObservers.bind(this),{margin:"500px"})}disconnectedCallback(){this.cleanupObservers()}setupObservers(){return this.resizeObserver.observe(this),window.addEventListener("scroll",this.boundOnScroll,{passive:!0,signal:this.abortController.signal}),this.cleanupObservers.bind(this)}cleanupObservers(){this.abortController.abort(),this.resizeObserver.disconnect()}onScroll(){this.isScrolling||(requestAnimationFrame(()=>{this.updatePosition(),this.isScrolling=!1}),this.isScrolling=!0)}recalculateStyles(){this.style.removeProperty("top");const{top,position}=getComputedStyle(this);
1this.initialTop=parseInt(top,10),this.position=position,this.updatePosition()}updatePosition(){if(this.position!=="sticky"){this.style.removeProperty("top");return}const{top,height}=this.getBoundingClientRect(),maxTop=top+window.scrollY-this.offsetTop+this.initialTop,minTop=height-window.innerHeight+20;this.currentTop+=this.lastKnownScrollY-window.scrollY,this.currentTop=Math.min(Math.max(this.currentTop,-minTop),maxTop,this.initialTop),this.lastKnownScrollY=window.scrollY,this.style.top=`${Math.round(this.currentTop)}px`}inView(elementOrSelector,onStart,{root,margin:rootMargin,amount="any"}={}){const thresholds={any:0,all:1};if(typeof IntersectionObserver>"u")return()=>{};let elements;typeof elementOrSelector=="string"?elements=document.querySelectorAll(elementOrSelector):elementOrSelector instanceof Element?elements=[elementOrSelector]:elements=Array.from(elementOrSelector||[]);const activeIntersections=new WeakMap,onIntersectionChange=entries=>{entries.forEach(entry=>{const onEnd=activeIntersections.get(entry.target);if(entry.isIntersecting!==!!onEnd)if(entry.isIntersecting){const newOnEnd=onStart(entry);typeof newOnEnd=="function"?activeIntersections.set(entry.target,newOnEnd):observer.unobserve(entry.target)}else onEnd&&(onEnd(entry),activeIntersections.delete(entry.target))})},observer=new IntersectionObserver(onIntersectionChange,{root,rootMargin,threshold:typeof amount=="number"?amount:thresholds[amount]});return elements.forEach(element=>observer.observe(element)),()=>observer.disconnect()}}customElements.define("sticky-scroller",StickyScroller)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["overlay.drawer"]&&!Shopify.designMode))try{class OverlayDrawer extends HTMLElement{constructor(){super()}connectedCallback(){this.closeButton=null,this.triggers=null,this.previouslyFocused=document.activeElement,this.trapFocusHandlers={},this.abortController=new AbortController,this.closeButton=this.querySelector("[data-drawer-close-button]"),this.triggers=document.querySelectorAll(`[data-open-drawer="${this.id}"]`);const signal=this.abortController.signal;this.moveToBody(),this.closeButton.addEventListener("click",()=>this.close(),{signal}),this.triggers.forEach(trigger=>{trigger.addEventListener("click",event2=>{event2.preventDefault(),this.open()},{signal})}),document.addEventListener("keydown",event2=>this.handleKeydown(event2),{signal}),this.addEventListener("click",event2=>this.handleOverlayClick(event2),{signal})}disconnectedCallback(){this.abortController.abort()}open(){this.previouslyFocused=document.activeElement,this.setAttribute("open","true"),this.trapFocus(this)}close(){this.setAttribute("open","false"),this.removeTrapFocus(this.previouslyFocused)}moveToBody(){this.parentNode!==document.body&&(this.originalParent=this.parentNode,this.originalNextSibling=this.nextSibling,document.body.appendChild(this))}handleOverlayClick(event2){event2.target===this&&this.close()}handleKeydown(event2){event2.key==="Escape"&&this.getAttribute("open")==="true"&&this.close()}removeTrapFocus(elementToFocus=null){if(this.trapFocusAbortController&&(this.trapFocusAbortController.abort(),this.trapFocusAbortController=null),elementToFocus)try{elementToFocus.focus({preventScroll:!0})}catch{elementToFocus.focus()}}forceFocus(element,options={}){let savedTabIndex=element.tabIndex;element.tabIndex=-1,element.dataset.tabIndex=savedTabIndex,element.focus(),typeof options.className<"u"&&element.classList.add(options.className),element.addEventListener("blur",callback);function callback(event2){event2.target.removeEventListener(event2.type,callback),element.tabIndex=savedTabIndex,delete element.dataset.tabIndex,typeof options.className<"u"&&element.classList.remove(options.className)}}focusable(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}trapFocus(container,options={}){let elements=this.focusable(container),elementToFocus=options.elementToFocus||container,first=elements[0],last=elements[elements.length-1];this.removeTrapFocus(),this.trapFocusAbortController=new AbortController;const signal=this.trapFocusAbortController.signal;this.trapFocusHandlers.focusin=function(event2){container!==event2.target&&!container.contains(event2.target)&&this.forceFocus(first||container,options),!(event2.target!==container&&event2.target!==last&&event2.target!==first)&&document.addEventListener("keydown",this.trapFocusHandlers.keydown,{signal})}.bind(this),this.trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",this.trapFocusHandlers.keydown)}.bind(this),this.trapFocusHandlers.keydown=function(event2){event2.keyCode===9&&(event2.target===last&&!event2.shiftKey&&(event2.preventDefault(),this.forceFocus(first||container,options)),(event2.target===container||event2.target===first)&&event2.shiftKey&&(event2.preventDefault(),this.forceFocus(last||container,options)))}.bind(this),document.addEventListener("focusout",this.trapFocusHandlers.focusout,{signal}),document.addEventListener("focusin",this.trapFocusHandlers.focusin,{signal}),this.forceFocus(elementToFocus,options)}}customElements.define("overlay-drawer",OverlayDrawer)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["overlay.lightbox"]&&!Shopify.designMode))try{class OverlayLightbox extends HTMLElement{static registry=new Map;static prefetchedGroups=new Set;constructor(){super(),this.trigger=null,this.template=null,this.overlay=null,this.closeBtn=null,this.prevBtn=null,this.nextBtn=null,this.group=this.dataset.group,this.groupItems=[],this.currentIndex=0,this.group&&(OverlayLightbox.registry.has(this.group)||OverlayLightbox.registry.set(this.group,[]),OverlayLightbox.registry.get(this.group).push(this))}connectedCallback(){this.trigger=this.querySelector(".overlay-lightbox__trigger"),this.template=this.querySelector(".overlay-lightbox__template"),this.init()}init(){this.trigger&&this.trigger.addEventListener("click",e=>{e.preventDefault(),this.openLightbox()}),document.addEventListener("keydown",e=>{e.key==="Escape"&&this.isOpen()?this.closeLightbox():this.isOpen()&&this.group&&(e.key==="ArrowLeft"?(e.preventDefault(),this.navigateToPrevious()):e.key==="ArrowRight"&&(e.preventDefault(),this.navigateToNext()))})}openLightbox(){this.overlay||this.createOverlay(),this.overlay.classList.add("overlay-lightbox__overlay--open"),document.body.style.overflow="hidden",this.group?(this.findGroupItems(),this.prefetchGroupImages(),this.groupItems.length<=1?this.overlay.classList.add("overlay-lightbox__overlay--single-item"):this.overlay.classList.remove("overlay-lightbox__overlay--single-item")):this.overlay.classList.add("overlay-lightbox__overlay--single-item")}createOverlay(){if(!this.template){console.error("OverlayLightbox: Template not found");return}if(this.overlay=this.template.content.cloneNode(!0).querySelector(".overlay-lightbox__overlay"),!this.overlay){console.error("OverlayLightbox: Overlay element not found in template");return}this.closeBtn=this.overlay.querySelector(".lightbox-close"),this.prevBtn=this.overlay.querySelector(".overlay-lightbox__nav--prev"),this.nextBtn=this.overlay.querySelector(".overlay-lightbox__nav--next"),this.closeBtn&&this.closeBtn.addEventListener("click",e=>{e.preventDefault(),this.closeLightbox()}),this.prevBtn&&this.prevBtn.addEventListener("click",e=>{e.preventDefault(),this.navigateToPrevious()}),this.nextBtn&&this.nextBtn.addEventListener("click",e=>{e.preventDefault(),this.navigateToNext()}),this.overlay&&this.overlay.addEventListener("click",e=>{e.target===this.overlay&&this.closeLightbox()}),this.overlay&&document.body.appendChild(this.overlay)}closeLightbox(){this.overlay&&(this.overlay.classList.remove("overlay-lightbox__overlay--open"),this.overlay.classList.remove("overlay-lightbox__overlay--single-item"),this.overlay.parentNode&&(this.overlay.parentNode.removeChild(this.overlay),this.overlay=null,this.closeBtn=null,this.prevBtn=null,this.nextBtn=null)),document.body.style.overflow=""}findGroupItems(){this.groupItems=OverlayLightbox.registry.get(this.group)||[],this.currentIndex=this.groupItems.indexOf(this)}navigateToPrevious(){if(!this.group||this.groupItems.length<=1)return;let targetIndex=this.currentIndex-1;targetIndex<0&&(targetIndex=this.groupItems.length-1);const targetLightbox=this.groupItems[targetIndex];targetLightbox&&this.switchToLightbox(targetLightbox)}navigateToNext(){if(!this.group||this.groupItems.length<=1)return;let targetIndex=this.currentIndex+1;targetIndex>=this.groupItems.length&&(targetIndex=0);const targetLightbox=this.groupItems[targetIndex];targetLightbox&&this.switchToLightbox(targetLightbox)}switchToLightbox(targetLightbox){this.closeLightbox(),targetLightbox.openLightbox()}prefetchGroupImages(){this.group&&!OverlayLightbox.prefetchedGroups.has(this.group)&&(OverlayLightbox.prefetchedGroups.add(this.group),this.groupItems.forEac
1h(lightbox=>{lightbox.querySelectorAll("img").forEach(img=>{this.prefetchLargestImage(img)})}))}prefetchLargestImage(img){if(img.srcset){const srcsetUrls=img.srcset.split(",").map(src=>src.trim().split(" ")[0]);let largestUrl=img.src,largestSize=0;srcsetUrls.forEach(url=>{const size=this.extractImageSize(url);size>largestSize&&(largestSize=size,largestUrl=url)}),this.prefetchImage(largestUrl)}else{const largestUrl=this.getLargestImageUrl(img.src);this.prefetchImage(largestUrl)}}extractImageSize(url){try{const urlObj=new URL(url);if(urlObj.searchParams.has("width"))return parseInt(urlObj.searchParams.get("width"))||0;const pathParts=urlObj.pathname.split("_");if(pathParts.length>1){const sizeMatch=pathParts[pathParts.length-1].match(/(\d+)x/);if(sizeMatch)return parseInt(sizeMatch[1])||0}}catch{}return 0}getLargestImageUrl(originalUrl){try{const url=new URL(originalUrl);if(url.searchParams.has("width"))return url.searchParams.set("width","2400"),url.toString();if(url.pathname.includes("_")){const pathParts=url.pathname.split("_");if(pathParts.length>1){const extension=pathParts[pathParts.length-1].split(".")[1]||"jpg",newPath=pathParts.slice(0,-1).join("_")+"_2400x."+extension;return url.pathname=newPath,url.toString()}}}catch{}return originalUrl}prefetchImage(url){const prefetchImg=new Image;prefetchImg.src=url}isOpen(){return this.overlay&&this.overlay.classList.contains("overlay-lightbox__overlay--open")}disconnectedCallback(){if(this.group){const groupItems=OverlayLightbox.registry.get(this.group);if(groupItems){const index=groupItems.indexOf(this);index>-1&&groupItems.splice(index,1),groupItems.length===0&&OverlayLightbox.registry.delete(this.group)}}}}customElements.define("overlay-lightbox",OverlayLightbox)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["product.hot-reload"]&&!Shopify.designMode))try{class ProductHotReload extends HTMLElement{constructor(){super(),this.cache=new Map,this.activeRequests=new Map,this.loadingTimeout=null,this.supportsViewTransitions="startViewTransition"in document,this.addEventListener("change",event2=>this.onVariantChange(event2)),this.addEventListener("mouseover",event2=>this.onMouseOver(event2))}showLoadingState(){this.loadingTimeout=setTimeout(()=>{this.classList.add("product-hot-reload--loading")},200)}hideLoadingState(){this.loadingTimeout&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=null),this.classList.remove("product-hot-reload--loading")}buildRequestUrl(input){const productFormElement=input.closest("form"),sectionId=this.dataset.sectionId;let newProductUrl,optionValueId;if(input.type==="radio")newProductUrl=input.dataset.productUrl,optionValueId=input.dataset.optionValueId;else if(input.tagName==="SELECT"){const selectedOption=input.options[input.selectedIndex];newProductUrl=selectedOption.dataset.productUrl,optionValueId=selectedOption.dataset.optionValueId}let selectedOptionValues=[];if(selectedOptionValues=Array.from(productFormElement.querySelectorAll('input[type="radio"]:checked')).map(({dataset})=>dataset.optionValueId).filter(Boolean),Array.from(productFormElement.querySelectorAll("select")).forEac
1h(select=>{const selectedOption=select.options[select.selectedIndex];selectedOption&&selectedOption.dataset.optionValueId&&selectedOptionValues.push(selectedOption.dataset.optionValueId)}),input.type==="radio"&&!input.checked){const currentOptionName=input.name;selectedOptionValues=selectedOptionValues.filter(id=>{const input2=productFormElement.querySelector(`input[data-option-value-id="${id}"]`);return input2&&input2.name!==currentOptionName}),selectedOptionValues.push(optionValueId)}const params=selectedOptionValues.length>0?`&option_values=${selectedOptionValues.join(",")}`:"";return`${newProductUrl}?section_id=${sectionId}${params}`}onMouseOver(event2){const label=event2.target.closest("label");if(!label)return;const input=label.querySelector('input[type="radio"]');if(!input||input.checked)return;const requestUrl=this.buildRequestUrl(input);this.cache.has(requestUrl)||this.activeRequests.has(requestUrl)||this.fetchContent(requestUrl)}fetchContent(requestUrl){const fetchPromise=fetch(requestUrl).then(response=>response.text()).then(responseText=>{const html=new DOMParser().parseFromString(responseText,"text/html");return this.cache.set(requestUrl,html),this.activeRequests.delete(requestUrl),html}).catch(error=>{throw this.activeRequests.delete(requestUrl),error});return this.activeRequests.set(requestUrl,fetchPromise),fetchPromise}async onVariantChange(event2){if(!event2.target.hasAttribute("data-product-hot-reload-trigger"))return;const optionValueElement=event2.target,requestUrl=this.buildRequestUrl(optionValueElement),oldProductUrl=this.dataset.productUrl;let newProductUrl;optionValueElement.type==="radio"?newProductUrl=optionValueElement.dataset.productUrl||oldProductUrl:optionValueElement.tagName==="SELECT"?newProductUrl=optionValueElement.options[optionValueElement.selectedIndex].dataset.productUrl||oldProductUrl:newProductUrl=oldProductUrl,this.showLoadingState();let html;try{this.cache.has(requestUrl)?html=this.cache.get(requestUrl):this.activeRequests.has(requestUrl)?html=await this.activeRequests.get(requestUrl):html=await this.fetchContent(requestUrl),await this.updateProductWithTransition(html,newProductUrl,event2.target.id)}catch(error){console.error("Error updating product content:",error)}finally{this.hideLoadingState()}}async updateProductWithTransition(html,newProductUrl,targetId){const updatedHtml=html.getElementById(this.id);this.supportsViewTransitions?await document.startViewTransition(()=>{this.innerHTML=updatedHtml.innerHTML,this.dataset.productUrl=updatedHtml.dataset.productUrl,this.dataset.variantId=updatedHtml.dataset.variantId}).finished:(this.innerHTML=updatedHtml.innerHTML,this.dataset.productUrl=updatedHtml.dataset.productUrl,this.dataset.variantId=updatedHtml.dataset.variantId);let url=new URL(newProductUrl,window.location.origin);const currentUrl=new URL(window.location.href);for(const[key,value]of currentUrl.searchParams.entries())key!=="variant"&&url.searchParams.set(key,value);url.searchParams.set("variant",this.dataset.variantId),window.history.pushState({},"",url.toString()),this.querySelector(`#${targetId}`).focus()}}customElements.define("product-hot-reload",ProductHotReload)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["section.flex-pdp.gift-recipient"]&&!Shopify.designMode))try{class GiftRecipientForm extends HTMLElement{constructor(){super(),this.checkboxInput=this.querySelector('.gift-recipient-form__checkbox input[type="checkbox"]'),this.emailInput=this.querySelector(".gift-recipient-form__email"),this.nameInput=this.querySelector(".gift-recipient-form__name"),this.messageInput=this.querySelector(".gift-recipient-form__message"),this.dateInput=this.querySelector(".gift-recipient-form__date"),this.addEventListener("change",()=>this.onChange()),this.recipientFields=this.querySelector(".recipient-fields"),this.checkboxInput.addEventListener("change",()=>{event.stopPropagation(),this.recipientFields.style.display=this.checkboxInput.checked?"block":"none"})}connectedCallback(){this.abortController=new AbortController,document.addEventListener("product-form:submit:error",event2=>{event2.target.form.id===this.dataset.formId&&this.displayErrorMessage(event2.detail.errorMessage)},{signal:this.abortController.signal}),document.addEventListener("product-form:submit:success",event2=>{event2.target.form.id===this.dataset.formId&&(this.clearInputFields(),this.clearErrorMessage())},{signal:this.abortController.signal})}disconnectedCallback(){this.abortController.abort()}onChange(){this.checkboxInput.checked||(this.clearInputFields(),this.clearErrorMessage())}clearInputFields(){for(const element of this.querySelectorAll("input"))element.value=""}displayErrorMessage(body){if(this.clearErrorMessage(),body)return Object.entries(body).forEac
1h(([key,value])=>{const inputElement=this[`${key}Input`];inputElement&&inputElement.setAttribute("aria-invalid",!0)})}clearErrorMessage(){for(const inputElement of this.querySelectorAll("input"))inputElement.setAttribute("aria-invalid",!1),inputElement.removeAttribute("aria-describedby")}}customElements.define("gift-recipient-form",GiftRecipientForm)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["section.flex-pdp.media-gallery"]&&!Shopify.designMode))try{class MediaGalleryElement extends HTMLElement{constructor(){super(),this.slides=this.querySelectorAll(".media-gallery__slide"),this.thumbs=this.querySelectorAll(".media-gallery__thumb"),this.prevBtn=this.querySelector(".media-gallery__nav--prev"),this.nextBtn=this.querySelector(".media-gallery__nav--next"),this.mainContainer=this.querySelector(".media-gallery__main"),this.currentIndex=0,this.isAnimating=!1,this.isNaturalAspectRatio=this.mainContainer?.getAttribute("data-aspect-ratio")==="initial",this.touchStartX=0,this.touchStartY=0,this.touchEndX=0,this.touchEndY=0,this.minSwipeDistance=50}connectedCallback(){this.init()}init(){this.isNaturalAspectRatio&&(this.adjustContainerHeight(!0),this.setupResizeObserver()),this.thumbs.forEach((thumb,index)=>{thumb.addEventListener("click",()=>{const direction=index>this.currentIndex?"next":"prev";this.goToSlide(index,direction)})}),this.prevBtn&&this.prevBtn.addEventListener("click",e=>{e.preventDefault(),this.previousSlide()}),this.nextBtn&&this.nextBtn.addEventListener("click",e=>{e.preventDefault(),this.nextSlide()}),this.addEventListener("keydown",e=>{e.key==="ArrowLeft"?(e.preventDefault(),this.previousSlide()):e.key==="ArrowRight"&&(e.preventDefault(),this.nextSlide())}),this.setAttribute("tabindex","0"),this.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.addEventListener("touchend",this.handleTouchEnd.bind(this),{passive:!0}),this.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.pauseNonActiveSlides(),this.autoplayActiveSlideIfEligible()}goToSlide(index,direction="next"){if(index<0||index>=this.slides.length||index===this.currentIndex||this.isAnimating)return;const currentSlide=this.slides[this.currentIndex],targetSlide=this.slides[index];this.pauseAllMediaExceptInSlide(targetSlide),this.resetSlides(),this.positionSlidesForAnimation(currentSlide,targetSlide,direction),this.updateThumbnails(index),this.currentIndex=index,this.animateSlides(currentSlide,targetSlide,direction),this.isNaturalAspectRatio&&setTimeout(()=>{this.adjustContainerHeight()},50)}
1resetSlides(){this.slides.forEach(slide=>{slide.classList.remove("media-gallery__slide--prev","media-gallery__slide--next")})}positionSlidesForAnimation(currentSlide,targetSlide,direction){this.slides.forEach(slide=>{slide.classList.remove("media-gallery__slide--is-animating")}),direction==="next"?(targetSlide.style.transform="translateX(100%)",this.slides.forEach(slide=>{slide!==currentSlide&&slide!==targetSlide&&(slide.style.transform="translateX(100%)")})):(targetSlide.style.transform="translateX(-100%)",this.slides.forEach(slide=>{slide!==currentSlide&&slide!==targetSlide&&(slide.style.transform="translateX(-100%)")}))}updateThumbnails(activeIndex){this.thumbs[this.currentIndex].classList.remove("media-gallery__thumb--active"),this.thumbs[activeIndex].classList.add("media-gallery__thumb--active")}adjustContainerHeight(disableTransition=!1){if(!this.isNaturalAspectRatio||!this.mainContainer)return;const activeSlide=this.slides[this.currentIndex];if(!activeSlide)return;disableTransition&&this.mainContainer.classList.add("media-gallery__main--no-transition");const img=activeSlide.querySelector("img");if(!img)return;const imgWidth=img.naturalWidth||img.width,imgHeight=img.naturalHeight||img.height;if(imgWidth&&imgHeight){const aspectRatio=imgWidth/imgHeight,calculatedHeight=this.mainContainer.offsetWidth/aspectRatio;this.mainContainer.style.height=calculatedHeight+"px"}else{const originalOpacity=activeSlide.style.opacity,originalTransform=activeSlide.style.transform;activeSlide.style.opacity="1",activeSlide.style.transform="translateX(0)",activeSlide.style.position="relative",activeSlide.style.visibility="hidden";const slideHeight=activeSlide.offsetHeight;activeSlide.style.opacity=originalOpacity,activeSlide.style.transform=originalTransform,activeSlide.style.position="",activeSlide.style.visibility="",this.mainContainer.style.height=slideHeight+"px"}disableTransition&&setTimeout(()=>{this.mainContainer.classList.remove("media-gallery__main--no-transition")},10)}setupResizeObserver(){!this.isNaturalAspectRatio||!window.ResizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.adjustContainerHeight()}
1),this.slides.forEach(slide=>{slide.querySelectorAll("img").forEach(img=>{this.resizeObserver.observe(img),img.addEventListener("load",()=>{slide.classList.contains("media-gallery__slide--active")&&this.adjustContainerHeight()})})}))}animateSlides(currentSlide,targetSlide,direction){this.isAnimating=!0,requestAnimationFrame(()=>{currentSlide.classList.add("media-gallery__slide--is-animating"),targetSlide.classList.add("media-gallery__slide--is-animating"),requestAnimationFrame(()=>{direction==="next"?currentSlide.style.transform="translateX(-100%)":currentSlide.style.transform="translateX(100%)",targetSlide.style.transform="translateX(0)",targetSlide.classList.add("media-gallery__slide--active"),this.waitForTransition(currentSlide).then(()=>{this.positionCurrentSlideAfterAnimation(currentSlide,targetSlide,direction),this.scrollActiveThumbnailIntoView(),this.pauseNonActiveSlides(),this.autoplayActiveSlideIfEligible(),this.isAnimating=!1})})})}positionCurrentSlideAfterAnimation(currentSlide,targetSlide,direction){currentSlide.classList.remove("media-gallery__slide--is-animating","media-gallery__slide--active"),targetSlide.classList.remove("media-gallery__slide--is-animating"),direction==="next"?currentSlide.style.transform="translateX(100%)":currentSlide.style.transform="translateX(-100%)",this.isNaturalAspectRatio&&this.adjustContainerHeight()}scrollActiveThumbnailIntoView(){this.thumbs[this.currentIndex].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}nextSlide(){const nextIndex=(this.currentIndex+1)%this.slides.length;this.goToSlide(nextIndex,"next")}previousSlide(){const prevIndex=this.currentIndex===0?this.slides.length-1:this.currentIndex-1;this.goToSlide(prevIndex,"prev")}waitForTransition(element){return new Promise(resolve=>{const handleTransitionEnd=e=>{e.target===element&&(element.removeEventListener("transitionend",handleTransitionEnd),resolve())};element.addEventListener("transitionend",handleTransitionEnd)})}handleTouchStart(e){if(this.isAnimating)return;const touch=e.touches[0];this.touchStartX=touch.clientX,this.touchStartY=touch.clientY}handleTouchMove(e){if(this.isAnimating)return;const touch=e.touches[0];this.touchEndX=touch.clientX,this.touchEndY=touch.clientY}handleTouchEnd(e){if(this.isAnimating)return;const deltaX=this.touchEndX-this.touchStartX,deltaY=this.touchEndY-this.touchStartY,absDeltaX=Math.abs(deltaX),absDeltaY=Math.abs(deltaY);absDeltaX>absDeltaY&&absDeltaX>this.minSwipeDistance&&(deltaX>0?this.previousSlide():this.nextSlide())}pauseAllMediaExceptInSlide(slide){const allowed=new Set(slide?Array.from(slide.querySelectorAll("video-media, model-media")):[]);this.querySelectorAll("video-media[playing], model-media[playing]").forEach(el=>{allowed.has(el)||el.pause()})}pauseNonActiveSlides(){this.slides.forEach((slide,index)=>{index!==this.currentIndex&&slide.querySelectorAll("video-media[playing], model-media[playing]").forEach(element=>element.pause())})}autoplayActiveSlideIfEligible(){const activeSlide=this.slides[this.currentIndex];if(!activeSlide)return;activeSlide.querySelectorAll("video-media, model-media").forEach(element=>{if(element.hasAttribute("autoplay")&&!element.hasAttribute("playing"))if(element.hasAttribute("loaded"))element.play();else{const observer=new MutationObserver(mutations=>{for(const mutation of mutations)if(mutation.type==="attributes"&&mutation.attributeName==="loaded"&&element.hasAttribute("loaded")){observer.disconnect(),element.play();break}});observer.observe(element,{attributes:!0,attributeFilter:["loaded"]})}})}}customElements.define("media-gallery",MediaGalleryElement)}catch(e){console.error(e)}})()})(); 2//# sourceMappingURL=/cdn/shop/t/67/compiled_assets/snippet-scripts.js.map?v=174782014030362816991764731038
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.