{
  "version": 3,
  "sources": ["/cdn/shop/t/50/assets/events.js?x=1794338226797"],
  "sourcesContent": ["export class ThemeEvents {\n\n  /** @static @constant {string} Event triggered when a dialog is opening */\n  static dialogOpening = 'dialog:opening';\n  /** @static @constant {string} Event triggered when a dialog is opened */\n  static dialogOpen = 'dialog:open';\n  /** @static @constant {string} Event triggered when a dialog is closing */\n  static dialogClosing = 'dialog:closing';\n  /** @static @constant {string} Event triggered when a dialog is closed */\n  static dialogClose = 'dialog:close';\n\n\n  /** @static @constant {string} Event triggered when a countdown is start */\n  static CountdownStart = 'countdown:start';\n  /** @static @constant {string} Event triggered when a countdown is end */\n  static CountdownEnd = 'countdown:end';\n\n  /** @static @constant {string} Event triggered when a variant is selected */\n  static variantSelected = 'variant:selected';\n  /** @static @constant {string} Event triggered when a variant is changed */\n  static variantUpdate = 'variant:update';\n\n  /** @static @constant {string} Event triggered when the cart items or quantities are updated */\n  static cartUpdate = 'cart:update';\n  /** @static @constant {string} Event triggered when want the cart reload */\n  static cartReload = 'cart:reload';\n  /** @static @constant {string} Event triggered when cart count is changed */\n  static cartCount = 'cart:count:update';\n  /** @static @constant {string} Event triggered when a cart update fails */\n  static cartError = 'cart:error';\n  /** @static @constant {string} Event triggered when a discount is applied */\n  static discountUpdate = 'discount:update';\n  /** @static @constant {string} Event triggered when currency need update */\n  static currencyUpdate = 'currency:update';\n  /** @static @constant {string} Event triggered when cart drawer update */\n  static cartDrawerRender = 'cart:drawer:render';\n  /** @static @constant {string} Event triggered when cart main update */\n  static cartMainRender = 'cart:main:render';\n\n  /** @static @constant {string} Event triggered when changing collection filters */\n  static filterUpdate = 'filter:update';\n  /** @static @constant {string} Event triggered when a media (video, 3d model) is loaded */\n  static mediaStartedPlaying = 'media:started-playing';\n  /** @static @constant {string} Event triggered when a zoom dialog media is selected */\n  static zoomMediaSelected = 'zoom-media:selected';\n  // Event triggered when quantity-selector value is changed\n  static quantitySelectorUpdate = 'quantity-selector:update';\n  /** @static @constant {string} Event triggered when a predictive search is expanded */\n  static megaMenuHover = 'megaMenu:hover';\n\n  /** @static @constant {string} Event triggered when a progress bar is changed */\n  static progressBarChange = 'progress-bar:change';\n}\nexport class CartCountEvent extends Event {\n  /**\n   * Creates a new CartCountEvent\n   * @param {Object} detail - The event detail\n   * @param {number} detail.item_count - The updated item count\n   * @param {number} detail.total_price - The updated total price\n   */\n  constructor(item_count, total_price) {\n    super(ThemeEvents.cartCount, { bubbles: false });\n    this.detail = { item_count, total_price };\n  }\n}\n\n/**\n * Event class for cart updates\n * @extends {Event}\n */\nexport class CartUpdateEvent extends Event {\n  /**\n   * Creates a new CartUpdateEvent\n   * @param {Object} resource - The new cart object\n   * @param {string} sourceId - The id of the element the action was triggered from\n   * @param {Object} [data] - Additional event data\n   * @param {boolean} [data.didError] - Whether the cart operation failed\n   * @param {string} [data.source] - The source of the cart update\n   * @param {string} [data.productId] - The id of the product card that was updated\n   * @param {number} [data.itemCount] - The number of items in the cart\n   * @param {string} [data.variantId] - The id of the product variant that was updated\n   * @param {Record<string, string>} [data.sections] - The sections affected by the cart operation\n   */\n  constructor(resource, sourceId, cartData, actionAfterATC, source, data) {\n    super(ThemeEvents.cartUpdate, { bubbles: true });\n    this.detail = {\n      resource,\n      sourceId,\n      cartData,\n      actionAfterATC,\n      source,\n      data: {\n        ...data,\n      },\n    };\n  }\n}\n\n/**\n * Event class for cart additions\n * @extends {Event}\n */\nexport class CartAddEvent extends Event {\n  /**\n   * Creates a new CartAddEvent\n   * @param {Object} [resource] - The new cart object\n   * @param {string} [sourceId] - The id of the element the action was triggered from\n   * @param {Object} [data] - Additional event data\n   * @param {boolean} [data.didError] - Whether the cart operation failed\n   * @param {string} [data.source] - The source of the cart update\n   * @param {string} [data.productId] - The id of the product card that was updated\n   * @param {number} [data.itemCount] - The number of items in the cart\n   * @param {string} [data.variantId] - The id of the product variant that was added\n   * @param {Record<string, string>} [data.sections] - The sections affected by the cart operation\n   */\n  constructor(resource, sourceId, cartData, actionAfterATC, source, data) {\n    super(CartAddEvent.eventName, { bubbles: true });\n    this.detail = {\n      resource,\n      sourceId,\n      cartData,\n      actionAfterATC,\n      source,\n      data: {\n        ...data,\n      },\n    };\n  }\n\n  static eventName = ThemeEvents.cartUpdate;\n}\n\n/**\n * Event class for quantity-selector updates\n * @extends {Event}\n */\nexport class QuantitySelectorUpdateEvent extends Event {\n  /**\n   * Creates a new QuantitySelectorUpdateEvent\n   * @param {number} quantity - Quantity value\n   * @param {number} [line] - The id of the updated cart line\n   */\n  constructor(quantity, line) {\n    super(ThemeEvents.quantitySelectorUpdate, { bubbles: true });\n    this.detail = {\n      quantity,\n      line,\n    };\n  }\n}\n\n/**\n * Event class for cart errors\n * @extends {Event}\n */\nexport class CartErrorEvent extends Event {\n  /**\n   * Creates a new CartErrorEvent\n   * @param {string} sourceId - The id of the element the action was triggered from\n   * @param {string} message - A message from the server response\n   */\n  constructor(sourceId, message) {\n    super(ThemeEvents.cartError, { bubbles: true });\n    this.detail = {\n      sourceId,\n      data: {\n        message,\n      },\n    };\n  }\n}"],
  "mappings": "AAAO,aAAM,WAAY,CAGvB,OAAO,cAAgB,iBAEvB,OAAO,WAAa,cAEpB,OAAO,cAAgB,iBAEvB,OAAO,YAAc,eAIrB,OAAO,eAAiB,kBAExB,OAAO,aAAe,gBAGtB,OAAO,gBAAkB,mBAEzB,OAAO,cAAgB,iBAGvB,OAAO,WAAa,cAEpB,OAAO,WAAa,cAEpB,OAAO,UAAY,oBAEnB,OAAO,UAAY,aAEnB,OAAO,eAAiB,kBAExB,OAAO,eAAiB,kBAExB,OAAO,iBAAmB,qBAE1B,OAAO,eAAiB,mBAGxB,OAAO,aAAe,gBAEtB,OAAO,oBAAsB,wBAE7B,OAAO,kBAAoB,sBAE3B,OAAO,uBAAyB,2BAEhC,OAAO,cAAgB,iBAGvB,OAAO,kBAAoB,qBAC7B,CACO,aAAM,uBAAuB,KAAM,CAOxC,YAAY,WAAY,YAAa,CACnC,MAAM,YAAY,UAAW,CAAE,QAAS,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