1(function(){var drawer=document.querySelector("cart-drawer");if(!drawer)return;var sectionId=drawer.getAttribute("data-section-id"),syncing=!1;new MutationObserver(function(mutations){for(var i=0;i<mutations.length;i++)if(mutations[i].attributeName==="open"&&drawer.hasAttribute("open")){syncDrawer();return}}).observe(drawer,{attributes:!0,attributeFilter:["open"]});function syncDrawer(){if(!syncing){var empty=document.getElementById("CartDrawerEmpty-"+sectionId),body=document.getElementById("CartDrawerBody-"+sectionId);!empty||!body||(syncing=!0,fetch("/cart.js",{headers:{Accept:"application/json"}}).then(function(r){return r.json()}).then(function(cart){var domItems=body.querySelectorAll(".cart-item").length,emptyShown=!empty.classList.contains("hidden"),mismatch=cart.item_count>0&&(domItems===0||emptyShown)||cart.item_count===0&&!emptyShown;if(mismatch){var sections=[];return document.documentElement.dispatchEvent(new CustomEvent("cart:grouped-sections",{bubbles:!0,detail:{sections:sections}})),fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({sections:sections,sections_url:window.location.pathname})}).then(function(r){return r.json()}).then(function(fresh){window.FoxTheme&&FoxTheme.pubsub&&FoxTheme.pubsub.publish(FoxTheme.pubsub.PUB_SUB_EVENTS.cartUpdate,{cart:fresh})})}}).catch(function(){}).finally(function(){syncing=!1}))}}})(); 2//# sourceMappingURL=/cdn/shop/t/48/assets/kik-cart-drawer-sync.js.map?v=39548271573398563871785461378
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.