1document.addEventListener("alpine:init",()=>{Alpine.data("ProductForm",()=>({formEl:null,init(){this.formEl=this.$root.querySelector("form"),this.formEl.addEventListener("submit",this.submit.bind(this))},async submit(event){event.preventDefault(),this.$root.dispatchEvent(new CustomEvent("baseline:productform:loading",{bubbles:!0})),event.preventDefault(),liveRegion(window.theme.strings.loading);const formData=new FormData(event.target),formId=event.target.getAttribute("id"),options=fetchConfigDefaults("application/javascript");formData.append("sections","cart-items,cart-footer,cart-item-count"),formData.append("sections_url",window.location.pathname),options.body=formData,options.headers["X-Requested-With"]="XMLHttpRequest",delete options.headers["Content-Type"];let response,data;if(response=await fetch(`${theme.routes.cart_add_url}`,options),data=await response.json(),data.status){let errors=data.errors||data.description,message=data.description||data.message;const errorDetail={sourceId:formId,variantId:Number(formData.get("id")),errors,message};this.$root.dispatchEvent(new CustomEvent("baseline:productform:error",{detail:errorDetail,bubbles:!0}));const formEl=this.formEl,productRootEl=formEl.closest("[data-product-root]")||null;document.dispatchEvent(new CustomEvent("theme:product:error:add-to-cart",{detail:{productRootEl,formEl,...errorDetail}}))}else this.$root.dispatchEvent(new CustomEvent("baseline:productform:success",{bubbles:!0})),document.body.dispatchEvent(new CustomEvent("baseline:cart:afteradditem",{bubbles:!0,detail:{response:data,sourceId:formId}}))}}))}); 2//# sourceMappingURL=/cdn/shop/t/95/assets/product-form.js.map?v=153277119960361766151763134145
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.