@claude-sessions/web 0.4.5 → 0.4.6

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 (175) hide show
  1. package/build/client/_app/immutable/assets/0.cQgYior5.css +1 -0
  2. package/build/client/_app/immutable/assets/0.cQgYior5.css.br +0 -0
  3. package/build/client/_app/immutable/assets/0.cQgYior5.css.gz +0 -0
  4. package/build/client/_app/immutable/chunks/B8g5xi4b.js +1 -0
  5. package/build/client/_app/immutable/chunks/B8g5xi4b.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/B8g5xi4b.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/CG99hqDQ.js +2 -0
  8. package/build/client/_app/immutable/chunks/CG99hqDQ.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/CG99hqDQ.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/CiIZzKcO.js +1 -0
  11. package/build/client/_app/immutable/chunks/CiIZzKcO.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/CiIZzKcO.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{BmH_exS6.js → DDmWtjsj.js} +1 -1
  14. package/build/client/_app/immutable/chunks/DDmWtjsj.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/DDmWtjsj.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/DWa7QuMS.js +1 -0
  17. package/build/client/_app/immutable/chunks/DWa7QuMS.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/DWa7QuMS.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/Dw50LpzA.js +1 -0
  20. package/build/client/_app/immutable/chunks/Dw50LpzA.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/Dw50LpzA.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/aZi3OCpL.js +96 -0
  23. package/build/client/_app/immutable/chunks/aZi3OCpL.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/aZi3OCpL.js.gz +0 -0
  25. package/build/client/_app/immutable/entry/app.CYY1PZCN.js +2 -0
  26. package/build/client/_app/immutable/entry/app.CYY1PZCN.js.br +0 -0
  27. package/build/client/_app/immutable/entry/app.CYY1PZCN.js.gz +0 -0
  28. package/build/client/_app/immutable/entry/start.D84fuMw9.js +1 -0
  29. package/build/client/_app/immutable/entry/start.D84fuMw9.js.br +2 -0
  30. package/build/client/_app/immutable/entry/start.D84fuMw9.js.gz +0 -0
  31. package/build/client/_app/immutable/nodes/0.B2uv-WBM.js +1 -0
  32. package/build/client/_app/immutable/nodes/0.B2uv-WBM.js.br +0 -0
  33. package/build/client/_app/immutable/nodes/0.B2uv-WBM.js.gz +0 -0
  34. package/build/client/_app/immutable/nodes/1.BoxEAqK6.js +1 -0
  35. package/build/client/_app/immutable/nodes/1.BoxEAqK6.js.br +3 -0
  36. package/build/client/_app/immutable/nodes/1.BoxEAqK6.js.gz +0 -0
  37. package/build/client/_app/immutable/nodes/{2.yd31CwaR.js → 2.mKAMmHlh.js} +1 -1
  38. package/build/client/_app/immutable/nodes/2.mKAMmHlh.js.br +0 -0
  39. package/build/client/_app/immutable/nodes/2.mKAMmHlh.js.gz +0 -0
  40. package/build/client/_app/immutable/nodes/3.Dj8iwfME.js +4 -0
  41. package/build/client/_app/immutable/nodes/3.Dj8iwfME.js.br +0 -0
  42. package/build/client/_app/immutable/nodes/3.Dj8iwfME.js.gz +0 -0
  43. package/build/client/_app/version.json +1 -1
  44. package/build/client/_app/version.json.br +0 -0
  45. package/build/client/_app/version.json.gz +0 -0
  46. package/build/handler.js +290 -228
  47. package/build/server/chunks/0-DChhR3gd.js +17 -0
  48. package/build/server/chunks/{0-D3SWM5E2.js.map → 0-DChhR3gd.js.map} +1 -1
  49. package/build/server/chunks/1-BBSPd3nB.js +9 -0
  50. package/build/server/chunks/{1-CXfgX4ux.js.map → 1-BBSPd3nB.js.map} +1 -1
  51. package/build/server/chunks/2-C20RW_lJ.js +9 -0
  52. package/build/server/chunks/{2-MV5uDYTL.js.map → 2-C20RW_lJ.js.map} +1 -1
  53. package/build/server/chunks/3-D3wL2YSE.js +9 -0
  54. package/build/server/chunks/{3-CsnDqfbG.js.map → 3-D3wL2YSE.js.map} +1 -1
  55. package/build/server/chunks/{InputModal-B9P0hP_j.js → InputModal-1qJGryUa.js} +6 -7
  56. package/build/server/chunks/InputModal-1qJGryUa.js.map +1 -0
  57. package/build/server/chunks/{Toast-DWQ-hmJu.js → Toast-C9b_dWm4.js} +7 -8
  58. package/build/server/chunks/Toast-C9b_dWm4.js.map +1 -0
  59. package/build/server/chunks/_layout.svelte-CdDMC1RI.js +134 -0
  60. package/build/server/chunks/_layout.svelte-CdDMC1RI.js.map +1 -0
  61. package/build/server/chunks/{_page.svelte-CGQGusC6.js → _page.svelte-CVL9fjg-.js} +10 -13
  62. package/build/server/chunks/_page.svelte-CVL9fjg-.js.map +1 -0
  63. package/build/server/chunks/{_page.svelte-BiD6gfpa.js → _page.svelte-Dx2ikKP_.js} +451 -497
  64. package/build/server/chunks/_page.svelte-Dx2ikKP_.js.map +1 -0
  65. package/build/server/chunks/{_server.ts-CDdRYdYO.js → _server.ts-B3M-jxF5.js} +2 -2
  66. package/build/server/chunks/{_server.ts-CDdRYdYO.js.map → _server.ts-B3M-jxF5.js.map} +1 -1
  67. package/build/server/chunks/{_server.ts-iCUks3KF.js → _server.ts-BCOHCAjW.js} +2 -2
  68. package/build/server/chunks/{_server.ts-iCUks3KF.js.map → _server.ts-BCOHCAjW.js.map} +1 -1
  69. package/build/server/chunks/{_server.ts-ChObRyrd.js → _server.ts-BGA9W8aM.js} +2 -2
  70. package/build/server/chunks/{_server.ts-ChObRyrd.js.map → _server.ts-BGA9W8aM.js.map} +1 -1
  71. package/build/server/chunks/{_server.ts-D5wsc-pR.js → _server.ts-BWxgSwZN.js} +2 -2
  72. package/build/server/chunks/{_server.ts-D5wsc-pR.js.map → _server.ts-BWxgSwZN.js.map} +1 -1
  73. package/build/server/chunks/{_server.ts-kfmLCgu8.js → _server.ts-C0mKXnG1.js} +2 -2
  74. package/build/server/chunks/{_server.ts-kfmLCgu8.js.map → _server.ts-C0mKXnG1.js.map} +1 -1
  75. package/build/server/chunks/{_server.ts-BsgoVOBd.js → _server.ts-C9GYaVf1.js} +3 -3
  76. package/build/server/chunks/{_server.ts-BsgoVOBd.js.map → _server.ts-C9GYaVf1.js.map} +1 -1
  77. package/build/server/chunks/{_server.ts-CPDPReZU.js → _server.ts-COPvamIQ.js} +2 -2
  78. package/build/server/chunks/{_server.ts-CPDPReZU.js.map → _server.ts-COPvamIQ.js.map} +1 -1
  79. package/build/server/chunks/{_server.ts-DLSXCOEM.js → _server.ts-CrKc6LEy.js} +2 -2
  80. package/build/server/chunks/{_server.ts-DLSXCOEM.js.map → _server.ts-CrKc6LEy.js.map} +1 -1
  81. package/build/server/chunks/{_server.ts-CKxzPqOL.js → _server.ts-DOSGEHuw.js} +2 -2
  82. package/build/server/chunks/{_server.ts-CKxzPqOL.js.map → _server.ts-DOSGEHuw.js.map} +1 -1
  83. package/build/server/chunks/{_server.ts-Be1LFWpG.js → _server.ts-DP0i5Bdl.js} +2 -2
  84. package/build/server/chunks/{_server.ts-Be1LFWpG.js.map → _server.ts-DP0i5Bdl.js.map} +1 -1
  85. package/build/server/chunks/{_server.ts-crvQ7CTS.js → _server.ts-DmN9rdOH.js} +3 -3
  86. package/build/server/chunks/{_server.ts-crvQ7CTS.js.map → _server.ts-DmN9rdOH.js.map} +1 -1
  87. package/build/server/chunks/{_server.ts-Brg38LxG.js → _server.ts-DmWsoikX.js} +2 -2
  88. package/build/server/chunks/{_server.ts-Brg38LxG.js.map → _server.ts-DmWsoikX.js.map} +1 -1
  89. package/build/server/chunks/{_server.ts-BOyCbZXG.js → _server.ts-F01KLghS.js} +2 -2
  90. package/build/server/chunks/{_server.ts-BOyCbZXG.js.map → _server.ts-F01KLghS.js.map} +1 -1
  91. package/build/server/chunks/{_server.ts-blDzB5RZ.js → _server.ts-QLTE_2dV.js} +2 -2
  92. package/build/server/chunks/{_server.ts-blDzB5RZ.js.map → _server.ts-QLTE_2dV.js.map} +1 -1
  93. package/build/server/chunks/{_server.ts-Fv64R5tZ.js → _server.ts-WZF_VFnZ.js} +2 -2
  94. package/build/server/chunks/{_server.ts-Fv64R5tZ.js.map → _server.ts-WZF_VFnZ.js.map} +1 -1
  95. package/build/server/chunks/{_server.ts-Dc0z7zpD.js → _server.ts-rTWeIoSC.js} +3 -3
  96. package/build/server/chunks/{_server.ts-Dc0z7zpD.js.map → _server.ts-rTWeIoSC.js.map} +1 -1
  97. package/build/server/chunks/{index4-B6vRxXfo.js → client-BtcIwznP.js} +3 -23
  98. package/build/server/chunks/client-BtcIwznP.js.map +1 -0
  99. package/build/server/chunks/{error.svelte-BNCG_dZH.js → error.svelte-B02-pvoO.js} +5 -4
  100. package/build/server/chunks/error.svelte-B02-pvoO.js.map +1 -0
  101. package/build/server/chunks/index-CoD1IJuy.js.map +1 -1
  102. package/build/server/chunks/index2-B2Ld-FFX.js +3575 -0
  103. package/build/server/chunks/index2-B2Ld-FFX.js.map +1 -0
  104. package/build/server/chunks/{index3-D8yIZRD-.js → index3-DNyQGNm8.js} +3 -3
  105. package/build/server/chunks/index3-DNyQGNm8.js.map +1 -0
  106. package/build/server/chunks/index4-CfOR2iO6.js +21 -0
  107. package/build/server/chunks/index4-CfOR2iO6.js.map +1 -0
  108. package/build/server/chunks/root-B5iYE7yO.js +1182 -0
  109. package/build/server/chunks/root-B5iYE7yO.js.map +1 -0
  110. package/build/server/chunks/{session-BwU3zV40.js → session-Dxp1vf6f.js} +2 -2
  111. package/build/server/chunks/{session-BwU3zV40.js.map → session-Dxp1vf6f.js.map} +1 -1
  112. package/build/server/index.js +703 -1411
  113. package/build/server/index.js.map +1 -1
  114. package/build/server/manifest.js +21 -21
  115. package/build/server/manifest.js.map +1 -1
  116. package/package.json +23 -23
  117. package/build/client/_app/immutable/assets/0.BTIBK81-.css +0 -1
  118. package/build/client/_app/immutable/assets/0.BTIBK81-.css.br +0 -0
  119. package/build/client/_app/immutable/assets/0.BTIBK81-.css.gz +0 -0
  120. package/build/client/_app/immutable/chunks/B-Z9hXPk.js +0 -1
  121. package/build/client/_app/immutable/chunks/B-Z9hXPk.js.br +0 -0
  122. package/build/client/_app/immutable/chunks/B-Z9hXPk.js.gz +0 -0
  123. package/build/client/_app/immutable/chunks/BmH_exS6.js.br +0 -0
  124. package/build/client/_app/immutable/chunks/BmH_exS6.js.gz +0 -0
  125. package/build/client/_app/immutable/chunks/Cr0eW1j3.js +0 -1
  126. package/build/client/_app/immutable/chunks/Cr0eW1j3.js.br +0 -0
  127. package/build/client/_app/immutable/chunks/Cr0eW1j3.js.gz +0 -0
  128. package/build/client/_app/immutable/chunks/DOXVKi87.js +0 -2
  129. package/build/client/_app/immutable/chunks/DOXVKi87.js.br +0 -0
  130. package/build/client/_app/immutable/chunks/DOXVKi87.js.gz +0 -0
  131. package/build/client/_app/immutable/chunks/WodlV_jD.js +0 -96
  132. package/build/client/_app/immutable/chunks/WodlV_jD.js.br +0 -0
  133. package/build/client/_app/immutable/chunks/WodlV_jD.js.gz +0 -0
  134. package/build/client/_app/immutable/chunks/YXuXYbOb.js +0 -1
  135. package/build/client/_app/immutable/chunks/YXuXYbOb.js.br +0 -0
  136. package/build/client/_app/immutable/chunks/YXuXYbOb.js.gz +0 -0
  137. package/build/client/_app/immutable/chunks/vDyoI7lw.js +0 -1
  138. package/build/client/_app/immutable/chunks/vDyoI7lw.js.br +0 -0
  139. package/build/client/_app/immutable/chunks/vDyoI7lw.js.gz +0 -0
  140. package/build/client/_app/immutable/entry/app.Kf_4i_t0.js +0 -2
  141. package/build/client/_app/immutable/entry/app.Kf_4i_t0.js.br +0 -0
  142. package/build/client/_app/immutable/entry/app.Kf_4i_t0.js.gz +0 -0
  143. package/build/client/_app/immutable/entry/start.DrVGwFzz.js +0 -1
  144. package/build/client/_app/immutable/entry/start.DrVGwFzz.js.br +0 -0
  145. package/build/client/_app/immutable/entry/start.DrVGwFzz.js.gz +0 -0
  146. package/build/client/_app/immutable/nodes/0.Dfn2ZpXY.js +0 -1
  147. package/build/client/_app/immutable/nodes/0.Dfn2ZpXY.js.br +0 -0
  148. package/build/client/_app/immutable/nodes/0.Dfn2ZpXY.js.gz +0 -0
  149. package/build/client/_app/immutable/nodes/1.CWRD2TOY.js +0 -1
  150. package/build/client/_app/immutable/nodes/1.CWRD2TOY.js.br +0 -0
  151. package/build/client/_app/immutable/nodes/1.CWRD2TOY.js.gz +0 -0
  152. package/build/client/_app/immutable/nodes/2.yd31CwaR.js.br +0 -0
  153. package/build/client/_app/immutable/nodes/2.yd31CwaR.js.gz +0 -0
  154. package/build/client/_app/immutable/nodes/3.Dh5fbLPm.js +0 -4
  155. package/build/client/_app/immutable/nodes/3.Dh5fbLPm.js.br +0 -0
  156. package/build/client/_app/immutable/nodes/3.Dh5fbLPm.js.gz +0 -0
  157. package/build/server/chunks/0-D3SWM5E2.js +0 -17
  158. package/build/server/chunks/1-CXfgX4ux.js +0 -9
  159. package/build/server/chunks/2-MV5uDYTL.js +0 -9
  160. package/build/server/chunks/3-CsnDqfbG.js +0 -9
  161. package/build/server/chunks/InputModal-B9P0hP_j.js.map +0 -1
  162. package/build/server/chunks/Toast-DWQ-hmJu.js.map +0 -1
  163. package/build/server/chunks/_layout.svelte-Cgt3CiZy.js +0 -106
  164. package/build/server/chunks/_layout.svelte-Cgt3CiZy.js.map +0 -1
  165. package/build/server/chunks/_page.svelte-BiD6gfpa.js.map +0 -1
  166. package/build/server/chunks/_page.svelte-CGQGusC6.js.map +0 -1
  167. package/build/server/chunks/error.svelte-BNCG_dZH.js.map +0 -1
  168. package/build/server/chunks/exports-BXvEiaiv.js +0 -238
  169. package/build/server/chunks/exports-BXvEiaiv.js.map +0 -1
  170. package/build/server/chunks/index-D4ev3Ona.js +0 -1352
  171. package/build/server/chunks/index-D4ev3Ona.js.map +0 -1
  172. package/build/server/chunks/index2-ybZwlzIk.js +0 -1925
  173. package/build/server/chunks/index2-ybZwlzIk.js.map +0 -1
  174. package/build/server/chunks/index3-D8yIZRD-.js.map +0 -1
  175. package/build/server/chunks/index4-B6vRxXfo.js.map +0 -1
@@ -0,0 +1,1182 @@
1
+ import { E as render, F as set, L as LEGACY_PROPS, G as get, H as flushSync, I as define_property, J as mutable_source, K as init_operations, M as get_first_child, N as COMMENT_NODE, O as HYDRATION_START, P as get_next_sibling, Q as HYDRATION_ERROR, R as hydration_failed, S as clear_text_content, T as component_root, U as create_text, V as array_from, W as is_passive_event, X as set_active_reaction, Y as set_active_effect, Z as active_reaction, _ as active_effect, $ as setContext, a0 as BOUNDARY_EFFECT, a1 as block, a2 as branch, a3 as queue_micro_task, a4 as pause_effect, a5 as current_batch, a6 as move_effect, a7 as set_signal_status, a8 as DIRTY, a9 as MAYBE_DIRTY, aa as defer_effect, ab as set_component_context, ac as Batch, ad as handle_error, ae as component_context, af as internal_set, ag as destroy_effect, ah as invoke_error_boundary, m as derived, ai as effect_tracking, aj as render_effect, ak as HYDRATION_END, al as HYDRATION_START_ELSE, am as svelte_boundary_reset_onerror, an as source, ao as untrack, ap as increment, aq as HYDRATION_START_FAILED, ar as push$1, as as pop$1, at as EFFECT_TRANSPARENT, au as EFFECT_PRESERVED } from './index2-B2Ld-FFX.js';
2
+
3
+ // eslint-disable-next-line n/prefer-global/process
4
+ const IN_WEBCONTAINER = !!globalThis.process?.versions?.webcontainer;
5
+
6
+ /** @import { RequestEvent } from '@sveltejs/kit' */
7
+ /** @import { RequestStore } from 'types' */
8
+ /** @import { AsyncLocalStorage } from 'node:async_hooks' */
9
+
10
+
11
+ /** @type {RequestStore | null} */
12
+ let sync_store = null;
13
+
14
+ /** @type {AsyncLocalStorage<RequestStore | null> | null} */
15
+ let als;
16
+
17
+ import('node:async_hooks')
18
+ .then((hooks) => (als = new hooks.AsyncLocalStorage()))
19
+ .catch(() => {
20
+ // can't use AsyncLocalStorage, but can still call getRequestEvent synchronously.
21
+ // this isn't behind `supports` because it's basically just StackBlitz (i.e.
22
+ // in-browser usage) that doesn't support it AFAICT
23
+ });
24
+
25
+ /**
26
+ * @template T
27
+ * @param {RequestStore | null} store
28
+ * @param {() => T} fn
29
+ */
30
+ function with_request_store(store, fn) {
31
+ try {
32
+ sync_store = store;
33
+ return als ? als.run(store, fn) : fn();
34
+ } finally {
35
+ // Since AsyncLocalStorage is not working in webcontainers, we don't reset `sync_store`
36
+ // and handle only one request at a time in `src/runtime/server/index.js`.
37
+ if (!IN_WEBCONTAINER) {
38
+ sync_store = null;
39
+ }
40
+ }
41
+ }
42
+
43
+ const text_encoder = new TextEncoder();
44
+ const text_decoder = new TextDecoder();
45
+ function get_relative_path(from, to) {
46
+ const from_parts = from.split(/[/\\]/);
47
+ const to_parts = to.split(/[/\\]/);
48
+ from_parts.pop();
49
+ while (from_parts[0] === to_parts[0]) {
50
+ from_parts.shift();
51
+ to_parts.shift();
52
+ }
53
+ let i = from_parts.length;
54
+ while (i--) from_parts[i] = "..";
55
+ return from_parts.concat(to_parts).join("/");
56
+ }
57
+ function base64_encode(bytes) {
58
+ if (globalThis.Buffer) {
59
+ return globalThis.Buffer.from(bytes).toString("base64");
60
+ }
61
+ let binary = "";
62
+ for (let i = 0; i < bytes.length; i++) {
63
+ binary += String.fromCharCode(bytes[i]);
64
+ }
65
+ return btoa(binary);
66
+ }
67
+ function base64_decode(encoded) {
68
+ if (globalThis.Buffer) {
69
+ const buffer = globalThis.Buffer.from(encoded, "base64");
70
+ return new Uint8Array(buffer);
71
+ }
72
+ const binary = atob(encoded);
73
+ const bytes = new Uint8Array(binary.length);
74
+ for (let i = 0; i < binary.length; i++) {
75
+ bytes[i] = binary.charCodeAt(i);
76
+ }
77
+ return bytes;
78
+ }
79
+
80
+ const internal = new URL("sveltekit-internal://");
81
+ function resolve(base, path) {
82
+ if (path[0] === "/" && path[1] === "/") return path;
83
+ let url = new URL(base, internal);
84
+ url = new URL(path, url);
85
+ return url.protocol === internal.protocol ? url.pathname + url.search + url.hash : url.href;
86
+ }
87
+ function normalize_path(path, trailing_slash) {
88
+ if (path === "/" || trailing_slash === "ignore") return path;
89
+ if (trailing_slash === "never") {
90
+ return path.endsWith("/") ? path.slice(0, -1) : path;
91
+ } else if (trailing_slash === "always" && !path.endsWith("/")) {
92
+ return path + "/";
93
+ }
94
+ return path;
95
+ }
96
+ function decode_pathname(pathname) {
97
+ return pathname.split("%25").map(decodeURI).join("%25");
98
+ }
99
+ function decode_params(params) {
100
+ for (const key in params) {
101
+ params[key] = decodeURIComponent(params[key]);
102
+ }
103
+ return params;
104
+ }
105
+ function make_trackable(url, callback, search_params_callback, allow_hash = false) {
106
+ const tracked = new URL(url);
107
+ Object.defineProperty(tracked, "searchParams", {
108
+ value: new Proxy(tracked.searchParams, {
109
+ get(obj, key) {
110
+ if (key === "get" || key === "getAll" || key === "has") {
111
+ return (param, ...rest) => {
112
+ search_params_callback(param);
113
+ return obj[key](param, ...rest);
114
+ };
115
+ }
116
+ callback();
117
+ const value = Reflect.get(obj, key);
118
+ return typeof value === "function" ? value.bind(obj) : value;
119
+ }
120
+ }),
121
+ enumerable: true,
122
+ configurable: true
123
+ });
124
+ const tracked_url_properties = ["href", "pathname", "search", "toString", "toJSON"];
125
+ if (allow_hash) tracked_url_properties.push("hash");
126
+ for (const property of tracked_url_properties) {
127
+ Object.defineProperty(tracked, property, {
128
+ get() {
129
+ callback();
130
+ return url[property];
131
+ },
132
+ enumerable: true,
133
+ configurable: true
134
+ });
135
+ }
136
+ {
137
+ tracked[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
138
+ return inspect(url, opts);
139
+ };
140
+ tracked.searchParams[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
141
+ return inspect(url.searchParams, opts);
142
+ };
143
+ }
144
+ if (!allow_hash) {
145
+ disable_hash(tracked);
146
+ }
147
+ return tracked;
148
+ }
149
+ function disable_hash(url) {
150
+ allow_nodejs_console_log(url);
151
+ Object.defineProperty(url, "hash", {
152
+ get() {
153
+ throw new Error(
154
+ "Cannot access event.url.hash. Consider using `page.url.hash` inside a component instead"
155
+ );
156
+ }
157
+ });
158
+ }
159
+ function disable_search(url) {
160
+ allow_nodejs_console_log(url);
161
+ for (const property of ["search", "searchParams"]) {
162
+ Object.defineProperty(url, property, {
163
+ get() {
164
+ throw new Error(`Cannot access url.${property} on a page with prerendering enabled`);
165
+ }
166
+ });
167
+ }
168
+ }
169
+ function allow_nodejs_console_log(url) {
170
+ {
171
+ url[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = (depth, opts, inspect) => {
172
+ return inspect(new URL(url), opts);
173
+ };
174
+ }
175
+ }
176
+ function validator(expected) {
177
+ function validate(module, file) {
178
+ if (!module) return;
179
+ for (const key in module) {
180
+ if (key[0] === "_" || expected.has(key)) continue;
181
+ const values = [...expected.values()];
182
+ const hint = hint_for_supported_files(key, file?.slice(file.lastIndexOf("."))) ?? `valid exports are ${values.join(", ")}, or anything with a '_' prefix`;
183
+ throw new Error(`Invalid export '${key}'${file ? ` in ${file}` : ""} (${hint})`);
184
+ }
185
+ }
186
+ return validate;
187
+ }
188
+ function hint_for_supported_files(key, ext = ".js") {
189
+ const supported_files = [];
190
+ if (valid_layout_exports.has(key)) {
191
+ supported_files.push(`+layout${ext}`);
192
+ }
193
+ if (valid_page_exports.has(key)) {
194
+ supported_files.push(`+page${ext}`);
195
+ }
196
+ if (valid_layout_server_exports.has(key)) {
197
+ supported_files.push(`+layout.server${ext}`);
198
+ }
199
+ if (valid_page_server_exports.has(key)) {
200
+ supported_files.push(`+page.server${ext}`);
201
+ }
202
+ if (valid_server_exports.has(key)) {
203
+ supported_files.push(`+server${ext}`);
204
+ }
205
+ if (supported_files.length > 0) {
206
+ return `'${key}' is a valid export in ${supported_files.slice(0, -1).join(", ")}${supported_files.length > 1 ? " or " : ""}${supported_files.at(-1)}`;
207
+ }
208
+ }
209
+ const valid_layout_exports = /* @__PURE__ */ new Set([
210
+ "load",
211
+ "prerender",
212
+ "csr",
213
+ "ssr",
214
+ "trailingSlash",
215
+ "config"
216
+ ]);
217
+ const valid_page_exports = /* @__PURE__ */ new Set([...valid_layout_exports, "entries"]);
218
+ const valid_layout_server_exports = /* @__PURE__ */ new Set([...valid_layout_exports]);
219
+ const valid_page_server_exports = /* @__PURE__ */ new Set([...valid_layout_server_exports, "actions", "entries"]);
220
+ const valid_server_exports = /* @__PURE__ */ new Set([
221
+ "GET",
222
+ "POST",
223
+ "PATCH",
224
+ "PUT",
225
+ "DELETE",
226
+ "OPTIONS",
227
+ "HEAD",
228
+ "fallback",
229
+ "prerender",
230
+ "trailingSlash",
231
+ "config",
232
+ "entries"
233
+ ]);
234
+ const validate_layout_exports = validator(valid_layout_exports);
235
+ const validate_page_exports = validator(valid_page_exports);
236
+ const validate_layout_server_exports = validator(valid_layout_server_exports);
237
+ const validate_page_server_exports = validator(valid_page_server_exports);
238
+
239
+ function hydration_mismatch(location) {
240
+ {
241
+ console.warn(`https://svelte.dev/e/hydration_mismatch`);
242
+ }
243
+ }
244
+ function svelte_boundary_reset_noop() {
245
+ {
246
+ console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
247
+ }
248
+ }
249
+ let hydrating = false;
250
+ function set_hydrating(value) {
251
+ hydrating = value;
252
+ }
253
+ let hydrate_node;
254
+ function set_hydrate_node(node) {
255
+ if (node === null) {
256
+ hydration_mismatch();
257
+ throw HYDRATION_ERROR;
258
+ }
259
+ return hydrate_node = node;
260
+ }
261
+ function hydrate_next() {
262
+ return set_hydrate_node(get_next_sibling(hydrate_node));
263
+ }
264
+ function next(count = 1) {
265
+ if (hydrating) {
266
+ var i = count;
267
+ var node = hydrate_node;
268
+ while (i--) {
269
+ node = /** @type {TemplateNode} */
270
+ get_next_sibling(node);
271
+ }
272
+ hydrate_node = node;
273
+ }
274
+ }
275
+ function skip_nodes(remove = true) {
276
+ var depth = 0;
277
+ var node = hydrate_node;
278
+ while (true) {
279
+ if (node.nodeType === COMMENT_NODE) {
280
+ var data = (
281
+ /** @type {Comment} */
282
+ node.data
283
+ );
284
+ if (data === HYDRATION_END) {
285
+ if (depth === 0) return node;
286
+ depth -= 1;
287
+ } else if (data === HYDRATION_START || data === HYDRATION_START_ELSE || // "[1", "[2", etc. for if blocks
288
+ data[0] === "[" && !isNaN(Number(data.slice(1)))) {
289
+ depth += 1;
290
+ }
291
+ }
292
+ var next2 = (
293
+ /** @type {TemplateNode} */
294
+ get_next_sibling(node)
295
+ );
296
+ if (remove) node.remove();
297
+ node = next2;
298
+ }
299
+ }
300
+ function createSubscriber(start) {
301
+ let subscribers = 0;
302
+ let version = source(0);
303
+ let stop;
304
+ return () => {
305
+ if (effect_tracking()) {
306
+ get(version);
307
+ render_effect(() => {
308
+ if (subscribers === 0) {
309
+ stop = untrack(() => start(() => increment(version)));
310
+ }
311
+ subscribers += 1;
312
+ return () => {
313
+ queue_micro_task(() => {
314
+ subscribers -= 1;
315
+ if (subscribers === 0) {
316
+ stop?.();
317
+ stop = void 0;
318
+ increment(version);
319
+ }
320
+ });
321
+ };
322
+ });
323
+ }
324
+ };
325
+ }
326
+ var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
327
+ function boundary(node, props, children, transform_error) {
328
+ new Boundary(node, props, children, transform_error);
329
+ }
330
+ class Boundary {
331
+ /** @type {Boundary | null} */
332
+ parent;
333
+ is_pending = false;
334
+ /**
335
+ * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
336
+ * Inherited from parent boundary, or defaults to identity.
337
+ * @type {(error: unknown) => unknown}
338
+ */
339
+ transform_error;
340
+ /** @type {TemplateNode} */
341
+ #anchor;
342
+ /** @type {TemplateNode | null} */
343
+ #hydrate_open = hydrating ? hydrate_node : null;
344
+ /** @type {BoundaryProps} */
345
+ #props;
346
+ /** @type {((anchor: Node) => void)} */
347
+ #children;
348
+ /** @type {Effect} */
349
+ #effect;
350
+ /** @type {Effect | null} */
351
+ #main_effect = null;
352
+ /** @type {Effect | null} */
353
+ #pending_effect = null;
354
+ /** @type {Effect | null} */
355
+ #failed_effect = null;
356
+ /** @type {DocumentFragment | null} */
357
+ #offscreen_fragment = null;
358
+ #local_pending_count = 0;
359
+ #pending_count = 0;
360
+ #pending_count_update_queued = false;
361
+ /** @type {Set<Effect>} */
362
+ #dirty_effects = /* @__PURE__ */ new Set();
363
+ /** @type {Set<Effect>} */
364
+ #maybe_dirty_effects = /* @__PURE__ */ new Set();
365
+ /**
366
+ * A source containing the number of pending async deriveds/expressions.
367
+ * Only created if `$effect.pending()` is used inside the boundary,
368
+ * otherwise updating the source results in needless `Batch.ensure()`
369
+ * calls followed by no-op flushes
370
+ * @type {Source<number> | null}
371
+ */
372
+ #effect_pending = null;
373
+ #effect_pending_subscriber = createSubscriber(() => {
374
+ this.#effect_pending = source(this.#local_pending_count);
375
+ return () => {
376
+ this.#effect_pending = null;
377
+ };
378
+ });
379
+ /**
380
+ * @param {TemplateNode} node
381
+ * @param {BoundaryProps} props
382
+ * @param {((anchor: Node) => void)} children
383
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
384
+ */
385
+ constructor(node, props, children, transform_error) {
386
+ this.#anchor = node;
387
+ this.#props = props;
388
+ this.#children = (anchor) => {
389
+ var effect = (
390
+ /** @type {Effect} */
391
+ active_effect
392
+ );
393
+ effect.b = this;
394
+ effect.f |= BOUNDARY_EFFECT;
395
+ children(anchor);
396
+ };
397
+ this.parent = /** @type {Effect} */
398
+ active_effect.b;
399
+ this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
400
+ this.#effect = block(() => {
401
+ if (hydrating) {
402
+ const comment = (
403
+ /** @type {Comment} */
404
+ this.#hydrate_open
405
+ );
406
+ hydrate_next();
407
+ const server_rendered_pending = comment.data === HYDRATION_START_ELSE;
408
+ const server_rendered_failed = comment.data.startsWith(HYDRATION_START_FAILED);
409
+ if (server_rendered_failed) {
410
+ const serialized_error = JSON.parse(comment.data.slice(HYDRATION_START_FAILED.length));
411
+ this.#hydrate_failed_content(serialized_error);
412
+ } else if (server_rendered_pending) {
413
+ this.#hydrate_pending_content();
414
+ } else {
415
+ this.#hydrate_resolved_content();
416
+ }
417
+ } else {
418
+ this.#render();
419
+ }
420
+ }, flags);
421
+ if (hydrating) {
422
+ this.#anchor = hydrate_node;
423
+ }
424
+ }
425
+ #hydrate_resolved_content() {
426
+ try {
427
+ this.#main_effect = branch(() => this.#children(this.#anchor));
428
+ } catch (error) {
429
+ this.error(error);
430
+ }
431
+ }
432
+ /**
433
+ * @param {unknown} error The deserialized error from the server's hydration comment
434
+ */
435
+ #hydrate_failed_content(error) {
436
+ const failed = this.#props.failed;
437
+ if (!failed) return;
438
+ this.#failed_effect = branch(() => {
439
+ failed(
440
+ this.#anchor,
441
+ () => error,
442
+ () => () => {
443
+ }
444
+ );
445
+ });
446
+ }
447
+ #hydrate_pending_content() {
448
+ const pending = this.#props.pending;
449
+ if (!pending) return;
450
+ this.is_pending = true;
451
+ this.#pending_effect = branch(() => pending(this.#anchor));
452
+ var batch = (
453
+ /** @type {Batch} */
454
+ current_batch
455
+ );
456
+ queue_micro_task(() => {
457
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
458
+ var anchor = create_text();
459
+ fragment.append(anchor);
460
+ this.#main_effect = this.#run(() => {
461
+ return branch(() => this.#children(anchor));
462
+ });
463
+ if (this.#pending_count === 0) {
464
+ this.#anchor.before(fragment);
465
+ this.#offscreen_fragment = null;
466
+ pause_effect(
467
+ /** @type {Effect} */
468
+ this.#pending_effect,
469
+ () => {
470
+ this.#pending_effect = null;
471
+ }
472
+ );
473
+ this.#resolve(batch);
474
+ }
475
+ });
476
+ }
477
+ #render() {
478
+ var batch = (
479
+ /** @type {Batch} */
480
+ current_batch
481
+ );
482
+ try {
483
+ this.is_pending = this.has_pending_snippet();
484
+ this.#pending_count = 0;
485
+ this.#local_pending_count = 0;
486
+ this.#main_effect = branch(() => {
487
+ this.#children(this.#anchor);
488
+ });
489
+ if (this.#pending_count > 0) {
490
+ var fragment = this.#offscreen_fragment = document.createDocumentFragment();
491
+ move_effect(this.#main_effect, fragment);
492
+ const pending = (
493
+ /** @type {(anchor: Node) => void} */
494
+ this.#props.pending
495
+ );
496
+ this.#pending_effect = branch(() => pending(this.#anchor));
497
+ } else {
498
+ this.#resolve(batch);
499
+ }
500
+ } catch (error) {
501
+ this.error(error);
502
+ }
503
+ }
504
+ /**
505
+ * @param {Batch} batch
506
+ */
507
+ #resolve(batch) {
508
+ this.is_pending = false;
509
+ for (const e of this.#dirty_effects) {
510
+ set_signal_status(e, DIRTY);
511
+ batch.schedule(e);
512
+ }
513
+ for (const e of this.#maybe_dirty_effects) {
514
+ set_signal_status(e, MAYBE_DIRTY);
515
+ batch.schedule(e);
516
+ }
517
+ this.#dirty_effects.clear();
518
+ this.#maybe_dirty_effects.clear();
519
+ }
520
+ /**
521
+ * Defer an effect inside a pending boundary until the boundary resolves
522
+ * @param {Effect} effect
523
+ */
524
+ defer_effect(effect) {
525
+ defer_effect(effect, this.#dirty_effects, this.#maybe_dirty_effects);
526
+ }
527
+ /**
528
+ * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
529
+ * @returns {boolean}
530
+ */
531
+ is_rendered() {
532
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
533
+ }
534
+ has_pending_snippet() {
535
+ return !!this.#props.pending;
536
+ }
537
+ /**
538
+ * @template T
539
+ * @param {() => T} fn
540
+ */
541
+ #run(fn) {
542
+ var previous_effect = active_effect;
543
+ var previous_reaction = active_reaction;
544
+ var previous_ctx = component_context;
545
+ set_active_effect(this.#effect);
546
+ set_active_reaction(this.#effect);
547
+ set_component_context(this.#effect.ctx);
548
+ try {
549
+ Batch.ensure();
550
+ return fn();
551
+ } catch (e) {
552
+ handle_error(e);
553
+ return null;
554
+ } finally {
555
+ set_active_effect(previous_effect);
556
+ set_active_reaction(previous_reaction);
557
+ set_component_context(previous_ctx);
558
+ }
559
+ }
560
+ /**
561
+ * Updates the pending count associated with the currently visible pending snippet,
562
+ * if any, such that we can replace the snippet with content once work is done
563
+ * @param {1 | -1} d
564
+ * @param {Batch} batch
565
+ */
566
+ #update_pending_count(d, batch) {
567
+ if (!this.has_pending_snippet()) {
568
+ if (this.parent) {
569
+ this.parent.#update_pending_count(d, batch);
570
+ }
571
+ return;
572
+ }
573
+ this.#pending_count += d;
574
+ if (this.#pending_count === 0) {
575
+ this.#resolve(batch);
576
+ if (this.#pending_effect) {
577
+ pause_effect(this.#pending_effect, () => {
578
+ this.#pending_effect = null;
579
+ });
580
+ }
581
+ if (this.#offscreen_fragment) {
582
+ this.#anchor.before(this.#offscreen_fragment);
583
+ this.#offscreen_fragment = null;
584
+ }
585
+ }
586
+ }
587
+ /**
588
+ * Update the source that powers `$effect.pending()` inside this boundary,
589
+ * and controls when the current `pending` snippet (if any) is removed.
590
+ * Do not call from inside the class
591
+ * @param {1 | -1} d
592
+ * @param {Batch} batch
593
+ */
594
+ update_pending_count(d, batch) {
595
+ this.#update_pending_count(d, batch);
596
+ this.#local_pending_count += d;
597
+ if (!this.#effect_pending || this.#pending_count_update_queued) return;
598
+ this.#pending_count_update_queued = true;
599
+ queue_micro_task(() => {
600
+ this.#pending_count_update_queued = false;
601
+ if (this.#effect_pending) {
602
+ internal_set(this.#effect_pending, this.#local_pending_count);
603
+ }
604
+ });
605
+ }
606
+ get_effect_pending() {
607
+ this.#effect_pending_subscriber();
608
+ return get(
609
+ /** @type {Source<number>} */
610
+ this.#effect_pending
611
+ );
612
+ }
613
+ /** @param {unknown} error */
614
+ error(error) {
615
+ var onerror = this.#props.onerror;
616
+ let failed = this.#props.failed;
617
+ if (!onerror && !failed) {
618
+ throw error;
619
+ }
620
+ if (this.#main_effect) {
621
+ destroy_effect(this.#main_effect);
622
+ this.#main_effect = null;
623
+ }
624
+ if (this.#pending_effect) {
625
+ destroy_effect(this.#pending_effect);
626
+ this.#pending_effect = null;
627
+ }
628
+ if (this.#failed_effect) {
629
+ destroy_effect(this.#failed_effect);
630
+ this.#failed_effect = null;
631
+ }
632
+ if (hydrating) {
633
+ set_hydrate_node(
634
+ /** @type {TemplateNode} */
635
+ this.#hydrate_open
636
+ );
637
+ next();
638
+ set_hydrate_node(skip_nodes());
639
+ }
640
+ var did_reset = false;
641
+ var calling_on_error = false;
642
+ const reset = () => {
643
+ if (did_reset) {
644
+ svelte_boundary_reset_noop();
645
+ return;
646
+ }
647
+ did_reset = true;
648
+ if (calling_on_error) {
649
+ svelte_boundary_reset_onerror();
650
+ }
651
+ if (this.#failed_effect !== null) {
652
+ pause_effect(this.#failed_effect, () => {
653
+ this.#failed_effect = null;
654
+ });
655
+ }
656
+ this.#run(() => {
657
+ this.#render();
658
+ });
659
+ };
660
+ const handle_error_result = (transformed_error) => {
661
+ try {
662
+ calling_on_error = true;
663
+ onerror?.(transformed_error, reset);
664
+ calling_on_error = false;
665
+ } catch (error2) {
666
+ invoke_error_boundary(error2, this.#effect && this.#effect.parent);
667
+ }
668
+ if (failed) {
669
+ this.#failed_effect = this.#run(() => {
670
+ try {
671
+ return branch(() => {
672
+ var effect = (
673
+ /** @type {Effect} */
674
+ active_effect
675
+ );
676
+ effect.b = this;
677
+ effect.f |= BOUNDARY_EFFECT;
678
+ failed(
679
+ this.#anchor,
680
+ () => transformed_error,
681
+ () => reset
682
+ );
683
+ });
684
+ } catch (error2) {
685
+ invoke_error_boundary(
686
+ error2,
687
+ /** @type {Effect} */
688
+ this.#effect.parent
689
+ );
690
+ return null;
691
+ }
692
+ });
693
+ }
694
+ };
695
+ queue_micro_task(() => {
696
+ var result;
697
+ try {
698
+ result = this.transform_error(error);
699
+ } catch (e) {
700
+ invoke_error_boundary(e, this.#effect && this.#effect.parent);
701
+ return;
702
+ }
703
+ if (result !== null && typeof result === "object" && typeof /** @type {any} */
704
+ result.then === "function") {
705
+ result.then(
706
+ handle_error_result,
707
+ /** @param {unknown} e */
708
+ (e) => invoke_error_boundary(e, this.#effect && this.#effect.parent)
709
+ );
710
+ } else {
711
+ handle_error_result(result);
712
+ }
713
+ });
714
+ }
715
+ }
716
+ const event_symbol = /* @__PURE__ */ Symbol("events");
717
+ const all_registered_events = /* @__PURE__ */ new Set();
718
+ const root_event_handles = /* @__PURE__ */ new Set();
719
+ let last_propagated_event = null;
720
+ function handle_event_propagation(event) {
721
+ var handler_element = this;
722
+ var owner_document = (
723
+ /** @type {Node} */
724
+ handler_element.ownerDocument
725
+ );
726
+ var event_name = event.type;
727
+ var path = event.composedPath?.() || [];
728
+ var current_target = (
729
+ /** @type {null | Element} */
730
+ path[0] || event.target
731
+ );
732
+ last_propagated_event = event;
733
+ var path_idx = 0;
734
+ var handled_at = last_propagated_event === event && event[event_symbol];
735
+ if (handled_at) {
736
+ var at_idx = path.indexOf(handled_at);
737
+ if (at_idx !== -1 && (handler_element === document || handler_element === /** @type {any} */
738
+ window)) {
739
+ event[event_symbol] = handler_element;
740
+ return;
741
+ }
742
+ var handler_idx = path.indexOf(handler_element);
743
+ if (handler_idx === -1) {
744
+ return;
745
+ }
746
+ if (at_idx <= handler_idx) {
747
+ path_idx = at_idx;
748
+ }
749
+ }
750
+ current_target = /** @type {Element} */
751
+ path[path_idx] || event.target;
752
+ if (current_target === handler_element) return;
753
+ define_property(event, "currentTarget", {
754
+ configurable: true,
755
+ get() {
756
+ return current_target || owner_document;
757
+ }
758
+ });
759
+ var previous_reaction = active_reaction;
760
+ var previous_effect = active_effect;
761
+ set_active_reaction(null);
762
+ set_active_effect(null);
763
+ try {
764
+ var throw_error;
765
+ var other_errors = [];
766
+ while (current_target !== null) {
767
+ var parent_element = current_target.assignedSlot || current_target.parentNode || /** @type {any} */
768
+ current_target.host || null;
769
+ try {
770
+ var delegated = current_target[event_symbol]?.[event_name];
771
+ if (delegated != null && (!/** @type {any} */
772
+ current_target.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
773
+ // -> the target could not have been disabled because it emits the event in the first place
774
+ event.target === current_target)) {
775
+ delegated.call(current_target, event);
776
+ }
777
+ } catch (error) {
778
+ if (throw_error) {
779
+ other_errors.push(error);
780
+ } else {
781
+ throw_error = error;
782
+ }
783
+ }
784
+ if (event.cancelBubble || parent_element === handler_element || parent_element === null) {
785
+ break;
786
+ }
787
+ current_target = parent_element;
788
+ }
789
+ if (throw_error) {
790
+ for (let error of other_errors) {
791
+ queueMicrotask(() => {
792
+ throw error;
793
+ });
794
+ }
795
+ throw throw_error;
796
+ }
797
+ } finally {
798
+ event[event_symbol] = handler_element;
799
+ delete event.currentTarget;
800
+ set_active_reaction(previous_reaction);
801
+ set_active_effect(previous_effect);
802
+ }
803
+ }
804
+ function assign_nodes(start, end) {
805
+ var effect = (
806
+ /** @type {Effect} */
807
+ active_effect
808
+ );
809
+ if (effect.nodes === null) {
810
+ effect.nodes = { start, end, a: null, t: null };
811
+ }
812
+ }
813
+ function mount(component, options) {
814
+ return _mount(component, options);
815
+ }
816
+ function hydrate(component, options) {
817
+ init_operations();
818
+ options.intro = options.intro ?? false;
819
+ const target = options.target;
820
+ const was_hydrating = hydrating;
821
+ const previous_hydrate_node = hydrate_node;
822
+ try {
823
+ var anchor = get_first_child(target);
824
+ while (anchor && (anchor.nodeType !== COMMENT_NODE || /** @type {Comment} */
825
+ anchor.data !== HYDRATION_START)) {
826
+ anchor = get_next_sibling(anchor);
827
+ }
828
+ if (!anchor) {
829
+ throw HYDRATION_ERROR;
830
+ }
831
+ set_hydrating(true);
832
+ set_hydrate_node(
833
+ /** @type {Comment} */
834
+ anchor
835
+ );
836
+ const instance = _mount(component, { ...options, anchor });
837
+ set_hydrating(false);
838
+ return (
839
+ /** @type {Exports} */
840
+ instance
841
+ );
842
+ } catch (error) {
843
+ if (error instanceof Error && error.message.split("\n").some((line) => line.startsWith("https://svelte.dev/e/"))) {
844
+ throw error;
845
+ }
846
+ if (error !== HYDRATION_ERROR) {
847
+ console.warn("Failed to hydrate: ", error);
848
+ }
849
+ if (options.recover === false) {
850
+ hydration_failed();
851
+ }
852
+ init_operations();
853
+ clear_text_content(target);
854
+ set_hydrating(false);
855
+ return mount(component, options);
856
+ } finally {
857
+ set_hydrating(was_hydrating);
858
+ set_hydrate_node(previous_hydrate_node);
859
+ }
860
+ }
861
+ const listeners = /* @__PURE__ */ new Map();
862
+ function _mount(Component, { target, anchor, props = {}, events, context, intro = true, transformError }) {
863
+ init_operations();
864
+ var component = void 0;
865
+ var unmount2 = component_root(() => {
866
+ var anchor_node = anchor ?? target.appendChild(create_text());
867
+ boundary(
868
+ /** @type {TemplateNode} */
869
+ anchor_node,
870
+ {
871
+ pending: () => {
872
+ }
873
+ },
874
+ (anchor_node2) => {
875
+ push$1({});
876
+ var ctx = (
877
+ /** @type {ComponentContext} */
878
+ component_context
879
+ );
880
+ if (context) ctx.c = context;
881
+ if (events) {
882
+ props.$$events = events;
883
+ }
884
+ if (hydrating) {
885
+ assign_nodes(
886
+ /** @type {TemplateNode} */
887
+ anchor_node2,
888
+ null
889
+ );
890
+ }
891
+ component = Component(anchor_node2, props) || {};
892
+ if (hydrating) {
893
+ active_effect.nodes.end = hydrate_node;
894
+ if (hydrate_node === null || hydrate_node.nodeType !== COMMENT_NODE || /** @type {Comment} */
895
+ hydrate_node.data !== HYDRATION_END) {
896
+ hydration_mismatch();
897
+ throw HYDRATION_ERROR;
898
+ }
899
+ }
900
+ pop$1();
901
+ },
902
+ transformError
903
+ );
904
+ var registered_events = /* @__PURE__ */ new Set();
905
+ var event_handle = (events2) => {
906
+ for (var i = 0; i < events2.length; i++) {
907
+ var event_name = events2[i];
908
+ if (registered_events.has(event_name)) continue;
909
+ registered_events.add(event_name);
910
+ var passive = is_passive_event(event_name);
911
+ for (const node of [target, document]) {
912
+ var counts = listeners.get(node);
913
+ if (counts === void 0) {
914
+ counts = /* @__PURE__ */ new Map();
915
+ listeners.set(node, counts);
916
+ }
917
+ var count = counts.get(event_name);
918
+ if (count === void 0) {
919
+ node.addEventListener(event_name, handle_event_propagation, { passive });
920
+ counts.set(event_name, 1);
921
+ } else {
922
+ counts.set(event_name, count + 1);
923
+ }
924
+ }
925
+ }
926
+ };
927
+ event_handle(array_from(all_registered_events));
928
+ root_event_handles.add(event_handle);
929
+ return () => {
930
+ for (var event_name of registered_events) {
931
+ for (const node of [target, document]) {
932
+ var counts = (
933
+ /** @type {Map<string, number>} */
934
+ listeners.get(node)
935
+ );
936
+ var count = (
937
+ /** @type {number} */
938
+ counts.get(event_name)
939
+ );
940
+ if (--count == 0) {
941
+ node.removeEventListener(event_name, handle_event_propagation);
942
+ counts.delete(event_name);
943
+ if (counts.size === 0) {
944
+ listeners.delete(node);
945
+ }
946
+ } else {
947
+ counts.set(event_name, count);
948
+ }
949
+ }
950
+ }
951
+ root_event_handles.delete(event_handle);
952
+ if (anchor_node !== anchor) {
953
+ anchor_node.parentNode?.removeChild(anchor_node);
954
+ }
955
+ };
956
+ });
957
+ mounted_components.set(component, unmount2);
958
+ return component;
959
+ }
960
+ let mounted_components = /* @__PURE__ */ new WeakMap();
961
+ function unmount(component, options) {
962
+ const fn = mounted_components.get(component);
963
+ if (fn) {
964
+ mounted_components.delete(component);
965
+ return fn(options);
966
+ }
967
+ return Promise.resolve();
968
+ }
969
+ function asClassComponent$1(component) {
970
+ return class extends Svelte4Component {
971
+ /** @param {any} options */
972
+ constructor(options) {
973
+ super({
974
+ component,
975
+ ...options
976
+ });
977
+ }
978
+ };
979
+ }
980
+ class Svelte4Component {
981
+ /** @type {any} */
982
+ #events;
983
+ /** @type {Record<string, any>} */
984
+ #instance;
985
+ /**
986
+ * @param {ComponentConstructorOptions & {
987
+ * component: any;
988
+ * }} options
989
+ */
990
+ constructor(options) {
991
+ var sources = /* @__PURE__ */ new Map();
992
+ var add_source = (key, value) => {
993
+ var s = mutable_source(value, false, false);
994
+ sources.set(key, s);
995
+ return s;
996
+ };
997
+ const props = new Proxy(
998
+ { ...options.props || {}, $$events: {} },
999
+ {
1000
+ get(target, prop) {
1001
+ return get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
1002
+ },
1003
+ has(target, prop) {
1004
+ if (prop === LEGACY_PROPS) return true;
1005
+ get(sources.get(prop) ?? add_source(prop, Reflect.get(target, prop)));
1006
+ return Reflect.has(target, prop);
1007
+ },
1008
+ set(target, prop, value) {
1009
+ set(sources.get(prop) ?? add_source(prop, value), value);
1010
+ return Reflect.set(target, prop, value);
1011
+ }
1012
+ }
1013
+ );
1014
+ this.#instance = (options.hydrate ? hydrate : mount)(options.component, {
1015
+ target: options.target,
1016
+ anchor: options.anchor,
1017
+ props,
1018
+ context: options.context,
1019
+ intro: options.intro ?? false,
1020
+ recover: options.recover,
1021
+ transformError: options.transformError
1022
+ });
1023
+ if (!options?.props?.$$host || options.sync === false) {
1024
+ flushSync();
1025
+ }
1026
+ this.#events = props.$$events;
1027
+ for (const key of Object.keys(this.#instance)) {
1028
+ if (key === "$set" || key === "$destroy" || key === "$on") continue;
1029
+ define_property(this, key, {
1030
+ get() {
1031
+ return this.#instance[key];
1032
+ },
1033
+ /** @param {any} value */
1034
+ set(value) {
1035
+ this.#instance[key] = value;
1036
+ },
1037
+ enumerable: true
1038
+ });
1039
+ }
1040
+ this.#instance.$set = /** @param {Record<string, any>} next */
1041
+ (next2) => {
1042
+ Object.assign(props, next2);
1043
+ };
1044
+ this.#instance.$destroy = () => {
1045
+ unmount(this.#instance);
1046
+ };
1047
+ }
1048
+ /** @param {Record<string, any>} props */
1049
+ $set(props) {
1050
+ this.#instance.$set(props);
1051
+ }
1052
+ /**
1053
+ * @param {string} event
1054
+ * @param {(...args: any[]) => any} callback
1055
+ * @returns {any}
1056
+ */
1057
+ $on(event, callback) {
1058
+ this.#events[event] = this.#events[event] || [];
1059
+ const cb = (...args) => callback.call(this, ...args);
1060
+ this.#events[event].push(cb);
1061
+ return () => {
1062
+ this.#events[event] = this.#events[event].filter(
1063
+ /** @param {any} fn */
1064
+ (fn) => fn !== cb
1065
+ );
1066
+ };
1067
+ }
1068
+ $destroy() {
1069
+ this.#instance.$destroy();
1070
+ }
1071
+ }
1072
+ function asClassComponent(component) {
1073
+ const component_constructor = asClassComponent$1(component);
1074
+ const _render = (props, { context, csp, transformError } = {}) => {
1075
+ const result = render(component, { props, context, csp, transformError });
1076
+ const munged = Object.defineProperties(
1077
+ /** @type {LegacyRenderResult & PromiseLike<LegacyRenderResult>} */
1078
+ {},
1079
+ {
1080
+ css: {
1081
+ value: { code: "", map: null }
1082
+ },
1083
+ head: {
1084
+ get: () => result.head
1085
+ },
1086
+ html: {
1087
+ get: () => result.body
1088
+ },
1089
+ then: {
1090
+ /**
1091
+ * this is not type-safe, but honestly it's the best I can do right now, and it's a straightforward function.
1092
+ *
1093
+ * @template TResult1
1094
+ * @template [TResult2=never]
1095
+ * @param { (value: LegacyRenderResult) => TResult1 } onfulfilled
1096
+ * @param { (reason: unknown) => TResult2 } onrejected
1097
+ */
1098
+ value: (onfulfilled, onrejected) => {
1099
+ {
1100
+ const user_result = onfulfilled({
1101
+ css: munged.css,
1102
+ head: munged.head,
1103
+ html: munged.html
1104
+ });
1105
+ return Promise.resolve(user_result);
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ );
1111
+ return munged;
1112
+ };
1113
+ component_constructor.render = _render;
1114
+ return component_constructor;
1115
+ }
1116
+ function Root($$renderer, $$props) {
1117
+ $$renderer.component(($$renderer2) => {
1118
+ let {
1119
+ stores,
1120
+ page,
1121
+ constructors,
1122
+ components = [],
1123
+ form,
1124
+ data_0 = null,
1125
+ data_1 = null
1126
+ } = $$props;
1127
+ {
1128
+ setContext("__svelte__", stores);
1129
+ }
1130
+ {
1131
+ stores.page.set(page);
1132
+ }
1133
+ const Pyramid_1 = derived(() => constructors[1]);
1134
+ if (constructors[1]) {
1135
+ $$renderer2.push("<!--[0-->");
1136
+ const Pyramid_0 = constructors[0];
1137
+ if (Pyramid_0) {
1138
+ $$renderer2.push("<!--[-->");
1139
+ Pyramid_0($$renderer2, {
1140
+ data: data_0,
1141
+ form,
1142
+ params: page.params,
1143
+ children: ($$renderer3) => {
1144
+ if (Pyramid_1()) {
1145
+ $$renderer3.push("<!--[-->");
1146
+ Pyramid_1()($$renderer3, { data: data_1, form, params: page.params });
1147
+ $$renderer3.push("<!--]-->");
1148
+ } else {
1149
+ $$renderer3.push("<!--[!-->");
1150
+ $$renderer3.push("<!--]-->");
1151
+ }
1152
+ },
1153
+ $$slots: { default: true }
1154
+ });
1155
+ $$renderer2.push("<!--]-->");
1156
+ } else {
1157
+ $$renderer2.push("<!--[!-->");
1158
+ $$renderer2.push("<!--]-->");
1159
+ }
1160
+ } else {
1161
+ $$renderer2.push("<!--[-1-->");
1162
+ const Pyramid_0 = constructors[0];
1163
+ if (Pyramid_0) {
1164
+ $$renderer2.push("<!--[-->");
1165
+ Pyramid_0($$renderer2, { data: data_0, form, params: page.params });
1166
+ $$renderer2.push("<!--]-->");
1167
+ } else {
1168
+ $$renderer2.push("<!--[!-->");
1169
+ $$renderer2.push("<!--]-->");
1170
+ }
1171
+ }
1172
+ $$renderer2.push(`<!--]--> `);
1173
+ {
1174
+ $$renderer2.push("<!--[-1-->");
1175
+ }
1176
+ $$renderer2.push(`<!--]-->`);
1177
+ });
1178
+ }
1179
+ const root = asClassComponent(Root);
1180
+
1181
+ export { disable_search as a, base64_decode as b, decode_params as c, decode_pathname as d, validate_layout_exports as e, validate_page_server_exports as f, validate_page_exports as g, text_encoder as h, resolve as i, get_relative_path as j, base64_encode as k, make_trackable as m, normalize_path as n, root as r, text_decoder as t, validate_layout_server_exports as v, with_request_store as w };
1182
+ //# sourceMappingURL=root-B5iYE7yO.js.map