1(function(){if(window.pcardDirectAdd)return;window.pcardDirectAdd=!0;function setLabel(btn,text){btn.textContent=text}document.addEventListener("click",async function(e){var btn=e.target.closest&&e.target.closest(".pcard__add[data-direct-variant]");if(!(!btn||btn.dataset.fallback)&&(e.preventDefault(),e.stopPropagation(),!btn.classList.contains("is-busy"))){var label=btn.textContent;btn.classList.add("is-busy"),btn.setAttribute("aria-busy","true"),setLabel(btn,"ADDING\u2026");try{var cartDrawer=document.querySelector("cart-drawer"),sections="cart-icon-bubble",drawerSection=cartDrawer&&cartDrawer.closest(".shopify-section");drawerSection&&(sections+=","+drawerSection.id.replace("shopify-section-",""));var fd=new FormData;fd.append("id",btn.dataset.directVariant),fd.append("quantity","1"),fd.append("sections_url",window.location.pathname),fd.append("sections",sections);var res=await fetch(theme.routes.cartAdd,{method:"POST",headers:{Accept:"application/javascript","X-Requested-With":"XMLHttpRequest"},body:fd}),data=await res.json();if(!res.ok||data.status)throw new Error(data.description||res.status);btn.classList.remove("is-busy"),btn.classList.add("is-added"),setLabel(btn,"ADDED"),setTimeout(function(){btn.classList.remove("is-added"),setLabel(btn,label)},1600);var bubble=document.getElementById("cart-icon-bubble");bubble&&data.sections&&data.sections["cart-icon-bubble"]&&(bubble.innerHTML=data.sections["cart-icon-bubble"]),cartDrawer&&cartDrawer.renderContents&&cartDrawer.renderContents(data,!1),typeof window.handleFloCartBtn=="function"&&window.handleFloCartBtn();var cart=await(await fetch(theme.routes.cart+".js")).json();btn.dispatchEvent(new CustomEvent("on:cart:add",{bubbles:!0,detail:{cart,variantId:data.variant_id}}))}catch{setLabel(btn,label),btn.dataset.fallback="1",btn.click(),delete btn.dataset.fallback}finally{btn.classList.remove("is-busy"),btn.removeAttribute("aria-busy")}}},!0)})(); 2//# sourceMappingURL=/cdn/shop/t/2/assets/pcard-direct-add.js.map?v=139161701483356637301790578176
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.