1(function(){window.CartPage=window.CartPage||new function(){var self=this;self.updateCart=function(){$s.showLoadingOverlay(),$s.getJson({url:routes.root_url+"?sections=cart_content",success:async function(data){var section=document.querySelector(".cart-content");$s.updateDynamicContent(section,data.cart_content);var summaryWrapper=document.querySelector("#cart .summary-column");section.querySelector(".cart-items")?summaryWrapper.style.display="":summaryWrapper.style.display="none",await $s.globalEval(data.cart_content),$s.hideLoadingOverlay()}})},self.updateItemsQuantity=function(items,quantity){var data={updates:{}};items.forEach(function(item){data.updates[item.dataset.key]=quantity}),postUpdate(data)};async function postUpdate(data){$s.showLoadingOverlay(),$s.updateCartItemsQuantity(data).then(async function(cart2){self.updateCart()}).catch($s.addToCartFail)}},window.CartCache&&CartCache.cart_fetch===null&&$s.get({url:"/cart.js"});var cart=document.getElementById("cart"),itemsCount=0;cart.querySelectorAll(".cart-items .quantity-box input[type=number]").forEach(function(item){itemsCount+=item.value/1});var cartCountElement=document.querySelector("header .cart-count");cartCountElement&&(cartCountElement.innerHTML=itemsCount>0?itemsCount:"");var cartCountElementCart=document.querySelector("#cart .cart-count");cartCountElementCart&&(cartCountElementCart.innerHTML=itemsCount>0?` (${itemsCount})`:"0"),cart.querySelectorAll(".remove").forEach(function(item){item.addEventListener("click",function(e){e.preventDefault();var items=$s.getItemsToUpdate?$s.getItemsToUpdate(this.closest(".item"),0):[this.closest(".item")];CartPage.updateItemsQuantity(items,0)})}),cart.querySelectorAll(".cart-items input[type=number]").forEach(function(item){item.addEventListener("change",function(e){var items=$s.getItemsToUpdate?$s.getItemsToUpdate(this.closest(".item"),this.value):[this.closest(".item")];CartPage.updateItemsQuantity(items,this.value)})}),document.querySelectorAll(".cart-accordion-button").forEach(function(item){item.addEventListener("click",()=>{var panel=item.closest(".cart-custom").querySelector(".expandable");return item.getAttribute("aria-expanded")=="false"?(item.setAttribute("aria-expanded","true"),$s.expand([panel])):(item.setAttribute("aria-expanded","false"),$s.collapse([panel])),!1})}),document.querySelectorAll(".cart-popuplink-button").forEach(function(item){item.addEventListener("click",async()=>{if(item.dataset.url){$s.showLoadingOverlay();let content=await $s.get({url:item.dataset.url});$s.hideLoadingOverlay(),$s.openModal(content,"cart-popuplink-modal"),$s.globalEval(content)}})}),$s.validateBundlesInJson&&$s.getJson({url:"/cart.js"}).then(data=>{$s.validateBundlesInJson(data.items)})})(); 2//# sourceMappingURL=/cdn/shop/t/2/assets/cart_content.js.map?v=60776325413508615091761928810
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.