@nanoforge-dev/editor 0.0.2-beta.394e65b → 0.0.2-beta.580354c

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 (138) hide show
  1. package/dist/client/_app/immutable/assets/0.BRAq3OL4.css +1 -0
  2. package/dist/client/_app/immutable/assets/0.BRAq3OL4.css.br +0 -0
  3. package/dist/client/_app/immutable/assets/0.BRAq3OL4.css.gz +0 -0
  4. package/dist/client/_app/immutable/chunks/{BApLQfqY.js → Brp9NRGe.js} +3 -3
  5. package/dist/client/_app/immutable/chunks/Brp9NRGe.js.br +0 -0
  6. package/dist/client/_app/immutable/chunks/Brp9NRGe.js.gz +0 -0
  7. package/dist/client/_app/immutable/chunks/BwpZ7W8G.js +1 -0
  8. package/dist/client/_app/immutable/chunks/BwpZ7W8G.js.br +0 -0
  9. package/dist/client/_app/immutable/chunks/BwpZ7W8G.js.gz +0 -0
  10. package/dist/client/_app/immutable/chunks/{Coa6r0tY.js → CObqXk_q.js} +1 -1
  11. package/dist/client/_app/immutable/chunks/CObqXk_q.js.br +0 -0
  12. package/dist/client/_app/immutable/chunks/CObqXk_q.js.gz +0 -0
  13. package/dist/client/_app/immutable/chunks/{CmuvbAn5.js → CZo4a556.js} +1 -1
  14. package/dist/client/_app/immutable/chunks/CZo4a556.js.br +0 -0
  15. package/dist/client/_app/immutable/chunks/CZo4a556.js.gz +0 -0
  16. package/dist/client/_app/immutable/chunks/{DfAL3LhV.js → D1JHNh7-.js} +1 -1
  17. package/dist/client/_app/immutable/chunks/D1JHNh7-.js.br +0 -0
  18. package/dist/client/_app/immutable/chunks/D1JHNh7-.js.gz +0 -0
  19. package/dist/client/_app/immutable/chunks/{Ctc_6ReW.js → v6YHThuS.js} +1 -1
  20. package/dist/client/_app/immutable/chunks/v6YHThuS.js.br +0 -0
  21. package/dist/client/_app/immutable/chunks/v6YHThuS.js.gz +0 -0
  22. package/dist/client/_app/immutable/entry/{app.BzOeKbPs.js → app.B8CjVJ8m.js} +2 -2
  23. package/dist/client/_app/immutable/entry/app.B8CjVJ8m.js.br +0 -0
  24. package/dist/client/_app/immutable/entry/app.B8CjVJ8m.js.gz +0 -0
  25. package/dist/client/_app/immutable/entry/start.xcie2Yx0.js +1 -0
  26. package/dist/client/_app/immutable/entry/start.xcie2Yx0.js.br +0 -0
  27. package/dist/client/_app/immutable/entry/start.xcie2Yx0.js.gz +0 -0
  28. package/dist/client/_app/immutable/nodes/{1.OaHPDibP.js → 1.aoxJA8Qo.js} +1 -1
  29. package/dist/client/_app/immutable/nodes/1.aoxJA8Qo.js.br +3 -0
  30. package/dist/client/_app/immutable/nodes/1.aoxJA8Qo.js.gz +0 -0
  31. package/dist/client/_app/immutable/nodes/{9.Hjdmo-wG.js → 10.DTh0Qakp.js} +1 -1
  32. package/dist/client/_app/immutable/nodes/10.DTh0Qakp.js.br +0 -0
  33. package/dist/client/_app/immutable/nodes/10.DTh0Qakp.js.gz +0 -0
  34. package/dist/client/_app/immutable/nodes/2.DggbBWOd.js +1 -0
  35. package/dist/client/_app/immutable/nodes/2.DggbBWOd.js.br +0 -0
  36. package/dist/client/_app/immutable/nodes/2.DggbBWOd.js.gz +0 -0
  37. package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js +6 -0
  38. package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js.br +0 -0
  39. package/dist/client/_app/immutable/nodes/3.CldxEoeJ.js.gz +0 -0
  40. package/dist/client/_app/version.json +1 -1
  41. package/dist/client/_app/version.json.br +0 -0
  42. package/dist/client/_app/version.json.gz +0 -0
  43. package/dist/server/chunks/{0-CM-Y6ut6.js → 0-BAWoYonx.js} +3 -3
  44. package/dist/server/chunks/{0-CM-Y6ut6.js.map → 0-BAWoYonx.js.map} +1 -1
  45. package/dist/server/chunks/{1-C2ffLW3O.js → 1-l2q82N-q.js} +5 -5
  46. package/dist/server/chunks/{1-C2ffLW3O.js.map → 1-l2q82N-q.js.map} +1 -1
  47. package/dist/server/chunks/{9-CDMb5iwc.js → 10-DliMkA_F.js} +10 -10
  48. package/dist/server/chunks/10-DliMkA_F.js.map +1 -0
  49. package/dist/server/chunks/{2-BAs82M_7.js → 2-BTcCBWEw.js} +7 -7
  50. package/dist/server/chunks/{2-BAs82M_7.js.map → 2-BTcCBWEw.js.map} +1 -1
  51. package/dist/server/chunks/3-B9-EfDcH.js +22 -0
  52. package/dist/server/chunks/3-B9-EfDcH.js.map +1 -0
  53. package/dist/server/chunks/{3-CtfjP4uZ.js → 4-BYQgShv3.js} +3 -3
  54. package/dist/server/chunks/{3-CtfjP4uZ.js.map → 4-BYQgShv3.js.map} +1 -1
  55. package/dist/server/chunks/{8-s07Rj2Zo.js → 5-B4IXyXqv.js} +3 -3
  56. package/dist/server/chunks/{8-s07Rj2Zo.js.map → 5-B4IXyXqv.js.map} +1 -1
  57. package/dist/server/chunks/{4-DP-_gDay.js → 6-DH_IMDRv.js} +3 -3
  58. package/dist/server/chunks/{4-DP-_gDay.js.map → 6-DH_IMDRv.js.map} +1 -1
  59. package/dist/server/chunks/{6-Dl_h_OyU.js → 7-CPMeoSUO.js} +3 -3
  60. package/dist/server/chunks/{6-Dl_h_OyU.js.map → 7-CPMeoSUO.js.map} +1 -1
  61. package/dist/server/chunks/{7-BUEKgK7m.js → 8-CRTa48Fz.js} +3 -3
  62. package/dist/server/chunks/{7-BUEKgK7m.js.map → 8-CRTa48Fz.js.map} +1 -1
  63. package/dist/server/chunks/{5-610NKQc3.js → 9-DPn3d8kr.js} +3 -3
  64. package/dist/server/chunks/{5-610NKQc3.js.map → 9-DPn3d8kr.js.map} +1 -1
  65. package/dist/server/chunks/{_page.svelte-vOyGpofm.js → _page.svelte-1s5jXYk_.js} +164 -28
  66. package/dist/server/chunks/_page.svelte-1s5jXYk_.js.map +1 -0
  67. package/dist/server/chunks/{_page.svelte-DR4jsdM6.js → _page.svelte-B-TY3dq2.js} +6 -6
  68. package/dist/server/chunks/{_page.svelte-DR4jsdM6.js.map → _page.svelte-B-TY3dq2.js.map} +1 -1
  69. package/dist/server/chunks/{_page.svelte-Bn7BSazx.js → _page.svelte-BHks8xKU.js} +5 -5
  70. package/dist/server/chunks/{_page.svelte-Bn7BSazx.js.map → _page.svelte-BHks8xKU.js.map} +1 -1
  71. package/dist/server/chunks/{_server.ts-DlC2sxcm.js → _server.ts-y6LeO9-5.js} +14 -2
  72. package/dist/server/chunks/_server.ts-y6LeO9-5.js.map +1 -0
  73. package/dist/server/chunks/{client-bZcBshMs.js → client-DWDrOrQL.js} +2 -2
  74. package/dist/server/chunks/{client-bZcBshMs.js.map → client-DWDrOrQL.js.map} +1 -1
  75. package/dist/server/chunks/{error-DYeUQ7mQ.js → error-cCQrHDre.js} +53 -30
  76. package/dist/server/chunks/error-cCQrHDre.js.map +1 -0
  77. package/dist/server/chunks/{error.svelte-DDsdZM_m.js → error.svelte-nsiVeFAJ.js} +2 -2
  78. package/dist/server/chunks/{error.svelte-DDsdZM_m.js.map → error.svelte-nsiVeFAJ.js.map} +1 -1
  79. package/dist/server/chunks/{hooks.server-BGpE7svk.js → hooks.server-Cdesln7C.js} +2 -2
  80. package/dist/server/chunks/{hooks.server-BGpE7svk.js.map → hooks.server-Cdesln7C.js.map} +1 -1
  81. package/dist/server/chunks/{internal2-DBpj29pr.js → internal2-DF9-voLX.js} +3 -3
  82. package/dist/server/chunks/{internal2-DBpj29pr.js.map → internal2-DF9-voLX.js.map} +1 -1
  83. package/dist/server/chunks/{logo-DQI0khKS.js → logo-CgSTOPfJ.js} +2 -2
  84. package/dist/server/chunks/logo-CgSTOPfJ.js.map +1 -0
  85. package/dist/server/chunks/{project-loader-DaQVgPID.js → project-loader-DPwVwx5v.js} +3 -3
  86. package/dist/server/chunks/{project-loader-DaQVgPID.js.map → project-loader-DPwVwx5v.js.map} +1 -1
  87. package/dist/server/chunks/{schemas-BDVbWglI.js → schemas-nSPQog67.js} +4 -4
  88. package/dist/server/chunks/{schemas-BDVbWglI.js.map → schemas-nSPQog67.js.map} +1 -1
  89. package/dist/server/chunks/{state-DwdUA00F.js → state-CuPzwLiF.js} +2 -2
  90. package/dist/server/chunks/{state-DwdUA00F.js.map → state-CuPzwLiF.js.map} +1 -1
  91. package/dist/server/index.js +1 -1
  92. package/dist/server/manifest.js +28 -28
  93. package/dist/server/manifest.js.map +1 -1
  94. package/package.json +1 -1
  95. package/dist/client/_app/immutable/assets/0.DOl0zkp7.css +0 -1
  96. package/dist/client/_app/immutable/assets/0.DOl0zkp7.css.br +0 -0
  97. package/dist/client/_app/immutable/assets/0.DOl0zkp7.css.gz +0 -0
  98. package/dist/client/_app/immutable/chunks/BApLQfqY.js.br +0 -0
  99. package/dist/client/_app/immutable/chunks/BApLQfqY.js.gz +0 -0
  100. package/dist/client/_app/immutable/chunks/BDBSsbMb.js +0 -1
  101. package/dist/client/_app/immutable/chunks/BDBSsbMb.js.br +0 -0
  102. package/dist/client/_app/immutable/chunks/BDBSsbMb.js.gz +0 -0
  103. package/dist/client/_app/immutable/chunks/CmuvbAn5.js.br +0 -0
  104. package/dist/client/_app/immutable/chunks/CmuvbAn5.js.gz +0 -0
  105. package/dist/client/_app/immutable/chunks/Coa6r0tY.js.br +0 -0
  106. package/dist/client/_app/immutable/chunks/Coa6r0tY.js.gz +0 -0
  107. package/dist/client/_app/immutable/chunks/Ctc_6ReW.js.br +0 -0
  108. package/dist/client/_app/immutable/chunks/Ctc_6ReW.js.gz +0 -0
  109. package/dist/client/_app/immutable/chunks/DfAL3LhV.js.br +0 -0
  110. package/dist/client/_app/immutable/chunks/DfAL3LhV.js.gz +0 -0
  111. package/dist/client/_app/immutable/entry/app.BzOeKbPs.js.br +0 -0
  112. package/dist/client/_app/immutable/entry/app.BzOeKbPs.js.gz +0 -0
  113. package/dist/client/_app/immutable/entry/start.CNF2MUuM.js +0 -1
  114. package/dist/client/_app/immutable/entry/start.CNF2MUuM.js.br +0 -0
  115. package/dist/client/_app/immutable/entry/start.CNF2MUuM.js.gz +0 -0
  116. package/dist/client/_app/immutable/nodes/1.OaHPDibP.js.br +0 -2
  117. package/dist/client/_app/immutable/nodes/1.OaHPDibP.js.gz +0 -0
  118. package/dist/client/_app/immutable/nodes/10.BRGL1_0_.js +0 -6
  119. package/dist/client/_app/immutable/nodes/10.BRGL1_0_.js.br +0 -0
  120. package/dist/client/_app/immutable/nodes/10.BRGL1_0_.js.gz +0 -0
  121. package/dist/client/_app/immutable/nodes/2.BK6m2FYa.js +0 -1
  122. package/dist/client/_app/immutable/nodes/2.BK6m2FYa.js.br +0 -0
  123. package/dist/client/_app/immutable/nodes/2.BK6m2FYa.js.gz +0 -0
  124. package/dist/client/_app/immutable/nodes/9.Hjdmo-wG.js.br +0 -0
  125. package/dist/client/_app/immutable/nodes/9.Hjdmo-wG.js.gz +0 -0
  126. package/dist/server/chunks/10-DhkWDAeT.js +0 -22
  127. package/dist/server/chunks/10-DhkWDAeT.js.map +0 -1
  128. package/dist/server/chunks/9-CDMb5iwc.js.map +0 -1
  129. package/dist/server/chunks/_page.svelte-vOyGpofm.js.map +0 -1
  130. package/dist/server/chunks/_server.ts-DlC2sxcm.js.map +0 -1
  131. package/dist/server/chunks/error-DYeUQ7mQ.js.map +0 -1
  132. package/dist/server/chunks/logo-DQI0khKS.js.map +0 -1
  133. /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css → 3.BP_hUVIU.css} +0 -0
  134. /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css.br → 3.BP_hUVIU.css.br} +0 -0
  135. /package/dist/client/_app/immutable/assets/{10.BP_hUVIU.css.gz → 3.BP_hUVIU.css.gz} +0 -0
  136. /package/dist/client/_app/immutable/nodes/{0.CPqemWaq.js → 0.Cc3CiDns.js} +0 -0
  137. /package/dist/client/_app/immutable/nodes/{0.CPqemWaq.js.br → 0.Cc3CiDns.js.br} +0 -0
  138. /package/dist/client/_app/immutable/nodes/{0.CPqemWaq.js.gz → 0.Cc3CiDns.js.gz} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { k as escape_html } from "./events-Bhh2w-5S.js";
2
- import { t as page } from "./state-DwdUA00F.js";
2
+ import { t as page } from "./state-CuPzwLiF.js";
3
3
  //#region .svelte-kit/adapter-bun/entries/fallbacks/error.svelte.js
4
4
  function Error($$renderer, $$props) {
5
5
  $$renderer.component(($$renderer) => {
@@ -9,4 +9,4 @@ function Error($$renderer, $$props) {
9
9
  //#endregion
10
10
  export { Error as default };
11
11
 
12
- //# sourceMappingURL=error.svelte-DDsdZM_m.js.map
12
+ //# sourceMappingURL=error.svelte-nsiVeFAJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.svelte-DDsdZM_m.js","names":[],"sources":["../../../.svelte-kit/adapter-bun/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { ct as escape_html } from \"../../chunks/index-server.js\";\nimport { t as page } from \"../../chunks/state.js\";\n//#region node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte\nfunction Error($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\t$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n\t});\n}\n//#endregion\nexport { Error as default };\n"],"mappings":";;;AAGA,SAAS,MAAM,YAAY,SAAS;CACnC,WAAW,WAAW,eAAe;EACpC,WAAW,KAAK,OAAO,YAAY,KAAK,MAAM,EAAE,WAAW,YAAY,KAAK,OAAO,OAAO,EAAE,KAAK;CAClG,CAAC;AACF"}
1
+ {"version":3,"file":"error.svelte-nsiVeFAJ.js","names":[],"sources":["../../../.svelte-kit/adapter-bun/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { ct as escape_html } from \"../../chunks/index-server.js\";\nimport { t as page } from \"../../chunks/state.js\";\n//#region node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte\nfunction Error($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\t$$renderer.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n\t});\n}\n//#endregion\nexport { Error as default };\n"],"mappings":";;;AAGA,SAAS,MAAM,YAAY,SAAS;CACnC,WAAW,WAAW,eAAe;EACpC,WAAW,KAAK,OAAO,YAAY,KAAK,MAAM,EAAE,WAAW,YAAY,KAAK,OAAO,OAAO,EAAE,KAAK;CAClG,CAAC;AACF"}
@@ -1,4 +1,4 @@
1
- import { A as with_request_store, D as merge_tracing, O as get_request_store } from "./internal2-DBpj29pr.js";
1
+ import { A as with_request_store, D as merge_tracing, O as get_request_store } from "./internal2-DF9-voLX.js";
2
2
  import { c as sessionHandle, n as checkAuthorizationHandle } from "./session-DLCjVGKo.js";
3
3
  import { a as serverAsyncLocalStorage, i as overwriteServerAsyncLocalStorage, n as getStrategyForUrl, o as shouldRedirect, r as isExcludedByRouteStrategy, t as deLocalizeUrl } from "./runtime-CDHWD9vo.js";
4
4
  //#region node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js
@@ -359,4 +359,4 @@ var handle = sequence(sessionHandle, handleParaglide, checkAuthorizationHandle);
359
359
  //#endregion
360
360
  export { handle };
361
361
 
362
- //# sourceMappingURL=hooks.server-BGpE7svk.js.map
362
+ //# sourceMappingURL=hooks.server-Cdesln7C.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.server-BGpE7svk.js","names":[],"sources":["../../../node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js","../../../.svelte-kit/adapter-bun/entries/hooks.server.js"],"sourcesContent":["/** @import { Handle, RequestEvent, ResolveOptions } from '@sveltejs/kit' */\n/** @import { MaybePromise } from 'types' */\nimport {\n\tmerge_tracing,\n\tget_request_store,\n\twith_request_store\n} from '@sveltejs/kit/internal/server';\n\n/**\n * A helper function for sequencing multiple `handle` calls in a middleware-like manner.\n * The behavior for the `handle` options is as follows:\n * - `transformPageChunk` is applied in reverse order and merged\n * - `preload` is applied in forward order, the first option \"wins\" and no `preload` options after it are called\n * - `filterSerializedResponseHeaders` behaves the same as `preload`\n *\n * ```js\n * /// file: src/hooks.server.js\n * import { sequence } from '@sveltejs/kit/hooks';\n *\n * /// type: import('@sveltejs/kit').Handle\n * async function first({ event, resolve }) {\n * \tconsole.log('first pre-processing');\n * \tconst result = await resolve(event, {\n * \t\ttransformPageChunk: ({ html }) => {\n * \t\t\t// transforms are applied in reverse order\n * \t\t\tconsole.log('first transform');\n * \t\t\treturn html;\n * \t\t},\n * \t\tpreload: () => {\n * \t\t\t// this one wins as it's the first defined in the chain\n * \t\t\tconsole.log('first preload');\n * \t\t\treturn true;\n * \t\t}\n * \t});\n * \tconsole.log('first post-processing');\n * \treturn result;\n * }\n *\n * /// type: import('@sveltejs/kit').Handle\n * async function second({ event, resolve }) {\n * \tconsole.log('second pre-processing');\n * \tconst result = await resolve(event, {\n * \t\ttransformPageChunk: ({ html }) => {\n * \t\t\tconsole.log('second transform');\n * \t\t\treturn html;\n * \t\t},\n * \t\tpreload: () => {\n * \t\t\tconsole.log('second preload');\n * \t\t\treturn true;\n * \t\t},\n * \t\tfilterSerializedResponseHeaders: () => {\n * \t\t\t// this one wins as it's the first defined in the chain\n * \t\t\tconsole.log('second filterSerializedResponseHeaders');\n * \t\t\treturn true;\n * \t\t}\n * \t});\n * \tconsole.log('second post-processing');\n * \treturn result;\n * }\n *\n * export const handle = sequence(first, second);\n * ```\n *\n * The example above would print:\n *\n * ```\n * first pre-processing\n * first preload\n * second pre-processing\n * second filterSerializedResponseHeaders\n * second transform\n * first transform\n * second post-processing\n * first post-processing\n * ```\n *\n * @param {...Handle} handlers The chain of `handle` functions\n * @returns {Handle}\n */\nexport function sequence(...handlers) {\n\tconst length = handlers.length;\n\tif (!length) return ({ event, resolve }) => resolve(event);\n\n\treturn ({ event, resolve }) => {\n\t\tconst { state } = get_request_store();\n\t\treturn apply_handle(0, event, {});\n\n\t\t/**\n\t\t * @param {number} i\n\t\t * @param {RequestEvent} event\n\t\t * @param {ResolveOptions | undefined} parent_options\n\t\t * @returns {MaybePromise<Response>}\n\t\t */\n\t\tfunction apply_handle(i, event, parent_options) {\n\t\t\tconst handle = handlers[i];\n\n\t\t\treturn state.tracing.record_span({\n\t\t\t\tname: `sveltekit.handle.sequenced.${handle.name ? handle.name : i}`,\n\t\t\t\tattributes: {},\n\t\t\t\tfn: async (current) => {\n\t\t\t\t\tconst traced_event = merge_tracing(event, current);\n\t\t\t\t\treturn await with_request_store({ event: traced_event, state }, () =>\n\t\t\t\t\t\thandle({\n\t\t\t\t\t\t\tevent: traced_event,\n\t\t\t\t\t\t\tresolve: (event, options) => {\n\t\t\t\t\t\t\t\t/** @type {ResolveOptions['transformPageChunk']} */\n\t\t\t\t\t\t\t\tconst transformPageChunk = async ({ html, done }) => {\n\t\t\t\t\t\t\t\t\tif (options?.transformPageChunk) {\n\t\t\t\t\t\t\t\t\t\thtml = (await options.transformPageChunk({ html, done })) ?? '';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (parent_options?.transformPageChunk) {\n\t\t\t\t\t\t\t\t\t\thtml = (await parent_options.transformPageChunk({ html, done })) ?? '';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn html;\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t/** @type {ResolveOptions['filterSerializedResponseHeaders']} */\n\t\t\t\t\t\t\t\tconst filterSerializedResponseHeaders =\n\t\t\t\t\t\t\t\t\tparent_options?.filterSerializedResponseHeaders ??\n\t\t\t\t\t\t\t\t\toptions?.filterSerializedResponseHeaders;\n\n\t\t\t\t\t\t\t\t/** @type {ResolveOptions['preload']} */\n\t\t\t\t\t\t\t\tconst preload = parent_options?.preload ?? options?.preload;\n\n\t\t\t\t\t\t\t\treturn i < length - 1\n\t\t\t\t\t\t\t\t\t? apply_handle(i + 1, event, {\n\t\t\t\t\t\t\t\t\t\t\ttransformPageChunk,\n\t\t\t\t\t\t\t\t\t\t\tfilterSerializedResponseHeaders,\n\t\t\t\t\t\t\t\t\t\t\tpreload\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t: resolve(event, {\n\t\t\t\t\t\t\t\t\t\t\ttransformPageChunk,\n\t\t\t\t\t\t\t\t\t\t\tfilterSerializedResponseHeaders,\n\t\t\t\t\t\t\t\t\t\t\tpreload\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n}\n","import { a as sessionHandle, i as checkAuthorizationHandle } from \"../chunks/session.js\";\nimport { a as serverAsyncLocalStorage, i as overwriteServerAsyncLocalStorage, n as getStrategyForUrl, o as shouldRedirect, r as isExcludedByRouteStrategy, t as deLocalizeUrl } from \"../chunks/runtime.js\";\nimport { sequence } from \"@sveltejs/kit/hooks\";\n//#region src/lib/paraglide/server.js\n/**\n* Server middleware that handles locale-based routing and request processing.\n*\n* Configure `disableAsyncLocalStorage` when generating Paraglide with\n* `paraglideVitePlugin()` or `compile()`, not when calling\n* `paraglideMiddleware()`. Keep AsyncLocalStorage enabled by default and\n* only disable it for runtimes that lack `AsyncLocalStorage` support and\n* guarantee request isolation.\n*\n* This middleware performs several key functions:\n*\n* 1. Determines the locale for the incoming request using configured strategies\n* 2. Handles URL localization and redirects (only for document requests)\n* 3. Maintains locale state using AsyncLocalStorage to prevent request interference\n*\n* When URL strategy is used:\n*\n* - The locale is extracted from the URL for all request types\n* - If URL doesn't match the determined locale, redirects to localized URL (only for document requests)\n* - De-localizes URLs before passing to server (e.g., `/fr/about` → `/about`)\n*\n* @see https://inlang.com/m/gerre34r/library-inlang-paraglideJs/middleware\n*\n* @template T - The return type of the resolve function\n*\n* @param {Request} request - The incoming request object\n* @param {(args: { request: Request, locale: import(\"./runtime.js\").Locale }) => T | Promise<T>} resolve - Function to handle the request. The callback receives:\n* - `request`: A modified request with a delocalized URL when the URL strategy is used (e.g., `/fr/about` → `/about`).\n* If your framework handles URL localization itself (e.g., TanStack Router's `rewrite` option), use the original\n* request instead to avoid redirect loops.\n* - `locale`: The determined locale for this request.\n* @param {{\n* effectiveRequestUrl?: string | URL | ((request: Request) => string | URL),\n* onRedirect?: (response: Response) => void\n* }} [options] - Options to control middleware behavior. `effectiveRequestUrl` sets the effective request URL used for route matching, URL-based locale detection, redirects, and `getUrlOrigin()`.\n* @returns {Promise<Response>}\n*\n* @example\n* ```typescript\n* // Basic usage in metaframeworks like NextJS, SvelteKit, Astro, Nuxt, etc.\n* export const handle = async ({ event, resolve }) => {\n* return paraglideMiddleware(event.request, ({ request, locale }) => {\n* // let the framework further resolve the request\n* return resolve(request);\n* });\n* };\n* ```\n*\n* @example\n* ```typescript\n* // Usage in a framework like Express JS or Hono\n* app.use(async (req, res, next) => {\n* const result = await paraglideMiddleware(req, ({ request, locale }) => {\n* // If a redirect happens this won't be called\n* return next(request);\n* });\n* });\n* ```\n*\n* @example\n* ```typescript\n* // Usage with frameworks that handle URL localization/delocalization themselves\n* //\n* // Some frameworks like TanStack Router handle URL localization and delocalization\n* // themselves via their own rewrite APIs (e.g., `rewrite.input`/`rewrite.output`).\n* //\n* // When the framework handles this, the middleware's URL delocalization is not needed.\n* // Using the modified `request` from the callback would cause a redirect loop because\n* // both the middleware and the framework would attempt to delocalize the URL.\n* //\n* // Solution: Pass the original request to the handler instead of the modified one.\n* // The middleware still handles locale detection, cookies, and AsyncLocalStorage context.\n* //\n* // ❌ WRONG - causes redirect loop when framework handles URL rewriting:\n* // paraglideMiddleware(req, ({ request }) => handler.fetch(request))\n* //\n* // ✅ CORRECT - use original request when framework handles URL localization:\n* // paraglideMiddleware(req, () => handler.fetch(req))\n*\n* * *\n* export default {\n* fetch(req: Request): Promise<Response> {\n* // TanStack Router handles URL rewriting via deLocalizeUrl/localizeUrl\n* // so we pass the original `req` instead of the modified `request`\n* return paraglideMiddleware(req, () => handler.fetch(req))\n* },\n* }\n* ```\n*/\nasync function paraglideMiddleware(request, resolve, options) {\n\tif (!serverAsyncLocalStorage) {\n\t\tconst { AsyncLocalStorage } = await import(\"node:async_hooks\");\n\t\toverwriteServerAsyncLocalStorage(new AsyncLocalStorage());\n\t} else if (!serverAsyncLocalStorage) overwriteServerAsyncLocalStorage(createMockAsyncLocalStorage());\n\tconst url = resolveMiddlewareUrl(request, options?.effectiveRequestUrl);\n\tconst origin = url.origin;\n\tif (isExcludedByRouteStrategy(url.href)) {\n\t\tconst locale = \"en\";\n\t\tconst newRequest = cloneRequestWithFallback(request, url);\n\t\t/** @type {Set<string>} */\n\t\tconst messageCalls = /* @__PURE__ */ new Set();\n\t\treturn await serverAsyncLocalStorage?.run({\n\t\t\tlocale,\n\t\t\torigin,\n\t\t\tmessageCalls\n\t\t}, () => resolve({\n\t\t\tlocale,\n\t\t\trequest: newRequest\n\t\t}));\n\t}\n\tconst strategy = getStrategyForUrl(url.href);\n\tconst decision = await shouldRedirect({\n\t\trequest,\n\t\teffectiveRequestUrl: url\n\t});\n\tconst locale = decision.locale;\n\tif (request.headers.get(\"Sec-Fetch-Dest\") === \"document\" && decision.shouldRedirect && decision.redirectUrl) {\n\t\t/** @type {Record<string, string>} */\n\t\tconst headers = {};\n\t\tif (strategy.includes(\"preferredLanguage\")) headers[\"Vary\"] = \"Accept-Language\";\n\t\tconst response = new Response(null, {\n\t\t\tstatus: 307,\n\t\t\theaders: {\n\t\t\t\tLocation: decision.redirectUrl.href,\n\t\t\t\t...headers\n\t\t\t}\n\t\t});\n\t\toptions?.onRedirect?.(response);\n\t\treturn response;\n\t}\n\tlet newRequest;\n\tif (strategy.includes(\"url\")) newRequest = cloneRequestWithFallback(request, deLocalizeUrl(url));\n\telse newRequest = cloneRequestWithFallback(request, url);\n\t/** @type {Set<string>} */\n\tconst messageCalls = /* @__PURE__ */ new Set();\n\treturn await serverAsyncLocalStorage?.run({\n\t\tlocale,\n\t\torigin,\n\t\tmessageCalls\n\t}, () => resolve({\n\t\tlocale,\n\t\trequest: newRequest\n\t}));\n}\n/**\n* @param {Request} request\n* @param {string | URL | ((request: Request) => string | URL) | undefined} effectiveRequestUrl\n* @returns {URL}\n*/\nfunction resolveMiddlewareUrl(request, effectiveRequestUrl) {\n\tif (typeof effectiveRequestUrl === \"function\") return new URL(effectiveRequestUrl(request), request.url);\n\tif (typeof effectiveRequestUrl === \"string\" || effectiveRequestUrl instanceof URL) return new URL(effectiveRequestUrl, request.url);\n\treturn new URL(request.url);\n}\n/**\n* Some metaframeworks (NextJS) require a new Request object.\n* https://github.com/opral/inlang-paraglide-js/issues/411\n*\n* However, some frameworks (TanStack Start 1.143+) use custom Request\n* implementations that cannot be cloned with `new Request(request)`.\n* https://github.com/opral/paraglide-js/issues/573\n*\n* Effective request URL overrides behind proxies:\n* https://github.com/opral/paraglide-js/issues/652\n*\n* @param {Request} request\n* @param {string | URL} [url]\n* @returns {Request}\n*/\nfunction cloneRequestWithFallback(request, url = request.url) {\n\tconst targetUrl = typeof url === \"string\" ? url : url.href;\n\tif (targetUrl === request.url) try {\n\t\treturn new Request(request.clone());\n\t} catch {\n\t\ttry {\n\t\t\treturn new Request(request);\n\t\t} catch {\n\t\t\treturn request;\n\t\t}\n\t}\n\ttry {\n\t\treturn new Request(targetUrl, request.clone());\n\t} catch {\n\t\ttry {\n\t\t\treturn new Request(targetUrl, request);\n\t\t} catch {\n\t\t\treturn request;\n\t\t}\n\t}\n}\n/**\n* Creates a mock AsyncLocalStorage implementation for environments where\n* native AsyncLocalStorage is not available or disabled.\n*\n* This mock implementation mimics the behavior of the native AsyncLocalStorage\n* but doesn't require the async_hooks module. It's used as a fallback when\n* the runtime does not expose AsyncLocalStorage or when it has been disabled.\n*\n* @returns {import(\"./runtime.js\").ParaglideAsyncLocalStorage}\n*/\nfunction createMockAsyncLocalStorage() {\n\t/** @type {any} */\n\tlet currentStore = void 0;\n\treturn {\n\t\tgetStore() {\n\t\t\treturn currentStore;\n\t\t},\n\t\tasync run(store, callback) {\n\t\t\tcurrentStore = store;\n\t\t\ttry {\n\t\t\t\treturn await callback();\n\t\t\t} finally {\n\t\t\t\tcurrentStore = void 0;\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\n//#region src/hooks.server.ts\nvar handleParaglide = ({ event, resolve }) => paraglideMiddleware(event.request, ({ request, locale }) => {\n\tevent.request = request;\n\treturn resolve(event, { transformPageChunk: ({ html }) => html.replace(\"%paraglide.lang%\", locale) });\n});\nvar handle = sequence(sessionHandle, handleParaglide, checkAuthorizationHandle);\n//#endregion\nexport { handle };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,SAAS,GAAG,UAAU;CACrC,MAAM,SAAS,SAAS;CACxB,IAAI,CAAC,QAAQ,QAAQ,EAAE,OAAO,cAAc,QAAQ,KAAK;CAEzD,QAAQ,EAAE,OAAO,cAAc;EAC9B,MAAM,EAAE,UAAU,kBAAkB;EACpC,OAAO,aAAa,GAAG,OAAO,CAAC,CAAC;;;;;;;EAQhC,SAAS,aAAa,GAAG,OAAO,gBAAgB;GAC/C,MAAM,SAAS,SAAS;GAExB,OAAO,MAAM,QAAQ,YAAY;IAChC,MAAM,8BAA8B,OAAO,OAAO,OAAO,OAAO;IAChE,YAAY,CAAC;IACb,IAAI,OAAO,YAAY;KACtB,MAAM,eAAe,cAAc,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AI;EACH,OAAO,IAAI,QAAQ,WAAW,QAAQ,MAAM,CAAC;CAC9C,QAAQ;EACP,IAAI;GACH,OAAO,IAAI,QAAQ,WAAW,OAAO;EACtC,QAAQ;GACP,OAAO;EACR;CACD;AACD;;;;;;;;;;;AAWA,SAAS,8BAA8B;;CAEtC,IAAI,eAAe,KAAK;CACxB,OAAO;EACN,WAAW;GACV,OAAO;EACR;EACA,MAAM,IAAI,OAAO,UAAU;GAC1B,eAAe;GACf,IAAI;IACH,OAAO,MAAM,SAAS;GACvB,UAAU;IACT,eAAe,KAAK;GACrB;EACD;CACD;AACD;AAGA,IAAI,mBAAmB,EAAE,OAAO,cAAc,oBAAoB,MAAM,UAAU,EAAE,SAAS,aAAa;CACzG,MAAM,UAAU;CAChB,OAAO,QAAQ,OAAO,EAAE,qBAAqB,EAAE,WAAW,KAAK,QAAQ,oBAAoB,MAAM,EAAE,CAAC;AACrG,CAAC;AACD,IAAI,SAAS,SAAS,eAAe,iBAAiB,wBAAwB"}
1
+ {"version":3,"file":"hooks.server-Cdesln7C.js","names":[],"sources":["../../../node_modules/.pnpm/@sveltejs+kit@2.63.0_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.56.2_@typescript-eslin_9ed2d7f3800a1c77eec55a1d66c8792d/node_modules/@sveltejs/kit/src/exports/hooks/sequence.js","../../../.svelte-kit/adapter-bun/entries/hooks.server.js"],"sourcesContent":["/** @import { Handle, RequestEvent, ResolveOptions } from '@sveltejs/kit' */\n/** @import { MaybePromise } from 'types' */\nimport {\n\tmerge_tracing,\n\tget_request_store,\n\twith_request_store\n} from '@sveltejs/kit/internal/server';\n\n/**\n * A helper function for sequencing multiple `handle` calls in a middleware-like manner.\n * The behavior for the `handle` options is as follows:\n * - `transformPageChunk` is applied in reverse order and merged\n * - `preload` is applied in forward order, the first option \"wins\" and no `preload` options after it are called\n * - `filterSerializedResponseHeaders` behaves the same as `preload`\n *\n * ```js\n * /// file: src/hooks.server.js\n * import { sequence } from '@sveltejs/kit/hooks';\n *\n * /// type: import('@sveltejs/kit').Handle\n * async function first({ event, resolve }) {\n * \tconsole.log('first pre-processing');\n * \tconst result = await resolve(event, {\n * \t\ttransformPageChunk: ({ html }) => {\n * \t\t\t// transforms are applied in reverse order\n * \t\t\tconsole.log('first transform');\n * \t\t\treturn html;\n * \t\t},\n * \t\tpreload: () => {\n * \t\t\t// this one wins as it's the first defined in the chain\n * \t\t\tconsole.log('first preload');\n * \t\t\treturn true;\n * \t\t}\n * \t});\n * \tconsole.log('first post-processing');\n * \treturn result;\n * }\n *\n * /// type: import('@sveltejs/kit').Handle\n * async function second({ event, resolve }) {\n * \tconsole.log('second pre-processing');\n * \tconst result = await resolve(event, {\n * \t\ttransformPageChunk: ({ html }) => {\n * \t\t\tconsole.log('second transform');\n * \t\t\treturn html;\n * \t\t},\n * \t\tpreload: () => {\n * \t\t\tconsole.log('second preload');\n * \t\t\treturn true;\n * \t\t},\n * \t\tfilterSerializedResponseHeaders: () => {\n * \t\t\t// this one wins as it's the first defined in the chain\n * \t\t\tconsole.log('second filterSerializedResponseHeaders');\n * \t\t\treturn true;\n * \t\t}\n * \t});\n * \tconsole.log('second post-processing');\n * \treturn result;\n * }\n *\n * export const handle = sequence(first, second);\n * ```\n *\n * The example above would print:\n *\n * ```\n * first pre-processing\n * first preload\n * second pre-processing\n * second filterSerializedResponseHeaders\n * second transform\n * first transform\n * second post-processing\n * first post-processing\n * ```\n *\n * @param {...Handle} handlers The chain of `handle` functions\n * @returns {Handle}\n */\nexport function sequence(...handlers) {\n\tconst length = handlers.length;\n\tif (!length) return ({ event, resolve }) => resolve(event);\n\n\treturn ({ event, resolve }) => {\n\t\tconst { state } = get_request_store();\n\t\treturn apply_handle(0, event, {});\n\n\t\t/**\n\t\t * @param {number} i\n\t\t * @param {RequestEvent} event\n\t\t * @param {ResolveOptions | undefined} parent_options\n\t\t * @returns {MaybePromise<Response>}\n\t\t */\n\t\tfunction apply_handle(i, event, parent_options) {\n\t\t\tconst handle = handlers[i];\n\n\t\t\treturn state.tracing.record_span({\n\t\t\t\tname: `sveltekit.handle.sequenced.${handle.name ? handle.name : i}`,\n\t\t\t\tattributes: {},\n\t\t\t\tfn: async (current) => {\n\t\t\t\t\tconst traced_event = merge_tracing(event, current);\n\t\t\t\t\treturn await with_request_store({ event: traced_event, state }, () =>\n\t\t\t\t\t\thandle({\n\t\t\t\t\t\t\tevent: traced_event,\n\t\t\t\t\t\t\tresolve: (event, options) => {\n\t\t\t\t\t\t\t\t/** @type {ResolveOptions['transformPageChunk']} */\n\t\t\t\t\t\t\t\tconst transformPageChunk = async ({ html, done }) => {\n\t\t\t\t\t\t\t\t\tif (options?.transformPageChunk) {\n\t\t\t\t\t\t\t\t\t\thtml = (await options.transformPageChunk({ html, done })) ?? '';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (parent_options?.transformPageChunk) {\n\t\t\t\t\t\t\t\t\t\thtml = (await parent_options.transformPageChunk({ html, done })) ?? '';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn html;\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t/** @type {ResolveOptions['filterSerializedResponseHeaders']} */\n\t\t\t\t\t\t\t\tconst filterSerializedResponseHeaders =\n\t\t\t\t\t\t\t\t\tparent_options?.filterSerializedResponseHeaders ??\n\t\t\t\t\t\t\t\t\toptions?.filterSerializedResponseHeaders;\n\n\t\t\t\t\t\t\t\t/** @type {ResolveOptions['preload']} */\n\t\t\t\t\t\t\t\tconst preload = parent_options?.preload ?? options?.preload;\n\n\t\t\t\t\t\t\t\treturn i < length - 1\n\t\t\t\t\t\t\t\t\t? apply_handle(i + 1, event, {\n\t\t\t\t\t\t\t\t\t\t\ttransformPageChunk,\n\t\t\t\t\t\t\t\t\t\t\tfilterSerializedResponseHeaders,\n\t\t\t\t\t\t\t\t\t\t\tpreload\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t: resolve(event, {\n\t\t\t\t\t\t\t\t\t\t\ttransformPageChunk,\n\t\t\t\t\t\t\t\t\t\t\tfilterSerializedResponseHeaders,\n\t\t\t\t\t\t\t\t\t\t\tpreload\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t};\n}\n","import { a as sessionHandle, i as checkAuthorizationHandle } from \"../chunks/session.js\";\nimport { a as serverAsyncLocalStorage, i as overwriteServerAsyncLocalStorage, n as getStrategyForUrl, o as shouldRedirect, r as isExcludedByRouteStrategy, t as deLocalizeUrl } from \"../chunks/runtime.js\";\nimport { sequence } from \"@sveltejs/kit/hooks\";\n//#region src/lib/paraglide/server.js\n/**\n* Server middleware that handles locale-based routing and request processing.\n*\n* Configure `disableAsyncLocalStorage` when generating Paraglide with\n* `paraglideVitePlugin()` or `compile()`, not when calling\n* `paraglideMiddleware()`. Keep AsyncLocalStorage enabled by default and\n* only disable it for runtimes that lack `AsyncLocalStorage` support and\n* guarantee request isolation.\n*\n* This middleware performs several key functions:\n*\n* 1. Determines the locale for the incoming request using configured strategies\n* 2. Handles URL localization and redirects (only for document requests)\n* 3. Maintains locale state using AsyncLocalStorage to prevent request interference\n*\n* When URL strategy is used:\n*\n* - The locale is extracted from the URL for all request types\n* - If URL doesn't match the determined locale, redirects to localized URL (only for document requests)\n* - De-localizes URLs before passing to server (e.g., `/fr/about` → `/about`)\n*\n* @see https://inlang.com/m/gerre34r/library-inlang-paraglideJs/middleware\n*\n* @template T - The return type of the resolve function\n*\n* @param {Request} request - The incoming request object\n* @param {(args: { request: Request, locale: import(\"./runtime.js\").Locale }) => T | Promise<T>} resolve - Function to handle the request. The callback receives:\n* - `request`: A modified request with a delocalized URL when the URL strategy is used (e.g., `/fr/about` → `/about`).\n* If your framework handles URL localization itself (e.g., TanStack Router's `rewrite` option), use the original\n* request instead to avoid redirect loops.\n* - `locale`: The determined locale for this request.\n* @param {{\n* effectiveRequestUrl?: string | URL | ((request: Request) => string | URL),\n* onRedirect?: (response: Response) => void\n* }} [options] - Options to control middleware behavior. `effectiveRequestUrl` sets the effective request URL used for route matching, URL-based locale detection, redirects, and `getUrlOrigin()`.\n* @returns {Promise<Response>}\n*\n* @example\n* ```typescript\n* // Basic usage in metaframeworks like NextJS, SvelteKit, Astro, Nuxt, etc.\n* export const handle = async ({ event, resolve }) => {\n* return paraglideMiddleware(event.request, ({ request, locale }) => {\n* // let the framework further resolve the request\n* return resolve(request);\n* });\n* };\n* ```\n*\n* @example\n* ```typescript\n* // Usage in a framework like Express JS or Hono\n* app.use(async (req, res, next) => {\n* const result = await paraglideMiddleware(req, ({ request, locale }) => {\n* // If a redirect happens this won't be called\n* return next(request);\n* });\n* });\n* ```\n*\n* @example\n* ```typescript\n* // Usage with frameworks that handle URL localization/delocalization themselves\n* //\n* // Some frameworks like TanStack Router handle URL localization and delocalization\n* // themselves via their own rewrite APIs (e.g., `rewrite.input`/`rewrite.output`).\n* //\n* // When the framework handles this, the middleware's URL delocalization is not needed.\n* // Using the modified `request` from the callback would cause a redirect loop because\n* // both the middleware and the framework would attempt to delocalize the URL.\n* //\n* // Solution: Pass the original request to the handler instead of the modified one.\n* // The middleware still handles locale detection, cookies, and AsyncLocalStorage context.\n* //\n* // ❌ WRONG - causes redirect loop when framework handles URL rewriting:\n* // paraglideMiddleware(req, ({ request }) => handler.fetch(request))\n* //\n* // ✅ CORRECT - use original request when framework handles URL localization:\n* // paraglideMiddleware(req, () => handler.fetch(req))\n*\n* * *\n* export default {\n* fetch(req: Request): Promise<Response> {\n* // TanStack Router handles URL rewriting via deLocalizeUrl/localizeUrl\n* // so we pass the original `req` instead of the modified `request`\n* return paraglideMiddleware(req, () => handler.fetch(req))\n* },\n* }\n* ```\n*/\nasync function paraglideMiddleware(request, resolve, options) {\n\tif (!serverAsyncLocalStorage) {\n\t\tconst { AsyncLocalStorage } = await import(\"node:async_hooks\");\n\t\toverwriteServerAsyncLocalStorage(new AsyncLocalStorage());\n\t} else if (!serverAsyncLocalStorage) overwriteServerAsyncLocalStorage(createMockAsyncLocalStorage());\n\tconst url = resolveMiddlewareUrl(request, options?.effectiveRequestUrl);\n\tconst origin = url.origin;\n\tif (isExcludedByRouteStrategy(url.href)) {\n\t\tconst locale = \"en\";\n\t\tconst newRequest = cloneRequestWithFallback(request, url);\n\t\t/** @type {Set<string>} */\n\t\tconst messageCalls = /* @__PURE__ */ new Set();\n\t\treturn await serverAsyncLocalStorage?.run({\n\t\t\tlocale,\n\t\t\torigin,\n\t\t\tmessageCalls\n\t\t}, () => resolve({\n\t\t\tlocale,\n\t\t\trequest: newRequest\n\t\t}));\n\t}\n\tconst strategy = getStrategyForUrl(url.href);\n\tconst decision = await shouldRedirect({\n\t\trequest,\n\t\teffectiveRequestUrl: url\n\t});\n\tconst locale = decision.locale;\n\tif (request.headers.get(\"Sec-Fetch-Dest\") === \"document\" && decision.shouldRedirect && decision.redirectUrl) {\n\t\t/** @type {Record<string, string>} */\n\t\tconst headers = {};\n\t\tif (strategy.includes(\"preferredLanguage\")) headers[\"Vary\"] = \"Accept-Language\";\n\t\tconst response = new Response(null, {\n\t\t\tstatus: 307,\n\t\t\theaders: {\n\t\t\t\tLocation: decision.redirectUrl.href,\n\t\t\t\t...headers\n\t\t\t}\n\t\t});\n\t\toptions?.onRedirect?.(response);\n\t\treturn response;\n\t}\n\tlet newRequest;\n\tif (strategy.includes(\"url\")) newRequest = cloneRequestWithFallback(request, deLocalizeUrl(url));\n\telse newRequest = cloneRequestWithFallback(request, url);\n\t/** @type {Set<string>} */\n\tconst messageCalls = /* @__PURE__ */ new Set();\n\treturn await serverAsyncLocalStorage?.run({\n\t\tlocale,\n\t\torigin,\n\t\tmessageCalls\n\t}, () => resolve({\n\t\tlocale,\n\t\trequest: newRequest\n\t}));\n}\n/**\n* @param {Request} request\n* @param {string | URL | ((request: Request) => string | URL) | undefined} effectiveRequestUrl\n* @returns {URL}\n*/\nfunction resolveMiddlewareUrl(request, effectiveRequestUrl) {\n\tif (typeof effectiveRequestUrl === \"function\") return new URL(effectiveRequestUrl(request), request.url);\n\tif (typeof effectiveRequestUrl === \"string\" || effectiveRequestUrl instanceof URL) return new URL(effectiveRequestUrl, request.url);\n\treturn new URL(request.url);\n}\n/**\n* Some metaframeworks (NextJS) require a new Request object.\n* https://github.com/opral/inlang-paraglide-js/issues/411\n*\n* However, some frameworks (TanStack Start 1.143+) use custom Request\n* implementations that cannot be cloned with `new Request(request)`.\n* https://github.com/opral/paraglide-js/issues/573\n*\n* Effective request URL overrides behind proxies:\n* https://github.com/opral/paraglide-js/issues/652\n*\n* @param {Request} request\n* @param {string | URL} [url]\n* @returns {Request}\n*/\nfunction cloneRequestWithFallback(request, url = request.url) {\n\tconst targetUrl = typeof url === \"string\" ? url : url.href;\n\tif (targetUrl === request.url) try {\n\t\treturn new Request(request.clone());\n\t} catch {\n\t\ttry {\n\t\t\treturn new Request(request);\n\t\t} catch {\n\t\t\treturn request;\n\t\t}\n\t}\n\ttry {\n\t\treturn new Request(targetUrl, request.clone());\n\t} catch {\n\t\ttry {\n\t\t\treturn new Request(targetUrl, request);\n\t\t} catch {\n\t\t\treturn request;\n\t\t}\n\t}\n}\n/**\n* Creates a mock AsyncLocalStorage implementation for environments where\n* native AsyncLocalStorage is not available or disabled.\n*\n* This mock implementation mimics the behavior of the native AsyncLocalStorage\n* but doesn't require the async_hooks module. It's used as a fallback when\n* the runtime does not expose AsyncLocalStorage or when it has been disabled.\n*\n* @returns {import(\"./runtime.js\").ParaglideAsyncLocalStorage}\n*/\nfunction createMockAsyncLocalStorage() {\n\t/** @type {any} */\n\tlet currentStore = void 0;\n\treturn {\n\t\tgetStore() {\n\t\t\treturn currentStore;\n\t\t},\n\t\tasync run(store, callback) {\n\t\t\tcurrentStore = store;\n\t\t\ttry {\n\t\t\t\treturn await callback();\n\t\t\t} finally {\n\t\t\t\tcurrentStore = void 0;\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\n//#region src/hooks.server.ts\nvar handleParaglide = ({ event, resolve }) => paraglideMiddleware(event.request, ({ request, locale }) => {\n\tevent.request = request;\n\treturn resolve(event, { transformPageChunk: ({ html }) => html.replace(\"%paraglide.lang%\", locale) });\n});\nvar handle = sequence(sessionHandle, handleParaglide, checkAuthorizationHandle);\n//#endregion\nexport { handle };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,SAAS,GAAG,UAAU;CACrC,MAAM,SAAS,SAAS;CACxB,IAAI,CAAC,QAAQ,QAAQ,EAAE,OAAO,cAAc,QAAQ,KAAK;CAEzD,QAAQ,EAAE,OAAO,cAAc;EAC9B,MAAM,EAAE,UAAU,kBAAkB;EACpC,OAAO,aAAa,GAAG,OAAO,CAAC,CAAC;;;;;;;EAQhC,SAAS,aAAa,GAAG,OAAO,gBAAgB;GAC/C,MAAM,SAAS,SAAS;GAExB,OAAO,MAAM,QAAQ,YAAY;IAChC,MAAM,8BAA8B,OAAO,OAAO,OAAO,OAAO;IAChE,YAAY,CAAC;IACb,IAAI,OAAO,YAAY;KACtB,MAAM,eAAe,cAAc,OAAO,OAAO;KACjD,OAAO,MAAM,mBAAmB;MAAE,OAAO;MAAc;KAAM,SAC5D,OAAO;MACN,OAAO;MACP,UAAU,OAAO,YAAY;;OAE5B,MAAM,qBAAqB,OAAO,EAAE,MAAM,WAAW;QACpD,IAAI,SAAS,oBACZ,OAAQ,MAAM,QAAQ,mBAAmB;SAAE;SAAM;QAAK,CAAC,KAAM;QAG9D,IAAI,gBAAgB,oBACnB,OAAQ,MAAM,eAAe,mBAAmB;SAAE;SAAM;QAAK,CAAC,KAAM;QAGrE,OAAO;OACR;;OAGA,MAAM,kCACL,gBAAgB,mCAChB,SAAS;;OAGV,MAAM,UAAU,gBAAgB,WAAW,SAAS;OAEpD,OAAO,IAAI,SAAS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a;CACzG,MAAM,UAAU;CAChB,OAAO,QAAQ,OAAO,EAAE,qBAAqB,EAAE,WAAW,KAAK,QAAQ,oBAAoB,MAAM,EAAE,CAAC;AACrG,CAAC;AACD,IAAI,SAAS,SAAS,eAAe,iBAAiB,wBAAwB"}
@@ -1574,7 +1574,7 @@ var options = {
1574
1574
  app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"%paraglide.lang%\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.svg\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"hover\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
1575
1575
  error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>" + message + "</title>\n\n <style>\n body {\n --bg: white;\n --fg: #222;\n --divider: #ccc;\n background: var(--bg);\n color: var(--fg);\n font-family:\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Oxygen,\n Ubuntu,\n Cantarell,\n 'Open Sans',\n 'Helvetica Neue',\n sans-serif;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n margin: 0;\n }\n\n .error {\n display: flex;\n align-items: center;\n max-width: 32rem;\n margin: 0 1rem;\n }\n\n .status {\n font-weight: 200;\n font-size: 3rem;\n line-height: 1;\n position: relative;\n top: -0.05rem;\n }\n\n .message {\n border-left: 1px solid var(--divider);\n padding: 0 0 0 1rem;\n margin: 0 0 0 1rem;\n min-height: 2.5rem;\n display: flex;\n align-items: center;\n }\n\n .message h1 {\n font-weight: 400;\n font-size: 1em;\n margin: 0;\n }\n\n @media (prefers-color-scheme: dark) {\n body {\n --bg: #222;\n --fg: #ddd;\n --divider: #666;\n }\n }\n </style>\n </head>\n <body>\n <div class=\"error\">\n <span class=\"status\">" + status + "</span>\n <div class=\"message\">\n <h1>" + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
1576
1576
  },
1577
- version_hash: "1e0b5mn"
1577
+ version_hash: "gm9jo9"
1578
1578
  };
1579
1579
  async function get_hooks() {
1580
1580
  let handle;
@@ -1582,7 +1582,7 @@ async function get_hooks() {
1582
1582
  let handleError;
1583
1583
  let handleValidationError;
1584
1584
  let init;
1585
- ({handle, handleFetch, handleError, handleValidationError, init} = await import("./hooks.server-BGpE7svk.js"));
1585
+ ({handle, handleFetch, handleError, handleValidationError, init} = await import("./hooks.server-Cdesln7C.js"));
1586
1586
  let reroute;
1587
1587
  let transport;
1588
1588
  ({reroute, transport} = await import("./hooks.universal-DhGFdBkK.js"));
@@ -1599,4 +1599,4 @@ async function get_hooks() {
1599
1599
  //#endregion
1600
1600
  export { text_encoder as $, with_request_store as A, coalesce_to_error as B, validate_layout_exports as C, merge_tracing as D, validate_page_server_exports as E, override as F, noop as G, get_message as H, reset as I, parse as J, normalize_error as K, INVALIDATED_PARAM as L, assets as M, base as N, get_request_store as O, initial_base as P, stringify$1 as Q, TRAILING_SLASH_PARAM as R, strip_resolution_suffix as S, validate_page_exports as T, get_relative_path as U, create_remote_key as V, get_status as W, split_remote_key as X, parse_remote_arg as Y, stringify as Z, noop_span as _, set_read_implementation as a, resolve_route as b, compact as c, find_route as d, fromStore as f, make_trackable as g, hash as h, set_manifest as i, app_dir as j, try_get_request_store as k, decode_pathname as l, has_resolution_suffix as m, options as n, add_data_suffix as o, has_data_suffix as p, once as q, read_implementation as r, add_resolution_suffix as s, get_hooks as t, disable_search as u, normalize_path as v, validate_layout_server_exports as w, strip_data_suffix as x, resolve as y, base64_encode as z };
1601
1601
 
1602
- //# sourceMappingURL=internal2-DBpj29pr.js.map
1602
+ //# sourceMappingURL=internal2-DF9-voLX.js.map