1var swiper=new Swiper(".bundle-products",{navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}});let cartSwiper=new Swiper("[js-cart-upsell]",{navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}});const relatedProducts=document.querySelector(".related-products");relatedProducts&&relatedProducts.classList.add("hidden"),setTimeout(()=>{document.querySelector(".product-recommendations-grid")&&(relatedProducts.classList.remove("hidden"),new Swiper(".product-recommendations-grid",{navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},slidesPerView:1,spaceBetween:30,breakpoints:{640:{slidesPerView:1,spaceBetween:16},768:{slidesPerView:2,spaceBetween:24},1024:{slidesPerView:4,spaceBetween:30}}}))},2e3);const bundleButtons=document.querySelectorAll("[js-bundle-add-button]");this.cart=document.querySelector("cart-notification")||document.querySelector("cart-drawer"),bundleButtons.forEach(button=>{button.addEventListener("click",e=>{e.preventDefault(),document.querySelectorAll("[js-bundle-form]").forEach(form=>{if(form.getAttribute("data-variant-id")==button.getAttribute("data-variant-id")){const button2=form.querySelector("form .product-form__buttons button");button2&&button2.click()}})})}),window.theme=window.theme||{},window.theme.getGeoCountry=function(){return new Promise(resolve=>{const cached=localStorage.getItem("geo");if(cached){resolve(cached);return}if(typeof geoip2>"u"){resolve(null);return}geoip2.country(res=>{localStorage.setItem("geo",res.country.iso_code),resolve(res.country.iso_code)},()=>resolve(null))})};function readCartTotalFromDOM(){const parent=document.querySelector(".marquee__parent");return!parent||parent.dataset.cartTotal===void 0?null:Number(parent.dataset.cartTotal)}function refreshMarqueeFromServer(){return fetch("/cart?section_id=marquee",{cache:"no-store"}).then(r=>r.text()).then(html=>{const fresh=new DOMParser().parseFromString(html,"text/html").querySelector(".marquee__parent"),current=document.querySelector(".marquee__parent");fresh&¤t&&(current.dataset.cartTotal=fresh.dataset.cartTotal||"0",current.dataset.cartItemCount=fresh.dataset.cartItemCount||"0")}).catch(()=>{})}window.theme.updateShippingProgress=function(){if(!window.theme.marquee)return;const item=document.querySelector(".marquee__item");if(!item)return;const span=item.querySelector("span");if(!span)return;const showItem=()=>{item.style.display="block"};window.theme.getGeoCountry().then(country=>{const isUS=country==="US",baseMsg=isUS?theme.marquee.usMsg:theme.marquee.internationalMsg,setBase=()=>{const baseThreshold=Number(isUS?theme.marquee.usShippingMin:theme.marquee.intlShippingMin),currencyCode=(document.documentElement.dataset.currency||"").toUpperCase(),block=theme.marquee.blocks&&theme.marquee.blocks[currencyCode];let message;block?(message=block.message,block.show_price&&baseThreshold>0&&window.EXCHANGE&&(message+=" "+window.EXCHANGE.ex(baseThreshold))):theme.marquee.enableGeo&&(message=baseMsg),message&&(span.innerHTML=message),span.classList.add("shipping-progress-active"),showItem()},wrapper=document.querySelector(".min_shipping_msg"),threshold=Number(isUS?theme.marquee.usShippingMin:theme.marquee.intlShippingMin);if(!isUS&&theme.marquee.disableIntlProgress){span.innerHTML=theme.marquee.intlAltMsg||"Fast affordable international shipping!",span.classList.add("shipping-progress-active"),showItem();return}if(!wrapper||!theme.marquee.enableShippingProgress||!threshold){setBase();return}const currentCurrency=(document.documentElement.dataset.currency||"").toUpperCase(),currentBlock=theme.marquee.blocks&&theme.marquee.blocks[currentCurrency];if(currentBlock&¤tBlock.disable_progress){setBase();return}const total=readCartTotalFromDOM();if(total===null||total<=0){setBase();return}if(total>=threshold)span.innerHTML=theme.marquee.unlockedMsg;else{const diff=threshold-total,formatted=window.EXCHANGE?window.EXCHANGE.ex(diff):"$"+(diff/100).toFixed(2);span.innerHTML=theme.marquee.progressMsg.replace("[amount]",formatted)}span.classList.add("shipping-progress-active"),showItem()})},typeof subscribe=="function"&&typeof PUB_SUB_EVENTS<"u"&&subscribe(PUB_SUB_EVENTS.cartUpdate,()=>{refreshMarqueeFromServer().then(()=>window.theme.updateShippingProgress())}),(function(){const origFetch=window.fetch;window.fetch=function(){const result=origFetch.apply(this,arguments),arg0=arguments[0],url=typeof arg0=="string"?arg0:arg0&&arg0.url||"";return url&&/\/cart\/(add|change|update|clear)(\.js)?(\?|$)/.test(url)&&result.then(()=>{refreshMarqueeFromServer().then(()=>window.theme.updateShippingProgress())}).catch(()=>{}),result}})(),(function(){const html=document.documentElement;if(!html)return;let lastCurrency=html.dataset.currency||"";new MutationObserver(()=>{const current=html.dataset.currency||"";current!==lastCurrency&&(lastCurrency=current,window.theme.updateShippingProgress())}).observe(html,{attributes:!0,attributeFilter:["data-currency"]})})(),document.addEventListener("DOMContentLoaded",function(){typeof geoip2<"u"?geoip2.country(onGeoSuccess,onGeoError):window.theme.updateShippingProgress();function onGeoSuccess(res){if(!localStorage.getItem("saved_currency")){var selected_cur="USD";res.continent.code=="EU"&&(selected_cur="EUR"),res.country.iso_code=="AU"&&(selected_cur="AUD"),res.country.iso_code=="BR"&&(selected_cur="BRL"),res.country.iso_code=="CA"&&(selected_cur="CAD"),res.country.iso_code=="CH"&&(selected_cur="CHF"),res.country.iso_code=="DK"&&(selected_cur="DKK"),(res.country.iso_code=="GB"||res.country.iso_code=="UK")&&(selected_cur="GBP"),res.country.iso_code=="HK"&&(selected_cur="HKD"),res.country.iso_code=="NO"&&(selected_cur="NOK"),res.country.iso_code=="NZ"&&(selected_cur="NZD"),res.country.iso_code=="SE"&&(selected_cur="SEK"),res.country.iso_code=="ZA"&&(selected_cur="ZAR"),res.country.iso_code=="JP"&&(selected_cur="YEN"),selected_cur!="USD"&&document.querySelector('.currency-wrapper [data-cur="'+selected_cur+'"]').click()}
1localStorage.setItem("geo",res.country.iso_code),window.theme.updateShippingProgress()}function onGeoError(res){console.log("Geo error",res),window.theme.updateShippingProgress()}}); 2//# sourceMappingURL=/cdn/shop/t/308/assets/customize.js.map?v=45934356679375874651783429071
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.