@absolutejs/absolute 0.20.0-beta.170 → 0.20.0-beta.171

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +33 -4
  3. package/changelog.json +112 -0
  4. package/dist/angular/browser.js +2 -2
  5. package/dist/angular/browser.js.map +3 -3
  6. package/dist/angular/components/constants.js +1 -0
  7. package/dist/angular/components/core/streamingSlotRegistrar.js +2 -2
  8. package/dist/angular/components/core/streamingSlotRegistry.js +3 -3
  9. package/dist/angular/index.js +184 -29
  10. package/dist/angular/index.js.map +15 -14
  11. package/dist/angular/server.js +184 -29
  12. package/dist/angular/server.js.map +15 -14
  13. package/dist/build.js +1241 -853
  14. package/dist/build.js.map +32 -30
  15. package/dist/cli/{add-6a7pjkn9.js → add-ae6mg79m.js} +10 -10
  16. package/dist/cli/{analyze-606fshwa.js → analyze-e57zz9x8.js} +3 -3
  17. package/dist/cli/{androidEmulatorController-68jjdxmx.js → androidEmulatorController-vqc5m2rp.js} +6 -6
  18. package/dist/cli/{androidNativeWatcher-x032x9yr.js → androidNativeWatcher-s03aczxv.js} +6 -6
  19. package/dist/cli/{api-mshjr4ah.js → api-8ppxw487.js} +8 -8
  20. package/dist/cli/{build-g81xqbb9.js → build-fz7qbdn3.js} +3 -3
  21. package/dist/cli/{buildDepVendor-29d8v9cx.js → buildDepVendor-qvsh6dsj.js} +7 -3
  22. package/dist/cli/{compile-9y1w9zpj.js → compile-ndc36zna.js} +10 -7
  23. package/dist/cli/config/server.js +36 -6
  24. package/dist/cli/{db-5b4s1kvx.js → db-qbzjw3en.js} +2 -2
  25. package/dist/cli/{dev-hyeb89hp.js → dev-x49583aj.js} +43 -15
  26. package/dist/cli/{doctor-h55y9hj1.js → doctor-repprx92.js} +42 -12
  27. package/dist/cli/{emulatorDoctor-p3yt7140.js → emulatorDoctor-s1z5tkp7.js} +5 -5
  28. package/dist/cli/{emulatorInstaller-4pm2kx9w.js → emulatorInstaller-pgkdswvq.js} +6 -6
  29. package/dist/cli/{env-snb0597q.js → env-5nz1qm8e.js} +3 -3
  30. package/dist/cli/{expoDevController-0vj8dvkh.js → expoDevController-018anvbm.js} +6 -6
  31. package/dist/cli/{generate-20x1pkf7.js → generate-brvjesd6.js} +8 -8
  32. package/dist/cli/{heapDiff-wqj8vrq8.js → heapDiff-kncvdtn8.js} +3 -3
  33. package/dist/cli/htmx/htmx.min.js +1 -1
  34. package/dist/cli/{htmx-6mz2h7k1.js → htmx-5twhjz7p.js} +7 -7
  35. package/dist/cli/{index-w09fzs9f.js → index-0z5fgb80.js} +1 -1
  36. package/dist/cli/{index-exfkpjja.js → index-125cfzvn.js} +2 -2
  37. package/dist/cli/{index-32ge2w1f.js → index-25e7k849.js} +16 -8
  38. package/dist/cli/{index-ys2rzqhg.js → index-2shf4aya.js} +1 -1
  39. package/dist/cli/{index-74m7kh8c.js → index-3ewt17wm.js} +1 -1
  40. package/dist/cli/{index-zd3cna19.js → index-3sfcmb49.js} +1 -1
  41. package/dist/cli/{index-14fbvz34.js → index-50ag35xg.js} +2 -2
  42. package/dist/cli/{index-h5qx5jpk.js → index-7854xf0m.js} +1 -1
  43. package/dist/cli/{index-3y57kd7x.js → index-8khbn8qr.js} +3 -3
  44. package/dist/cli/{index-xw1byvzp.js → index-9djrap79.js} +1 -1
  45. package/dist/cli/{index-ppphkyps.js → index-a6xx0p9e.js} +1 -1
  46. package/dist/cli/{index-g4ehq6ev.js → index-aemhvvwb.js} +1 -1
  47. package/dist/cli/{index-z6f43b20.js → index-b1wht4q5.js} +1 -1
  48. package/dist/cli/{index-s3xvccq3.js → index-btp4fyf1.js} +2 -2
  49. package/dist/cli/{index-066qhc6n.js → index-cgmp9d02.js} +1 -1
  50. package/dist/cli/{index-3wz3mktm.js → index-gyjxrnnz.js} +1 -1
  51. package/dist/cli/index-jwfambwe.js +13 -0
  52. package/dist/cli/{index-3wm8p7rg.js → index-n6faa3m3.js} +1 -1
  53. package/dist/cli/{index-kye08pjx.js → index-pr1skxen.js} +1 -1
  54. package/dist/cli/{index-t8cf0zj9.js → index-prza6tkp.js} +3 -3
  55. package/dist/cli/{index-qbrzvmh9.js → index-q3snnhyd.js} +1 -1
  56. package/dist/cli/{index-3vmc30gf.js → index-rz56x932.js} +1 -1
  57. package/dist/cli/{index-9sksd8c8.js → index-vh68jb0e.js} +2 -2
  58. package/dist/cli/index.js +32 -32
  59. package/dist/cli/{info-mn125212.js → info-k124sh7g.js} +4 -4
  60. package/dist/cli/{inspect-c7s117j0.js → inspect-n6pcfvfw.js} +5 -5
  61. package/dist/cli/{iosNativeWatcher-0nm6qad5.js → iosNativeWatcher-wdq2fvj1.js} +7 -7
  62. package/dist/cli/{iosSimulatorController-hza2c3rv.js → iosSimulatorController-n97dpa8p.js} +7 -7
  63. package/dist/cli/{islands-dc54e5y1.js → islands-p4vgx7a2.js} +3 -3
  64. package/dist/cli/{logs-ej1add2b.js → logs-shg23fbt.js} +3 -3
  65. package/dist/cli/{ls-b6zz24nt.js → ls-0hfx323m.js} +3 -3
  66. package/dist/cli/{mem-5q7n3ymb.js → mem-16sy1707.js} +5 -5
  67. package/dist/cli/{migrate-6nm4kdf6.js → migrate-k91k050s.js} +2 -2
  68. package/dist/cli/{mobile-ajnnvqtv.js → mobile-nqdkk3gd.js} +13 -13
  69. package/dist/cli/prerender-010z771p.js +10 -0
  70. package/dist/cli/{prettier-phdtvqef.js → prettier-dh5fh786.js} +1 -1
  71. package/dist/cli/{ps-ezmzyscn.js → ps-pk7ncjac.js} +6 -6
  72. package/dist/cli/{psTui-3x3ykjve.js → psTui-50wf0b72.js} +7 -7
  73. package/dist/cli/{remoteMacProtocol-g09myqt5.js → remoteMacProtocol-g10s408w.js} +7 -7
  74. package/dist/cli/{remove-t8x1mrxg.js → remove-abaf0w6k.js} +8 -8
  75. package/dist/cli/{routes-3xj256gx.js → routes-mc3ymp8t.js} +3 -3
  76. package/dist/cli/{start-d6p831ny.js → start-t3cq57wn.js} +5 -5
  77. package/dist/cli/{typecheck-stbt0qt5.js → typecheck-209bemxm.js} +17 -4
  78. package/dist/cli/{workspace-61hh6jq1.js → workspace-7sbyyc59.js} +5 -5
  79. package/dist/client/chunks/islands-s2ta5ajb.js.map +1 -1
  80. package/dist/client/navigation.js +2 -1
  81. package/dist/client/navigation.js.map +3 -3
  82. package/dist/dev/client/domTracker.ts +52 -19
  83. package/dist/dev/client/frameworkDetect.ts +11 -0
  84. package/dist/dev/client/handlers/html.ts +6 -1
  85. package/dist/dev/client/handlers/htmx.ts +6 -1
  86. package/dist/dev/client/hmrClient.ts +10 -0
  87. package/dist/dev/serverBootstrap.js +112 -6
  88. package/dist/index.js +1147 -757
  89. package/dist/index.js.map +32 -30
  90. package/dist/islands/index.js +16 -5
  91. package/dist/islands/index.js.map +6 -6
  92. package/dist/mobile/index.js +2 -2
  93. package/dist/mobile/index.js.map +3 -3
  94. package/dist/react/components/index.js +2 -2
  95. package/dist/react/components/index.js.map +3 -3
  96. package/dist/react/index.js +85 -18
  97. package/dist/react/index.js.map +11 -11
  98. package/dist/react/server.js +71 -15
  99. package/dist/react/server.js.map +8 -8
  100. package/dist/src/angular/baseHref.d.ts +2 -0
  101. package/dist/src/angular/components/constants.d.ts +1 -0
  102. package/dist/src/angular/ssrRender.d.ts +1 -1
  103. package/dist/src/build/compileAngular.d.ts +15 -0
  104. package/dist/src/build/resolveBuildMode.d.ts +6 -0
  105. package/dist/src/build/scanAngularHandlerCalls.d.ts +3 -1
  106. package/dist/src/build/verifyAngularCoreUniqueness.d.ts +3 -1
  107. package/dist/src/cli/htmx/install.d.ts +1 -1
  108. package/dist/src/cli/typeGraphCoherence.d.ts +9 -2
  109. package/dist/src/constants.d.ts +1 -0
  110. package/dist/src/core/appErrorHooks.d.ts +8 -0
  111. package/dist/src/core/islandPageContext.d.ts +5 -1
  112. package/dist/src/core/requestContext.d.ts +5 -0
  113. package/dist/src/core/serverOnlyStaticFiles.d.ts +7 -0
  114. package/dist/src/dev/editorTempFiles.d.ts +3 -0
  115. package/dist/src/dev/hot/analyze.d.ts +1 -1
  116. package/dist/src/dev/hot/runtime.d.ts +20 -0
  117. package/dist/src/dev/importCost/instrument.d.ts +1 -1
  118. package/dist/src/dev/rebuildTrigger.d.ts +1 -0
  119. package/dist/src/utils/cleanStaleOutputs.d.ts +4 -1
  120. package/dist/src/utils/logger.d.ts +3 -2
  121. package/dist/src/utils/resolveConvention.d.ts +1 -0
  122. package/dist/src/utils/ssrErrorPage.d.ts +3 -0
  123. package/dist/svelte/index.js +85 -18
  124. package/dist/svelte/index.js.map +11 -11
  125. package/dist/svelte/router/Route.svelte.d.ts +1 -2
  126. package/dist/svelte/router/Router.svelte +2 -4
  127. package/dist/svelte/server.js +73 -16
  128. package/dist/svelte/server.js.map +9 -9
  129. package/dist/types/globals.d.ts +3 -0
  130. package/dist/types/svelteRouter.ts +3 -12
  131. package/dist/vue/components/Image.js +2 -2
  132. package/dist/vue/components/Image.js.map +3 -3
  133. package/dist/vue/components/index.js +2 -2
  134. package/dist/vue/components/index.js.map +3 -3
  135. package/dist/vue/index.js +158 -91
  136. package/dist/vue/index.js.map +12 -12
  137. package/dist/vue/server.js +144 -88
  138. package/dist/vue/server.js.map +9 -9
  139. package/package.json +1 -1
  140. package/dist/cli/prerender-fqpp0m1j.js +0 -10
  141. /package/dist/cli/{index-vtp20gwf.js → index-2bxfhs32.js} +0 -0
  142. /package/dist/cli/{index-fgz435qn.js → index-t8jmj8w1.js} +0 -0
@@ -3,24 +3,24 @@ import {
3
3
  isFrameworkKey,
4
4
  frameworks,
5
5
  resolveProject
6
- } from "./index-qbrzvmh9.js";
6
+ } from "./index-q3snnhyd.js";
7
7
  import {
8
8
  applyAbsoluteConfigEdit
9
- } from "./index-z6f43b20.js";
9
+ } from "./index-b1wht4q5.js";
10
10
  import"./index-wk0pyxrg.js";
11
- import"./index-fgz435qn.js";
11
+ import"./index-t8jmj8w1.js";
12
12
  import {
13
13
  findRoutingFile
14
- } from "./index-3wz3mktm.js";
14
+ } from "./index-gyjxrnnz.js";
15
15
  import {
16
16
  colors
17
- } from "./index-xw1byvzp.js";
17
+ } from "./index-9djrap79.js";
18
18
  import {
19
19
  frameworkDependencyNames
20
20
  } from "./index-jjfbjv1z.js";
21
- import"./index-exfkpjja.js";
22
- import"./index-74m7kh8c.js";
23
- import"./index-kye08pjx.js";
21
+ import"./index-125cfzvn.js";
22
+ import"./index-3ewt17wm.js";
23
+ import"./index-pr1skxen.js";
24
24
 
25
25
  // src/cli/scripts/remove.ts
26
26
  import { existsSync, readFileSync } from "fs";
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import"./index-71gchbzt.js";
3
- import"./index-fgz435qn.js";
3
+ import"./index-t8jmj8w1.js";
4
4
  import {
5
5
  colors,
6
6
  padLine
7
- } from "./index-xw1byvzp.js";
7
+ } from "./index-9djrap79.js";
8
8
  import {
9
9
  discoverInstances,
10
10
  enrichInstances
11
- } from "./index-g4ehq6ev.js";
11
+ } from "./index-aemhvvwb.js";
12
12
 
13
13
  // src/cli/scripts/routes.ts
14
14
  var METHOD_COLOR = {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  start2
4
- } from "./index-32ge2w1f.js";
4
+ } from "./index-25e7k849.js";
5
5
  import"./index-rervww4p.js";
6
6
  import"./index-z794p5qg.js";
7
7
  import"./index-71gchbzt.js";
@@ -11,10 +11,10 @@ import"./index-43a1vvb7.js";
11
11
  import"./index-t7yf3vxs.js";
12
12
  import"./index-s0r5q839.js";
13
13
  import"./index-pch0v1z6.js";
14
- import"./index-exfkpjja.js";
15
- import"./index-74m7kh8c.js";
16
- import"./index-kye08pjx.js";
17
- import"./index-fgz435qn.js";
14
+ import"./index-125cfzvn.js";
15
+ import"./index-3ewt17wm.js";
16
+ import"./index-pr1skxen.js";
17
+ import"./index-t8jmj8w1.js";
18
18
  export {
19
19
  start2 as start
20
20
  };
@@ -7,7 +7,7 @@ import {
7
7
  } from "./index-wk0pyxrg.js";
8
8
  import {
9
9
  ANSI_ESCAPE_CODE
10
- } from "./index-fgz435qn.js";
10
+ } from "./index-t8jmj8w1.js";
11
11
  import {
12
12
  ensureFileRouteModule
13
13
  } from "./index-qw98g1p6.js";
@@ -17,9 +17,9 @@ import {
17
17
  } from "./index-tx0kx9zx.js";
18
18
  import {
19
19
  DEFAULT_SERVER_ENTRY
20
- } from "./index-exfkpjja.js";
21
- import"./index-74m7kh8c.js";
22
- import"./index-kye08pjx.js";
20
+ } from "./index-125cfzvn.js";
21
+ import"./index-3ewt17wm.js";
22
+ import"./index-pr1skxen.js";
23
23
 
24
24
  // src/cli/scripts/typecheck.ts
25
25
  import { join as join2, parse as parse3, relative as relative2, resolve as resolve3 } from "path";
@@ -1107,6 +1107,17 @@ const writeFile = ts.sys.writeFile;
1107
1107
  ts.sys.writeFile = (file, data, bom) => {
1108
1108
  if (resolve(file).startsWith(allowed)) writeFile(file, data, bom);
1109
1109
  };
1110
+ // svelte2tsx emits a component with no <script> as JavaScript, and that
1111
+ // declaration references SvelteComponent without importing it. An empty TS
1112
+ // instance script gives it the same declaration a TS component gets.
1113
+ const readFile = ts.sys.readFile;
1114
+ ts.sys.readFile = (file, encoding) => {
1115
+ const code = readFile(file, encoding);
1116
+ if (code === undefined || !file.endsWith('.svelte') || /<script[\\s>]/.test(code))
1117
+ return code;
1118
+
1119
+ return '<script lang="ts"></script>\\n' + code;
1120
+ };
1110
1121
  const { emitDts } = require(svelte2tsxPath);
1111
1122
  emitDts({
1112
1123
  declarationDir: stagingDir,
@@ -1154,6 +1165,7 @@ var fingerprintOf = (svelteDir, tsconfigPath, svelte2tsxPath) => {
1154
1165
  const inputs = [
1155
1166
  ...collectInputs(svelteDir).sort(),
1156
1167
  readFileSync2(tsconfigPath, "utf-8"),
1168
+ EMIT_SCRIPT,
1157
1169
  svelte2tsxPath,
1158
1170
  existsSync2(svelte2tsxManifest) ? readFileSync2(svelte2tsxManifest, "utf-8") : ""
1159
1171
  ];
@@ -1515,6 +1527,7 @@ var buildSvelteCheck = async (cacheDir, svelteDir) => {
1515
1527
  }
1516
1528
  const svelteTsconfigPath = join2(cacheDir, "tsconfig.svelte-check.json");
1517
1529
  await writeFile2(svelteTsconfigPath, JSON.stringify({
1530
+ compilerOptions: { allowJs: true },
1518
1531
  extends: resolve3("tsconfig.json"),
1519
1532
  files: ABSOLUTE_TYPECHECK_FILES,
1520
1533
  include: [
@@ -25,7 +25,7 @@ import {
25
25
  WORKSPACE_TUI_STATUS_WIDTH,
26
26
  WORKSPACE_TUI_TARGET_PADDING_WIDTH,
27
27
  WORKSPACE_TUI_VISIBILITY_WIDTH
28
- } from "./index-fgz435qn.js";
28
+ } from "./index-t8jmj8w1.js";
29
29
  import {
30
30
  getWorkspaceServices,
31
31
  loadRawConfig
@@ -45,16 +45,16 @@ import {
45
45
  stripAnsi,
46
46
  truncateText,
47
47
  wrapText
48
- } from "./index-xw1byvzp.js";
48
+ } from "./index-9djrap79.js";
49
49
  import {
50
50
  DEFAULT_SERVER_ENTRY,
51
51
  isWSLEnvironment,
52
52
  killStaleProcesses
53
- } from "./index-exfkpjja.js";
54
- import"./index-74m7kh8c.js";
53
+ } from "./index-125cfzvn.js";
54
+ import"./index-3ewt17wm.js";
55
55
  import {
56
56
  getDurationString
57
- } from "./index-kye08pjx.js";
57
+ } from "./index-pr1skxen.js";
58
58
 
59
59
  // src/cli/scripts/workspace.ts
60
60
  import {
@@ -7,7 +7,7 @@
7
7
  "/* Dependency-free access to the current request's CSP nonce, for code that\n * also ships to the browser (streaming slots, Angular components) and so\n * can't import the server's request context. `secureHeaders()` registers\n * the getter (src/core/cspNonce.ts); in the browser, or with secure headers\n * off, there is none and these return undefined / ''. */\n\nconst GETTER_KEY = Symbol.for('absolutejs.cspNonceGetter');\n\n/** ` nonce=\"…\"` for an inline <script>/<style> tag, or '' without one. */\nexport const nonceAttr = (nonce: string | undefined = readCspNonce()) =>\n\tnonce ? ` nonce=\"${nonce}\"` : '';\n\n/** Adds the nonce to the <style id=\"svelte-…\"> tags Svelte renders into the\n * head for components compiled with injected CSS. Only those: a <style>\n * that arrived through {@html} stays without one. */\nexport const nonceSvelteHeadStyles = (\n\thead: string,\n\tnonce: string | undefined = readCspNonce()\n) =>\n\tnonce\n\t\t? head.replace(\n\t\t\t\t/<style(?=\\s+id=\"svelte-[^\"]*\")(?![^>]*\\snonce=)/g,\n\t\t\t\t`<style nonce=\"${nonce}\"`\n\t\t\t)\n\t\t: head;\n\nexport const readCspNonce = () => {\n\tconst getter: unknown = Reflect.get(globalThis, GETTER_KEY);\n\tif (typeof getter !== 'function') return undefined;\n\tconst nonce: unknown = getter();\n\n\treturn typeof nonce === 'string' ? nonce : undefined;\n};\n\nexport const registerCspNonceGetter = (getter: () => string | undefined) => {\n\tReflect.set(globalThis, GETTER_KEY, getter);\n};\n",
8
8
  "/**\n * Utility for registering client-side scripts that need to run after Angular SSR hydration.\n *\n * This is necessary because Angular's lifecycle hooks don't always run reliably on the client\n * after SSR hydration, especially for event listeners attached to DOM elements.\n *\n * Usage in Angular components:\n * ```typescript\n * import { registerClientScript } from '@absolutejs/absolute';\n *\n * // Register an event listener script\n * registerClientScript(() => {\n * const element = document.querySelector('.my-element');\n * if (element) {\n * element.addEventListener('click', () => {\n * console.log('Clicked!');\n * });\n * }\n * });\n * ```\n *\n * The script will be automatically injected into the HTML response and executed on the client.\n */\n\nimport { nonceAttr } from './cspNonceRef';\n\n// Request-scoped registry for client scripts\n// Each request gets its own set of scripts to inject\nconst scriptRegistry = new Map<string, Set<() => void>>();\n\n// Generate a unique request ID for tracking scripts per request\nlet requestCounter = 0;\nconst getRequestId = () => `req_${Date.now()}_${++requestCounter}`;\n\n// Allow SSR frameworks to inject a request context getter (e.g. AsyncLocalStorage)\nlet ssrContextGetter: (() => string | undefined) | null = null;\nexport const getSsrContextId = () =>\n\tssrContextGetter?.() ||\n\tObject.getOwnPropertyDescriptor(globalThis, '__absolutejs_requestId')\n\t\t?.value;\nexport const registerClientScript = (\n\tscript: () => void,\n\trequestId?: string\n) => {\n\t// Try to get requestId from explicit arg, then Async Context, then global fallback\n\tconst id = requestId || getSsrContextId() || getRequestId();\n\n\tif (!scriptRegistry.has(id)) {\n\t\tscriptRegistry.set(id, new Set());\n\t}\n\n\tscriptRegistry.get(id)?.add(script);\n\n\treturn id;\n};\nexport const setSsrContextGetter = (getter: () => string | undefined) => {\n\tssrContextGetter = getter;\n};\n\n// Make registerClientScript available globally during SSR for Angular components\n// Using type assertion for globalThis extension\nif (typeof globalThis !== 'undefined') {\n\tObject.assign(globalThis, { registerClientScript });\n}\n\n/**\n * Get all registered scripts for a request and clear them.\n * This is called by the page handler after rendering.\n *\n * @param requestId - The request ID to get scripts for\n * @returns Array of script functions, or empty array if none registered\n */\nexport const clearAllClientScripts = () => {\n\tscriptRegistry.clear();\n};\nexport const generateClientScriptCode = (scripts: (() => void)[]) => {\n\tif (scripts.length === 0) {\n\t\treturn '';\n\t}\n\n\t// Convert functions to strings and wrap in IIFE\n\tconst scriptCode = scripts\n\t\t.map((script, index) => {\n\t\t\t// Get the function body as a string\n\t\t\tconst funcString = script.toString();\n\n\t\t\t// Extract the body (everything between { and })\n\t\t\tconst bodyMatch = funcString.match(/\\{([\\s\\S]*)\\}/);\n\t\t\tif (!bodyMatch || !bodyMatch[1]) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\tconst body = bodyMatch[1].trim();\n\n\t\t\t// Wrap in IIFE with MutationObserver for DOM readiness\n\t\t\treturn `\n\t(function() {\n\t\tvar executed = false;\n\t\tfunction executeScript_${index}() {\n\t\t\tif (executed) return;\n\t\t\texecuted = true;\n\t\t\t${body}\n\t\t}\n\n\t\tif (document.readyState === 'complete' || document.readyState === 'interactive') {\n\t\t\texecuteScript_${index}();\n\t\t} else {\n\t\t\tdocument.addEventListener('DOMContentLoaded', executeScript_${index});\n\t\t}\n\n\t\t// Watch for hydration-added elements\n\t\tvar observer = new MutationObserver(function() {\n\t\t\texecuteScript_${index}();\n\t\t\tif (executed) observer.disconnect();\n\t\t});\n\t\tif (!executed) {\n\t\t\tobserver.observe(document.body || document.documentElement, { childList: true, subtree: true });\n\t\t}\n\n\t\t// Single fallback timeout\n\t\tsetTimeout(function() {\n\t\t\texecuteScript_${index}();\n\t\t\tobserver.disconnect();\n\t\t}, 1000);\n\t})();`;\n\t\t})\n\t\t.join('\\n');\n\n\treturn `<script${nonceAttr()}>\n(function() {\n${scriptCode}\n})();\n</script>`;\n};\nexport const getAndClearClientScripts = (requestId?: string) => {\n\tconst id = requestId || ssrContextGetter?.();\n\tif (!id) return [];\n\n\tconst scripts = scriptRegistry.get(id);\n\tif (!scripts) {\n\t\treturn [];\n\t}\n\n\tconst scriptArray = Array.from(scripts);\n\tscriptRegistry.delete(id);\n\n\treturn scriptArray;\n};\n",
9
9
  "import { nonceAttr } from '../utils/cspNonceRef';\nimport { TRANSLATABLE_ATTRIBUTES } from '../client/browserTranslationAttributes';\n\nconst BASELINE_MARKER = '__ABSOLUTE_SSR_TEXT_BASELINES__';\n\n/** Inline this after SSR markup and before any client entry executes. The\n * snapshot records server-authored text while keeping it out of the DOM, so\n * browser translation remains free to edit the rendered text. */\nexport const BROWSER_TRANSLATION_BASELINE_SCRIPT =\n\t'window.__ABSOLUTE_SSR_TEXT_BASELINES__=new WeakMap();' +\n\t'window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__=new WeakMap();' +\n\t'{const r=document.body,b=window.__ABSOLUTE_SSR_TEXT_BASELINES__,' +\n\t'a=window.__ABSOLUTE_SSR_ATTRIBUTE_BASELINES__;' +\n\t'if(r)for(const e of [r,...r.querySelectorAll(\"*\")]){' +\n\t'const t=new Map();for(const [i,n]of[...e.childNodes].entries())' +\n\t'if(n.nodeType===3)t.set(i,n.nodeValue??\"\");if(t.size)b.set(e,t);' +\n\t`const v=new Map();for(const k of ${JSON.stringify(TRANSLATABLE_ATTRIBUTES)}){` +\n\t'const s=e.getAttribute(k);if(s!==null)v.set(k,s);}if(v.size)a.set(e,v);}}';\n\nexport const browserTranslationBaselineTag = () =>\n\t`<script${nonceAttr()}>${BROWSER_TRANSLATION_BASELINE_SCRIPT}</script>`;\n\nexport const injectBrowserTranslationBaseline = (html: string) => {\n\tif (html.includes(BASELINE_MARKER)) return html;\n\tconst script = browserTranslationBaselineTag();\n\tconst closingBodyIndex = html.lastIndexOf('</body>');\n\tif (closingBodyIndex < 0) return `${html}${script}`;\n\n\treturn `${html.slice(0, closingBodyIndex)}${script}${html.slice(closingBodyIndex)}`;\n};\n",
10
- "import { escapeScriptContent } from '../utils/escapeScriptContent';\nimport { nonceAttr, readCspNonce } from '../utils/cspNonceRef';\nimport type { EnvironmentProviders, Provider, Type } from '@angular/core';\nimport type { BootstrapContext } from '@angular/platform-browser';\nimport type { AngularDeps, CachedRouteData } from '../../types/angular';\nimport {\n\tgetAndClearClientScripts,\n\tgenerateClientScriptCode\n} from '../utils/registerClientScript';\nimport { browserTranslationBaselineTag } from '../core/browserTranslation';\nimport { buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';\nimport { buildRequestProviders } from './requestProviders';\nimport { isAngularZoneMode } from './zoneRuntime';\n\n// --- Last-used requestContext cache for HMR ---\n// Stores { requestContext, headTag } from the most recent real request per\n// route so HMR re-renders with the same data the user last saw.\n\nconst routeContextCache = new Map<string, CachedRouteData>();\n\nexport const cacheRouteData = (pagePath: string, data: CachedRouteData) => {\n\tconst cacheKey = pagePath.split('?')[0] ?? pagePath;\n\trouteContextCache.set(cacheKey, data);\n};\nexport const getCachedRouteData = (pagePath: string) =>\n\trouteContextCache.get(pagePath);\n\n// --- Selector cache ---\n\nconst selectorCache = new Map<string, string>();\nexport const buildProviders = (\n\tdeps: AngularDeps,\n\tsanitizer: InstanceType<AngularDeps['DomSanitizer']>,\n\trequest: Request | undefined,\n\trequestContext: unknown,\n\tresponseInit: ResponseInit | undefined,\n\tuserProviders: ReadonlyArray<Provider | EnvironmentProviders> = []\n) => [\n\tdeps.provideServerRendering(),\n\tdeps.provideClientHydration(\n\t\tdeps.withHttpTransferCacheOptions(\n\t\t\tbuildAbsoluteHttpTransferCacheOptions()\n\t\t)\n\t),\n\tisAngularZoneMode()\n\t\t? deps.provideZoneChangeDetection({ eventCoalescing: true })\n\t\t: deps.provideZonelessChangeDetection(),\n\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t{ provide: deps.DomSanitizer, useValue: sanitizer },\n\t{ provide: deps.Sanitizer, useValue: sanitizer },\n\t...buildRequestProviders(deps, request, requestContext, responseInit),\n\t...userProviders\n];\nexport const clearSelectorCache = () => selectorCache.clear();\n\nexport const resolveSelector = (\n\tdeps: AngularDeps,\n\tpagePath: string,\n\tPageComponent: Type<unknown>\n) => {\n\tconst cached = selectorCache.get(pagePath);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst selector =\n\t\tdeps.reflectComponentType(PageComponent)?.selector ?? 'ng-app';\n\tselectorCache.set(pagePath, selector);\n\n\treturn selector;\n};\n\n// --- Inject HTML helper ---\n\nconst injectBeforeClose = (html: string, snippet: string) => {\n\tif (html.includes('</body>')) {\n\t\treturn html.replace('</body>', `${snippet}</body>`);\n\t}\n\tif (html.includes('</html>')) {\n\t\treturn html.replace('</html>', `${snippet}</html>`);\n\t}\n\n\treturn html + snippet;\n};\n\n// --- Post-render HTML injection ---\n\nexport const injectSsrScripts = (\n\thtml: string,\n\trequestId: string,\n\tindexPath: string,\n\trequestContext?: unknown\n) => {\n\tlet result = injectBeforeClose(html, browserTranslationBaselineTag());\n\n\tconst registeredScripts = getAndClearClientScripts(requestId);\n\tif (registeredScripts.length > 0) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\tgenerateClientScriptCode(registeredScripts)\n\t\t);\n\t}\n\n\tif (requestContext !== undefined) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>window.__ABS_ANGULAR_REQUEST_CONTEXT__ = ${escapeScriptContent(JSON.stringify(requestContext))};</script>`\n\t\t);\n\t}\n\n\tif (indexPath) {\n\t\tconst escapedIndexPath = JSON.stringify(indexPath);\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>import(${escapeScriptContent(escapedIndexPath)});</script>`\n\t\t);\n\t}\n\n\treturn result;\n};\nexport const renderAngularApp = async (\n\tdeps: AngularDeps,\n\tPageComponent: Type<unknown>,\n\tproviders: (Provider | EnvironmentProviders)[],\n\tdocument: string | Document,\n\turl: string = '/'\n) => {\n\t// Angular writes this nonce on its own <style> and event-replay\n\t// scripts when secureHeaders() is on.\n\tconst nonce = readCspNonce();\n\tconst cspProviders = nonce\n\t\t? [{ provide: deps.CSP_NONCE, useValue: nonce }]\n\t\t: [];\n\tconst bootstrap = (context: BootstrapContext) =>\n\t\tdeps.bootstrapApplication(\n\t\t\tPageComponent,\n\t\t\t{ providers: [...providers, ...cspProviders] },\n\t\t\tcontext\n\t\t);\n\n\treturn withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(bootstrap, {\n\t\t\tdocument,\n\t\t\tplatformProviders: [],\n\t\t\turl\n\t\t})\n\t);\n};\nexport const withSuppressedAngularDevLogs = async <T>(\n\trender: () => Promise<T>\n) => {\n\tconst origLog = console.log;\n\tconsole.log = (...args: unknown[]) => {\n\t\tif (\n\t\t\ttypeof args[0] === 'string' &&\n\t\t\targs[0].includes('development mode')\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\torigLog.apply(console, args);\n\t};\n\n\ttry {\n\t\treturn await render();\n\t} finally {\n\t\tconsole.log = origLog;\n\t}\n};\n",
10
+ "import { escapeScriptContent } from '../utils/escapeScriptContent';\nimport { nonceAttr, readCspNonce } from '../utils/cspNonceRef';\nimport type { EnvironmentProviders, Provider, Type } from '@angular/core';\nimport type { BootstrapContext } from '@angular/platform-browser';\nimport type { AngularDeps, CachedRouteData } from '../../types/angular';\nimport {\n\tgetAndClearClientScripts,\n\tgenerateClientScriptCode\n} from '../utils/registerClientScript';\nimport { browserTranslationBaselineTag } from '../core/browserTranslation';\nimport { buildAbsoluteHttpTransferCacheOptions } from './httpTransferCache';\nimport { buildRequestProviders } from './requestProviders';\nimport { isAngularZoneMode } from './zoneRuntime';\n\n// --- Last-used requestContext cache for HMR ---\n// Stores { requestContext, headTag } from the most recent real request per\n// route so HMR re-renders with the same data the user last saw.\n\nconst routeContextCache = new Map<string, CachedRouteData>();\n\nexport const cacheRouteData = (pagePath: string, data: CachedRouteData) => {\n\tconst cacheKey = pagePath.split('?')[0] ?? pagePath;\n\trouteContextCache.set(cacheKey, data);\n};\nexport const getCachedRouteData = (pagePath: string) =>\n\trouteContextCache.get(pagePath);\n\n// --- Selector cache ---\n\nconst selectorCache = new Map<string, string>();\nexport const buildProviders = (\n\tdeps: AngularDeps,\n\tsanitizer: InstanceType<AngularDeps['DomSanitizer']>,\n\trequest: Request | undefined,\n\trequestContext: unknown,\n\tresponseInit: ResponseInit | undefined,\n\tuserProviders: ReadonlyArray<Provider | EnvironmentProviders> = []\n) => [\n\tdeps.provideServerRendering(),\n\tdeps.provideClientHydration(\n\t\tdeps.withHttpTransferCacheOptions(\n\t\t\tbuildAbsoluteHttpTransferCacheOptions()\n\t\t)\n\t),\n\tisAngularZoneMode()\n\t\t? deps.provideZoneChangeDetection({ eventCoalescing: true })\n\t\t: deps.provideZonelessChangeDetection(),\n\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t{ provide: deps.DomSanitizer, useValue: sanitizer },\n\t{ provide: deps.Sanitizer, useValue: sanitizer },\n\t...buildRequestProviders(deps, request, requestContext, responseInit),\n\t...userProviders\n];\nexport const clearSelectorCache = () => selectorCache.clear();\n\nexport const resolveSelector = (\n\tdeps: AngularDeps,\n\tpagePath: string,\n\tPageComponent: Type<unknown>\n) => {\n\tconst cached = selectorCache.get(pagePath);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst selector =\n\t\tdeps.reflectComponentType(PageComponent)?.selector ?? 'ng-app';\n\tselectorCache.set(pagePath, selector);\n\n\treturn selector;\n};\n\n// --- Inject HTML helper ---\n\nconst injectBeforeClose = (html: string, snippet: string) => {\n\tif (html.includes('</body>')) {\n\t\treturn html.replace('</body>', `${snippet}</body>`);\n\t}\n\tif (html.includes('</html>')) {\n\t\treturn html.replace('</html>', `${snippet}</html>`);\n\t}\n\n\treturn html + snippet;\n};\n\n// --- Post-render HTML injection ---\n\nexport const injectSsrScripts = (\n\thtml: string,\n\trequestId: string,\n\tindexPath: string,\n\trequestContext?: unknown,\n\tbaseHref?: string | null\n) => {\n\tlet result = injectBeforeClose(html, browserTranslationBaselineTag());\n\n\tconst registeredScripts = getAndClearClientScripts(requestId);\n\tif (registeredScripts.length > 0) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\tgenerateClientScriptCode(registeredScripts)\n\t\t);\n\t}\n\n\tif (requestContext !== undefined) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>window.__ABS_ANGULAR_REQUEST_CONTEXT__ = ${escapeScriptContent(JSON.stringify(requestContext))};</script>`\n\t\t);\n\t}\n\n\t// Read by the generated client bootstrap so the browser router uses\n\t// the same `APP_BASE_HREF` the server rendered with.\n\tif (baseHref) {\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>window.__ABS_ANGULAR_BASE_HREF__ = ${escapeScriptContent(JSON.stringify(baseHref))};</script>`\n\t\t);\n\t}\n\n\tif (indexPath) {\n\t\tconst escapedIndexPath = JSON.stringify(indexPath);\n\t\tresult = injectBeforeClose(\n\t\t\tresult,\n\t\t\t`<script${nonceAttr()}>import(${escapeScriptContent(escapedIndexPath)});</script>`\n\t\t);\n\t}\n\n\treturn result;\n};\nexport const renderAngularApp = async (\n\tdeps: AngularDeps,\n\tPageComponent: Type<unknown>,\n\tproviders: (Provider | EnvironmentProviders)[],\n\tdocument: string | Document,\n\turl: string = '/'\n) => {\n\t// Angular writes this nonce on its own <style> and event-replay\n\t// scripts when secureHeaders() is on.\n\tconst nonce = readCspNonce();\n\tconst cspProviders = nonce\n\t\t? [{ provide: deps.CSP_NONCE, useValue: nonce }]\n\t\t: [];\n\tconst bootstrap = (context: BootstrapContext) =>\n\t\tdeps.bootstrapApplication(\n\t\t\tPageComponent,\n\t\t\t{ providers: [...providers, ...cspProviders] },\n\t\t\tcontext\n\t\t);\n\n\treturn withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(bootstrap, {\n\t\t\tdocument,\n\t\t\tplatformProviders: [],\n\t\t\turl\n\t\t})\n\t);\n};\nexport const withSuppressedAngularDevLogs = async <T>(\n\trender: () => Promise<T>\n) => {\n\tconst origLog = console.log;\n\tconsole.log = (...args: unknown[]) => {\n\t\tif (\n\t\t\ttypeof args[0] === 'string' &&\n\t\t\targs[0].includes('development mode')\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\torigLog.apply(console, args);\n\t};\n\n\ttry {\n\t\treturn await render();\n\t} finally {\n\t\tconsole.log = origLog;\n\t}\n};\n",
11
11
  "import { getAngularDeps } from './angularDeps';\nimport { withSuppressedAngularDevLogs } from './ssrRender';\nimport { getSsrContextId } from '../utils/registerClientScript';\n\nconst angularIslandSelector = 'abs-angular-island';\n\nexport const getAngularIslandSelector = (_islandId: string) =>\n\tangularIslandSelector;\nexport const isAngularComponent = (\n\tvalue: unknown\n): value is import('@angular/core').Type<object> => typeof value === 'function';\n\nconst getSelectorFromRenderedIsland = (rootElement: HTMLElement) => {\n\tconst firstChild = rootElement.firstElementChild;\n\tif (!(firstChild instanceof HTMLElement)) {\n\t\treturn null;\n\t}\n\n\tconst selector = firstChild.tagName.toLowerCase();\n\n\treturn selector.length > 0 ? selector : null;\n};\n\nconst getClientAngularComponentSelector = (\n\tcomponent: import('@angular/core').Type<object>\n) => {\n\tconst maybeDef = Reflect.get(component, 'ɵcmp');\n\tif (typeof maybeDef !== 'object' || maybeDef === null) {\n\t\treturn null;\n\t}\n\n\tconst maybeSelectors = Reflect.get(maybeDef, 'selectors');\n\tif (!Array.isArray(maybeSelectors)) {\n\t\treturn null;\n\t}\n\n\tconst [firstSelectorGroup] = maybeSelectors;\n\tif (!Array.isArray(firstSelectorGroup)) {\n\t\treturn null;\n\t}\n\n\tconst [selector] = firstSelectorGroup;\n\n\treturn typeof selector === 'string' && selector.length > 0\n\t\t? selector\n\t\t: null;\n};\n\nconst createAngularIslandApp = async () => {\n\tconst { EnvironmentInjector, provideZonelessChangeDetection } =\n\t\tawait import('@angular/core');\n\tconst { createApplication } = await import('@angular/platform-browser');\n\tconst app = await createApplication({\n\t\tproviders: [provideZonelessChangeDetection()]\n\t});\n\tconst environmentInjector = app.injector.get(EnvironmentInjector);\n\n\treturn { app, environmentInjector };\n};\n\nlet angularIslandAppPromise: Promise<{\n\tapp: import('@angular/core').ApplicationRef;\n\tenvironmentInjector: import('@angular/core').EnvironmentInjector;\n}> | null = null;\n\nconst getAngularIslandApp = async () => {\n\tif (!angularIslandAppPromise) {\n\t\tangularIslandAppPromise = createAngularIslandApp();\n\t}\n\n\treturn angularIslandAppPromise;\n};\n\ntype AngularIslandWrapperMetadata = {\n\tdeps: Awaited<ReturnType<typeof getAngularDeps>>;\n\tpropsToken: import('@angular/core').InjectionToken<Record<string, unknown>>;\n\tselector: string;\n\tWrapperComponent: import('@angular/core').Type<object>;\n};\n\nconst wrapperMetadataCache = new Map<\n\tstring,\n\tPromise<AngularIslandWrapperMetadata>\n>();\nconst requestRenderCache = new Map<string, Map<string, string>>();\n\nconst getRequestRenderCache = () => {\n\tconst requestId = getSsrContextId();\n\tif (!requestId) {\n\t\treturn null;\n\t}\n\n\tconst cached = requestRenderCache.get(requestId);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst renderCache = new Map<string, string>();\n\trequestRenderCache.set(requestId, renderCache);\n\n\treturn renderCache;\n};\n\nconst getAngularIslandWrapperKey = (\n\tcomponent: import('@angular/core').Type<object>,\n\t_islandId: string\n) => {\n\tconst componentName =\n\t\ttypeof component.name === 'string' && component.name.length > 0\n\t\t\t? component.name\n\t\t\t: 'AngularIsland';\n\n\treturn `${componentName}:${angularIslandSelector}`;\n};\n\nconst getIslandRenderCacheKey = (\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Record<string, unknown>\n) => {\n\tconst componentName =\n\t\ttypeof component.name === 'string' && component.name.length > 0\n\t\t\t? component.name\n\t\t\t: 'AngularIsland';\n\n\treturn `${componentName}:${JSON.stringify(props)}`;\n};\n\nconst buildAngularIslandWrapperMetadata = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tislandId: string,\n\twrapperKey: string\n) => {\n\t// Resolve Angular through getAngularDeps so the wrapper is built with the\n\t// SAME Angular instance that renders it. In production server-side imports\n\t// point at the pre-linked Angular vendor bundle; bare `@angular/*` imports\n\t// here would instead resolve to node_modules, giving the wrapper component\n\t// (its decorator, InjectionToken and inject) a different Angular instance\n\t// than the render pipeline's injector — every cross-instance token lookup\n\t// then fails with NG0201. (Dev uses a single node_modules Angular, so this\n\t// only manifests in production.)\n\tconst deps = await getAngularDeps();\n\tconst { Component, InjectionToken, NgComponentOutlet, inject } = deps;\n\tconst selector = getAngularIslandSelector(islandId);\n\tconst propsToken = new InjectionToken<Record<string, unknown>>(\n\t\t`${wrapperKey}:props`\n\t);\n\n\tclass AngularIslandWrapperComponent {\n\t\tcomponent = component;\n\t\tprops = inject(propsToken);\n\t}\n\n\treturn {\n\t\tdeps,\n\t\tpropsToken,\n\t\tselector,\n\t\tWrapperComponent: Component({\n\t\t\timports: [NgComponentOutlet, component],\n\t\t\tselector,\n\t\t\tstandalone: true,\n\t\t\ttemplate:\n\t\t\t\t'<ng-container *ngComponentOutlet=\"component; inputs: props\"></ng-container>'\n\t\t})(AngularIslandWrapperComponent)\n\t};\n};\n\nconst createAngularIslandWrapper = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tislandId: string\n) => {\n\tconst wrapperKey = getAngularIslandWrapperKey(component, islandId);\n\tconst cached = wrapperMetadataCache.get(wrapperKey);\n\tif (cached) {\n\t\treturn cached;\n\t}\n\n\tconst metadataPromise = buildAngularIslandWrapperMetadata(\n\t\tcomponent,\n\t\tislandId,\n\t\twrapperKey\n\t);\n\n\twrapperMetadataCache.set(wrapperKey, metadataPromise);\n\n\treturn metadataPromise;\n};\n\nconst extractAngularIslandRoot = (html: string, selector: string) => {\n\tconst openTag = `<${selector}`;\n\tconst start = html.indexOf(openTag);\n\tif (start < 0) {\n\t\tthrow new Error(`Could not find Angular island root \"${selector}\".`);\n\t}\n\n\tconst endTag = `</${selector}>`;\n\tconst end = html.indexOf(endTag, start);\n\tif (end < 0) {\n\t\tthrow new Error(`Could not close Angular island root \"${selector}\".`);\n\t}\n\n\treturn html.slice(start, end + endTag.length);\n};\n\nexport const mountAngularIsland = async <Props extends Record<string, unknown>>(\n\tcomponent: import('@angular/core').Type<object>,\n\telement: HTMLElement,\n\tprops: Props,\n\tislandId: string\n) => {\n\tawait import('@angular/compiler');\n\tconst { createComponent, inputBinding } = await import('@angular/core');\n\tconst selector = getAngularIslandSelector(islandId);\n\tconst { app, environmentInjector } = await getAngularIslandApp();\n\n\tlet rootElement = element.querySelector(selector);\n\tif (!(rootElement instanceof HTMLElement)) {\n\t\telement.innerHTML = `<${selector}></${selector}>`;\n\t\trootElement = element.querySelector(selector);\n\t}\n\tif (!(rootElement instanceof HTMLElement)) return app;\n\n\tconst componentSelector =\n\t\tgetClientAngularComponentSelector(component) ??\n\t\tgetSelectorFromRenderedIsland(rootElement);\n\tif (!componentSelector) return app;\n\n\trootElement.innerHTML = `<${componentSelector}></${componentSelector}>`;\n\tconst hostElement = rootElement.querySelector(componentSelector);\n\tif (!(hostElement instanceof HTMLElement)) return app;\n\n\tconst bindings = Object.entries(props).map(([key, value]) =>\n\t\tinputBinding(key, () => value)\n\t);\n\tconst componentRef = createComponent(component, {\n\t\tbindings,\n\t\tenvironmentInjector,\n\t\thostElement\n\t});\n\tapp.attachView(componentRef.hostView);\n\tcomponentRef.changeDetectorRef.detectChanges();\n\twindow.__ABS_ANGULAR_ISLAND_APPS__ ??= [];\n\twindow.__ABS_ANGULAR_ISLAND_APPS__.push(app);\n\n\treturn app;\n};\nexport const renderAngularIslandToHtml = async <\n\tProps extends Record<string, unknown>\n>(\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Props,\n\tislandId: string\n) => {\n\tconst requestCache = getRequestRenderCache();\n\tconst renderCacheKey = getIslandRenderCacheKey(component, props);\n\tconst cachedHtml = requestCache?.get(renderCacheKey);\n\tif (cachedHtml) {\n\t\treturn cachedHtml;\n\t}\n\n\tconst { deps, propsToken, selector, WrapperComponent } =\n\t\tawait createAngularIslandWrapper(component, islandId);\n\n\tconst providers: (\n\t\t| import('@angular/core').Provider\n\t\t| import('@angular/core').EnvironmentProviders\n\t)[] = [\n\t\tdeps.provideServerRendering(),\n\t\tdeps.provideZonelessChangeDetection(),\n\t\t{ provide: deps.APP_BASE_HREF, useValue: '/' },\n\t\t{ provide: propsToken, useValue: props }\n\t];\n\tconst document = `<!DOCTYPE html><html><body><${selector}></${selector}></body></html>`;\n\tconst html = await withSuppressedAngularDevLogs(() =>\n\t\tdeps.renderApplication(\n\t\t\t(context) =>\n\t\t\t\tdeps.bootstrapApplication(\n\t\t\t\t\tWrapperComponent,\n\t\t\t\t\t{ providers },\n\t\t\t\t\tcontext\n\t\t\t\t),\n\t\t\t{\n\t\t\t\tdocument,\n\t\t\t\tplatformProviders: [],\n\t\t\t\turl: '/'\n\t\t\t}\n\t\t)\n\t);\n\tconst islandHtml = extractAngularIslandRoot(html, selector);\n\trequestCache?.set(renderCacheKey, islandHtml);\n\n\treturn islandHtml;\n};\n"
12
12
  ],
13
13
  "mappings": ";;;;;AAAA;;;ACAA,SAAS,UAAU,CAAC,MAAK;AAAA,EAAC,IAAG,OAAO,SAAO;AAAA,IAAS,MAAM,UAAU,qCAAmC,KAAK,UAAU,IAAI,CAAC;AAAA;AAAE,SAAS,oBAAoB,CAAC,MAAK,gBAAe;AAAA,EAAC,IAAI,MAAI,IAAG,oB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EACnD,MAAM,cAAc,YAAY,cAAc,iBAAiB;AAAA,EAC/D,IAAI,EAAE,uBAAuB;AAAA,IAAc,OAAO;AAAA,EAElD,MAAM,WAAW,OAAO,QAAQ,KAAK,EAAE,IAAI,EAAE,KAAK,WACjD,aAAa,KAAK,MAAM,KAAK,CAC9B;AAAA,EACA,MAAM,eAAe,gBAAgB,WAAW;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAC;AAAA,EACD,IAAI,WAAW,aAAa,QAAQ;AAAA,EACpC,aAAa,kBAAkB,cAAc;AAAA,EAC7C,OAAO,gCAAgC,CAAC;AAAA,EACxC,OAAO,4BAA4B,KAAK,GAAG;AAAA,EAE3C,OAAO;AAAA;",
@@ -26,6 +26,7 @@ var PAGE_GLOBALS = [
26
26
  "__ABS_SERVER_ISLAND_HTML__",
27
27
  "__ABSOLUTE_SERVER_DATA__",
28
28
  "__ABS_ANGULAR_REQUEST_CONTEXT__",
29
+ "__ABS_ANGULAR_BASE_HREF__",
29
30
  DISPOSE_GLOBAL,
30
31
  READY_GLOBAL
31
32
  ];
@@ -760,5 +761,5 @@ export {
760
761
  navigateDocument
761
762
  };
762
763
 
763
- //# debugId=4ABAC329D93956C564756E2164756E21
764
+ //# debugId=1B604181BCFC6A6964756E2164756E21
764
765
  //# sourceMappingURL=navigation.js.map
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/client/navigation.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * Cross-framework document navigation.\n *\n * Every framework router (React Router via `<UniversalRouter>`, the Svelte\n * router, vue-router, Angular's router) handles the URLs it has routes for\n * and lets every other link fall through to a real page load. This layer\n * catches those fall-through navigations and turns them into a soft swap:\n *\n * fetch the target HTML → load its stylesheets → tear down the current\n * page (`window.__ABSOLUTE_PAGE_DISPOSE__`) → swap <head>/<body> (in a\n * View Transition where supported) → run the target's scripts → the\n * target's hydration index hydrates the new body.\n *\n * So a React page links to a Svelte page (and back) without a reload, and\n * `createIslandStore` state lives on: the store snapshot sits on\n * `globalThis`, which a swap never resets.\n *\n * import { enableNavigation } from '@absolutejs/absolute/client/navigation';\n * enableNavigation();\n *\n * Opt-in per app (call it from every page that should take part; the\n * first call installs, the rest are no-ops) and opt-out per link with\n * `data-absolute-navigation=\"off\"` (on the link or an ancestor). Any\n * error falls back to a full page load.\n *\n * CSP: a fetched page's inline scripts carry THAT response's nonce, which\n * the current document's policy rejects. Scripts and styles are recreated\n * with the current document's nonce, but only those that carried the\n * fetched response's own nonce — what the browser would have run on a\n * full load is what runs here, nothing more. */\nimport { readPageNonce } from '../dev/client/cspNonce';\nimport type {\n\tDocumentNavigationEventDetail,\n\tDocumentNavigationOutcome,\n\tDocumentNavigationType,\n\tEnableNavigationOptions,\n\tNavigateDocumentOptions\n} from '../../types/navigation';\nimport { consumePrefetch } from './prefetch';\n\n/* Shared by every bundle copy of this module (each framework's client pass\n * bundles its own), and read by the Svelte `<Link>` to decide whether a\n * URL no `<Router>` matches should be handed to the browser. */\nconst RUNTIME_KEY = Symbol.for('absolutejs.navigation');\nconst STATE_KEY = '__absoluteNavigation';\nconst OPT_OUT_SELECTOR = '[data-absolute-navigation=\"off\"]';\nconst MODULE_RUN_PARAM = 'absolute-nav';\nconst ANNOUNCER_ID = 'absolute-navigation-announcer';\nconst ISLAND_STATE_GLOBAL = '__ABS_ISLAND_STATE__';\nconst DISPOSE_GLOBAL = '__ABSOLUTE_PAGE_DISPOSE__';\nconst READY_GLOBAL = '__ABSOLUTE_PAGE_READY__';\nconst STYLESHEET_TIMEOUT_MS = 5_000;\nconst PAGE_READY_TIMEOUT_MS = 10_000;\nconst PAGE_READY_POLL_MS = 16;\nconst SCRIPT_PLACEHOLDER = 'absolute-navigation-script';\nconst ID_RADIX = 36;\n\n/* Globals one page's bootstrap writes for its own hydration. Cleared before\n * the next page's scripts run so it never hydrates with the last page's\n * props. `__ABS_ISLAND_STATE__` is deliberately not here: it is the shared\n * island-store snapshot that must survive. */\nconst PAGE_GLOBALS = [\n\t'__INITIAL_PROPS__',\n\t'__SSR_DIRTY__',\n\t'__ABS_SLOT_HYDRATION_PENDING__',\n\t'__ABS_SVELTE_LAZY_ROUTES__',\n\t'__ABS_SVELTE_ISLAND_HTML__',\n\t'__ABS_SERVER_ISLAND_HTML__',\n\t'__ABSOLUTE_SERVER_DATA__',\n\t'__ABS_ANGULAR_REQUEST_CONTEXT__',\n\tDISPOSE_GLOBAL,\n\tREADY_GLOBAL\n];\n\nconst JAVASCRIPT_TYPES = new Set([\n\t'',\n\t'application/ecmascript',\n\t'application/javascript',\n\t'module',\n\t'speculationrules',\n\t'text/ecmascript',\n\t'text/javascript'\n]);\n\ntype NavigationLike = EventTarget & { currentEntry: unknown };\n\ntype ScrollPosition = { left: number; top: number };\n\n/* Which inline scripts / styles of a fetched page may run here. */\ntype ElementTrust =\n\t{ kind: 'all' } | { kind: 'none' } | { kind: 'nonce'; nonce: string };\n\ntype PendingScript = {\n\tplaceholder: Comment;\n\tsource: HTMLScriptElement;\n\ttrusted: boolean;\n};\n\ntype HeadContext = {\n\tavailable: Map<string, Element[]>;\n\tpreloaded: Set<Element>;\n\ttrust: ElementTrust;\n};\n\ntype IslandStateRef = { live: Record<string, unknown> | undefined };\n\ntype LoadedDocument = {\n\tdocument: Document;\n\ttrust: ElementTrust;\n\turl: URL;\n};\n\ntype NavigationRequest = {\n\t/** Document the destination entry belongs to (traversals). */\n\tdocumentId?: string;\n\treplace: boolean;\n\t/** Scroll position saved for the destination entry (traversals). */\n\tscroll?: ScrollPosition;\n\ttype: DocumentNavigationType;\n\turl: URL;\n};\n\ntype Runtime = {\n\tcontroller: AbortController | undefined;\n\tdocumentId: string;\n\tentryOwners: Map<string, string>;\n\tevaluatedModules: Set<string>;\n\tmoduleRun: number;\n\tnavigating: boolean;\n\tnavigationApi: NavigationLike | undefined;\n\tnonce: string | undefined;\n\toptions: EnableNavigationOptions;\n\trestoreHistory: (() => void) | undefined;\n\tscroll: Map<string, ScrollPosition>;\n\tscrollFrame: number;\n\tteardown: Array<() => void>;\n\ttoken: number;\n};\n\ntype PublicRuntime = {\n\tdisable: () => void;\n\tnavigate: (\n\t\thref: string,\n\t\toptions?: NavigateDocumentOptions\n\t) => Promise<DocumentNavigationOutcome>;\n};\n\nlet runtime: Runtime | undefined;\n\n/* ------------------------------------------------------------------ */\n/* Small helpers */\n/* ------------------------------------------------------------------ */\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst createId = () =>\n\ttypeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function'\n\t\t? crypto.randomUUID()\n\t\t: `${Date.now().toString(ID_RADIX)}-${Math.random().toString(ID_RADIX).slice(2)}`;\n\nconst delay = (millis: number) =>\n\tnew Promise<void>((resolve) => {\n\t\tsetTimeout(resolve, millis);\n\t});\n\nconst readPublicRuntime = () => {\n\tconst value: unknown = Reflect.get(globalThis, RUNTIME_KEY);\n\tif (!isRecord(value)) return undefined;\n\tconst { disable, navigate } = value;\n\tif (typeof disable !== 'function' || typeof navigate !== 'function') {\n\t\treturn undefined;\n\t}\n\n\treturn value;\n};\n\nconst prefersReducedMotion = () =>\n\ttypeof window.matchMedia === 'function' &&\n\twindow.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/* ------------------------------------------------------------------ */\n/* History entries: which document owns which entry */\n/* ------------------------------------------------------------------ */\n\nconst isNavigationLike = (value: unknown): value is NavigationLike =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t'currentEntry' in value &&\n\ttypeof Reflect.get(value, 'addEventListener') === 'function';\n\nconst readNavigationApi = () => {\n\tconst value: unknown = Reflect.get(window, 'navigation');\n\n\treturn isNavigationLike(value) ? value : undefined;\n};\n\nconst readEntryKey = (api: NavigationLike) => {\n\tconst entry = api.currentEntry;\n\tif (typeof entry !== 'object' || entry === null) return undefined;\n\tconst key: unknown = Reflect.get(entry, 'key');\n\n\treturn typeof key === 'string' ? key : undefined;\n};\n\nconst readStamp = (state: unknown) => {\n\tif (!isRecord(state)) return undefined;\n\tconst stamp = state[STATE_KEY];\n\tif (!isRecord(stamp)) return undefined;\n\tconst { doc, key } = stamp;\n\tif (typeof doc !== 'string' || typeof key !== 'string') return undefined;\n\n\treturn { doc, key };\n};\n\nconst isStampable = (state: unknown) => state === null || isRecord(state);\n\nconst stampState = (state: unknown, doc: string, key: string) => {\n\tif (!isStampable(state)) return state;\n\n\treturn { ...(isRecord(state) ? state : {}), [STATE_KEY]: { doc, key } };\n};\n\n/** Key of the history entry the browser is on right now. */\nconst currentEntryKey = (nav: Runtime) =>\n\tnav.navigationApi\n\t\t? readEntryKey(nav.navigationApi)\n\t\t: readStamp(window.history.state)?.key;\n\n/** Document that owns the current entry. `undefined` = unknown. */\nconst currentEntryOwner = (nav: Runtime) => {\n\tif (!nav.navigationApi) return readStamp(window.history.state)?.doc;\n\tconst key = readEntryKey(nav.navigationApi);\n\n\treturn key === undefined ? undefined : nav.entryOwners.get(key);\n};\n\n/** A traversal landed on an entry another document wrote. Navigation API:\n * every entry this session wrote is in the map, so an unknown one is\n * foreign. History fallback: an entry without a stamp (a hash link, an\n * entry from before `enableNavigation`) stays with the current page. */\nconst isForeignEntry = (nav: Runtime) => {\n\tconst owner = currentEntryOwner(nav);\n\tif (owner === nav.documentId) return false;\n\n\treturn owner !== undefined || nav.navigationApi !== undefined;\n};\n\nconst recordCurrentEntry = (nav: Runtime) => {\n\tif (!nav.navigationApi) return;\n\tconst key = readEntryKey(nav.navigationApi);\n\tif (key !== undefined) nav.entryOwners.set(key, nav.documentId);\n};\n\n/* Navigation API: an entry a router (or a hash link) pushes or replaces\n * belongs to the document on screen. Traversals land on known entries. */\nconst trackEntries = (nav: Runtime, api: NavigationLike) => {\n\tconst onEntryChange = (event: Event) => {\n\t\tif (Reflect.get(event, 'navigationType') === 'traverse') return;\n\t\trecordCurrentEntry(nav);\n\t};\n\tapi.addEventListener('currententrychange', onEntryChange);\n\tnav.teardown.push(() =>\n\t\tapi.removeEventListener('currententrychange', onEntryChange)\n\t);\n\trecordCurrentEntry(nav);\n};\n\n/* History fallback: no entry keys without the Navigation API, so every\n * pushState / replaceState gets a `{ doc, key }` stamp merged into its\n * (object or null) state. Routers keep their own keys next to it. */\nconst patchHistory = (nav: Runtime) => {\n\tconst { history } = window;\n\tconst originalPush = history.pushState;\n\tconst originalReplace = history.replaceState;\n\thistory.pushState = (\n\t\tstate: unknown,\n\t\tunused: string,\n\t\turl?: string | URL | null\n\t) =>\n\t\tReflect.apply(originalPush, history, [\n\t\t\tstampState(state, nav.documentId, createId()),\n\t\t\tunused,\n\t\t\turl\n\t\t]);\n\thistory.replaceState = (\n\t\tstate: unknown,\n\t\tunused: string,\n\t\turl?: string | URL | null\n\t) =>\n\t\tReflect.apply(originalReplace, history, [\n\t\t\tstampState(\n\t\t\t\tstate,\n\t\t\t\tnav.documentId,\n\t\t\t\treadStamp(history.state)?.key ?? createId()\n\t\t\t),\n\t\t\tunused,\n\t\t\turl\n\t\t]);\n\thistory.replaceState(history.state, '');\n\tnav.restoreHistory = () => {\n\t\thistory.pushState = originalPush;\n\t\thistory.replaceState = originalReplace;\n\t};\n};\n\n/* ------------------------------------------------------------------ */\n/* Scroll */\n/* ------------------------------------------------------------------ */\n\nconst recordScroll = (nav: Runtime) => {\n\tif (nav.navigating) return;\n\tconst key = currentEntryKey(nav);\n\tif (key === undefined) return;\n\tnav.scroll.set(key, { left: window.scrollX, top: window.scrollY });\n};\n\nconst trackScroll = (nav: Runtime) => {\n\tconst onScroll = () => {\n\t\tif (nav.scrollFrame !== 0) return;\n\t\tnav.scrollFrame = window.requestAnimationFrame(() => {\n\t\t\tnav.scrollFrame = 0;\n\t\t\trecordScroll(nav);\n\t\t});\n\t};\n\twindow.addEventListener('scroll', onScroll, { passive: true });\n\tnav.teardown.push(() => {\n\t\twindow.removeEventListener('scroll', onScroll);\n\t\tif (nav.scrollFrame !== 0) window.cancelAnimationFrame(nav.scrollFrame);\n\t});\n};\n\nconst scrollToHash = (hash: string) => {\n\tif (hash === '' || hash === '#') return false;\n\tconst id = decodeURIComponent(hash.slice(1));\n\tconst target =\n\t\tdocument.getElementById(id) ?? document.getElementsByName(id)[0];\n\tif (!target) return false;\n\ttarget.scrollIntoView();\n\n\treturn true;\n};\n\nconst applyScroll = (request: NavigationRequest, url: URL) => {\n\tif (request.scroll) {\n\t\twindow.scrollTo(request.scroll.left, request.scroll.top);\n\n\t\treturn;\n\t}\n\tif (scrollToHash(url.hash)) return;\n\twindow.scrollTo(0, 0);\n};\n\n/* Hydrating a document root can put the window back at the top (seen with\n * React 19 on `document`). Once the page is up, a position that was reset\n * to 0 is applied again; a position the user scrolled to stays. */\nconst reapplyScroll = (request: NavigationRequest, url: URL) => {\n\tif (window.scrollY !== 0 || window.scrollX !== 0) return;\n\tif (request.scroll && request.scroll.top + request.scroll.left > 0) {\n\t\twindow.scrollTo(request.scroll.left, request.scroll.top);\n\n\t\treturn;\n\t}\n\tif (!request.scroll) scrollToHash(url.hash);\n};\n\n/* ------------------------------------------------------------------ */\n/* Modules: re-run a page's entry when it is visited again */\n/* ------------------------------------------------------------------ */\n\nconst RELATIVE_SPECIFIER = /^(?:\\/|\\.\\.?\\/|https?:)/;\nconst IMPORT_CALL_RE = /\\bimport\\(\\s*([\"'])([^\"'\\n]+)\\1\\s*\\)/g;\nconst IMPORT_FROM_RE = /\\b(from|import)\\s*([\"'])([^\"'\\n]+)\\2/g;\n\nconst resolveSameOrigin = (specifier: string) => {\n\tif (!RELATIVE_SPECIFIER.test(specifier)) return undefined;\n\ttry {\n\t\tconst url = new URL(specifier, window.location.href);\n\n\t\treturn url.origin === window.location.origin ? url : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n};\n\n/* A module URL evaluates once per document, so a page's hydration index\n * that already ran (the user is coming back to it) would be a no-op. Give\n * the revisit a fresh URL; its imports (framework vendor chunks, shared\n * chunks) keep their URLs, so only the entry re-runs. */\nconst moduleUrlFor = (nav: Runtime, specifier: string) => {\n\tconst url = resolveSameOrigin(specifier);\n\tif (!url) return specifier;\n\tif (!nav.evaluatedModules.has(url.href)) {\n\t\tnav.evaluatedModules.add(url.href);\n\n\t\treturn specifier;\n\t}\n\tnav.moduleRun += 1;\n\turl.searchParams.set(MODULE_RUN_PARAM, String(nav.moduleRun));\n\n\treturn url.href;\n};\n\nconst rewriteModuleSpecifiers = (nav: Runtime, source: string) =>\n\tsource\n\t\t.replace(\n\t\t\tIMPORT_CALL_RE,\n\t\t\t(_match, _quote: string, specifier: string) =>\n\t\t\t\t`import(${JSON.stringify(moduleUrlFor(nav, specifier))})`\n\t\t)\n\t\t.replace(\n\t\t\tIMPORT_FROM_RE,\n\t\t\t(match, keyword: string, _quote: string, specifier: string) =>\n\t\t\t\tresolveSameOrigin(specifier)\n\t\t\t\t\t? `${keyword} ${JSON.stringify(moduleUrlFor(nav, specifier))}`\n\t\t\t\t\t: match\n\t\t);\n\nconst rememberSpecifier = (nav: Runtime, specifier: string) => {\n\tconst url = resolveSameOrigin(specifier);\n\tif (url) nav.evaluatedModules.add(url.href);\n};\n\nconst rememberImportCalls = (nav: Runtime, text: string) => {\n\tfor (const match of text.matchAll(IMPORT_CALL_RE)) {\n\t\trememberSpecifier(nav, match[2] ?? '');\n\t}\n};\n\n/** The entries the current document already evaluated. */\nconst rememberDocumentModules = (nav: Runtime) => {\n\tfor (const script of Array.from(document.scripts)) {\n\t\tconst src = script.getAttribute('src');\n\t\tif (src && script.type === 'module') rememberSpecifier(nav, src);\n\t\trememberImportCalls(nav, script.textContent ?? '');\n\t}\n};\n\n/* ------------------------------------------------------------------ */\n/* Fetching and parsing */\n/* ------------------------------------------------------------------ */\n\nconst TRUST_ALL: ElementTrust = { kind: 'all' };\nconst TRUST_NONE: ElementTrust = { kind: 'none' };\n\nconst readTrust = (response: Response) => {\n\tconst policy = response.headers.get('content-security-policy');\n\tif (!policy) return TRUST_ALL;\n\tconst nonce = /'nonce-([^']+)'/.exec(policy)?.[1];\n\tif (!nonce) return TRUST_NONE;\n\tconst trust: ElementTrust = { kind: 'nonce', nonce };\n\n\treturn trust;\n};\n\nconst isTrusted = (element: Element, trust: ElementTrust) => {\n\tif (trust.kind === 'all') return true;\n\tif (trust.kind === 'none') return false;\n\n\treturn element.getAttribute('nonce') === trust.nonce;\n};\n\nconst takePrefetched = async (url: URL) => {\n\tconst pending =\n\t\tconsumePrefetch(url.href) ??\n\t\tconsumePrefetch(`${url.pathname}${url.search}`);\n\tif (!pending) return undefined;\n\tconst response = await pending;\n\n\treturn response.ok ? response : undefined;\n};\n\nconst fetchDocument = async (url: URL, signal: AbortSignal) =>\n\t(await takePrefetched(url)) ??\n\tfetch(url.href, {\n\t\tcredentials: 'same-origin',\n\t\theaders: { Accept: 'text/html' },\n\t\tsignal\n\t});\n\nconst escapeRegExp = (value: string) =>\n\tvalue.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n/* DOMParser documents inherit this document's CSP, so a parsed <style>\n * carrying the fetched response's nonce is reported as a violation the\n * moment it is parsed. Elements carrying that response's nonce (what a full\n * load would have run) get this document's nonce before parsing; nothing\n * else gains one. */\nconst adoptResponseNonce = (\n\tnav: Runtime,\n\thtml: string,\n\ttrust: ElementTrust\n) => {\n\tif (trust.kind !== 'nonce' || !nav.nonce) return { html, trust };\n\tconst pattern = new RegExp(\n\t\t`\\\\bnonce=([\"'])${escapeRegExp(trust.nonce)}\\\\1`,\n\t\t'g'\n\t);\n\tconst adopted: ElementTrust = { kind: 'nonce', nonce: nav.nonce };\n\n\treturn {\n\t\thtml: html.replace(pattern, `nonce=\"${nav.nonce}\"`),\n\t\ttrust: adopted\n\t};\n};\n\nconst loadDocument = async (nav: Runtime, url: URL, signal: AbortSignal) => {\n\tconst response = await fetchDocument(url, signal);\n\tconst contentType = response.headers.get('content-type') ?? '';\n\tconst finalUrl = new URL(response.url || url.href);\n\tfinalUrl.hash = url.hash;\n\tif (\n\t\t!response.ok ||\n\t\t!contentType.includes('text/html') ||\n\t\tfinalUrl.origin !== window.location.origin\n\t) {\n\t\tawait response.body?.cancel().catch(() => undefined);\n\n\t\treturn undefined;\n\t}\n\tconst { html, trust } = adoptResponseNonce(\n\t\tnav,\n\t\tawait response.text(),\n\t\treadTrust(response)\n\t);\n\tconst parsed = new DOMParser().parseFromString(html, 'text/html');\n\tconst loaded: LoadedDocument = {\n\t\tdocument: parsed,\n\t\ttrust,\n\t\turl: finalUrl\n\t};\n\n\treturn loaded;\n};\n\nconst isExecutableScript = (script: HTMLScriptElement) =>\n\tJAVASCRIPT_TYPES.has(\n\t\t(script.getAttribute('type') ?? '').trim().toLowerCase()\n\t);\n\n/* Swap each executable <script> for a comment so the parsed (inert)\n * elements never reach the live document; the comment marks where the\n * recreated script goes. */\nconst extractScripts = (loaded: LoadedDocument) =>\n\tArray.from(loaded.document.querySelectorAll('script'))\n\t\t.filter(isExecutableScript)\n\t\t.map((source) => {\n\t\t\tconst placeholder =\n\t\t\t\tloaded.document.createComment(SCRIPT_PLACEHOLDER);\n\t\t\tconst trusted = isTrusted(source, loaded.trust);\n\t\t\tsource.replaceWith(placeholder);\n\t\t\tconst pending: PendingScript = { placeholder, source, trusted };\n\n\t\t\treturn pending;\n\t\t});\n\n/* ------------------------------------------------------------------ */\n/* Stylesheets, head and body */\n/* ------------------------------------------------------------------ */\n\nconst applyNonce = (nav: Runtime, element: Element, trusted: boolean) => {\n\telement.removeAttribute('nonce');\n\t// The attribute (not just the property) so later readers of the page\n\t// nonce (`script[nonce], style[nonce]`) still find a carrier.\n\tif (trusted && nav.nonce) element.setAttribute('nonce', nav.nonce);\n};\n\nconst waitForStylesheet = (link: HTMLLinkElement) =>\n\tnew Promise<void>((resolve) => {\n\t\tconst timer = setTimeout(resolve, STYLESHEET_TIMEOUT_MS);\n\t\tconst done = () => {\n\t\t\tclearTimeout(timer);\n\t\t\tresolve();\n\t\t};\n\t\tlink.addEventListener('load', done, { once: true });\n\t\tlink.addEventListener('error', done, { once: true });\n\t});\n\n/* Load the target's stylesheets before anything is torn down, inert\n * (`media=\"not all\"`) so they can't restyle the page still on screen. */\nconst preloadStylesheets = async (loaded: LoadedDocument) => {\n\tconst links = Array.from(\n\t\tloaded.document.head.querySelectorAll<HTMLLinkElement>(\n\t\t\t'link[rel~=\"stylesheet\"]'\n\t\t)\n\t);\n\tconst media = new Map<HTMLLinkElement, string | null>();\n\tfor (const link of links) {\n\t\tmedia.set(link, link.getAttribute('media'));\n\t\tlink.setAttribute('media', 'not all');\n\t\tdocument.head.append(document.adoptNode(link));\n\t}\n\tawait Promise.all(links.map(waitForStylesheet));\n\n\treturn media;\n};\n\nconst restoreMedia = (media: Map<HTMLLinkElement, string | null>) => {\n\tfor (const [link, value] of media) {\n\t\tif (value === null) link.removeAttribute('media');\n\t\telse link.setAttribute('media', value);\n\t}\n};\n\nconst elementKey = (element: Element) => {\n\tconst attributes = Array.from(element.attributes)\n\t\t.filter((attribute) => attribute.name !== 'nonce')\n\t\t.map((attribute) => `${attribute.name}=${attribute.value}`)\n\t\t.sort()\n\t\t.join('\\u0000');\n\n\treturn `${element.tagName}\\u0001${attributes}\\u0001${element.textContent ?? ''}`;\n};\n\nconst takeMatch = (available: Map<string, Element[]>, node: Element) =>\n\tavailable.get(elementKey(node))?.shift();\n\nconst syncAttributes = (target: Element, source: Element) => {\n\tfor (const attribute of Array.from(target.attributes)) {\n\t\tif (!source.hasAttribute(attribute.name))\n\t\t\ttarget.removeAttribute(attribute.name);\n\t}\n\tfor (const attribute of Array.from(source.attributes)) {\n\t\ttarget.setAttribute(attribute.name, attribute.value);\n\t}\n};\n\nconst indexHead = (preloaded: Set<Element>) => {\n\tconst available = new Map<string, Element[]>();\n\tfor (const child of Array.from(document.head.children)) {\n\t\tif (preloaded.has(child) || child.tagName === 'SCRIPT') continue;\n\t\tconst key = elementKey(child);\n\t\tavailable.set(key, [...(available.get(key) ?? []), child]);\n\t}\n\n\treturn available;\n};\n\nconst resolveHeadNode = (nav: Runtime, node: Node, context: HeadContext) => {\n\tif (!(node instanceof Element) || context.preloaded.has(node)) return node;\n\tconst existing = takeMatch(context.available, node);\n\tif (existing) return existing;\n\tif (node.tagName === 'STYLE') {\n\t\tapplyNonce(nav, node, isTrusted(node, context.trust));\n\t}\n\n\treturn document.adoptNode(node);\n};\n\n/* Keep head elements the two pages share (same tag, attributes and text):\n * no stylesheet reload, no favicon flash. Everything else is replaced.\n * Every node is kept in order, whitespace text and comments included:\n * Svelte hydrates `<svelte:head>` by walking those nodes, and a missing one\n * makes it throw the server markup away and mount again. */\nconst swapHead = (\n\tnav: Runtime,\n\tloaded: LoadedDocument,\n\theadNodes: Node[],\n\tpreloaded: Set<Element>\n) => {\n\tconst context: HeadContext = {\n\t\tavailable: indexHead(preloaded),\n\t\tpreloaded,\n\t\ttrust: loaded.trust\n\t};\n\tconst nextNodes = headNodes.map((node) =>\n\t\tresolveHeadNode(nav, node, context)\n\t);\n\tsyncAttributes(document.head, loaded.document.head);\n\tdocument.head.replaceChildren(...nextNodes);\n};\n\nconst swapBody = (nav: Runtime, loaded: LoadedDocument) => {\n\tfor (const style of Array.from(\n\t\tloaded.document.body.querySelectorAll('style')\n\t)) {\n\t\tapplyNonce(nav, style, isTrusted(style, loaded.trust));\n\t}\n\tconst nextBody = document.adoptNode(loaded.document.body);\n\tdocument.body.replaceWith(nextBody);\n};\n\nconst disposeCurrentPage = async () => {\n\tconst dispose: unknown = Reflect.get(window, DISPOSE_GLOBAL);\n\tReflect.set(window, DISPOSE_GLOBAL, undefined);\n\tReflect.set(window, READY_GLOBAL, undefined);\n\tif (typeof dispose === 'function') await Reflect.apply(dispose, window, []);\n};\n\nconst canTearDown = () =>\n\ttypeof Reflect.get(window, DISPOSE_GLOBAL) === 'function';\n\n/* ------------------------------------------------------------------ */\n/* Scripts */\n/* ------------------------------------------------------------------ */\n\nconst islandStateOf = (value: unknown) => (isRecord(value) ? value : undefined);\n\n/* A page with islands re-seeds `window.__ABS_ISLAND_STATE__` with the\n * server's store state. The live snapshot wins per store, the same rule\n * `initializeIslandStores` applies. */\nconst keepIslandState = (live: Record<string, unknown> | undefined) => {\n\tconst current = islandStateOf(Reflect.get(globalThis, ISLAND_STATE_GLOBAL));\n\tif (!live || current === live) return live;\n\tconst merged: Record<string, unknown> = { ...(current ?? {}), ...live };\n\tReflect.set(globalThis, ISLAND_STATE_GLOBAL, merged);\n\n\treturn merged;\n};\n\nconst loadEvent = (script: HTMLScriptElement) =>\n\tnew Promise<void>((resolve) => {\n\t\tscript.addEventListener('load', () => resolve(), { once: true });\n\t\tscript.addEventListener('error', () => resolve(), { once: true });\n\t});\n\nconst createScript = (nav: Runtime, pending: PendingScript) => {\n\tconst { source } = pending;\n\tconst script = document.createElement('script');\n\tArray.from(source.attributes)\n\t\t.filter(({ name }) => name !== 'nonce' && name !== 'src')\n\t\t.forEach(({ name, value }) => script.setAttribute(name, value));\n\tapplyNonce(nav, script, pending.trusted);\n\tconst src = source.getAttribute('src');\n\tconst isModule = source.type === 'module';\n\tif (src) script.src = isModule ? moduleUrlFor(nav, src) : src;\n\tif (!src) script.text = rewriteModuleSpecifiers(nav, source.text);\n\tif (src && !source.hasAttribute('async')) script.async = false;\n\n\treturn script;\n};\n\nconst runScript = async (\n\tnav: Runtime,\n\tpending: PendingScript,\n\tislandState: IslandStateRef\n) => {\n\tif (!pending.placeholder.isConnected) return;\n\tconst script = createScript(nav, pending);\n\tconst loaded = script.src ? loadEvent(script) : Promise.resolve();\n\tpending.placeholder.replaceWith(script);\n\tislandState.live = keepIslandState(islandState.live);\n\tawait loaded;\n\tislandState.live = keepIslandState(islandState.live);\n};\n\nconst clearPageGlobals = () => {\n\tfor (const name of PAGE_GLOBALS) Reflect.deleteProperty(window, name);\n};\n\n/* In document order, one at a time: an inline script that sets\n * `__INITIAL_PROPS__` has to run before the module that hydrates with it. */\nconst runScripts = (nav: Runtime, scripts: PendingScript[]) => {\n\tconst islandState: IslandStateRef = {\n\t\tlive: islandStateOf(Reflect.get(globalThis, ISLAND_STATE_GLOBAL))\n\t};\n\n\treturn scripts.reduce<Promise<void>>(\n\t\t(previous, pending) =>\n\t\t\tprevious.then(() => runScript(nav, pending, islandState)),\n\t\tPromise.resolve()\n\t);\n};\n\nconst pollForPage = async (deadline: number): Promise<void> => {\n\tif (canTearDown() || Date.now() >= deadline) return;\n\tawait delay(PAGE_READY_POLL_MS);\n\tawait pollForPage(deadline);\n};\n\n/* The hydration index registers `__ABSOLUTE_PAGE_DISPOSE__` once it has\n * mounted — possibly after an `import()` an inline bootstrap started. */\nconst waitForPageReady = async (hasModules: boolean) => {\n\tif (hasModules) await pollForPage(Date.now() + PAGE_READY_TIMEOUT_MS);\n\tconst ready: unknown = Reflect.get(window, READY_GLOBAL);\n\tif (ready instanceof Promise) await ready.catch(() => undefined);\n};\n\nconst loadsModules = (scripts: PendingScript[]) =>\n\tscripts.some(\n\t\t({ source }) =>\n\t\t\tsource.type === 'module' || /\\bimport\\s*\\(/.test(source.text)\n\t);\n\n/* ------------------------------------------------------------------ */\n/* Focus, announcement, events */\n/* ------------------------------------------------------------------ */\n\nconst ensureAnnouncer = () => {\n\tconst existing = document.getElementById(ANNOUNCER_ID);\n\tif (existing) return existing;\n\tconst region = document.createElement('div');\n\tregion.id = ANNOUNCER_ID;\n\tregion.setAttribute('aria-live', 'assertive');\n\tregion.setAttribute('aria-atomic', 'true');\n\tregion.setAttribute('role', 'status');\n\t// CSSOM, not a style attribute: a strict `style-src-attr` can't block it.\n\tObject.assign(region.style, {\n\t\tborder: '0',\n\t\tclip: 'rect(0 0 0 0)',\n\t\theight: '1px',\n\t\tmargin: '-1px',\n\t\toverflow: 'hidden',\n\t\tpadding: '0',\n\t\tposition: 'absolute',\n\t\twhiteSpace: 'nowrap',\n\t\twidth: '1px'\n\t});\n\tdocument.body.append(region);\n\n\treturn region;\n};\n\nconst announcePage = () => {\n\tconst heading = document.querySelector('h1')?.textContent?.trim();\n\tconst text = document.title || heading || window.location.pathname;\n\tensureAnnouncer().textContent = text;\n};\n\nconst resetFocus = () => {\n\tconst autofocus = document.querySelector<HTMLElement>('[autofocus]');\n\tif (autofocus) {\n\t\tautofocus.focus();\n\n\t\treturn;\n\t}\n\tif (document.activeElement instanceof HTMLElement) {\n\t\tdocument.activeElement.blur();\n\t}\n};\n\nconst dispatch = (\n\tname: string,\n\tdetail: DocumentNavigationEventDetail,\n\tcancelable: boolean\n) => window.dispatchEvent(new CustomEvent(name, { cancelable, detail }));\n\n/* ------------------------------------------------------------------ */\n/* The navigation */\n/* ------------------------------------------------------------------ */\n\nconst outcome = (value: DocumentNavigationOutcome) => value;\n\nconst reload = (request: NavigationRequest, committed: boolean) => {\n\tif (committed || request.type === 'traverse') window.location.reload();\n\telse if (request.replace) window.location.replace(request.url.href);\n\telse window.location.assign(request.url.href);\n\n\treturn outcome('reloaded');\n};\n\nconst commitHistory = (nav: Runtime, request: NavigationRequest, url: URL) => {\n\tnav.documentId = request.documentId ?? createId();\n\tif (request.type === 'traverse') {\n\t\trecordCurrentEntry(nav);\n\n\t\treturn;\n\t}\n\tconst key = currentEntryKey(nav);\n\tif (key !== undefined) {\n\t\tnav.scroll.set(key, { left: window.scrollX, top: window.scrollY });\n\t}\n\tconst state = stampState(null, nav.documentId, createId());\n\tif (request.replace) window.history.replaceState(state, '', url.href);\n\telse window.history.pushState(state, '', url.href);\n\trecordCurrentEntry(nav);\n};\n\nconst shouldAnimate = (nav: Runtime) =>\n\tnav.options.viewTransition !== false &&\n\ttypeof Reflect.get(document, 'startViewTransition') === 'function' &&\n\t!prefersReducedMotion();\n\nconst readPromise = (value: unknown, name: string) => {\n\tif (typeof value !== 'object' || value === null) return undefined;\n\tconst promise: unknown = Reflect.get(value, name);\n\n\treturn promise instanceof Promise ? promise : undefined;\n};\n\nconst runSwap = async (nav: Runtime, swap: () => Promise<void>) => {\n\tconst start: unknown = Reflect.get(document, 'startViewTransition');\n\tif (!shouldAnimate(nav) || typeof start !== 'function') {\n\t\tawait swap();\n\n\t\treturn;\n\t}\n\tconst transition: unknown = Reflect.apply(start, document, [swap]);\n\treadPromise(transition, 'ready')?.catch(() => undefined);\n\treadPromise(transition, 'finished')?.catch(() => undefined);\n\tawait readPromise(transition, 'updateCallbackDone');\n};\n\nconst swapDocument = async (\n\tnav: Runtime,\n\trequest: NavigationRequest,\n\tloaded: LoadedDocument,\n\tisStale: () => boolean\n) => {\n\tconst scripts = extractScripts(loaded);\n\t// Before the preload moves the stylesheet links out of the parsed head.\n\tconst headNodes = Array.from(loaded.document.head.childNodes);\n\tconst media = await preloadStylesheets(loaded);\n\tconst preloaded = new Set<Element>(media.keys());\n\t// A newer navigation started while the stylesheets loaded: it owns the\n\t// page now, so drop what this one added and stop.\n\tif (isStale()) {\n\t\tpreloaded.forEach((link) => link.remove());\n\n\t\treturn false;\n\t}\n\t// Outside the View Transition callback: the browser records the scroll\n\t// position of the entry being left when the new one is pushed, and inside\n\t// the callback it reads 0, which it then restores on a later back.\n\tcommitHistory(nav, request, loaded.url);\n\tconst swap = async () => {\n\t\tawait disposeCurrentPage();\n\t\tclearPageGlobals();\n\t\tsyncAttributes(\n\t\t\tdocument.documentElement,\n\t\t\tloaded.document.documentElement\n\t\t);\n\t\tswapHead(nav, loaded, headNodes, preloaded);\n\t\tswapBody(nav, loaded);\n\t\trestoreMedia(media);\n\t\tapplyScroll(request, loaded.url);\n\t};\n\tawait runSwap(nav, swap);\n\tresetFocus();\n\tawait runScripts(nav, scripts);\n\tawait waitForPageReady(loadsModules(scripts));\n\treapplyScroll(request, loaded.url);\n\tannouncePage();\n\n\treturn true;\n};\n\nconst isCurrent = (nav: Runtime, token: number) => nav.token === token;\n\nconst performNavigation = async (nav: Runtime, request: NavigationRequest) => {\n\tnav.token += 1;\n\tconst { token } = nav;\n\tnav.controller?.abort();\n\tconst controller = new AbortController();\n\tnav.controller = controller;\n\tconst detail: DocumentNavigationEventDetail = {\n\t\ttype: request.type,\n\t\turl: request.url.href\n\t};\n\tconst proceed = dispatch(\n\t\t'absolute:before-navigate',\n\t\tdetail,\n\t\trequest.type !== 'traverse'\n\t);\n\tif (!proceed) return outcome('cancelled');\n\tif (!canTearDown()) return reload(request, false);\n\n\tconst committedBefore = nav.documentId;\n\ttry {\n\t\tconst loaded = await loadDocument(nav, request.url, controller.signal);\n\t\tif (!isCurrent(nav, token)) return outcome('superseded');\n\t\tif (!loaded) return reload(request, false);\n\t\tnav.navigating = true;\n\t\tconst swapped = await swapDocument(\n\t\t\tnav,\n\t\t\trequest,\n\t\t\tloaded,\n\t\t\t() => !isCurrent(nav, token)\n\t\t);\n\t\tif (!swapped) return outcome('superseded');\n\t\tdispatch('absolute:after-navigate', detail, false);\n\n\t\treturn outcome('swapped');\n\t} catch (error) {\n\t\tif (!isCurrent(nav, token)) return outcome('superseded');\n\t\tconsole.error('[absolute] navigation failed, loading the page:', error);\n\n\t\treturn reload(request, nav.documentId !== committedBefore);\n\t} finally {\n\t\tif (isCurrent(nav, token)) nav.navigating = false;\n\t}\n};\n\n/* ------------------------------------------------------------------ */\n/* Interception */\n/* ------------------------------------------------------------------ */\n\nconst isModifiedClick = (event: MouseEvent) =>\n\tevent.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\nconst isSamePageFragment = (url: URL) =>\n\turl.hash !== '' &&\n\turl.pathname === window.location.pathname &&\n\turl.search === window.location.search;\n\nconst findAnchor = (event: MouseEvent) => {\n\tconst { target } = event;\n\tif (!(target instanceof Element)) return null;\n\n\treturn target.closest<HTMLAnchorElement>('a[href]');\n};\n\nconst isPlainClick = (event: MouseEvent) =>\n\t!event.defaultPrevented && event.button === 0 && !isModifiedClick(event);\n\nconst isOptedOut = (anchor: HTMLAnchorElement) =>\n\t(anchor.target !== '' && anchor.target !== '_self') ||\n\tanchor.hasAttribute('download') ||\n\tanchor.relList.contains('external') ||\n\tanchor.closest(OPT_OUT_SELECTOR) !== null;\n\nconst interceptableUrl = (nav: Runtime, anchor: HTMLAnchorElement) => {\n\tif (isOptedOut(anchor)) return undefined;\n\tconst url = new URL(anchor.href, window.location.href);\n\tif (url.origin !== window.location.origin) return undefined;\n\tif (isSamePageFragment(url)) return undefined;\n\tif (nav.options.shouldIntercept?.(url) === false) return undefined;\n\n\treturn url;\n};\n\n/* Bubble phase on window: runs after every framework router's handler, so\n * a click a router handled (`preventDefault`) never reaches this. */\nconst listenForClicks = (nav: Runtime) => {\n\tconst onClick = (event: MouseEvent) => {\n\t\tif (!isPlainClick(event)) return;\n\t\tconst anchor = findAnchor(event);\n\t\tconst url = anchor ? interceptableUrl(nav, anchor) : undefined;\n\t\tif (!url || !canTearDown()) return;\n\t\tevent.preventDefault();\n\t\tvoid performNavigation(nav, { replace: false, type: 'link', url });\n\t};\n\twindow.addEventListener('click', onClick);\n\tnav.teardown.push(() => window.removeEventListener('click', onClick));\n};\n\n/* Capture phase, so it runs before the routers' popstate listeners: a\n * traversal onto another document's entry is stopped here and swapped. */\nconst listenForTraversals = (nav: Runtime) => {\n\tconst onPopState = (event: PopStateEvent) => {\n\t\tif (!isForeignEntry(nav)) return;\n\t\tevent.stopImmediatePropagation();\n\t\tconst owner = currentEntryOwner(nav);\n\t\tconst key = currentEntryKey(nav);\n\t\tvoid performNavigation(nav, {\n\t\t\tdocumentId: owner,\n\t\t\treplace: false,\n\t\t\tscroll: key === undefined ? undefined : nav.scroll.get(key),\n\t\t\ttype: 'traverse',\n\t\t\turl: new URL(window.location.href)\n\t\t});\n\t};\n\twindow.addEventListener('popstate', onPopState, { capture: true });\n\tnav.teardown.push(() =>\n\t\twindow.removeEventListener('popstate', onPopState, { capture: true })\n\t);\n};\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\n/** Turn the layer off: listeners removed, history methods restored. */\nexport const disableNavigation = () => {\n\tconst installed = readPublicRuntime();\n\tif (installed && typeof installed.disable === 'function') {\n\t\tReflect.apply(installed.disable, undefined, []);\n\t}\n};\n\nconst teardownRuntime = (nav: Runtime) => {\n\tnav.controller?.abort();\n\tfor (const cleanup of nav.teardown.splice(0)) cleanup();\n\tnav.restoreHistory?.();\n\tReflect.deleteProperty(globalThis, RUNTIME_KEY);\n\tif (runtime === nav) runtime = undefined;\n};\n\nconst navigateWith =\n\t(nav: Runtime) =>\n\t(href: string, options: NavigateDocumentOptions = {}) => {\n\t\tconst url = new URL(href, window.location.href);\n\t\tif (url.origin !== window.location.origin) {\n\t\t\twindow.location.assign(url.href);\n\n\t\t\treturn Promise.resolve<DocumentNavigationOutcome>('reloaded');\n\t\t}\n\n\t\treturn performNavigation(nav, {\n\t\t\treplace: options.replace === true,\n\t\t\ttype: 'navigate',\n\t\t\turl\n\t\t});\n\t};\n\n/**\n * Install cross-framework document navigation for this tab. Idempotent:\n * every page can call it (each framework bundle carries its own copy of\n * this module; the first call wins and its options apply).\n */\nexport const enableNavigation = (options: EnableNavigationOptions = {}) => {\n\tif (typeof window === 'undefined' || readPublicRuntime()) return;\n\tconst navigationApi = readNavigationApi();\n\tconst nav: Runtime = {\n\t\tcontroller: undefined,\n\t\tdocumentId: createId(),\n\t\tentryOwners: new Map(),\n\t\tevaluatedModules: new Set(),\n\t\tmoduleRun: 0,\n\t\tnavigating: false,\n\t\tnavigationApi,\n\t\tnonce: readPageNonce(),\n\t\toptions,\n\t\trestoreHistory: undefined,\n\t\tscroll: new Map(),\n\t\tscrollFrame: 0,\n\t\tteardown: [],\n\t\ttoken: 0\n\t};\n\truntime = nav;\n\tif (navigationApi) trackEntries(nav, navigationApi);\n\telse patchHistory(nav);\n\trememberDocumentModules(nav);\n\ttrackScroll(nav);\n\tlistenForClicks(nav);\n\tlistenForTraversals(nav);\n\tconst publicRuntime: PublicRuntime = {\n\t\tnavigate: navigateWith(nav),\n\t\tdisable: () => teardownRuntime(nav)\n\t};\n\tReflect.set(globalThis, RUNTIME_KEY, publicRuntime);\n};\n\nconst OUTCOMES = new Set<unknown>([\n\t'cancelled',\n\t'reloaded',\n\t'superseded',\n\t'swapped'\n]);\n\nconst isOutcome = (value: unknown): value is DocumentNavigationOutcome =>\n\tOUTCOMES.has(value);\n\n/** Whether `enableNavigation()` is active in this tab. */\nexport const isNavigationEnabled = () =>\n\ttypeof window !== 'undefined' && readPublicRuntime() !== undefined;\n\n/**\n * Navigate to `href` through the layer: a soft swap when it is enabled\n * and the page can be torn down, a normal page load otherwise.\n */\nexport const navigateDocument = async (\n\thref: string,\n\toptions: NavigateDocumentOptions = {}\n) => {\n\tconst installed = readPublicRuntime();\n\tconst navigate = installed?.navigate;\n\tif (typeof navigate === 'function') {\n\t\tconst result: unknown = await Reflect.apply(navigate, undefined, [\n\t\t\thref,\n\t\t\toptions\n\t\t]);\n\t\tif (isOutcome(result)) return result;\n\t}\n\tif (options.replace) window.location.replace(href);\n\telse window.location.assign(href);\n\n\treturn outcome('reloaded');\n};\n"
5
+ "/**\n * Cross-framework document navigation.\n *\n * Every framework router (React Router via `<UniversalRouter>`, the Svelte\n * router, vue-router, Angular's router) handles the URLs it has routes for\n * and lets every other link fall through to a real page load. This layer\n * catches those fall-through navigations and turns them into a soft swap:\n *\n * fetch the target HTML → load its stylesheets → tear down the current\n * page (`window.__ABSOLUTE_PAGE_DISPOSE__`) → swap <head>/<body> (in a\n * View Transition where supported) → run the target's scripts → the\n * target's hydration index hydrates the new body.\n *\n * So a React page links to a Svelte page (and back) without a reload, and\n * `createIslandStore` state lives on: the store snapshot sits on\n * `globalThis`, which a swap never resets.\n *\n * import { enableNavigation } from '@absolutejs/absolute/client/navigation';\n * enableNavigation();\n *\n * Opt-in per app (call it from every page that should take part; the\n * first call installs, the rest are no-ops) and opt-out per link with\n * `data-absolute-navigation=\"off\"` (on the link or an ancestor). Any\n * error falls back to a full page load.\n *\n * CSP: a fetched page's inline scripts carry THAT response's nonce, which\n * the current document's policy rejects. Scripts and styles are recreated\n * with the current document's nonce, but only those that carried the\n * fetched response's own nonce — what the browser would have run on a\n * full load is what runs here, nothing more. */\nimport { readPageNonce } from '../dev/client/cspNonce';\nimport type {\n\tDocumentNavigationEventDetail,\n\tDocumentNavigationOutcome,\n\tDocumentNavigationType,\n\tEnableNavigationOptions,\n\tNavigateDocumentOptions\n} from '../../types/navigation';\nimport { consumePrefetch } from './prefetch';\n\n/* Shared by every bundle copy of this module (each framework's client pass\n * bundles its own), and read by the Svelte `<Link>` to decide whether a\n * URL no `<Router>` matches should be handed to the browser. */\nconst RUNTIME_KEY = Symbol.for('absolutejs.navigation');\nconst STATE_KEY = '__absoluteNavigation';\nconst OPT_OUT_SELECTOR = '[data-absolute-navigation=\"off\"]';\nconst MODULE_RUN_PARAM = 'absolute-nav';\nconst ANNOUNCER_ID = 'absolute-navigation-announcer';\nconst ISLAND_STATE_GLOBAL = '__ABS_ISLAND_STATE__';\nconst DISPOSE_GLOBAL = '__ABSOLUTE_PAGE_DISPOSE__';\nconst READY_GLOBAL = '__ABSOLUTE_PAGE_READY__';\nconst STYLESHEET_TIMEOUT_MS = 5_000;\nconst PAGE_READY_TIMEOUT_MS = 10_000;\nconst PAGE_READY_POLL_MS = 16;\nconst SCRIPT_PLACEHOLDER = 'absolute-navigation-script';\nconst ID_RADIX = 36;\n\n/* Globals one page's bootstrap writes for its own hydration. Cleared before\n * the next page's scripts run so it never hydrates with the last page's\n * props. `__ABS_ISLAND_STATE__` is deliberately not here: it is the shared\n * island-store snapshot that must survive. */\nconst PAGE_GLOBALS = [\n\t'__INITIAL_PROPS__',\n\t'__SSR_DIRTY__',\n\t'__ABS_SLOT_HYDRATION_PENDING__',\n\t'__ABS_SVELTE_LAZY_ROUTES__',\n\t'__ABS_SVELTE_ISLAND_HTML__',\n\t'__ABS_SERVER_ISLAND_HTML__',\n\t'__ABSOLUTE_SERVER_DATA__',\n\t'__ABS_ANGULAR_REQUEST_CONTEXT__',\n\t'__ABS_ANGULAR_BASE_HREF__',\n\tDISPOSE_GLOBAL,\n\tREADY_GLOBAL\n];\n\nconst JAVASCRIPT_TYPES = new Set([\n\t'',\n\t'application/ecmascript',\n\t'application/javascript',\n\t'module',\n\t'speculationrules',\n\t'text/ecmascript',\n\t'text/javascript'\n]);\n\ntype NavigationLike = EventTarget & { currentEntry: unknown };\n\ntype ScrollPosition = { left: number; top: number };\n\n/* Which inline scripts / styles of a fetched page may run here. */\ntype ElementTrust =\n\t{ kind: 'all' } | { kind: 'none' } | { kind: 'nonce'; nonce: string };\n\ntype PendingScript = {\n\tplaceholder: Comment;\n\tsource: HTMLScriptElement;\n\ttrusted: boolean;\n};\n\ntype HeadContext = {\n\tavailable: Map<string, Element[]>;\n\tpreloaded: Set<Element>;\n\ttrust: ElementTrust;\n};\n\ntype IslandStateRef = { live: Record<string, unknown> | undefined };\n\ntype LoadedDocument = {\n\tdocument: Document;\n\ttrust: ElementTrust;\n\turl: URL;\n};\n\ntype NavigationRequest = {\n\t/** Document the destination entry belongs to (traversals). */\n\tdocumentId?: string;\n\treplace: boolean;\n\t/** Scroll position saved for the destination entry (traversals). */\n\tscroll?: ScrollPosition;\n\ttype: DocumentNavigationType;\n\turl: URL;\n};\n\ntype Runtime = {\n\tcontroller: AbortController | undefined;\n\tdocumentId: string;\n\tentryOwners: Map<string, string>;\n\tevaluatedModules: Set<string>;\n\tmoduleRun: number;\n\tnavigating: boolean;\n\tnavigationApi: NavigationLike | undefined;\n\tnonce: string | undefined;\n\toptions: EnableNavigationOptions;\n\trestoreHistory: (() => void) | undefined;\n\tscroll: Map<string, ScrollPosition>;\n\tscrollFrame: number;\n\tteardown: Array<() => void>;\n\ttoken: number;\n};\n\ntype PublicRuntime = {\n\tdisable: () => void;\n\tnavigate: (\n\t\thref: string,\n\t\toptions?: NavigateDocumentOptions\n\t) => Promise<DocumentNavigationOutcome>;\n};\n\nlet runtime: Runtime | undefined;\n\n/* ------------------------------------------------------------------ */\n/* Small helpers */\n/* ------------------------------------------------------------------ */\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null && !Array.isArray(value);\n\nconst createId = () =>\n\ttypeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function'\n\t\t? crypto.randomUUID()\n\t\t: `${Date.now().toString(ID_RADIX)}-${Math.random().toString(ID_RADIX).slice(2)}`;\n\nconst delay = (millis: number) =>\n\tnew Promise<void>((resolve) => {\n\t\tsetTimeout(resolve, millis);\n\t});\n\nconst readPublicRuntime = () => {\n\tconst value: unknown = Reflect.get(globalThis, RUNTIME_KEY);\n\tif (!isRecord(value)) return undefined;\n\tconst { disable, navigate } = value;\n\tif (typeof disable !== 'function' || typeof navigate !== 'function') {\n\t\treturn undefined;\n\t}\n\n\treturn value;\n};\n\nconst prefersReducedMotion = () =>\n\ttypeof window.matchMedia === 'function' &&\n\twindow.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\n/* ------------------------------------------------------------------ */\n/* History entries: which document owns which entry */\n/* ------------------------------------------------------------------ */\n\nconst isNavigationLike = (value: unknown): value is NavigationLike =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t'currentEntry' in value &&\n\ttypeof Reflect.get(value, 'addEventListener') === 'function';\n\nconst readNavigationApi = () => {\n\tconst value: unknown = Reflect.get(window, 'navigation');\n\n\treturn isNavigationLike(value) ? value : undefined;\n};\n\nconst readEntryKey = (api: NavigationLike) => {\n\tconst entry = api.currentEntry;\n\tif (typeof entry !== 'object' || entry === null) return undefined;\n\tconst key: unknown = Reflect.get(entry, 'key');\n\n\treturn typeof key === 'string' ? key : undefined;\n};\n\nconst readStamp = (state: unknown) => {\n\tif (!isRecord(state)) return undefined;\n\tconst stamp = state[STATE_KEY];\n\tif (!isRecord(stamp)) return undefined;\n\tconst { doc, key } = stamp;\n\tif (typeof doc !== 'string' || typeof key !== 'string') return undefined;\n\n\treturn { doc, key };\n};\n\nconst isStampable = (state: unknown) => state === null || isRecord(state);\n\nconst stampState = (state: unknown, doc: string, key: string) => {\n\tif (!isStampable(state)) return state;\n\n\treturn { ...(isRecord(state) ? state : {}), [STATE_KEY]: { doc, key } };\n};\n\n/** Key of the history entry the browser is on right now. */\nconst currentEntryKey = (nav: Runtime) =>\n\tnav.navigationApi\n\t\t? readEntryKey(nav.navigationApi)\n\t\t: readStamp(window.history.state)?.key;\n\n/** Document that owns the current entry. `undefined` = unknown. */\nconst currentEntryOwner = (nav: Runtime) => {\n\tif (!nav.navigationApi) return readStamp(window.history.state)?.doc;\n\tconst key = readEntryKey(nav.navigationApi);\n\n\treturn key === undefined ? undefined : nav.entryOwners.get(key);\n};\n\n/** A traversal landed on an entry another document wrote. Navigation API:\n * every entry this session wrote is in the map, so an unknown one is\n * foreign. History fallback: an entry without a stamp (a hash link, an\n * entry from before `enableNavigation`) stays with the current page. */\nconst isForeignEntry = (nav: Runtime) => {\n\tconst owner = currentEntryOwner(nav);\n\tif (owner === nav.documentId) return false;\n\n\treturn owner !== undefined || nav.navigationApi !== undefined;\n};\n\nconst recordCurrentEntry = (nav: Runtime) => {\n\tif (!nav.navigationApi) return;\n\tconst key = readEntryKey(nav.navigationApi);\n\tif (key !== undefined) nav.entryOwners.set(key, nav.documentId);\n};\n\n/* Navigation API: an entry a router (or a hash link) pushes or replaces\n * belongs to the document on screen. Traversals land on known entries. */\nconst trackEntries = (nav: Runtime, api: NavigationLike) => {\n\tconst onEntryChange = (event: Event) => {\n\t\tif (Reflect.get(event, 'navigationType') === 'traverse') return;\n\t\trecordCurrentEntry(nav);\n\t};\n\tapi.addEventListener('currententrychange', onEntryChange);\n\tnav.teardown.push(() =>\n\t\tapi.removeEventListener('currententrychange', onEntryChange)\n\t);\n\trecordCurrentEntry(nav);\n};\n\n/* History fallback: no entry keys without the Navigation API, so every\n * pushState / replaceState gets a `{ doc, key }` stamp merged into its\n * (object or null) state. Routers keep their own keys next to it. */\nconst patchHistory = (nav: Runtime) => {\n\tconst { history } = window;\n\tconst originalPush = history.pushState;\n\tconst originalReplace = history.replaceState;\n\thistory.pushState = (\n\t\tstate: unknown,\n\t\tunused: string,\n\t\turl?: string | URL | null\n\t) =>\n\t\tReflect.apply(originalPush, history, [\n\t\t\tstampState(state, nav.documentId, createId()),\n\t\t\tunused,\n\t\t\turl\n\t\t]);\n\thistory.replaceState = (\n\t\tstate: unknown,\n\t\tunused: string,\n\t\turl?: string | URL | null\n\t) =>\n\t\tReflect.apply(originalReplace, history, [\n\t\t\tstampState(\n\t\t\t\tstate,\n\t\t\t\tnav.documentId,\n\t\t\t\treadStamp(history.state)?.key ?? createId()\n\t\t\t),\n\t\t\tunused,\n\t\t\turl\n\t\t]);\n\thistory.replaceState(history.state, '');\n\tnav.restoreHistory = () => {\n\t\thistory.pushState = originalPush;\n\t\thistory.replaceState = originalReplace;\n\t};\n};\n\n/* ------------------------------------------------------------------ */\n/* Scroll */\n/* ------------------------------------------------------------------ */\n\nconst recordScroll = (nav: Runtime) => {\n\tif (nav.navigating) return;\n\tconst key = currentEntryKey(nav);\n\tif (key === undefined) return;\n\tnav.scroll.set(key, { left: window.scrollX, top: window.scrollY });\n};\n\nconst trackScroll = (nav: Runtime) => {\n\tconst onScroll = () => {\n\t\tif (nav.scrollFrame !== 0) return;\n\t\tnav.scrollFrame = window.requestAnimationFrame(() => {\n\t\t\tnav.scrollFrame = 0;\n\t\t\trecordScroll(nav);\n\t\t});\n\t};\n\twindow.addEventListener('scroll', onScroll, { passive: true });\n\tnav.teardown.push(() => {\n\t\twindow.removeEventListener('scroll', onScroll);\n\t\tif (nav.scrollFrame !== 0) window.cancelAnimationFrame(nav.scrollFrame);\n\t});\n};\n\nconst scrollToHash = (hash: string) => {\n\tif (hash === '' || hash === '#') return false;\n\tconst id = decodeURIComponent(hash.slice(1));\n\tconst target =\n\t\tdocument.getElementById(id) ?? document.getElementsByName(id)[0];\n\tif (!target) return false;\n\ttarget.scrollIntoView();\n\n\treturn true;\n};\n\nconst applyScroll = (request: NavigationRequest, url: URL) => {\n\tif (request.scroll) {\n\t\twindow.scrollTo(request.scroll.left, request.scroll.top);\n\n\t\treturn;\n\t}\n\tif (scrollToHash(url.hash)) return;\n\twindow.scrollTo(0, 0);\n};\n\n/* Hydrating a document root can put the window back at the top (seen with\n * React 19 on `document`). Once the page is up, a position that was reset\n * to 0 is applied again; a position the user scrolled to stays. */\nconst reapplyScroll = (request: NavigationRequest, url: URL) => {\n\tif (window.scrollY !== 0 || window.scrollX !== 0) return;\n\tif (request.scroll && request.scroll.top + request.scroll.left > 0) {\n\t\twindow.scrollTo(request.scroll.left, request.scroll.top);\n\n\t\treturn;\n\t}\n\tif (!request.scroll) scrollToHash(url.hash);\n};\n\n/* ------------------------------------------------------------------ */\n/* Modules: re-run a page's entry when it is visited again */\n/* ------------------------------------------------------------------ */\n\nconst RELATIVE_SPECIFIER = /^(?:\\/|\\.\\.?\\/|https?:)/;\nconst IMPORT_CALL_RE = /\\bimport\\(\\s*([\"'])([^\"'\\n]+)\\1\\s*\\)/g;\nconst IMPORT_FROM_RE = /\\b(from|import)\\s*([\"'])([^\"'\\n]+)\\2/g;\n\nconst resolveSameOrigin = (specifier: string) => {\n\tif (!RELATIVE_SPECIFIER.test(specifier)) return undefined;\n\ttry {\n\t\tconst url = new URL(specifier, window.location.href);\n\n\t\treturn url.origin === window.location.origin ? url : undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n};\n\n/* A module URL evaluates once per document, so a page's hydration index\n * that already ran (the user is coming back to it) would be a no-op. Give\n * the revisit a fresh URL; its imports (framework vendor chunks, shared\n * chunks) keep their URLs, so only the entry re-runs. */\nconst moduleUrlFor = (nav: Runtime, specifier: string) => {\n\tconst url = resolveSameOrigin(specifier);\n\tif (!url) return specifier;\n\tif (!nav.evaluatedModules.has(url.href)) {\n\t\tnav.evaluatedModules.add(url.href);\n\n\t\treturn specifier;\n\t}\n\tnav.moduleRun += 1;\n\turl.searchParams.set(MODULE_RUN_PARAM, String(nav.moduleRun));\n\n\treturn url.href;\n};\n\nconst rewriteModuleSpecifiers = (nav: Runtime, source: string) =>\n\tsource\n\t\t.replace(\n\t\t\tIMPORT_CALL_RE,\n\t\t\t(_match, _quote: string, specifier: string) =>\n\t\t\t\t`import(${JSON.stringify(moduleUrlFor(nav, specifier))})`\n\t\t)\n\t\t.replace(\n\t\t\tIMPORT_FROM_RE,\n\t\t\t(match, keyword: string, _quote: string, specifier: string) =>\n\t\t\t\tresolveSameOrigin(specifier)\n\t\t\t\t\t? `${keyword} ${JSON.stringify(moduleUrlFor(nav, specifier))}`\n\t\t\t\t\t: match\n\t\t);\n\nconst rememberSpecifier = (nav: Runtime, specifier: string) => {\n\tconst url = resolveSameOrigin(specifier);\n\tif (url) nav.evaluatedModules.add(url.href);\n};\n\nconst rememberImportCalls = (nav: Runtime, text: string) => {\n\tfor (const match of text.matchAll(IMPORT_CALL_RE)) {\n\t\trememberSpecifier(nav, match[2] ?? '');\n\t}\n};\n\n/** The entries the current document already evaluated. */\nconst rememberDocumentModules = (nav: Runtime) => {\n\tfor (const script of Array.from(document.scripts)) {\n\t\tconst src = script.getAttribute('src');\n\t\tif (src && script.type === 'module') rememberSpecifier(nav, src);\n\t\trememberImportCalls(nav, script.textContent ?? '');\n\t}\n};\n\n/* ------------------------------------------------------------------ */\n/* Fetching and parsing */\n/* ------------------------------------------------------------------ */\n\nconst TRUST_ALL: ElementTrust = { kind: 'all' };\nconst TRUST_NONE: ElementTrust = { kind: 'none' };\n\nconst readTrust = (response: Response) => {\n\tconst policy = response.headers.get('content-security-policy');\n\tif (!policy) return TRUST_ALL;\n\tconst nonce = /'nonce-([^']+)'/.exec(policy)?.[1];\n\tif (!nonce) return TRUST_NONE;\n\tconst trust: ElementTrust = { kind: 'nonce', nonce };\n\n\treturn trust;\n};\n\nconst isTrusted = (element: Element, trust: ElementTrust) => {\n\tif (trust.kind === 'all') return true;\n\tif (trust.kind === 'none') return false;\n\n\treturn element.getAttribute('nonce') === trust.nonce;\n};\n\nconst takePrefetched = async (url: URL) => {\n\tconst pending =\n\t\tconsumePrefetch(url.href) ??\n\t\tconsumePrefetch(`${url.pathname}${url.search}`);\n\tif (!pending) return undefined;\n\tconst response = await pending;\n\n\treturn response.ok ? response : undefined;\n};\n\nconst fetchDocument = async (url: URL, signal: AbortSignal) =>\n\t(await takePrefetched(url)) ??\n\tfetch(url.href, {\n\t\tcredentials: 'same-origin',\n\t\theaders: { Accept: 'text/html' },\n\t\tsignal\n\t});\n\nconst escapeRegExp = (value: string) =>\n\tvalue.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n/* DOMParser documents inherit this document's CSP, so a parsed <style>\n * carrying the fetched response's nonce is reported as a violation the\n * moment it is parsed. Elements carrying that response's nonce (what a full\n * load would have run) get this document's nonce before parsing; nothing\n * else gains one. */\nconst adoptResponseNonce = (\n\tnav: Runtime,\n\thtml: string,\n\ttrust: ElementTrust\n) => {\n\tif (trust.kind !== 'nonce' || !nav.nonce) return { html, trust };\n\tconst pattern = new RegExp(\n\t\t`\\\\bnonce=([\"'])${escapeRegExp(trust.nonce)}\\\\1`,\n\t\t'g'\n\t);\n\tconst adopted: ElementTrust = { kind: 'nonce', nonce: nav.nonce };\n\n\treturn {\n\t\thtml: html.replace(pattern, `nonce=\"${nav.nonce}\"`),\n\t\ttrust: adopted\n\t};\n};\n\nconst loadDocument = async (nav: Runtime, url: URL, signal: AbortSignal) => {\n\tconst response = await fetchDocument(url, signal);\n\tconst contentType = response.headers.get('content-type') ?? '';\n\tconst finalUrl = new URL(response.url || url.href);\n\tfinalUrl.hash = url.hash;\n\tif (\n\t\t!response.ok ||\n\t\t!contentType.includes('text/html') ||\n\t\tfinalUrl.origin !== window.location.origin\n\t) {\n\t\tawait response.body?.cancel().catch(() => undefined);\n\n\t\treturn undefined;\n\t}\n\tconst { html, trust } = adoptResponseNonce(\n\t\tnav,\n\t\tawait response.text(),\n\t\treadTrust(response)\n\t);\n\tconst parsed = new DOMParser().parseFromString(html, 'text/html');\n\tconst loaded: LoadedDocument = {\n\t\tdocument: parsed,\n\t\ttrust,\n\t\turl: finalUrl\n\t};\n\n\treturn loaded;\n};\n\nconst isExecutableScript = (script: HTMLScriptElement) =>\n\tJAVASCRIPT_TYPES.has(\n\t\t(script.getAttribute('type') ?? '').trim().toLowerCase()\n\t);\n\n/* Swap each executable <script> for a comment so the parsed (inert)\n * elements never reach the live document; the comment marks where the\n * recreated script goes. */\nconst extractScripts = (loaded: LoadedDocument) =>\n\tArray.from(loaded.document.querySelectorAll('script'))\n\t\t.filter(isExecutableScript)\n\t\t.map((source) => {\n\t\t\tconst placeholder =\n\t\t\t\tloaded.document.createComment(SCRIPT_PLACEHOLDER);\n\t\t\tconst trusted = isTrusted(source, loaded.trust);\n\t\t\tsource.replaceWith(placeholder);\n\t\t\tconst pending: PendingScript = { placeholder, source, trusted };\n\n\t\t\treturn pending;\n\t\t});\n\n/* ------------------------------------------------------------------ */\n/* Stylesheets, head and body */\n/* ------------------------------------------------------------------ */\n\nconst applyNonce = (nav: Runtime, element: Element, trusted: boolean) => {\n\telement.removeAttribute('nonce');\n\t// The attribute (not just the property) so later readers of the page\n\t// nonce (`script[nonce], style[nonce]`) still find a carrier.\n\tif (trusted && nav.nonce) element.setAttribute('nonce', nav.nonce);\n};\n\nconst waitForStylesheet = (link: HTMLLinkElement) =>\n\tnew Promise<void>((resolve) => {\n\t\tconst timer = setTimeout(resolve, STYLESHEET_TIMEOUT_MS);\n\t\tconst done = () => {\n\t\t\tclearTimeout(timer);\n\t\t\tresolve();\n\t\t};\n\t\tlink.addEventListener('load', done, { once: true });\n\t\tlink.addEventListener('error', done, { once: true });\n\t});\n\n/* Load the target's stylesheets before anything is torn down, inert\n * (`media=\"not all\"`) so they can't restyle the page still on screen. */\nconst preloadStylesheets = async (loaded: LoadedDocument) => {\n\tconst links = Array.from(\n\t\tloaded.document.head.querySelectorAll<HTMLLinkElement>(\n\t\t\t'link[rel~=\"stylesheet\"]'\n\t\t)\n\t);\n\tconst media = new Map<HTMLLinkElement, string | null>();\n\tfor (const link of links) {\n\t\tmedia.set(link, link.getAttribute('media'));\n\t\tlink.setAttribute('media', 'not all');\n\t\tdocument.head.append(document.adoptNode(link));\n\t}\n\tawait Promise.all(links.map(waitForStylesheet));\n\n\treturn media;\n};\n\nconst restoreMedia = (media: Map<HTMLLinkElement, string | null>) => {\n\tfor (const [link, value] of media) {\n\t\tif (value === null) link.removeAttribute('media');\n\t\telse link.setAttribute('media', value);\n\t}\n};\n\nconst elementKey = (element: Element) => {\n\tconst attributes = Array.from(element.attributes)\n\t\t.filter((attribute) => attribute.name !== 'nonce')\n\t\t.map((attribute) => `${attribute.name}=${attribute.value}`)\n\t\t.sort()\n\t\t.join('\\u0000');\n\n\treturn `${element.tagName}\\u0001${attributes}\\u0001${element.textContent ?? ''}`;\n};\n\nconst takeMatch = (available: Map<string, Element[]>, node: Element) =>\n\tavailable.get(elementKey(node))?.shift();\n\nconst syncAttributes = (target: Element, source: Element) => {\n\tfor (const attribute of Array.from(target.attributes)) {\n\t\tif (!source.hasAttribute(attribute.name))\n\t\t\ttarget.removeAttribute(attribute.name);\n\t}\n\tfor (const attribute of Array.from(source.attributes)) {\n\t\ttarget.setAttribute(attribute.name, attribute.value);\n\t}\n};\n\nconst indexHead = (preloaded: Set<Element>) => {\n\tconst available = new Map<string, Element[]>();\n\tfor (const child of Array.from(document.head.children)) {\n\t\tif (preloaded.has(child) || child.tagName === 'SCRIPT') continue;\n\t\tconst key = elementKey(child);\n\t\tavailable.set(key, [...(available.get(key) ?? []), child]);\n\t}\n\n\treturn available;\n};\n\nconst resolveHeadNode = (nav: Runtime, node: Node, context: HeadContext) => {\n\tif (!(node instanceof Element) || context.preloaded.has(node)) return node;\n\tconst existing = takeMatch(context.available, node);\n\tif (existing) return existing;\n\tif (node.tagName === 'STYLE') {\n\t\tapplyNonce(nav, node, isTrusted(node, context.trust));\n\t}\n\n\treturn document.adoptNode(node);\n};\n\n/* Keep head elements the two pages share (same tag, attributes and text):\n * no stylesheet reload, no favicon flash. Everything else is replaced.\n * Every node is kept in order, whitespace text and comments included:\n * Svelte hydrates `<svelte:head>` by walking those nodes, and a missing one\n * makes it throw the server markup away and mount again. */\nconst swapHead = (\n\tnav: Runtime,\n\tloaded: LoadedDocument,\n\theadNodes: Node[],\n\tpreloaded: Set<Element>\n) => {\n\tconst context: HeadContext = {\n\t\tavailable: indexHead(preloaded),\n\t\tpreloaded,\n\t\ttrust: loaded.trust\n\t};\n\tconst nextNodes = headNodes.map((node) =>\n\t\tresolveHeadNode(nav, node, context)\n\t);\n\tsyncAttributes(document.head, loaded.document.head);\n\tdocument.head.replaceChildren(...nextNodes);\n};\n\nconst swapBody = (nav: Runtime, loaded: LoadedDocument) => {\n\tfor (const style of Array.from(\n\t\tloaded.document.body.querySelectorAll('style')\n\t)) {\n\t\tapplyNonce(nav, style, isTrusted(style, loaded.trust));\n\t}\n\tconst nextBody = document.adoptNode(loaded.document.body);\n\tdocument.body.replaceWith(nextBody);\n};\n\nconst disposeCurrentPage = async () => {\n\tconst dispose: unknown = Reflect.get(window, DISPOSE_GLOBAL);\n\tReflect.set(window, DISPOSE_GLOBAL, undefined);\n\tReflect.set(window, READY_GLOBAL, undefined);\n\tif (typeof dispose === 'function') await Reflect.apply(dispose, window, []);\n};\n\nconst canTearDown = () =>\n\ttypeof Reflect.get(window, DISPOSE_GLOBAL) === 'function';\n\n/* ------------------------------------------------------------------ */\n/* Scripts */\n/* ------------------------------------------------------------------ */\n\nconst islandStateOf = (value: unknown) => (isRecord(value) ? value : undefined);\n\n/* A page with islands re-seeds `window.__ABS_ISLAND_STATE__` with the\n * server's store state. The live snapshot wins per store, the same rule\n * `initializeIslandStores` applies. */\nconst keepIslandState = (live: Record<string, unknown> | undefined) => {\n\tconst current = islandStateOf(Reflect.get(globalThis, ISLAND_STATE_GLOBAL));\n\tif (!live || current === live) return live;\n\tconst merged: Record<string, unknown> = { ...(current ?? {}), ...live };\n\tReflect.set(globalThis, ISLAND_STATE_GLOBAL, merged);\n\n\treturn merged;\n};\n\nconst loadEvent = (script: HTMLScriptElement) =>\n\tnew Promise<void>((resolve) => {\n\t\tscript.addEventListener('load', () => resolve(), { once: true });\n\t\tscript.addEventListener('error', () => resolve(), { once: true });\n\t});\n\nconst createScript = (nav: Runtime, pending: PendingScript) => {\n\tconst { source } = pending;\n\tconst script = document.createElement('script');\n\tArray.from(source.attributes)\n\t\t.filter(({ name }) => name !== 'nonce' && name !== 'src')\n\t\t.forEach(({ name, value }) => script.setAttribute(name, value));\n\tapplyNonce(nav, script, pending.trusted);\n\tconst src = source.getAttribute('src');\n\tconst isModule = source.type === 'module';\n\tif (src) script.src = isModule ? moduleUrlFor(nav, src) : src;\n\tif (!src) script.text = rewriteModuleSpecifiers(nav, source.text);\n\tif (src && !source.hasAttribute('async')) script.async = false;\n\n\treturn script;\n};\n\nconst runScript = async (\n\tnav: Runtime,\n\tpending: PendingScript,\n\tislandState: IslandStateRef\n) => {\n\tif (!pending.placeholder.isConnected) return;\n\tconst script = createScript(nav, pending);\n\tconst loaded = script.src ? loadEvent(script) : Promise.resolve();\n\tpending.placeholder.replaceWith(script);\n\tislandState.live = keepIslandState(islandState.live);\n\tawait loaded;\n\tislandState.live = keepIslandState(islandState.live);\n};\n\nconst clearPageGlobals = () => {\n\tfor (const name of PAGE_GLOBALS) Reflect.deleteProperty(window, name);\n};\n\n/* In document order, one at a time: an inline script that sets\n * `__INITIAL_PROPS__` has to run before the module that hydrates with it. */\nconst runScripts = (nav: Runtime, scripts: PendingScript[]) => {\n\tconst islandState: IslandStateRef = {\n\t\tlive: islandStateOf(Reflect.get(globalThis, ISLAND_STATE_GLOBAL))\n\t};\n\n\treturn scripts.reduce<Promise<void>>(\n\t\t(previous, pending) =>\n\t\t\tprevious.then(() => runScript(nav, pending, islandState)),\n\t\tPromise.resolve()\n\t);\n};\n\nconst pollForPage = async (deadline: number): Promise<void> => {\n\tif (canTearDown() || Date.now() >= deadline) return;\n\tawait delay(PAGE_READY_POLL_MS);\n\tawait pollForPage(deadline);\n};\n\n/* The hydration index registers `__ABSOLUTE_PAGE_DISPOSE__` once it has\n * mounted — possibly after an `import()` an inline bootstrap started. */\nconst waitForPageReady = async (hasModules: boolean) => {\n\tif (hasModules) await pollForPage(Date.now() + PAGE_READY_TIMEOUT_MS);\n\tconst ready: unknown = Reflect.get(window, READY_GLOBAL);\n\tif (ready instanceof Promise) await ready.catch(() => undefined);\n};\n\nconst loadsModules = (scripts: PendingScript[]) =>\n\tscripts.some(\n\t\t({ source }) =>\n\t\t\tsource.type === 'module' || /\\bimport\\s*\\(/.test(source.text)\n\t);\n\n/* ------------------------------------------------------------------ */\n/* Focus, announcement, events */\n/* ------------------------------------------------------------------ */\n\nconst ensureAnnouncer = () => {\n\tconst existing = document.getElementById(ANNOUNCER_ID);\n\tif (existing) return existing;\n\tconst region = document.createElement('div');\n\tregion.id = ANNOUNCER_ID;\n\tregion.setAttribute('aria-live', 'assertive');\n\tregion.setAttribute('aria-atomic', 'true');\n\tregion.setAttribute('role', 'status');\n\t// CSSOM, not a style attribute: a strict `style-src-attr` can't block it.\n\tObject.assign(region.style, {\n\t\tborder: '0',\n\t\tclip: 'rect(0 0 0 0)',\n\t\theight: '1px',\n\t\tmargin: '-1px',\n\t\toverflow: 'hidden',\n\t\tpadding: '0',\n\t\tposition: 'absolute',\n\t\twhiteSpace: 'nowrap',\n\t\twidth: '1px'\n\t});\n\tdocument.body.append(region);\n\n\treturn region;\n};\n\nconst announcePage = () => {\n\tconst heading = document.querySelector('h1')?.textContent?.trim();\n\tconst text = document.title || heading || window.location.pathname;\n\tensureAnnouncer().textContent = text;\n};\n\nconst resetFocus = () => {\n\tconst autofocus = document.querySelector<HTMLElement>('[autofocus]');\n\tif (autofocus) {\n\t\tautofocus.focus();\n\n\t\treturn;\n\t}\n\tif (document.activeElement instanceof HTMLElement) {\n\t\tdocument.activeElement.blur();\n\t}\n};\n\nconst dispatch = (\n\tname: string,\n\tdetail: DocumentNavigationEventDetail,\n\tcancelable: boolean\n) => window.dispatchEvent(new CustomEvent(name, { cancelable, detail }));\n\n/* ------------------------------------------------------------------ */\n/* The navigation */\n/* ------------------------------------------------------------------ */\n\nconst outcome = (value: DocumentNavigationOutcome) => value;\n\nconst reload = (request: NavigationRequest, committed: boolean) => {\n\tif (committed || request.type === 'traverse') window.location.reload();\n\telse if (request.replace) window.location.replace(request.url.href);\n\telse window.location.assign(request.url.href);\n\n\treturn outcome('reloaded');\n};\n\nconst commitHistory = (nav: Runtime, request: NavigationRequest, url: URL) => {\n\tnav.documentId = request.documentId ?? createId();\n\tif (request.type === 'traverse') {\n\t\trecordCurrentEntry(nav);\n\n\t\treturn;\n\t}\n\tconst key = currentEntryKey(nav);\n\tif (key !== undefined) {\n\t\tnav.scroll.set(key, { left: window.scrollX, top: window.scrollY });\n\t}\n\tconst state = stampState(null, nav.documentId, createId());\n\tif (request.replace) window.history.replaceState(state, '', url.href);\n\telse window.history.pushState(state, '', url.href);\n\trecordCurrentEntry(nav);\n};\n\nconst shouldAnimate = (nav: Runtime) =>\n\tnav.options.viewTransition !== false &&\n\ttypeof Reflect.get(document, 'startViewTransition') === 'function' &&\n\t!prefersReducedMotion();\n\nconst readPromise = (value: unknown, name: string) => {\n\tif (typeof value !== 'object' || value === null) return undefined;\n\tconst promise: unknown = Reflect.get(value, name);\n\n\treturn promise instanceof Promise ? promise : undefined;\n};\n\nconst runSwap = async (nav: Runtime, swap: () => Promise<void>) => {\n\tconst start: unknown = Reflect.get(document, 'startViewTransition');\n\tif (!shouldAnimate(nav) || typeof start !== 'function') {\n\t\tawait swap();\n\n\t\treturn;\n\t}\n\tconst transition: unknown = Reflect.apply(start, document, [swap]);\n\treadPromise(transition, 'ready')?.catch(() => undefined);\n\treadPromise(transition, 'finished')?.catch(() => undefined);\n\tawait readPromise(transition, 'updateCallbackDone');\n};\n\nconst swapDocument = async (\n\tnav: Runtime,\n\trequest: NavigationRequest,\n\tloaded: LoadedDocument,\n\tisStale: () => boolean\n) => {\n\tconst scripts = extractScripts(loaded);\n\t// Before the preload moves the stylesheet links out of the parsed head.\n\tconst headNodes = Array.from(loaded.document.head.childNodes);\n\tconst media = await preloadStylesheets(loaded);\n\tconst preloaded = new Set<Element>(media.keys());\n\t// A newer navigation started while the stylesheets loaded: it owns the\n\t// page now, so drop what this one added and stop.\n\tif (isStale()) {\n\t\tpreloaded.forEach((link) => link.remove());\n\n\t\treturn false;\n\t}\n\t// Outside the View Transition callback: the browser records the scroll\n\t// position of the entry being left when the new one is pushed, and inside\n\t// the callback it reads 0, which it then restores on a later back.\n\tcommitHistory(nav, request, loaded.url);\n\tconst swap = async () => {\n\t\tawait disposeCurrentPage();\n\t\tclearPageGlobals();\n\t\tsyncAttributes(\n\t\t\tdocument.documentElement,\n\t\t\tloaded.document.documentElement\n\t\t);\n\t\tswapHead(nav, loaded, headNodes, preloaded);\n\t\tswapBody(nav, loaded);\n\t\trestoreMedia(media);\n\t\tapplyScroll(request, loaded.url);\n\t};\n\tawait runSwap(nav, swap);\n\tresetFocus();\n\tawait runScripts(nav, scripts);\n\tawait waitForPageReady(loadsModules(scripts));\n\treapplyScroll(request, loaded.url);\n\tannouncePage();\n\n\treturn true;\n};\n\nconst isCurrent = (nav: Runtime, token: number) => nav.token === token;\n\nconst performNavigation = async (nav: Runtime, request: NavigationRequest) => {\n\tnav.token += 1;\n\tconst { token } = nav;\n\tnav.controller?.abort();\n\tconst controller = new AbortController();\n\tnav.controller = controller;\n\tconst detail: DocumentNavigationEventDetail = {\n\t\ttype: request.type,\n\t\turl: request.url.href\n\t};\n\tconst proceed = dispatch(\n\t\t'absolute:before-navigate',\n\t\tdetail,\n\t\trequest.type !== 'traverse'\n\t);\n\tif (!proceed) return outcome('cancelled');\n\tif (!canTearDown()) return reload(request, false);\n\n\tconst committedBefore = nav.documentId;\n\ttry {\n\t\tconst loaded = await loadDocument(nav, request.url, controller.signal);\n\t\tif (!isCurrent(nav, token)) return outcome('superseded');\n\t\tif (!loaded) return reload(request, false);\n\t\tnav.navigating = true;\n\t\tconst swapped = await swapDocument(\n\t\t\tnav,\n\t\t\trequest,\n\t\t\tloaded,\n\t\t\t() => !isCurrent(nav, token)\n\t\t);\n\t\tif (!swapped) return outcome('superseded');\n\t\tdispatch('absolute:after-navigate', detail, false);\n\n\t\treturn outcome('swapped');\n\t} catch (error) {\n\t\tif (!isCurrent(nav, token)) return outcome('superseded');\n\t\tconsole.error('[absolute] navigation failed, loading the page:', error);\n\n\t\treturn reload(request, nav.documentId !== committedBefore);\n\t} finally {\n\t\tif (isCurrent(nav, token)) nav.navigating = false;\n\t}\n};\n\n/* ------------------------------------------------------------------ */\n/* Interception */\n/* ------------------------------------------------------------------ */\n\nconst isModifiedClick = (event: MouseEvent) =>\n\tevent.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\nconst isSamePageFragment = (url: URL) =>\n\turl.hash !== '' &&\n\turl.pathname === window.location.pathname &&\n\turl.search === window.location.search;\n\nconst findAnchor = (event: MouseEvent) => {\n\tconst { target } = event;\n\tif (!(target instanceof Element)) return null;\n\n\treturn target.closest<HTMLAnchorElement>('a[href]');\n};\n\nconst isPlainClick = (event: MouseEvent) =>\n\t!event.defaultPrevented && event.button === 0 && !isModifiedClick(event);\n\nconst isOptedOut = (anchor: HTMLAnchorElement) =>\n\t(anchor.target !== '' && anchor.target !== '_self') ||\n\tanchor.hasAttribute('download') ||\n\tanchor.relList.contains('external') ||\n\tanchor.closest(OPT_OUT_SELECTOR) !== null;\n\nconst interceptableUrl = (nav: Runtime, anchor: HTMLAnchorElement) => {\n\tif (isOptedOut(anchor)) return undefined;\n\tconst url = new URL(anchor.href, window.location.href);\n\tif (url.origin !== window.location.origin) return undefined;\n\tif (isSamePageFragment(url)) return undefined;\n\tif (nav.options.shouldIntercept?.(url) === false) return undefined;\n\n\treturn url;\n};\n\n/* Bubble phase on window: runs after every framework router's handler, so\n * a click a router handled (`preventDefault`) never reaches this. */\nconst listenForClicks = (nav: Runtime) => {\n\tconst onClick = (event: MouseEvent) => {\n\t\tif (!isPlainClick(event)) return;\n\t\tconst anchor = findAnchor(event);\n\t\tconst url = anchor ? interceptableUrl(nav, anchor) : undefined;\n\t\tif (!url || !canTearDown()) return;\n\t\tevent.preventDefault();\n\t\tvoid performNavigation(nav, { replace: false, type: 'link', url });\n\t};\n\twindow.addEventListener('click', onClick);\n\tnav.teardown.push(() => window.removeEventListener('click', onClick));\n};\n\n/* Capture phase, so it runs before the routers' popstate listeners: a\n * traversal onto another document's entry is stopped here and swapped. */\nconst listenForTraversals = (nav: Runtime) => {\n\tconst onPopState = (event: PopStateEvent) => {\n\t\tif (!isForeignEntry(nav)) return;\n\t\tevent.stopImmediatePropagation();\n\t\tconst owner = currentEntryOwner(nav);\n\t\tconst key = currentEntryKey(nav);\n\t\tvoid performNavigation(nav, {\n\t\t\tdocumentId: owner,\n\t\t\treplace: false,\n\t\t\tscroll: key === undefined ? undefined : nav.scroll.get(key),\n\t\t\ttype: 'traverse',\n\t\t\turl: new URL(window.location.href)\n\t\t});\n\t};\n\twindow.addEventListener('popstate', onPopState, { capture: true });\n\tnav.teardown.push(() =>\n\t\twindow.removeEventListener('popstate', onPopState, { capture: true })\n\t);\n};\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* ------------------------------------------------------------------ */\n\n/** Turn the layer off: listeners removed, history methods restored. */\nexport const disableNavigation = () => {\n\tconst installed = readPublicRuntime();\n\tif (installed && typeof installed.disable === 'function') {\n\t\tReflect.apply(installed.disable, undefined, []);\n\t}\n};\n\nconst teardownRuntime = (nav: Runtime) => {\n\tnav.controller?.abort();\n\tfor (const cleanup of nav.teardown.splice(0)) cleanup();\n\tnav.restoreHistory?.();\n\tReflect.deleteProperty(globalThis, RUNTIME_KEY);\n\tif (runtime === nav) runtime = undefined;\n};\n\nconst navigateWith =\n\t(nav: Runtime) =>\n\t(href: string, options: NavigateDocumentOptions = {}) => {\n\t\tconst url = new URL(href, window.location.href);\n\t\tif (url.origin !== window.location.origin) {\n\t\t\twindow.location.assign(url.href);\n\n\t\t\treturn Promise.resolve<DocumentNavigationOutcome>('reloaded');\n\t\t}\n\n\t\treturn performNavigation(nav, {\n\t\t\treplace: options.replace === true,\n\t\t\ttype: 'navigate',\n\t\t\turl\n\t\t});\n\t};\n\n/**\n * Install cross-framework document navigation for this tab. Idempotent:\n * every page can call it (each framework bundle carries its own copy of\n * this module; the first call wins and its options apply).\n */\nexport const enableNavigation = (options: EnableNavigationOptions = {}) => {\n\tif (typeof window === 'undefined' || readPublicRuntime()) return;\n\tconst navigationApi = readNavigationApi();\n\tconst nav: Runtime = {\n\t\tcontroller: undefined,\n\t\tdocumentId: createId(),\n\t\tentryOwners: new Map(),\n\t\tevaluatedModules: new Set(),\n\t\tmoduleRun: 0,\n\t\tnavigating: false,\n\t\tnavigationApi,\n\t\tnonce: readPageNonce(),\n\t\toptions,\n\t\trestoreHistory: undefined,\n\t\tscroll: new Map(),\n\t\tscrollFrame: 0,\n\t\tteardown: [],\n\t\ttoken: 0\n\t};\n\truntime = nav;\n\tif (navigationApi) trackEntries(nav, navigationApi);\n\telse patchHistory(nav);\n\trememberDocumentModules(nav);\n\ttrackScroll(nav);\n\tlistenForClicks(nav);\n\tlistenForTraversals(nav);\n\tconst publicRuntime: PublicRuntime = {\n\t\tnavigate: navigateWith(nav),\n\t\tdisable: () => teardownRuntime(nav)\n\t};\n\tReflect.set(globalThis, RUNTIME_KEY, publicRuntime);\n};\n\nconst OUTCOMES = new Set<unknown>([\n\t'cancelled',\n\t'reloaded',\n\t'superseded',\n\t'swapped'\n]);\n\nconst isOutcome = (value: unknown): value is DocumentNavigationOutcome =>\n\tOUTCOMES.has(value);\n\n/** Whether `enableNavigation()` is active in this tab. */\nexport const isNavigationEnabled = () =>\n\ttypeof window !== 'undefined' && readPublicRuntime() !== undefined;\n\n/**\n * Navigate to `href` through the layer: a soft swap when it is enabled\n * and the page can be torn down, a normal page load otherwise.\n */\nexport const navigateDocument = async (\n\thref: string,\n\toptions: NavigateDocumentOptions = {}\n) => {\n\tconst installed = readPublicRuntime();\n\tconst navigate = installed?.navigate;\n\tif (typeof navigate === 'function') {\n\t\tconst result: unknown = await Reflect.apply(navigate, undefined, [\n\t\t\thref,\n\t\t\toptions\n\t\t]);\n\t\tif (isOutcome(result)) return result;\n\t}\n\tif (options.replace) window.location.replace(href);\n\telse window.location.assign(href);\n\n\treturn outcome('reloaded');\n};\n"
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