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;const newProductPrice=event.detail.data.html.querySelector(`product-price[data-block-id="${this.dataset.blockId}"]`);if(!newProductPrice)return;const newPrice=newProductPrice.querySelector('[ref="priceContainer"]'),currentPrice=this.querySelector('[ref="priceContainer"]');newPrice&¤tPrice&¤tPrice.replaceWith(newPrice);const currentNote=this.querySelector(".volume-pricing-note"),newNote=newProductPrice.querySelector(".volume-pricing-note");newNote?currentNote?currentNote.replaceWith(newNote):this.querySelector('[ref="priceContainer"]')?.insertAdjacentElement("afterend",newNote.cloneNode(!0)):currentNote?.remove()}}customElements.get("product-price")||customElements.define("product-price",ProductPrice); 2//# sourceMappingURL=/cdn/shop/t/1/assets/product-price.js.map?v=117989390664188536191768991912
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.