{
  "version": 3,
  "sources": ["/cdn/shop/t/33/assets/rg-home-studio.js?polish=20261120-r1"],
  "sourcesContent": ["/* Native links do all shopping work. Preserve preview context across product\r\n   navigation; no cart, checkout, prices, discounts or customer data are mutated. */\r\n(() => {\r\n  const CONTEXT_KEYS = ['preview_theme_id'];\r\n  function mount(root) {\r\n    if (!root || root.dataset.rgHomeMounted) return;\r\n    root.dataset.rgHomeMounted = 'true';\r\n    if (window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {\r\n      root.querySelectorAll('video[autoplay]').forEach(video => video.pause());\r\n    }\r\n    const process = root.querySelector('[data-rg-process]');\r\n    if (process) {\r\n      const steps = [...process.querySelectorAll('[data-rg-process-step]')];\r\n      const reduced = window.matchMedia?.('(prefers-reduced-motion: reduce)');\r\n      let scheduled = false;\r\n      const update = () => {\r\n        scheduled = false;\r\n        if (!root.isConnected) { dispose(); return; }\r\n        const box = process.getBoundingClientRect();\r\n        const first = steps[0]?.getBoundingClientRect();\r\n        const last = steps.at(-1)?.getBoundingClientRect();\r\n        const marker = steps[0] && window.getComputedStyle?.(steps[0], '::before');\r\n        const markerOffset = (parseFloat(marker?.top) || 2) + (parseFloat(marker?.height) || 18) / 2;\r\n        const start = Math.max(0, (first?.top ?? box.top) - box.top + markerOffset);\r\n        const track = Math.max(1, (last?.top ?? box.bottom) - box.top + markerOffset - start);\r\n        const progress = reduced?.matches ? 1 : Math.max(0, Math.min(1, (window.innerHeight * .65 - box.top - start) / track));\r\n        process.style.setProperty('--rg-process-start', `${start}px`);\r\n        process.style.setProperty('--rg-process-progress', String(progress));\r\n        process.style.setProperty('--rg-process-track', `${track}px`);\r\n        for (const step of steps) step.toggleAttribute('data-rg-process-active', reduced?.matches || step.getBoundingClientRect().top <= window.innerHeight * .65);\r\n      };\r\n      const request = () => { if (!scheduled) { scheduled = true; window.requestAnimationFrame(update); } };\r\n      const resize = typeof ResizeObserver === 'function' ? new ResizeObserver(request) : null;\r\n      const dispose = () => {\r\n        window.removeEventListener('scroll', request, true);\r\n        window.removeEventListener('resize', request);\r\n        reduced?.removeEventListener?.('change', request);\r\n        resize?.disconnect();\r\n      };\r\n      // Horizon uses .page-wrapper as the desktop scroller. Capture its\r\n      // non-bubbling scroll events as well as document scrolling on mobile.\r\n      window.addEventListener('scroll', request, { passive: true, capture: true });\r\n      window.addEventListener('resize', request, { passive: true });\r\n      reduced?.addEventListener?.('change', request);\r\n      resize?.observe(process);\r\n      root.addEventListener('shopify:section:unload', dispose, { once: true });\r\n      request();\r\n    }\r\n    const current = new URL(window.location.href);\r\n    // Shopify may consume the preview parameter into a cookie and redirect to\r\n    // ?pb=0. Its public bootstrap still identifies the unpublished theme.\r\n    const theme = window.Shopify?.theme;\r\n    const preview = current.searchParams.get('preview_theme_id') ||\r\n      (theme?.role === 'unpublished' ? String(theme.id || '') : '');\r\n    if (!preview || !/^\\d+$/.test(preview)) return;\r\n    function preserveLinks() {\r\n    for (const link of root.querySelectorAll('a[href]')) {\r\n      const raw = link.getAttribute('href');\r\n      if (!raw || raw.startsWith('#')) continue;\r\n      let target;\r\n      try { target = new URL(raw, current); } catch { continue; }\r\n      if (target.origin !== current.origin || !/^https?:$/.test(target.protocol)) continue;\r\n      for (const key of CONTEXT_KEYS) target.searchParams.set(key, preview);\r\n      link.href = target.pathname + target.search + target.hash;\r\n    }\r\n    }\r\n    preserveLinks();\r\n    // The customer-inspo renderer mounts its validated cards asynchronously.\r\n    // Preserve the same preview context on those native links as on SSR links.\r\n    const grid = root.querySelector('[data-rg-inspo-grid]');\r\n    if (grid && typeof MutationObserver === 'function') {\r\n      new MutationObserver(preserveLinks).observe(grid, { childList: true, subtree: true });\r\n    }\r\n  }\r\n  const mountAll = container => {\r\n    if (container.matches?.('[data-rg-home]')) mount(container);\r\n    container.querySelectorAll('[data-rg-home]').forEach(mount);\r\n  };\r\n  mountAll(document);\r\n  if (!window.rgHomeStudioEditorBound) {\r\n    document.addEventListener('shopify:section:load', event => mountAll(event.target));\r\n    window.rgHomeStud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