1window.ThemeSection_Product=({product,variant,featuredMediaID,template,thumbnailsPosition})=>({productRoot:null,product,current_variant:variant,featured_media_id:featuredMediaID,current_media_id:featuredMediaID,loading:!1,quantity:"1",options:[],optionHandles:[],storeAvailability:null,addedToCart:!1,stickyAddToCartShown:!1,template,thumbnailsPosition,get addToCartText(){if(this.current_variant){if(this.loading)return window.theme.strings.loading;if(!this.loading&&this.current_variant.available)return this.template==="product.preorder"?window.theme.strings.preOrder:window.theme.strings.addToCart;if(!this.loading&&!this.current_variant.available)return window.theme.strings.soldOut}else return window.theme.strings.unavailable},get currentVariantId(){return this.current_variant?this.current_variant.id:null},get currentVariantAvailabilityClosestLocation(){if(!Alpine.store("availability"))return null;const id=this.currentVariantId,storeData=Alpine.store("availability").availability[id];return storeData?storeData.closest_location:null},get currentVariantAvailable(){return this.current_variant?this.current_variant.available:null},get currentVariantTitle(){return this.current_variant&&this.current_variant.title&&!this.current_variant.title.includes("Default")?this.current_variant.title:""},get current_price(){return this.current_variant.price},get isUsingSlideshowToDisplayMedia(){const splideEl=this.productRoot.querySelector(".splide--product");return!!(window.Splide&&this.productRoot&&splideEl&&window.slideshows&&window.slideshows[`${splideEl.id}`]&&!window.slideshows[`${splideEl.id}`].state.is(window.Splide.STATES.DESTROYED))},formatMoney(price){return formatMoney(price,theme.moneyFormat)},init(){this.productRoot=this.$root,this.$refs.productForm&&this.$refs.productForm.addEventListener("submit",this.submitForm.bind(this)),this.getOptions(),this.getAddToCartButtonHeight(),this.$watch("current_media_id",(value,oldValue)=>{this.isUsingSlideshowToDisplayMedia||(this.$root.querySelector(`[data-
1product-single-media-wrapper="${oldValue}"]`)&&this.$root.querySelector(`[data-product-single-media-wrapper="${oldValue}"]`).dispatchEvent(new CustomEvent("mediaHidden")),this.$root.querySelector(`[data-product-single-media-wrapper="${value}"]`)&&this.$root.querySelector(`[data-product-single-media-wrapper="${value}"]`).dispatchEvent(new CustomEvent("mediaVisible")))}),this.updateStoreAvailability(this.current_variant)},getAddToCartButtonHeight(){window.onload=function(){const height=document.querySelector(".add-to-cart-btn").offsetHeight;document.documentElement.style.setProperty("--payment-button-height",`${height}px`)}},updateStoreAvailability(variant2){this.$refs.storeAvailabilityContainer&&(this.storeAvailability=this.storeAvailability||new StoreAvailability(this.$refs.storeAvailabilityContainer),this.storeAvailability&&variant2&&this.storeAvailability.fetchContent(variant2))},optionChange(){this.getOptions();const matchedVariant=ShopifyProduct.getVariantFromOptionArray(this.product,this.options);if(this.current_variant=matchedVariant,document.querySelector(".dynamic-product-block-variant-picker")){document.querySelector(".option1").textContent=this.current_variant.option1,document.querySelector(".option2").textContent=this.current_variant.option2,console.log("this dd check",this.current_variant.featured_media.id);
1var data_index=document.querySelector(`[data-product-single-media-wrapper="${this.current_variant.featured_media.id}"]`).parentNode.parentNode.getAttribute("data-slick-index");$(".cool-slider").slick("slickGoTo",data_index)}if(this.current_variant){variantLiveRegion(this.current_variant),this.updateStoreAvailability(this.current_variant),this.current_variant.featured_media&&(this.current_media_id=this.current_variant.featured_media.id);const url=ShopifyProductForm.getUrlWithVariant(window.location.href,this.current_variant.id);window.history.replaceState({path:url},"",url),this.$refs.singleVariantSelector.dispatchEvent(new Event("change",{bubbles:!0})),this.$root.dispatchEvent(new CustomEvent("shapes:product:variantchange",{bubbles:!0,detail:{variant:this.current_variant}}))}},getOptions(){this.options=[],this.optionHandles=[],this.$root.querySelectorAll("[data-single-option-selector]").forEach(selector=>{if(selector.nodeName==="SELECT"){const value=selector.value;this.options.push(value),this.optionHandles.push(selector.options[selector.selectedIndex].dataset.handle)}else if(selector.checked){const value=selector.value;this.options.push(value),this.optionHandles.push(selector.dataset.handle)}})},changeMedia(direction){if(this.$root.dispatchEvent(new CustomEvent("shapes:product:arrow-change",{bubbles:!0,detail:{direction}})),this.thumbnailsPosition=="under"){const currentThumbnail=this.$root.querySelector(".product-thumbnail-list-item--active"),nextElement=direction=="prev"?currentThumbnail.previousElementSibling:currentThumbnail.nextElementSibling;nextElement!==null&&nextElement.querySelector(".media-thumbnail").click()}},submitForm(evt){evt.preventDefault(),this.loading=!0,liveRegion(window.theme.strings.loading);const formData=new FormData(this.$refs.productForm);let modalCart=theme.settings.cart_type==="modal";const config=fetchConfigDefaults("javascript");modalCart&&(formData.append("sections","cart-items,cart-footer,cart-item-count"),formData.append("sections_url",window.location.pathname)),config.body=formData,config.headers["X-Requested-With"]="XMLHttpRequest",delete config.headers["Content-Type"],fetch(`${theme.routes.cart_add_url}`,config).then(res=>res.json()).then(data=>{if(data.status)throw this.loading=!1,data.description;this.loading=!1,this.addedToCart=!0,modalCart&&document.body.dispatchEvent(new CustomEvent("shapes:modalcart:afteradditem",{bubbles:!0,detail:{response:data}})),document.querySelector('[data-show-on-add="true"]')||this.$refs.added&&this.$nextTick(()=>this.$refs.added.focus())}).catch(error=>{typeof error=="string"?alert(error):error.json().then(a=>{this.loading=!1,alert(a.description)})})},openZoom(index){this.$refs.photoSwipeComponent.dispatchEvent(new CustomEvent("shapes:photoswipe:open",{detail:{index}}))}}),window.productThumbnails=()=>({firstVisible:!0,lastVisible:!1,mounted(){const firstThumbnail=this.$refs.firstThumbnail,lastThumbnail=this.$refs.lastThumbnail,options={root:this.$root.querySelector(".splide__track"),rootMargin:"0px",threshold:1},firstThumbnailObserver=new window.IntersectionObserver(([entry])=>{entry.isIntersecting?this.firstVisible=!0:this.firstVisible=!1},options),lastThumbnailObserver=new window.IntersectionObserver(([entry])=>{entry.isIntersecting?this.lastVisible=!0:this.lastVisible=!1},options);firstThumbnailObserver.observe(firstThumbnail),lastThumbnailObserver.observe(lastThumbnail)}}); 2//# sourceMappingURL=/cdn/shop/t/33/assets/product.js.map?v=164678039206835334451738711021
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.