{
  "version": 3,
  "sources": ["/cdn/shop/t/88/assets/predictive-search.js?omc=20261003-1"],
  "sourcesContent": ["import { Component } from '@theme/component';\nimport { debounce, onAnimationEnd, prefersReducedMotion } from '@theme/utilities';\nimport { sectionRenderer } from '@theme/section-renderer';\nimport { morph } from '@theme/morph';\nimport { RecentlyViewed } from '@theme/recently-viewed-products';\nimport { DialogCloseEvent, DialogOpenEvent, DialogComponent } from '@theme/dialog';\nimport { SearchUpdateEvent } from '@shopify/events';\n\n/**\n * A custom element that allows the user to search for resources available on the store.\n *\n * @typedef {object} Refs\n * @property {HTMLInputElement} searchInput - The search input element.\n * @property {HTMLElement} predictiveSearchResults - The predictive search results container.\n * @property {HTMLElement} resetButton - The reset button element.\n * @property {HTMLElement[]} [resultsItems] - The search results items elements.\n * @property {HTMLElement} [recentlyViewedWrapper] - The recently viewed products wrapper.\n * @property {HTMLElement[]} [recentlyViewedTitle] - The recently viewed title elements.\n * @property {HTMLElement[]} [recentlyViewedItems] - The recently viewed product items.\n * @extends {Component<Refs>}\n */\nclass PredictiveSearchComponent extends Component {\n  requiredRefs = ['searchInput', 'predictiveSearchResults', 'resetButton'];\n\n  #controller = new AbortController();\n\n  /**\n   * @type {AbortController | null}\n   */\n  #activeFetch = null;\n\n  #emptyStateLoaded = false;\n\n  /**\n   * Get the dialog component.\n   * @returns {DialogComponent | null} The dialog component.\n   */\n  get dialog() {\n    return this.closest('dialog-component');\n  }\n\n  connectedCallback() {\n    super.connectedCallback();\n\n    const { dialog } = this;\n    const { signal } = this.#controller;\n\n    if (this.refs.searchInput.value.length > 0) {\n      this.#showResetButton();\n    }\n\n    /* \u0628\u062D\u062B \u0627\u0644\u0647\u064A\u062F\u0631 \u064A\u0639\u0631\u0636 \u0627\u0644\u0643\u0648\u0644\u064A\u0643\u0634\u0646\u0627\u062A \u0641\u0642\u0637 \u0648\u0644\u0627 \u064A\u0630\u0647\u0628 \u0644\u0635\u0641\u062D\u0629 \u0646\u062A\u0627\u0626\u062C \u0639\u0627\u0645\u0629. */\n    const searchForm = this.querySelector('form');\n    searchForm?.addEventListener(\n      'submit',\n      (event) => {\n        event.preventDefault();\n        const selected = this.#currentItem?.querySelector('a');\n        const firstCollection = this.refs.predictiveSearchResults.querySelector(\n          '.predictive-search-results__card--collection a, [data-resource-type=\"collection\"] a'\n        );\n        const target = selected || firstCollection;\n        if (target instanceof HTMLAnchorElement) target.click();\n      },\n      { signal }\n    );\n\n    if (dialog) {\n      document.addEventListener('keydown', this.#handleKeyboardShortcut, { signal });\n      dialog.addEventListener(DialogCloseEvent.eventName, this.#handleDialogClose, { signal });\n      dialog.addEventListener(DialogOpenEvent.eventName, this.#handleDialogOpen, { signal, once: true });\n\n      this.addEventListener('click', this.#handleModalClick, { signal });\n    }\n\n    if (RecentlyViewed.getProducts().length > 0) {\n      requestIdleCallback(() => {\n        this.#loadEmptyState();\n      });\n    }\n  }\n\n  /**\n   * Handles clicks within the predictive search modal to maintain focus on the input\n   * @param {MouseEvent} event - The mouse event\n   */\n  #handleModalClick = (event) => {\n    const target = /** @type {HTMLElement} */ (event.target);\n    const isInteractiveElement =\n      target instanceof HTMLButtonElement ||\n      target instanceof HTMLAnchorElement ||\n      target instanceof HTMLInputElement ||\n      target.closest('button') ||\n      target.closest('a') ||\n      target.closest('input');\n\n    if (!isInteractiveElement && this.refs.searchInput) {\n      this.refs.searchInput.focus();\n    }\n  };\n\n  disconnectedCallback() {\n    super.disconnectedCallback();\n    this.#controller.abort();\n  }\n\n  /**\n   * Handles the CMD+K key combination.\n   * @param {KeyboardEvent} event - The keyboard event.\n   */\n  #handleKeyboardShortcut = (event) => {\n    if (event.metaKey && event.key === 'k') {\n      this.dialog?.toggleDialog();\n    }\n  };\n\n  /**\n   * Handles the dialog close event.\n   */\n  #handleDialogClose = () => {\n    this.#resetSearch();\n  };\n\n  #handleDialogOpen = () => {\n    if (!this.#emptyStateLoaded && RecentlyViewed.getProducts().length > 0) {\n      this.#loadEmptyState();\n    }\n  };\n\n  #loadEmptyState() {\n    if (this.#emptyStateLoaded) return;\n    this.#emptyStateLoaded = true;\n    this.resetSearch(false);\n  }\n\n  get #allResultsItems() {\n    const containers = Array.from(\n      this.querySelectorAll(\n        '.predictive-search-results__wrapper-queries, ' +\n          '.predictive-search-results__wrapper-products, ' +\n          '.predictive-search-results__list'\n      )\n    );\n\n    const allItems = containers\n      .flatMap((container) => {\n        if (container.classList.contains('predictive-search-results__wrapper-products')) {\n          return Array.from(container.querySelectorAll('.predictive-search-results__card'));\n        }\n        return Array.from(container.querySelectorAll('[ref=\"resultsItems[]\"], .predictive-search-results__card'));\n      })\n      .filter((item) => item instanceof HTMLElement);\n\n    return /** @type {HTMLElement[]} */ (allItems);\n  }\n\n  /**\n   * Track whether the last interaction was keyboard-based\n   * @type {boolean}\n   */\n  #isKeyboardNavigation = false;\n\n  get #currentIndex() {\n    return this.#allResultsItems?.findIndex((item) => item.getAttribute('aria-selected') === 'true') ?? -1;\n  }\n\n  set #currentIndex(index) {\n    if (!this.#allResultsItems?.length) return;\n\n    let activeItem = null;\n\n    this.#allResultsItems.forEach((item) => {\n      item.classList.remove('keyboard-focus');\n    });\n\n    for (const [itemIndex, item] of this.#allResultsItems.entries()) {\n      if (itemIndex === index) {\n        item.setAttribute('aria-selected', 'true');\n        if (this.#isKeyboardNavigation) {\n          item.classList.add('keyboard-focus');\n        }\n        activeItem = item;\n      } else {\n        item.removeAttribute('aria-selected');\n      }\n    }\n\n    activeItem?.scrollIntoView({ behavior: prefersReducedMotion() ? 'instant' : 'smooth', block: 'nearest' });\n    this.refs.searchInput.focus();\n  }\n\n  get #currentItem() {\n    return this.#allResultsItems?.[this.#currentIndex];\n  }\n\n  /**\n   * Navigate through the predictive search results using arrow keys or close them with the Escape key.\n   * @param {KeyboardEvent} event - The keyboard event.\n   */\n  onSearchKeyDown = (event) => {\n    if (event.key === 'Escape') {\n      this.#resetSearch();\n      return;\n    }\n\n    if (!this.#allResultsItems?.length || event.key === 'ArrowLeft' || event.key === 'ArrowRight') {\n      return;\n    }\n\n    const currentIndex = this.#currentIndex;\n    const totalItems = this.#allResultsItems.length;\n\n    switch (event.key) {\n      case 'ArrowDown':\n        this.#isKeyboardNavigation = true;\n        event.preventDefault();\n        this.#currentIndex = currentIndex < totalItems - 1 ? currentIndex + 1 : 0;\n        break;\n\n      case 'Tab':\n        if (event.shiftKey) {\n          this.#isKeyboardNavigation = true;\n          event.preventDefault();\n          this.#currentIndex = currentIndex > 0 ? currentIndex - 1 : totalItems - 1;\n        } else {\n          this.#isKeyboardNavigation = true;\n          event.preventDefault();\n          this.#currentIndex = currentIndex < totalItems - 1 ? currentIndex + 1 : 0;\n        }\n        break;\n\n      case 'ArrowUp':\n        this.#isKeyboardNavigation = true;\n        event.preventDefault();\n        this.#currentIndex = currentIndex > 0 ? currentIndex - 1 : totalItems - 1;\n        break;\n\n      case 'Enter': {\n        const singleResultContainer = this.refs.predictiveSearchResults.querySelector('[data-single-result-url]');\n        if (singleResultContainer instanceof HTMLElement && singleResultContainer.dataset.singleResultUrl) {\n          event.preventDefault();\n          window.location.href = singleResultContainer.dataset.singleResultUrl;\n          return;\n        }\n\n        if (this.#currentIndex >= 0) {\n          event.preventDefault();\n          this.#currentItem?.querySelector('a')?.click();\n        } else {\n          /* \u0644\u0627 \u0646\u0641\u062A\u062D \u0635\u0641\u062D\u0629 \u0628\u062D\u062B \u0639\u0627\u0645\u0629\u061B Enter \u064A\u0641\u062A\u062D \u0623\u0648\u0644 \u0643\u0648\u0644\u064A\u0643\u0634\u0646 \u0638\u0627\u0647\u0631 \u0641\u0642\u0637. */\n          event.preventDefault();\n          const firstCollection = this.refs.predictiveSearchResults.querySelector(\n            '.predictive-search-results__card--collection a, [data-resource-type=\"collection\"] a'\n          );\n          if (firstCollection instanceof HTMLAnchorElement) firstCollection.click();\n        }\n        break;\n      }\n    }\n  };\n\n  /**\n   * Clears the recently viewed products.\n   * @param {Event} event - The event.\n   */\n  clearRecentlyViewedProducts(event) {\n    event.stopPropagation();\n\n    RecentlyViewed.clearProducts();\n\n    const { recentlyViewedItems, recentlyViewedTitle, recentlyViewedWrapper } = this.refs;\n\n    const allRecentlyViewedElements = [...(recentlyViewedItems || []), ...(recentlyViewedTitle || [])];\n\n    if (allRecentlyViewedElements.length === 0) {\n      return;\n    }\n\n    if (recentlyViewedWrapper) {\n      recentlyViewedWrapper.classList.add('removing');\n\n      onAnimationEnd(recentlyViewedWrapper, () => {\n        recentlyViewedWrapper.remove();\n      });\n    }\n  }\n\n  /**\n   * Reset the search state.\n   * @param {boolean} [keepFocus=true] - Whether to keep focus on input after reset\n   */\n  resetSearch = debounce((keepFocus = true) => {\n    if (keepFocus) {\n      this.refs.searchInput.focus();\n    }\n    this.#resetSearch();\n  }, 100);\n\n  /**\n   * Debounce the search handler to fetch and display search results based on the input value.\n   * Reset the current selection index and close results if the search term is empty.\n   */\n  search = debounce((event) => {\n    // If the input is not a text input (like using the Escape key), don't search\n    if (!event.inputType) return;\n\n    const searchTerm = this.refs.searchInput.value.trim();\n    this.#currentIndex = -1;\n\n    if (!searchTerm.length) {\n      this.#resetSearch();\n      return;\n    }\n\n    this.#showResetButton();\n    this.#getSearchResults(searchTerm);\n  }, 200);\n\n  /**\n   * Resets scroll positions for search results containers\n   */\n  #resetScrollPositions() {\n    requestAnimationFrame(() => {\n      this.refs.predictiveSearchResults.querySelector('.predictive-search-results__inner')?.scrollTo(0, 0);\n      this.querySelector('.predictive-search-form__content')?.scrollTo(0, 0);\n    });\n  }\n\n  /**\n   * Fetch search results using the section renderer and update the results container.\n   * @param {string} searchTerm - The term to search for\n   */\n  async #getSearchResults(searchTerm) {\n    if (!this.dataset.sectionId) return;\n\n    const url = new URL(Theme.routes.predictive_search_url, location.origin);\n    url.searchParams.set('q', searchTerm);\n    url.searchParams.set('resources[type]', 'collection');\n    url.searchParams.set('resources[limit_scope]', 'each');\n\n    const { predictiveSearchResults } = this.refs;\n\n    const abortController = this.#createAbortController();\n\n    const deferredPromise = SearchUpdateEvent.createPromise();\n\n    this.dispatchEvent(\n      new SearchUpdateEvent({\n        search: {\n          query: searchTerm,\n        },\n        promise: deferredPromise.promise,\n      })\n    );\n\n    sectionRenderer\n      .getSectionHTML(this.dataset.sectionId, false, url)\n      .then((resultsMarkup) => {\n        if (!resultsMarkup) {\n          deferredPromise.resolve({ totalCount: 0 });\n          return;\n        }\n\n        if (abortController.signal.aborted) {\n          deferredPromise.reject(new Error('Fetch aborted by user'));\n          return;\n        }\n\n        morph(predictiveSearchResults, resultsMarkup);\n\n        this.#resetScrollPositions();\n\n        // Count all result items (products, collections, pages, articles, queries)\n        const resultCount = predictiveSearchResults.querySelectorAll('[ref=\"resultsItems[]\"]').length;\n        deferredPromise.resolve({ totalCount: resultCount });\n      })\n      .catch((error) => {\n        deferredPromise.reject(error);\n        if (abortController.signal.aborted) return;\n        throw error;\n      });\n  }\n\n  /**\n   * Fetch the markup for the recently viewed products.\n   * @returns {Promise<string | null>} The markup for the recently viewed products.\n   */\n  async #getRecentlyViewedProductsMarkup() {\n    if (!this.dataset.sectionId) return null;\n\n    const viewedProducts = RecentlyViewed.getProducts();\n    if (viewedProducts.length === 0) return null;\n\n    const url = new URL(Theme.routes.search_url, location.origin);\n    url.searchParams.set('q', viewedProducts.map(/** @param {string} id */ (id) => `id:${id}`).join(' OR '));\n    url.searchParams.set('resources[type]', 'product');\n\n    return sectionRenderer.getSectionHTML(this.dataset.sectionId, false, url);\n  }\n\n  #hideResetButton() {\n    const { resetButton } = this.refs;\n\n    resetButton.hidden = true;\n  }\n\n  #showResetButton() {\n    const { resetButton } = this.refs;\n\n    resetButton.hidden = false;\n  }\n\n  #createAbortController() {\n    const abortController = new AbortController();\n    if (this.#activeFetch) {\n      this.#activeFetch.abort();\n    }\n    this.#activeFetch = abortController;\n    return abortController;\n  }\n\n  #resetSearch = async () => {\n    const { predictiveSearchResults, searchInput } = this.refs;\n    const emptySectionId = 'predictive-search-empty';\n\n    this.#currentIndex = -1;\n    searchInput.value = '';\n    this.#hideResetButton();\n\n    const abortController = this.#createAbortController();\n    const url = new URL(window.location.href);\n    url.searchParams.delete('page');\n\n    const emptySectionMarkup = await sectionRenderer.getSectionHTML(emptySectionId, false, url);\n    const parsedEmptySectionMarkup = new DOMParser()\n      .parseFromString(emptySectionMarkup, 'text/html')\n      .querySelector('.predictive-search-empty-section');\n\n    if (!parsedEmptySectionMarkup) throw new Error('No empty section markup found');\n\n    /** This needs to be awaited and not .then so the DOM is already morphed\n     * when #closeResults is called and therefore the height is animated */\n    const viewedProducts = RecentlyViewed.getProducts();\n\n    if (viewedProducts.length > 0) {\n      const recentlyViewedMarkup = await this.#getRecentlyViewedProductsMarkup();\n      if (!recentlyViewedMarkup) return;\n\n      const parsedRecentlyViewedMarkup = new DOMParser().parseFromString(recentlyViewedMarkup, 'text/html');\n      const recentlyViewedProductsHtml = parsedRecentlyViewedMarkup.getElementById('predictive-search-products');\n      if (!recentlyViewedProductsHtml) return;\n\n      for (const child of recentlyViewedProductsHtml.children) {\n        if (child instanceof HTMLElement) {\n          child.setAttribute('ref', 'recentlyViewedWrapper');\n        }\n      }\n\n      const collectionElement = parsedEmptySectionMarkup.querySelector('#predictive-search-products');\n      if (!collectionElement) return;\n      collectionElement.prepend(...recentlyViewedProductsHtml.children);\n    }\n\n    if (abortController.signal.aborted) return;\n\n    morph(predictiveSearchResults, parsedEmptySectionMarkup);\n    this.#resetScrollPositions();\n  };\n}\n\nif (!customElements.get('predictive-search-component')) {\n  customElements.define('predictive-search-component', PredictiveSearchComponent);\n}\n"],
  "mappings": "AAAA,OAAS,cAAiB,mBAC1B,OAAS,SAAU,eAAgB,yBAA4B,mBAC/D,OAAS,oBAAuB,0BAChC,OAAS,UAAa,eACtB,OAAS,mBAAsB,kCAC/B,OAAS,iBAAkB,oBAAwC,gBACnE,OAAS,sBAAyB,kBAelC,MAAM,kCAAkC,SAAU,CAChD,aAAe,CAAC,cAAe,0BAA2B,aAAa,EAEvE,YAAc,IAAI,gBAKlB,aAAe,KAEf,kBAAoB,GAM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