{
  "version": 3,
  "sources": ["/cdn/shop/t/34/assets/mansii-gallery.js?cb=1794212126748"],
  "sourcesContent": ["/**\n * MANSII product gallery: the photograph counter, the optional scroll-driven sequence, and the purchase-bar coordination.\n *\n *   <mansii-gallery-counter>   \"PHOTO 01 / 05\", kept in step with the slideshow through its own `slideshow:select` events.\n *   <mansii-gallery-scene>     a short runway holding a sticky stage (the whole plate, so the price and Add to bag stay in view).\n *                              Scrolling down moves the photographs sideways through the stage; scrolling up reverses it.\n *   <mansii-buy-watch>         hides Atelier's sticky purchase bar while the Acquire chapter shows its own Add to bag, so two\n *                              purchase controls never compete.\n *\n * The scene is a MansiiScene: the one scroll driver, the MANSII motion contract (`@theme/mansii-motion`) and `--p`. It adds no\n * wheel listener, no page scroll-snap, no scroll lock, no animation loop and nothing from ScrollCraft.\n *\n * It never replaces Atelier's slideshow. It writes the slideshow scroller's own scroll position from the scene progress, so the native\n * thumbnails, `aria-selected`, zoom and counter stay correct. Native navigation (thumbnail, arrow, key, drag, zoom return) is answered\n * by moving the PAGE to the matching point of the runway, so the page, not a second state, is the single source of truth and nothing\n * fights. While engaged the slideshow's `select` is shadowed by an instance method; it is restored on release.\n *\n * Off (standard horizontal gallery, runway collapsed): reduced motion, the theme's motion switch, phones and portrait tablets, no\n * JavaScript, one photograph. A variant change (the gallery is replaced) re-binds.\n */\nimport { MansiiScene } from '@theme/mansii-scene';\nimport { getScrollContainer, scrollTo as pageScrollTo } from '@theme/scroll-container';\n\nconst DESKTOP_PLATE = window.matchMedia('(min-width: 750px) and (min-aspect-ratio: 901/1000)');\n/** Phones and portrait screens: the same composition as the stylesheet's phone rules (snippets/mansii-product-plate-content.liquid). */\nconst PHONE_PLATE = window.matchMedia('(max-width: 749px), (min-width: 750px) and (max-aspect-ratio: 9/10)');\nconst clamp01 = (value) => (value < 0 ? 0 : value > 1 ? 1 : value);\nconst pad2 = (n) => String(n).padStart(2, '0');\n\n/**\n * While the strip travels, a photograph is drawn at full strength as long as a fair part of it is inside the stage, and only the last part of it as it leaves (and the\n * first part as it arrives) is eased in and out: nothing while less than FADE_NONE of the stage width of it shows, full from FADE_FULL of the stage width (or, for a\n * photograph narrower than that, from most of its own width), a smooth curve between. So a photograph is never washed out in the middle of the move, the two photographs\n * never leave the stage empty, and the thin tail of a photograph that has almost left (or the first sliver of one that has hardly arrived) is gone before it could read\n * as a strip. The ease is measured in pixels of travel, so it takes the same distance for a wide and a narrow photograph.\n */\nconst FADE_NONE = 0.12;\nconst FADE_FULL = 0.5;\n/** A little steeper than a plain smooth curve at the thin end, so the last faint remnant of a leaving photograph is already gone. */\nconst FADE_CURVE = 1.3;\n\nexport class MansiiGalleryCounter extends HTMLElement {\n  /** @type {AbortController | null} */\n  #controller = null;\n  #spokenTimer = 0;\n\n  connectedCallback() {\n    this.#controller = new AbortController();\n    const gallery = this.closest('media-gallery');\n    gallery?.addEventListener('slideshow:select', this.#onSelect, { signal: this.#controller.signal });\n    const slideshow = gallery?.querySelector('slideshow-component');\n    this.#render(typeof slideshow?.current === 'number' ? slideshow.current : 0, true);\n  }\n\n  disconnectedCallback() {\n    this.#controller?.abort();\n    this.#controller = null;\n    window.clearTimeout(this.#spokenTimer);\n  }\n\n  get total() {\n    return parseInt(this.dataset.total || '0', 10) || 0;\n  }\n\n  #onSelect = (event) => {\n    const index = event.detail?.index;\n    if (typeof index === 'number') this.#render(index, false);\n  };\n\n  /**\n   * @param {number} index 0-based\n   * @param {boolean} immediate Speak at once (first render); otherwise after the photograph has stopped changing.\n   */\n  #render(index, immediate) {\n    const total = this.total;\n    const n = index + 1;\n    const visible = this.querySelector('[data-counter-visible]');\n    const spoken = this.querySelector('[data-counter-spoken]');\n    const fill = (template) => template.replace('{n}', String(n)).replace('{total}', String(total));\n    if (visible) {\n      const format = this.dataset.format;\n      visible.textContent =\n        format === 'words'\n          ? fill(this.dataset.words || 'Photograph {n} of {total}')\n          : format === 'numbers'\n            ? `${pad2(n)} / ${pad2(total)}`\n            : `${this.dataset.prefix || 'Photo'} ${pad2(n)} / ${pad2(total)}`;\n    }\n    if (spoken) {\n      window.clearTimeout(this.#spokenTimer);\n      const speak = () => (spoken.textContent = fill(this.dataset.spoken || 'Photograph {n} of {total}'));\n      // a scroll sequence changes the photograph many times a second: announce only where it comes to rest\n      if (immediate) speak();\n      else this.#spokenTimer = window.setTimeout(speak, 450);\n    }\n  }\n}\n\nexport class MansiiGalleryScene extends MansiiScene {\n  /** @type {any} */ #slideshow = null;\n  /** @type {Function | null} */ #nativeSelect = null;\n  /** @type {HTMLElement[]} */ #slides = [];\n  /** @type {number[]} */ #positions = [];\n  /** Per photograph: where its image sits inside its slide and how wide it is (px), measured once per layout, so a frame needs no layout read. */\n  /** @type {{ left: number, width: number }[]} */ #frames = [];\n  /** The width of the stage window (px). */\n  #window = 0;\n  /** Last opacity written per slide (a write is skipped when it would not change anything). */\n  /** @type {number[]} */ #fades = [];\n  #written = -1;\n  /** Consecutive frames in which the stage was found scrolled away mid-sequence (see #guardSticky). */\n  #loose = 0;\n  /** A photograph beyond the scroll sequence the visitor chose directly (thumbnail, arrow, key, zoom). While the page is still scrolling to the\n   * end of the runway for it (`#extraPending`) the scene leaves the strip alone, and afterwards until the visitor scrolls back into the sequence. */\n  #extra = -1;\n  #extraPending = false;\n  #extraTimer = 0;\n  /** Phone stage: the pinned wrapper (the containing block of the sticky media), the empty runway inside it, and the photographs already asked for early. */\n  /** @type {HTMLElement | null} */ #pin = null;\n  /** @type {HTMLElement | null} */ #run = null;\n  #mediaH = 0;\n  /** The main Add to bag is still below the screen (Atelier's sticky bar waits until it has been scrolled past, so it would stay hidden), and whether this scene is showing the bar. */\n  /** @type {IntersectionObserver | null} */ #buyObserver = null;\n  #buyBelow = false;\n  #forcedBar = false;\n  /** Touch listeners of the phone stage, and when the last swipe ended (a click right after it is not a tap). */\n  /** @type {AbortController | null} */ #touch = null;\n  #swipedAt = 0;\n  /** @type {Set<number>} */ #early = new Set();\n  #scrollTimer = 0;\n  /** @type {ResizeObserver | null} */ #layout = null;\n  /** @type {MutationObserver | null} */ #swap = null;\n  /** @type {AbortController | null} */ #controller = null;\n\n  connectedCallback() {\n    super.connectedCallback();\n    this.#controller = new AbortController();\n    const { signal } = this.#controller;\n    DESKTOP_PLATE.addEventListener('change', () => this.refresh(), { signal });\n    PHONE_PLATE.addEventListener('change', () => this.refresh(), { signal });\n    let lastWidth = window.innerWidth;\n    window.addEventListener(\n      'resize',\n      () => {\n        // on a phone the browser toolbar changes the height while the page scrolls; the phone stage is sized in svh, so only a change of width needs a new measurement\n        if (this.hasAttribute('data-pscrub') && Math.abs(window.innerWidth - lastWidth) < 2) return;\n        lastWidth = window.innerWidth;\n        this.refresh();\n      },\n      { signal, passive: true }\n    );\n    this.addEventListener('slideshow:select', () => this.#followThumbnail(), { signal });\n\n    const media = this.querySelector('.mansii-plate__media');\n    if (media) {\n      this.#swap = new MutationObserver(() => this.refresh());\n      this.#swap.observe(media, { childList: true });\n    }\n    if ('ResizeObserver' in window && this.refs.stage) {\n      this.#layout = new ResizeObserver(() => this.refresh());\n      this.#layout.observe(this.refs.stage);\n    }\n    requestAnimationFrame(() => this.refresh());\n  }\n\n  disconnectedCallback() {\n    window.clearTimeout(this.#extraTimer);\n    this.#release(true);\n    this.#controller?.abort();\n    this.#controller = null;\n    this.#swap?.disconnect();\n    this.#swap = null;\n    this.#layout?.disconnect();\n    this.#layout = null;\n    super.disconnectedCallback();\n  }\n\n  applyMode() {\n    super.applyMode();\n    this.refresh();\n  }\n\n  get count() {\n    return this.#slides.length;\n  }\n\n  /** How many photographs take part in the scroll sequence (the rest stay reachable by thumbnail, arrow, key and zoom). */\n  get sequence() {\n    const max = parseInt(this.dataset.maxPhotos || '', 10);\n    return Math.min(this.count, Number.isFinite(max) && max >= 2 ? max : this.count);\n  }\n\n  /** Scroll-driven only on the desktop plate, with motion allowed, with more than one photograph. */\n  get engaged() {\n    if (this.mode === 'off' || this.sequence < 2 || this.dataset.scrollDriven === 'false') return false;\n    return DESKTOP_PLATE.matches || this.phoneMode;\n  }\n\n  /** The phone version (section setting \"Scroll-driven gallery on phones\") is asked for and this is a phone or portrait screen. */\n  get phoneMode() {\n    return this.hasAttribute('data-phone') && PHONE_PLATE.matches;\n  }\n\n  /** Re-reads the gallery (it is replaced when the variant changes) and the geometry, then re-applies the progress. */\n  refresh() {\n    if (!this.isConnected || !this.refs.stage) return;\n    const slideshow = this.querySelector('media-gallery slideshow-component');\n    if (slideshow !== this.#slideshow) {\n      this.#release(false);\n      this.#slideshow = slideshow;\n      this.#early = new Set();\n      this.#extra = -1;\n    }\n    this.#slides = slideshow?.refs?.slides ?? [];\n\n    if (!this.engaged) {\n      this.#release(true);\n      return;\n    }\n    this.#capture();\n    if (this.phoneMode) {\n      this.#layoutPhone();\n      if (!this.hasAttribute('data-pscrub')) return;\n      this.#measure();\n      this.#drive(this.#progress());\n      return;\n    }\n    this.removeAttribute('data-pscrub');\n    const stageHeight = this.refs.stage.offsetHeight;\n    // scroll per photograph, shortened for a long sequence so that the whole sequence never exceeds `maxLength` (vh): every photograph stays in the sequence\n    const maxLength = parseFloat(this.dataset.maxLength);\n    let stepVh = parseFloat(this.dataset.stepVh) || 40;\n    if (Number.isFinite(maxLength) && maxLength > 0 && this.sequence > 1) stepVh = Math.min(stepVh, Math.max(24, maxLength / (this.sequence - 1)));\n    const step = stepVh / 100;\n    this.style.setProperty('--gs-runway', `${Math.round(stageHeight + (this.sequence - 1) * step * window.innerHeight)}px`);\n    this.setAttribute('data-scrub', '');\n    this.#measure();\n    this.#drive(this.#progress());\n  }\n\n  /** Takes over the slideshow: no looping, no scroll-snap, navigation answered by the page. */\n  #capture() {\n    const slideshow = this.#slideshow;\n    if (!slideshow || this.#nativeSelect) return;\n    this.#nativeSelect = slideshow.select;\n    slideshow.select = (input, event, options) => this.#select(input, event, options);\n    slideshow.dataset.mansiiInfinite = slideshow.hasAttribute('infinite') ? '1' : '';\n    slideshow.removeAttribute('infinite');\n    slideshow.setAttribute('data-scrubbed', '');\n    // `scrollend` where the browser has it; elsewhere a debounce on the scroller's own scroll events (the scene's writes are recognised and ignored)\n    slideshow.refs.scroller?.addEventListener('onscrollend' in window ? 'scrollend' : 'scroll', 'onscrollend' in window ? this.#onScrollEnd : this.#onScrollDebounced);\n    slideshow.addEventListener('keydown', this.#onKey);\n    slideshow.current = slideshow.current;\n  }\n\n  /** @param {boolean} collapse Also remove the runway (the standard gallery). */\n  #release(collapse) {\n    const slideshow = this.#slideshow;\n    if (slideshow && this.#nativeSelect) {\n      delete slideshow.select;\n      if (slideshow.dataset.mansiiInfinite) slideshow.setAttribute('infinite', '');\n      delete slideshow.dataset.mansiiInfinite;\n      slideshow.removeAttribute('data-scrubbed');\n      slideshow.refs?.scroller?.removeEventListener('scrollend', this.#onScrollEnd);\n      slideshow.refs?.scroller?.removeEventListener('scroll', this.#onScrollDebounced);\n      window.clearTimeout(this.#scrollTimer);\n      slideshow.removeEventListener('keydown', this.#onKey);\n      slideshow.current = slideshow.current;\n    }\n    this.#nativeSelect = null;\n    this.#written = -1;\n    this.#unfade();\n    if (collapse) {\n      this.removeAttribute('data-scrub');\n      this.removeAttribute('data-pscrub');\n      this.#touch?.abort();\n      this.#touch = null;\n      this.#buyObserver?.disconnect();\n      this.#buyObserver = null;\n      this.#buyBelow = false;\n      this.#syncBar();\n      for (const name of ['--gs-run', '--gs-extra', '--gs-bar']) this.style.removeProperty(name);\n      this.removeAttribute('data-moving');\n      this.style.removeProperty('--gs-runway');\n      this.style.removeProperty('--gs-edge');\n      this.style.removeProperty('--gs-ci');\n    }\n  }\n\n  /** With many photographs the column of thumbnails scrolls: keep the active one in view (the column only, never the page). */\n  #followThumbnail() {\n    if (!this.engaged) return;\n    const column = this.querySelector('.slideshow-controls__thumbnails-container');\n    const active = this.querySelector('.slideshow-controls__thumbnail[aria-selected=\"true\"]');\n    if (column && active && this.hasAttribute('data-pscrub')) {\n      // phones: the thumbnails are a row; keep the active one in view (the row only, never the page)\n      const row = column.getBoundingClientRect();\n      const thumb = active.getBoundingClientRect();\n      if (thumb.left < row.left || thumb.right > row.right) column.scrollTo({ left: column.scrollLeft + (thumb.left - row.left) - (row.width - thumb.width) / 2, behavior: 'instant' });\n      return;\n    }\n    if (!column || !active || column.scrollHeight <= column.clientHeight + 1) return;\n    const box = column.getBoundingClientRect();\n    const thumb = active.getBoundingClientRect();\n    if (thumb.top >= box.top && thumb.bottom <= box.bottom) return;\n    column.scrollTo({ top: column.scrollTop + (thumb.top - box.top) - (box.height - thumb.height) / 2, behavior: 'instant' });\n  }\n\n  /** The scroll offset (px) at which each slide is centred in the stage. */\n  #measure() {\n    const scroller = this.#slideshow?.refs?.scroller;\n    if (!scroller) return;\n    const box = scroller.getBoundingClientRect();\n    const base = box.left - scroller.scrollLeft;\n    this.#positions = this.#slides.map((slide) => Math.round(slide.getBoundingClientRect().left - base));\n    this.#window = box.width;\n    // where each photograph itself sits in its slide (a slide is as wide as the window; a photograph may be narrower and centred)\n    this.#frames = this.#slides.map((slide) => {\n      const slideBox = slide.getBoundingClientRect();\n      const imageBox = (slide.querySelector('img') || slide).getBoundingClientRect();\n      return { left: imageBox.left - slideBox.left, width: Math.max(1, imageBox.width) };\n    });\n    this.#fades = [];\n  }\n\n  /**\n   * Eases the ends of a photograph's passage (see FADE_NONE and FADE_FULL): its opacity follows how many pixels of it are inside the stage window. Written in the\n   * same frame as the move, from measurements taken once per layout (no layout read, no timer). At a resting point all of that photograph is inside the window and none of any\n   * other, so nothing is left behind.\n   * @param {number} x The scroll offset just written.\n   */\n  #fade(x) {\n    const ww = this.#window;\n    if (!this.#frames.length || ww <= 0) return;\n    for (let i = 0; i < this.#slides.length; i += 1) {\n      const frame = this.#frames[i];\n      if (!frame) continue;\n      const left = this.#positions[i] - x + frame.left;\n      const shown = Math.max(0, Math.min(left + frame.width, ww) - Math.max(left, 0));\n      const none = Math.min(FADE_NONE * ww, 0.25 * frame.width);\n      const full = Math.min(FADE_FULL * ww, 0.95 * frame.width);\n      const t = Math.min(1, Math.max(0, (shown - none) / Math.max(1, full - none)));\n      const opacity = Math.round(Math.pow(t * t * (3 - 2 * t), FADE_CURVE) * 1000) / 1000;\n      if (this.#fades[i] === opacity) continue;\n      this.#fades[i] = opacity;\n      if (opacity === 1) this.#slides[i].style.removeProperty('--gs-o');\n      else this.#slides[i].style.setProperty('--gs-o', String(opacity));\n    }\n  }\n\n  /** Every photograph back to full opacity (the native slideshow, a drag, a photograph chosen beyond the sequence, release). */\n  #unfade() {\n    for (const slide of this.#slides) slide.style.removeProperty('--gs-o');\n    this.#fades = [];\n  }\n\n  /** The phone stage measures its own runway row; everything else is the scene's. */\n  update(rect, viewport) {\n    if (this.hasAttribute('data-pscrub')) {\n      if (this.mode !== 'off') this.setProgress(this.#phoneProgress());\n      return;\n    }\n    super.update(rect, viewport);\n  }\n\n  /**\n   * Phones and portrait screens: the media (the identity again, then the photograph, the condition scale, the thumbnails and the counter) is sticky inside its own\n   * wrapper; the empty runway after it is as tall as the scroll the photographs ask for, in svh (the small viewport, which does not move with the browser toolbar), so\n   * the toolbar appearing or hiding never changes the length of the runway or the size of the stage. The purchase block and everything after follow the wrapper.\n   * Nothing here depends on window.innerHeight.\n   */\n  #layoutPhone() {\n    const pin = this.querySelector('.mansii-gs__pin');\n    const run = this.querySelector('.mansii-gs__run');\n    const media = this.querySelector('.mansii-plate__media');\n    const container = media ? media.querySelector('slideshow-container') : null;\n    if (!pin || !run || !media || !container) {\n      this.dataset.scrollDriven = 'false';\n      this.#release(true);\n      return;\n    }\n    this.#pin = pin;\n    this.#run = run;\n    this.setAttribute('data-pscrub', '');\n    this.removeAttribute('data-scrub');\n    this.style.removeProperty('--gs-runway');\n    const set = (name, value) => {\n      if (this.style.getPropertyValue(name) !== value) this.style.setProperty(name, value);\n    };\n    const bar = document.querySelector('.sticky-add-to-cart__bar');\n    set('--gs-bar', (bar && bar.offsetHeight ? bar.offsetHeight + 4 : 76) + 'px');\n    this.#mediaH = Math.round(media.offsetHeight);\n    set('--gs-extra', Math.max(0, Math.round(media.offsetHeight - container.offsetHeight)) + 'px');\n    const n = this.sequence;\n    const maxLength = parseFloat(this.dataset.phoneMaxLength);\n    let stepVh = parseFloat(this.dataset.phoneStepVh) || 22;\n    if (Number.isFinite(maxLength) && maxLength > 0 && n > 1) stepVh = Math.min(stepVh, Math.max(10, maxLength / (n - 1)));\n    const unit = window.CSS && CSS.supports && CSS.supports('height', '1svh') ? 'svh' : 'vh';\n    set('--gs-run', ((n - 1) * stepVh).toFixed(2) + unit);\n    this.#watchBuy();\n    this.#bindTouch(media);\n    this.#syncBar();\n  }\n\n  /** Where the phone runway lies in page coordinates, how far the page travels per photograph, and how far the strip travels per photograph (px). */\n  #phoneRange() {\n    const pin = this.#pin;\n    const n = this.sequence;\n    if (!pin || !this.#run || n < 2) return null;\n    const container = getScrollContainer();\n    const containerTop = container === document.scrollingElement || container === document.documentElement ? 0 : container.getBoundingClientRect().top;\n    const travel = this.#phoneTravel();\n    const pitch = this.#positions.length > 1 ? Math.abs(this.#positions[1] - this.#positions[0]) : this.#window;\n    return { start: pin.getBoundingClientRect().top - containerTop + container.scrollTop, travel, step: travel / (n - 1), pitch: pitch || 300 };\n  }\n\n  /**\n   * Phones: a horizontal swipe on a photograph drags the photographs along the runway (the page is moved, so the strip, the counter and the thumbnails follow, and\n   * nothing fights the page); vertical movement stays the browser's own. Touch events are used so that the horizontal drag can be claimed with preventDefault in every\n   * phone browser; the strip itself is not scrolled by touch (touch-action: pan-y). A flick carries a little further than the finger and the sequence comes to rest on\n   * a whole photograph.\n   * @param {HTMLElement} media\n   */\n  #bindTouch(media) {\n    if (this.#touch) return;\n    this.#touch = new AbortController();\n    const { signal } = this.#touch;\n    let startX = 0;\n    let startY = 0;\n    let velocity = 0;\n    let base = 0;\n    let own = false;\n    /** @type {Array<[number, number]>} the last 120ms of the finger (time, x) */\n    let samples = [];\n    /** @type {'' | 'x' | 'y'} */\n    let axis = '';\n    media.addEventListener(\n      'touchstart',\n      (event) => {\n        axis = '';\n        own = this.hasAttribute('data-pscrub') && event.touches.length === 1 && event.target instanceof Element && !!event.target.closest('slideshow-container');\n        if (!own) return;\n        startX = event.touches[0].clientX;\n        startY = event.touches[0].clientY;\n        samples = [[event.timeStamp, startX]];\n        velocity = 0;\n        base = getScrollContainer().scrollTop;\n      },\n      { signal, passive: true }\n    );\n    media.addEventListener(\n      'touchmove',\n      (event) => {\n        if (!own || !event.touches.length) return;\n        const x = event.touches[0].clientX;\n        const dx = x - startX;\n        const dy = event.touches[0].clientY - startY;\n        if (!axis && Math.hypot(dx, dy) > 9) axis = Math.abs(dx) > Math.abs(dy) * 1.2 ? 'x' : 'y';\n        if (axis !== 'x') return;\n        if (event.cancelable) event.preventDefault();\n        samples.push([event.timeStamp, x]);\n        while (samples.length > 2 && event.timeStamp - samples[0][0] > 120) samples.shift();\n        velocity = (x - samples[0][1]) / Math.max(1, event.timeStamp - samples[0][0]);\n        const range = this.#phoneRange();\n        if (!range) return;\n        const top = Math.min(range.start + range.travel, Math.max(range.start, base - dx * (range.step / range.pitch)));\n        getScrollContainer().scrollTo({ top, behavior: 'instant' });\n      },\n      { signal, passive: false }\n    );\n    const release = () => {\n      const swiped = own && axis === 'x';\n      own = false;\n      axis = '';\n      if (!swiped) return;\n      this.#swipedAt = performance.now();\n      const range = this.#phoneRange();\n      if (!range) return;\n      const here = (getScrollContainer().scrollTop - range.start) / range.step;\n      const projected = here - (velocity * 140) / range.pitch;\n      const target = Math.min(Math.round(here) + 2, Math.max(Math.round(here) - 2, Math.round(projected)));\n      this.goTo(Math.min(this.count - 1, Math.max(0, target)));\n    };\n    media.addEventListener('touchend', release, { signal });\n    media.addEventListener('touchcancel', release, { signal });\n    // a swipe that ends on a photograph must not also open it\n    media.addEventListener(\n      'click',\n      (event) => {\n        if (performance.now() - this.#swipedAt < 450) {\n          event.preventDefault();\n          event.stopPropagation();\n        }\n      },\n      { signal, capture: true }\n    );\n  }\n\n  /** Follows the main Add to bag block: below the screen (not yet reached) or not. */\n  #watchBuy() {\n    if (this.#buyObserver || !('IntersectionObserver' in window)) return;\n    const block = this.querySelector('.buy-buttons-block');\n    if (!block) return;\n    this.#buyObserver = new IntersectionObserver(([entry]) => {\n      if (!entry) return;\n      this.#buyBelow = !entry.isIntersecting && entry.boundingClientRect.top > 0;\n      this.#syncBar();\n    }, { rootMargin: '0px 0px -120px 0px' });\n    this.#buyObserver.observe(block);\n  }\n\n  /**\n   * While the phone stage is engaged and the main Add to bag is still below the screen, Atelier's own sticky purchase bar is shown (its own rule waits until the button has\n   * been scrolled past, which on this page only happens after the sequence). As soon as the main button comes into view, or the stage is released, the bar is handed back.\n   */\n  #syncBar() {\n    const bar = document.querySelector('.sticky-add-to-cart__bar');\n    if (!bar) return;\n    if (this.hasAttribute('data-pscrub') && this.#buyBelow) {\n      if (bar.dataset.stuck !== 'true') {\n        bar.dataset.stuck = 'true';\n        this.#forcedBar = true;\n      }\n    } else if (this.#forcedBar) {\n      this.#forcedBar = false;\n      bar.dataset.stuck = 'false';\n    }\n  }\n\n  /** Scroll distance of the pinned part of the phone runway (px). */\n  #phoneTravel() {\n    return this.#run ? this.#run.offsetHeight : 0;\n  }\n\n  /** Progress through the phone runway: 0 when the media has just stuck at the top, 1 when it is released. */\n  #phoneProgress() {\n    const pin = this.#pin;\n    const travel = this.#phoneTravel();\n    if (!pin || travel < 4) return 0;\n    return clamp01(-pin.getBoundingClientRect().top / travel);\n  }\n\n  /** The next photographs are asked for before the page reaches them (they are lazy by default). */\n  #preload(index) {\n    for (let i = Math.max(0, index - 1); i <= Math.min(this.#slides.length - 1, index + 2); i += 1) {\n      if (this.#early.has(i)) continue;\n      this.#early.add(i);\n      for (const image of this.#slides[i].querySelectorAll('img[loading=\"lazy\"]')) image.loading = 'eager';\n    }\n  }\n\n  /** Progress through the runway (the same value MansiiScene writes to --p). */\n  #progress() {\n    if (this.hasAttribute('data-pscrub')) return this.#phoneProgress();\n    const rect = this.getBoundingClientRect();\n    const runway = rect.height - this.refs.stage.offsetHeight;\n    return runway > 4 ? clamp01(-rect.top / runway) : 0;\n  }\n\n  setProgress(progress) {\n    super.setProgress(progress);\n    if (this.engaged && this.#slideshow) {\n      this.#drive(progress);\n      this.#guardSticky(progress);\n    }\n  }\n\n  /**\n   * The runway only works while the stage really sticks. If something in the page (an ancestor with overflow, a layout this theme did not\n   * foresee) stops it sticking, the runway would be an empty page of scrolling after the stage has gone. So when the stage has scrolled away\n   * while the scene is still mid-sequence, the scroll-driven gallery switches itself off: the runway collapses and the standard gallery remains.\n   */\n  #guardSticky(progress) {\n    if (progress < 0.04 || progress > 0.96 || !this.refs.stage) return;\n    const container = getScrollContainer();\n    const containerTop = container === document.scrollingElement || container === document.documentElement ? 0 : container.getBoundingClientRect().top;\n    const phoneMedia = this.hasAttribute('data-pscrub') ? this.querySelector('.mansii-plate__media') : null;\n    const top = (phoneMedia ? phoneMedia.getBoundingClientRect().top : this.refs.stage.getBoundingClientRect().top) - containerTop;\n    if (top >= -6) {\n      this.#loose = 0;\n      return;\n    }\n    this.#loose += 1;\n    if (this.#loose < 3) return;\n    console.warn('mansii-gallery-scene: the stage is not sticking, so the scroll-driven gallery is switched off.');\n    this.dataset.scrollDriven = 'false';\n    this.refresh();\n  }\n\n  /**\n   * Dwell: each photograph rests in the centre for `hold` of its span, then travels with a soft ease. Travelling photographs fade at the\n   * window edges and the Condition Index leaves before its photograph does; both are 0 at rest, so a photograph at rest is never masked.\n   */\n  #drive(progress) {\n    const scroller = this.#slideshow?.refs?.scroller;\n    const n = Math.min(this.sequence, this.#positions.length);\n    if (!scroller || n < 2) return;\n    if (this.#slideshow.hasAttribute('dragging')) {\n      this.#unfade();\n      return;\n    }\n\n    // a photograph beyond the sequence was chosen directly: the page is scrolling to the end of the runway while the strip brings it in, so the\n    // scene leaves the strip alone for that scroll, and afterwards until the visitor scrolls back up into the sequence\n    if (this.#extra >= 0) {\n      if (this.#extraPending || progress >= 0.999) {\n        this.#unfade();\n        return;\n      }\n      this.#extra = -1;\n    }\n\n    // each step brings the next photograph in at once and then lets it rest for `hold` of the step (never a rest before the first photograph moves, so\n    // scrolling answers immediately; the last photograph rests a moment and the page flows on into the next chapter)\n    const parsedHold = parseFloat(this.dataset.hold);\n    const hold = Math.min(0.45, Math.max(0, Number.isFinite(parsedHold) ? parsedHold : 0.2));\n    const u = progress * (n - 1);\n    const i = Math.min(Math.floor(u), n - 2);\n    const f = u - i;\n    const t = f >= 1 - hold ? 1 : f / (1 - hold);\n    const eased = t * t * (3 - 2 * t);\n    if (this.hasAttribute('data-pscrub')) this.#preload(Math.round(u));\n\n    const ramp = Math.min(1, 4 * Math.min(t, 1 - t));\n    this.style.setProperty('--gs-edge', `${(ramp * 9).toFixed(2)}%`);\n    this.style.setProperty('--gs-ci', Math.max(0, 1 - Math.min(1, ramp * 4)).toFixed(2));\n    this.toggleAttribute('data-moving', ramp > 0);\n\n    const x = Math.round(this.#positions[i] + (this.#positions[i + 1] - this.#positions[i]) * eased);\n    this.#fade(x);\n    if (Math.abs(scroller.scrollLeft - x) < 1) return;\n    this.#written = x;\n    scroller.scrollLeft = x;\n    // tells the ground line (assets/mansii-ground.js) at once, so it follows this move in the same frame instead of the next one\n    scroller.dispatchEvent(new Event('mansii:strip'));\n  }\n\n  /** Native navigation (thumbnail, arrow, key, zoom, drag) becomes a move of the page along the runway. */\n  #select(input, event, options = {}) {\n    const slideshow = this.#slideshow;\n    const slides = this.#slides;\n    let index = -1;\n    if (typeof input === 'number') index = input;\n    else if (typeof input === 'string') index = parseInt(input, 10);\n    else if (input && 'id' in input) index = slides.findIndex((slide) => slide.getAttribute('slide-id') == input.id);\n    if (!this.engaged || Number.isNaN(index) || index < 0 || index >= slides.length) {\n      return this.#nativeSelect?.call(slideshow, input, event, options);\n    }\n    event?.preventDefault();\n    this.goTo(index, options.animate === false);\n  }\n\n  /**\n   * Moves the page to the point of the runway where photograph `index` rests. A photograph beyond the sequence is reached at the end of\n   * the runway, then the native slideshow brings it in. Returns false when the page is already at that point.\n   * @param {number} index\n   * @param {boolean} [instant]\n   */\n  goTo(index, instant = false) {\n    const n = this.sequence;\n    const extra = index >= n;\n    const container = getScrollContainer();\n    const containerTop = container === document.scrollingElement || container === document.documentElement ? 0 : container.getBoundingClientRect().top;\n    const rect = this.getBoundingClientRect();\n    const phone = this.hasAttribute('data-pscrub') && this.#run;\n    const travel = phone ? this.#phoneTravel() : rect.height - this.refs.stage.offsetHeight;\n    const origin = phone ? this.#pin.getBoundingClientRect().top : rect.top;\n    const target = origin - containerTop + container.scrollTop + (Math.min(index, n - 1) / (n - 1)) * travel;\n    const behavior = instant || this.mode === 'off' ? 'instant' : 'smooth';\n\n    const moves = Math.abs(target - container.scrollTop) >= 1;\n    if (extra) {\n      this.#extra = index;\n      this.#extraPending = moves;\n      window.clearTimeout(this.#extraTimer);\n      if (moves) {\n        const done = () => {\n          this.#extraPending = false;\n          window.clearTimeout(this.#extraTimer);\n        };\n        container.addEventListener('scrollend', done, { once: true });\n        this.#extraTimer = window.setTimeout(done, 2500);\n      }\n      this.#nativeSelect?.call(this.#slideshow, index, undefined, { animate: behavior !== 'instant' });\n    } else {\n      this.#extra = -1;\n      this.#extraPending = false;\n    }\n    if (!moves) return false;\n    pageScrollTo({ top: target, behavior });\n    return true;\n  }\n\n  /** Without scroll-snap the browser's own arrow-key scrolling no longer steps photograph by photograph, so the keys do it. */\n  #onKey = (event) => {\n    if (!this.engaged || event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return;\n    const direction = event.key === 'ArrowRight' ? 1 : event.key === 'ArrowLeft' ? -1 : 0;\n    if (!direction) return;\n    const target = event.target;\n    if (target instanceof Element && target.closest('button, a, input, select, textarea, [role=\"tab\"]') && !target.closest('slideshow-slide')) return;\n    const current = this.#slideshow.current;\n    const next = Math.min(this.count - 1, Math.max(0, current + direction));\n    event.preventDefault();\n    if (next !== current) this.goTo(next);\n  };\n\n  /** Fallback for browsers without `scrollend`. */\n  #onScrollDebounced = () => {\n    window.clearTimeout(this.#scrollTimer);\n    this.#scrollTimer = window.setTimeout(this.#onScrollEnd, 140);\n  };\n\n  /** A horizontal gesture on the stage (trackpad, drag) moved the strip: settle on the nearest photograph. */\n  #onScrollEnd = () => {\n    const scroller = this.#slideshow?.refs?.scroller;\n    if (!scroller || !this.engaged) return;\n    // the strip is travelling to a photograph chosen directly while the page is still scrolling to the end of the runway: that is not a gesture to settle\n    if (this.#extraPending) return;\n    if (Math.abs(scroller.scrollLeft - this.#written) <= 2) return;\n    const x = scroller.scrollLeft;\n    let nearest = 0;\n    this.#positions.forEach((position, i) => {\n      if (Math.abs(position - x) < Math.abs(this.#positions[nearest] - x)) nearest = i;\n    });\n    if (!this.goTo(nearest)) {\n      // the page is already at that point of the runway: only the strip has to settle\n      this.#written = this.#positions[nearest];\n      scroller.scrollTo({ left: this.#positions[nearest], behavior: this.mode === 'off' ? 'instant' : 'smooth' });\n    }\n  };\n}\n\n/**\n * Atelier's sticky purchase bar shows once the first Add to bag has scrolled away. The Acquire chapter has its own, so while that is in\n * view the sticky bar is hidden (html[data-mansii-acquire-buy]); the rule lives in snippets/mansii-buy-styles.liquid.\n */\nexport class MansiiBuyWatch extends HTMLElement {\n  /** @type {IntersectionObserver | null} */\n  #observer = null;\n\n  connectedCallback() {\n    if (!('IntersectionObserver' in window)) return;\n    this.#observer = new IntersectionObserver(([entry]) => {\n      document.documentElement.toggleAttribute('data-mansii-acquire-buy', !!entry?.isIntersecting);\n    });\n    this.#observer.observe(this);\n  }\n\n  disconnectedCallback() {\n    this.#observer?.disconnect();\n    this.#observer = null;\n    document.documentElement.removeAttribute('data-mansii-acquire-buy');\n  }\n}\n\nif (!customElements.get('mansii-gallery-counter')) customElements.define('mansii-gallery-counter', MansiiGalleryCounter);\nif (!customElements.get('mansii-gallery-scene')) customElements.define('mansii-gallery-scene', MansiiGalleryScene);\nif (!customElements.get('mansii-buy-watch')) customElements.define('mansii-buy-watch', MansiiBuyWatch);\n"],
  "mappings": "AAoBA,OAAS,gBAAmB,sBAC5B,OAAS,mBAAoB,YAAY,iBAAoB,0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