1import{ThemeEvents}from"@theme/events";class ProductPrice extends HTMLElement{connectedCallback(){const closestSection=this.closest(".shopify-section, dialog");closestSection&&closestSection.addEventListener(ThemeEvents.variantUpdate,this.updatePrice)}disconnectedCallback(){const closestSection=this.closest(".shopify-section, dialog");closestSection&&closestSection.removeEventListener(ThemeEvents.variantUpdate,this.updatePrice)}updatePrice=event=>{if(event.detail.data.newProduct)this.dataset.productId=event.detail.data.newProduct.id;else if(event.target instanceof HTMLElement&&event.target.dataset.productId!==this.dataset.productId)return;if(window.selected_frame)return;const newPrice=event.detail.data.html.querySelector('product-price [ref="priceContainer"]'),currentPrice=this.querySelector('[ref="priceContainer"]');if(!newPrice||!currentPrice)return;currentPrice.innerHTML!==newPrice.innerHTML&¤tPrice.replaceWith(newPrice);const discountContainer=document.querySelectorAll(".mrk-discount-badge")[0],newDiscountElement=event.detail.data.html.querySelector(".mrk-discount-badge");!newDiscountElement||!discountContainer||discountContainer.innerHTML!==newDiscountElement.innerHTML&&discountContainer.replaceWith(newDiscountElement)}}customElements.get("product-price")||customElements.define("product-price",ProductPrice); 2//# sourceMappingURL=/cdn/shop/t/494/assets/product-price.js.map?v=15101783477582307451787936901
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.