@juspay/shooter 1.10.0 → 1.12.0

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 (163) hide show
  1. package/.claude/hooks/notifier.cjs +24 -242
  2. package/bin/lib/tunnel-discovery.cjs +519 -0
  3. package/bin/shooter.cjs +204 -49
  4. package/build/client/_app/immutable/chunks/{CmtInjm0.js → DTGtOxE1.js} +1 -1
  5. package/build/client/_app/immutable/chunks/DTGtOxE1.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/DTGtOxE1.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/{DfKeHoAm.js → DfsJh23H.js} +1 -1
  8. package/build/client/_app/immutable/chunks/DfsJh23H.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/DfsJh23H.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/DlSs5Yra.js +3 -0
  11. package/build/client/_app/immutable/chunks/DlSs5Yra.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/DlSs5Yra.js.gz +0 -0
  13. package/build/client/_app/immutable/entry/{app.Dp9YhfEg.js → app.B-sEFuLK.js} +2 -2
  14. package/build/client/_app/immutable/entry/app.B-sEFuLK.js.br +0 -0
  15. package/build/client/_app/immutable/entry/app.B-sEFuLK.js.gz +0 -0
  16. package/build/client/_app/immutable/entry/start.A2buqyYO.js +1 -0
  17. package/build/client/_app/immutable/entry/start.A2buqyYO.js.br +2 -0
  18. package/build/client/_app/immutable/entry/start.A2buqyYO.js.gz +0 -0
  19. package/build/client/_app/immutable/nodes/{0.B-M6sgow.js → 0.-0SstbRm.js} +1 -1
  20. package/build/client/_app/immutable/nodes/0.-0SstbRm.js.br +0 -0
  21. package/build/client/_app/immutable/nodes/0.-0SstbRm.js.gz +0 -0
  22. package/build/client/_app/immutable/nodes/{1.C8aY7Yn3.js → 1.BVLzPogE.js} +1 -1
  23. package/build/client/_app/immutable/nodes/1.BVLzPogE.js.br +0 -0
  24. package/build/client/_app/immutable/nodes/1.BVLzPogE.js.gz +0 -0
  25. package/build/client/_app/immutable/nodes/{2.YJZruh1H.js → 2.CiUyTQg5.js} +1 -1
  26. package/build/client/_app/immutable/nodes/2.CiUyTQg5.js.br +0 -0
  27. package/build/client/_app/immutable/nodes/2.CiUyTQg5.js.gz +0 -0
  28. package/build/client/_app/immutable/nodes/{3.VV-tRemY.js → 3.C9vlOBU0.js} +1 -1
  29. package/build/client/_app/immutable/nodes/3.C9vlOBU0.js.br +0 -0
  30. package/build/client/_app/immutable/nodes/3.C9vlOBU0.js.gz +0 -0
  31. package/build/client/_app/immutable/nodes/{6.CDJA8Na9.js → 6.BSsUBbIT.js} +1 -1
  32. package/build/client/_app/immutable/nodes/6.BSsUBbIT.js.br +0 -0
  33. package/build/client/_app/immutable/nodes/6.BSsUBbIT.js.gz +0 -0
  34. package/build/client/_app/immutable/nodes/{7.BX9znBYU.js → 7.BIQq9Yuz.js} +1 -1
  35. package/build/client/_app/immutable/nodes/7.BIQq9Yuz.js.br +0 -0
  36. package/build/client/_app/immutable/nodes/7.BIQq9Yuz.js.gz +0 -0
  37. package/build/client/_app/immutable/nodes/{8.CmdrNdfj.js → 8.BU_sJ5_M.js} +1 -1
  38. package/build/client/_app/immutable/nodes/8.BU_sJ5_M.js.br +0 -0
  39. package/build/client/_app/immutable/nodes/8.BU_sJ5_M.js.gz +0 -0
  40. package/build/client/_app/immutable/nodes/{9.BSleOtKF.js → 9.C1vJI771.js} +1 -1
  41. package/build/client/_app/immutable/nodes/9.C1vJI771.js.br +0 -0
  42. package/build/client/_app/immutable/nodes/9.C1vJI771.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/server/chunks/{0-vSdphvn2.js → 0-DgzcVTc0.js} +3 -3
  47. package/build/server/chunks/{0-vSdphvn2.js.map → 0-DgzcVTc0.js.map} +1 -1
  48. package/build/server/chunks/{1-B5tn1ob0.js → 1-iMvE8O_M.js} +3 -3
  49. package/build/server/chunks/{1-B5tn1ob0.js.map → 1-iMvE8O_M.js.map} +1 -1
  50. package/build/server/chunks/{2-CUbzGnZ8.js → 2-BJrmwHii.js} +3 -3
  51. package/build/server/chunks/{2-CUbzGnZ8.js.map → 2-BJrmwHii.js.map} +1 -1
  52. package/build/server/chunks/{3-BR90tKg7.js → 3-Ds3b4DfT.js} +3 -3
  53. package/build/server/chunks/{3-BR90tKg7.js.map → 3-Ds3b4DfT.js.map} +1 -1
  54. package/build/server/chunks/{4-CbejE1SC.js → 4-BtYdKCVW.js} +2 -2
  55. package/build/server/chunks/{4-CbejE1SC.js.map → 4-BtYdKCVW.js.map} +1 -1
  56. package/build/server/chunks/{5-BwqumuR1.js → 5-CvJK3PiH.js} +2 -2
  57. package/build/server/chunks/{5-BwqumuR1.js.map → 5-CvJK3PiH.js.map} +1 -1
  58. package/build/server/chunks/{6-cW7umWCt.js → 6-DEbZkQEO.js} +3 -3
  59. package/build/server/chunks/{6-cW7umWCt.js.map → 6-DEbZkQEO.js.map} +1 -1
  60. package/build/server/chunks/{7-D3cb9T2g.js → 7-BrQeR-CO.js} +3 -3
  61. package/build/server/chunks/{7-D3cb9T2g.js.map → 7-BrQeR-CO.js.map} +1 -1
  62. package/build/server/chunks/{8-BEgZo4wA.js → 8-e5TDwEpx.js} +3 -3
  63. package/build/server/chunks/{8-BEgZo4wA.js.map → 8-e5TDwEpx.js.map} +1 -1
  64. package/build/server/chunks/{9-Dy8aTTtf.js → 9-1iqRqatJ.js} +3 -3
  65. package/build/server/chunks/{9-Dy8aTTtf.js.map → 9-1iqRqatJ.js.map} +1 -1
  66. package/build/server/chunks/{Button-Dpueno77.js → Button-B5dU-ntz.js} +2 -2
  67. package/build/server/chunks/{Button-Dpueno77.js.map → Button-B5dU-ntz.js.map} +1 -1
  68. package/build/server/chunks/{Icon-aOLx5ELI.js → Icon-C7Ml3GX6.js} +3 -3
  69. package/build/server/chunks/{Icon-aOLx5ELI.js.map → Icon-C7Ml3GX6.js.map} +1 -1
  70. package/build/server/chunks/{Input-Cq7ZdLxS.js → Input-CPGO0sbS.js} +2 -2
  71. package/build/server/chunks/{Input-Cq7ZdLxS.js.map → Input-CPGO0sbS.js.map} +1 -1
  72. package/build/server/chunks/{Pill-Bn597jm0.js → Pill-CcrtCejm.js} +3 -3
  73. package/build/server/chunks/{Pill-Bn597jm0.js.map → Pill-CcrtCejm.js.map} +1 -1
  74. package/build/server/chunks/{Shimmer-5o7MVwXF.js → Shimmer-C5jkvGr1.js} +2 -2
  75. package/build/server/chunks/{Shimmer-5o7MVwXF.js.map → Shimmer-C5jkvGr1.js.map} +1 -1
  76. package/build/server/chunks/{_error.svelte-C85mEsv9.js → _error.svelte-CSIxs-ab.js} +8 -8
  77. package/build/server/chunks/{_error.svelte-C85mEsv9.js.map → _error.svelte-CSIxs-ab.js.map} +1 -1
  78. package/build/server/chunks/{_layout.svelte-rpYLLajc.js → _layout.svelte-noB4j-v2.js} +10 -10
  79. package/build/server/chunks/{_layout.svelte-rpYLLajc.js.map → _layout.svelte-noB4j-v2.js.map} +1 -1
  80. package/build/server/chunks/{_page.svelte-BfCXobKv.js → _page.svelte-B6qyh-K-.js} +11 -11
  81. package/build/server/chunks/{_page.svelte-BfCXobKv.js.map → _page.svelte-B6qyh-K-.js.map} +1 -1
  82. package/build/server/chunks/{_page.svelte-CA46TyHk.js → _page.svelte-BUkm2304.js} +5 -5
  83. package/build/server/chunks/{_page.svelte-CA46TyHk.js.map → _page.svelte-BUkm2304.js.map} +1 -1
  84. package/build/server/chunks/{_page.svelte-B6O0uTrK.js → _page.svelte-BV0XyYJZ.js} +4 -4
  85. package/build/server/chunks/{_page.svelte-B6O0uTrK.js.map → _page.svelte-BV0XyYJZ.js.map} +1 -1
  86. package/build/server/chunks/{_page.svelte-CCpVmMpU.js → _page.svelte-BfB8maoc.js} +9 -9
  87. package/build/server/chunks/{_page.svelte-CCpVmMpU.js.map → _page.svelte-BfB8maoc.js.map} +1 -1
  88. package/build/server/chunks/{_page.svelte-DjADcbfZ.js → _page.svelte-C60lAagP.js} +8 -8
  89. package/build/server/chunks/{_page.svelte-DjADcbfZ.js.map → _page.svelte-C60lAagP.js.map} +1 -1
  90. package/build/server/chunks/{_page.svelte-DUj1mSq0.js → _page.svelte-Dmg-RFCg.js} +7 -7
  91. package/build/server/chunks/{_page.svelte-DUj1mSq0.js.map → _page.svelte-Dmg-RFCg.js.map} +1 -1
  92. package/build/server/chunks/{_page.svelte-fkR4xqGu.js → _page.svelte-DnTpPnPR.js} +5 -5
  93. package/build/server/chunks/{_page.svelte-fkR4xqGu.js.map → _page.svelte-DnTpPnPR.js.map} +1 -1
  94. package/build/server/chunks/{_page.svelte-D0FBtMtH.js → _page.svelte-DuzZr5dA.js} +11 -11
  95. package/build/server/chunks/{_page.svelte-D0FBtMtH.js.map → _page.svelte-DuzZr5dA.js.map} +1 -1
  96. package/build/server/chunks/{_server.ts-HGYjOWF2.js → _server.ts-C-W5J15L.js} +2 -2
  97. package/build/server/chunks/{_server.ts-HGYjOWF2.js.map → _server.ts-C-W5J15L.js.map} +1 -1
  98. package/build/server/chunks/_server.ts-CvJKTS3Z.js +35 -0
  99. package/build/server/chunks/_server.ts-CvJKTS3Z.js.map +1 -0
  100. package/build/server/chunks/{_server.ts-BBLuxvp6.js → _server.ts-tChyh9FX.js} +43 -8
  101. package/build/server/chunks/_server.ts-tChyh9FX.js.map +1 -0
  102. package/build/server/chunks/{cache-5_eamjtv.js → cache-Me3zUAaD.js} +2 -2
  103. package/build/server/chunks/{cache-5_eamjtv.js.map → cache-Me3zUAaD.js.map} +1 -1
  104. package/build/server/chunks/{client-w1WsLDGu.js → client-CfNnl32g.js} +4 -4
  105. package/build/server/chunks/{client-w1WsLDGu.js.map → client-CfNnl32g.js.map} +1 -1
  106. package/build/server/chunks/client2-DDP30_vY.js +7 -0
  107. package/build/server/chunks/{client2-B5wCRDQi.js.map → client2-DDP30_vY.js.map} +1 -1
  108. package/build/server/chunks/{index-DMikC9Qy.js → index-CJrGuxuM.js} +2 -2
  109. package/build/server/chunks/{index-DMikC9Qy.js.map → index-CJrGuxuM.js.map} +1 -1
  110. package/build/server/chunks/{index-server-DHNcb_Bd.js → index-server--49oHtA0.js} +2 -2
  111. package/build/server/chunks/{index-server-DHNcb_Bd.js.map → index-server--49oHtA0.js.map} +1 -1
  112. package/build/server/chunks/{index2-BTTf6mSG.js → index2-MY7PXeAc.js} +2 -2
  113. package/build/server/chunks/{index2-BTTf6mSG.js.map → index2-MY7PXeAc.js.map} +1 -1
  114. package/build/server/chunks/pending-requests-C9p57WoU.js +174 -0
  115. package/build/server/chunks/pending-requests-C9p57WoU.js.map +1 -0
  116. package/build/server/chunks/{root-DhBbA8QD.js → root-xvQIR1Bt.js} +2 -2
  117. package/build/server/chunks/{root-DhBbA8QD.js.map → root-xvQIR1Bt.js.map} +1 -1
  118. package/build/server/chunks/{state.svelte-M8y8rROy.js → state.svelte-RCtlkrNH.js} +3 -3
  119. package/build/server/chunks/{state.svelte-M8y8rROy.js.map → state.svelte-RCtlkrNH.js.map} +1 -1
  120. package/build/server/chunks/{stores-CwkRmCHA.js → stores-C-LqoonT.js} +4 -4
  121. package/build/server/chunks/{stores-CwkRmCHA.js.map → stores-C-LqoonT.js.map} +1 -1
  122. package/build/server/index.js +4 -4
  123. package/build/server/index.js.map +1 -1
  124. package/build/server/manifest.js +20 -13
  125. package/build/server/manifest.js.map +1 -1
  126. package/package.json +2 -2
  127. package/src/lib/modules/server/apn/pending-requests.ts +156 -33
  128. package/src/lib/types/decision.ts +114 -0
  129. package/src/lib/types/index.ts +1 -0
  130. package/src/routes/api/decide/[requestId]/+server.ts +46 -0
  131. package/src/routes/api/response/+server.ts +61 -11
  132. package/build/client/_app/immutable/chunks/BFXEYMV8.js +0 -3
  133. package/build/client/_app/immutable/chunks/BFXEYMV8.js.br +0 -0
  134. package/build/client/_app/immutable/chunks/BFXEYMV8.js.gz +0 -0
  135. package/build/client/_app/immutable/chunks/CmtInjm0.js.br +0 -0
  136. package/build/client/_app/immutable/chunks/CmtInjm0.js.gz +0 -0
  137. package/build/client/_app/immutable/chunks/DfKeHoAm.js.br +0 -0
  138. package/build/client/_app/immutable/chunks/DfKeHoAm.js.gz +0 -0
  139. package/build/client/_app/immutable/entry/app.Dp9YhfEg.js.br +0 -0
  140. package/build/client/_app/immutable/entry/app.Dp9YhfEg.js.gz +0 -0
  141. package/build/client/_app/immutable/entry/start.Bc5yZsyK.js +0 -1
  142. package/build/client/_app/immutable/entry/start.Bc5yZsyK.js.br +0 -2
  143. package/build/client/_app/immutable/entry/start.Bc5yZsyK.js.gz +0 -0
  144. package/build/client/_app/immutable/nodes/0.B-M6sgow.js.br +0 -0
  145. package/build/client/_app/immutable/nodes/0.B-M6sgow.js.gz +0 -0
  146. package/build/client/_app/immutable/nodes/1.C8aY7Yn3.js.br +0 -0
  147. package/build/client/_app/immutable/nodes/1.C8aY7Yn3.js.gz +0 -0
  148. package/build/client/_app/immutable/nodes/2.YJZruh1H.js.br +0 -0
  149. package/build/client/_app/immutable/nodes/2.YJZruh1H.js.gz +0 -0
  150. package/build/client/_app/immutable/nodes/3.VV-tRemY.js.br +0 -0
  151. package/build/client/_app/immutable/nodes/3.VV-tRemY.js.gz +0 -0
  152. package/build/client/_app/immutable/nodes/6.CDJA8Na9.js.br +0 -0
  153. package/build/client/_app/immutable/nodes/6.CDJA8Na9.js.gz +0 -0
  154. package/build/client/_app/immutable/nodes/7.BX9znBYU.js.br +0 -0
  155. package/build/client/_app/immutable/nodes/7.BX9znBYU.js.gz +0 -0
  156. package/build/client/_app/immutable/nodes/8.CmdrNdfj.js.br +0 -0
  157. package/build/client/_app/immutable/nodes/8.CmdrNdfj.js.gz +0 -0
  158. package/build/client/_app/immutable/nodes/9.BSleOtKF.js.br +0 -0
  159. package/build/client/_app/immutable/nodes/9.BSleOtKF.js.gz +0 -0
  160. package/build/server/chunks/_server.ts-BBLuxvp6.js.map +0 -1
  161. package/build/server/chunks/client2-B5wCRDQi.js +0 -7
  162. package/build/server/chunks/pending-requests-B-JNGxpk.js +0 -96
  163. package/build/server/chunks/pending-requests-B-JNGxpk.js.map +0 -1
package/bin/shooter.cjs CHANGED
@@ -7,8 +7,14 @@
7
7
 
8
8
  const os = require('os');
9
9
  const path = require('path');
10
- const { spawn, execSync } = require('child_process');
10
+ const { spawn, execSync, execFileSync } = require('child_process');
11
11
  const fs = require('fs');
12
+ const {
13
+ discoverNamedTunnels,
14
+ healAndEnsureRunning,
15
+ probeReachability,
16
+ xmlEscapeText,
17
+ } = require('./lib/tunnel-discovery.cjs');
12
18
 
13
19
  // ── Resolve paths ───────────────────────────────────────────────────
14
20
  const PKG_ROOT = path.resolve(__dirname, '..');
@@ -176,7 +182,7 @@ function parsePortFlag() {
176
182
 
177
183
  function isCloudflaredAvailable() {
178
184
  try {
179
- execSync('which cloudflared', { stdio: 'ignore' });
185
+ execFileSync('which', ['cloudflared'], { stdio: 'ignore' });
180
186
  return true;
181
187
  } catch {
182
188
  return false;
@@ -222,6 +228,23 @@ function startTunnel(port) {
222
228
  return cf.pid;
223
229
  }
224
230
 
231
+ // Polls for ~/.shooter/.tunnel_url written by the URL detector inside
232
+ // startTunnel. Async so it yields control to the event loop between
233
+ // reads — letting startTunnel's setInterval actually fire to write the
234
+ // file. Resolves to the URL on success, or null on timeout.
235
+ async function waitForPersistedTunnelUrl(timeoutMs) {
236
+ const file = path.join(SHOOTER_HOME, '.tunnel_url');
237
+ const start = Date.now();
238
+ while (Date.now() - start < timeoutMs) {
239
+ try {
240
+ const url = fs.readFileSync(file, 'utf8').trim();
241
+ if (url) return url;
242
+ } catch {}
243
+ await new Promise((r) => setTimeout(r, 250));
244
+ }
245
+ return null;
246
+ }
247
+
225
248
  function stopTunnel() {
226
249
  const tunnelPidFile = path.join(SHOOTER_HOME, 'tunnel.pid');
227
250
  const tunnelUrlFile = path.join(SHOOTER_HOME, '.tunnel_url');
@@ -241,6 +264,48 @@ function stopTunnel() {
241
264
  } catch {}
242
265
  }
243
266
 
267
+ // Returns:
268
+ // { kind: 'named', url, label } – a pre-configured named tunnel is now
269
+ // managed (healed/started as needed)
270
+ // { kind: 'quick' } – no named tunnel found; caller should
271
+ // fall back to startTunnel()
272
+ function ensureNamedTunnelOrFallback(port) {
273
+ let tunnels;
274
+ try {
275
+ tunnels = discoverNamedTunnels(parseInt(port, 10));
276
+ } catch (err) {
277
+ console.warn(`(named-tunnel discovery failed: ${err.message})`);
278
+ return { kind: 'quick' };
279
+ }
280
+ if (!tunnels.length) return { kind: 'quick' };
281
+
282
+ // Prefer the first match — port + hostname combination is typically unique.
283
+ const tunnel = tunnels[0];
284
+ const result = healAndEnsureRunning(tunnel);
285
+
286
+ if (result.action === 'failed') {
287
+ console.warn(`Named tunnel ${tunnel.label} could not be managed: ${result.reason}`);
288
+ console.warn('Falling back to a quick tunnel.');
289
+ return { kind: 'quick' };
290
+ }
291
+ if (result.action === 'healed') {
292
+ console.log(`Tunnel plist binary path updated: ${result.from} → ${result.to}`);
293
+ } else if (result.action === 'started') {
294
+ console.log(`Tunnel ${tunnel.label} started.`);
295
+ } else if (result.action === 'reloaded') {
296
+ console.log(`Tunnel ${tunnel.label} kickstarted.`);
297
+ }
298
+
299
+ const url = tunnel.hostname ? `https://${tunnel.hostname}` : null;
300
+ if (url) {
301
+ try {
302
+ fs.mkdirSync(SHOOTER_HOME, { recursive: true });
303
+ fs.writeFileSync(path.join(SHOOTER_HOME, '.tunnel_url'), url);
304
+ } catch {}
305
+ }
306
+ return { kind: 'named', url, label: tunnel.label };
307
+ }
308
+
244
309
  function startServer() {
245
310
  const serverEntry = path.join(PKG_ROOT, 'server.ts');
246
311
 
@@ -319,11 +384,21 @@ function startServer() {
319
384
  console.log(` API key: ${apiKey ? '(set)' : '(not set — run shooter setup)'}`);
320
385
  console.log(` Logs: ${LOG_FILE}`);
321
386
 
322
- // Start tunnel in background if available; it writes URL to ~/.shooter/.tunnel_url
387
+ // Start tunnel in background if available; it writes URL to ~/.shooter/.tunnel_url.
388
+ // startTunnel spawns cloudflared detached + unref'd, so the child survives the
389
+ // CLI's process.exit(0) below — a setTimeout would have been killed before it
390
+ // fires. For the quick-tunnel branch we briefly wait for the URL-detection
391
+ // poller inside startTunnel to write .tunnel_url so `shooter status` and the
392
+ // user can see the URL after the daemon detaches.
393
+ let waitForQuickTunnel = false;
323
394
  if (!noTunnel && isCloudflaredAvailable()) {
324
- setTimeout(() => {
395
+ const t = ensureNamedTunnelOrFallback(port);
396
+ if (t.kind === 'named') {
397
+ if (t.url) console.log(` Tunnel: ${t.url} (named: ${t.label})`);
398
+ } else {
325
399
  startTunnel(port);
326
- }, 3000);
400
+ waitForQuickTunnel = true;
401
+ }
327
402
  } else if (!noTunnel && !isCloudflaredAvailable()) {
328
403
  console.log(' (cloudflared not found — no tunnel. Install: brew install cloudflared)');
329
404
  }
@@ -331,8 +406,15 @@ function startServer() {
331
406
  // Spawn auto-update guard (detached) — only when launchd is managing
332
407
  spawnGuard(child.pid, port);
333
408
 
334
- // Exit immediately — daemon is running, tunnel starts async
335
- process.exit(0);
409
+ if (waitForQuickTunnel) {
410
+ // Hand control back to the event loop so the URL poller inside
411
+ // startTunnel can write .tunnel_url. The poller has its own 15s
412
+ // ceiling and will clearInterval itself; once it does, no event
413
+ // sources remain and the daemon process exits naturally.
414
+ waitForPersistedTunnelUrl(15000).then(() => process.exit(0));
415
+ } else {
416
+ process.exit(0);
417
+ }
336
418
  } else {
337
419
  // ── Foreground mode: inherit stdio ──
338
420
  const tsxLoader = path.join(PKG_ROOT, 'node_modules', 'tsx', 'dist', 'loader.mjs');
@@ -355,20 +437,38 @@ function startServer() {
355
437
  // Clean up any stale tunnel from previous run (important for LaunchAgent restart)
356
438
  stopTunnel();
357
439
 
358
- // Start tunnel in foreground mode too (unless --no-tunnel)
440
+ // Start tunnel in foreground mode too (unless --no-tunnel). We capture
441
+ // the timer handle so signal/exit/error paths can cancel it — otherwise
442
+ // a Ctrl-C between t=0 and t=3s would let the deferred startTunnel fire
443
+ // after the server has begun shutting down, spawning a cloudflared that
444
+ // points at a dead local port (the eventual exit handler reaps it via
445
+ // pidfile, but the brief spawn is wasteful and confusing in logs).
359
446
  let tunnelStarted = false;
447
+ let tunnelTimer = null;
360
448
  if (!noTunnel && isCloudflaredAvailable()) {
361
- // Give server 3s to start before launching tunnel
362
- setTimeout(() => {
363
- startTunnel(port);
364
- tunnelStarted = true;
365
- }, 3000);
449
+ const t = ensureNamedTunnelOrFallback(port);
450
+ if (t.kind === 'named') {
451
+ if (t.url) console.log(`Tunnel: ${t.url} (named: ${t.label})`);
452
+ } else {
453
+ tunnelTimer = setTimeout(() => {
454
+ tunnelTimer = null;
455
+ startTunnel(port);
456
+ tunnelStarted = true;
457
+ }, 3000);
458
+ }
366
459
  }
460
+ const cancelTunnelTimer = () => {
461
+ if (tunnelTimer) {
462
+ clearTimeout(tunnelTimer);
463
+ tunnelTimer = null;
464
+ }
465
+ };
367
466
 
368
467
  // Spawn auto-update guard (detached) — only when launchd is managing
369
468
  spawnGuard(child.pid, port);
370
469
 
371
470
  child.on('error', (err) => {
471
+ cancelTunnelTimer();
372
472
  removePid();
373
473
  if (tunnelStarted) stopTunnel();
374
474
  stopGuard();
@@ -377,6 +477,7 @@ function startServer() {
377
477
  });
378
478
 
379
479
  child.on('exit', (code, signal) => {
480
+ cancelTunnelTimer();
380
481
  removePid();
381
482
  stopTunnel();
382
483
  stopGuard();
@@ -389,6 +490,7 @@ function startServer() {
389
490
  // Forward signals to the child so graceful shutdown works
390
491
  for (const sig of ['SIGTERM', 'SIGINT', 'SIGHUP']) {
391
492
  process.on(sig, () => {
493
+ cancelTunnelTimer();
392
494
  child.kill(sig);
393
495
  stopTunnel();
394
496
  stopGuard();
@@ -464,11 +566,38 @@ function showStatus() {
464
566
  tunnelUrl = fs.readFileSync(tunnelUrlFile, 'utf8').trim();
465
567
  } catch {}
466
568
 
569
+ let namedTunnel = null;
570
+ try {
571
+ const list = discoverNamedTunnels(parseInt(port, 10));
572
+ if (list.length) namedTunnel = list[0];
573
+ } catch (err) {
574
+ console.warn(`(named-tunnel discovery failed: ${err.message})`);
575
+ }
576
+
467
577
  if (pid) {
468
578
  console.log(`Shooter is running`);
469
579
  console.log(` PID: ${pid}`);
470
580
  console.log(` URL: http://localhost:${port}`);
471
- if (tunnelUrl) {
581
+ if (namedTunnel) {
582
+ const url = namedTunnel.hostname ? `https://${namedTunnel.hostname}` : null;
583
+ const ls = namedTunnel.launch || {};
584
+ if (url) {
585
+ const reach = probeReachability(url, 1500);
586
+ const reachStr = reach.ok
587
+ ? `reachable (${reach.status})`
588
+ : `unreachable${reach.status ? ` (${reach.status})` : ''}`;
589
+ console.log(` Tunnel: ${url} [${reachStr}]`);
590
+ }
591
+ console.log(
592
+ ` Agent: ${namedTunnel.label} ` +
593
+ `(state=${ls.state ?? 'unknown'}, last exit=${ls.lastExitCode ?? 'n/a'})`
594
+ );
595
+ if (!namedTunnel.binaryPathHealthy) {
596
+ console.log(
597
+ ` WARNING: cloudflared at ${namedTunnel.binaryPath} not found — will self-heal on next start`
598
+ );
599
+ }
600
+ } else if (tunnelUrl) {
472
601
  console.log(` Tunnel: ${tunnelUrl}`);
473
602
  }
474
603
  console.log(` Autostart: ${autostartEnabled ? 'enabled' : 'disabled'}`);
@@ -476,6 +605,16 @@ function showStatus() {
476
605
  console.log(` Home: ${SHOOTER_HOME}`);
477
606
  } else {
478
607
  console.log('Shooter is not running.');
608
+ if (namedTunnel) {
609
+ console.log(
610
+ ` Tunnel: named (${namedTunnel.label}) at https://${namedTunnel.hostname || '?'}`
611
+ );
612
+ if (!namedTunnel.binaryPathHealthy) {
613
+ console.log(
614
+ ` WARNING: cloudflared at ${namedTunnel.binaryPath} not found — will self-heal on next start`
615
+ );
616
+ }
617
+ }
479
618
  console.log(` Autostart: ${autostartEnabled ? 'enabled' : 'disabled'}`);
480
619
  console.log(` Home: ${SHOOTER_HOME}`);
481
620
  console.log('\nRun "shooter start" to start the server.');
@@ -543,6 +682,11 @@ function enableLaunchAgent() {
543
682
  const shooterBin = resolveShooterBin();
544
683
  const nodeBin = process.execPath;
545
684
 
685
+ // All five interpolations below are system-derived paths (no user
686
+ // input), but XML-escaping them keeps the plist well-formed if any
687
+ // path ever contains `&`, `<`, or `>` — same hardening as the named-
688
+ // tunnel rewrite path.
689
+ const e = xmlEscapeText;
546
690
  const plist = `<?xml version="1.0" encoding="UTF-8"?>
547
691
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
548
692
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -552,18 +696,18 @@ function enableLaunchAgent() {
552
696
  <string>${LAUNCHD_LABEL}</string>
553
697
  <key>ProgramArguments</key>
554
698
  <array>
555
- <string>${nodeBin}</string>
556
- <string>${shooterBin}</string>
699
+ <string>${e(nodeBin)}</string>
700
+ <string>${e(shooterBin)}</string>
557
701
  <string>start</string>
558
702
  </array>
559
703
  <key>WorkingDirectory</key>
560
- <string>${PKG_ROOT}</string>
704
+ <string>${e(PKG_ROOT)}</string>
561
705
  <key>EnvironmentVariables</key>
562
706
  <dict>
563
707
  <key>PATH</key>
564
- <string>${path.dirname(nodeBin)}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
708
+ <string>${e(path.dirname(nodeBin))}:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin</string>
565
709
  <key>SHOOTER_HOME</key>
566
- <string>${SHOOTER_HOME}</string>
710
+ <string>${e(SHOOTER_HOME)}</string>
567
711
  </dict>
568
712
  <key>KeepAlive</key>
569
713
  <dict>
@@ -573,9 +717,9 @@ function enableLaunchAgent() {
573
717
  <key>RunAtLoad</key>
574
718
  <true/>
575
719
  <key>StandardOutPath</key>
576
- <string>${LOG_FILE}</string>
720
+ <string>${e(LOG_FILE)}</string>
577
721
  <key>StandardErrorPath</key>
578
- <string>${LOG_FILE}</string>
722
+ <string>${e(LOG_FILE)}</string>
579
723
  <key>ThrottleInterval</key>
580
724
  <integer>10</integer>
581
725
  </dict>
@@ -588,12 +732,12 @@ function enableLaunchAgent() {
588
732
  // Unload existing if present
589
733
  if (fs.existsSync(LAUNCHD_PLIST)) {
590
734
  try {
591
- execSync(`launchctl unload "${LAUNCHD_PLIST}" 2>/dev/null`);
735
+ execFileSync('launchctl', ['unload', LAUNCHD_PLIST], { stdio: 'ignore' });
592
736
  } catch {}
593
737
  }
594
738
 
595
739
  fs.writeFileSync(LAUNCHD_PLIST, plist);
596
- execSync(`launchctl load "${LAUNCHD_PLIST}"`);
740
+ execFileSync('launchctl', ['load', LAUNCHD_PLIST], { stdio: 'ignore' });
597
741
 
598
742
  console.log('Autostart enabled (macOS LaunchAgent).');
599
743
  console.log(` Plist: ${LAUNCHD_PLIST}`);
@@ -609,7 +753,7 @@ function disableLaunchAgent() {
609
753
  }
610
754
 
611
755
  try {
612
- execSync(`launchctl unload "${LAUNCHD_PLIST}" 2>/dev/null`);
756
+ execFileSync('launchctl', ['unload', LAUNCHD_PLIST], { stdio: 'ignore' });
613
757
  } catch {}
614
758
  fs.unlinkSync(LAUNCHD_PLIST);
615
759
  console.log('Autostart disabled. LaunchAgent removed.');
@@ -620,15 +764,19 @@ function disableLaunchAgent() {
620
764
  function enableSystemdUnit() {
621
765
  const shooterBin = resolveShooterBin();
622
766
 
767
+ // Quote interpolated paths so systemd's word-splitter doesn't treat
768
+ // a space inside e.g. "/Users/John Doe/.local/bin/shooter" as an
769
+ // argument separator. systemd supports double-quoting per token in
770
+ // ExecStart= and the whole RHS in Environment=.
623
771
  const unit = `[Unit]
624
772
  Description=Shooter — Mobile dev notifications & remote terminal
625
773
  After=network.target
626
774
 
627
775
  [Service]
628
776
  Type=simple
629
- ExecStart=${process.execPath} ${shooterBin} start
630
- WorkingDirectory=${PKG_ROOT}
631
- Environment=SHOOTER_HOME=${SHOOTER_HOME}
777
+ ExecStart="${process.execPath}" "${shooterBin}" start
778
+ WorkingDirectory="${PKG_ROOT}"
779
+ Environment="SHOOTER_HOME=${SHOOTER_HOME}"
632
780
  Restart=on-failure
633
781
  RestartSec=10
634
782
 
@@ -640,9 +788,9 @@ WantedBy=default.target
640
788
  fs.mkdirSync(LOG_DIR, { recursive: true });
641
789
  fs.writeFileSync(SYSTEMD_UNIT, unit);
642
790
 
643
- execSync('systemctl --user daemon-reload');
644
- execSync('systemctl --user enable shooter.service');
645
- execSync('systemctl --user start shooter.service');
791
+ execFileSync('systemctl', ['--user', 'daemon-reload'], { stdio: 'inherit' });
792
+ execFileSync('systemctl', ['--user', 'enable', 'shooter.service'], { stdio: 'inherit' });
793
+ execFileSync('systemctl', ['--user', 'start', 'shooter.service'], { stdio: 'inherit' });
646
794
 
647
795
  console.log('Autostart enabled (systemd user unit).');
648
796
  console.log(` Unit: ${SYSTEMD_UNIT}`);
@@ -657,14 +805,14 @@ function disableSystemdUnit() {
657
805
  }
658
806
 
659
807
  try {
660
- execSync('systemctl --user stop shooter.service 2>/dev/null');
808
+ execFileSync('systemctl', ['--user', 'stop', 'shooter.service'], { stdio: 'ignore' });
661
809
  } catch {}
662
810
  try {
663
- execSync('systemctl --user disable shooter.service 2>/dev/null');
811
+ execFileSync('systemctl', ['--user', 'disable', 'shooter.service'], { stdio: 'ignore' });
664
812
  } catch {}
665
813
  fs.unlinkSync(SYSTEMD_UNIT);
666
814
  try {
667
- execSync('systemctl --user daemon-reload');
815
+ execFileSync('systemctl', ['--user', 'daemon-reload'], { stdio: 'inherit' });
668
816
  } catch {}
669
817
  console.log('Autostart disabled. systemd unit removed.');
670
818
  }
@@ -745,7 +893,9 @@ function runSetup() {
745
893
 
746
894
  function runUpdate(subcommand) {
747
895
  const { checkForUpdate } = require(path.join(PKG_ROOT, 'scripts', 'update-checker.cjs'));
748
- const { recordCheck, isVersionSuppressed } = require(path.join(PKG_ROOT, 'scripts', 'update-state.cjs'));
896
+ const { recordCheck, isVersionSuppressed } = require(
897
+ path.join(PKG_ROOT, 'scripts', 'update-state.cjs')
898
+ );
749
899
 
750
900
  const result = checkForUpdate(PKG_ROOT);
751
901
  if (!result.checkFailed) recordCheck(result.latestVersion);
@@ -760,7 +910,9 @@ function runUpdate(subcommand) {
760
910
  console.log(` Current commit: ${result.currentCommit}`);
761
911
  console.log(` Latest commit: ${result.latestCommit}`);
762
912
  if (isVersionSuppressed(result.latestVersion)) {
763
- console.log(` (version ${result.latestVersion} is temporarily suppressed — will retry in <24h)`);
913
+ console.log(
914
+ ` (version ${result.latestVersion} is temporarily suppressed — will retry in <24h)`
915
+ );
764
916
  }
765
917
  } else {
766
918
  console.log(`Already up to date: v${result.currentVersion} (${result.currentCommit})`);
@@ -783,7 +935,9 @@ function runUpdate(subcommand) {
783
935
  const { getCurrentBranch } = require(path.join(PKG_ROOT, 'scripts', 'update-checker.cjs'));
784
936
  const branch = getCurrentBranch(PKG_ROOT);
785
937
  if (branch !== 'release') {
786
- console.log(`Cannot update: currently on branch '${branch || 'unknown'}', updates only apply to 'release'.`);
938
+ console.log(
939
+ `Cannot update: currently on branch '${branch || 'unknown'}', updates only apply to 'release'.`
940
+ );
787
941
  console.log('Switch to the release branch and try again.');
788
942
  return;
789
943
  }
@@ -805,9 +959,9 @@ function runUpdate(subcommand) {
805
959
  if (isLaunchdManaging()) {
806
960
  const uid = process.getuid ? process.getuid() : 501;
807
961
  try {
808
- execSync(`launchctl kickstart -k gui/${uid}/${LAUNCHD_LABEL}`, {
962
+ execFileSync('launchctl', ['kickstart', '-k', `gui/${uid}/${LAUNCHD_LABEL}`], {
809
963
  timeout: 10_000,
810
- stdio: 'pipe',
964
+ stdio: ['ignore', 'pipe', 'ignore'],
811
965
  });
812
966
  console.log('Signaled launchd to restart the server.');
813
967
  } catch {
@@ -828,7 +982,9 @@ function runUpdate(subcommand) {
828
982
  * Returns true on success. On failure, rolls back and returns false.
829
983
  */
830
984
  function performUpdate(result) {
831
- const { suppressVersion, recordSuccessfulUpdate } = require(path.join(PKG_ROOT, 'scripts', 'update-state.cjs'));
985
+ const { suppressVersion, recordSuccessfulUpdate } = require(
986
+ path.join(PKG_ROOT, 'scripts', 'update-state.cjs')
987
+ );
832
988
 
833
989
  // Save current HEAD for rollback
834
990
  let savedHead = '';
@@ -987,7 +1143,7 @@ function isLaunchdManaging() {
987
1143
  if (os.platform() !== 'darwin') return false;
988
1144
  try {
989
1145
  const uid = process.getuid ? process.getuid() : 501;
990
- execSync(`launchctl print gui/${uid}/${LAUNCHD_LABEL} 2>/dev/null`, {
1146
+ execFileSync('launchctl', ['print', `gui/${uid}/${LAUNCHD_LABEL}`], {
991
1147
  stdio: ['ignore', 'pipe', 'ignore'],
992
1148
  timeout: 5_000,
993
1149
  });
@@ -1016,13 +1172,12 @@ function runGuard() {
1016
1172
  process.exit(1);
1017
1173
  }
1018
1174
 
1019
- const { checkForUpdate, getCurrentBranch } = require(path.join(PKG_ROOT, 'scripts', 'update-checker.cjs'));
1020
- const {
1021
- recordCheck,
1022
- isVersionSuppressed,
1023
- suppressVersion,
1024
- recordSuccessfulUpdate,
1025
- } = require(path.join(PKG_ROOT, 'scripts', 'update-state.cjs'));
1175
+ const { checkForUpdate, getCurrentBranch } = require(
1176
+ path.join(PKG_ROOT, 'scripts', 'update-checker.cjs')
1177
+ );
1178
+ const { recordCheck, isVersionSuppressed, suppressVersion, recordSuccessfulUpdate } = require(
1179
+ path.join(PKG_ROOT, 'scripts', 'update-state.cjs')
1180
+ );
1026
1181
 
1027
1182
  const log = (msg) => console.log(`[guard] ${new Date().toISOString()} ${msg}`);
1028
1183
 
@@ -1135,9 +1290,9 @@ function runGuard() {
1135
1290
  log('restarting via launchctl...');
1136
1291
  const uid = process.getuid ? process.getuid() : 501;
1137
1292
  try {
1138
- execSync(`launchctl kickstart -k gui/${uid}/${LAUNCHD_LABEL}`, {
1293
+ execFileSync('launchctl', ['kickstart', '-k', `gui/${uid}/${LAUNCHD_LABEL}`], {
1139
1294
  timeout: 10_000,
1140
- stdio: 'pipe',
1295
+ stdio: ['ignore', 'pipe', 'ignore'],
1141
1296
  });
1142
1297
  } catch {
1143
1298
  log('WARNING: launchctl kickstart failed');
@@ -1 +1 @@
1
- import{s as r,p as e}from"./BFXEYMV8.js";const a={get params(){return e.params},get url(){return e.url}};r.updated.check;const s=a;export{s as p};
1
+ import{s as r,p as e}from"./DlSs5Yra.js";const a={get params(){return e.params},get url(){return e.url}};r.updated.check;const s=a;export{s as p};
@@ -1 +1 @@
1
- import{s as e}from"./BFXEYMV8.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
1
+ import{s as e}from"./DlSs5Yra.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -0,0 +1,3 @@
1
+ import{bv as Te,v as Ve,s as P,g as j,b as N,P as oe,bw as At}from"./DYuMZGL5.js";class pe{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Le{constructor(t,n){this.status=t,this.location=n}}class Pe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function Et(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function kt(e){return e.split("%25").map(decodeURI).join("%25")}function Rt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ye({href:e}){return e.split("#")[0]}function St(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;const It=new TextDecoder;function Ut(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Tt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&X.delete(je(e)),Tt(e,t));const X=new Map;function Lt(e,t){const n=je(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&X.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=Ut(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Pt(e,t,n){if(X.size>0){const r=je(e,n),a=X.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);X.delete(r)}}return window.fetch(t,n)}function je(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${St(...a)}"]`}return r}const jt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Nt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${xt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((i,l)=>{if(l%2){if(i.startsWith("x+"))return ve(String.fromCharCode(parseInt(i.slice(2),16)));if(i.startsWith("u+"))return ve(String.fromCharCode(...i.slice(2).split("-").map(g=>parseInt(g,16))));const u=jt.exec(i),[,d,p,h,f]=u;return t.push({name:h,matcher:f,optional:!!d,rest:!!p,chained:p?l===1&&o[0]==="":!1}),p?"([^]*?)":d?"([^/]*)?":"([^/]+?)"}return ve(i)}).join("")}).join("")}/?$`),params:t}}function Ot(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function xt(e){return e.slice(1).split("/").filter(Ot)}function Ct(e,t,n){const r={},a=e.slice(1),s=a.filter(c=>c!==void 0);let o=0;for(let c=0;c<t.length;c+=1){const i=t[c];let l=a[c-o];if(i.chained&&i.rest&&o&&(l=a.slice(c-o,c+1).filter(u=>u).join("/"),o=0),l===void 0)if(i.rest)l="";else continue;if(!i.matcher||n[i.matcher](l)){r[i.name]=l;const u=t[c+1],d=a[c+1];u&&!u.rest&&u.optional&&d&&i.chained&&(o=0),!u&&!d&&Object.keys(r).length===s.length&&(o=0);continue}if(i.optional&&i.chained){o++;continue}return}if(!o)return r}function ve(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Dt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([c,[i,l,u]])=>{const{pattern:d,params:p}=Nt(c),h={id:c,exec:f=>{const g=d.exec(f);if(g)return Ct(g,p,r)},errors:[1,...u||[]].map(f=>e[f]),layouts:[0,...l||[]].map(o),leaf:s(i)};return h.errors.length=h.layouts.length=Math.max(h.errors.length,h.layouts.length),h});function s(c){const i=c<0;return i&&(c=~c),[i,e[c]]}function o(c){return c===void 0?c:[a.has(c),e[c]]}}function Qe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function qe(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const U=globalThis.__sveltekit_zm37h?.base??"",$t=globalThis.__sveltekit_zm37h?.assets??U??"",Bt="1779659099192",et="sveltekit:snapshot",tt="sveltekit:scroll",nt="sveltekit:states",Ft="sveltekit:pageurl",q="sveltekit:history",Q="sveltekit:navigation",B={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},re=location.origin;function Ne(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function M(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ye={...B,"":B.hover};function rt(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function at(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=rt(e)}}function Ee(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const c=location.hash.split("#")[1]||"/";r.hash=`#${c}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||_e(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=r?.origin===re&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function se(e){let t=null,n=null,r=null,a=null,s=null,o=null,c=e;for(;c&&c!==document.documentElement;)r===null&&(r=V(c,"preload-code")),a===null&&(a=V(c,"preload-data")),t===null&&(t=V(c,"keepfocus")),n===null&&(n=V(c,"noscroll")),s===null&&(s=V(c,"reload")),o===null&&(o=V(c,"replacestate")),c=rt(c);function i(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ye[r??"off"],preload_data:Ye[a??"off"],keepfocus:i(t),noscroll:i(n),reload:i(s),replace_state:i(o)}}function ze(e){const t=Te(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function s(o){let c;return t.subscribe(i=>{(c===void 0||n&&i!==c)&&o(c=i)})}return{notify:r,set:a,subscribe:s}}const ot={v:()=>{}};function Mt(){const{set:e,subscribe:t}=Te(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${$t}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Bt;return o&&(e(!0),ot.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function _e(e,t,n){return e.origin!==re||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function jn(e){}const Vt=-1,qt=-2,Yt=-3,zt=-4,Gt=-5,Kt=-6,Wt=-7,st=2**32-1,ke=st-1;function Ht(e){return!(!Number.isInteger(e)||e<0||e>ke)}function Xt(e){return!(!Number.isInteger(e)||e<0||e>st)}function Jt(e){return Uint8Array.fromBase64(e).buffer}function Zt(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function Qt(e){const t=atob(e),n=t.length,r=new Uint8Array(n);for(let a=0;a<n;a++)r[a]=t.charCodeAt(a);return r.buffer}const en=typeof Uint8Array.fromBase64=="function",tn=typeof process=="object"&&process.versions?.node!==void 0,nn=en?Jt:tn?Zt:Qt;function rn(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);let a=null;function s(o,c=!1){if(o===Vt)return;if(o===Yt)return NaN;if(o===zt)return 1/0;if(o===Gt)return-1/0;if(o===Kt)return-0;if(c||typeof o!="number")throw new Error("Invalid input");if(o in r)return r[o];const i=n[o];if(!i||typeof i!="object")r[o]=i;else if(Array.isArray(i))if(typeof i[0]=="string"){const l=i[0],u=t&&Object.hasOwn(t,l)?t[l]:void 0;if(u){let d=i[1];if(typeof d!="number"&&(d=n.push(i[1])-1),a??=new Set,a.has(d))throw new Error("Invalid circular reference");return a.add(d),r[o]=u(s(d)),a.delete(d),r[o]}switch(l){case"Date":r[o]=new Date(i[1]);break;case"Set":const d=new Set;r[o]=d;for(let f=1;f<i.length;f+=1)d.add(s(i[f]));break;case"Map":const p=new Map;r[o]=p;for(let f=1;f<i.length;f+=2)p.set(s(i[f]),s(i[f+1]));break;case"RegExp":r[o]=new RegExp(i[1],i[2]);break;case"Object":{const f=i[1];if(typeof n[f]=="object"&&n[f][0]!=="BigInt")throw new Error("Invalid input");r[o]=Object(s(f));break}case"BigInt":r[o]=BigInt(i[1]);break;case"null":const h=Object.create(null);r[o]=h;for(let f=1;f<i.length;f+=2){if(i[f]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");h[i[f]]=s(i[f+1])}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(n[i[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const f=globalThis[l],g=s(i[1]);r[o]=i[2]!==void 0?new f(g,i[2],i[3]):new f(g);break}case"ArrayBuffer":{const f=i[1];if(typeof f!="string")throw new Error("Invalid ArrayBuffer encoding");const g=nn(f);r[o]=g;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const f=l.slice(9);r[o]=Temporal[f].from(i[1]);break}case"URL":{const f=new URL(i[1]);r[o]=f;break}case"URLSearchParams":{const f=new URLSearchParams(i[1]);r[o]=f;break}default:throw new Error(`Unknown type ${l}`)}}else if(i[0]===Wt){const l=i[1];if(!Xt(l))throw new Error("Invalid input");const u=[];r[o]=u,u[ke]=void 0,delete u[ke];for(let d=2;d<i.length;d+=2){const p=i[d];if(!Ht(p)||p>=l)throw new Error("Invalid input");u[p]=s(i[d+1])}u.length=l}else{const l=new Array(i.length);r[o]=l;for(let u=0;u<i.length;u+=1){const d=i[u];d!==qt&&(l[u]=s(d))}}else{const l={};r[o]=l;for(const u of Object.keys(i)){if(u==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const d=i[u];l[u]=s(d)}}return r[o]}return s(0)}const it=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...it];const an=new Set([...it]);[...an];function on(e){return e.filter(t=>t!=null)}const sn="x-sveltekit-invalidated",cn="x-sveltekit-trailing-slash";function ie(e){return e instanceof pe||e instanceof Pe?e.status:500}function ln(e){return e instanceof Pe?e.text:"Internal Error"}let S,ee,be;const fn=Ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ve.toString()),Ge="a:";fn?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ge)},ee={current:null},be={current:!1}):(S=new class{#e=P({});get data(){return j(this.#e)}set data(t){N(this.#e,t)}#t=P(null);get form(){return j(this.#t)}set form(t){N(this.#t,t)}#n=P(null);get error(){return j(this.#n)}set error(t){N(this.#n,t)}#r=P({});get params(){return j(this.#r)}set params(t){N(this.#r,t)}#a=P({id:null});get route(){return j(this.#a)}set route(t){N(this.#a,t)}#o=P({});get state(){return j(this.#o)}set state(t){N(this.#o,t)}#s=P(-1);get status(){return j(this.#s)}set status(t){N(this.#s,t)}#i=P(new URL(Ge));get url(){return j(this.#i)}set url(t){N(this.#i,t)}},ee=new class{#e=P(null);get current(){return j(this.#e)}set current(t){N(this.#e,t)}},be=new class{#e=P(!1);get current(){return j(this.#e)}set current(t){N(this.#e,t)}},ot.v=()=>be.current=!0);function un(e){Object.assign(S,e)}const dn="/__data.json",hn=".html__data.json";function pn(e){return e.endsWith(".html")?e.replace(/\.html$/,hn):e.replace(/\/$/,"")+dn}const _n=new Set(["icon","shortcut icon","apple-touch-icon"]);let W=null;const D=Qe(tt)??{},te=Qe(et)??{},C={url:ze({}),page:ze({}),navigating:Te(null),updated:Mt()};function Oe(e){D[e]=M()}function gn(e,t){let n=e+1;for(;D[n];)delete D[n],n+=1;for(n=t+1;te[n];)delete te[n],n+=1}function G(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function ct(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(U||"/");e&&await e.update()}}function Ke(){}let xe,Re,ce,x,Se,A;const le=[],fe=[];let L=null;function Ie(){L?.fork?.then(e=>e?.discard()),L=null}const ae=new Map,lt=new Set,mn=new Set,J=new Set;let w={branch:[],error:null,url:null},Ce=!1,ue=!1,We=!0,ne=!1,H=!1,ft=!1,De=!1,ut,R,I,F;const Z=new Set,He=new Map;async function Cn(e,t,n){globalThis.__sveltekit_zm37h?.data&&globalThis.__sveltekit_zm37h.data,document.URL!==location.href&&(location.href=location.href),A=e,await e.hooks.init?.(),xe=Dt(e),x=document.documentElement,Se=t,Re=e.nodes[0],ce=e.nodes[1],Re(),ce(),R=history.state?.[q],I=history.state?.[Q],R||(R=I=Date.now(),history.replaceState({...history.state,[q]:R,[Q]:I},""));const r=D[R];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Un(Se,n)):(await Y({type:"enter",url:Ne(A.hash?Ln(new URL(location.href)):location.href),replace_state:!0}),a()),In()}function wn(){le.length=0,De=!1}function dt(e){fe.some(t=>t?.snapshot)&&(te[e]=fe.map(t=>t?.snapshot?.capture()))}function ht(e){te[e]?.forEach((t,n)=>{fe[n]?.snapshot?.restore(t)})}function Xe(){Oe(R),qe(tt,D),dt(I),qe(et,te)}async function pt(e,t,n,r){let a;t.invalidateAll&&Ie(),await Y({type:"goto",url:Ne(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(De=!0,a=[...He.keys()]),t.invalidate&&t.invalidate.forEach(Sn)}}),t.invalidateAll&&oe().then(oe).then(()=>{He.forEach(({resource:s},o)=>{a?.includes(o)&&s.refresh?.()})})}async function yn(e){if(e.id!==L?.id){Ie();const t={};Z.add(t),L={id:e.id,token:t,promise:gt({...e,preload:t}).then(n=>(Z.delete(t),n.type==="loaded"&&n.state.error&&Ie(),n)),fork:null}}return L.promise}async function Ae(e){const t=(await me(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function _t(e,t,n){const r={params:w.params,route:{id:w.route?.id??null},url:new URL(location.href)};w={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(S,e.props.page),ut=new A.root({target:t,props:{...e.props,stores:C,components:fe},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ht(I),n){const s={from:null,to:{...r,scroll:D[R]??M()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(s))}ue=!0}async function de({url:e,params:t,branch:n,errors:r,status:a,error:s,route:o,form:c}){let i="never";if(U&&(e.pathname===U||e.pathname===U+"/"))i="always";else for(const f of n)f?.slash!==void 0&&(i=f.slash);e.pathname=Et(e.pathname,i),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:n,error:s,route:o},props:{constructors:on(n).map(f=>f.node.component),page:Me(S)}};c!==void 0&&(l.props.form=c);let u={},d=!S,p=0;for(let f=0;f<Math.max(n.length,w.branch.length);f+=1){const g=n[f],b=w.branch[f];g?.data!==b?.data&&(d=!0),g&&(u={...u,...g.data},d&&(l.props[`data_${p}`]=u),p+=1)}return(!w.url||e.href!==w.url.href||w.error!==s||c!==void 0&&c!==S.form||d)&&(l.props.page={error:s,params:t,route:{id:o?.id??null},state:{},status:a,url:new URL(e),form:c??null,data:d?u:S.data}),l}async function $e({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){let o=null;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},i=await e();return{node:i,loader:e,server:s,universal:i.universal?.load?{type:"data",data:o,uses:c}:null,data:o??s?.data??null,slash:i.universal?.trailingSlash??s?.slash}}function vn(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=ue?Pt(r,a.href,t):Lt(r,t);return{resolved:a,promise:s}}function Je(e,t,n,r,a,s){if(De)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==w.params[o])return!0;for(const o of a.dependencies)if(le.some(c=>c(new URL(o))))return!0;return!1}function Be(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function bn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function Ze({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Me(S),constructors:[]}}}async function gt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if(L?.id===e)return Z.delete(L.token),L.promise;const{errors:o,layouts:c,leaf:i}=a,l=[...c,i];o.forEach(m=>m?.().catch(()=>{})),l.forEach(m=>m?.[1]().catch(()=>{}));let u=null;const d=w.url?e!==he(w.url):!1,p=w.route?a.id!==w.route.id:!1,h=bn(w.url,n);let f=!1;{const m=l.map((y,E)=>{const k=w.branch[E],v=!!y?.[0]&&(k?.loader!==y[1]||Je(f,p,d,h,k.server?.uses,r));return v&&(f=!0),v});if(m.some(Boolean)){try{u=await yt(n,m)}catch(y){const E=await z(y,{url:n,params:r,route:{id:e}});return Z.has(s)?Ze({error:E,url:n,params:r,route:a}):ge({status:ie(y),error:E,url:n,route:a})}if(u.type==="redirect")return u}}const g=u?.nodes;let b=!1;const _=l.map(async(m,y)=>{if(!m)return;const E=w.branch[y],k=g?.[y];if((!k||k.type==="skip")&&m[1]===E?.loader&&!Je(b,p,d,h,E.universal?.uses,r))return E;if(b=!0,k?.type==="error")throw k;return $e({loader:m[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let $=0;$<y;$+=1)Object.assign(O,(await _[$])?.data);return O},server_data_node:Be(k===void 0&&m[0]?{type:"skip"}:k??null,m[0]?E?.server:void 0)})});for(const m of _)m.catch(()=>{});const T=[];for(let m=0;m<l.length;m+=1)if(l[m])try{T.push(await _[m])}catch(y){if(y instanceof Le)return{type:"redirect",location:y.location};if(Z.has(s))return Ze({error:await z(y,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=ie(y),k;if(g?.includes(y))E=y.status??E,k=y.error;else if(y instanceof pe)k=y.body;else{if(await C.updated.check())return await ct(),await G(n);k=await z(y,{params:r,url:n,route:{id:a.id}})}const v=await An(m,T,o);return v?de({url:n,params:r,branch:T.slice(0,v.idx).concat(v.node),errors:o,status:E,error:k,route:a}):await wt(n,{id:a.id},k,E)}else T.push(void 0);return de({url:n,params:r,branch:T,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function An(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function ge({status:e,error:t,url:n,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const c=await yt(n,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;s=c.nodes[0]??null}catch{(n.origin!==re||n.pathname!==location.pathname||Ce)&&await G(n)}try{const o=await $e({loader:Re,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Be(s)}),c={node:await ce(),loader:ce,universal:null,server:null,data:null};return de({url:n,params:a,branch:[o,c],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Le)return pt(new URL(o.location,location.href),{},0);throw o}}async function En(e){const t=e.href;if(ae.has(t))return ae.get(t);let n;try{const r=(async()=>{let a=await A.hooks.reroute({url:new URL(e),fetch:async(s,o)=>vn(s,o,e).promise})??e;if(typeof a=="string"){const s=new URL(e);A.hash?s.hash=a:s.pathname=a,a=s}return a})();ae.set(t,r),n=await r}catch{ae.delete(t);return}return n}async function me(e,t){if(e&&!_e(e,U,A.hash)){const n=await En(e);if(!n)return;const r=kn(n);for(const a of xe){const s=a.exec(r);if(s)return{id:he(e),invalidating:t,route:a,params:Rt(s),url:e}}}}function kn(e){return kt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(U.length))||"/"}function he(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function mt({url:e,type:t,intent:n,delta:r,event:a,scroll:s}){let o=!1;const c=Fe(w,n,e,t,s??null);r!==void 0&&(c.navigation.delta=r),a!==void 0&&(c.navigation.event=a);const i={...c.navigation,cancel:()=>{o=!0,c.reject(new Error("navigation cancelled"))}};return ne||lt.forEach(l=>l(i)),o?null:c}async function Y({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:c=0,nav_token:i={},accept:l=Ke,block:u=Ke,event:d}){const p=F;F=i;const h=await me(t,!1),f=e==="enter"?Fe(w,h,t,e):mt({url:t,type:e,delta:n?.delta,intent:h,scroll:n?.scroll,event:d});if(!f){u(),F===i&&(F=p);return}const g=R,b=I;l(),ne=!0,ue&&f.navigation.type!=="enter"&&C.navigating.set(ee.current=f.navigation);let _=h&&await gt(h);if(!_){if(_e(t,U,A.hash))return await G(t,s);_=await wt(t,{id:null},await z(new Pe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=h?.url||t,F!==i)return f.reject(new Error("navigation aborted")),!1;if(_.type==="redirect"){if(c<20){await Y({type:e,url:new URL(_.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:c+1,nav_token:i}),f.fulfil(void 0);return}_=await ge({status:500,error:await z(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else _.props.page.status>=400&&await C.updated.check()&&(await ct(),await G(t,s));if(wn(),Oe(g),dt(b),_.props.page.url.pathname!==t.pathname&&(t.pathname=_.props.page.url.pathname),o=n?n.state:o,!n){const v=s?0:1,O={[q]:R+=v,[Q]:I+=v,[nt]:o};(s?history.replaceState:history.pushState).call(history,O,"",t),s||gn(R,I)}const T=h&&L?.id===h.id?L.fork:null;L=null,_.props.page.state=o;let m;if(ue){const v=(await Promise.all(Array.from(mn,K=>K(f.navigation)))).filter(K=>typeof K=="function");if(v.length>0){let K=function(){v.forEach(we=>{J.delete(we)})};v.push(K),v.forEach(we=>{J.add(we)})}const O=f.navigation.to;w={..._.state,nav:{params:O.params,route:O.route,url:O.url}},_.props.page&&(_.props.page.url=t);const $=T&&await T;$?m=$.commit():(W=null,ut.$set(_.props),W&&Object.assign(_.props.page,W),un(_.props.page),m=At?.()),ft=!0}else await _t(_,Se,!1);const{activeElement:y}=document;await m,await oe(),await oe();let E=null;if(We){const v=n?n.scroll:a?M():null;v?scrollTo(v.x,v.y):(E=t.hash&&document.getElementById(bt(t)))?E.scrollIntoView():scrollTo(0,0)}const k=document.activeElement!==y&&document.activeElement!==document.body;!r&&!k&&Tn(t,!E),We=!0,_.props.page&&(W&&Object.assign(_.props.page,W),Object.assign(S,_.props.page)),ne=!1,e==="popstate"&&ht(I),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=M()),J.forEach(v=>v(f.navigation)),C.navigating.set(ee.current=null)}async function wt(e,t,n,r,a){return e.origin===re&&e.pathname===location.pathname&&!Ce?await ge({status:r,error:n,url:e,route:t}):await G(e,a)}function Rn(){let e,t={element:void 0,href:void 0},n;x.addEventListener("mousemove",c=>{const i=c.target;clearTimeout(e),e=setTimeout(()=>{s(i,B.hover)},20)});function r(c){c.defaultPrevented||s(c.composedPath()[0],B.tap)}x.addEventListener("mousedown",r),x.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(c=>{for(const i of c)i.isIntersecting&&(Ae(new URL(i.target.href)),a.unobserve(i.target))},{threshold:0});async function s(c,i){const l=at(c,x),u=l===t.element&&l?.href===t.href&&i>=n;if(!l||u)return;const{url:d,external:p,download:h}=Ee(l,U,A.hash);if(p||h)return;const f=se(l),g=d&&he(w.url)===he(d);if(!(f.reload||g))if(i<=f.preload_data){t={element:l,href:l.href},n=B.tap;const b=await me(d,!1);if(!b)return;yn(b)}else i<=f.preload_code&&(t={element:l,href:l.href},n=i,Ae(d))}function o(){a.disconnect();for(const c of x.querySelectorAll("a")){const{url:i,external:l,download:u}=Ee(c,U,A.hash);if(l||u)continue;const d=se(c);d.reload||(d.preload_code===B.viewport&&a.observe(c),d.preload_code===B.eager&&Ae(i))}}J.add(o),o()}function z(e,t){if(e instanceof pe)return e.body;const n=ie(e),r=ln(e);return A.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Dn(e,t={}){return e=new URL(Ne(e)),e.origin!==re?Promise.reject(new Error("goto: invalid URL")):pt(e,t,0)}function Sn(e){if(typeof e=="function")le.push(e);else{const{href:t}=new URL(e,location.href);le.push(n=>n.href===t)}}function In(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Xe(),!ne){const r=Fe(w,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};lt.forEach(s=>s(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Xe()}),navigator.connection?.saveData||Rn(),x.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=at(t.composedPath()[0],x);if(!n)return;const{url:r,external:a,target:s,download:o}=Ee(n,U,A.hash);if(!r)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const c=se(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[l,u]=(A.hash?r.hash.replace(/^#/,""):r.href).split("#"),d=l===ye(location);if(a||c.reload&&(!d||!u)){mt({url:r,type:"link",event:t})?ne=!0:t.preventDefault();return}if(u!==void 0&&d){const[,p]=w.url.href.split("#");if(p===u){if(t.preventDefault(),u===""||u==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=n.ownerDocument.getElementById(decodeURIComponent(u));h&&(h.scrollIntoView(),h.focus())}return}if(H=!0,Oe(R),e(r),!c.replace_state)return;H=!1}t.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await Y({type:"link",url:r,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??r.href===location.href,event:t})}),x.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const o=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(_e(o,U,!1))return;const c=t.target,i=se(c);if(i.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(c,r);o.search=new URLSearchParams(l).toString(),Y({type:"form",url:o,keepfocus:i.keepfocus,noscroll:i.noscroll,replace_state:i.replace_state??o.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Ue){if(t.state?.[q]){const n=t.state[q];if(F={},n===R)return;const r=D[n],a=t.state[nt]??{},s=new URL(t.state[Ft]??location.href),o=t.state[Q],c=w.url?ye(location)===ye(w.url):!1;if(o===I&&(ft||c)){a!==S.state&&(S.state=a),e(s),D[R]=M(),r&&scrollTo(r.x,r.y),R=n;return}const l=n-R;await Y({type:"popstate",url:s,popped:{state:a,scroll:r,delta:l},accept:()=>{R=n,I=o},block:()=>{history.go(-l)},nav_token:F,event:t})}else if(!H){const n=new URL(location.href);e(n),A.hash&&location.reload()}}}),addEventListener("hashchange",()=>{H&&(H=!1,history.replaceState({...history.state,[q]:++R,[Q]:I},"",location.href))});for(const t of document.querySelectorAll("link"))_n.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&C.navigating.set(ee.current=null)});function e(t){w.url=S.url=t,C.page.set(Me(S)),C.page.notify()}}async function Un(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:c,form:i}){Ce=!0;const l=new URL(location.href);let u;({params:a={},route:s={id:null}}=await me(l,!1)||{}),u=xe.find(({id:h})=>h===s.id);let d,p=!0;try{const h=r.map(async(g,b)=>{const _=c[b];return _?.uses&&(_.uses=vt(_.uses)),$e({loader:A.nodes[g],url:l,params:a,route:s,parent:async()=>{const T={};for(let m=0;m<b;m+=1)Object.assign(T,(await h[m]).data);return T},server_data_node:Be(_)})}),f=await Promise.all(h);if(u){const g=u.layouts;for(let b=0;b<g.length;b++)g[b]||f.splice(b,0,void 0)}d=await de({url:l,params:a,branch:f,status:t,error:n,errors:u?.errors,form:i,route:u??null})}catch(h){if(h instanceof Le){await G(new URL(h.location,location.href));return}d=await ge({status:ie(h),error:await z(h,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",p=!1}d.props.page&&(d.props.page.state={}),await _t(d,e,p)}async function yt(e,t){const n=new URL(e);n.pathname=pn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(cn,"1"),n.searchParams.append(sn,t.map(s=>s?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let s;throw a.headers.get("content-type")?.includes("application/json")?s=await a.json():a.status===404?s="Not Found":a.status===500&&(s="Internal Error"),new pe(a.status,s)}return new Promise(async s=>{const o=new Map,c=a.body.getReader();function i(u){return rn(u,{...A.decoders,Promise:d=>new Promise((p,h)=>{o.set(d,{fulfil:p,reject:h})})})}let l="";for(;;){const{done:u,value:d}=await c.read();if(u&&!l)break;for(l+=!d&&l?`
2
+ `:It.decode(d,{stream:!0});;){const p=l.indexOf(`
3
+ `);if(p===-1)break;const h=JSON.parse(l.slice(0,p));if(l=l.slice(p+1),h.type==="redirect")return s(h);if(h.type==="data")h.nodes?.forEach(f=>{f?.type==="data"&&(f.uses=vt(f.uses),f.data=i(f.data))}),s(h);else if(h.type==="chunk"){const{id:f,data:g,error:b}=h,_=o.get(f);o.delete(f),b?_.reject(i(b)):_.fulfil(i(g))}}}})}function vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Ue=!1;function Tn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=bt(e);if(r&&document.getElementById(r)){const{x:s,y:o}=M();setTimeout(()=>{const c=history.state;Ue=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(c,"",e),t&&scrollTo(s,o),Ue=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const c=s[o],i=a.getRangeAt(o);if(c.commonAncestorContainer!==i.commonAncestorContainer||c.startContainer!==i.startContainer||c.endContainer!==i.endContainer||c.startOffset!==i.startOffset||c.endOffset!==i.endOffset)return}a.removeAllRanges()}})}}}function Fe(e,t,n,r,a=null){let s,o;const c=new Promise((l,u)=>{s=l,o=u});return c.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:M()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:c},fulfil:s,reject:o}}function Me(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function bt(e){let t;if(A.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Cn as a,Dn as g,jn as l,S as p,C as s};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.B-M6sgow.js","../chunks/Cg3dlX05.js","../chunks/DYuMZGL5.js","../chunks/DZvnhU_8.js","../assets/ColorPicker.CV4IKef4.css","../chunks/BFXEYMV8.js","../chunks/DfKeHoAm.js","../chunks/Bn-6X1BO.js","../chunks/CG453M9q.js","../chunks/CSjf4fBs.js","../assets/0.BZLcOr5z.css","../nodes/1.C8aY7Yn3.js","../chunks/DZQMsHM5.js","../assets/1.B_AnTlN1.css","../nodes/2.YJZruh1H.js","../chunks/BRqaaL5D.js","../chunks/xs1Xl3_e.js","../chunks/gQJcRhou.js","../chunks/BDcFu3l7.js","../chunks/BLszSzTT.js","../chunks/C_9BZILB.js","../chunks/CRkG7oE4.js","../chunks/pRcLbE0d.js","../chunks/C5VOyQCG.js","../assets/2.DjiwkLqE.css","../nodes/3.VV-tRemY.js","../assets/3.DHxQoulp.css","../nodes/4.BSVqdrrD.js","../chunks/DzuS5Nbr.js","../assets/4.D4EDSN4H.css","../nodes/5.Cfj35gpY.js","../assets/5.C5qz-NeI.css","../nodes/6.CDJA8Na9.js","../chunks/CmtInjm0.js","../assets/6.DzV0p3l-.css","../nodes/7.BX9znBYU.js","../chunks/Pw0jDB7M.js","../assets/ChatView.Bnlg-oAF.css","../assets/7.CEbRAOOf.css","../nodes/8.CmdrNdfj.js","../assets/8.BhoBXADL.css","../nodes/9.BSleOtKF.js","../chunks/PPVm8Dsz.js","../assets/9.v5KA95xm.css"])))=>i.map(i=>d[i]);
2
- import{_}from"../chunks/PPVm8Dsz.js";import{j as V,Q as H,f as Q,R as U,S as W,T as X,m as q,l as j,U as z,n as J,b,V as K,g as u,W as Z,X as $,Y as tt,p as et,E as rt,F as at,v as st,P as ot,A as R,d as nt,w as it,s as O,c as ct,r as _t,t as ut,x as p}from"../chunks/DYuMZGL5.js";import{B as mt,k as dt,m as lt,u as ft,p as T,i as A,a as v,j as x,f as k,g as D,t as ht,s as vt}from"../chunks/Cg3dlX05.js";function I(s,t,a){var n;V&&(n=J,H());var o=new mt(s);Q(()=>{var e=t()??null;if(V){var r=W(n),c=r===z,P=e!==null;if(c!==P){var g=X();q(g),o.anchor=g,j(!1),o.ensure(e,e&&(f=>a(f,e))),j(!0);return}}o.ensure(e,e&&(f=>a(f,e)))},U)}function gt(s){return class extends Et{constructor(t){super({component:s,...t})}}}class Et{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=tt(r,!1,!1);return a.set(e,c),c};const o=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===K?!0:(u(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return b(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?dt:lt)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Z(),this.#e=o.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||$(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(o,e)},this.#t.$destroy=()=>{ft(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...o)=>a.call(this,...o);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}const xt={};var yt=k('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Rt=k("<!> <!>",1);function bt(s,t){et(t,!0);let a=T(t,"components",23,()=>[]),n=T(t,"data_0",3,null),o=T(t,"data_1",3,null);rt(()=>t.stores.page.set(t.page)),at(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),o(),t.stores.page.notify()});let e=O(!1),r=O(!1),c=O(null);st(()=>{const i=t.stores.page.subscribe(()=>{u(e)&&(b(r,!0),ot().then(()=>{b(c,document.title||"untitled page",!0)}))});return b(e,!0),i});const P=p(()=>t.constructors[1]);var g=Rt(),f=R(g);{var S=i=>{const m=p(()=>t.constructors[0]);var d=x(),E=R(d);I(E,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(y,Ot)=>{var L=x(),N=R(L);I(N,()=>u(P),(Y,B)=>{D(B(Y,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),G=>a()[1]=G,()=>a()?.[1])}),v(y,L)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)},C=i=>{const m=p(()=>t.constructors[0]);var d=x(),E=R(d);I(E,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)};A(f,i=>{t.constructors[1]?i(S):i(C,-1)})}var F=nt(f,2);{var M=i=>{var m=yt(),d=ct(m);{var E=l=>{var h=ht();ut(()=>vt(h,u(c))),v(l,h)};A(d,l=>{u(r)&&l(E)})}_t(m),v(i,m)};A(F,i=>{u(e)&&i(M)})}v(s,g),it()}const Dt=gt(bt),It=[()=>_(()=>import("../nodes/0.B-M6sgow.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),()=>_(()=>import("../nodes/1.C8aY7Yn3.js"),__vite__mapDeps([11,1,2,12,5,6,3,4,13]),import.meta.url),()=>_(()=>import("../nodes/2.YJZruh1H.js"),__vite__mapDeps([14,1,2,3,4,12,5,7,15,8,16,17,18,19,20,21,22,23,24]),import.meta.url),()=>_(()=>import("../nodes/3.VV-tRemY.js"),__vite__mapDeps([25,1,2,12,5,3,4,17,18,19,20,21,22,26]),import.meta.url),()=>_(()=>import("../nodes/4.BSVqdrrD.js"),__vite__mapDeps([27,1,2,3,4,12,28,17,18,22,29]),import.meta.url),()=>_(()=>import("../nodes/5.Cfj35gpY.js"),__vite__mapDeps([30,1,2,3,4,21,17,18,22,31]),import.meta.url),()=>_(()=>import("../nodes/6.CDJA8Na9.js"),__vite__mapDeps([32,1,2,3,4,12,5,33,28,7,15,16,17,18,19,23,34]),import.meta.url),()=>_(()=>import("../nodes/7.BX9znBYU.js"),__vite__mapDeps([35,1,2,12,3,4,33,5,16,18,36,20,37,38]),import.meta.url),()=>_(()=>import("../nodes/8.CmdrNdfj.js"),__vite__mapDeps([39,1,2,3,4,12,5,15,8,9,16,17,18,23,40]),import.meta.url),()=>_(()=>import("../nodes/9.BSleOtKF.js"),__vite__mapDeps([41,42,1,2,12,3,4,5,6,28,36,18,20,37,23,43]),import.meta.url)],Lt=[0],Vt={"/":[-3],"/activity":[-4],"/config":[-5],"/neurolink":[-6],"/project":[6],"/session/[id]":[7],"/terminals":[8],"/terminals/[id]":[9]},w={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},Pt=Object.fromEntries(Object.entries(w.transport).map(([s,t])=>[s,t.decode])),jt=Object.fromEntries(Object.entries(w.transport).map(([s,t])=>[s,t.encode])),kt=!1,wt=(s,t)=>Pt[s](t);export{wt as decode,Pt as decoders,Vt as dictionary,jt as encoders,kt as hash,w as hooks,xt as matchers,It as nodes,Dt as root,Lt as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.-0SstbRm.js","../chunks/Cg3dlX05.js","../chunks/DYuMZGL5.js","../chunks/DZvnhU_8.js","../assets/ColorPicker.CV4IKef4.css","../chunks/DlSs5Yra.js","../chunks/DfsJh23H.js","../chunks/Bn-6X1BO.js","../chunks/CG453M9q.js","../chunks/CSjf4fBs.js","../assets/0.BZLcOr5z.css","../nodes/1.BVLzPogE.js","../chunks/DZQMsHM5.js","../assets/1.B_AnTlN1.css","../nodes/2.CiUyTQg5.js","../chunks/BRqaaL5D.js","../chunks/xs1Xl3_e.js","../chunks/gQJcRhou.js","../chunks/BDcFu3l7.js","../chunks/BLszSzTT.js","../chunks/C_9BZILB.js","../chunks/CRkG7oE4.js","../chunks/pRcLbE0d.js","../chunks/C5VOyQCG.js","../assets/2.DjiwkLqE.css","../nodes/3.C9vlOBU0.js","../assets/3.DHxQoulp.css","../nodes/4.BSVqdrrD.js","../chunks/DzuS5Nbr.js","../assets/4.D4EDSN4H.css","../nodes/5.Cfj35gpY.js","../assets/5.C5qz-NeI.css","../nodes/6.BSsUBbIT.js","../chunks/DTGtOxE1.js","../assets/6.DzV0p3l-.css","../nodes/7.BIQq9Yuz.js","../chunks/Pw0jDB7M.js","../assets/ChatView.Bnlg-oAF.css","../assets/7.CEbRAOOf.css","../nodes/8.BU_sJ5_M.js","../assets/8.BhoBXADL.css","../nodes/9.C1vJI771.js","../chunks/PPVm8Dsz.js","../assets/9.v5KA95xm.css"])))=>i.map(i=>d[i]);
2
+ import{_}from"../chunks/PPVm8Dsz.js";import{j as V,Q as H,f as Q,R as U,S as W,T as X,m as q,l as j,U as z,n as J,b,V as K,g as u,W as Z,X as $,Y as tt,p as et,E as rt,F as at,v as st,P as ot,A as R,d as nt,w as it,s as O,c as ct,r as _t,t as ut,x as p}from"../chunks/DYuMZGL5.js";import{B as mt,k as dt,m as lt,u as ft,p as T,i as A,a as v,j as x,f as k,g as D,t as ht,s as vt}from"../chunks/Cg3dlX05.js";function I(s,t,a){var n;V&&(n=J,H());var o=new mt(s);Q(()=>{var e=t()??null;if(V){var r=W(n),c=r===z,P=e!==null;if(c!==P){var g=X();q(g),o.anchor=g,j(!1),o.ensure(e,e&&(f=>a(f,e))),j(!0);return}}o.ensure(e,e&&(f=>a(f,e)))},U)}function gt(s){return class extends Et{constructor(t){super({component:s,...t})}}}class Et{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=tt(r,!1,!1);return a.set(e,c),c};const o=new Proxy({...t.props||{},$$events:{}},{get(e,r){return u(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===K?!0:(u(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return b(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?dt:lt)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Z(),this.#e=o.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||$(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(o,e)},this.#t.$destroy=()=>{ft(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...o)=>a.call(this,...o);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(o=>o!==n)}}$destroy(){this.#t.$destroy()}}const xt={};var yt=k('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Rt=k("<!> <!>",1);function bt(s,t){et(t,!0);let a=T(t,"components",23,()=>[]),n=T(t,"data_0",3,null),o=T(t,"data_1",3,null);rt(()=>t.stores.page.set(t.page)),at(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),o(),t.stores.page.notify()});let e=O(!1),r=O(!1),c=O(null);st(()=>{const i=t.stores.page.subscribe(()=>{u(e)&&(b(r,!0),ot().then(()=>{b(c,document.title||"untitled page",!0)}))});return b(e,!0),i});const P=p(()=>t.constructors[1]);var g=Rt(),f=R(g);{var S=i=>{const m=p(()=>t.constructors[0]);var d=x(),E=R(d);I(E,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(y,Ot)=>{var L=x(),N=R(L);I(N,()=>u(P),(Y,B)=>{D(B(Y,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),G=>a()[1]=G,()=>a()?.[1])}),v(y,L)},$$slots:{default:!0}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)},C=i=>{const m=p(()=>t.constructors[0]);var d=x(),E=R(d);I(E,()=>u(m),(l,h)=>{D(h(l,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),y=>a()[0]=y,()=>a()?.[0])}),v(i,d)};A(f,i=>{t.constructors[1]?i(S):i(C,-1)})}var F=nt(f,2);{var M=i=>{var m=yt(),d=ct(m);{var E=l=>{var h=ht();ut(()=>vt(h,u(c))),v(l,h)};A(d,l=>{u(r)&&l(E)})}_t(m),v(i,m)};A(F,i=>{u(e)&&i(M)})}v(s,g),it()}const Dt=gt(bt),It=[()=>_(()=>import("../nodes/0.-0SstbRm.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url),()=>_(()=>import("../nodes/1.BVLzPogE.js"),__vite__mapDeps([11,1,2,12,5,6,3,4,13]),import.meta.url),()=>_(()=>import("../nodes/2.CiUyTQg5.js"),__vite__mapDeps([14,1,2,3,4,12,5,7,15,8,16,17,18,19,20,21,22,23,24]),import.meta.url),()=>_(()=>import("../nodes/3.C9vlOBU0.js"),__vite__mapDeps([25,1,2,12,5,3,4,17,18,19,20,21,22,26]),import.meta.url),()=>_(()=>import("../nodes/4.BSVqdrrD.js"),__vite__mapDeps([27,1,2,3,4,12,28,17,18,22,29]),import.meta.url),()=>_(()=>import("../nodes/5.Cfj35gpY.js"),__vite__mapDeps([30,1,2,3,4,21,17,18,22,31]),import.meta.url),()=>_(()=>import("../nodes/6.BSsUBbIT.js"),__vite__mapDeps([32,1,2,3,4,12,5,33,28,7,15,16,17,18,19,23,34]),import.meta.url),()=>_(()=>import("../nodes/7.BIQq9Yuz.js"),__vite__mapDeps([35,1,2,12,3,4,33,5,16,18,36,20,37,38]),import.meta.url),()=>_(()=>import("../nodes/8.BU_sJ5_M.js"),__vite__mapDeps([39,1,2,3,4,12,5,15,8,9,16,17,18,23,40]),import.meta.url),()=>_(()=>import("../nodes/9.C1vJI771.js"),__vite__mapDeps([41,42,1,2,12,3,4,5,6,28,36,18,20,37,23,43]),import.meta.url)],Lt=[0],Vt={"/":[-3],"/activity":[-4],"/config":[-5],"/neurolink":[-6],"/project":[6],"/session/[id]":[7],"/terminals":[8],"/terminals/[id]":[9]},w={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},Pt=Object.fromEntries(Object.entries(w.transport).map(([s,t])=>[s,t.decode])),jt=Object.fromEntries(Object.entries(w.transport).map(([s,t])=>[s,t.encode])),kt=!1,wt=(s,t)=>Pt[s](t);export{wt as decode,Pt as decoders,Vt as dictionary,jt as encoders,kt as hash,w as hooks,xt as matchers,It as nodes,Dt as root,Lt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/DlSs5Yra.js";export{o as load_css,r as start};
@@ -0,0 +1,2 @@
1
+ )�import{l as o,a as r}from"../chunks/DlSs5Yra.js";export{o as load_css,r as start};
2
+