{
  "version": 3,
  "sources": ["/cdn/shop/t/8/assets/component-cart-quantity-selector.js?ddd=08881"],
  "sourcesContent": ["import { QuantitySelectorComponent } from '@theme/component-quantity-selector';\n\n/**\n * A custom element that allows the user to select a quantity in the cart.\n * Extends QuantitySelectorComponent but uses absolute max limits instead of effective max.\n * Semantics: \"What should the total quantity BE in the cart\" vs \"How many to ADD to cart\"\n *\n * @extends {QuantitySelectorComponent}\n */\nexport class CartQuantitySelectorComponent extends QuantitySelectorComponent {\n  /**\n   * Gets the effective maximum value for cart quantity selector\n   * Cart page: uses absolute max (how much can be in cart total)\n   * @returns {number | null} The effective max, or null if no max\n   */\n  getEffectiveMax() {\n    const { max } = this.getCurrentValues();\n    return max; // Cart uses absolute max, not max minus cart quantity\n  }\n\n  /**\n   * Updates button states based on current value and limits\n   * Cart buttons are always managed client-side, never server-disabled\n   */\n  updateButtonStates() {\n    const { minusButton, plusButton } = this.refs;\n    const { min, value } = this.getCurrentValues();\n    const effectiveMax = this.getEffectiveMax();\n\n    // Cart buttons are always dynamically managed\n    minusButton.disabled = value <= min;\n    plusButton.disabled = effectiveMax !== null && value >= effectiveMax;\n  }\n}\n\nif (!customElements.get('cart-quantity-selector-component')) {\n  customElements.define('cart-quantity-selector-component', CartQuantitySelectorComponent);\n}\n"],
  "mappings": "AAAA,OAAS,8BAAiC,qCASnC,aAAM,sCAAsC,yBAA0B,CAM3E,iBAAkB,CAChB,KAAM,CAAE,GAAI,EAAI,KAAK,iBAAiB,EACtC,OAAO,GACT,CAMA,oBAAqB,CACnB,KAAM,CAAE,YAAa,UAAW,EAAI,KAAK,KACnC,CAAE,IAAK,KAAM,EAAI,KAAK,iBAAiB,EACvC,aAAe,KAAK,gBAAgB,EAG1C,YAAY,SAAW,OAAS,IAChC,WAAW,SAAW,eAAiB,MAAQ,OAAS,YAC1D,CACF,CAEK,eAAe,IAAI,kCAAkC,GACxD,eAAe,OAAO,mCAAoC,6BAA6B",
  "names": []
}
