{
  "version": 3,
  "sources": ["/cdn/shop/t/4/assets/forcast-product-carousel.js?cb=1794977740"],
  "sourcesContent": ["/**\n * Arrows for the homepage product carousel\n * (sections/forcast-product-carousel.liquid, T-0415).\n *\n * The row is the theme's slideshow track (a native scroll-snap scroller), but\n * its arrows are not the slideshow's: those page by every card in view with\n * the browser's own smooth scroll, which is quick and not ours to slow down.\n * Here each click glides the row on by `data-cards-per-click` cards (two),\n * eased over --carousel-page-duration, from wherever the row currently sits.\n * It stops at the first and last card and never wraps back to the start.\n *\n * Snapping is switched off for the length of the glide (a mandatory snap would\n * catch every frame) and put back once it lands on a card. A swipe, drag or\n * wheel on the row cancels a glide in flight and hands the row back to the\n * user. Reduced motion jumps straight to the cards instead of gliding.\n */\n(() => {\n  if (customElements.get('forcast-carousel-arrows')) return;\n\n  const DEFAULT_DURATION = 1200;\n  const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n  /** @param {number} t */\n  const easeInOutCubic = (t) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2);\n\n  /** @param {string} value - a CSS time, e.g. \"1.2s\" or \"900ms\" */\n  const toMilliseconds = (value) => {\n    const time = value.trim();\n    const number = parseFloat(time);\n    if (Number.isNaN(number)) return DEFAULT_DURATION;\n    return time.endsWith('ms') ? number : number * 1000;\n  };\n\n  class ForcastCarouselArrows extends HTMLElement {\n    /** @type {HTMLElement | null} */\n    scroller = null;\n    /** @type {HTMLButtonElement[]} */\n    buttons = [];\n    /** @type {number | null} where the glide in flight will land */\n    target = null;\n    frame = 0;\n    queued = 0;\n    /** @type {string | null} the scroller's inline scroll-snap-type before a glide */\n    savedSnap = null;\n    /** @type {ResizeObserver | null} */\n    resizeObserver = null;\n\n    connectedCallback() {\n      this.scroller = this.closest('slideshow-container')?.querySelector('slideshow-slides') ?? null;\n      if (!this.scroller) return;\n\n      this.buttons = Array.from(this.querySelectorAll('button[data-forcast-carousel-step]'));\n\n      this.addEventListener('click', this.handleClick);\n      this.scroller.addEventListener('scroll', this.queueUpdate, { passive: true });\n      for (const type of ['pointerdown', 'touchstart']) {\n        this.scroller.addEventListener(type, this.stop, { passive: true });\n      }\n      this.scroller.addEventListener('wheel', this.handleWheel, { passive: true });\n\n      this.resizeObserver = new ResizeObserver(this.queueUpdate);\n      this.resizeObserver.observe(this.scroller);\n\n      this.update();\n    }\n\n    disconnectedCallback() {\n      this.stop();\n      cancelAnimationFrame(this.queued);\n      this.queued = 0;\n      this.removeEventListener('click', this.handleClick);\n      this.resizeObserver?.disconnect();\n\n      if (!this.scroller) return;\n      this.scroller.removeEventListener('scroll', this.queueUpdate);\n      for (const type of ['pointerdown', 'touchstart']) {\n        this.scroller.removeEventListener(type, this.stop);\n      }\n      this.scroller.removeEventListener('wheel', this.handleWheel);\n    }\n\n    get cardsPerClick() {\n      return Math.max(1, parseInt(this.dataset.cardsPerClick ?? '', 10) || 2);\n    }\n\n    get maxScroll() {\n      const { scroller } = this;\n      return scroller ? Math.max(0, scroller.scrollWidth - scroller.clientWidth) : 0;\n    }\n\n    /**\n     * Where the row sits with each card snapped to its start edge, clamped to\n     * what the row can actually scroll (the last few cards share the end).\n     * Read from the cards themselves, so the gap, the inset and the card width\n     * at this screen size are all already in it.\n     */\n    get stops() {\n      const { scroller } = this;\n      if (!scroller) return [];\n\n      const inset = parseFloat(getComputedStyle(scroller).scrollPaddingInlineStart) || 0;\n      const max = this.maxScroll;\n      const cards = /** @type {HTMLElement[]} */ (Array.from(scroller.children)).filter(\n        (card) => !card.hidden && card.offsetWidth > 0\n      );\n\n      return cards.map((card) => Math.min(max, Math.max(0, card.offsetLeft - inset)));\n    }\n\n    /** @param {MouseEvent} event */\n    handleClick = (event) => {\n      const button = /** @type {Element} */ (event.target).closest('button[data-forcast-carousel-step]');\n      if (!(button instanceof HTMLButtonElement) || button.disabled) return;\n\n      event.preventDefault();\n      this.page(Math.sign(Number(button.dataset.forcastCarouselStep)) || 1);\n    };\n\n    /** @param {number} direction - 1 for next, -1 for previous */\n    page(direction) {\n      const { scroller } = this;\n      if (!scroller) return;\n\n      const stops = this.stops;\n      if (!stops.length) return;\n\n      // Count from where a glide in flight is heading, so quick clicks add up.\n      const from = this.target ?? scroller.scrollLeft;\n      let closest = 0;\n      stops.forEach((stop, index) => {\n        if (Math.abs(stop - from) < Math.abs(stops[closest] - from)) closest = index;\n      });\n\n      const index = Math.min(stops.length - 1, Math.max(0, closest + direction * this.cardsPerClick));\n      const to = stops[index];\n      if (Math.abs(to - scroller.scrollLeft) < 1) return;\n\n      this.glide(to);\n    }\n\n    /** @param {number} to */\n    glide(to) {\n      const { scroller } = this;\n      if (!scroller) return;\n\n      cancelAnimationFrame(this.frame);\n      this.target = to;\n\n      if (this.savedSnap === null) {\n        this.savedSnap = scroller.style.scrollSnapType;\n        scroller.style.scrollSnapType = 'none';\n      }\n\n      if (reducedMotion.matches) {\n        scroller.scrollTo({ left: to, behavior: 'instant' });\n        this.finish();\n        return;\n      }\n\n      const start = scroller.scrollLeft;\n      const duration = toMilliseconds(getComputedStyle(this).getPropertyValue('--carousel-page-duration'));\n      const startTime = performance.now();\n\n      /** @param {number} now */\n      const step = (now) => {\n        const progress = Math.min(1, (now - startTime) / duration);\n        scroller.scrollTo({ left: start + (to - start) * easeInOutCubic(progress), behavior: 'instant' });\n\n        if (progress < 1) {\n          this.frame = requestAnimationFrame(step);\n        } else {\n          this.finish();\n        }\n      };\n\n      this.frame = requestAnimationFrame(step);\n    }\n\n    /** Lands the glide: snapping back on, arrows updated. */\n    finish() {\n      this.frame = 0;\n      this.target = null;\n\n      if (this.scroller && this.savedSnap !== null) {\n        this.scroller.style.scrollSnapType = this.savedSnap;\n      }\n      this.savedSnap = null;\n\n      this.update();\n    }\n\n    /** Cancels a glide in flight (the user has taken hold of the row). */\n    stop = () => {\n      if (!this.frame) return;\n      cancelAnimationFrame(this.frame);\n      this.finish();\n    };\n\n    /**\n     * A sideways wheel or trackpad swipe takes the row; scrolling the page\n     * past it with the pointer over the cards does not.\n     * @param {WheelEvent} event\n     */\n    handleWheel = (event) => {\n      if (Math.abs(event.deltaX) > Math.abs(event.deltaY)) this.stop();\n    };\n\n    queueUpdate = () => {\n      if (this.queued) return;\n      this.queued = requestAnimationFrame(() => {\n        this.queued = 0;\n        this.update();\n      });\n    };\n\n    /** Hides the back arrow at the start and the next arrow at the end. */\n    update() {\n      const { scroller } = this;\n      if (!scroller) return;\n\n      const position = scroller.scrollLeft;\n      const max = this.maxScroll;\n\n      for (const button of this.buttons) {\n        const step = Number(button.dataset.forcastCarouselStep);\n        button.disabled = step < 0 ? position <= 1 : position >= max - 1;\n      }\n    }\n  }\n\n  customElements.define('forcast-carousel-arrows', ForcastCarouselArrows);\n})();\n\n/**\n * The homepage product carousel in the collection page's Athos order.\n *\n * The section (sections/forcast-product-carousel.liquid) renders its cards in\n * Shopify's collection sort, and that order is not the PLP's: the PLP is drawn\n * by Athos, whose campaign for the collection pins the merchandiser's picks to\n * the top. When Athos is on, the section carries data-athos-* attributes and\n * this asks Athos for the same thing the PLP asks for (snap/src/index.js):\n *\n *   - `combined_listing_role = CHILD`, so each colourway is a card and the\n *     empty combined-listing parent is never one;\n *   - `collection_handle = <handle>`, which decides membership;\n *   - `collection_name = <title>`, which is what fires the collection's\n *     campaign. The handle alone fires none, and the pins are lost;\n *   - no sort. Any `sort.*` parameter makes Athos drop the campaign's pins.\n *\n * Athos returns the pins already in positions 1, 2, 3\u2026, and those products go\n * into the slides in that order. The slides themselves stay put (the\n * slideshow and the arrows hold on to them); only what is in each one changes,\n * and slides Athos has no product for are hidden.\n *\n * The Liquid cards are the fallback: a failed, slow or empty request leaves\n * them as they are. Until then the row is a skeleton. The section's inline\n * script stamps it data-athos-pending before the cards parse, and\n * assets/homepage.css draws the cards as grey boxes under that stamp. This\n * lifts the stamp once Athos has answered, either way. The inline script also\n * lifts it after six seconds, and an answer that lands after that is\n * dropped: by then the shopper is looking at the Liquid cards, and swapping\n * them for other products under their eyes is the flash the skeleton exists\n * to avoid.\n *\n * Each card is built the way the section builds it: one link round the 2:3\n * image and the title. The second image, for the desktop hover, is not in the\n * Athos result. It comes from the same product read the PLP card makes\n * (/products/{handle}?view=athos-feed, snap/src/lib/productSizes.js), asked\n * for once the row is near the screen, and only where the hover can happen.\n */\n(() => {\n  const PENDING = 'athosPending';\n  const TIMEOUT = 4000;\n  const IMAGE_WIDTHS = [300, 450, 600, 900, 1200];\n  const IMAGE_WIDTH = 600;\n  // The test assets/homepage.css shows the hover image on.\n  const canHover = window.matchMedia('screen and (min-width: 1025px) and (pointer: fine)');\n\n  /**\n   * The feed's files are on cdn.shopify.com; the theme's own images reach the\n   * same files on the storefront's origin, over the connection the page\n   * already has open (snap/src/lib/images.js, sameOrigin).\n   */\n  const FEED_HOST = /^(?:https?:)?\\/\\/cdn\\.shopify\\.com\\/s\\/files\\/1\\/\\d+\\/\\d+\\/\\d+\\//;\n\n  /** @param {string} src @param {number} width */\n  const sized = (src, width) => {\n    const base = src\n      .replace(FEED_HOST, `${location.origin}/cdn/shop/`)\n      .replace(/([?&])width=\\d+&?/, '$1')\n      .replace(/[?&]$/, '');\n    return `${base}${base.includes('?') ? '&' : '?'}width=${width}`;\n  };\n\n  /** @param {string} src */\n  const srcset = (src) => IMAGE_WIDTHS.map((width) => `${sized(src, width)} ${width}w`).join(', ');\n\n  /**\n   * The feed's links name one size variant; the section links to the product.\n   * @param {string} url\n   */\n  const productUrl = (url) => {\n    const link = new URL(url, location.origin);\n    link.searchParams.delete('variant');\n    return link.pathname + link.search + link.hash;\n  };\n\n  /** @param {string} url */\n  const handleOf = (url) => new URL(url, location.origin).pathname.match(/\\/products\\/([^/]+)/)?.[1] ?? null;\n\n  /**\n   * @param {string} src\n   * @param {string} sizes\n   * @param {string} alt\n   * @param {string} [className]\n   */\n  const image = (src, sizes, alt, className) => {\n    const img = document.createElement('img');\n    img.src = sized(src, IMAGE_WIDTH);\n    img.srcset = srcset(src);\n    img.sizes = sizes;\n    img.loading = 'lazy';\n    img.alt = alt;\n    if (className) img.className = className;\n    return img;\n  };\n\n  /**\n   * @param {{ name: string, url: string, imageUrl?: string }} result\n   * @param {string} sizes\n   */\n  const card = (result, sizes) => {\n    const item = document.createElement('div');\n    item.className = 'resource-list__item';\n\n    const link = document.createElement('a');\n    link.className = 'forcast-product-carousel__card';\n    link.href = productUrl(result.url);\n\n    const media = document.createElement('div');\n    media.className = 'forcast-product-carousel__media';\n    if (result.imageUrl) media.append(image(result.imageUrl, sizes, result.name));\n\n    const details = document.createElement('div');\n    details.className = 'forcast-product-carousel__details';\n    const title = document.createElement('p');\n    title.className = 'forcast-product-carousel__title';\n    title.textContent = result.name;\n    details.append(title);\n\n    link.append(media, details);\n    item.append(link);\n    return item;\n  };\n\n  /**\n   * @param {HTMLElement} section\n   * @param {number} count\n   * @returns {Promise<Array<{ name: string, url: string, imageUrl?: string }>>}\n   */\n  const fetchOrder = async (section, count) => {\n    const { athosSiteId: siteId, athosCollectionHandle: handle, athosCollectionName: name } = section.dataset;\n    const params = new URLSearchParams({\n      siteId: siteId ?? '',\n      resultsFormat: 'native',\n      resultsPerPage: String(count),\n      page: '1',\n      'bgfilter.combined_listing_role': 'CHILD',\n      'bgfilter.collection_handle': handle ?? '',\n    });\n    if (name) params.set('bgfilter.collection_name', name);\n\n    const controller = new AbortController();\n    const timer = setTimeout(() => controller.abort(), TIMEOUT);\n    try {\n      const response = await fetch(`https://${siteId}.a.athoscommerce.net/v1/search?${params}`, {\n        signal: controller.signal,\n      });\n      if (!response.ok) throw new Error(`Athos ${response.status}`);\n      const data = await response.json();\n      const results = Array.isArray(data?.results) ? data.results : [];\n      return results.filter((result) => result?.name && result?.url && handleOf(result.url));\n    } finally {\n      clearTimeout(timer);\n    }\n  };\n\n  /**\n   * The desktop hover's second image, once the row is near the screen.\n   * @param {HTMLElement} section\n   * @param {string} sizes\n   */\n  const addHoverImages = (section, sizes) => {\n    if (!canHover.matches) return;\n\n    const observer = new IntersectionObserver(\n      (entries) => {\n        if (!entries.some((entry) => entry.isIntersecting)) return;\n        observer.disconnect();\n\n        const root = window.Shopify?.routes?.root || '/';\n        for (const link of section.querySelectorAll('a.forcast-product-carousel__card')) {\n          const handle = handleOf(link.getAttribute('href') ?? '');\n          const media = link.querySelector('.forcast-product-carousel__media');\n          if (!handle || !media) continue;\n\n          fetch(`${root}products/${handle}?view=athos-feed`)\n            .then((response) => (response.ok ? response.json() : null))\n            .then((product) => {\n              const second = product?.images?.[1];\n              if (typeof second !== 'string' || !media.isConnected) return;\n              media.append(image(second, sizes, '', 'forcast-product-carousel__image--hover'));\n            })\n            .catch(() => {});\n        }\n      },\n      { rootMargin: '300px 0px' }\n    );\n    observer.observe(section);\n  };\n\n  /** @param {HTMLElement} section */\n  const isPending = (section) => section.dataset[PENDING] !== undefined;\n\n  /** @param {HTMLElement} section */\n  const order = async (section) => {\n    const slides = /** @type {HTMLElement[]} */ (Array.from(section.querySelectorAll('slideshow-slide')));\n    // Not pending: the inline script's timer has already shown the Liquid cards.\n    if (!slides.length || !isPending(section)) return;\n\n    const sizes = section.dataset.imageSizes ?? '';\n\n    try {\n      const results = await fetchOrder(section, slides.length);\n      if (!results.length || !isPending(section)) return;\n\n      slides.forEach((slide, index) => {\n        const result = results[index];\n        if (result) {\n          slide.replaceChildren(card(result, sizes));\n        } else {\n          slide.hidden = true;\n        }\n      });\n\n      const scroller = section.querySelector('slideshow-slides');\n      if (scroller) scroller.scrollLeft = 0;\n      section.querySelector('forcast-carousel-arrows')?.update?.();\n\n      addHoverImages(section, sizes);\n    } catch {\n      // Keep the Liquid cards: the collection's own sort, rather than no row.\n    } finally {\n      delete section.dataset[PENDING];\n      section.removeAttribute('aria-busy');\n    }\n  };\n\n  for (const section of document.querySelectorAll('.forcast-product-carousel[data-athos-collection-handle]')) {\n    if (!(section instanceof HTMLElement) || section.dataset.athosOrdered !== undefined) continue;\n    section.dataset.athosOrdered = '';\n    order(section);\n  }\n})();\n"],
  "mappings": "CAgBC,IAAM,CACL,GAAI,eAAe,IAAI,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