1async function AddToCart(payload,productId){const response=await fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:payload})});if(!response.ok){const errorData=await response.json().catch(()=>({}));throw new Error(errorData.description||"Failed to add to cart")}const cartResponse=await fetch("/cart.js")}function cartUpdate(quantity,productId=""){const cartAddEvent=new CustomEvent("cart:update",{bubbles:!0,detail:{resource:{item_count:quantity},data:{didError:!1,itemCount:quantity,productId}}});document.dispatchEvent(cartAddEvent),setTimeout(()=>{openCartDrawer()},1e3)}function openCartDrawer(){const cartDrawer=document.querySelector("cart-drawer-component");if(cartDrawer&&typeof cartDrawer.open=="function"){cartDrawer.open();return}const cartTrigger=document.querySelector('[data-testid="cart-drawer-trigger"]');cartTrigger&&typeof cartTrigger.click=="function"&&cartTrigger.click()} 2//# sourceMappingURL=/cdn/shop/t/186/assets/add-to-cart.js.map?v=62533423200761253591786089690
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.