1document.addEventListener("DOMContentLoaded",()=>{window.addEventListener("scroll",handleScroll),handleScroll();function handleScroll(){const stickyAddToCart=document.querySelector(".sticky-bar-form"),formElement=Array.from(document.querySelectorAll("form")).find(form=>form.action.includes("/cart/add"));if(!formElement||!stickyAddToCart)return;const formRect=formElement.getBoundingClientRect(),isMobile=window.innerWidth<=767,isDesktop=window.innerWidth>=768;formRect.top<10?stickyAddToCart.classList.add("active"):stickyAddToCart.classList.remove("active")}}),(function(){const SEL=".sticky-bar-form",MQ=matchMedia("(max-width: 749.98px)");let el=null,mo=null,origRemove=null;const q=s=>document.querySelector(s),forceActive=()=>{if(!el)return;el.classList.add("active");const s=el.style;["top","transform","display","visibility"].forEach(p=>s.removeProperty(p)),s.setProperty("position","fixed","important"),s.setProperty("left","0","important"),s.setProperty("right","0","important"),s.setProperty("bottom","0","important"),s.setProperty("z-index","9998","important"),s.setProperty("opacity","1","important"),s.setProperty("pointer-events","auto","important"),requestAnimationFrame(()=>{const h=el.offsetHeight||72;document.documentElement.style.setProperty("--sticky-bar-h",`${h}px`)})},enableMobile=()=>{el=q(SEL),el&&(el.parentElement!==document.body&&document.body.appendChild(el),origRemove||(origRemove=el.classList.remove.bind(el.classList),el.classList.remove=(...names)=>(names=names.includes("active")?names.filter(n=>n!=="active"):names,names.length?origRemove(...names):void 0)),mo||(mo=new MutationObserver(()=>el.classList.contains("active")?0:el.classList.add("active")),mo.observe(el,{attributes:!0,attributeFilter:["class"]})),forceActive())},disableMobile=()=>{el&&(origRemove&&(el.classList.remove=origRemove,origRemove=null),mo&&(mo.disconnect(),mo=null),document.documentElement.style.removeProperty("--sticky-bar-h"))},onChange=()=>MQ.matches?enableMobile():disableMobile();document.addEventListener("DOMContentLoaded",onChange),MQ.addEventListener?MQ.addEventListener("change",onChange):MQ.addListener(onChange),window.addEventListener("load",()=>MQ.matches?forceActive():0)})(); 2//# sourceMappingURL=/cdn/shop/t/181/assets/sticky-add-to-cart.js.map?v=25335697329519556001783048772
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.