{
  "version": 3,
  "sources": ["/cdn/shop/t/8/assets/section-hydration.js?ddd=15457"],
  "sourcesContent": ["import { buildSectionSelector, normalizeSectionId, sectionRenderer } from '@theme/section-renderer';\nimport { requestIdleCallback, onDocumentReady } from '@theme/utilities';\n\n/**\n * Hydrates a section using the Section Rendering API preserving states.\n * Only updates elements with data-hydration-key attribute. This ensures that non-targeted nodes do not have their markup/state updated unnecessarily.\n *\n * @param {string} sectionId - The section ID to hydrate\n * @param {URL} [url] - The URL to render the section from\n */\nasync function hydrateSection(sectionId, url) {\n  const normalizedId = normalizeSectionId(sectionId);\n  const section = document.getElementById(buildSectionSelector(normalizedId));\n\n  if (!section || section.dataset.hydrated === 'true') {\n    return;\n  }\n\n  await sectionRenderer.renderSection(normalizedId, { cache: false, url, mode: 'hydration' });\n\n  section.dataset.hydrated = 'true';\n}\n\n/**\n * Hydrates a section using the Section Rendering API preserving states, when\n * the DOM is ready.\n *\n * @param {string} sectionId - The section ID to hydrate\n * @param {URL} [url] - The URL to render the section from\n */\nexport async function hydrate(sectionId, url) {\n  onDocumentReady(() => {\n    requestIdleCallback(() => hydrateSection(sectionId, url));\n  });\n}\n"],
  "mappings": "AAAA,OAAS,qBAAsB,mBAAoB,oBAAuB,0BAC1E,OAAS,oBAAqB,oBAAuB,mBASrD,eAAe,eAAe,UAAW,IAAK,CAC5C,MAAM,aAAe,mBAAmB,SAAS,EAC3C,QAAU,SAAS,eAAe,qBAAqB,YAAY,CAAC,EAEtE,CAAC,SAAW,QAAQ,QAAQ,WAAa,SAI7C,MAAM,gBAAgB,cAAc,aAAc,CAAE,MAAO,GAAO,IAAK,KAAM,WAAY,CAAC,EAE1F,QAAQ,QAAQ,SAAW,OAC7B,CASA,sBAAsB,QAAQ,UAAW,IAAK,CAC5C,gBAAgB,IAAM,CACpB,oBAAoB,IAAM,eAAe,UAAW,GAAG,CAAC,CAC1D,CAAC,CACH",
  "names": []
}
