1defineGlobalOnce("ThemeSection_Cart",()=>({currentItemCount:null,lineItemStatusElement:document.getElementById("shopping-cart-line-item-status"),mounted(){document.body.addEventListener("change",this.onChange.bind(this))},onChange(event){this.updateQuantity(event.detail.line,event.detail.value,event.detail.name)},updateQuantity(line,quantity,id){document.getElementById("main-cart-items").classList.add("opacity-10"),this.lineItemStatusElement.setAttribute("aria-hidden",!1);const body=JSON.stringify({line,quantity,sections:this.getSectionsToRender().map(section=>section.section),sections_url:window.location.pathname});fetch(`${window.theme.routes.cart_change_url}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body}).then(response=>response.text()).then(state=>{const parsedState=JSON.parse(state);document.getElementById("main-cart-footer").classList.toggle("hidden",parsedState.item_count===0),this.getSectionsToRender().forEach(section=>{const elementToReplace=document.getElementById(section.id).querySelector(section.selector)||document.getElementById(section.id);elementToReplace.innerHTML=this.getSectionInnerHTML(parsedState.sections[section.section],section.selector)}),document.getElementById("CartCount").textContent=parsedState.item_count,document.getElementById("main-cart-items").classList.remove("opacity-10"),document.getElementById(id).focus(),this.updateLiveRegions(line,parsedState.item_count)}).catch(()=>{document.getElementById("main-cart-items").classList.remove("opacity-10"),document.getElementById("cart-errors").textContent=window.theme.strings.cartError})},getSectionInnerHTML(html,selector){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML},getSectionsToRender(){return[{id:"main-cart-items",section:document.getElementById("main-cart-items").dataset.id,selector:".js-contents"},{id:"main-cart-footer",section:document.getElementById("main-cart-footer").dataset.id,selector:".js-contents"},{id:"cart-live-region-text",section:"cart-live-region-text",selector:".shopify-section"}]},updateLiveRegions(line,itemCount){this.currentItemCount===itemCount?(document.getElementById(`Line-item-error-${line}`).querySelector(".cart-item-error-text").innerHTML=window.theme.strings.cartQuantityError.replace("[quantity]",document.getElementById(`Quantity-${line}`).value),document.getElementById(`Line-item-error-${line}`).classList.remove("hidden")):document.querySelectorAll(".cart-item-error").forEach(el=>{el.classList.add("hidden")}),this.currentItemCount=itemCount,this.lineItemStatusElement.setAttribute("aria-hidden",!0);const cartStatus=document.getElementById("cart-live-region-text");cartStatus.setAttribute("aria-hidden",!1),setTimeout(()=>{cartStatus.setAttribute("aria-hidden",!0)},1e3)}})); 2//# sourceMappingURL=/cdn/shop/t/3/assets/cart.js.map?v=20139200510192915711762909943
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.