screenreader-speech-capture 0.8.2 → 0.9.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 (177) hide show
  1. package/README.md +8 -2
  2. package/dist/cli.mjs +984 -278
  3. package/dist/ui/adapter-node.js +1 -1
  4. package/dist/ui/client/ui/_app/immutable/chunks/{CM9WugkD.js → 0YgL1EU2.js} +36 -36
  5. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.br +0 -0
  6. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.gz +0 -0
  7. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js +1 -0
  8. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.br +2 -0
  9. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.gz +0 -0
  10. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js +3 -0
  11. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.br +0 -0
  12. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.gz +0 -0
  13. package/dist/ui/client/ui/_app/immutable/chunks/CSCPyqWx.js +1 -0
  14. package/dist/ui/client/ui/_app/immutable/chunks/CSCPyqWx.js.br +3 -0
  15. package/dist/ui/client/ui/_app/immutable/chunks/CSCPyqWx.js.gz +0 -0
  16. package/dist/ui/client/ui/_app/immutable/chunks/{Fimt9aTv.js → Cba3ZwaX.js} +11 -11
  17. package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.br +0 -0
  18. package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.gz +0 -0
  19. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js +3 -0
  20. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.br +0 -0
  21. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.gz +0 -0
  22. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js +1 -0
  23. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.br +0 -0
  24. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.gz +0 -0
  25. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js +1 -0
  26. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.br +1 -0
  27. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.gz +0 -0
  28. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js +4 -0
  29. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.br +0 -0
  30. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.gz +0 -0
  31. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js +2 -0
  32. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.br +0 -0
  33. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.gz +0 -0
  34. package/dist/ui/client/ui/_app/immutable/entry/{start.uodUAHNT.js → start.Dluk7nQO.js} +2 -2
  35. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.br +0 -0
  36. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.gz +0 -0
  37. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js +1 -0
  38. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.br +0 -0
  39. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.gz +0 -0
  40. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js +1 -0
  41. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.br +1 -0
  42. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.gz +0 -0
  43. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js +52 -0
  44. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.br +0 -0
  45. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.gz +0 -0
  46. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js +5 -0
  47. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.br +0 -0
  48. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.gz +0 -0
  49. package/dist/ui/client/ui/_app/immutable/nodes/{4.DY8qq4Io.js → 4.CMHCNMDn.js} +1 -1
  50. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.br +0 -0
  51. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.gz +0 -0
  52. package/dist/ui/client/ui/_app/version.json +1 -1
  53. package/dist/ui/client/ui/_app/version.json.br +0 -0
  54. package/dist/ui/client/ui/_app/version.json.gz +0 -0
  55. package/dist/ui/server/.vite/manifest.json +97 -54
  56. package/dist/ui/server/chunks/composition.js +112 -118
  57. package/dist/ui/server/chunks/composition.js.map +1 -1
  58. package/dist/ui/server/chunks/config.js +139 -3
  59. package/dist/ui/server/chunks/config.js.map +1 -1
  60. package/dist/ui/server/chunks/exports.js +19 -204
  61. package/dist/ui/server/chunks/exports.js.map +1 -1
  62. package/dist/ui/server/chunks/functions.js +1 -1
  63. package/dist/ui/server/chunks/icon-button.js +1 -1
  64. package/dist/ui/server/chunks/instance.js +9 -56
  65. package/dist/ui/server/chunks/instance.js.map +1 -1
  66. package/dist/ui/server/chunks/internal.js +55 -4
  67. package/dist/ui/server/chunks/internal.js.map +1 -1
  68. package/dist/ui/server/chunks/outlined-text-field.js +1 -1
  69. package/dist/ui/server/chunks/remote-1j2tn2d.js +4 -0
  70. package/dist/ui/server/chunks/remote.js +1565 -0
  71. package/dist/ui/server/chunks/remote.js.map +1 -0
  72. package/dist/ui/server/chunks/scope.js +13 -0
  73. package/dist/ui/server/chunks/scope.js.map +1 -0
  74. package/dist/ui/server/chunks/server-errors.js +48 -1
  75. package/dist/ui/server/chunks/server-errors.js.map +1 -1
  76. package/dist/ui/server/chunks/server2.js +24 -1
  77. package/dist/ui/server/chunks/server2.js.map +1 -1
  78. package/dist/ui/server/chunks/sessions.js +65 -0
  79. package/dist/ui/server/chunks/sessions.js.map +1 -0
  80. package/dist/ui/server/chunks/sessions.remote.js +56 -0
  81. package/dist/ui/server/chunks/sessions.remote.js.map +1 -0
  82. package/dist/ui/server/chunks/shared-errors.js +214 -0
  83. package/dist/ui/server/chunks/shared-errors.js.map +1 -0
  84. package/dist/ui/server/chunks/src.js +123 -44
  85. package/dist/ui/server/chunks/src.js.map +1 -1
  86. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +3 -5
  87. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -1
  88. package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +3 -4
  89. package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js.map +1 -1
  90. package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js +12 -0
  91. package/dist/ui/server/entries/endpoints/api/sessions/_id_id_/_server.ts.js.map +1 -0
  92. package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js +4 -9
  93. package/dist/ui/server/entries/endpoints/api/sessions/_server.ts.js.map +1 -1
  94. package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js +2 -3
  95. package/dist/ui/server/entries/endpoints/api/sessions/end/_server.ts.js.map +1 -1
  96. package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +6 -9
  97. package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js.map +1 -1
  98. package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js +3 -3
  99. package/dist/ui/server/entries/endpoints/api/speech/stream/_server.ts.js.map +1 -1
  100. package/dist/ui/server/entries/endpoints/api/status/_server.ts.js +2 -3
  101. package/dist/ui/server/entries/endpoints/api/status/_server.ts.js.map +1 -1
  102. package/dist/ui/server/entries/fallbacks/error.svelte.js +1 -1
  103. package/dist/ui/server/entries/hooks.server.js +145 -1
  104. package/dist/ui/server/entries/hooks.server.js.map +1 -1
  105. package/dist/ui/server/entries/pages/_layout.server.ts.js +2 -3
  106. package/dist/ui/server/entries/pages/_layout.server.ts.js.map +1 -1
  107. package/dist/ui/server/entries/pages/_layout.svelte.js +4 -2
  108. package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
  109. package/dist/ui/server/entries/pages/_page.server.ts.js +3 -3
  110. package/dist/ui/server/entries/pages/_page.server.ts.js.map +1 -1
  111. package/dist/ui/server/entries/pages/_page.svelte.js +8 -62
  112. package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
  113. package/dist/ui/server/entries/pages/settings/_page.svelte.js +3 -2
  114. package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
  115. package/dist/ui/server/entries/params.js +60 -0
  116. package/dist/ui/server/entries/params.js.map +1 -0
  117. package/dist/ui/server/env.js +1 -1
  118. package/dist/ui/server/index.js +2 -2
  119. package/dist/ui/server/manifest-full.js +7 -6
  120. package/dist/ui/server/manifest.js +7 -6
  121. package/dist/ui/server/nodes/0.js +1 -1
  122. package/dist/ui/server/nodes/1.js +1 -1
  123. package/dist/ui/server/nodes/2.js +1 -1
  124. package/dist/ui/server/nodes/3.js +1 -1
  125. package/dist/ui/server/nodes/4.js +1 -1
  126. package/dist/ui/server/remote-entry.js +1 -1565
  127. package/dist/ui/server/server.js +7 -6
  128. package/package.json +3 -2
  129. package/dist/ui/client/ui/_app/immutable/chunks/C67ohLw_.js +0 -1
  130. package/dist/ui/client/ui/_app/immutable/chunks/C67ohLw_.js.br +0 -3
  131. package/dist/ui/client/ui/_app/immutable/chunks/C67ohLw_.js.gz +0 -0
  132. package/dist/ui/client/ui/_app/immutable/chunks/CKeiBgOI.js +0 -1
  133. package/dist/ui/client/ui/_app/immutable/chunks/CKeiBgOI.js.br +0 -1
  134. package/dist/ui/client/ui/_app/immutable/chunks/CKeiBgOI.js.gz +0 -0
  135. package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js.br +0 -0
  136. package/dist/ui/client/ui/_app/immutable/chunks/CM9WugkD.js.gz +0 -0
  137. package/dist/ui/client/ui/_app/immutable/chunks/CVUOwNb5.js +0 -3
  138. package/dist/ui/client/ui/_app/immutable/chunks/CVUOwNb5.js.br +0 -0
  139. package/dist/ui/client/ui/_app/immutable/chunks/CVUOwNb5.js.gz +0 -0
  140. package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js +0 -4
  141. package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js.br +0 -0
  142. package/dist/ui/client/ui/_app/immutable/chunks/CXrPUR7p.js.gz +0 -0
  143. package/dist/ui/client/ui/_app/immutable/chunks/Dksil5Gu.js +0 -1
  144. package/dist/ui/client/ui/_app/immutable/chunks/Dksil5Gu.js.br +0 -0
  145. package/dist/ui/client/ui/_app/immutable/chunks/Dksil5Gu.js.gz +0 -0
  146. package/dist/ui/client/ui/_app/immutable/chunks/DnL0kOQY.js +0 -1
  147. package/dist/ui/client/ui/_app/immutable/chunks/DnL0kOQY.js.br +0 -2
  148. package/dist/ui/client/ui/_app/immutable/chunks/DnL0kOQY.js.gz +0 -0
  149. package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js.br +0 -0
  150. package/dist/ui/client/ui/_app/immutable/chunks/Fimt9aTv.js.gz +0 -0
  151. package/dist/ui/client/ui/_app/immutable/chunks/h7UQ89-l.js +0 -3
  152. package/dist/ui/client/ui/_app/immutable/chunks/h7UQ89-l.js.br +0 -0
  153. package/dist/ui/client/ui/_app/immutable/chunks/h7UQ89-l.js.gz +0 -0
  154. package/dist/ui/client/ui/_app/immutable/entry/app.BQe0vf14.js +0 -2
  155. package/dist/ui/client/ui/_app/immutable/entry/app.BQe0vf14.js.br +0 -0
  156. package/dist/ui/client/ui/_app/immutable/entry/app.BQe0vf14.js.gz +0 -0
  157. package/dist/ui/client/ui/_app/immutable/entry/start.uodUAHNT.js.br +0 -0
  158. package/dist/ui/client/ui/_app/immutable/entry/start.uodUAHNT.js.gz +0 -0
  159. package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js +0 -1
  160. package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js.br +0 -0
  161. package/dist/ui/client/ui/_app/immutable/nodes/0.kO9a4iA1.js.gz +0 -0
  162. package/dist/ui/client/ui/_app/immutable/nodes/1.jZ-iBVjE.js +0 -1
  163. package/dist/ui/client/ui/_app/immutable/nodes/1.jZ-iBVjE.js.br +0 -2
  164. package/dist/ui/client/ui/_app/immutable/nodes/1.jZ-iBVjE.js.gz +0 -0
  165. package/dist/ui/client/ui/_app/immutable/nodes/2.CWoJ2uhd.js +0 -52
  166. package/dist/ui/client/ui/_app/immutable/nodes/2.CWoJ2uhd.js.br +0 -0
  167. package/dist/ui/client/ui/_app/immutable/nodes/2.CWoJ2uhd.js.gz +0 -0
  168. package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js +0 -5
  169. package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js.br +0 -0
  170. package/dist/ui/client/ui/_app/immutable/nodes/3.DcigOv3T.js.gz +0 -0
  171. package/dist/ui/client/ui/_app/immutable/nodes/4.DY8qq4Io.js.br +0 -0
  172. package/dist/ui/client/ui/_app/immutable/nodes/4.DY8qq4Io.js.gz +0 -0
  173. package/dist/ui/server/chunks/bridge-api.js +0 -105
  174. package/dist/ui/server/chunks/bridge-api.js.map +0 -1
  175. package/dist/ui/server/entries/endpoints/api/sessions/_id_/_server.ts.js +0 -13
  176. package/dist/ui/server/entries/endpoints/api/sessions/_id_/_server.ts.js.map +0 -1
  177. package/dist/ui/server/remote-entry.js.map +0 -1
@@ -0,0 +1,65 @@
1
+ // src/lib/core/sessions.ts
2
+ /** `4 s`, `3 min 12 s`, `1 h 05 min`. Never negative (the bridge's clock may run ahead). */
3
+ function formatDuration(milliseconds) {
4
+ const total = Math.max(0, Math.floor(milliseconds / 1e3));
5
+ const hours = Math.floor(total / 3600);
6
+ const minutes = Math.floor(total % 3600 / 60);
7
+ const seconds = total % 60;
8
+ if (hours > 0) return `${hours} h ${String(minutes).padStart(2, "0")} min`;
9
+ if (minutes > 0) return `${minutes} min ${seconds} s`;
10
+ return `${seconds} s`;
11
+ }
12
+ /** What a row shows under the name. `now` (epoch ms) is the end of a session that is still live. */
13
+ function describeSession(session, now) {
14
+ const duration = formatDuration((session.endedAt === null ? now : Date.parse(session.endedAt)) - Date.parse(session.startedAt));
15
+ const live = session.endedAt === null;
16
+ const entries = `${session.entries} ${session.entries === 1 ? "entry" : "entries"}`;
17
+ const parts = [
18
+ `Session ${session.id}`,
19
+ live ? "live" : null,
20
+ session.run === null ? null : `run ${session.run}`,
21
+ duration,
22
+ entries
23
+ ];
24
+ return {
25
+ id: `#${session.id}`,
26
+ run: session.run,
27
+ duration,
28
+ entries,
29
+ spoken: parts.filter((part) => part !== null).join(", ")
30
+ };
31
+ }
32
+ /** The URL value that selects the speech outside any session (the bridge's `session=none`). */
33
+ var OUTSIDE_SESSIONS = "none";
34
+ /** A session id as the bridge hands them out: a positive whole number, in decimal, no leading zero. */
35
+ var SESSION_ID = /^[1-9]\d*$/;
36
+ /** A session id (`'7'`) or `none`, as a URL spells it; `null` for anything else. */
37
+ function parseScope(value) {
38
+ if (value === "none") return OUTSIDE_SESSIONS;
39
+ if (!SESSION_ID.test(value)) return null;
40
+ const id = Number(value);
41
+ return Number.isSafeInteger(id) ? id : null;
42
+ }
43
+ /**
44
+ * The scope a pane shows: `none` if the URL asks for it, the session named in the URL if it still
45
+ * exists, otherwise the current one (following), otherwise the speech outside any session.
46
+ */
47
+ function selectedScope(requested, sessions, currentId) {
48
+ const scope = requested === null ? null : parseScope(requested);
49
+ if (scope === "none") return OUTSIDE_SESSIONS;
50
+ if (scope !== null && sessions.some((session) => session.id === scope)) return scope;
51
+ return currentId ?? "none";
52
+ }
53
+ /**
54
+ * The session to show once `deletedId` is gone: the next older one, else the next newer one
55
+ * (`sessions` is newest first), else `null`, which the page resolves to the current session or the
56
+ * speech outside any session (`selectedScope`).
57
+ */
58
+ function scopeAfterDelete(deletedId, sessions) {
59
+ const at = sessions.findIndex((session) => session.id === deletedId);
60
+ if (at === -1) return null;
61
+ return (sessions[at + 1] ?? sessions[at - 1])?.id ?? null;
62
+ }
63
+ export { selectedScope as a, scopeAfterDelete as i, describeSession as n, parseScope as r, OUTSIDE_SESSIONS as t };
64
+
65
+ //# sourceMappingURL=sessions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions.js","names":[],"sources":["../../../src/lib/core/sessions.ts"],"sourcesContent":["import type {\n SessionDto,\n SessionListDto,\n StartSessionResponseDto,\n} from '@screenreader-speech-capture/shared';\n\n/** Where the sessions come from and go to (the HTTP adapter asks the BFF, which asks the bridge). */\nexport interface SessionsApi {\n list(): Promise<SessionListDto>;\n start(name: string, run: string | null): Promise<StartSessionResponseDto>;\n /** Ends the current session; does nothing if none is current. */\n end(): Promise<void>;\n /** Deletes an ended session and its speech. Rejects with the bridge's message. */\n delete(id: number): Promise<void>;\n}\n\n/** `4 s`, `3 min 12 s`, `1 h 05 min`. Never negative (the bridge's clock may run ahead). */\nexport function formatDuration(milliseconds: number): string {\n const total = Math.max(0, Math.floor(milliseconds / 1000));\n const hours = Math.floor(total / 3600);\n const minutes = Math.floor((total % 3600) / 60);\n const seconds = total % 60;\n if (hours > 0) return `${hours} h ${String(minutes).padStart(2, '0')} min`;\n if (minutes > 0) return `${minutes} min ${seconds} s`;\n return `${seconds} s`;\n}\n\nexport type SessionMeta = {\n /** `#7` */\n id: string;\n run: string | null;\n duration: string;\n /** `4 entries`, `1 entry` */\n entries: string;\n /** The same facts as a sentence, for the screen reader. */\n spoken: string;\n};\n\n/** What a row shows under the name. `now` (epoch ms) is the end of a session that is still live. */\nexport function describeSession(session: SessionDto, now: number): SessionMeta {\n const end = session.endedAt === null ? now : Date.parse(session.endedAt);\n const duration = formatDuration(end - Date.parse(session.startedAt));\n const live = session.endedAt === null;\n const entries = `${session.entries} ${session.entries === 1 ? 'entry' : 'entries'}`;\n const parts = [\n `Session ${session.id}`,\n live ? 'live' : null,\n session.run === null ? null : `run ${session.run}`,\n duration,\n entries,\n ];\n return {\n id: `#${session.id}`,\n run: session.run,\n duration,\n entries,\n spoken: parts.filter((part) => part !== null).join(', '),\n };\n}\n\n/** What the log shows: a session by id, or `'none'` for the speech outside any session. */\nexport type SessionScope = number | 'none';\n\n/** The URL value that selects the speech outside any session (the bridge's `session=none`). */\nexport const OUTSIDE_SESSIONS = 'none';\n\n/** A session id as the bridge hands them out: a positive whole number, in decimal, no leading zero. */\nconst SESSION_ID = /^[1-9]\\d*$/;\n\n/** A session id (`'7'`) or `none`, as a URL spells it; `null` for anything else. */\nexport function parseScope(value: string): SessionScope | null {\n if (value === OUTSIDE_SESSIONS) return OUTSIDE_SESSIONS;\n if (!SESSION_ID.test(value)) return null;\n const id = Number(value);\n return Number.isSafeInteger(id) ? id : null;\n}\n\n/**\n * The scope a pane shows: `none` if the URL asks for it, the session named in the URL if it still\n * exists, otherwise the current one (following), otherwise the speech outside any session.\n */\nexport function selectedScope(\n requested: string | null,\n sessions: SessionDto[],\n currentId: number | null,\n): SessionScope {\n const scope = requested === null ? null : parseScope(requested);\n if (scope === OUTSIDE_SESSIONS) return OUTSIDE_SESSIONS;\n if (scope !== null && sessions.some((session) => session.id === scope)) return scope;\n return currentId ?? OUTSIDE_SESSIONS;\n}\n\n/**\n * The session to show once `deletedId` is gone: the next older one, else the next newer one\n * (`sessions` is newest first), else `null`, which the page resolves to the current session or the\n * speech outside any session (`selectedScope`).\n */\nexport function scopeAfterDelete(deletedId: number, sessions: SessionDto[]): number | null {\n const at = sessions.findIndex((session) => session.id === deletedId);\n if (at === -1) return null;\n return (sessions[at + 1] ?? sessions[at - 1])?.id ?? null;\n}\n"],"mappings":";;AAiBA,SAAgB,eAAe,cAA8B;CAC3D,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,eAAe,GAAI,CAAC;CACzD,MAAM,QAAQ,KAAK,MAAM,QAAQ,IAAI;CACrC,MAAM,UAAU,KAAK,MAAO,QAAQ,OAAQ,EAAE;CAC9C,MAAM,UAAU,QAAQ;CACxB,IAAI,QAAQ,GAAG,OAAO,GAAG,MAAM,KAAK,OAAO,OAAO,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE;CACrE,IAAI,UAAU,GAAG,OAAO,GAAG,QAAQ,OAAO,QAAQ;CAClD,OAAO,GAAG,QAAQ;AACpB;;AAcA,SAAgB,gBAAgB,SAAqB,KAA0B;CAE7E,MAAM,WAAW,gBADL,QAAQ,YAAY,OAAO,MAAM,KAAK,MAAM,QAAQ,OAAO,KACjC,KAAK,MAAM,QAAQ,SAAS,CAAC;CACnE,MAAM,OAAO,QAAQ,YAAY;CACjC,MAAM,UAAU,GAAG,QAAQ,QAAQ,GAAG,QAAQ,YAAY,IAAI,UAAU;CACxE,MAAM,QAAQ;EACZ,WAAW,QAAQ;EACnB,OAAO,SAAS;EAChB,QAAQ,QAAQ,OAAO,OAAO,OAAO,QAAQ;EAC7C;EACA;CACF;CACA,OAAO;EACL,IAAI,IAAI,QAAQ;EAChB,KAAK,QAAQ;EACb;EACA;EACA,QAAQ,MAAM,QAAQ,SAAS,SAAS,IAAI,CAAC,CAAC,KAAK,IAAI;CACzD;AACF;;AAMA,IAAa,mBAAmB;;AAGhC,IAAM,aAAa;;AAGnB,SAAgB,WAAW,OAAoC;CAC7D,IAAI,UAAA,QAA4B,OAAO;CACvC,IAAI,CAAC,WAAW,KAAK,KAAK,GAAG,OAAO;CACpC,MAAM,KAAK,OAAO,KAAK;CACvB,OAAO,OAAO,cAAc,EAAE,IAAI,KAAK;AACzC;;;;;AAMA,SAAgB,cACd,WACA,UACA,WACc;CACd,MAAM,QAAQ,cAAc,OAAO,OAAO,WAAW,SAAS;CAC9D,IAAI,UAAA,QAA4B,OAAO;CACvC,IAAI,UAAU,QAAQ,SAAS,MAAM,YAAY,QAAQ,OAAO,KAAK,GAAG,OAAO;CAC/E,OAAO,aAAA;AACT;;;;;;AAOA,SAAgB,iBAAiB,WAAmB,UAAuC;CACzF,MAAM,KAAK,SAAS,WAAW,YAAY,QAAQ,OAAO,SAAS;CACnE,IAAI,OAAO,IAAI,OAAO;CACtB,QAAQ,SAAS,KAAK,MAAM,SAAS,KAAK,GAAA,EAAK,MAAM;AACvD"}
@@ -0,0 +1,56 @@
1
+ import "./internal.js";
2
+ import { g as getRequestEvent } from "./exports.js";
3
+ import { I as remote_module_default_export, L as remote_module_invalid_export } from "./server-errors.js";
4
+ import { n as query } from "./remote.js";
5
+ // \0rolldown/runtime.js
6
+ var __defProp = Object.defineProperty;
7
+ var __exportAll = (all, no_symbols) => {
8
+ let target = {};
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
14
+ return target;
15
+ };
16
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/exports/internal/server/remote-functions.js
17
+ /** @import { RemoteInternals } from 'types' */
18
+ /** @type {RemoteInternals['type'][]} */
19
+ var types = [
20
+ "command",
21
+ "form",
22
+ "prerender",
23
+ "query",
24
+ "query_batch",
25
+ "query_live"
26
+ ];
27
+ /**
28
+ * @param {Record<string, any>} module
29
+ * @param {string} file
30
+ * @param {string} hash
31
+ * @param {{ file: string}=} dev_decoration
32
+ */
33
+ function init_remote_functions(module, file, hash, dev_decoration) {
34
+ if (module.default) remote_module_default_export({ file });
35
+ for (const [name, fn] of Object.entries(module)) {
36
+ if (!types.includes(fn?.__?.type)) remote_module_invalid_export({
37
+ name,
38
+ file
39
+ });
40
+ fn.__.id = `${hash}/${name}`;
41
+ fn.__.name = name;
42
+ fn.__.file = file;
43
+ }
44
+ }
45
+ // src/lib/remote/sessions.remote.ts
46
+ var sessions_remote_exports = /* @__PURE__ */ __exportAll({ getSessions: () => getSessions });
47
+ /**
48
+ * The sessions list (`GET /api/v1/sessions`). The monitor page's load awaits it, so its answer is
49
+ * in the server's HTML and the browser's first `getSessions()` needs no request; the browser then
50
+ * re-reads it with `refresh()` (`HttpSessionsApi.list`).
51
+ */
52
+ var getSessions = /* @__PURE__ */ query(() => getRequestEvent().locals.bridge.sessions());
53
+ init_remote_functions(sessions_remote_exports, "src/lib/remote/sessions.remote.ts", "1j2tn2d");
54
+ export { sessions_remote_exports as n, getSessions as t };
55
+
56
+ //# sourceMappingURL=sessions.remote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sessions.remote.js","names":[],"sources":["../../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/exports/internal/server/remote-functions.js","../../../src/lib/remote/sessions.remote.ts"],"sourcesContent":["/** @import { RemoteInternals } from 'types' */\nimport * as e from '../../../messages/server-errors.js';\nimport { DEV } from 'esm-env';\n\n/** @type {RemoteInternals['type'][]} */\nconst types = ['command', 'form', 'prerender', 'query', 'query_batch', 'query_live'];\n\n/**\n * @param {Record<string, any>} module\n * @param {string} file\n * @param {string} hash\n * @param {{ file: string}=} dev_decoration\n */\nexport function init_remote_functions(module, file, hash, dev_decoration) {\n\tif (module.default) {\n\t\te.remote_module_default_export({ file });\n\t}\n\n\tfor (const [name, fn] of Object.entries(module)) {\n\t\tif (!types.includes(fn?.__?.type)) {\n\t\t\te.remote_module_invalid_export({ name, file });\n\t\t}\n\n\t\tfn.__.id = `${hash}/${name}`;\n\t\tfn.__.name = name;\n\t\tfn.__.file = file;\n\t\tif (DEV && dev_decoration) {\n\t\t\tfn.__.dev_loc = {\n\t\t\t\t...dev_decoration,\n\t\t\t\t...fn.__.dev_loc\n\t\t\t};\n\t\t}\n\t}\n}\n","import { getRequestEvent, query } from '$app/server';\n\n/**\n * The sessions list (`GET /api/v1/sessions`). The monitor page's load awaits it, so its answer is\n * in the server's HTML and the browser's first `getSessions()` needs no request; the browser then\n * re-reads it with `refresh()` (`HttpSessionsApi.list`).\n */\nexport const getSessions = query(() => getRequestEvent().locals.bridge.sessions());\n"],"ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;AAKA,IAAM,QAAQ;CAAC;CAAW;CAAQ;CAAa;CAAS;CAAe;AAAY;;;;;;;AAQnF,SAAgB,sBAAsB,QAAQ,MAAM,MAAM,gBAAgB;CACzE,IAAI,OAAO,SACV,6BAA+B,EAAE,KAAK,CAAC;CAGxC,KAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,MAAM,GAAG;EAChD,IAAI,CAAC,MAAM,SAAS,IAAI,IAAI,IAAI,GAC/B,6BAA+B;GAAE;GAAM;EAAK,CAAC;EAG9C,GAAG,GAAG,KAAK,GAAG,KAAK,GAAG;EACtB,GAAG,GAAG,OAAO;EACb,GAAG,GAAG,OAAO;CAOd;AACD;;;;;;;;AC1BA,IAAa,cAAc,4BAAY,gBAAgB,CAAC,CAAC,OAAO,OAAO,SAAS,CAAC"}
@@ -0,0 +1,214 @@
1
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/internal/shared.js
2
+ /**
3
+ * Whether shared errors include their full text on the server even though `DEV` is false. This is
4
+ * enabled while the app is being built (analysed or prerendered)
5
+ */
6
+ var verbose = false;
7
+ function enable_verbose_errors() {
8
+ verbose = true;
9
+ }
10
+ /**
11
+ * @typedef {{ element?: Element }} ClientWarningOptions
12
+ * - `element`: logged after the warning, so that it can be inspected in the browser's devtools
13
+ */
14
+ /** `console.warn` styles for the code and text of shared runtime warnings, as in Svelte */
15
+ var bold = "font-weight: bold";
16
+ var normal = "font-weight: normal";
17
+ /**
18
+ * Throws the full diagnostic. Generated helpers throw their URL-only production error inline, so
19
+ * bundlers can remove both this call and the message text from production browser builds
20
+ * @param {string} code
21
+ * @param {string} message
22
+ * @param {Function} caller The generated helper, which is omitted from the stack along with this function
23
+ * @returns {never}
24
+ */
25
+ function throw_error(code, message, caller) {
26
+ const error = /* @__PURE__ */ new Error(`${code}\n${message}\nhttps://svelte.dev/e/kit/${code}`);
27
+ error.name = "SvelteKit error";
28
+ Error.captureStackTrace?.(error, caller);
29
+ throw error;
30
+ }
31
+ // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/shared-errors.js
32
+ /**
33
+ * Invalid array key `%key%`
34
+ * @param {{ "key": string }} _values
35
+ * @returns {never}
36
+ */
37
+ function form_field_array_conflict(_values) {
38
+ if (verbose) throw_error("form_field_array_conflict", `Invalid array key \`${_values.key}\``, form_field_array_conflict);
39
+ throw new Error("https://svelte.dev/e/kit/form_field_array_conflict");
40
+ }
41
+ /**
42
+ * Form cannot contain duplicated keys — `%name%` has %count% values
43
+ * @param {{ "name": string; "count": string }} _values
44
+ * @returns {never}
45
+ */
46
+ function form_field_duplicate(_values) {
47
+ if (verbose) throw_error("form_field_duplicate", `Form cannot contain duplicated keys — \`${_values.name}\` has ${_values.count} values`, form_field_duplicate);
48
+ throw new Error("https://svelte.dev/e/kit/form_field_duplicate");
49
+ }
50
+ /**
51
+ * Invalid key `%key%`: This key is not allowed to prevent prototype pollution.
52
+ * @param {{ "key": string }} _values
53
+ * @returns {never}
54
+ */
55
+ function form_field_forbidden_key(_values) {
56
+ if (verbose) throw_error("form_field_forbidden_key", `Invalid key \`${_values.key}\`: This key is not allowed to prevent prototype pollution.`, form_field_forbidden_key);
57
+ throw new Error("https://svelte.dev/e/kit/form_field_forbidden_key");
58
+ }
59
+ /**
60
+ * Invalid field name `%name%`: field names are written in JS object notation, so keys that would need quoting are not supported. See https://svelte.dev/docs/kit/remote-functions#form-Fields
61
+ * @param {{ "name": string }} _values
62
+ * @returns {never}
63
+ */
64
+ function form_field_invalid_name(_values) {
65
+ if (verbose) throw_error("form_field_invalid_name", `Invalid field name \`${_values.name}\`: field names are written in JS object notation, so keys that would need quoting are not supported. See https://svelte.dev/docs/kit/remote-functions#form-Fields`, form_field_invalid_name);
66
+ throw new Error("https://svelte.dev/e/kit/form_field_invalid_name");
67
+ }
68
+ /**
69
+ * Form contained a field that wasn't created with `form.fields.as(...)`: `%name%`
70
+ * @param {{ "name": string }} _values
71
+ * @returns {never}
72
+ */
73
+ function form_field_unbound(_values) {
74
+ if (verbose) throw_error("form_field_unbound", `Form contained a field that wasn't created with \`form.fields.as(...)\`: \`${_values.name}\``, form_field_unbound);
75
+ throw new Error("https://svelte.dev/e/kit/form_field_unbound");
76
+ }
77
+ /**
78
+ * %type% inputs must have a value
79
+ * @param {{ "type": string }} _values
80
+ * @returns {never}
81
+ */
82
+ function form_input_missing_value(_values) {
83
+ if (verbose) throw_error("form_input_missing_value", `${_values.type} inputs must have a value`, form_input_missing_value);
84
+ throw new Error("https://svelte.dev/e/kit/form_input_missing_value");
85
+ }
86
+ /**
87
+ * HTTP error status codes must be between 400 and 599 — %status% is invalid
88
+ * @param {{ "status": string }} _values
89
+ * @returns {never}
90
+ */
91
+ function invalid_error_status(_values) {
92
+ if (verbose) throw_error("invalid_error_status", `HTTP error status codes must be between 400 and 599 — ${_values.status} is invalid`, invalid_error_status);
93
+ throw new Error("https://svelte.dev/e/kit/invalid_error_status");
94
+ }
95
+ /**
96
+ * Invalid export `%key%` (valid exports are %exports%, or anything with a `'_'` prefix)
97
+ * @param {{ "key": string; "exports": string; "file"?: string }} _values
98
+ * @returns {never}
99
+ */
100
+ function invalid_export(_values) {
101
+ if (verbose) throw_error("invalid_export", _values?.file !== void 0 ? `Invalid export \`${_values.key}\` in \`${_values.file}\` (valid exports are ${_values.exports}, or anything with a \`'_'\` prefix)` : `Invalid export \`${_values.key}\` (valid exports are ${_values.exports}, or anything with a \`'_'\` prefix)`, invalid_export);
102
+ throw new Error("https://svelte.dev/e/kit/invalid_export");
103
+ }
104
+ /**
105
+ * Invalid export `%key%` (`%key%` is a valid export in %locations%)
106
+ * @param {{ "key": string; "locations": string; "file"?: string }} _values
107
+ * @returns {never}
108
+ */
109
+ function invalid_export_location(_values) {
110
+ if (verbose) throw_error("invalid_export_location", _values?.file !== void 0 ? `Invalid export \`${_values.key}\` in \`${_values.file}\` (\`${_values.key}\` is a valid export in ${_values.locations})` : `Invalid export \`${_values.key}\` (\`${_values.key}\` is a valid export in ${_values.locations})`, invalid_export_location);
111
+ throw new Error("https://svelte.dev/e/kit/invalid_export_location");
112
+ }
113
+ /**
114
+ * a `load` function %location% returned %type%, but must return a plain object at the top level (i.e. `return {...}`)
115
+ * @param {{ "location": string; "type": string }} _values
116
+ * @returns {never}
117
+ */
118
+ function load_invalid_response(_values) {
119
+ if (verbose) throw_error("load_invalid_response", `a \`load\` function ${_values.location} returned ${_values.type}, but must return a plain object at the top level (i.e. \`return {...}\`)`, load_invalid_response);
120
+ throw new Error("https://svelte.dev/e/kit/load_invalid_response");
121
+ }
122
+ /**
123
+ * Invalid param definition
124
+ * @param {void} _values
125
+ * @returns {never}
126
+ */
127
+ function param_definition_invalid(_values) {
128
+ if (verbose) throw_error("param_definition_invalid", `Invalid param definition`, param_definition_invalid);
129
+ throw new Error("https://svelte.dev/e/kit/param_definition_invalid");
130
+ }
131
+ /**
132
+ * Async param matchers are not supported
133
+ * @param {void} _values
134
+ * @returns {never}
135
+ */
136
+ function param_matcher_async(_values) {
137
+ if (verbose) throw_error("param_matcher_async", `Async param matchers are not supported`, param_matcher_async);
138
+ throw new Error("https://svelte.dev/e/kit/param_matcher_async");
139
+ }
140
+ /**
141
+ * Param matcher must return a string, number, boolean, or bigint
142
+ * @param {void} _values
143
+ * @returns {never}
144
+ */
145
+ function param_matcher_result_invalid(_values) {
146
+ if (verbose) throw_error("param_matcher_result_invalid", `Param matcher must return a string, number, boolean, or bigint`, param_matcher_result_invalid);
147
+ throw new Error("https://svelte.dev/e/kit/param_matcher_result_invalid");
148
+ }
149
+ /**
150
+ * %type% are not valid remote function arguments
151
+ * @param {{ "type": string }} _values
152
+ * @returns {never}
153
+ */
154
+ function remote_argument_unsupported(_values) {
155
+ if (verbose) throw_error("remote_argument_unsupported", `${_values.type} are not valid remote function arguments`, remote_argument_unsupported);
156
+ throw new Error("https://svelte.dev/e/kit/remote_argument_unsupported");
157
+ }
158
+ /**
159
+ * Missing params for dynamic route ID `%id%`
160
+ * @param {{ "id": string }} _values
161
+ * @returns {never}
162
+ */
163
+ function resolve_params_missing(_values) {
164
+ if (verbose) throw_error("resolve_params_missing", `Missing params for dynamic route ID \`${_values.id}\``, resolve_params_missing);
165
+ throw new Error("https://svelte.dev/e/kit/resolve_params_missing");
166
+ }
167
+ /**
168
+ * Cannot use `resolve(...)` with an absolute or protocol-relative URL (got "%id%")
169
+ * @param {{ "id": string }} _values
170
+ * @returns {never}
171
+ */
172
+ function resolve_url_input(_values) {
173
+ if (verbose) throw_error("resolve_url_input", `Cannot use \`resolve(...)\` with an absolute or protocol-relative URL (got "${_values.id}")`, resolve_url_input);
174
+ throw new Error("https://svelte.dev/e/kit/resolve_url_input");
175
+ }
176
+ /**
177
+ * Missing parameter `%name%` in route `%id%`
178
+ * @param {{ "name": string; "id": string }} _values
179
+ * @returns {never}
180
+ */
181
+ function route_param_missing(_values) {
182
+ if (verbose) throw_error("route_param_missing", `Missing parameter \`${_values.name}\` in route \`${_values.id}\``, route_param_missing);
183
+ throw new Error("https://svelte.dev/e/kit/route_param_missing");
184
+ }
185
+ /**
186
+ * Parameter `%name%` in route `%id%` cannot start or end with a slash — this would cause an invalid route like `foo/bar`
187
+ * @param {{ "name": string; "id": string }} _values
188
+ * @returns {never}
189
+ */
190
+ function route_param_slash(_values) {
191
+ if (verbose) throw_error("route_param_slash", `Parameter \`${_values.name}\` in route \`${_values.id}\` cannot start or end with a slash — this would cause an invalid route like \`foo/bar\``, route_param_slash);
192
+ throw new Error("https://svelte.dev/e/kit/route_param_slash");
193
+ }
194
+ /**
195
+ * Parameter `%name%` in route `%id%` must be a string, number, boolean, or bigint
196
+ * @param {{ "name": string; "id": string }} _values
197
+ * @returns {never}
198
+ */
199
+ function route_param_value_invalid(_values) {
200
+ if (verbose) throw_error("route_param_value_invalid", `Parameter \`${_values.name}\` in route \`${_values.id}\` must be a string, number, boolean, or bigint`, route_param_value_invalid);
201
+ throw new Error("https://svelte.dev/e/kit/route_param_value_invalid");
202
+ }
203
+ /**
204
+ * Cannot access `event.url.hash`. Consider using `page.url.hash` inside a component instead
205
+ * @param {void} _values
206
+ * @returns {never}
207
+ */
208
+ function url_hash_unavailable(_values) {
209
+ if (verbose) throw_error("url_hash_unavailable", `Cannot access \`event.url.hash\`. Consider using \`page.url.hash\` inside a component instead`, url_hash_unavailable);
210
+ throw new Error("https://svelte.dev/e/kit/url_hash_unavailable");
211
+ }
212
+ export { normal as C, enable_verbose_errors as S, route_param_missing as _, form_field_unbound as a, url_hash_unavailable as b, invalid_export as c, param_definition_invalid as d, param_matcher_async as f, resolve_url_input as g, resolve_params_missing as h, form_field_invalid_name as i, invalid_export_location as l, remote_argument_unsupported as m, form_field_duplicate as n, form_input_missing_value as o, param_matcher_result_invalid as p, form_field_forbidden_key as r, invalid_error_status as s, form_field_array_conflict as t, load_invalid_response as u, route_param_slash as v, bold as x, route_param_value_invalid as y };
213
+
214
+ //# sourceMappingURL=shared-errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-errors.js","names":[],"sources":["../../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/internal/shared.js","../../../../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/messages/shared-errors.js"],"sourcesContent":["/**\n * Whether shared errors include their full text on the server even though `DEV` is false. This is\n * enabled while the app is being built (analysed or prerendered)\n */\nexport let verbose = false;\n\nexport function enable_verbose_errors() {\n\tverbose = true;\n}\n\n/**\n * @typedef {{ element?: Element }} ClientWarningOptions\n * - `element`: logged after the warning, so that it can be inspected in the browser's devtools\n */\n\n/** `console.warn` styles for the code and text of shared runtime warnings, as in Svelte */\nexport const bold = 'font-weight: bold';\nexport const normal = 'font-weight: normal';\n\n/**\n * Throws the full diagnostic. Generated helpers throw their URL-only production error inline, so\n * bundlers can remove both this call and the message text from production browser builds\n * @param {string} code\n * @param {string} message\n * @param {Function} caller The generated helper, which is omitted from the stack along with this function\n * @returns {never}\n */\nexport function throw_error(code, message, caller) {\n\tconst error = new Error(`${code}\\n${message}\\nhttps://svelte.dev/e/kit/${code}`);\n\terror.name = 'SvelteKit error';\n\n\t// not available in every browser, in which case the stack also includes these two frames\n\tError.captureStackTrace?.(error, caller);\n\n\tthrow error;\n}\n\n/**\n * Returns the error thrown by `fn`, for the few places that pass an error on (for example to\n * `handleError`) rather than throwing it. Unlike `capture_error` in `./server.js`, this can be\n * bundled for browsers, so the thrown error only contains the URL in production\n * @param {() => never} fn A function that calls a generated `client-errors` or `shared-errors` helper\n * @returns {Error}\n */\nexport function capture_error(fn) {\n\ttry {\n\t\tfn();\n\t} catch (error) {\n\t\treturn /** @type {Error} */ (error);\n\t}\n}\n","/* This file is generated by scripts/process-messages/index.js. Do not edit! */\n\nimport { BROWSER, DEV } from 'esm-env';\nimport { throw_error, verbose } from './internal/shared.js';\n\n/**\n * `$app/stores` has been removed in favour of `$app/state`\n * @param {void} _values\n * @returns {never}\n */\nexport function app_stores_removed(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('app_stores_removed', `\\`$app/stores\\` has been removed in favour of \\`$app/state\\``, app_stores_removed);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/app_stores_removed');\n}\n\n/**\n * Invalid array key `%key%`\n * @param {{ \"key\": string }} _values\n * @returns {never}\n */\nexport function form_field_array_conflict(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('form_field_array_conflict', `Invalid array key \\`${_values.key}\\``, form_field_array_conflict);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/form_field_array_conflict');\n}\n\n/**\n * Form cannot contain duplicated keys — `%name%` has %count% values\n * @param {{ \"name\": string; \"count\": string }} _values\n * @returns {never}\n */\nexport function form_field_duplicate(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('form_field_duplicate', `Form cannot contain duplicated keys — \\`${_values.name}\\` has ${_values.count} values`, form_field_duplicate);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/form_field_duplicate');\n}\n\n/**\n * Invalid key `%key%`: This key is not allowed to prevent prototype pollution.\n * @param {{ \"key\": string }} _values\n * @returns {never}\n */\nexport function form_field_forbidden_key(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('form_field_forbidden_key', `Invalid key \\`${_values.key}\\`: This key is not allowed to prevent prototype pollution.`, form_field_forbidden_key);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/form_field_forbidden_key');\n}\n\n/**\n * Invalid field name `%name%`: field names are written in JS object notation, so keys that would need quoting are not supported. See https://svelte.dev/docs/kit/remote-functions#form-Fields\n * @param {{ \"name\": string }} _values\n * @returns {never}\n */\nexport function form_field_invalid_name(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('form_field_invalid_name', `Invalid field name \\`${_values.name}\\`: field names are written in JS object notation, so keys that would need quoting are not supported. See https://svelte.dev/docs/kit/remote-functions#form-Fields`, form_field_invalid_name);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/form_field_invalid_name');\n}\n\n/**\n * Form contained a field that wasn't created with `form.fields.as(...)`: `%name%`\n * @param {{ \"name\": string }} _values\n * @returns {never}\n */\nexport function form_field_unbound(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('form_field_unbound', `Form contained a field that wasn't created with \\`form.fields.as(...)\\`: \\`${_values.name}\\``, form_field_unbound);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/form_field_unbound');\n}\n\n/**\n * %type% inputs must have a value\n * @param {{ \"type\": string }} _values\n * @returns {never}\n */\nexport function form_input_missing_value(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('form_input_missing_value', `${_values.type} inputs must have a value`, form_input_missing_value);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/form_input_missing_value');\n}\n\n/**\n * HTTP error status codes must be between 400 and 599 — %status% is invalid\n * @param {{ \"status\": string }} _values\n * @returns {never}\n */\nexport function invalid_error_status(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('invalid_error_status', `HTTP error status codes must be between 400 and 599 — ${_values.status} is invalid`, invalid_error_status);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/invalid_error_status');\n}\n\n/**\n * Invalid export `%key%` (valid exports are %exports%, or anything with a `'_'` prefix)\n * @param {{ \"key\": string; \"exports\": string; \"file\"?: string }} _values\n * @returns {never}\n */\nexport function invalid_export(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('invalid_export', (_values?.file !== undefined ? `Invalid export \\`${_values.key}\\` in \\`${_values.file}\\` (valid exports are ${_values.exports}, or anything with a \\`'_'\\` prefix)` : `Invalid export \\`${_values.key}\\` (valid exports are ${_values.exports}, or anything with a \\`'_'\\` prefix)`), invalid_export);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/invalid_export');\n}\n\n/**\n * Invalid export `%key%` (`%key%` is a valid export in %locations%)\n * @param {{ \"key\": string; \"locations\": string; \"file\"?: string }} _values\n * @returns {never}\n */\nexport function invalid_export_location(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('invalid_export_location', (_values?.file !== undefined ? `Invalid export \\`${_values.key}\\` in \\`${_values.file}\\` (\\`${_values.key}\\` is a valid export in ${_values.locations})` : `Invalid export \\`${_values.key}\\` (\\`${_values.key}\\` is a valid export in ${_values.locations})`), invalid_export_location);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/invalid_export_location');\n}\n\n/**\n * Redirect status codes must be between 300 and 308 — %status% is invalid\n * @param {{ \"status\": string }} _values\n * @returns {never}\n */\nexport function invalid_redirect_status(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('invalid_redirect_status', `Redirect status codes must be between 300 and 308 — ${_values.status} is invalid`, invalid_redirect_status);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/invalid_redirect_status');\n}\n\n/**\n * a `load` function %location% returned %type%, but must return a plain object at the top level (i.e. `return {...}`)\n * @param {{ \"location\": string; \"type\": string }} _values\n * @returns {never}\n */\nexport function load_invalid_response(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('load_invalid_response', `a \\`load\\` function ${_values.location} returned ${_values.type}, but must return a plain object at the top level (i.e. \\`return {...}\\`)`, load_invalid_response);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/load_invalid_response');\n}\n\n/**\n * Cannot use `match(...)` inside a service worker, as it depends on the SvelteKit client instance\n * @param {void} _values\n * @returns {never}\n */\nexport function match_in_service_worker(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('match_in_service_worker', `Cannot use \\`match(...)\\` inside a service worker, as it depends on the SvelteKit client instance`, match_in_service_worker);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/match_in_service_worker');\n}\n\n/**\n * Invalid param definition\n * @param {void} _values\n * @returns {never}\n */\nexport function param_definition_invalid(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('param_definition_invalid', `Invalid param definition`, param_definition_invalid);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/param_definition_invalid');\n}\n\n/**\n * Async param matchers are not supported\n * @param {void} _values\n * @returns {never}\n */\nexport function param_matcher_async(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('param_matcher_async', `Async param matchers are not supported`, param_matcher_async);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/param_matcher_async');\n}\n\n/**\n * Param matcher must return a string, number, boolean, or bigint\n * @param {void} _values\n * @returns {never}\n */\nexport function param_matcher_result_invalid(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('param_matcher_result_invalid', `Param matcher must return a string, number, boolean, or bigint`, param_matcher_result_invalid);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/param_matcher_result_invalid');\n}\n\n/**\n * Cannot redirect to `%location%` with `{ external: true }`. The `javascript:` and `data:` protocols must be explicitly listed in the `external` allowlist\n * @param {{ \"location\": string }} _values\n * @returns {never}\n */\nexport function redirect_external_javascript(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('redirect_external_javascript', `Cannot redirect to \\`${_values.location}\\` with \\`{ external: true }\\`. The \\`javascript:\\` and \\`data:\\` protocols must be explicitly listed in the \\`external\\` allowlist`, redirect_external_javascript);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/redirect_external_javascript');\n}\n\n/**\n * Cannot redirect to external URL `%location%`. To redirect to an external URL, pass `{ external: true }` or an allowlist of permitted origins as the third argument to `redirect`\n * @param {{ \"location\": string }} _values\n * @returns {never}\n */\nexport function redirect_external_not_allowed(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('redirect_external_not_allowed', `Cannot redirect to external URL \\`${_values.location}\\`. To redirect to an external URL, pass \\`{ external: true }\\` or an allowlist of permitted origins as the third argument to \\`redirect\\``, redirect_external_not_allowed);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/redirect_external_not_allowed');\n}\n\n/**\n * Cannot redirect to `%location%`: URL origin is not included in the `external` allowlist\n * @param {{ \"location\": string }} _values\n * @returns {never}\n */\nexport function redirect_external_not_in_allowlist(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('redirect_external_not_in_allowlist', `Cannot redirect to \\`${_values.location}\\`: URL origin is not included in the \\`external\\` allowlist`, redirect_external_not_in_allowlist);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/redirect_external_not_in_allowlist');\n}\n\n/**\n * `redirect` `options.external` must be `true` or an array of allowed origins\n * @param {void} _values\n * @returns {never}\n */\nexport function redirect_external_option_invalid(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('redirect_external_option_invalid', `\\`redirect\\` \\`options.external\\` must be \\`true\\` or an array of allowed origins`, redirect_external_option_invalid);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/redirect_external_option_invalid');\n}\n\n/**\n * %type% are not valid remote function arguments\n * @param {{ \"type\": string }} _values\n * @returns {never}\n */\nexport function remote_argument_unsupported(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('remote_argument_unsupported', `${_values.type} are not valid remote function arguments`, remote_argument_unsupported);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/remote_argument_unsupported');\n}\n\n/**\n * Missing params for dynamic route ID `%id%`\n * @param {{ \"id\": string }} _values\n * @returns {never}\n */\nexport function resolve_params_missing(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('resolve_params_missing', `Missing params for dynamic route ID \\`${_values.id}\\``, resolve_params_missing);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/resolve_params_missing');\n}\n\n/**\n * Cannot use `resolve(...)` with an absolute or protocol-relative URL (got \"%id%\")\n * @param {{ \"id\": string }} _values\n * @returns {never}\n */\nexport function resolve_url_input(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('resolve_url_input', `Cannot use \\`resolve(...)\\` with an absolute or protocol-relative URL (got \"${_values.id}\")`, resolve_url_input);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/resolve_url_input');\n}\n\n/**\n * Missing parameter `%name%` in route `%id%`\n * @param {{ \"name\": string; \"id\": string }} _values\n * @returns {never}\n */\nexport function route_param_missing(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('route_param_missing', `Missing parameter \\`${_values.name}\\` in route \\`${_values.id}\\``, route_param_missing);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/route_param_missing');\n}\n\n/**\n * Parameter `%name%` in route `%id%` cannot start or end with a slash — this would cause an invalid route like `foo/bar`\n * @param {{ \"name\": string; \"id\": string }} _values\n * @returns {never}\n */\nexport function route_param_slash(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('route_param_slash', `Parameter \\`${_values.name}\\` in route \\`${_values.id}\\` cannot start or end with a slash — this would cause an invalid route like \\`foo/bar\\``, route_param_slash);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/route_param_slash');\n}\n\n/**\n * Parameter `%name%` in route `%id%` must be a string, number, boolean, or bigint\n * @param {{ \"name\": string; \"id\": string }} _values\n * @returns {never}\n */\nexport function route_param_value_invalid(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('route_param_value_invalid', `Parameter \\`${_values.name}\\` in route \\`${_values.id}\\` must be a string, number, boolean, or bigint`, route_param_value_invalid);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/route_param_value_invalid');\n}\n\n/**\n * Page options are ignored when `router.type === 'hash'` (`%source%` has %options%)\n * @param {{ \"source\": string; \"options\": string }} _values\n * @returns {never}\n */\nexport function router_hash_page_options(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('router_hash_page_options', `Page options are ignored when \\`router.type === 'hash'\\` (\\`${_values.source}\\` has ${_values.options})`, router_hash_page_options);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/router_hash_page_options');\n}\n\n/**\n * The `$app/service-worker` module can only be imported into a service worker\n * @param {void} _values\n * @returns {never}\n */\nexport function service_worker_module_outside_worker(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('service_worker_module_outside_worker', `The \\`$app/service-worker\\` module can only be imported into a service worker`, service_worker_module_outside_worker);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/service_worker_module_outside_worker');\n}\n\n/**\n * Cannot access `event.url.hash`. Consider using `page.url.hash` inside a component instead\n * @param {void} _values\n * @returns {never}\n */\nexport function url_hash_unavailable(_values) {\n\tif (DEV || (!BROWSER && verbose)) {\n\t\tthrow_error('url_hash_unavailable', `Cannot access \\`event.url.hash\\`. Consider using \\`page.url.hash\\` inside a component instead`, url_hash_unavailable);\n\t}\n\n\tthrow new Error('https://svelte.dev/e/kit/url_hash_unavailable');\n}\n"],"ignoreList":[0,1],"mappings":";;;;;AAIA,IAAW,UAAU;AAErB,SAAgB,wBAAwB;CACvC,UAAU;AACX;;;;;;AAQA,IAAa,OAAO;AACpB,IAAa,SAAS;;;;;;;;;AAUtB,SAAgB,YAAY,MAAM,SAAS,QAAQ;CAClD,MAAM,wBAAQ,IAAI,MAAM,GAAG,KAAK,IAAI,QAAQ,6BAA6B,MAAM;CAC/E,MAAM,OAAO;CAGb,MAAM,oBAAoB,OAAO,MAAM;CAEvC,MAAM;AACP;;;;;;;ACZA,SAAgB,0BAA0B,SAAS;CAClD,IAAwB,SACvB,YAAY,6BAA6B,uBAAuB,QAAQ,IAAI,KAAK,yBAAyB;CAG3G,MAAM,IAAI,MAAM,oDAAoD;AACrE;;;;;;AAOA,SAAgB,qBAAqB,SAAS;CAC7C,IAAwB,SACvB,YAAY,wBAAwB,2CAA2C,QAAQ,KAAK,SAAS,QAAQ,MAAM,UAAU,oBAAoB;CAGlJ,MAAM,IAAI,MAAM,+CAA+C;AAChE;;;;;;AAOA,SAAgB,yBAAyB,SAAS;CACjD,IAAwB,SACvB,YAAY,4BAA4B,iBAAiB,QAAQ,IAAI,8DAA8D,wBAAwB;CAG5J,MAAM,IAAI,MAAM,mDAAmD;AACpE;;;;;;AAOA,SAAgB,wBAAwB,SAAS;CAChD,IAAwB,SACvB,YAAY,2BAA2B,wBAAwB,QAAQ,KAAK,qKAAqK,uBAAuB;CAGzQ,MAAM,IAAI,MAAM,kDAAkD;AACnE;;;;;;AAOA,SAAgB,mBAAmB,SAAS;CAC3C,IAAwB,SACvB,YAAY,sBAAsB,8EAA8E,QAAQ,KAAK,KAAK,kBAAkB;CAGrJ,MAAM,IAAI,MAAM,6CAA6C;AAC9D;;;;;;AAOA,SAAgB,yBAAyB,SAAS;CACjD,IAAwB,SACvB,YAAY,4BAA4B,GAAG,QAAQ,KAAK,4BAA4B,wBAAwB;CAG7G,MAAM,IAAI,MAAM,mDAAmD;AACpE;;;;;;AAOA,SAAgB,qBAAqB,SAAS;CAC7C,IAAwB,SACvB,YAAY,wBAAwB,yDAAyD,QAAQ,OAAO,cAAc,oBAAoB;CAG/I,MAAM,IAAI,MAAM,+CAA+C;AAChE;;;;;;AAOA,SAAgB,eAAe,SAAS;CACvC,IAAwB,SACvB,YAAY,kBAAmB,SAAS,SAAS,KAAA,IAAY,oBAAoB,QAAQ,IAAI,UAAU,QAAQ,KAAK,wBAAwB,QAAQ,QAAQ,wCAAwC,oBAAoB,QAAQ,IAAI,wBAAwB,QAAQ,QAAQ,uCAAwC,cAAc;CAGnU,MAAM,IAAI,MAAM,yCAAyC;AAC1D;;;;;;AAOA,SAAgB,wBAAwB,SAAS;CAChD,IAAwB,SACvB,YAAY,2BAA4B,SAAS,SAAS,KAAA,IAAY,oBAAoB,QAAQ,IAAI,UAAU,QAAQ,KAAK,QAAQ,QAAQ,IAAI,0BAA0B,QAAQ,UAAU,KAAK,oBAAoB,QAAQ,IAAI,QAAQ,QAAQ,IAAI,0BAA0B,QAAQ,UAAU,IAAK,uBAAuB;CAG/T,MAAM,IAAI,MAAM,kDAAkD;AACnE;;;;;;AAoBA,SAAgB,sBAAsB,SAAS;CAC9C,IAAwB,SACvB,YAAY,yBAAyB,uBAAuB,QAAQ,SAAS,YAAY,QAAQ,KAAK,4EAA4E,qBAAqB;CAGxM,MAAM,IAAI,MAAM,gDAAgD;AACjE;;;;;;AAoBA,SAAgB,yBAAyB,SAAS;CACjD,IAAwB,SACvB,YAAY,4BAA4B,4BAA4B,wBAAwB;CAG7F,MAAM,IAAI,MAAM,mDAAmD;AACpE;;;;;;AAOA,SAAgB,oBAAoB,SAAS;CAC5C,IAAwB,SACvB,YAAY,uBAAuB,0CAA0C,mBAAmB;CAGjG,MAAM,IAAI,MAAM,8CAA8C;AAC/D;;;;;;AAOA,SAAgB,6BAA6B,SAAS;CACrD,IAAwB,SACvB,YAAY,gCAAgC,kEAAkE,4BAA4B;CAG3I,MAAM,IAAI,MAAM,uDAAuD;AACxE;;;;;;AA2DA,SAAgB,4BAA4B,SAAS;CACpD,IAAwB,SACvB,YAAY,+BAA+B,GAAG,QAAQ,KAAK,2CAA2C,2BAA2B;CAGlI,MAAM,IAAI,MAAM,sDAAsD;AACvE;;;;;;AAOA,SAAgB,uBAAuB,SAAS;CAC/C,IAAwB,SACvB,YAAY,0BAA0B,yCAAyC,QAAQ,GAAG,KAAK,sBAAsB;CAGtH,MAAM,IAAI,MAAM,iDAAiD;AAClE;;;;;;AAOA,SAAgB,kBAAkB,SAAS;CAC1C,IAAwB,SACvB,YAAY,qBAAqB,+EAA+E,QAAQ,GAAG,KAAK,iBAAiB;CAGlJ,MAAM,IAAI,MAAM,4CAA4C;AAC7D;;;;;;AAOA,SAAgB,oBAAoB,SAAS;CAC5C,IAAwB,SACvB,YAAY,uBAAuB,uBAAuB,QAAQ,KAAK,gBAAgB,QAAQ,GAAG,KAAK,mBAAmB;CAG3H,MAAM,IAAI,MAAM,8CAA8C;AAC/D;;;;;;AAOA,SAAgB,kBAAkB,SAAS;CAC1C,IAAwB,SACvB,YAAY,qBAAqB,eAAe,QAAQ,KAAK,gBAAgB,QAAQ,GAAG,2FAA2F,iBAAiB;CAGrM,MAAM,IAAI,MAAM,4CAA4C;AAC7D;;;;;;AAOA,SAAgB,0BAA0B,SAAS;CAClD,IAAwB,SACvB,YAAY,6BAA6B,eAAe,QAAQ,KAAK,gBAAgB,QAAQ,GAAG,kDAAkD,yBAAyB;CAG5K,MAAM,IAAI,MAAM,oDAAoD;AACrE;;;;;;AAiCA,SAAgB,qBAAqB,SAAS;CAC7C,IAAwB,SACvB,YAAY,wBAAwB,iGAAiG,oBAAoB;CAG1J,MAAM,IAAI,MAAM,+CAA+C;AAChE"}
@@ -744,7 +744,38 @@ var API_LIMITS = {
744
744
  max: 1e4
745
745
  },
746
746
  /** Most chords in one request. */
747
- maxKeys: 100
747
+ maxKeys: 100,
748
+ /** Longest `title` of `POST /input/focus`. */
749
+ focusTitleLength: 200
750
+ },
751
+ /**
752
+ * `capture` of `POST /input/click` and `POST /input/keys` (and the client's `record()`, which
753
+ * uses the same defaults): the defaults and ranges in milliseconds.
754
+ */
755
+ capture: {
756
+ /** Silence that ends the capture. */
757
+ quietForMs: {
758
+ default: 500,
759
+ min: 1,
760
+ max: 6e4
761
+ },
762
+ /** How long the first speech may take after the input. */
763
+ firstWithinMs: {
764
+ default: 2e3,
765
+ max: 3e5
766
+ },
767
+ /** Longest capture, counted from the input. */
768
+ timeoutMs: {
769
+ default: 1e4,
770
+ max: 3e5
771
+ },
772
+ /** Silence to wait for before the input (0: none). */
773
+ settleMs: {
774
+ default: 0,
775
+ max: 6e4
776
+ },
777
+ /** Entries the answer holds at most: the first ones. */
778
+ entries: 1e4
748
779
  }
749
780
  };
750
781
  /** Ranges of the settings (`GET` / `PUT /config`). */
@@ -850,25 +881,93 @@ var ConfigPatchSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ strictObject({
850
881
  buffer: /* @__PURE__ */ optional(patchOf(sections.buffer)),
851
882
  log: /* @__PURE__ */ optional(patchOf(sections.log))
852
883
  }), /* @__PURE__ */ description("Any subset of `Config` (`PUT /config`). Settings left out keep their value; unknown ones are rejected. Ranges as in `Config`."));
884
+ // ../shared/src/speech.ts
885
+ var integer$2 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
886
+ var timestamp$2 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
887
+ var SpeechEntrySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
888
+ seq: /* @__PURE__ */ pipe(integer$2(1), /* @__PURE__ */ description("Increasing sequence number. Survives clear and keeps rising across restarts: the first entry of a bridge run gets the run's start time in milliseconds.")),
889
+ kind: /* @__PURE__ */ picklist(["speech", "marker"]),
890
+ text: /* @__PURE__ */ string(),
891
+ receivedAt: /* @__PURE__ */ pipe(timestamp$2, /* @__PURE__ */ description("When the bridge received the line (UTC).")),
892
+ source: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist(["tcp", "api"]), /* @__PURE__ */ description("`tcp` for speech, `api` for markers.")),
893
+ voice: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Header (`voice=<id>`) of the sending voice, `null` if not set or for markers.")),
894
+ connectionId: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$2(1)), /* @__PURE__ */ description("TCP connection that delivered it, `null` for markers.")),
895
+ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(integer$2(1))), /* @__PURE__ */ description("The session that was current, `null` outside any session. Added in API 1.3."))
896
+ }), /* @__PURE__ */ description("One recorded speech line or a marker."), /* @__PURE__ */ examples([{
897
+ seq: 42,
898
+ kind: "speech",
899
+ text: "Submit, button",
900
+ receivedAt: "2026-11-07T14:03:12.345Z",
901
+ source: "tcp",
902
+ voice: "ssc5000",
903
+ connectionId: 3,
904
+ sessionId: 7
905
+ }]));
906
+ var SpeechListSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
907
+ entries: /* @__PURE__ */ array(SpeechEntrySchema),
908
+ truncated: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when entries after `since` were dropped because the buffer was full.")),
909
+ hasMore: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when more entries follow: ask again with the last entry's `seq` as `since`."))
910
+ }), /* @__PURE__ */ description("`GET /speech`: a page of entries after `since`, oldest first."));
911
+ API_LIMITS.wait.seen, `${API_LIMITS.wait.seen}`;
912
+ var MarkerRequestSchema = /* @__PURE__ */ object({ label: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((label) => isTrimmedLabel(label, API_LIMITS.markerLength)), /* @__PURE__ */ description(`Marker text. Trimmed, must not be empty, at most ${API_LIMITS.markerLength} characters.`), /* @__PURE__ */ examples(["step 3"])) });
853
913
  // ../shared/src/input.ts
854
914
  var { coordinate, delayMs, maxKeys } = API_LIMITS.input;
915
+ var CAPTURE = API_LIMITS.capture;
916
+ CAPTURE.quietForMs.min, CAPTURE.quietForMs.max, `${CAPTURE.quietForMs.default}`, CAPTURE.firstWithinMs.max, `${CAPTURE.firstWithinMs.default}`, CAPTURE.timeoutMs.max, `${CAPTURE.timeoutMs.default}`, CAPTURE.settleMs.max;
917
+ CAPTURE.entries, `${CAPTURE.entries}`;
855
918
  -coordinate, -coordinate;
856
919
  `${maxKeys}`, delayMs.max, `${delayMs.default}`;
920
+ API_LIMITS.input.focusTitleLength;
921
+ // ../shared/src/key-chord.ts
922
+ /**
923
+ * The key names of `POST /input/keys` (docs/usage/native-input.md#key-names). The bridge parses
924
+ * chords with this rule, and the CLI checks them before sending and lists the names in `--help`,
925
+ * so both use this one copy. Like `text-match.ts`, it belongs to the contract, not to either side.
926
+ */
927
+ /** Keys that can be held down while another key is pressed. `Insert` and `CapsLock` are the screen reader keys. */
928
+ var MODIFIER_KEYS = [
929
+ "control",
930
+ "shift",
931
+ "alt",
932
+ "win",
933
+ "insert",
934
+ "capslock"
935
+ ];
936
+ /** Keys with a name, besides `a`–`z` and `0`–`9`. */
937
+ var NAMED_KEYS = [
938
+ "enter",
939
+ "tab",
940
+ "escape",
941
+ "space",
942
+ "backspace",
943
+ "delete",
944
+ "up",
945
+ "down",
946
+ "left",
947
+ "right",
948
+ "home",
949
+ "end",
950
+ "pageup",
951
+ "pagedown",
952
+ ...Array.from({ length: 12 }, (_, index) => `f${index + 1}`)
953
+ ];
954
+ [...MODIFIER_KEYS, ...NAMED_KEYS];
955
+ new Set(MODIFIER_KEYS);
857
956
  // ../shared/src/session.ts
858
- var integer$2 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
859
- var timestamp$2 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
957
+ var integer$1 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
958
+ var timestamp$1 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
860
959
  var label = (text) => /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((text) => isTrimmedLabel(text, API_LIMITS.sessionLabelLength)), /* @__PURE__ */ description(`${text} Trimmed, must not be empty, at most ${API_LIMITS.sessionLabelLength} characters.`));
861
960
  var sessionEntries = {
862
- id: /* @__PURE__ */ pipe(integer$2(1), /* @__PURE__ */ description("Increasing, restarts at 1 with the bridge.")),
961
+ id: /* @__PURE__ */ pipe(integer$1(1), /* @__PURE__ */ description("Increasing, restarts at 1 with the bridge.")),
863
962
  name: /* @__PURE__ */ string(),
864
963
  run: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Optional label that groups sessions.")),
865
964
  client: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Who started it: the `X-SR-Speech-Client` header, `null` if it wasn't sent. Added in API 1.10.")),
866
- startedAt: timestamp$2,
867
- endedAt: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(timestamp$2), /* @__PURE__ */ description("`null` while the session is current.")),
868
- startSeq: /* @__PURE__ */ pipe(integer$2(0), /* @__PURE__ */ description("The last `seq` given out before the session started: `since=startSeq` reads the session from its start. Added in API 1.9.")),
869
- firstSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$2(1)), /* @__PURE__ */ description("First entry still in the buffer, `null` if none.")),
870
- lastSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$2(1)), /* @__PURE__ */ description("Last entry still in the buffer, `null` if none.")),
871
- entries: /* @__PURE__ */ pipe(integer$2(0), /* @__PURE__ */ description("Entries of this session still in the buffer."))
965
+ startedAt: timestamp$1,
966
+ endedAt: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(timestamp$1), /* @__PURE__ */ description("`null` while the session is current.")),
967
+ startSeq: /* @__PURE__ */ pipe(integer$1(0), /* @__PURE__ */ description("The last `seq` given out before the session started: `since=startSeq` reads the session from its start. Added in API 1.9.")),
968
+ firstSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$1(1)), /* @__PURE__ */ description("First entry still in the buffer, `null` if none.")),
969
+ lastSeq: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$1(1)), /* @__PURE__ */ description("Last entry still in the buffer, `null` if none.")),
970
+ entries: /* @__PURE__ */ pipe(integer$1(0), /* @__PURE__ */ description("Entries of this session still in the buffer."))
872
971
  };
873
972
  var SessionSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object(sessionEntries), /* @__PURE__ */ description("A session (docs/usage/speech-capture.md#sessions). Added in API 1.3."), /* @__PURE__ */ examples([{
874
973
  id: 7,
@@ -897,38 +996,9 @@ var StartSessionResponseSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
897
996
  var CLIENT_HEADER = "x-sr-speech-client";
898
997
  var SessionListSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
899
998
  sessions: /* @__PURE__ */ array(SessionSchema),
900
- currentId: /* @__PURE__ */ nullable(integer$2(1)),
901
- outsideEntries: /* @__PURE__ */ pipe(integer$2(0), /* @__PURE__ */ description("Entries in the buffer that were recorded outside any session (`session=none`). Added in API 1.15."))
999
+ currentId: /* @__PURE__ */ nullable(integer$1(1)),
1000
+ outsideEntries: /* @__PURE__ */ pipe(integer$1(0), /* @__PURE__ */ description("Entries in the buffer that were recorded outside any session (`session=none`). Added in API 1.15."))
902
1001
  }), /* @__PURE__ */ description("`GET /sessions`: the current session and the ended ones with entries in the buffer, newest first, and how many entries lie outside any session."));
903
- // ../shared/src/speech.ts
904
- var integer$1 = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
905
- var timestamp$1 = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
906
- var SpeechEntrySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
907
- seq: /* @__PURE__ */ pipe(integer$1(1), /* @__PURE__ */ description("Increasing sequence number. Survives clear and keeps rising across restarts: the first entry of a bridge run gets the run's start time in milliseconds.")),
908
- kind: /* @__PURE__ */ picklist(["speech", "marker"]),
909
- text: /* @__PURE__ */ string(),
910
- receivedAt: /* @__PURE__ */ pipe(timestamp$1, /* @__PURE__ */ description("When the bridge received the line (UTC).")),
911
- source: /* @__PURE__ */ pipe(/* @__PURE__ */ picklist(["tcp", "api"]), /* @__PURE__ */ description("`tcp` for speech, `api` for markers.")),
912
- voice: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Header (`voice=<id>`) of the sending voice, `null` if not set or for markers.")),
913
- connectionId: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(integer$1(1)), /* @__PURE__ */ description("TCP connection that delivered it, `null` for markers.")),
914
- sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ nullable(integer$1(1))), /* @__PURE__ */ description("The session that was current, `null` outside any session. Added in API 1.3."))
915
- }), /* @__PURE__ */ description("One recorded speech line or a marker."), /* @__PURE__ */ examples([{
916
- seq: 42,
917
- kind: "speech",
918
- text: "Submit, button",
919
- receivedAt: "2026-11-07T14:03:12.345Z",
920
- source: "tcp",
921
- voice: "ssc5000",
922
- connectionId: 3,
923
- sessionId: 7
924
- }]));
925
- var SpeechListSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
926
- entries: /* @__PURE__ */ array(SpeechEntrySchema),
927
- truncated: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when entries after `since` were dropped because the buffer was full.")),
928
- hasMore: /* @__PURE__ */ pipe(/* @__PURE__ */ boolean(), /* @__PURE__ */ description("`true` when more entries follow: ask again with the last entry's `seq` as `since`."))
929
- }), /* @__PURE__ */ description("`GET /speech`: a page of entries after `since`, oldest first."));
930
- API_LIMITS.wait.seen, `${API_LIMITS.wait.seen}`;
931
- var MarkerRequestSchema = /* @__PURE__ */ object({ label: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((label) => isTrimmedLabel(label, API_LIMITS.markerLength)), /* @__PURE__ */ description(`Marker text. Trimmed, must not be empty, at most ${API_LIMITS.markerLength} characters.`), /* @__PURE__ */ examples(["step 3"])) });
932
1002
  // ../shared/src/status.ts
933
1003
  var integer = (min) => /* @__PURE__ */ pipe(/* @__PURE__ */ number(), /* @__PURE__ */ integer$3(), /* @__PURE__ */ minValue(min));
934
1004
  var timestamp = /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ isoTimestamp());
@@ -955,6 +1025,11 @@ var ConnectionSchema = /* @__PURE__ */ object({
955
1025
  voice: /* @__PURE__ */ nullable(/* @__PURE__ */ string()),
956
1026
  connectedAt: timestamp
957
1027
  });
1028
+ var InputAvailabilitySchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
1029
+ available: /* @__PURE__ */ boolean(),
1030
+ backend: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("The library that does it. `null` when not available."), /* @__PURE__ */ examples(["robotjs"])),
1031
+ reason: /* @__PURE__ */ pipe(/* @__PURE__ */ nullable(/* @__PURE__ */ string()), /* @__PURE__ */ description("Why it is not available (also the `INPUT_DISABLED` message). `null` when it is."), /* @__PURE__ */ examples(["only on Windows"]))
1032
+ }), /* @__PURE__ */ description("Whether a native input feature works on this machine. Fixed at the bridge start."));
958
1033
  var StatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
959
1034
  bridge: /* @__PURE__ */ object({
960
1035
  version: /* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ description("Package version of the bridge."), /* @__PURE__ */ examples(["0.3.0"])),
@@ -980,8 +1055,12 @@ var StatusSchema = /* @__PURE__ */ pipe(/* @__PURE__ */ object({
980
1055
  session: /* @__PURE__ */ pipe(/* @__PURE__ */ object({
981
1056
  current: /* @__PURE__ */ nullable(SessionSchema),
982
1057
  count: /* @__PURE__ */ pipe(integer(0), /* @__PURE__ */ description("Number of sessions `GET /sessions` lists."))
983
- }), /* @__PURE__ */ description("Added in API 1.3."))
984
- }), /* @__PURE__ */ description("`GET /status`. `playwright` since API 1.1, `mcp` since 1.2, `session` since 1.3."));
1058
+ }), /* @__PURE__ */ description("Added in API 1.3.")),
1059
+ input: /* @__PURE__ */ pipe(/* @__PURE__ */ object({
1060
+ native: /* @__PURE__ */ pipe(InputAvailabilitySchema, /* @__PURE__ */ description("`POST /input/keys` and `POST /input/click` (robotjs).")),
1061
+ focus: /* @__PURE__ */ pipe(InputAvailabilitySchema, /* @__PURE__ */ description("`POST /input/focus` (koffi, Windows only)."))
1062
+ }), /* @__PURE__ */ description("Native input (docs/usage/native-input.md). When a feature is not available, its endpoints answer `409 INPUT_DISABLED`. Added in API 1.24."))
1063
+ }), /* @__PURE__ */ description("`GET /status`. `playwright` since API 1.1, `mcp` since 1.2, `session` since 1.3, `input` since 1.24."));
985
1064
  // ../shared/src/validate.ts
986
1065
  /**
987
1066
  * Checks `value` against `schema`. Unknown keys don't fail it and are left out of the result: a
@@ -1009,6 +1088,6 @@ var AnyErrorBodySchema = /* @__PURE__ */ object({ error: /* @__PURE__ */ object(
1009
1088
  message: /* @__PURE__ */ string(),
1010
1089
  details: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ unknown()))
1011
1090
  }) });
1012
- export { SpeechEntrySchema as a, SessionListSchema as c, ConfigOverridesSchema as d, ConfigPatchSchema as f, MarkerRequestSchema as i, StartSessionRequestSchema as l, API_LIMITS as m, checkDto as n, SpeechListSchema as o, ConfigSchema as p, StatusSchema as r, CLIENT_HEADER as s, AnyErrorBodySchema as t, StartSessionResponseSchema as u };
1091
+ export { SessionListSchema as a, MarkerRequestSchema as c, ConfigOverridesSchema as d, ConfigPatchSchema as f, CLIENT_HEADER as i, SpeechEntrySchema as l, API_LIMITS as m, checkDto as n, StartSessionRequestSchema as o, ConfigSchema as p, StatusSchema as r, StartSessionResponseSchema as s, AnyErrorBodySchema as t, SpeechListSchema as u };
1013
1092
 
1014
1093
  //# sourceMappingURL=src.js.map