1window.Eurus.loadedScript.includes("sticky-atc.js")||(window.Eurus.loadedScript.push("sticky-atc.js"),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.data("xStickyATC",(sectionId,is_combined)=>({openDetailOnMobile:!1,currentAvailableOptions:[],options:[],init(){is_combined||(this.variants=xParseJSON(this.$el.getAttribute("x-variants-data"))),document.addEventListener(`eurus:product-page-variant-select:updated:${sectionId}`,e=>{is_combined?this.renderVariant(e.detail.html):(this.currentAvailableOptions=e.detail.currentAvailableOptions,this.options=e.detail.options),this.renderProductPrice(e.detail.html),this.renderMedia(e.detail.html)})},renderProductPrice(html){const source=html.getElementById("price-sticky-"+sectionId);if(!source)return;document.querySelectorAll(`.price-sticky-${sectionId}`).forEach(destination=>{const originalSalePrice=destination.querySelector(".price-sale").textContent,originalComparePrice=destination.querySelector(".cap s").textContent;this.updatePriceElement(source,destination,".price-sale"),this.updatePriceElement(source,destination,".cap s"),this.updatePriceElement(source,destination,".hidden"),this.updatePriceElement(source,destination,".product_card_price"),this.updatePriceElement(source,destination,".cap_custom");const newSalePrice=destination.querySelector(".price-sale").textContent,newComparePrice=destination.querySelector(".cap s").textContent;this.updateSaveAmount(destination,newSalePrice,newComparePrice)})},updatePriceElement(source,destination,selector){const sourceElement=source.querySelector(selector),destElement=destination.querySelector(selector);sourceElement&&destElement&&(destElement.textContent=sourceElement.textContent,["data-price","data-variant","aria-label","class","style"].forEach(attr=>{sourceElement.hasAttribute(attr)&&destElement.setAttribute(attr,sourceElement.getAttribute(attr))}))},updateSaveAmount(destination,salePriceText,comparePriceText){const salePrice=this.extractPrice(salePriceText),saveAmount=this.extractPrice(comparePriceText)-salePrice,saveElements=destination.querySelectorAll("[data-save-amount], .save-amount, .show_save_container");if(saveElements.length>0&&saveAmount>0){const formattedSaveAmount=this.formatCurrency(saveAmount);saveElements.forEach(element=>{element.classList.contains("show_save_container")?element.textContent=`Save ${formattedSaveAmount}`:element.hasAttribute("data-save-amount")?(element.textContent=formattedSaveAmount,element.setAttribute("data-save-amount",saveAmount)):element.textContent=formattedSaveAmount})}},extractPrice(priceText){return parseFloat(priceText.replace(/[^\d.-]/g,""))},formatCurrency(amount){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(amount)},renderMedia(html){const destination=document.getElementById("product-image-sticky-"+sectionId),source=html.getElementById("product-image-sticky-"+sectionId);source&&destination&&(destination.innerHTML=source.innerHTML)},renderVariant(html){const destination=document.getElementById("variant-update-sticky-"+sectionId),source=html.getElementById("variant-update-sticky-"+sectionId);source&&destination&&(destination.innerHTML=source.innerHTML)},changeOptionSticky(event){Array.from(event.target.options).find(option=>option.getAttribute("selected")).removeAttribute("selected"),event.target.selectedOptions[0].setAttribute("selected","selected");const input=event.target.selectedOptions[0],inputId=input.id,targetUrl=input.dataset.productUrl,variantEl=document.getElementById("variant-update-sticky-"+sectionId);document.dispatchEvent(new CustomEvent(`eurus:product-page-variant-select-sticky:updated:${sectionId}`,{detail:{inputId,targetUrl,variantElSticky:variantEl}}))}}))})})); 2//# sourceMappingURL=/cdn/shop/t/68/assets/sticky-atc.js.map?v=134679087546860779271761551419
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.