{
  "version": 3,
  "sources": ["/cdn/shop/t/261/assets/component-cart-items.js?x=1792438751138"],
  "sourcesContent": ["import { Component } from '@theme/component';\nimport {\n  fetchConfig,\n  debounce,\n  onAnimationEnd,\n  prefersReducedMotion,\n  resetShimmer,\n  startViewTransition,\n} from '@theme/utilities';\nimport { morphSection, sectionRenderer } from '@theme/section-renderer';\nimport { ThemeEvents, QuantitySelectorUpdateEvent, CartSectionRestoredEvent } from '@theme/events';\nimport { cartPerformance } from '@theme/performance';\nimport {\n  createViewEventElement,\n  CartErrorEvent,\n  CartDiscountUpdateEvent,\n  CartLinesUpdateEvent,\n  CartNoteUpdateEvent,\n  StandardEvents,\n} from '@shopify/events';\n\n/** @typedef {import('./utilities').TextComponent} TextComponent */\n\n/**\n * A custom element that displays a cart items component.\n *\n * @typedef {object} Refs\n * @property {HTMLElement[]} quantitySelectors - The quantity selector elements.\n * @property {HTMLTableRowElement[]} cartItemRows - The cart item rows.\n * @property {TextComponent} cartTotal - The cart total.\n *\n * @extends {Component<Refs>}\n */\nexport class CartItemsComponent extends createViewEventElement(Component) {\n  /** @type {Set<Promise<void>>} */\n  static #pendingQuantityUpdates = new Set();\n\n  /**\n   * Includes quantity mutations, their section renders, and control cleanup across all cart instances.\n   * @returns {ReadonlyArray<Promise<void>>} A snapshot that cannot modify the shared pending set.\n   */\n  static get pendingQuantityUpdates() {\n    return Array.from(CartItemsComponent.#pendingQuantityUpdates);\n  }\n\n  #debouncedOnChange = debounce(\n    /** @param {Event} event */\n    (event) => {\n      if (event instanceof QuantitySelectorUpdateEvent) this.#onQuantityChange(event);\n    },\n    300\n  );\n  /** @type {Promise<any> | null} */\n  #pendingCartFetch = null;\n\n  /**\n   * True when the event was dispatched from outside this cart-items-component (e.g.\n   * `Shopify.actions.updateCart(...)` from an external app, or the SFAPI default\n   * handler). Internal dispatchers (cart-discount-component, cart-note) live inside\n   * `this` and either morph the section themselves or don't need a refresh \u2014 running\n   * a fallback render in that case double-renders and can clobber form state.\n   * @param {Event} event\n   */\n  #isExternalCartUpdate(event) {\n    return !(event.target instanceof Node) || !this.contains(event.target);\n  }\n\n  /**\n   * Refreshes this section when a cart AJAX response cannot include rendered section HTML.\n   * @param {Object} [options] - Additional section morph options.\n   * @param {boolean} [options.injectStylesheet]\n   */\n  async #refreshCartSection(options = {}) {\n    try {\n      await sectionRenderer.renderSection(this.sectionId, {\n        cache: false,\n        mode: this.isDrawer ? 'hydration' : 'full',\n        ...options,\n      });\n      this.#updateCartQuantitySelectorButtonStates();\n    } catch (error) {\n      if (error?.name === 'AbortError') return;\n\n      this.dispatchEvent(\n        new CartErrorEvent({\n          error: error?.message || 'Failed to refresh cart',\n          code: 'SERVICE_UNAVAILABLE',\n        })\n      );\n    }\n  }\n\n  /** @param {CartDiscountUpdateEvent} event */\n  #handleDiscountUpdate = (event) => {\n    const isExternalCartUpdate = this.#isExternalCartUpdate(event);\n\n    event.promise\n      ?.then(({ detail }) => {\n        if (!isExternalCartUpdate) return;\n\n        const sectionsHtml = detail?.sections?.[this.sectionId];\n        if (sectionsHtml) {\n          sectionRenderer.abortRender(this.sectionId);\n          morphSection(this.sectionId, sectionsHtml, { mode: this.isDrawer ? 'hydration' : 'full' });\n          this.#updateCartQuantitySelectorButtonStates();\n        } else {\n          // External caller (Shopify.actions.updateCart or SFAPI default handler) didn't\n          // attach sections; refetch so the discount UI reflects the post-mutation cart.\n          this.#refreshCartSection();\n        }\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] Event promise rejected:', error);\n      });\n  };\n\n  /** @param {CartNoteUpdateEvent} event */\n  #handleNoteUpdate = (event) => {\n    // Internal cart-note dispatches don't need a section refresh \u2014 the user typed the\n    // value and the textarea retains it. Only external callers need the UI synced.\n    if (!this.#isExternalCartUpdate(event)) return;\n    event.promise\n      ?.then(({ detail }) => {\n        const sections = /** @type {Record<string, string> | undefined} */ (detail?.sections);\n        const sectionsHtml = sections?.[this.sectionId];\n        if (sectionsHtml) {\n          sectionRenderer.abortRender(this.sectionId);\n          morphSection(this.sectionId, sectionsHtml, { mode: this.isDrawer ? 'hydration' : 'full' });\n          this.#updateCartQuantitySelectorButtonStates();\n        } else {\n          this.#refreshCartSection();\n        }\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] Event promise rejected:', error);\n      });\n  };\n\n  connectedCallback() {\n    super.connectedCallback();\n\n    document.addEventListener(StandardEvents.cartLinesUpdate, this.#handleCartUpdate);\n    document.addEventListener(ThemeEvents.quantitySelectorUpdate, this.#debouncedOnChange);\n    document.addEventListener(StandardEvents.cartDiscountUpdate, this.#handleDiscountUpdate);\n    document.addEventListener(StandardEvents.cartNoteUpdate, this.#handleNoteUpdate);\n    window.addEventListener('pageshow', this.#handlePageShow);\n  }\n\n  disconnectedCallback() {\n    super.disconnectedCallback();\n\n    document.removeEventListener(StandardEvents.cartLinesUpdate, this.#handleCartUpdate);\n    document.removeEventListener(ThemeEvents.quantitySelectorUpdate, this.#debouncedOnChange);\n    document.removeEventListener(StandardEvents.cartDiscountUpdate, this.#handleDiscountUpdate);\n    document.removeEventListener(StandardEvents.cartNoteUpdate, this.#handleNoteUpdate);\n    window.removeEventListener('pageshow', this.#handlePageShow);\n  }\n\n  /**\n   * Re-renders the cart section when the page is restored from the back/forward cache.\n   *\n   * A restored page replays a frozen DOM, so the line items still show whatever the cart\n   * held before the shopper navigated away. `cart-icon.js` self-corrects its count bubble\n   * on this same event, which is why the bubble and the cart body disagree until a reload.\n   *\n   * `persisted` alone does not cover Chrome. Chrome refuses the bfcache for any document holding\n   * the Sign in with Shop iframe, `/services/login_with_shop/authorize` inside the shadow root of\n   * `shopify-account > shop-login`, and every product page carries one. A shopper's Back there\n   * rebuilds the document from the HTTP disk cache instead: `persisted` is false and the frozen\n   * cart markup renders anyway. Only the navigation entry separates that from an ordinary page\n   * view, so it is the second channel. Safari and Firefox do restore the same page and arrive\n   * through `persisted`. Measured on os3 across all three browsers, 2026-09-03.\n   *\n   * Both channels are still needed. A restored document keeps its ORIGINAL navigation entry in\n   * Chrome and Safari, reporting `navigate`, so `back_forward` alone would miss every real\n   * restore. And `pageshow` fires after `load` on every ordinary navigation, so dropping both\n   * guards would put a section fetch on every page view.\n   *\n   * @param {PageTransitionEvent} event\n   */\n  #handlePageShow = (event) => {\n    const navigationEntry = globalThis.performance?.getEntriesByType?.('navigation')[0];\n    const navigationType = CartItemsComponent.#isNavigationTiming(navigationEntry) ? navigationEntry.type : undefined;\n    if (!event.persisted && navigationType !== 'back_forward') return;\n    // `section_id` is optional in `snippets/cart-items-component.liquid` and the `sectionId`\n    // getter throws without it. Every other caller reads it inside a promise chain that\n    // already has a catch; this one runs straight off a window listener, so it would escape.\n    if (!this.dataset.sectionId) return;\n\n    // `cache: false` on both paths. A bfcache restore never fires `load`, so the renderer's cache\n    // still holds the pre-navigation copy. A disk-cache Back does fire `load` and seeds the cache\n    // from the stale document it just rebuilt. Either way the cached copy is the same stale HTML\n    // the DOM already shows.\n    sectionRenderer\n      .renderSection(this.sectionId, {\n        cache: false,\n        mode: this.isDrawer ? 'hydration' : 'full',\n        // Empty \u2192 non-empty adds the cart summary markup, which carries its own stylesheet.\n        injectStylesheet: this.isDrawer && this.querySelector('[data-cart-drawer-empty]') !== null,\n      })\n      .then(() => {\n        // Morph swaps the quantity selectors in place, so they never reconnect and their\n        // min/max button states stay bound to the pre-restore quantities. A line restored to its\n        // minimum would otherwise keep minus enabled: a wrong affordance and a wasted cart mutation.\n        this.#updateCartQuantitySelectorButtonStates();\n        // No drawer-open event fires on a restore, so the sticky summary measurement has to\n        // be driven from here. `cart-drawer-component` listens for this.\n        this.dispatchEvent(new CartSectionRestoredEvent());\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] bfcache restore render failed:', error);\n      });\n  };\n\n  /**\n   * Handles QuantitySelectorUpdateEvent change event.\n   * @param {QuantitySelectorUpdateEvent} event - The event.\n   */\n  #onQuantityChange(event) {\n    if (!(event.target instanceof Node) || !this.contains(event.target)) return;\n\n    const { quantity, cartLine: line } = event.detail;\n\n    // Cart items require a line number\n    if (!line) return;\n\n    if (quantity === 0) {\n      return this.onLineItemRemove(line);\n    }\n\n    this.updateQuantity({\n      line,\n      quantity,\n      action: 'change',\n    });\n    const lineItemRow = this.refs.cartItemRows[line - 1];\n\n    if (!lineItemRow) return;\n\n    const textComponent = /** @type {TextComponent | undefined} */ (lineItemRow.querySelector('text-component'));\n    textComponent?.shimmer();\n  }\n\n  /**\n   * Handles the line item removal.\n   * @param {number} line - The line item index.\n   */\n  onLineItemRemove(line) {\n    this.updateQuantity({\n      line,\n      quantity: 0,\n      action: 'clear',\n    });\n\n    const cartItemRowToRemove = this.refs.cartItemRows[line - 1];\n\n    if (!cartItemRowToRemove) return;\n\n    const rowsToRemove = [\n      cartItemRowToRemove,\n      // Get all nested lines of the row to remove\n      ...this.refs.cartItemRows.filter((row) => row.dataset.parentKey === cartItemRowToRemove.dataset.key),\n    ];\n\n    // If the cart item row is the last row, optimistically trigger the cart empty state\n    const isEmptyCart = rowsToRemove.length == this.refs.cartItemRows.length;\n\n    const template = document.getElementById('empty-cart-template');\n    if (isEmptyCart && template instanceof HTMLTemplateElement) {\n      const clone = document.importNode(template.content, true);\n\n      startViewTransition(() => {\n        document.getElementById('cart-drawer-heading')?.remove();\n        this.replaceChildren(clone);\n      }, [this.isDrawer ? 'empty-cart-drawer' : 'empty-cart-page']);\n\n      return;\n    }\n\n    // Add class to the row to trigger the animation\n    rowsToRemove.forEach((row) => {\n      const remove = () => row.remove();\n\n      if (prefersReducedMotion()) return remove();\n\n      row.style.setProperty('--row-height', `${row.clientHeight}px`);\n      row.classList.add('removing');\n\n      // Remove the row after the animation ends\n      onAnimationEnd(row, remove);\n    });\n  }\n\n  /**\n   * Updates the quantity.\n   * @param {Object} config - The config.\n   * @param {number} config.line - The line.\n   * @param {number} config.quantity - The quantity.\n   * @param {string} config.action - The action.\n   */\n  async updateQuantity(config) {\n    const cartPerformaceUpdateMarker = cartPerformance.createStartingMarker(`${config.action}:user-action`);\n    const deferredUpdatePromise = CartLinesUpdateEvent.createPromise();\n    let completeQuantityUpdate = () => {};\n    /** @type {Promise<void>} */\n    const quantityUpdate = new Promise((resolve) => {\n      completeQuantityUpdate = () => resolve();\n    });\n    CartItemsComponent.#pendingQuantityUpdates.add(quantityUpdate);\n\n    try {\n      this.#disableCartItems();\n\n      const { line, quantity } = config;\n      const { cartTotal } = this.refs;\n\n      const cartItemsComponents = document.querySelectorAll('cart-items-component');\n      const sectionsToUpdate = new Set([this.sectionId]);\n      for (const item of cartItemsComponents) {\n        if (item instanceof HTMLElement && item.dataset.sectionId) {\n          sectionsToUpdate.add(item.dataset.sectionId);\n        }\n      }\n\n      for (const sectionId of sectionsToUpdate) {\n        sectionRenderer.abortRender(sectionId);\n      }\n\n      const body = JSON.stringify({\n        ...(this.refs.cartItemRows?.[line - 1]?.dataset.key ? { id: this.refs.cartItemRows[line - 1].dataset.key } : { line }), // Sivana: item key, not line number (AGENTS.md)\n        quantity: quantity,\n        sections: Array.from(sectionsToUpdate).join(','),\n        sections_url: window.location.pathname,\n      });\n\n      cartTotal?.shimmer();\n\n      const lineId = this.refs.cartItemRows[line - 1]?.dataset.key ?? '';\n      this.dispatchEvent(\n        new CartLinesUpdateEvent({\n          action: config.action === 'change' && quantity > 0 ? 'update' : 'remove',\n          context: 'cart',\n          lines: [{ id: lineId, quantity }],\n          promise: deferredUpdatePromise.promise,\n        })\n      );\n\n      const response = await fetch(`${Theme.routes.cart_change_url}`, fetchConfig('json', { body }));\n      const responseText = await response.text();\n      const parsedResponseText = JSON.parse(responseText);\n\n      resetShimmer(this);\n\n      if (parsedResponseText.errors) {\n        this.#handleCartError(line, parsedResponseText);\n        deferredUpdatePromise.reject(new Error(parsedResponseText.errors));\n        return;\n      }\n\n      const sections = /** @type {Record<string, string> | null | undefined} */ (parsedResponseText.sections);\n      const sectionHTML = sections?.[this.sectionId];\n      const parsedItemCount = Number(parsedResponseText.item_count);\n      let newCartItemCount = Number.isFinite(parsedItemCount) ? parsedItemCount : 0;\n\n      // Update data-cart-quantity for all matching variants\n      this.#updateQuantitySelectors(parsedResponseText);\n\n      if (!sectionHTML) {\n        deferredUpdatePromise.resolve({\n          cart: CartLinesUpdateEvent.createCartFromAjaxResponse(parsedResponseText),\n          detail: {\n            sections: sections ?? undefined,\n            items: parsedResponseText.items,\n            itemCount: newCartItemCount,\n            source: 'cart-items-component',\n            didError: false,\n          },\n        });\n\n        await this.#refreshCartSection();\n        return;\n      }\n\n      const newSectionHTML = new DOMParser().parseFromString(sectionHTML, 'text/html');\n\n      // Grab the new cart item count from a hidden element\n      const newCartHiddenItemCount = newSectionHTML.querySelector('[ref=\"cartItemCount\"]')?.textContent;\n      newCartItemCount = newCartHiddenItemCount ? parseInt(newCartHiddenItemCount, 10) : newCartItemCount;\n\n      deferredUpdatePromise.resolve({\n        cart: CartLinesUpdateEvent.createCartFromAjaxResponse(parsedResponseText),\n        detail: {\n          sections: sections ?? undefined,\n          items: parsedResponseText.items,\n          itemCount: newCartItemCount,\n          source: 'cart-items-component',\n          didError: false,\n        },\n      });\n\n      sectionRenderer.abortRender(this.sectionId);\n      await morphSection(this.sectionId, sectionHTML, {\n        mode: this.isDrawer ? 'hydration' : 'full',\n      });\n\n      this.#updateCartQuantitySelectorButtonStates();\n    } catch (error) {\n      console.error(error);\n      deferredUpdatePromise.reject(error);\n\n      this.dispatchEvent(\n        new CartErrorEvent({\n          error: error?.message || 'Failed to update cart',\n          code: 'SERVICE_UNAVAILABLE',\n        })\n      );\n    } finally {\n      try {\n        this.#enableCartItems();\n        cartPerformance.measureFromMarker(cartPerformaceUpdateMarker);\n      } finally {\n        CartItemsComponent.#pendingQuantityUpdates.delete(quantityUpdate);\n        completeQuantityUpdate();\n      }\n    }\n  }\n\n  /**\n   * Handles the cart error.\n   * @param {number} line - The line.\n   * @param {Object} parsedResponseText - The parsed response text.\n   * @param {string} parsedResponseText.errors - The errors.\n   */\n  #handleCartError = (line, parsedResponseText) => {\n    const quantitySelector = this.refs.quantitySelectors[line - 1];\n    const quantityInput = quantitySelector?.querySelector('input');\n\n    if (!quantityInput) throw new Error('Quantity input not found');\n\n    quantityInput.value = quantityInput.defaultValue;\n\n    const cartItemError = this.refs[`cartItemError-${line}`];\n    const cartItemErrorContainer = this.refs[`cartItemErrorContainer-${line}`];\n\n    if (!(cartItemError instanceof HTMLElement)) throw new Error('Cart item error not found');\n    if (!(cartItemErrorContainer instanceof HTMLElement)) throw new Error('Cart item error container not found');\n\n    cartItemError.textContent = parsedResponseText.errors;\n    cartItemErrorContainer.classList.remove('hidden');\n\n    this.dispatchEvent(\n      new CartErrorEvent({\n        error: parsedResponseText.errors || 'Cart update failed',\n        code: 'INVALID',\n      })\n    );\n  };\n\n  /**\n   * Handles the cart update.\n   *\n   * @param {CartLinesUpdateEvent} event\n   */\n  #handleCartUpdate = (event) => {\n    if (event.target === this) return;\n\n    event.promise\n      ?.then(async ({ detail }) => {\n        const sections = detail?.sections;\n        const cartItemsHtml = sections?.[this.sectionId];\n        // Animate empty \u2192 non-empty in the drawer (possible in squeeze mode\n        // where the page is interactive alongside the open drawer). This also\n        // needs the response stylesheet because it adds the cart summary markup.\n        const wasEmptyCartDrawer = this.isDrawer && this.querySelector('[data-cart-drawer-empty]') !== null;\n        /** @type {'hydration' | 'full'} */\n        const mode = this.isDrawer ? 'hydration' : 'full';\n        const morphOptions = {\n          mode,\n          injectStylesheet: wasEmptyCartDrawer,\n        };\n\n        if (cartItemsHtml) {\n          sectionRenderer.abortRender(this.sectionId);\n          const existingKeys = new Set(this.refs.cartItemRows?.map((row) => row.dataset.key) ?? []);\n\n          if (wasEmptyCartDrawer) {\n            startViewTransition(() => {\n              morphSection(this.sectionId, cartItemsHtml, morphOptions);\n            }, ['fill-cart-drawer']);\n          } else {\n            await morphSection(this.sectionId, cartItemsHtml, morphOptions);\n          }\n\n          // Animate newly added rows (reverse of the remove animation).\n          if (!wasEmptyCartDrawer && !prefersReducedMotion()) {\n            for (const row of this.refs.cartItemRows ?? []) {\n              if (!existingKeys.has(row.dataset.key)) {\n                row.classList.add('adding');\n                onAnimationEnd(row, () => row.classList.remove('adding'));\n              }\n            }\n          }\n\n          // Update button states for all cart quantity selectors after morph\n          this.#updateCartQuantitySelectorButtonStates();\n        } else {\n          this.#refreshCartSection(morphOptions);\n        }\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] Event promise rejected:', error);\n      });\n  };\n\n  /**\n   * Disables the cart items.\n   */\n  #disableCartItems() {\n    this.classList.add('cart-items-disabled');\n  }\n\n  /**\n   * Enables the cart items.\n   */\n  #enableCartItems() {\n    this.classList.remove('cart-items-disabled');\n  }\n\n  /**\n   * Updates quantity selectors for all matching variants in the cart.\n   * @param {Object} updatedCart - The updated cart object.\n   * @param {Array<{variant_id: number, quantity: number}>} [updatedCart.items] - The cart items.\n   */\n  #updateQuantitySelectors(updatedCart) {\n    if (!updatedCart.items) return;\n\n    // Discounts such as Buy X Get Y can split one variant across several cart lines.\n    /** @type {Map<string, number>} */\n    const quantitiesByVariant = new Map();\n    for (const item of updatedCart.items) {\n      const variantId = item.variant_id.toString();\n      quantitiesByVariant.set(variantId, (quantitiesByVariant.get(variantId) ?? 0) + item.quantity);\n    }\n\n    for (const [variantId, quantity] of quantitiesByVariant) {\n      const selectors = document.querySelectorAll(`quantity-selector-component[data-variant-id=\"${variantId}\"]`);\n\n      for (const selector of selectors) {\n        const input = selector.querySelector('input[data-cart-quantity]');\n        if (!input) continue;\n\n        input.setAttribute('data-cart-quantity', quantity.toString());\n\n        // Update the quantity selector's internal state\n        if ('updateCartQuantity' in selector && typeof selector.updateCartQuantity === 'function') {\n          selector.updateCartQuantity();\n        }\n      }\n    }\n  }\n\n  /**\n   * Updates button states for all cart quantity selector components.\n   */\n  #updateCartQuantitySelectorButtonStates() {\n    for (const selector of document.querySelectorAll('cart-quantity-selector-component')) {\n      /** @type {any} */ (selector).updateButtonStates?.();\n    }\n  }\n\n  async fetchCartData() {\n    if (this.#pendingCartFetch) return this.#pendingCartFetch;\n\n    this.#pendingCartFetch = (async () => {\n      const response = await fetch(`${Theme.routes.cart_url}.json`, {\n        headers: { Accept: 'application/json' },\n        credentials: 'same-origin',\n      });\n      if (!response.ok) throw new Error(`Failed to fetch cart: ${response.status} ${response.statusText}`);\n      const data = await response.json();\n      return data;\n    })().finally(() => {\n      this.#pendingCartFetch = null;\n    });\n\n    return this.#pendingCartFetch;\n  }\n\n  /**\n   * Gets the section id.\n   * @returns {string} The section id.\n   */\n  get sectionId() {\n    const { sectionId } = this.dataset;\n\n    if (!sectionId) throw new Error('Section id missing');\n\n    return sectionId;\n  }\n\n  /**\n   * @returns {boolean} Whether the component is a drawer.\n   */\n  get isDrawer() {\n    return this.dataset.drawer !== undefined;\n  }\n\n  /**\n   * `getEntriesByType` is typed as the `PerformanceEntry` base, which has no `type`, and the DOM\n   * lib has no per-string overload for `'navigation'`. `entryType` is the spec's discriminant and\n   * lives on the base, so this narrows at runtime instead of asserting the way a cast would.\n   *\n   * @param {PerformanceEntry | undefined} entry\n   * @returns {entry is PerformanceNavigationTiming}\n   */\n  static #isNavigationTiming(entry) {\n    return entry?.entryType === 'navigation';\n  }\n}\n\nif (!customElements.get('cart-items-component')) {\n  customElements.define('cart-items-component', CartItemsComponent);\n}\n"],
  "mappings": "AAAA,OAAS,cAAiB,mBAC1B,OACE,YACA,SACA,eACA,qBACA,aACA,wBACK,mBACP,OAAS,aAAc,oBAAuB,0BAC9C,OAAS,YAAa,4BAA6B,6BAAgC,gBACnF,OAAS,oBAAuB,qBAChC,OACE,uBACA,eAEA,qBAEA,mBACK,kBAcA,aAAM,2BAA2B,uBAAuB,SAAS,CAAE,CAExE,MAAO,wBAA0B,IAAI,IAMrC,WAAW,wBAAyB,CAClC,OAAO,MAAM,KAAK,mBAAmB,uBAAuB,CAC9D,CAEA,mBAAqB,SAElB,OAAU,CACL,iBAAiB,6BAA6B,KAAK,kBAAkB,KAAK,CAChF,EACA,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