{
  "version": 3,
  "sources": ["/cdn/shop/t/6/assets/product-inventory.js?cb=20260407-7"],
  "sourcesContent": ["import { ThemeEvents, VariantUpdateEvent } from '@theme/events';\nimport { morph } from '@theme/morph';\n\nclass ProductInventory extends HTMLElement {\n  connectedCallback() {\n    const closestSection = this.closest('.shopify-section, dialog');\n    closestSection?.addEventListener(ThemeEvents.variantUpdate, this.updateInventory);\n  }\n\n  disconnectedCallback() {\n    const closestSection = this.closest('.shopify-section, dialog');\n    closestSection?.removeEventListener(ThemeEvents.variantUpdate, this.updateInventory);\n  }\n\n  /**\n   * Updates the inventory.\n   * @param {VariantUpdateEvent} event - The variant update event.\n   */\n  updateInventory = (event) => {\n    if (event.detail.data.newProduct) {\n      this.dataset.productId = event.detail.data.newProduct.id;\n    } else if (event.target instanceof HTMLElement && event.target.dataset.productId !== this.dataset.productId) {\n      return;\n    }\n\n    const newInventory = event.detail.data.html.querySelector('product-inventory');\n\n    if (!newInventory) return;\n\n    morph(this, newInventory, { childrenOnly: true });\n  };\n}\n\nif (!customElements.get('product-inventory')) {\n  customElements.define('product-inventory', ProductInventory);\n}\n"],
  "mappings": "AAAA,OAAS,gBAAuC,gBAChD,OAAS,UAAa,eAEtB,MAAM,yBAAyB,WAAY,CACzC,mBAAoB,CACK,KAAK,QAAQ,0BAA0B,GAC9C,iBAAiB,YAAY,cAAe,KAAK,eAAe,CAClF,CAEA,sBAAuB,CACE,KAAK,QAAQ,0BAA0B,GAC9C,oBAAoB,YAAY,cAAe,KAAK,eAAe,CACrF,CAMA,gBAAmB,OAAU,CAC3B,GAAI,MAAM,OAAO,KAAK,WACpB,KAAK,QAAQ,UAAY,MAAM,OAAO,KAAK,WAAW,WAC7C,MAAM,kBAAkB,aAAe,MAAM,OAAO,QAAQ,YAAc,KAAK,QAAQ,UAChG,OAGF,MAAM,aAAe,MAAM,OAAO,KAAK,KAAK,cAAc,mBAAmB,EAExE,cAEL,MAAM,KAAM,aAAc,CAAE,aAAc,EAAK,CAAC,CAClD,CACF,CAEK,eAAe,IAAI,mBAAmB,GACzC,eAAe,OAAO,oBAAqB,gBAAgB",
  "names": []
}
