1(function(){const LOCALE_SESSION_KEY="tenaPreferredLocale";function getCurrentLocale(){return typeof Shopify<"u"&&Shopify&&Shopify.locale?String(Shopify.locale).toLowerCase():""}function stripLeadingLocale(pathname,localeCandidates){const cleanPath=pathname||"/",segments=cleanPath.split("/").filter(Boolean);if(!segments.length)return"/";const first=segments[0].toLowerCase();return localeCandidates.includes(first)?(segments.shift(),"/"+segments.join("/")):cleanPath}function buildLocalizedPath(pathnameWithoutLocale,locale){const basePath=pathnameWithoutLocale&&pathnameWithoutLocale!==""?pathnameWithoutLocale:"/";return!locale||locale==="en"?basePath:basePath==="/"?"/"+locale:"/"+locale+basePath}try{const pathname=window.location.pathname||"/",currentLocale=getCurrentLocale();pathname.indexOf("/rewards-canada")!==-1&¤tLocale&&sessionStorage.setItem(LOCALE_SESSION_KEY,currentLocale);const storedLocale=(sessionStorage.getItem(LOCALE_SESSION_KEY)||"").toLowerCase();if(!storedLocale)return;const localeCandidates=Array.from(new Set(["en","fr",currentLocale,storedLocale].filter(Boolean))),pathWithoutLocale=stripLeadingLocale(pathname,localeCandidates);if(!/^\/account(?:\/|$)/.test(pathWithoutLocale))return;const targetPath=buildLocalizedPath(pathWithoutLocale,storedLocale),targetUrl=targetPath+window.location.search+window.location.hash;pathname+window.location.search+window.location.hash!==targetUrl&&(!currentLocale||currentLocale!==storedLocale||pathname!==targetPath)&&window.location.replace(targetUrl)}catch(error){console.warn("Locale session routing guard failed:",error)}})();let _miniCartKeydownHandler=null,_miniCartTriggerEl=null,_quickAddTriggerEl=null;document.addEventListener("openCart",function(){_miniCartTriggerEl||(_miniCartTriggerEl=document.activeElement),refreshMiniCart(),document.documentElement.classList.add("mini-cart-open"),_miniCartTriggerEl||(_miniCartTriggerEl=document.activeElement);const miniCart=document.querySelector(".mini-cart"),miniCartOverlay=document.querySelector(".mini-cart__overlay"),miniCartClose=document.querySelector(".mini-cart__close");miniCart.classList.add("mini-cart--open"),miniCartOverlay.classList.add("mini-cart__overlay--open"),miniCart.setAttribute("aria-hidden","false");const miniCartFocusableSelectors='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';_miniCartKeydownHandler&&document.removeEventListener("keydown",_miniCartKeydownHandler),_miniCartKeydownHandler=function(e){if(e.key==="Escape"){closeMiniCart();return}if(e.key!=="Tab")return;const mc=document.querySelector(".mini-cart");if(!mc)return;const focusableEls=Array.from(mc.querySelectorAll(miniCartFocusableSelectors)).filter(el=>el.offsetParent!==null);if(focusableEls.length===0)return;const firstEl=focusableEls[0],lastEl=focusableEls[focusableEls.length-1];e.shiftKey?document.activeElement===firstEl&&(e.preventDefault(),lastEl.focus()):document.activeElement===lastEl&&(e.preventDefault(),firstEl.focus())},document.addEventListener("keydown",_miniCartKeydownHandler);function refreshMiniCart(){fetch("/?section_id=api-cart-items").then(res=>res.text()).then(html=>{const doc=new DOMParser().parseFromString(html,"text/html"),newSection=doc.querySelector(".mini-cart"),newOverlay=doc.querySelector(".mini-cart__overlay");newSection&&newOverlay&&(document.querySelector(".mini-cart").innerHTML=newSection.innerHTML),attachMiniCartAjaxHandlers(),focusMiniCart()})}function closeMiniCart(){_miniCartKeydownHandler&&(document.removeEventListener("keydown",_miniCartKeydownHandler),_miniCartKeydownHandler=null);const mini_cart_panel=document.querySelector(".mini-cart");mini_cart_panel&&(mini_cart_panel.classList.remove("mini-cart--open"),mini_cart_panel.setAttribute("aria-hidden","true")),document.querySelector(".mini-cart__overlay").classList.remove("mini-cart__overlay--open"),document.documentElement.classList.remove("mini-cart-open"),_miniCartTriggerEl&&typeof _miniCartTriggerEl.focus=="function"&&_miniCartTriggerEl.focus(),_miniCartTriggerEl=null}function focusMiniCart(){const mc=document.querySelector(".mini-cart");if(!mc)return;const focusEl=mc.querySelector(miniCartFocusableSelectors);
1focusEl&&focusEl.focus()}function updateQuantity(lineItemkey,quantity){console.log("updateQuantity",lineItemkey,quantity);const formData=new FormData;formData.append("id",lineItemkey),formData.append("quantity",quantity),fetch("/cart/change.js",{method:"POST",body:formData,headers:{Accept:"application/json"}}).then(()=>{refreshMiniCart()})}function attachMiniCartAjaxHandlers(){const miniCartClose2=document.querySelector(".mini-cart__close");miniCartClose2&&miniCartClose2.addEventListener("click",closeMiniCart),miniCartOverlay.addEventListener("click",closeMiniCart),document.querySelectorAll(".btn-minus, .btn-plus").forEach(function(btn){btn.addEventListener("click",function(e){e.preventDefault(),console.log("btn-quantity",btn);const quantityControlParent=btn.closest(".quantity-control");quantityControlParent&&quantityControlParent.classList.add("loading"),updateQuantity(btn.dataset.lineItemKey,parseInt(btn.dataset.quantity))})}),document.querySelectorAll(".remove button").forEach(function(btn){btn.addEventListener("click",function(e){e.preventDefault(),btn.disabled=!0,updateQuantity(btn.dataset.lineItemKey,0)})}),document.querySelectorAll(".btn--selling-plan").forEach(function(btn){btn.addEventListener("click",function(e){e.preventDefault(),addSellingPlan(btn.dataset.lineItemIndex,btn.dataset.quantity,btn.dataset.sellingPlanId,btn)})}),document.querySelectorAll(".cart-select-selling-plan").forEach(function(select){select.addEventListener("change",function(e){e.preventDefault(),updateSellingPlan(select.dataset.lineItemIndex,select.dataset.quantity,select)})}),document.querySelectorAll(".btn--upsell").forEach(function(btn){btn.addEventListener("click",function(e){e.preventDefault(),btn.disabled=!0,addUpsell(btn.dataset.upsellVariantId,btn)})})}function addUpsell(variantId,btn){btn.disabled=!0,addToCart(variantId,1)}function addToCart(variantId,quantity){fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:variantId,quantity}]})}).then(response=>{if(!response.ok)throw new Error("Network response was not ok");return response.json()}).then(data=>{refreshMiniCart()}).catch(error=>{console.error("There was a problem with the fetch operation:",error)})}function setSellingPlan(lineIndex,quantity,sellingPlanId){fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({line:parseInt(lineIndex,10),selling_plan:parseInt(sellingPlanId,10),quantity:parseInt(quantity,10)})}).then(response=>{if(!response.ok)throw new Error("Network response was not ok");return response.json()}).then(data=>{console.log("setSellingPlan",data),refreshMiniCart()}).catch(error=>{console.error("There was a problem with the fetch operation:",error)})}function updateSellingPlan(lineIndex,quantity,selector){var sellingPlanId=selector.value;selector.disabled=!0,sellingPlanId=="0"?removeSellingPlan(lineIndex,quantity):setSellingPlan(lineIndex,quantity,sellingPlanId)}function removeSellingPlan(lineIndex,quantity){setSellingPlan(lineIndex,quantity,null)}function addSellingPlan(lineIndex,quantity,sellingPlanId,element){element.disabled=!0,setSellingPlan(lineIndex,quantity,sellingPlanId)}attachMiniCartAjaxHandlers(),focusMiniCart()}),document.querySelector(".header__right__icons--search").addEventListener("click",function(e){const modal=document.querySelector("details-modal.header__search details");setTimeout(()=>{if(modal&&modal.hasAttribute("open")){const searchField=document.querySelector(".search__input");if(searchField){searchField.disabled=!0,searchField.disabled=!1;const val=searchField.value;searchField.value="",searchField.value=val,searchField.focus(),searchField.setSelectionRange(val.length,val.length)}}},300)});function quickAdd(handle){_quickAddTriggerEl=document.activeElement,console.log("handle",handle);let quickAddModal=document.getElementById("quick-add-modal");quickAddModal&&quickAddModal.parentNode.removeChild(quickAddModal),fetch(`/products/${handle}?section_id=api-quick-add`).then(response=>{if(!response.ok)throw new Error("Network error");return response.text()}).then(html=>{quickAddModal=document.createElement("div"),quickAddModal.id="quick-add-modal",quickAddModal.style.position="fixed",quickAddModal.style.top="0",quickAddModal.style.left="0",quickAddModal.style.width="100vw",quickAddModal.style.height="100vh",quickAddModal.style.background="rgba(0,0,0,0.5)",quickAddModal.style.display="flex",quickAddModal.style.alignItems="center",quickAddModal.style.justifyContent="center",quickAddModal.style.zIndex="99999";const modalContent=document.createElement("div");modalContent.style.background="#fff",modalContent.style.borderRadius="8px",modalContent.style.maxWidth="90vw",modalContent.style.maxHeight="90vh",modalContent.style.overflow="auto",modalContent.style.position="relative",modalContent.innerHTML=html;const closeBtn=document.createElement("button");closeBtn.innerHTML="×",closeBtn.setAttribute("aria-label","Close"),closeBtn.style.position="absolute",closeBtn.style.top="8px",closeBtn.style.right="12px",closeBtn.style.fontSize="2rem",closeBtn.style.background="transparent",closeBtn.style.border="none",closeBtn.style.cursor="pointer",closeBtn.addEventListener("click",()=>{closeQuickAddModal()}),closeBtn.classList.add("quick-add__close"),modalContent.appendChild(closeBtn),quickAddModal.appendChild(modalContent);function closeQuickAddModal(){quickAddModal.parentNode&&quickAddModal.parentNode.removeChild(quickAddModal),_quickAddTriggerEl&&typeof _quickAddTriggerEl.focus=="function"&&_quickAddTriggerEl.focus(),_quickAddTriggerEl=null}quickAddModal.addEventListener("click",e=>{e.target===quickAddModal&&closeQuickAddModal()}),quickAddModal.setAttribute("tabindex","-1"),document.body.appendChild(quickAddModal),quickAddModal.focus(),initQuickAdd(quickAddModal);const focusableSelectors='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not
1([tabindex="-1"])';setTimeout(()=>{const focusEl=quickAddModal.querySelector(focusableSelectors);focusEl&&focusEl.focus()},100);function handleModalKeydown(e){if(e.key==="Escape"){closeQuickAddModal();return}if(e.key!=="Tab")return;const focusableEls=Array.from(quickAddModal.querySelectorAll(focusableSelectors)).filter(el=>el.offsetParent!==null);if(focusableEls.length===0)return;const firstEl=focusableEls[0],lastEl=focusableEls[focusableEls.length-1];e.shiftKey?document.activeElement===firstEl&&(e.preventDefault(),lastEl.focus()):document.activeElement===lastEl&&(e.preventDefault(),firstEl.focus())}document.addEventListener("keydown",handleModalKeydown);const focusTrapObserver=new MutationObserver(()=>{document.contains(quickAddModal)||(document.removeEventListener("keydown",handleModalKeydown),focusTrapObserver.disconnect())});focusTrapObserver.observe(document.body,{childList:!0,subtree:!0})}).catch(e=>{console.log(e),console.log("Sorry, failed to load the product. Please try again.")})}function initQuickAdd(quickAddModal){function updateOptionVisibility(productId){const optionGroup=document.getElementById("product-options-"+productId),variantSelector=document.getElementById("variant-selector-"+productId);if(!optionGroup||!variantSelector)return;console.log("variantSelector",variantSelector),variantSelector.addEventListener("change",e=>{const selectedVar=variantSelector.querySelector('[value="'+variantSelector.value+'"]'),priceEl=quickAddModal.querySelector(".quick-add__price"),priceCompareEl=quickAddModal.querySelector(".quick-add__price-compare");priceEl.innerHTML=formatMoney(selectedVar.dataset.price),parseInt(selectedVar.dataset.price)<parseInt(selectedVar.dataset.comparePrice)?priceCompareEl.innerHTML=formatMoney(selectedVar.dataset.comparePrice):priceCompareEl.innerHTML="",console.log("selectedVar",selectedVar.dataset.price,selectedVar.dataset.comparePrice)});const fieldsets=Array.from(optionGroup.querySelectorAll("fieldset.quick-add__option"));if(fieldsets.length===0)return;const variantOptions=Array.from(variantSelector.querySelectorAll("option[data-variant-title]")),numFields=fieldsets.length;let firstFieldset=fieldsets[0],firstRadios=Array.from(firstFieldset.querySelectorAll(".product-card-option")),checkedFirstRadio=firstRadios.find(r=>r.checked);if(!checkedFirstRadio||checkedFirstRadio.disabled||checkedFirstRadio.closest("div")&&checkedFirstRadio.closest("div").style.display==="none"){const visible=firstRadios.find(r=>{const div=r.closest("div");return!r.disabled&&div&&div.style.display!=="none"});visible&&(visible.checked=!0,checkedFirstRadio=visible)}fieldsets.forEach((fs,idx)=>{const groupRadios=Array.from(fs.querySelectorAll(".product-card-option"));if(idx===0)groupRadios.forEach(radio=>{let found=variantOptions.some(opt=>(opt.getAttribute("data-variant-title")||"").split(" / ")[0]===radio.value&&!opt.disabled);const div=radio.closest("div");found?(radio.disabled=!1,div&&(div.style.display="")):(radio.disabled=!0,div&&(div.style.display="none"))});else{let soFar=fieldsets.slice(0,idx).map(prevFs=>{const checked=prevFs.querySelector(".product-card-option:checked");if(checked&&!checked.disabled&&checked.closest("div")&&checked.closest("div").style.display!=="none")return checked.value;{const fb=Array.from(prevFs.querySelectorAll(".product-card-option")).find(r=>{const div=r.closest("div");return!r.disabled&&div&&div.style.display!=="none"});return fb?fb.value:null}});groupRadios.forEach(radio=>{let candidateValues=soFar.concat([radio.value]),found=variantOptions.some(opt=>{const optionTitle=opt.getAttribute("data-variant-title")||"";let split=[],remainder=optionTitle;for(let i=0;i<numFields-1;++i){let slashIdx=remainder.indexOf(" / ");if(slashIdx===-1){split.push(remainder),remainder="";break}split.push(remainder.substring(0,slashIdx)),remainder=remainder.substring(slashIdx+3)}return remainder.length>0&&split.push(remainder),candidateValues.every((val,i)=>split[i]===val)&&!opt.disabled});const div=radio.closest("div");found?(radio.disabled=!1,div&&(div.style.display="")):(radio.disabled=!0,div&&(div.style.display="none"))})}}
1),fieldsets.forEach(fs=>{const groupRadios=Array.from(fs.querySelectorAll(".product-card-option"));let checked=groupRadios.find(r=>r.checked);if(!checked||checked.disabled||checked.closest("div")&&checked.closest("div").style.display==="none"){const visible=groupRadios.find(r=>{const div=r.closest("div");return!r.disabled&&div&&div.style.display!=="none"});visible&&(visible.checked=!0)}});const variantName=fieldsets.map(fs=>{const checked=fs.querySelector(".product-card-option:checked");if(checked&&!checked.disabled&&checked.closest("div")&&checked.closest("div").style.display!=="none")return checked.value;{const fallback=Array.from(fs.querySelectorAll(".product-card-option")).find(r=>{const div=r.closest("div");return!r.disabled&&div&&div.style.display!=="none"});return fallback?fallback.value:""}}).join(" / "),selectedOption=variantSelector.querySelector('[data-variant-title="'+variantName+'"]');selectedOption&&(variantSelector.value=selectedOption.value,variantSelector.dispatchEvent(new Event("change",{bubbles:!0})))}function setupOptionLabels(){quickAddModal.querySelectorAll("fieldset.quick-add__option .product-card-option").forEach(radio=>{const div=radio.closest("div"),label=radio.id?quickAddModal.querySelector('label[for="'+radio.id+'"]'):null;if(!label)return;div&&div.style.display==="none"?label.removeAttribute("tabindex"):(label.setAttribute("tabindex","0"),label.__quickAddKeydownBound||(label.__quickAddKeydownBound=!0,label.addEventListener("keydown",function(e){(e.key===" "||e.key==="Enter")&&(e.preventDefault(),radio.click())})))})}quickAddModal.querySelectorAll(".product-card-option").forEach(option=>{option.addEventListener("change",function(){const productId=option.dataset.productId;updateOptionVisibility(productId),setupOptionLabels()})}),quickAddModal.querySelectorAll('[id^="product-options-"]').forEach(optionGroup=>{const productId=optionGroup.id.replace("product-options-","");updateOptionVisibility(productId)}),setupOptionLabels();const quickAddForm=quickAddModal.querySelector('form[data-type="add-to-cart-form"]');quickAddForm&&!quickAddForm.__quickAddBound&&(quickAddForm.__quickAddBound=!0,quickAddForm.addEventListener("submit",async event=>{event.preventDefault();const formData=new FormData(quickAddForm),bundleMappingsEl=quickAddModal.querySelector("#bundle-variant-mappings"),bundleMappings=bundleMappingsEl?JSON.parse(bundleMappingsEl.textContent):{},selectedVariantId=formData.get("id");bundleMappings[selectedVariantId]&&(formData.set("id",String(bundleMappings[selectedVariantId])),formData.delete("selling_plan"));const submitBtn=quickAddForm.querySelector('button[type="submit"], input[type="submit"]');submitBtn&&(submitBtn.disabled=!0);try{if(!(await fetch("/cart/add.js",{method:"POST",headers:{Accept:"application/json"},body:formData})).ok)throw new Error("Failed to add to cart");quickAddModal.parentNode&&quickAddModal.parentNode.removeChild(quickAddModal),_miniCartTriggerEl=_quickAddTriggerEl,_quickAddTriggerEl=null;const cartIcon=document.querySelector('#cart-icon-bubble, [aria-controls="mini-cart-drawer"]');cartIcon?cartIcon.click():document.dispatchEvent(new Event("openCart"))}catch{console.log("Failed to add to cart. Please try again.")}finally{submitBtn&&(submitBtn.disabled=!1)}}))}function updateDeliveryText(){const subscriptionOffer=document.querySelector("og-offer"),rechargeWidget=document.querySelector("recharge-subscription-widget"),sellingPlanInput=document.querySelector('product-form form [name="selling_plan"]');let delivery="One-time purchase";if(!!(sellingPlanInput&&sellingPlanInput.value)||!!(subscriptionOffer&&subscriptionOffer.subscribed)){let interval="";if(rechargeWidget&&rechargeWidget.shadowRoot&&sellingPlanInput){const sellingPlans=rechargeWidget.shadowRoot.querySelector("rc-selling-plans"),sellingPlansRoot=sellingPlans&&sellingPlans.shadowRoot,selectedPlan=sellingPlansRoot&&Array.from(sellingPlansRoot.querySelectorAll('input[name="rc_plan"]')).find(plan=>plan.value===sellingPlanInput.value),intervalLabel=selectedPlan&&selectedPlan.parentElement.querySelector(".rc-plans-button__interval");intervalLabel&&(interval=intervalLabel.textContent.trim())}if(!interval&&subscriptionOffer){const subscriptionSelector=document.querySelector("og-select-frequency");subscriptionSelector&&subscriptionSelector.productFrequencies&&subscriptionSelector.productFrequencies.frequencies&&subscriptionSelector.productFrequencies.frequencies.forEac
1h((frequency,index)=>{frequency===subscriptionOffer.frequency&&(interval=subscriptionSelector.productFrequencies.frequenciesText[index])})}delivery=interval?"Delivered every "+interval:"Subscription"}const deliveryTexts=document.querySelectorAll(".product__floating-form__delivery-text");deliveryTexts.length>0&&deliveryTexts.forEach(deliveryText=>{deliveryText.innerHTML=delivery})}function setupProductPageVariantLabels(){document.querySelectorAll("variant-selects").forEach(function(variantSelects){function updateLabels(){variantSelects.querySelectorAll('input[type="radio"]').forEach(function(radio){const label=radio.id?variantSelects.querySelector('label[for="'+radio.id+'"]'):null;if(radio.setAttribute("tabindex","-1"),!label)return;label.style.display==="none"?label.removeAttribute("tabindex"):(label.setAttribute("tabindex","0"),label.__variantKeydownBound||(label.__variantKeydownBound=!0,label.addEventListener("keydown",function(e){(e.key===" "||e.key==="Enter")&&(e.preventDefault(),radio.click())})))})}updateLabels(),variantSelects.addEventListener("change",function(){setTimeout(updateLabels,50)})})}document.addEventListener("DOMContentLoaded",function(){const floatingFormBtn=document.querySelector(".floating-form__submit");floatingFormBtn&&floatingFormBtn.addEventListener("click",function(e){e.preventDefault(),document.querySelector(".product-form__submit, .additional-cta").click()});const floatingForm=document.querySelector(".product__floating-form");floatingForm&&setTimeout(()=>{updateDeliveryText(),floatingForm.classList.add("active");const scheduleDeliveryTextUpdate=()=>{window.requestAnimationFrame(updateDeliveryText)},productForm=document.querySelector("product-form form");productForm&&new MutationObserver(scheduleDeliveryTextUpdate).observe(productForm,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["value"]});const rechargeWidget=document.querySelector("recharge-subscription-widget"),rechargeRoot=rechargeWidget&&rechargeWidget.shadowRoot,sellingPlans=rechargeRoot&&rechargeRoot.querySelector("rc-selling-plans"),sellingPlansRoot=sellingPlans&&sellingPlans.shadowRoot;rechargeRoot&&rechargeRoot.addEventListener("change",scheduleDeliveryTextUpdate),sellingPlansRoot&&sellingPlansRoot.addEventListener("change",scheduleDeliveryTextUpdate)},2e3),initPageFlyBundleMapping(),setupProductPageVariantLabels()});function initPageFlyBundleMapping(){const mappingsEl=document.getElementById("page-bundle-variant-mappings"),availabilityEl=document.getElementById("page-bundle-availability-overrides");if(!mappingsEl&&!availabilityEl)return;const bundleMappings=mappingsEl?JSON.parse(mappingsEl.textContent):{},availabilityOverrides=availabilityEl?JSON.parse(availabilityEl.textContent):{},bundleVariantValues=new Set(Object.values(bundleMappings).map(String));function getAtcButton(form){return form.querySelector('button[name="add"], [type="submit"]')}function getDisplayVariantId(idInput){return idInput.dataset.pfDisplayVariantId||idInput.value}function setAvailableState(atcBtn,availableText){atcBtn.disabled=!1,atcBtn.textContent=availableText}document.querySelectorAll("form.pf-product-form").forEach(function(form){const idInput=form.querySelector('input[name="id"]');if(!idInput)return;const atcBtn=getAtcButton(form),soldOutText=atcBtn&&atcBtn.dataset.soldout||"";function resolveAvailableText(){if(atcBtn){const addText=atcBtn.dataset.add;if(addText)return addText;const current=atcBtn.textContent.trim();if(current&¤t!==soldOutText)return current}const other=document.querySelector('form.pf-product-form button[name="add"]');if(other&&other!==atcBtn){const t=other.textContent.trim();if(t&&t!==soldOutText)return t;if(other.dataset.add)return other.dataset.add}return"Add To Cart"}function ensureBundleSwap(){const displayVariantId=getDisplayVariantId(idInput),bundleVariantId=bundleMappings[displayVariantId];bundleVariantId&&(idInput.dataset.pfDisplayVariantId=displayVariantId,idInput.value=String(bundleVariantId))}function updateButtonState(){if(!atcBtn)return;const displayVariantId=getDisplayVariantId(idInput);bundleMappings[displayVariantId]&&(availabilityOverrides[displayVariantId]!==!1?setAvailableState(atcBtn,resolveAvailableText()):(atcBtn.disabled=!0,atcBtn.textContent=soldOutText||"Sold out"))}if(updateButtonState(),atcBtn&&atcBtn.addEventListener("click",function(){ensureBundleSwap()},!0),new MutationObserver(function(){const newValue=idInput.value;bundleMappings[newValue]?(idInput.dataset.pfDisplayVariantId=newValue,
1setTimeout(updateButtonState,50)):bundleVariantValues.has(newValue)||(idInput.dataset.pfDisplayVariantId="")}).observe(idInput,{attributes:!0,attributeFilter:["value"]}),atcBtn){let reEnabling=!1;new MutationObserver(function(){reEnabling||!atcBtn.disabled||setTimeout(function(){if(!atcBtn.disabled)return;const currentText=atcBtn.textContent.trim(),addingText=atcBtn.dataset.adding||"",addedText=atcBtn.dataset.added||"";if(currentText===addingText||currentText===addedText)return;const displayVariantId=getDisplayVariantId(idInput);displayVariantId&&bundleMappings[displayVariantId]&&availabilityOverrides[displayVariantId]!==!1&&(reEnabling=!0,setAvailableState(atcBtn,resolveAvailableText()),reEnabling=!1)},0)}).observe(atcBtn,{attributes:!0,attributeFilter:["disabled"]})}form.addEventListener("change",function(e){e.target&&(e.target.tagName==="SELECT"||e.target.type==="radio")&&(idInput.dataset.pfDisplayVariantId="",setTimeout(updateButtonState,50))})})} 2//# sourceMappingURL=/cdn/shop/t/109/assets/mini-cart-overrides.js.map?v=140300333023606386931787008145
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.