{"release_id":"01a247c3-a6b6-0000-74b2-4a83f2c91090","chunk_id":"01a247c3-a6fe-7620-99f4-3fb170e885c0","file":"BRlD32ub.mjs","mappings":"qTAWA,IAAIA,EAAW,GAGR,SAASC,GAAqB,CACpCD,EAAW,EACZ,CAEO,SAASE,GAAsB,CACrC,OAAOF,CACR,CAIA,MAAMG,EACL,gJAEM,SAASC,EAAiBC,EAAyB,CACzD,MAAMC,EAAUD,aAAiB,MAAQA,EAAM,QAAU,OAAOA,GAAU,SAAWA,EAAQ,GAC7F,OAAOF,EAAW,KAAKG,CAAO,CAC/B,CAIA,MAAMC,EACL,uIAEM,SAASC,EAAUC,EAA4B,CACrD,OAAOF,EAAQ,KAAKE,CAAS,CAC9B,CAIO,MAAMC,EAAe,kBACtBC,EAAqB,GAAK,IAkBzB,SAASC,EAAmBC,EASvB,CAEX,GADIA,EAAE,WAAaA,EAAE,SAAW,CAACT,EAAiBS,EAAE,KAAK,GACrD,CAACA,EAAE,cAAgBA,EAAE,aAAa,OAASA,EAAE,OAAO,KAAM,MAAO,GACrE,MAAMC,EAAMJ,EAAeG,EAAE,OAAO,SAAWA,EAAE,OAAO,OACxD,GAAI,CACH,MAAME,EAAO,OAAOF,EAAE,SAAS,QAAQC,CAAG,GAAK,GAAG,EAClD,GAAID,EAAE,IAAME,EAAOJ,EAAoB,MAAO,GAC9CE,EAAE,SAAS,QAAQC,EAAK,OAAOD,EAAE,GAAG,CAAC,CACtC,MAAQ,CAGR,CACA,MAAO,EACR","names":["hydrated","markHydrated","isHydrated","CHUNK_LOAD","isChunkLoadError","error","message","CRAWLER","isCrawler","userAgent","HARD_NAV_KEY","HARD_NAV_WINDOW_MS","shouldHardNavigate","o","key","last"],"sources":["../../../../../../src/lib/hydration-guard.ts"],"sourcesContent":["/**\n * The first hydration of a page the server already rendered.\n *\n * If a route chunk fails to load during it, SvelteKit clears the server's HTML\n * and renders the root error page. That page has no seo of its own, so the\n * layout falls back to FALLBACK_SEO and stamps noindex on it — and Googlebot,\n * which renders JavaScript, obeys a noindex the browser adds. /n/bulge and\n * /n/curved-cocks dropped out of the index this way (RAT-551). hooks.client\n * holds such an error back, which leaves the server's HTML in place.\n */\n\nlet hydrated = false;\n\n/** Called by the root layout once the first page has mounted. */\nexport function markHydrated(): void {\n\thydrated = true;\n}\n\nexport function isHydrated(): boolean {\n\treturn hydrated;\n}\n\n/** A dynamic import that never arrived, in each browser's own words, and Vite's\n *  wording for a stylesheet it could not preload. */\nconst CHUNK_LOAD =\n\t/failed to fetch dynamically imported module|error loading dynamically imported module|importing a module script failed|unable to preload css/i;\n\nexport function isChunkLoadError(error: unknown): boolean {\n\tconst message = error instanceof Error ? error.message : typeof error === 'string' ? error : '';\n\treturn CHUNK_LOAD.test(message);\n}\n\n/** Search engines' renderers: they render a page once and keep what they see,\n *  so a reload only costs them the render. */\nconst CRAWLER =\n\t/googlebot|google-inspectiontool|googleother|storebot-google|bingbot|duckduckbot|yandex|baiduspider|applebot|petalbot|crawler|spider/i;\n\nexport function isCrawler(userAgent: string): boolean {\n\treturn CRAWLER.test(userAgent);\n}\n\n/** sessionStorage prefix of the per-URL stamp that keeps a hard navigation\n *  from repeating (RAT-788). */\nexport const HARD_NAV_KEY = 'chunk-hard-nav:';\nconst HARD_NAV_WINDOW_MS = 10 * 60_000;\n\ntype StampStore = Pick<Storage, 'getItem' | 'setItem'>;\n\n/**\n * After the first hydration, a route chunk that never arrived (RAT-788).\n *\n * During a real navigation to `target` the page can't render without it, so the\n * caller loads `target` in full: a fresh document fetches fresh chunks. (A\n * stale deploy mostly never gets here: SvelteKit's version poll already turns\n * those navigations into full loads. What's left is mostly a flaky network.)\n *\n * Not for a tap preload: nobody asked to go there yet, so it only gets\n * reported, and the page stays. Not during hydration (the vite:preloadError\n * reload covers that) and not for crawlers. Once per URL per 10 minutes: a\n * target that keeps failing gets the error page instead of a reload loop.\n * Records the stamp when it says yes.\n */\nexport function shouldHardNavigate(o: {\n\terror: unknown;\n\thydrating: boolean;\n\tcrawler: boolean;\n\t/** where the router is going right now; null/undefined when it isn't */\n\tnavigatingTo: URL | null | undefined;\n\ttarget: URL;\n\tnow: number;\n\tstorage: StampStore | null;\n}): boolean {\n\tif (o.hydrating || o.crawler || !isChunkLoadError(o.error)) return false;\n\tif (!o.navigatingTo || o.navigatingTo.href !== o.target.href) return false;\n\tconst key = HARD_NAV_KEY + o.target.pathname + o.target.search;\n\ttry {\n\t\tconst last = Number(o.storage?.getItem(key) ?? '0');\n\t\tif (o.now - last < HARD_NAV_WINDOW_MS) return false;\n\t\to.storage?.setItem(key, String(o.now));\n\t} catch {\n\t\t/* private mode: no stamp. A full load ends this path anyway: the next\n\t\t   chunk failure on that document is a hydration one. */\n\t}\n\treturn true;\n}\n"],"version":3}