@selvajs/selva 4.20.1-beta.5 → 4.21.0-beta.7

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 (195) hide show
  1. package/build/adapter-node.js +1 -1
  2. package/build/client/_app/immutable/chunks/{CzfnuBzq.js → BAhtiTKe.js} +1 -1
  3. package/build/client/_app/immutable/chunks/BAhtiTKe.js.br +0 -0
  4. package/build/client/_app/immutable/chunks/BAhtiTKe.js.gz +0 -0
  5. package/build/client/_app/immutable/chunks/{D-uUm_OB.js → BepzH9eI.js} +4 -4
  6. package/build/client/_app/immutable/chunks/BepzH9eI.js.br +0 -0
  7. package/build/client/_app/immutable/chunks/{D-uUm_OB.js.gz → BepzH9eI.js.gz} +0 -0
  8. package/build/client/_app/immutable/chunks/BmoT9ksD.js +1 -0
  9. package/build/client/_app/immutable/chunks/BmoT9ksD.js.br +1 -0
  10. package/build/client/_app/immutable/chunks/BmoT9ksD.js.gz +0 -0
  11. package/build/client/_app/immutable/chunks/{qi43d-TM.js → CKbHmAlc.js} +1 -1
  12. package/build/client/_app/immutable/chunks/CKbHmAlc.js.br +0 -0
  13. package/build/client/_app/immutable/chunks/CKbHmAlc.js.gz +0 -0
  14. package/build/client/_app/immutable/chunks/{C6Y_BUwr.js → CmlXAF26.js} +1 -1
  15. package/build/client/_app/immutable/chunks/CmlXAF26.js.br +0 -0
  16. package/build/client/_app/immutable/chunks/CmlXAF26.js.gz +0 -0
  17. package/build/client/_app/immutable/chunks/{BDYCH-_Q.js → D5j4-ZO1.js} +1 -1
  18. package/build/client/_app/immutable/chunks/D5j4-ZO1.js.br +0 -0
  19. package/build/client/_app/immutable/chunks/D5j4-ZO1.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/DW5EJMC7.js +1 -0
  21. package/build/client/_app/immutable/chunks/DW5EJMC7.js.br +0 -0
  22. package/build/client/_app/immutable/chunks/DW5EJMC7.js.gz +0 -0
  23. package/build/client/_app/immutable/chunks/{DzxE3j6C.js → qXnHMKD9.js} +1 -1
  24. package/build/client/_app/immutable/chunks/qXnHMKD9.js.br +0 -0
  25. package/build/client/_app/immutable/chunks/qXnHMKD9.js.gz +0 -0
  26. package/build/client/_app/immutable/entry/{app.BpT6WkO1.js → app.Cmuegtgc.js} +2 -2
  27. package/build/client/_app/immutable/entry/app.Cmuegtgc.js.br +0 -0
  28. package/build/client/_app/immutable/entry/app.Cmuegtgc.js.gz +0 -0
  29. package/build/client/_app/immutable/nodes/{1.D3kiiIk_.js → 1.DWd6YbcT.js} +1 -1
  30. package/build/client/_app/immutable/nodes/1.DWd6YbcT.js.br +0 -0
  31. package/build/client/_app/immutable/nodes/1.DWd6YbcT.js.gz +0 -0
  32. package/build/client/_app/immutable/nodes/{2.CUNbzjI_.js → 2.CS32Eh9m.js} +1 -1
  33. package/build/client/_app/immutable/nodes/2.CS32Eh9m.js.br +0 -0
  34. package/build/client/_app/immutable/nodes/2.CS32Eh9m.js.gz +0 -0
  35. package/build/client/_app/immutable/nodes/{20.9OIre0ah.js → 20.CUK41A3B.js} +1 -1
  36. package/build/client/_app/immutable/nodes/20.CUK41A3B.js.br +0 -0
  37. package/build/client/_app/immutable/nodes/20.CUK41A3B.js.gz +0 -0
  38. package/build/client/_app/immutable/nodes/21.DvC40Ypm.js +1 -0
  39. package/build/client/_app/immutable/nodes/21.DvC40Ypm.js.br +0 -0
  40. package/build/client/_app/immutable/nodes/21.DvC40Ypm.js.gz +0 -0
  41. package/build/client/_app/immutable/nodes/24.DkL5kHzA.js +3 -0
  42. package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.br +0 -0
  43. package/build/client/_app/immutable/nodes/24.DkL5kHzA.js.gz +0 -0
  44. package/build/client/_app/immutable/nodes/{25.DW1_vMxq.js → 25.D6EkgNRa.js} +1 -1
  45. package/build/client/_app/immutable/nodes/25.D6EkgNRa.js.br +0 -0
  46. package/build/client/_app/immutable/nodes/25.D6EkgNRa.js.gz +0 -0
  47. package/build/client/_app/immutable/nodes/{3.3Z4QUsQQ.js → 3.Ctd9OGCk.js} +1 -1
  48. package/build/client/_app/immutable/nodes/3.Ctd9OGCk.js.br +0 -0
  49. package/build/client/_app/immutable/nodes/3.Ctd9OGCk.js.gz +0 -0
  50. package/build/client/_app/immutable/nodes/{5.DmA9lTA-.js → 5.Wh_w3RkZ.js} +1 -1
  51. package/build/client/_app/immutable/nodes/5.Wh_w3RkZ.js.br +2 -0
  52. package/build/client/_app/immutable/nodes/5.Wh_w3RkZ.js.gz +0 -0
  53. package/build/client/_app/immutable/nodes/{6.D6WLqCgl.js → 6.C-DiUI5R.js} +1 -1
  54. package/build/client/_app/immutable/nodes/6.C-DiUI5R.js.br +0 -0
  55. package/build/client/_app/immutable/nodes/6.C-DiUI5R.js.gz +0 -0
  56. package/build/client/_app/immutable/nodes/{7.CNuRjkv2.js → 7.B8yubYrv.js} +1 -1
  57. package/build/client/_app/immutable/nodes/7.B8yubYrv.js.br +0 -0
  58. package/build/client/_app/immutable/nodes/7.B8yubYrv.js.gz +0 -0
  59. package/build/client/_app/version.json +1 -1
  60. package/build/client/_app/version.json.br +0 -0
  61. package/build/client/_app/version.json.gz +0 -0
  62. package/build/server/.vite/manifest.json +10 -12
  63. package/build/server/chunks/api.js +9 -2
  64. package/build/server/chunks/api.js.map +1 -1
  65. package/build/server/chunks/computeRateLimit.server.js +1 -1
  66. package/build/server/chunks/grasshopper.js +13 -2
  67. package/build/server/chunks/grasshopper.js.map +1 -1
  68. package/build/server/chunks/handlers.js +21 -17
  69. package/build/server/chunks/handlers.js.map +1 -1
  70. package/build/server/chunks/instance.js +3 -3
  71. package/build/server/chunks/internal.js +1 -1
  72. package/build/server/chunks/liveSolve.server.js +1 -1
  73. package/build/server/chunks/localeContext.svelte.js +14 -0
  74. package/build/server/chunks/localeContext.svelte.js.map +1 -1
  75. package/build/server/chunks/oauth.js +70 -24
  76. package/build/server/chunks/oauth.js.map +1 -1
  77. package/build/server/chunks/{outcome-DNrffAXp.js → outcome-D28FgvFK.js} +9 -6
  78. package/build/server/chunks/outcome-D28FgvFK.js.map +1 -0
  79. package/build/server/chunks/package.js +1 -1
  80. package/build/server/chunks/package.js.map +1 -1
  81. package/build/server/chunks/providers.server.js +4 -2
  82. package/build/server/chunks/providers.server.js.map +1 -1
  83. package/build/server/chunks/registry.js +1 -1
  84. package/build/server/chunks/schema.js +1 -1
  85. package/build/server/chunks/schema.js.map +1 -1
  86. package/build/server/chunks/server2.js +2 -2
  87. package/build/server/chunks/server2.js.map +1 -1
  88. package/build/server/chunks/serverStats.server.js +1 -1
  89. package/build/server/chunks/solve.server.js +5 -4
  90. package/build/server/chunks/solve.server.js.map +1 -1
  91. package/build/server/chunks/sveltekit.js +1 -1
  92. package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js +6 -3
  93. package/build/server/entries/endpoints/.well-known/oauth-authorization-server/_server.ts.js.map +1 -1
  94. package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js +6 -3
  95. package/build/server/entries/endpoints/.well-known/oauth-protected-resource/_server.ts.js.map +1 -1
  96. package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js +6 -3
  97. package/build/server/entries/endpoints/.well-known/oauth-protected-resource/mcp/_server.ts.js.map +1 -1
  98. package/build/server/entries/endpoints/api/admin/compute/status/_server.ts.js +1 -1
  99. package/build/server/entries/endpoints/api/admin/orgs/_id_/_server.ts.js +1 -1
  100. package/build/server/entries/endpoints/api/admin/orgs/_server.ts.js +1 -1
  101. package/build/server/entries/endpoints/api/admin/projects/_id_/_server.ts.js +1 -1
  102. package/build/server/entries/endpoints/api/admin/projects/_id_/grants/_grantId_/_server.ts.js +1 -1
  103. package/build/server/entries/endpoints/api/admin/projects/_id_/grants/_server.ts.js +1 -1
  104. package/build/server/entries/endpoints/api/admin/projects/_server.ts.js +1 -1
  105. package/build/server/entries/endpoints/api/admin/users/_id_/_server.ts.js +1 -1
  106. package/build/server/entries/endpoints/api/admin/users/_id_/disable/_server.ts.js +1 -1
  107. package/build/server/entries/endpoints/api/admin/users/_server.ts.js +1 -1
  108. package/build/server/entries/endpoints/api/v1/compute/_server.ts.js +5 -1
  109. package/build/server/entries/endpoints/api/v1/compute/_server.ts.js.map +1 -1
  110. package/build/server/entries/endpoints/api/v1/compute/schema/_server.ts.js +1 -1
  111. package/build/server/entries/endpoints/api/v1/definitions/_guid_/_server.ts.js +1 -1
  112. package/build/server/entries/endpoints/api/v1/definitions/_guid_/image/_server.ts.js +1 -1
  113. package/build/server/entries/endpoints/api/v1/definitions/_guid_/publish/_server.ts.js +1 -1
  114. package/build/server/entries/endpoints/api/v1/definitions/_guid_/schema/_server.ts.js +1 -1
  115. package/build/server/entries/endpoints/api/v1/definitions/_guid_/share-links/_linkId_/_server.ts.js +1 -1
  116. package/build/server/entries/endpoints/api/v1/definitions/_guid_/share-links/_server.ts.js +1 -1
  117. package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js +2 -1
  118. package/build/server/entries/endpoints/api/v1/definitions/_guid_/solve/_server.ts.js.map +1 -1
  119. package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_server.ts.js +1 -1
  120. package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/_server.ts.js +1 -1
  121. package/build/server/entries/endpoints/api/v1/definitions/_guid_/versions/_versionId_/schema/_server.ts.js +1 -1
  122. package/build/server/entries/endpoints/api/v1/projects/_id_/_server.ts.js +1 -1
  123. package/build/server/entries/endpoints/api/v1/projects/_id_/members/_server.ts.js +1 -1
  124. package/build/server/entries/endpoints/api/v1/projects/_id_/members/_userId_/_server.ts.js +1 -1
  125. package/build/server/entries/endpoints/api/v1/projects/_id_/reclaim/_server.ts.js +1 -1
  126. package/build/server/entries/endpoints/api/v1/solve/_solveId_/cancel/_server.ts.js +1 -1
  127. package/build/server/entries/endpoints/api/v1/solve-events/_server.ts.js +1 -1
  128. package/build/server/entries/endpoints/docs/api/openapi.yaml/_server.ts.js +1 -1
  129. package/build/server/entries/endpoints/mcp/_server.ts.js +5 -4
  130. package/build/server/entries/endpoints/mcp/_server.ts.js.map +1 -1
  131. package/build/server/entries/endpoints/oauth/register/_server.ts.js +1 -1
  132. package/build/server/entries/endpoints/oauth/token/_server.ts.js +1 -1
  133. package/build/server/entries/pages/library/_guid_/_page.server.ts.js +2 -2
  134. package/build/server/entries/pages/library/_guid_/_page.svelte.js +232 -11
  135. package/build/server/entries/pages/library/_guid_/_page.svelte.js.map +1 -1
  136. package/build/server/entries/pages/oauth/authorize/_page.server.ts.js +3 -2
  137. package/build/server/entries/pages/oauth/authorize/_page.server.ts.js.map +1 -1
  138. package/build/server/entries/pages/oauth/authorize/_page.svelte.js +8 -1
  139. package/build/server/entries/pages/oauth/authorize/_page.svelte.js.map +1 -1
  140. package/build/server/manifest-full.js +1 -1
  141. package/build/server/manifest.js +1 -1
  142. package/build/server/nodes/1.js +1 -1
  143. package/build/server/nodes/2.js +1 -1
  144. package/build/server/nodes/20.js +1 -1
  145. package/build/server/nodes/21.js +1 -1
  146. package/build/server/nodes/24.js +1 -1
  147. package/build/server/nodes/25.js +1 -1
  148. package/build/server/nodes/3.js +1 -1
  149. package/build/server/nodes/5.js +1 -1
  150. package/build/server/nodes/6.js +1 -1
  151. package/build/server/nodes/7.js +1 -1
  152. package/build/server/server.js +1 -1
  153. package/package.json +10 -10
  154. package/build/client/_app/immutable/chunks/BDYCH-_Q.js.br +0 -0
  155. package/build/client/_app/immutable/chunks/BDYCH-_Q.js.gz +0 -0
  156. package/build/client/_app/immutable/chunks/C6Y_BUwr.js.br +0 -0
  157. package/build/client/_app/immutable/chunks/C6Y_BUwr.js.gz +0 -0
  158. package/build/client/_app/immutable/chunks/CzfnuBzq.js.br +0 -0
  159. package/build/client/_app/immutable/chunks/CzfnuBzq.js.gz +0 -0
  160. package/build/client/_app/immutable/chunks/D-uUm_OB.js.br +0 -0
  161. package/build/client/_app/immutable/chunks/D84F7w9g.js +0 -1
  162. package/build/client/_app/immutable/chunks/D84F7w9g.js.br +0 -1
  163. package/build/client/_app/immutable/chunks/D84F7w9g.js.gz +0 -0
  164. package/build/client/_app/immutable/chunks/DQsP4nZb.js +0 -1
  165. package/build/client/_app/immutable/chunks/DQsP4nZb.js.br +0 -0
  166. package/build/client/_app/immutable/chunks/DQsP4nZb.js.gz +0 -0
  167. package/build/client/_app/immutable/chunks/DzxE3j6C.js.br +0 -0
  168. package/build/client/_app/immutable/chunks/DzxE3j6C.js.gz +0 -0
  169. package/build/client/_app/immutable/chunks/qi43d-TM.js.br +0 -0
  170. package/build/client/_app/immutable/chunks/qi43d-TM.js.gz +0 -0
  171. package/build/client/_app/immutable/entry/app.BpT6WkO1.js.br +0 -0
  172. package/build/client/_app/immutable/entry/app.BpT6WkO1.js.gz +0 -0
  173. package/build/client/_app/immutable/nodes/1.D3kiiIk_.js.br +0 -0
  174. package/build/client/_app/immutable/nodes/1.D3kiiIk_.js.gz +0 -0
  175. package/build/client/_app/immutable/nodes/2.CUNbzjI_.js.br +0 -0
  176. package/build/client/_app/immutable/nodes/2.CUNbzjI_.js.gz +0 -0
  177. package/build/client/_app/immutable/nodes/20.9OIre0ah.js.br +0 -0
  178. package/build/client/_app/immutable/nodes/20.9OIre0ah.js.gz +0 -0
  179. package/build/client/_app/immutable/nodes/21.BkNlRItr.js +0 -1
  180. package/build/client/_app/immutable/nodes/21.BkNlRItr.js.br +0 -0
  181. package/build/client/_app/immutable/nodes/21.BkNlRItr.js.gz +0 -0
  182. package/build/client/_app/immutable/nodes/24.CPSunfJJ.js +0 -3
  183. package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.br +0 -0
  184. package/build/client/_app/immutable/nodes/24.CPSunfJJ.js.gz +0 -0
  185. package/build/client/_app/immutable/nodes/25.DW1_vMxq.js.br +0 -0
  186. package/build/client/_app/immutable/nodes/25.DW1_vMxq.js.gz +0 -0
  187. package/build/client/_app/immutable/nodes/3.3Z4QUsQQ.js.br +0 -0
  188. package/build/client/_app/immutable/nodes/3.3Z4QUsQQ.js.gz +0 -0
  189. package/build/client/_app/immutable/nodes/5.DmA9lTA-.js.br +0 -1
  190. package/build/client/_app/immutable/nodes/5.DmA9lTA-.js.gz +0 -0
  191. package/build/client/_app/immutable/nodes/6.D6WLqCgl.js.br +0 -0
  192. package/build/client/_app/immutable/nodes/6.D6WLqCgl.js.gz +0 -0
  193. package/build/client/_app/immutable/nodes/7.CNuRjkv2.js.br +0 -0
  194. package/build/client/_app/immutable/nodes/7.CNuRjkv2.js.gz +0 -0
  195. package/build/server/chunks/outcome-DNrffAXp.js.map +0 -1
@@ -213,7 +213,7 @@ function server_data_serializer(event, state) {
213
213
  let promise_id = 1;
214
214
  let max_nodes = -1;
215
215
  const iterator = create_async_iterator();
216
- const global = "__sveltekit_1w4zbvb";
216
+ const global = "__sveltekit_3oxlh6";
217
217
  /** @param {number} index */
218
218
  function get_replacer(index) {
219
219
  /** @param {any} thing */
@@ -1443,7 +1443,7 @@ async function render_response({ branch, fetched, page_config, status, error = n
1443
1443
  "crossorigin"
1444
1444
  ]);
1445
1445
  }
1446
- const global = "__sveltekit_1w4zbvb";
1446
+ const global = "__sveltekit_3oxlh6";
1447
1447
  const { data, chunks } = data_serializer.get_data(csp);
1448
1448
  if (page_config.ssr && page_config.csr) body += `\n\t\t\t${fetched.map((item) => serialize_data(item, resolve_opts.filterSerializedResponseHeaders, !!(state.prerendering || state.prerender_default === true))).join("\n ")}`;
1449
1449
  if (page_config.csr && client) {
@@ -1467,7 +1467,7 @@ async function render_response({ branch, fetched, page_config, status, error = n
1467
1467
  }
1468
1468
  }
1469
1469
  const blocks = [];
1470
- const properties = [`base: ${base_expression}`, `version: ${s("1794217168156")}`];
1470
+ const properties = [`base: ${base_expression}`, `version: ${s("1794234143315")}`];
1471
1471
  if (assets) properties.push(`assets: ${s(assets)}`);
1472
1472
  if (client.uses_env_dynamic_public) properties.push(`env: ${load_env_eagerly ? "null" : uneval$1(rendered_env)}`);
1473
1473
  if (chunks) {
@@ -2363,7 +2363,7 @@ function redirect_response(status, location) {
2363
2363
  * @param {Response} response
2364
2364
  */
2365
2365
  function with_version_header(response) {
2366
- response.headers.set("x-sveltekit-version", "1794217168156");
2366
+ response.headers.set("x-sveltekit-version", "1794234143315");
2367
2367
  return response;
2368
2368
  }
2369
2369
  /**
@@ -1,7 +1,7 @@
1
1
  import { n as env } from "./previous-key.js";
2
2
  import { t as publicUrl } from "./origin.js";
3
3
  import { r as getSolveEventBus, t as mintSolveToken } from "./token.server.js";
4
- import { n as decodeOutcome } from "./outcome-DNrffAXp.js";
4
+ import { n as decodeOutcome } from "./outcome-D28FgvFK.js";
5
5
  import { randomUUID } from "node:crypto";
6
6
  // src/lib/server/solveEvents/liveSolve.server.ts
7
7
  /**
@@ -167,6 +167,13 @@ var VIEWER_MESSAGES = {
167
167
  downloadFiles: "Download {count} Files",
168
168
  downloading: "Downloading...",
169
169
  downloadFailed: "Download failed",
170
+ filesMadeOnDownload: "Made when you download",
171
+ download: "Download",
172
+ makingFiles: "Making files",
173
+ filesMadeIn: "Made in {seconds} s",
174
+ noFilesForInputs: "Nothing to download for these inputs.",
175
+ tryAgain: "Try again",
176
+ cancel: "Cancel",
170
177
  copy: "Copy",
171
178
  copied: "Copied!",
172
179
  chartReceiving: "Receiving chart data...",
@@ -354,6 +361,13 @@ var VIEWER_MESSAGES = {
354
361
  downloadFiles: "{count} Dateien herunterladen",
355
362
  downloading: "Wird heruntergeladen…",
356
363
  downloadFailed: "Download fehlgeschlagen",
364
+ filesMadeOnDownload: "Wird beim Herunterladen erstellt",
365
+ download: "Herunterladen",
366
+ makingFiles: "Dateien werden erstellt",
367
+ filesMadeIn: "Erstellt in {seconds} s",
368
+ noFilesForInputs: "Für diese Eingaben gibt es nichts herunterzuladen.",
369
+ tryAgain: "Erneut versuchen",
370
+ cancel: "Abbrechen",
357
371
  copy: "Kopieren",
358
372
  copied: "Kopiert!",
359
373
  chartReceiving: "Diagrammdaten werden empfangen…",
@@ -1 +1 @@
1
- {"version":3,"file":"localeContext.svelte.js","names":[],"sources":["../../../../ui/src/lib/i18n/messages.ts","../../../../ui/src/lib/i18n/localeContext.svelte.ts"],"sourcesContent":["// ============================================================================\n// Viewer message catalog (library-owned strings)\n// ============================================================================\n//\n// Only the strings @selvajs/ui renders itself. Names coming from a Grasshopper\n// definition — meshes, layers, metadata keys — live in the user's .gh file and\n// cannot be translated here.\n//\n// A `{name}` in a message is a placeholder the component fills in. Pairs ending in\n// `One`/`Other` are the singular and plural forms of one message.\n\nexport type Locale = 'en' | 'de';\n\nexport interface ViewerMessages {\n\t// Tools menu\n\ttoolsMenu: string;\n\tswitchToOrthographic: string;\n\tswitchToPerspective: string;\n\tfitToView: string;\n\tviews: string;\n\tmeasure: string;\n\tgrid: string;\n\tdisplay: string;\n\tedges: string;\n\tsceneManager: string;\n\tscreenshot: string;\n\tfullscreen: string;\n\texitFullscreen: string;\n\n\t// View presets\n\tviewTop: string;\n\tviewFront: string;\n\tviewRight: string;\n\tviewBack: string;\n\tviewLeft: string;\n\tviewBottom: string;\n\tviewIso: string;\n\n\t// Display looks\n\tlookTechnical: string;\n\tlookStudio: string;\n\tlookShowcase: string;\n\tlookNight: string;\n\tnightMode: string;\n\tlookArctic: string;\n\tlookXray: string;\n\tlookLineart: string;\n\tlookWireframe: string;\n\n\t// Scene manager\n\tsearchObjects: string;\n\tclearSearch: string;\n\texpandLayer: string;\n\tcollapseLayer: string;\n\texpandAll: string;\n\tcollapseAll: string;\n\tshowLayer: string;\n\thideLayer: string;\n\tshowObject: string;\n\thideObject: string;\n\tnoObjects: string;\n\t/** `{query}` is replaced with the current search text. */\n\tnoResultsFor: string;\n\n\t// Metadata dialog\n\tobjectFallbackName: string;\n\tnoMetadata: string;\n\n\t// App layout / compute shell\n\tloadingSchema: string;\n\tsolveBlocked: string;\n\tsolveBlockedTitle: string;\n\tsolveMessagesTitle: string;\n\tsolveMessagesDescription: string;\n\tsolveMessagesConfirm: string;\n\tsolveMessagesDiscard: string;\n\tsolveMessagesAbort: string;\n\t/** Stands in for Abort where the page can't take a click mid-solve. */\n\tsolveMessagesEscHint: string;\n\tsolveMessagesDismiss: string;\n\tsolveSolving: string;\n\t/** A visible solve has landed; followed by how long it took. */\n\tsolveDone: string;\n\t/** A visible solve was aborted; the previous result stays. */\n\tsolveStopped: string;\n\tparametersTab: string;\n\tmoreTab: string;\n\tscrollTabsBack: string;\n\tscrollTabsForward: string;\n\t/** `{side}` is replaced with `panelSideLeft` / `panelSideRight`. */\n\texpandSidePanel: string;\n\tpanelSideLeft: string;\n\tpanelSideRight: string;\n\ttabNoGroups: string;\n\n\t// Solve controls\n\tsolving: string;\n\tsolvingEllipsis: string;\n\tsolvingSubtitle: string;\n\tpressToCalculate: string;\n\tcalculate: string;\n\tupToDate: string;\n\t/** The panel footer's ⋯ menu: saving and loading inputs, plus the host's own actions. */\n\tmoreActions: string;\n\t/** Under a menu action that solves before it runs, while the inputs have changed. */\n\tcalculatesFirst: string;\n\n\t// Footer and message centre\n\t/** `{count}` is replaced with the number of errors. */\n\terrorCountOne: string;\n\terrorCountOther: string;\n\t/** `{count}` is replaced with the number of warnings. */\n\twarningCountOne: string;\n\twarningCountOther: string;\n\t/** `{count}` is replaced with the number of notes. */\n\tnoteCountOne: string;\n\tnoteCountOther: string;\n\t/** `{count}` is replaced with the number of messages. */\n\tlastSolveMessagesOne: string;\n\tlastSolveMessagesOther: string;\n\tmessagesTitle: string;\n\t/** `{name}` is replaced with the copyright holder, `{year}` with the current year. */\n\tcopyright: string;\n\tclose: string;\n\ttoggleTheme: string;\n\terrorTitle: string;\n\tgoHome: string;\n\n\t// Input fields\n\tselectOption: string;\n\tnoOptionsYet: string;\n\t/** `{min}` is replaced with the field's minimum. */\n\tminValue: string;\n\t/** `{max}` is replaced with the field's maximum. */\n\tmaxValue: string;\n\tfineDragHint: string;\n\t/** `{max}` is replaced with the field's character limit. */\n\tmaxLength: string;\n\tinvalidFormat: string;\n\t/** Trigger label; `{color}` is the current hex value. */\n\tcolorPick: string;\n\tcolorArea: string;\n\t/** `{s}` and `{v}` are percentages. */\n\tcolorAreaValue: string;\n\tcolorHue: string;\n\tcolorHex: string;\n\tcolorHexInvalid: string;\n\tcolorPresets: string;\n\tcolorEyedropper: string;\n\tinvalidPattern: string;\n\n\t// Geometry input (Rhino only)\n\t/** The pick button when the input takes several kinds of object. */\n\tgeometryPickAnyOne: string;\n\tgeometryPickAnyOther: string;\n\t/** Shown while Rhino's viewport prompt for a pick is open. */\n\tgeometryPicking: string;\n\t/** Where this page may not pick, such as a browser tab beside the Rhino panel. */\n\tgeometryPickInPanel: string;\n\tgeometryPickAgain: string;\n\tgeometryClear: string;\n\t// The pick button when the input takes one kind: `One` picks a single object, `Other` several.\n\tgeometryPickPointOne: string;\n\tgeometryPickPointOther: string;\n\tgeometryPickPointCloudOne: string;\n\tgeometryPickPointCloudOther: string;\n\tgeometryPickCurveOne: string;\n\tgeometryPickCurveOther: string;\n\tgeometryPickLineOne: string;\n\tgeometryPickLineOther: string;\n\tgeometryPickPlaneOne: string;\n\tgeometryPickPlaneOther: string;\n\tgeometryPickSurfaceOne: string;\n\tgeometryPickSurfaceOther: string;\n\tgeometryPickPolysurfaceOne: string;\n\tgeometryPickPolysurfaceOther: string;\n\tgeometryPickExtrusionOne: string;\n\tgeometryPickExtrusionOther: string;\n\tgeometryPickMeshOne: string;\n\tgeometryPickMeshOther: string;\n\tgeometryPickSubdOne: string;\n\tgeometryPickSubdOther: string;\n\tgeometryPickBlockOne: string;\n\tgeometryPickBlockOther: string;\n\n\t// File input\n\tfileModeUpload: string;\n\tfileModeUrl: string;\n\tfileUrlLabel: string;\n\tfetchFile: string;\n\tfetchingFile: string;\n\tfileUrlPublic: string;\n\tchooseFile: string;\n\t/** `{formats}` is replaced with the accepted extensions. */\n\tacceptedFormats: string;\n\t/** `{ext}` is replaced with the file's extension. */\n\tuploadedFile: string;\n\t/** `{ext}` is replaced with the file's extension, `{size}` with its size in MB. */\n\tuploadedFileSize: string;\n\t/** `{ext}` is replaced with the file's extension, `{size}` with its size in KB. */\n\tfileLoaded: string;\n\turlInvalid: string;\n\turlProtocolUnsupported: string;\n\t/** `{status}` is replaced with the HTTP status the server answered with. */\n\turlServerError: string;\n\t/** `{ext}` is replaced with the rejected extension, `{formats}` with the accepted ones. */\n\tfileFormatNotAccepted: string;\n\t/** `{size}` is replaced with the file's size in MB, `{max}` with the limit in MB. */\n\tfileTooLarge: string;\n\tfileTooLargeUseUpload: string;\n\tfileReadFailed: string;\n\t/** `{host}` is replaced with the URL's host name. */\n\turlUnreachable: string;\n\turlUnreachableHint: string;\n\turlHintSharePoint: string;\n\turlHintGoogleDrive: string;\n\turlHintDropbox: string;\n\tunknownError: string;\n\n\t// Outputs\n\twaitingForData: string;\n\twaitingForFiles: string;\n\t/** `{count}` is replaced with the number of files. */\n\tfileCount: string;\n\tduplicateFilesTitle: string;\n\tduplicatePathsOne: string;\n\tduplicatePathsOther: string;\n\tduplicateFilesHint: string;\n\tdownloadFile: string;\n\t/** `{count}` is replaced with the number of files. */\n\tdownloadFiles: string;\n\tdownloading: string;\n\tdownloadFailed: string;\n\tcopy: string;\n\tcopied: string;\n\tchartReceiving: string;\n\tchartRenderFailed: string;\n\tdownloadChartImage: string;\n\t/** `{error}` is replaced with the browser's reason. */\n\tfullscreenUnavailable: string;\n\t/** `{error}` is replaced with the browser's reason. */\n\texitFullscreenFailed: string;\n\n\t// Image output\n\timageViewer: string;\n\timageLoading: string;\n\t/** `{ext}` is replaced with the file's extension, `{formats}` with the supported ones. */\n\timageUnsupported: string;\n\timageUnknownFormat: string;\n\t/** `{file}` is replaced with the file's name. */\n\timageDecodeFailed: string;\n\tpreviousImage: string;\n\tnextImage: string;\n\tzoomHint: string;\n\tzoomIn: string;\n\tzoomOut: string;\n\tzoomFit: string;\n\tzoomActual: string;\n\tdownloadImage: string;\n}\n\nconst en: ViewerMessages = {\n\ttoolsMenu: 'Viewer tools',\n\tswitchToOrthographic: 'Orthographic camera',\n\tswitchToPerspective: 'Perspective camera',\n\tfitToView: 'Fit to view',\n\tviews: 'Views',\n\tmeasure: 'Measure',\n\tgrid: 'Grid',\n\tdisplay: 'Display',\n\tedges: 'Edges',\n\tsceneManager: 'Scene manager',\n\tscreenshot: 'Screenshot',\n\tfullscreen: 'Fullscreen',\n\texitFullscreen: 'Exit fullscreen',\n\n\tviewTop: 'Top',\n\tviewFront: 'Front',\n\tviewRight: 'Right',\n\tviewBack: 'Back',\n\tviewLeft: 'Left',\n\tviewBottom: 'Bottom',\n\tviewIso: 'Isometric',\n\n\tlookTechnical: 'Technical',\n\tlookStudio: 'Studio',\n\tlookShowcase: 'Showcase',\n\tlookNight: 'Night',\n\tnightMode: 'Night mode',\n\tlookArctic: 'Arctic',\n\tlookXray: 'X-Ray',\n\tlookLineart: 'Line Art',\n\tlookWireframe: 'Wireframe',\n\n\tsearchObjects: 'Search objects...',\n\tclearSearch: 'Clear search',\n\texpandLayer: 'Expand layer',\n\tcollapseLayer: 'Collapse layer',\n\texpandAll: 'Expand all',\n\tcollapseAll: 'Collapse all',\n\tshowLayer: 'Show layer',\n\thideLayer: 'Hide layer',\n\tshowObject: 'Show object',\n\thideObject: 'Hide object',\n\tnoObjects: 'No objects',\n\tnoResultsFor: 'No results for \"{query}\"',\n\n\tobjectFallbackName: 'Object',\n\tnoMetadata: 'No metadata',\n\n\tloadingSchema: 'Loading…',\n\tsolveBlocked: 'The definition stopped this solve. No results were produced.',\n\tsolveBlockedTitle: 'Solve stopped',\n\tsolveMessagesTitle: 'Solve messages',\n\tsolveMessagesDescription: 'This solve reported the following. Continue to see the result.',\n\tsolveMessagesConfirm: 'Continue',\n\tsolveMessagesDiscard: 'Discard',\n\tsolveMessagesAbort: 'Abort',\n\tsolveMessagesEscHint: 'Esc aborts the solve',\n\tsolveMessagesDismiss: 'Dismiss',\n\tsolveSolving: 'Solving…',\n\tsolveDone: 'Done',\n\tsolveStopped: 'Stopped',\n\tparametersTab: 'Parameters',\n\tmoreTab: 'More',\n\tscrollTabsBack: 'Previous tabs',\n\tscrollTabsForward: 'More tabs',\n\texpandSidePanel: 'Expand {side} panel',\n\tpanelSideLeft: 'left',\n\tpanelSideRight: 'right',\n\ttabNoGroups: 'This tab has no groups configured.',\n\n\tsolving: 'Solving',\n\tsolvingEllipsis: 'Solving...',\n\tsolvingSubtitle: 'This can take a moment…',\n\tpressToCalculate: 'Press to calculate',\n\tcalculate: 'Calculate',\n\tupToDate: 'Up to date',\n\tmoreActions: 'More actions',\n\tcalculatesFirst: 'Calculates first',\n\n\terrorCountOne: '{count} error',\n\terrorCountOther: '{count} errors',\n\twarningCountOne: '{count} warning',\n\twarningCountOther: '{count} warnings',\n\tnoteCountOne: '{count} note',\n\tnoteCountOther: '{count} notes',\n\tlastSolveMessagesOne: '{count} message from the last solve',\n\tlastSolveMessagesOther: '{count} messages from the last solve',\n\tmessagesTitle: 'Messages',\n\tcopyright: 'by {name} © {year}',\n\tclose: 'Close',\n\ttoggleTheme: 'Toggle theme',\n\terrorTitle: 'Error',\n\tgoHome: 'Go Home',\n\n\tselectOption: 'Select an option...',\n\tnoOptionsYet: 'No options available yet.',\n\tminValue: 'Minimum value is {min}',\n\tmaxValue: 'Maximum value is {max}',\n\tfineDragHint: 'Hold Shift to drag finely',\n\tmaxLength: 'Maximum {max} characters allowed',\n\tinvalidFormat: 'Invalid format',\n\tcolorPick: 'Choose color, currently {color}',\n\tcolorArea: 'Saturation and brightness',\n\tcolorAreaValue: 'Saturation {s}%, brightness {v}%',\n\tcolorHue: 'Hue',\n\tcolorHex: 'Hex color',\n\tcolorHexInvalid: 'Enter a hex color such as #2f6fd6',\n\tcolorPresets: 'Presets',\n\tcolorEyedropper: 'Pick a color from the screen',\n\tinvalidPattern: 'Invalid validation pattern configured',\n\n\tgeometryPickAnyOne: 'Pick an object',\n\tgeometryPickAnyOther: 'Pick objects',\n\tgeometryPicking: 'Pick in the viewport, Esc to cancel',\n\tgeometryPickInPanel: 'Pick in the Rhino panel',\n\tgeometryPickAgain: 'Pick again',\n\tgeometryClear: 'Clear',\n\tgeometryPickPointOne: 'Pick a point',\n\tgeometryPickPointOther: 'Pick points',\n\tgeometryPickPointCloudOne: 'Pick a point cloud',\n\tgeometryPickPointCloudOther: 'Pick point clouds',\n\tgeometryPickCurveOne: 'Pick a curve',\n\tgeometryPickCurveOther: 'Pick curves',\n\tgeometryPickLineOne: 'Pick a line',\n\tgeometryPickLineOther: 'Pick lines',\n\tgeometryPickPlaneOne: 'Pick a plane',\n\tgeometryPickPlaneOther: 'Pick planes',\n\tgeometryPickSurfaceOne: 'Pick a surface',\n\tgeometryPickSurfaceOther: 'Pick surfaces',\n\tgeometryPickPolysurfaceOne: 'Pick a polysurface',\n\tgeometryPickPolysurfaceOther: 'Pick polysurfaces',\n\tgeometryPickExtrusionOne: 'Pick an extrusion',\n\tgeometryPickExtrusionOther: 'Pick extrusions',\n\tgeometryPickMeshOne: 'Pick a mesh',\n\tgeometryPickMeshOther: 'Pick meshes',\n\tgeometryPickSubdOne: 'Pick a SubD',\n\tgeometryPickSubdOther: 'Pick SubDs',\n\tgeometryPickBlockOne: 'Pick a block',\n\tgeometryPickBlockOther: 'Pick blocks',\n\n\tfileModeUpload: 'Upload',\n\tfileModeUrl: 'URL',\n\tfileUrlLabel: 'File URL',\n\tfetchFile: 'Fetch',\n\tfetchingFile: 'Fetching...',\n\tfileUrlPublic: 'URL must be publicly accessible (no login required).',\n\tchooseFile: 'Choose File or Drag & Drop',\n\tacceptedFormats: 'Accepted formats: {formats}',\n\tuploadedFile: 'Uploaded file ({ext})',\n\tuploadedFileSize: 'Uploaded file ({ext}, {size}MB)',\n\tfileLoaded: 'Loaded {ext} ({size} KB)',\n\turlInvalid: 'Invalid URL — make sure it starts with https://',\n\turlProtocolUnsupported: 'Only http:// and https:// URLs are supported.',\n\turlServerError: 'Server returned {status}. Check the URL is correct and publicly accessible.',\n\tfileFormatNotAccepted: 'File format \"{ext}\" is not accepted. Allowed: {formats}',\n\tfileTooLarge: 'File too large: {size}MB (max {max}MB).',\n\tfileTooLargeUseUpload: 'Download it and use Upload instead.',\n\tfileReadFailed: 'Failed to read the downloaded file.',\n\turlUnreachable:\n\t\t'Could not reach \"{host}\" — the file may not exist, or the server does not allow browser access.',\n\turlUnreachableHint:\n\t\t'Check that the URL is correct and the file is publicly accessible. If the server requires login, download the file and use the Upload option instead.',\n\turlHintSharePoint:\n\t\t'SharePoint/OneDrive blocks browser access. Open the file in SharePoint, use \"Download\" to save it locally, then upload it here.',\n\turlHintGoogleDrive:\n\t\t'Google Drive blocks browser access. Use \"Download\" in Google Drive to save the file locally, then upload it here.',\n\turlHintDropbox:\n\t\t'Dropbox links may block browser access. Try changing \"?dl=0\" to \"?dl=1\" in the URL, or download and upload instead.',\n\tunknownError: 'Unknown error',\n\n\twaitingForData: 'Waiting for data...',\n\twaitingForFiles: 'Waiting for file data...',\n\tfileCount: '{count} files',\n\tduplicateFilesTitle: 'Duplicate file names detected',\n\tduplicatePathsOne: 'The following path appears more than once:',\n\tduplicatePathsOther: 'The following paths appear more than once:',\n\tduplicateFilesHint:\n\t\t'Rename outputs in your Grasshopper definition so each file has a unique name.',\n\tdownloadFile: 'Download File',\n\tdownloadFiles: 'Download {count} Files',\n\tdownloading: 'Downloading...',\n\tdownloadFailed: 'Download failed',\n\tcopy: 'Copy',\n\tcopied: 'Copied!',\n\tchartReceiving: 'Receiving chart data...',\n\tchartRenderFailed: 'Failed to render chart',\n\tdownloadChartImage: 'Download plot as image',\n\tfullscreenUnavailable: 'Fullscreen unavailable: {error}',\n\texitFullscreenFailed: 'Exit fullscreen failed: {error}',\n\n\timageViewer: 'image viewer',\n\timageLoading: 'Loading image…',\n\timageUnsupported: 'Unsupported image format: {ext}. Supported: {formats}',\n\timageUnknownFormat: '(unknown)',\n\timageDecodeFailed: \"Couldn't decode {file}\",\n\tpreviousImage: 'Previous image',\n\tnextImage: 'Next image',\n\tzoomHint: 'Hold Ctrl or ⌘ and scroll to zoom',\n\tzoomIn: 'Zoom in',\n\tzoomOut: 'Zoom out',\n\tzoomFit: 'Fit',\n\tzoomActual: 'Actual pixels',\n\tdownloadImage: 'Download image'\n};\n\nconst de: ViewerMessages = {\n\ttoolsMenu: 'Viewer-Werkzeuge',\n\tswitchToOrthographic: 'Orthografische Kamera',\n\tswitchToPerspective: 'Perspektivische Kamera',\n\tfitToView: 'Ansicht anpassen',\n\tviews: 'Ansichten',\n\tmeasure: 'Messen',\n\tgrid: 'Raster',\n\tdisplay: 'Darstellung',\n\tedges: 'Kanten',\n\tsceneManager: 'Szenen-Manager',\n\tscreenshot: 'Screenshot',\n\tfullscreen: 'Vollbild',\n\texitFullscreen: 'Vollbild beenden',\n\n\tviewTop: 'Oben',\n\tviewFront: 'Vorne',\n\tviewRight: 'Rechts',\n\tviewBack: 'Hinten',\n\tviewLeft: 'Links',\n\tviewBottom: 'Unten',\n\tviewIso: 'Isometrisch',\n\n\tlookTechnical: 'Technisch',\n\tlookStudio: 'Studio',\n\tlookShowcase: 'Präsentation',\n\tlookNight: 'Nacht',\n\tnightMode: 'Nachtmodus',\n\tlookArctic: 'Arktis',\n\tlookXray: 'Röntgen',\n\tlookLineart: 'Strichzeichnung',\n\tlookWireframe: 'Drahtgitter',\n\n\tsearchObjects: 'Objekte suchen...',\n\tclearSearch: 'Suche löschen',\n\texpandLayer: 'Ebene aufklappen',\n\tcollapseLayer: 'Ebene zuklappen',\n\texpandAll: 'Alle aufklappen',\n\tcollapseAll: 'Alle zuklappen',\n\tshowLayer: 'Ebene einblenden',\n\thideLayer: 'Ebene ausblenden',\n\tshowObject: 'Objekt einblenden',\n\thideObject: 'Objekt ausblenden',\n\tnoObjects: 'Keine Objekte',\n\tnoResultsFor: 'Keine Ergebnisse für „{query}“',\n\n\tobjectFallbackName: 'Objekt',\n\tnoMetadata: 'Keine Metadaten',\n\n\tloadingSchema: 'Wird geladen…',\n\tsolveBlocked: 'Die Definition hat diese Berechnung gestoppt. Es wurden keine Ergebnisse erzeugt.',\n\tsolveBlockedTitle: 'Berechnung gestoppt',\n\tsolveMessagesTitle: 'Meldungen zur Berechnung',\n\tsolveMessagesDescription:\n\t\t'Diese Berechnung hat Folgendes gemeldet. Weiter, um das Ergebnis zu sehen.',\n\tsolveMessagesConfirm: 'Weiter',\n\tsolveMessagesDiscard: 'Verwerfen',\n\tsolveMessagesAbort: 'Abbrechen',\n\tsolveMessagesEscHint: 'Esc bricht die Berechnung ab',\n\tsolveMessagesDismiss: 'Schliessen',\n\tsolveSolving: 'Berechnung läuft…',\n\tsolveDone: 'Fertig',\n\tsolveStopped: 'Abgebrochen',\n\tparametersTab: 'Parameter',\n\tmoreTab: 'Mehr',\n\tscrollTabsBack: 'Vorherige Tabs',\n\tscrollTabsForward: 'Weitere Tabs',\n\texpandSidePanel: '{side} Bereich aufklappen',\n\tpanelSideLeft: 'Linken',\n\tpanelSideRight: 'Rechten',\n\ttabNoGroups: 'Für diesen Tab sind keine Gruppen konfiguriert.',\n\n\tsolving: 'Berechnung läuft',\n\tsolvingEllipsis: 'Berechnung läuft...',\n\tsolvingSubtitle: 'Das kann einen Moment dauern…',\n\tpressToCalculate: 'Berechnen',\n\tcalculate: 'Berechnen',\n\tupToDate: 'Berechnet',\n\tmoreActions: 'Weitere Aktionen',\n\tcalculatesFirst: 'Berechnet zuerst',\n\n\terrorCountOne: '{count} Fehler',\n\terrorCountOther: '{count} Fehler',\n\twarningCountOne: '{count} Warnung',\n\twarningCountOther: '{count} Warnungen',\n\tnoteCountOne: '{count} Hinweis',\n\tnoteCountOther: '{count} Hinweise',\n\tlastSolveMessagesOne: '{count} Meldung der letzten Berechnung',\n\tlastSolveMessagesOther: '{count} Meldungen der letzten Berechnung',\n\tmessagesTitle: 'Meldungen',\n\tcopyright: 'von {name} © {year}',\n\tclose: 'Schliessen',\n\ttoggleTheme: 'Farbschema wechseln',\n\terrorTitle: 'Fehler',\n\tgoHome: 'Zur Startseite',\n\n\tselectOption: 'Option wählen…',\n\tnoOptionsYet: 'Noch keine Optionen verfügbar.',\n\tminValue: 'Der kleinste erlaubte Wert ist {min}',\n\tmaxValue: 'Der grösste erlaubte Wert ist {max}',\n\tfineDragHint: 'Umschalttaste halten für feine Schritte',\n\tmaxLength: 'Höchstens {max} Zeichen erlaubt',\n\tinvalidFormat: 'Ungültiges Format',\n\tcolorPick: 'Farbe wählen, aktuell {color}',\n\tcolorArea: 'Sättigung und Helligkeit',\n\tcolorAreaValue: 'Sättigung {s} %, Helligkeit {v} %',\n\tcolorHue: 'Farbton',\n\tcolorHex: 'Hex-Farbe',\n\tcolorHexInvalid: 'Hex-Farbe eingeben, z. B. #2f6fd6',\n\tcolorPresets: 'Vorgaben',\n\tcolorEyedropper: 'Farbe vom Bildschirm aufnehmen',\n\tinvalidPattern: 'Ungültiges Prüfmuster hinterlegt',\n\n\tgeometryPickAnyOne: 'Objekt wählen',\n\tgeometryPickAnyOther: 'Objekte wählen',\n\tgeometryPicking: 'Im Ansichtsfenster wählen, Esc bricht ab',\n\tgeometryPickInPanel: 'Im Rhino-Panel wählen',\n\tgeometryPickAgain: 'Neu wählen',\n\tgeometryClear: 'Leeren',\n\tgeometryPickPointOne: 'Punkt wählen',\n\tgeometryPickPointOther: 'Punkte wählen',\n\tgeometryPickPointCloudOne: 'Punktwolke wählen',\n\tgeometryPickPointCloudOther: 'Punktwolken wählen',\n\tgeometryPickCurveOne: 'Kurve wählen',\n\tgeometryPickCurveOther: 'Kurven wählen',\n\tgeometryPickLineOne: 'Linie wählen',\n\tgeometryPickLineOther: 'Linien wählen',\n\tgeometryPickPlaneOne: 'Ebene wählen',\n\tgeometryPickPlaneOther: 'Ebenen wählen',\n\tgeometryPickSurfaceOne: 'Fläche wählen',\n\tgeometryPickSurfaceOther: 'Flächen wählen',\n\tgeometryPickPolysurfaceOne: 'Flächenverband wählen',\n\tgeometryPickPolysurfaceOther: 'Flächenverbände wählen',\n\tgeometryPickExtrusionOne: 'Extrusion wählen',\n\tgeometryPickExtrusionOther: 'Extrusionen wählen',\n\tgeometryPickMeshOne: 'Netz wählen',\n\tgeometryPickMeshOther: 'Netze wählen',\n\tgeometryPickSubdOne: 'SubD wählen',\n\tgeometryPickSubdOther: 'SubDs wählen',\n\tgeometryPickBlockOne: 'Block wählen',\n\tgeometryPickBlockOther: 'Blöcke wählen',\n\n\tfileModeUpload: 'Hochladen',\n\tfileModeUrl: 'URL',\n\tfileUrlLabel: 'Datei-URL',\n\tfetchFile: 'Abrufen',\n\tfetchingFile: 'Wird abgerufen…',\n\tfileUrlPublic: 'Die URL muss öffentlich erreichbar sein (ohne Anmeldung).',\n\tchooseFile: 'Datei wählen oder hierher ziehen',\n\tacceptedFormats: 'Erlaubte Formate: {formats}',\n\tuploadedFile: 'Hochgeladene Datei ({ext})',\n\tuploadedFileSize: 'Hochgeladene Datei ({ext}, {size} MB)',\n\tfileLoaded: '{ext} geladen ({size} KB)',\n\turlInvalid: 'Ungültige URL – sie muss mit https:// beginnen',\n\turlProtocolUnsupported: 'Nur http://- und https://-URLs werden unterstützt.',\n\turlServerError:\n\t\t'Der Server antwortete mit {status}. Ist die URL korrekt und öffentlich erreichbar?',\n\tfileFormatNotAccepted: 'Dateiformat „{ext}“ ist nicht erlaubt. Erlaubt: {formats}',\n\tfileTooLarge: 'Datei zu gross: {size} MB (höchstens {max} MB).',\n\tfileTooLargeUseUpload: 'Datei herunterladen und stattdessen über „Hochladen“ einfügen.',\n\tfileReadFailed: 'Die heruntergeladene Datei konnte nicht gelesen werden.',\n\turlUnreachable:\n\t\t'„{host}“ ist nicht erreichbar – die Datei existiert vielleicht nicht, oder der Server erlaubt keinen Zugriff aus dem Browser.',\n\turlUnreachableHint:\n\t\t'Prüfen, ob die URL stimmt und die Datei öffentlich erreichbar ist. Verlangt der Server eine Anmeldung: Datei herunterladen und über „Hochladen“ einfügen.',\n\turlHintSharePoint:\n\t\t'SharePoint/OneDrive sperrt den Zugriff aus dem Browser. Datei in SharePoint öffnen, mit „Herunterladen“ lokal speichern und hier hochladen.',\n\turlHintGoogleDrive:\n\t\t'Google Drive sperrt den Zugriff aus dem Browser. Datei in Google Drive mit „Herunterladen“ lokal speichern und hier hochladen.',\n\turlHintDropbox:\n\t\t'Dropbox-Links sperren den Zugriff aus dem Browser oft. In der URL „?dl=0“ durch „?dl=1“ ersetzen oder die Datei herunterladen und hochladen.',\n\tunknownError: 'Unbekannter Fehler',\n\n\twaitingForData: 'Noch keine Daten',\n\twaitingForFiles: 'Noch keine Dateien',\n\tfileCount: '{count} Dateien',\n\tduplicateFilesTitle: 'Doppelte Dateinamen',\n\tduplicatePathsOne: 'Dieser Pfad kommt mehrfach vor:',\n\tduplicatePathsOther: 'Diese Pfade kommen mehrfach vor:',\n\tduplicateFilesHint:\n\t\t'Ausgaben in der Grasshopper-Definition umbenennen, damit jede Datei einen eindeutigen Namen hat.',\n\tdownloadFile: 'Datei herunterladen',\n\tdownloadFiles: '{count} Dateien herunterladen',\n\tdownloading: 'Wird heruntergeladen…',\n\tdownloadFailed: 'Download fehlgeschlagen',\n\tcopy: 'Kopieren',\n\tcopied: 'Kopiert!',\n\tchartReceiving: 'Diagrammdaten werden empfangen…',\n\tchartRenderFailed: 'Diagramm konnte nicht dargestellt werden',\n\tdownloadChartImage: 'Diagramm als Bild herunterladen',\n\tfullscreenUnavailable: 'Vollbild nicht verfügbar: {error}',\n\texitFullscreenFailed: 'Vollbild konnte nicht beendet werden: {error}',\n\n\timageViewer: 'Bildbetrachter',\n\timageLoading: 'Bild wird geladen…',\n\timageUnsupported: 'Bildformat nicht unterstützt: {ext}. Unterstützt: {formats}',\n\timageUnknownFormat: '(unbekannt)',\n\timageDecodeFailed: '{file} konnte nicht gelesen werden',\n\tpreviousImage: 'Vorheriges Bild',\n\tnextImage: 'Nächstes Bild',\n\tzoomHint: 'Zum Zoomen Strg oder ⌘ halten und scrollen',\n\tzoomIn: 'Vergrössern',\n\tzoomOut: 'Verkleinern',\n\tzoomFit: 'Einpassen',\n\tzoomActual: 'Originalgrösse',\n\tdownloadImage: 'Bild herunterladen'\n};\n\nexport const VIEWER_MESSAGES: Record<Locale, ViewerMessages> = { en, de };\n\nexport const DEFAULT_LOCALE: Locale = 'en';\n\n/** Resolve a catalog for a locale, falling back to English for unknown locales. */\nexport function messagesFor(locale: Locale | undefined): ViewerMessages {\n\treturn VIEWER_MESSAGES[locale ?? DEFAULT_LOCALE] ?? VIEWER_MESSAGES[DEFAULT_LOCALE];\n}\n\n/** Layers a host's partial overrides over a full catalog. An `undefined` entry keeps the base string. */\nexport function withOverrides(\n\tbase: ViewerMessages,\n\toverrides: Partial<ViewerMessages> | undefined\n): ViewerMessages {\n\tif (!overrides) return base;\n\tconst merged = { ...base };\n\tfor (const [key, value] of Object.entries(overrides) as [keyof ViewerMessages, string][]) {\n\t\tif (value !== undefined) merged[key] = value;\n\t}\n\treturn merged;\n}\n\n/** Fills each `{name}` placeholder from `vars`; an unknown placeholder is left as written. */\nexport function formatMessage(template: string, vars: Record<string, string | number>): string {\n\treturn template.replace(/\\{(\\w+)\\}/g, (placeholder, name: string) =>\n\t\tname in vars ? String(vars[name]) : placeholder\n\t);\n}\n\n/** Picks the singular or plural form for `count` and fills its `{count}`. */\nexport function formatCount(count: number, one: string, other: string): string {\n\treturn formatMessage(count === 1 ? one : other, { count });\n}\n","import { getContext, setContext } from 'svelte';\nimport {\n\ttype Locale,\n\ttype ViewerMessages,\n\tmessagesFor,\n\twithOverrides,\n\tDEFAULT_LOCALE\n} from './messages';\n\n// Carries the UI locale down to the viewer and its panels without threading a\n// `lang` prop through every layer.\n//\n// Resolution order for any consuming component:\n// explicit `lang` prop → nearest locale context → English default\n// and the strings are that locale's catalog with any `messages` overrides on top.\n//\n// Two ways to provide it:\n// - Standalone: <Viewer lang=\"de\" /> — Viewer provides the context itself.\n// - In an app: call setLocaleContext(() => app.locale) once at the root; the\n// viewer (and anything else) reads it.\n\nconst LOCALE_CONTEXT_KEY = Symbol('viewer-locale-context');\n\nexport interface LocaleContext {\n\treadonly locale: Locale;\n\treadonly messages: ViewerMessages;\n}\n\n/**\n * Provide the locale to descendants. Pass getters, not values: they are re-read on every\n * consumer render, so a reactive source (a `$state`, the app's Paraglide locale) switches\n * the language live. `getOverrides` replaces individual strings of the resolved catalog.\n */\nexport function setLocaleContext(\n\tgetLocale: () => Locale | undefined,\n\tgetOverrides?: () => Partial<ViewerMessages> | undefined\n): void {\n\tconst ctx: LocaleContext = {\n\t\tget locale() {\n\t\t\treturn getLocale() ?? DEFAULT_LOCALE;\n\t\t},\n\t\tget messages() {\n\t\t\treturn withOverrides(messagesFor(getLocale()), getOverrides?.());\n\t\t}\n\t};\n\tsetContext(LOCALE_CONTEXT_KEY, ctx);\n}\n\n/**\n * Re-provides the nearest context for a component that takes its own `lang`/`messages` props.\n * Without `lang`, or with the inherited locale, the subtree keeps the overrides an outer provider\n * applied; a different `lang` starts from that locale's catalog, since those overrides were\n * written for another language.\n */\nexport function layerLocaleContext(\n\tgetLang: () => Locale | undefined,\n\tgetOverrides?: () => Partial<ViewerMessages> | undefined\n): LocaleContext {\n\tconst outer = getLocaleContext();\n\tconst ctx: LocaleContext = {\n\t\tget locale() {\n\t\t\treturn getLang() ?? outer.locale;\n\t\t},\n\t\tget messages() {\n\t\t\tconst lang = getLang();\n\t\t\tconst base = lang === undefined || lang === outer.locale ? outer.messages : messagesFor(lang);\n\t\t\treturn withOverrides(base, getOverrides?.());\n\t\t}\n\t};\n\tsetContext(LOCALE_CONTEXT_KEY, ctx);\n\treturn ctx;\n}\n\n/**\n * Falls back to an English-only context when no provider exists (a primitive used in\n * isolation), so consumers never need a null check.\n */\nexport function getLocaleContext(): LocaleContext {\n\treturn (\n\t\tgetContext<LocaleContext | undefined>(LOCALE_CONTEXT_KEY) ?? {\n\t\t\tget locale() {\n\t\t\t\treturn DEFAULT_LOCALE;\n\t\t\t},\n\t\t\tget messages() {\n\t\t\t\treturn messagesFor(DEFAULT_LOCALE);\n\t\t\t}\n\t\t}\n\t);\n}\n"],"mappings":";;AAmqBA,IAAa,kBAAkD;CAAE;EA7ZhE,WAAW;EACX,sBAAsB;EACt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AAO;AACR;;AAGA,SAAgB,cAAc,UAAkB,MAA+C;CAC9F,OAAO,SAAS,QAAQ,eAAe,aAAa,SACnD,QAAQ,OAAO,OAAO,KAAK,KAAK,IAAI,WACrC;AACD;;AAGA,SAAgB,YAAY,OAAe,KAAa,OAAuB;CAC9E,OAAO,cAAc,UAAU,IAAI,MAAM,OAAO,EAAE,MAAM,CAAC;AAC1D;;AC9qBA,IAAM,qBAAqB,OAAO,uBAAuB;;;;;;;AAiCzD,SAAgB,mBACf,SACA,cACgB;CAChB,MAAM,QAAQ,iBAAA;CACd,MAAM,MAAA;EACL,IAAI,SAAS;GACZ,OAAO,QAAA,KAAa,MAAM;EAC3B;EACA,IAAI,WAAW;GACd,MAAM,OAAO,QAAA;GAEb,OAAO,cADM,SAAS,KAAA,KAAa,SAAS,MAAM,SAAS,MAAM,WAAW,YAAY,IAAI,GACjE,eAAA,CAAA;EAC5B;;CAED,WAAW,oBAAoB,GAAG;CAClC,OAAO;AACR;;;;;AAMA,SAAgB,mBAAkC;CACjD,OACC,WAAsC,kBAAkB,KAAA;EACvD,IAAI,SAAS;GACZ,OAAA;EACD;EACA,IAAI,WAAW;GACd,OAAO,YAAA,IAA0B;EAClC;;AAGH"}
1
+ {"version":3,"file":"localeContext.svelte.js","names":[],"sources":["../../../../ui/src/lib/i18n/messages.ts","../../../../ui/src/lib/i18n/localeContext.svelte.ts"],"sourcesContent":["// ============================================================================\n// Viewer message catalog (library-owned strings)\n// ============================================================================\n//\n// Only the strings @selvajs/ui renders itself. Names coming from a Grasshopper\n// definition — meshes, layers, metadata keys — live in the user's .gh file and\n// cannot be translated here.\n//\n// A `{name}` in a message is a placeholder the component fills in. Pairs ending in\n// `One`/`Other` are the singular and plural forms of one message.\n\nexport type Locale = 'en' | 'de';\n\nexport interface ViewerMessages {\n\t// Tools menu\n\ttoolsMenu: string;\n\tswitchToOrthographic: string;\n\tswitchToPerspective: string;\n\tfitToView: string;\n\tviews: string;\n\tmeasure: string;\n\tgrid: string;\n\tdisplay: string;\n\tedges: string;\n\tsceneManager: string;\n\tscreenshot: string;\n\tfullscreen: string;\n\texitFullscreen: string;\n\n\t// View presets\n\tviewTop: string;\n\tviewFront: string;\n\tviewRight: string;\n\tviewBack: string;\n\tviewLeft: string;\n\tviewBottom: string;\n\tviewIso: string;\n\n\t// Display looks\n\tlookTechnical: string;\n\tlookStudio: string;\n\tlookShowcase: string;\n\tlookNight: string;\n\tnightMode: string;\n\tlookArctic: string;\n\tlookXray: string;\n\tlookLineart: string;\n\tlookWireframe: string;\n\n\t// Scene manager\n\tsearchObjects: string;\n\tclearSearch: string;\n\texpandLayer: string;\n\tcollapseLayer: string;\n\texpandAll: string;\n\tcollapseAll: string;\n\tshowLayer: string;\n\thideLayer: string;\n\tshowObject: string;\n\thideObject: string;\n\tnoObjects: string;\n\t/** `{query}` is replaced with the current search text. */\n\tnoResultsFor: string;\n\n\t// Metadata dialog\n\tobjectFallbackName: string;\n\tnoMetadata: string;\n\n\t// App layout / compute shell\n\tloadingSchema: string;\n\tsolveBlocked: string;\n\tsolveBlockedTitle: string;\n\tsolveMessagesTitle: string;\n\tsolveMessagesDescription: string;\n\tsolveMessagesConfirm: string;\n\tsolveMessagesDiscard: string;\n\tsolveMessagesAbort: string;\n\t/** Stands in for Abort where the page can't take a click mid-solve. */\n\tsolveMessagesEscHint: string;\n\tsolveMessagesDismiss: string;\n\tsolveSolving: string;\n\t/** A visible solve has landed; followed by how long it took. */\n\tsolveDone: string;\n\t/** A visible solve was aborted; the previous result stays. */\n\tsolveStopped: string;\n\tparametersTab: string;\n\tmoreTab: string;\n\tscrollTabsBack: string;\n\tscrollTabsForward: string;\n\t/** `{side}` is replaced with `panelSideLeft` / `panelSideRight`. */\n\texpandSidePanel: string;\n\tpanelSideLeft: string;\n\tpanelSideRight: string;\n\ttabNoGroups: string;\n\n\t// Solve controls\n\tsolving: string;\n\tsolvingEllipsis: string;\n\tsolvingSubtitle: string;\n\tpressToCalculate: string;\n\tcalculate: string;\n\tupToDate: string;\n\t/** The panel footer's ⋯ menu: saving and loading inputs, plus the host's own actions. */\n\tmoreActions: string;\n\t/** Under a menu action that solves before it runs, while the inputs have changed. */\n\tcalculatesFirst: string;\n\n\t// Footer and message centre\n\t/** `{count}` is replaced with the number of errors. */\n\terrorCountOne: string;\n\terrorCountOther: string;\n\t/** `{count}` is replaced with the number of warnings. */\n\twarningCountOne: string;\n\twarningCountOther: string;\n\t/** `{count}` is replaced with the number of notes. */\n\tnoteCountOne: string;\n\tnoteCountOther: string;\n\t/** `{count}` is replaced with the number of messages. */\n\tlastSolveMessagesOne: string;\n\tlastSolveMessagesOther: string;\n\tmessagesTitle: string;\n\t/** `{name}` is replaced with the copyright holder, `{year}` with the current year. */\n\tcopyright: string;\n\tclose: string;\n\ttoggleTheme: string;\n\terrorTitle: string;\n\tgoHome: string;\n\n\t// Input fields\n\tselectOption: string;\n\tnoOptionsYet: string;\n\t/** `{min}` is replaced with the field's minimum. */\n\tminValue: string;\n\t/** `{max}` is replaced with the field's maximum. */\n\tmaxValue: string;\n\tfineDragHint: string;\n\t/** `{max}` is replaced with the field's character limit. */\n\tmaxLength: string;\n\tinvalidFormat: string;\n\t/** Trigger label; `{color}` is the current hex value. */\n\tcolorPick: string;\n\tcolorArea: string;\n\t/** `{s}` and `{v}` are percentages. */\n\tcolorAreaValue: string;\n\tcolorHue: string;\n\tcolorHex: string;\n\tcolorHexInvalid: string;\n\tcolorPresets: string;\n\tcolorEyedropper: string;\n\tinvalidPattern: string;\n\n\t// Geometry input (Rhino only)\n\t/** The pick button when the input takes several kinds of object. */\n\tgeometryPickAnyOne: string;\n\tgeometryPickAnyOther: string;\n\t/** Shown while Rhino's viewport prompt for a pick is open. */\n\tgeometryPicking: string;\n\t/** Where this page may not pick, such as a browser tab beside the Rhino panel. */\n\tgeometryPickInPanel: string;\n\tgeometryPickAgain: string;\n\tgeometryClear: string;\n\t// The pick button when the input takes one kind: `One` picks a single object, `Other` several.\n\tgeometryPickPointOne: string;\n\tgeometryPickPointOther: string;\n\tgeometryPickPointCloudOne: string;\n\tgeometryPickPointCloudOther: string;\n\tgeometryPickCurveOne: string;\n\tgeometryPickCurveOther: string;\n\tgeometryPickLineOne: string;\n\tgeometryPickLineOther: string;\n\tgeometryPickPlaneOne: string;\n\tgeometryPickPlaneOther: string;\n\tgeometryPickSurfaceOne: string;\n\tgeometryPickSurfaceOther: string;\n\tgeometryPickPolysurfaceOne: string;\n\tgeometryPickPolysurfaceOther: string;\n\tgeometryPickExtrusionOne: string;\n\tgeometryPickExtrusionOther: string;\n\tgeometryPickMeshOne: string;\n\tgeometryPickMeshOther: string;\n\tgeometryPickSubdOne: string;\n\tgeometryPickSubdOther: string;\n\tgeometryPickBlockOne: string;\n\tgeometryPickBlockOther: string;\n\n\t// File input\n\tfileModeUpload: string;\n\tfileModeUrl: string;\n\tfileUrlLabel: string;\n\tfetchFile: string;\n\tfetchingFile: string;\n\tfileUrlPublic: string;\n\tchooseFile: string;\n\t/** `{formats}` is replaced with the accepted extensions. */\n\tacceptedFormats: string;\n\t/** `{ext}` is replaced with the file's extension. */\n\tuploadedFile: string;\n\t/** `{ext}` is replaced with the file's extension, `{size}` with its size in MB. */\n\tuploadedFileSize: string;\n\t/** `{ext}` is replaced with the file's extension, `{size}` with its size in KB. */\n\tfileLoaded: string;\n\turlInvalid: string;\n\turlProtocolUnsupported: string;\n\t/** `{status}` is replaced with the HTTP status the server answered with. */\n\turlServerError: string;\n\t/** `{ext}` is replaced with the rejected extension, `{formats}` with the accepted ones. */\n\tfileFormatNotAccepted: string;\n\t/** `{size}` is replaced with the file's size in MB, `{max}` with the limit in MB. */\n\tfileTooLarge: string;\n\tfileTooLargeUseUpload: string;\n\tfileReadFailed: string;\n\t/** `{host}` is replaced with the URL's host name. */\n\turlUnreachable: string;\n\turlUnreachableHint: string;\n\turlHintSharePoint: string;\n\turlHintGoogleDrive: string;\n\turlHintDropbox: string;\n\tunknownError: string;\n\n\t// Outputs\n\twaitingForData: string;\n\twaitingForFiles: string;\n\t/** `{count}` is replaced with the number of files. */\n\tfileCount: string;\n\tduplicateFilesTitle: string;\n\tduplicatePathsOne: string;\n\tduplicatePathsOther: string;\n\tduplicateFilesHint: string;\n\tdownloadFile: string;\n\t/** `{count}` is replaced with the number of files. */\n\tdownloadFiles: string;\n\tdownloading: string;\n\tdownloadFailed: string;\n\t/** A preview skipped this output's files; a click makes them. */\n\tfilesMadeOnDownload: string;\n\tdownload: string;\n\tmakingFiles: string;\n\t/** `{seconds}` is replaced with how long the full solve took. */\n\tfilesMadeIn: string;\n\tnoFilesForInputs: string;\n\ttryAgain: string;\n\tcancel: string;\n\tcopy: string;\n\tcopied: string;\n\tchartReceiving: string;\n\tchartRenderFailed: string;\n\tdownloadChartImage: string;\n\t/** `{error}` is replaced with the browser's reason. */\n\tfullscreenUnavailable: string;\n\t/** `{error}` is replaced with the browser's reason. */\n\texitFullscreenFailed: string;\n\n\t// Image output\n\timageViewer: string;\n\timageLoading: string;\n\t/** `{ext}` is replaced with the file's extension, `{formats}` with the supported ones. */\n\timageUnsupported: string;\n\timageUnknownFormat: string;\n\t/** `{file}` is replaced with the file's name. */\n\timageDecodeFailed: string;\n\tpreviousImage: string;\n\tnextImage: string;\n\tzoomHint: string;\n\tzoomIn: string;\n\tzoomOut: string;\n\tzoomFit: string;\n\tzoomActual: string;\n\tdownloadImage: string;\n}\n\nconst en: ViewerMessages = {\n\ttoolsMenu: 'Viewer tools',\n\tswitchToOrthographic: 'Orthographic camera',\n\tswitchToPerspective: 'Perspective camera',\n\tfitToView: 'Fit to view',\n\tviews: 'Views',\n\tmeasure: 'Measure',\n\tgrid: 'Grid',\n\tdisplay: 'Display',\n\tedges: 'Edges',\n\tsceneManager: 'Scene manager',\n\tscreenshot: 'Screenshot',\n\tfullscreen: 'Fullscreen',\n\texitFullscreen: 'Exit fullscreen',\n\n\tviewTop: 'Top',\n\tviewFront: 'Front',\n\tviewRight: 'Right',\n\tviewBack: 'Back',\n\tviewLeft: 'Left',\n\tviewBottom: 'Bottom',\n\tviewIso: 'Isometric',\n\n\tlookTechnical: 'Technical',\n\tlookStudio: 'Studio',\n\tlookShowcase: 'Showcase',\n\tlookNight: 'Night',\n\tnightMode: 'Night mode',\n\tlookArctic: 'Arctic',\n\tlookXray: 'X-Ray',\n\tlookLineart: 'Line Art',\n\tlookWireframe: 'Wireframe',\n\n\tsearchObjects: 'Search objects...',\n\tclearSearch: 'Clear search',\n\texpandLayer: 'Expand layer',\n\tcollapseLayer: 'Collapse layer',\n\texpandAll: 'Expand all',\n\tcollapseAll: 'Collapse all',\n\tshowLayer: 'Show layer',\n\thideLayer: 'Hide layer',\n\tshowObject: 'Show object',\n\thideObject: 'Hide object',\n\tnoObjects: 'No objects',\n\tnoResultsFor: 'No results for \"{query}\"',\n\n\tobjectFallbackName: 'Object',\n\tnoMetadata: 'No metadata',\n\n\tloadingSchema: 'Loading…',\n\tsolveBlocked: 'The definition stopped this solve. No results were produced.',\n\tsolveBlockedTitle: 'Solve stopped',\n\tsolveMessagesTitle: 'Solve messages',\n\tsolveMessagesDescription: 'This solve reported the following. Continue to see the result.',\n\tsolveMessagesConfirm: 'Continue',\n\tsolveMessagesDiscard: 'Discard',\n\tsolveMessagesAbort: 'Abort',\n\tsolveMessagesEscHint: 'Esc aborts the solve',\n\tsolveMessagesDismiss: 'Dismiss',\n\tsolveSolving: 'Solving…',\n\tsolveDone: 'Done',\n\tsolveStopped: 'Stopped',\n\tparametersTab: 'Parameters',\n\tmoreTab: 'More',\n\tscrollTabsBack: 'Previous tabs',\n\tscrollTabsForward: 'More tabs',\n\texpandSidePanel: 'Expand {side} panel',\n\tpanelSideLeft: 'left',\n\tpanelSideRight: 'right',\n\ttabNoGroups: 'This tab has no groups configured.',\n\n\tsolving: 'Solving',\n\tsolvingEllipsis: 'Solving...',\n\tsolvingSubtitle: 'This can take a moment…',\n\tpressToCalculate: 'Press to calculate',\n\tcalculate: 'Calculate',\n\tupToDate: 'Up to date',\n\tmoreActions: 'More actions',\n\tcalculatesFirst: 'Calculates first',\n\n\terrorCountOne: '{count} error',\n\terrorCountOther: '{count} errors',\n\twarningCountOne: '{count} warning',\n\twarningCountOther: '{count} warnings',\n\tnoteCountOne: '{count} note',\n\tnoteCountOther: '{count} notes',\n\tlastSolveMessagesOne: '{count} message from the last solve',\n\tlastSolveMessagesOther: '{count} messages from the last solve',\n\tmessagesTitle: 'Messages',\n\tcopyright: 'by {name} © {year}',\n\tclose: 'Close',\n\ttoggleTheme: 'Toggle theme',\n\terrorTitle: 'Error',\n\tgoHome: 'Go Home',\n\n\tselectOption: 'Select an option...',\n\tnoOptionsYet: 'No options available yet.',\n\tminValue: 'Minimum value is {min}',\n\tmaxValue: 'Maximum value is {max}',\n\tfineDragHint: 'Hold Shift to drag finely',\n\tmaxLength: 'Maximum {max} characters allowed',\n\tinvalidFormat: 'Invalid format',\n\tcolorPick: 'Choose color, currently {color}',\n\tcolorArea: 'Saturation and brightness',\n\tcolorAreaValue: 'Saturation {s}%, brightness {v}%',\n\tcolorHue: 'Hue',\n\tcolorHex: 'Hex color',\n\tcolorHexInvalid: 'Enter a hex color such as #2f6fd6',\n\tcolorPresets: 'Presets',\n\tcolorEyedropper: 'Pick a color from the screen',\n\tinvalidPattern: 'Invalid validation pattern configured',\n\n\tgeometryPickAnyOne: 'Pick an object',\n\tgeometryPickAnyOther: 'Pick objects',\n\tgeometryPicking: 'Pick in the viewport, Esc to cancel',\n\tgeometryPickInPanel: 'Pick in the Rhino panel',\n\tgeometryPickAgain: 'Pick again',\n\tgeometryClear: 'Clear',\n\tgeometryPickPointOne: 'Pick a point',\n\tgeometryPickPointOther: 'Pick points',\n\tgeometryPickPointCloudOne: 'Pick a point cloud',\n\tgeometryPickPointCloudOther: 'Pick point clouds',\n\tgeometryPickCurveOne: 'Pick a curve',\n\tgeometryPickCurveOther: 'Pick curves',\n\tgeometryPickLineOne: 'Pick a line',\n\tgeometryPickLineOther: 'Pick lines',\n\tgeometryPickPlaneOne: 'Pick a plane',\n\tgeometryPickPlaneOther: 'Pick planes',\n\tgeometryPickSurfaceOne: 'Pick a surface',\n\tgeometryPickSurfaceOther: 'Pick surfaces',\n\tgeometryPickPolysurfaceOne: 'Pick a polysurface',\n\tgeometryPickPolysurfaceOther: 'Pick polysurfaces',\n\tgeometryPickExtrusionOne: 'Pick an extrusion',\n\tgeometryPickExtrusionOther: 'Pick extrusions',\n\tgeometryPickMeshOne: 'Pick a mesh',\n\tgeometryPickMeshOther: 'Pick meshes',\n\tgeometryPickSubdOne: 'Pick a SubD',\n\tgeometryPickSubdOther: 'Pick SubDs',\n\tgeometryPickBlockOne: 'Pick a block',\n\tgeometryPickBlockOther: 'Pick blocks',\n\n\tfileModeUpload: 'Upload',\n\tfileModeUrl: 'URL',\n\tfileUrlLabel: 'File URL',\n\tfetchFile: 'Fetch',\n\tfetchingFile: 'Fetching...',\n\tfileUrlPublic: 'URL must be publicly accessible (no login required).',\n\tchooseFile: 'Choose File or Drag & Drop',\n\tacceptedFormats: 'Accepted formats: {formats}',\n\tuploadedFile: 'Uploaded file ({ext})',\n\tuploadedFileSize: 'Uploaded file ({ext}, {size}MB)',\n\tfileLoaded: 'Loaded {ext} ({size} KB)',\n\turlInvalid: 'Invalid URL — make sure it starts with https://',\n\turlProtocolUnsupported: 'Only http:// and https:// URLs are supported.',\n\turlServerError: 'Server returned {status}. Check the URL is correct and publicly accessible.',\n\tfileFormatNotAccepted: 'File format \"{ext}\" is not accepted. Allowed: {formats}',\n\tfileTooLarge: 'File too large: {size}MB (max {max}MB).',\n\tfileTooLargeUseUpload: 'Download it and use Upload instead.',\n\tfileReadFailed: 'Failed to read the downloaded file.',\n\turlUnreachable:\n\t\t'Could not reach \"{host}\" — the file may not exist, or the server does not allow browser access.',\n\turlUnreachableHint:\n\t\t'Check that the URL is correct and the file is publicly accessible. If the server requires login, download the file and use the Upload option instead.',\n\turlHintSharePoint:\n\t\t'SharePoint/OneDrive blocks browser access. Open the file in SharePoint, use \"Download\" to save it locally, then upload it here.',\n\turlHintGoogleDrive:\n\t\t'Google Drive blocks browser access. Use \"Download\" in Google Drive to save the file locally, then upload it here.',\n\turlHintDropbox:\n\t\t'Dropbox links may block browser access. Try changing \"?dl=0\" to \"?dl=1\" in the URL, or download and upload instead.',\n\tunknownError: 'Unknown error',\n\n\twaitingForData: 'Waiting for data...',\n\twaitingForFiles: 'Waiting for file data...',\n\tfileCount: '{count} files',\n\tduplicateFilesTitle: 'Duplicate file names detected',\n\tduplicatePathsOne: 'The following path appears more than once:',\n\tduplicatePathsOther: 'The following paths appear more than once:',\n\tduplicateFilesHint:\n\t\t'Rename outputs in your Grasshopper definition so each file has a unique name.',\n\tdownloadFile: 'Download File',\n\tdownloadFiles: 'Download {count} Files',\n\tdownloading: 'Downloading...',\n\tdownloadFailed: 'Download failed',\n\tfilesMadeOnDownload: 'Made when you download',\n\tdownload: 'Download',\n\tmakingFiles: 'Making files',\n\tfilesMadeIn: 'Made in {seconds} s',\n\tnoFilesForInputs: 'Nothing to download for these inputs.',\n\ttryAgain: 'Try again',\n\tcancel: 'Cancel',\n\tcopy: 'Copy',\n\tcopied: 'Copied!',\n\tchartReceiving: 'Receiving chart data...',\n\tchartRenderFailed: 'Failed to render chart',\n\tdownloadChartImage: 'Download plot as image',\n\tfullscreenUnavailable: 'Fullscreen unavailable: {error}',\n\texitFullscreenFailed: 'Exit fullscreen failed: {error}',\n\n\timageViewer: 'image viewer',\n\timageLoading: 'Loading image…',\n\timageUnsupported: 'Unsupported image format: {ext}. Supported: {formats}',\n\timageUnknownFormat: '(unknown)',\n\timageDecodeFailed: \"Couldn't decode {file}\",\n\tpreviousImage: 'Previous image',\n\tnextImage: 'Next image',\n\tzoomHint: 'Hold Ctrl or ⌘ and scroll to zoom',\n\tzoomIn: 'Zoom in',\n\tzoomOut: 'Zoom out',\n\tzoomFit: 'Fit',\n\tzoomActual: 'Actual pixels',\n\tdownloadImage: 'Download image'\n};\n\nconst de: ViewerMessages = {\n\ttoolsMenu: 'Viewer-Werkzeuge',\n\tswitchToOrthographic: 'Orthografische Kamera',\n\tswitchToPerspective: 'Perspektivische Kamera',\n\tfitToView: 'Ansicht anpassen',\n\tviews: 'Ansichten',\n\tmeasure: 'Messen',\n\tgrid: 'Raster',\n\tdisplay: 'Darstellung',\n\tedges: 'Kanten',\n\tsceneManager: 'Szenen-Manager',\n\tscreenshot: 'Screenshot',\n\tfullscreen: 'Vollbild',\n\texitFullscreen: 'Vollbild beenden',\n\n\tviewTop: 'Oben',\n\tviewFront: 'Vorne',\n\tviewRight: 'Rechts',\n\tviewBack: 'Hinten',\n\tviewLeft: 'Links',\n\tviewBottom: 'Unten',\n\tviewIso: 'Isometrisch',\n\n\tlookTechnical: 'Technisch',\n\tlookStudio: 'Studio',\n\tlookShowcase: 'Präsentation',\n\tlookNight: 'Nacht',\n\tnightMode: 'Nachtmodus',\n\tlookArctic: 'Arktis',\n\tlookXray: 'Röntgen',\n\tlookLineart: 'Strichzeichnung',\n\tlookWireframe: 'Drahtgitter',\n\n\tsearchObjects: 'Objekte suchen...',\n\tclearSearch: 'Suche löschen',\n\texpandLayer: 'Ebene aufklappen',\n\tcollapseLayer: 'Ebene zuklappen',\n\texpandAll: 'Alle aufklappen',\n\tcollapseAll: 'Alle zuklappen',\n\tshowLayer: 'Ebene einblenden',\n\thideLayer: 'Ebene ausblenden',\n\tshowObject: 'Objekt einblenden',\n\thideObject: 'Objekt ausblenden',\n\tnoObjects: 'Keine Objekte',\n\tnoResultsFor: 'Keine Ergebnisse für „{query}“',\n\n\tobjectFallbackName: 'Objekt',\n\tnoMetadata: 'Keine Metadaten',\n\n\tloadingSchema: 'Wird geladen…',\n\tsolveBlocked: 'Die Definition hat diese Berechnung gestoppt. Es wurden keine Ergebnisse erzeugt.',\n\tsolveBlockedTitle: 'Berechnung gestoppt',\n\tsolveMessagesTitle: 'Meldungen zur Berechnung',\n\tsolveMessagesDescription:\n\t\t'Diese Berechnung hat Folgendes gemeldet. Weiter, um das Ergebnis zu sehen.',\n\tsolveMessagesConfirm: 'Weiter',\n\tsolveMessagesDiscard: 'Verwerfen',\n\tsolveMessagesAbort: 'Abbrechen',\n\tsolveMessagesEscHint: 'Esc bricht die Berechnung ab',\n\tsolveMessagesDismiss: 'Schliessen',\n\tsolveSolving: 'Berechnung läuft…',\n\tsolveDone: 'Fertig',\n\tsolveStopped: 'Abgebrochen',\n\tparametersTab: 'Parameter',\n\tmoreTab: 'Mehr',\n\tscrollTabsBack: 'Vorherige Tabs',\n\tscrollTabsForward: 'Weitere Tabs',\n\texpandSidePanel: '{side} Bereich aufklappen',\n\tpanelSideLeft: 'Linken',\n\tpanelSideRight: 'Rechten',\n\ttabNoGroups: 'Für diesen Tab sind keine Gruppen konfiguriert.',\n\n\tsolving: 'Berechnung läuft',\n\tsolvingEllipsis: 'Berechnung läuft...',\n\tsolvingSubtitle: 'Das kann einen Moment dauern…',\n\tpressToCalculate: 'Berechnen',\n\tcalculate: 'Berechnen',\n\tupToDate: 'Berechnet',\n\tmoreActions: 'Weitere Aktionen',\n\tcalculatesFirst: 'Berechnet zuerst',\n\n\terrorCountOne: '{count} Fehler',\n\terrorCountOther: '{count} Fehler',\n\twarningCountOne: '{count} Warnung',\n\twarningCountOther: '{count} Warnungen',\n\tnoteCountOne: '{count} Hinweis',\n\tnoteCountOther: '{count} Hinweise',\n\tlastSolveMessagesOne: '{count} Meldung der letzten Berechnung',\n\tlastSolveMessagesOther: '{count} Meldungen der letzten Berechnung',\n\tmessagesTitle: 'Meldungen',\n\tcopyright: 'von {name} © {year}',\n\tclose: 'Schliessen',\n\ttoggleTheme: 'Farbschema wechseln',\n\terrorTitle: 'Fehler',\n\tgoHome: 'Zur Startseite',\n\n\tselectOption: 'Option wählen…',\n\tnoOptionsYet: 'Noch keine Optionen verfügbar.',\n\tminValue: 'Der kleinste erlaubte Wert ist {min}',\n\tmaxValue: 'Der grösste erlaubte Wert ist {max}',\n\tfineDragHint: 'Umschalttaste halten für feine Schritte',\n\tmaxLength: 'Höchstens {max} Zeichen erlaubt',\n\tinvalidFormat: 'Ungültiges Format',\n\tcolorPick: 'Farbe wählen, aktuell {color}',\n\tcolorArea: 'Sättigung und Helligkeit',\n\tcolorAreaValue: 'Sättigung {s} %, Helligkeit {v} %',\n\tcolorHue: 'Farbton',\n\tcolorHex: 'Hex-Farbe',\n\tcolorHexInvalid: 'Hex-Farbe eingeben, z. B. #2f6fd6',\n\tcolorPresets: 'Vorgaben',\n\tcolorEyedropper: 'Farbe vom Bildschirm aufnehmen',\n\tinvalidPattern: 'Ungültiges Prüfmuster hinterlegt',\n\n\tgeometryPickAnyOne: 'Objekt wählen',\n\tgeometryPickAnyOther: 'Objekte wählen',\n\tgeometryPicking: 'Im Ansichtsfenster wählen, Esc bricht ab',\n\tgeometryPickInPanel: 'Im Rhino-Panel wählen',\n\tgeometryPickAgain: 'Neu wählen',\n\tgeometryClear: 'Leeren',\n\tgeometryPickPointOne: 'Punkt wählen',\n\tgeometryPickPointOther: 'Punkte wählen',\n\tgeometryPickPointCloudOne: 'Punktwolke wählen',\n\tgeometryPickPointCloudOther: 'Punktwolken wählen',\n\tgeometryPickCurveOne: 'Kurve wählen',\n\tgeometryPickCurveOther: 'Kurven wählen',\n\tgeometryPickLineOne: 'Linie wählen',\n\tgeometryPickLineOther: 'Linien wählen',\n\tgeometryPickPlaneOne: 'Ebene wählen',\n\tgeometryPickPlaneOther: 'Ebenen wählen',\n\tgeometryPickSurfaceOne: 'Fläche wählen',\n\tgeometryPickSurfaceOther: 'Flächen wählen',\n\tgeometryPickPolysurfaceOne: 'Flächenverband wählen',\n\tgeometryPickPolysurfaceOther: 'Flächenverbände wählen',\n\tgeometryPickExtrusionOne: 'Extrusion wählen',\n\tgeometryPickExtrusionOther: 'Extrusionen wählen',\n\tgeometryPickMeshOne: 'Netz wählen',\n\tgeometryPickMeshOther: 'Netze wählen',\n\tgeometryPickSubdOne: 'SubD wählen',\n\tgeometryPickSubdOther: 'SubDs wählen',\n\tgeometryPickBlockOne: 'Block wählen',\n\tgeometryPickBlockOther: 'Blöcke wählen',\n\n\tfileModeUpload: 'Hochladen',\n\tfileModeUrl: 'URL',\n\tfileUrlLabel: 'Datei-URL',\n\tfetchFile: 'Abrufen',\n\tfetchingFile: 'Wird abgerufen…',\n\tfileUrlPublic: 'Die URL muss öffentlich erreichbar sein (ohne Anmeldung).',\n\tchooseFile: 'Datei wählen oder hierher ziehen',\n\tacceptedFormats: 'Erlaubte Formate: {formats}',\n\tuploadedFile: 'Hochgeladene Datei ({ext})',\n\tuploadedFileSize: 'Hochgeladene Datei ({ext}, {size} MB)',\n\tfileLoaded: '{ext} geladen ({size} KB)',\n\turlInvalid: 'Ungültige URL – sie muss mit https:// beginnen',\n\turlProtocolUnsupported: 'Nur http://- und https://-URLs werden unterstützt.',\n\turlServerError:\n\t\t'Der Server antwortete mit {status}. Ist die URL korrekt und öffentlich erreichbar?',\n\tfileFormatNotAccepted: 'Dateiformat „{ext}“ ist nicht erlaubt. Erlaubt: {formats}',\n\tfileTooLarge: 'Datei zu gross: {size} MB (höchstens {max} MB).',\n\tfileTooLargeUseUpload: 'Datei herunterladen und stattdessen über „Hochladen“ einfügen.',\n\tfileReadFailed: 'Die heruntergeladene Datei konnte nicht gelesen werden.',\n\turlUnreachable:\n\t\t'„{host}“ ist nicht erreichbar – die Datei existiert vielleicht nicht, oder der Server erlaubt keinen Zugriff aus dem Browser.',\n\turlUnreachableHint:\n\t\t'Prüfen, ob die URL stimmt und die Datei öffentlich erreichbar ist. Verlangt der Server eine Anmeldung: Datei herunterladen und über „Hochladen“ einfügen.',\n\turlHintSharePoint:\n\t\t'SharePoint/OneDrive sperrt den Zugriff aus dem Browser. Datei in SharePoint öffnen, mit „Herunterladen“ lokal speichern und hier hochladen.',\n\turlHintGoogleDrive:\n\t\t'Google Drive sperrt den Zugriff aus dem Browser. Datei in Google Drive mit „Herunterladen“ lokal speichern und hier hochladen.',\n\turlHintDropbox:\n\t\t'Dropbox-Links sperren den Zugriff aus dem Browser oft. In der URL „?dl=0“ durch „?dl=1“ ersetzen oder die Datei herunterladen und hochladen.',\n\tunknownError: 'Unbekannter Fehler',\n\n\twaitingForData: 'Noch keine Daten',\n\twaitingForFiles: 'Noch keine Dateien',\n\tfileCount: '{count} Dateien',\n\tduplicateFilesTitle: 'Doppelte Dateinamen',\n\tduplicatePathsOne: 'Dieser Pfad kommt mehrfach vor:',\n\tduplicatePathsOther: 'Diese Pfade kommen mehrfach vor:',\n\tduplicateFilesHint:\n\t\t'Ausgaben in der Grasshopper-Definition umbenennen, damit jede Datei einen eindeutigen Namen hat.',\n\tdownloadFile: 'Datei herunterladen',\n\tdownloadFiles: '{count} Dateien herunterladen',\n\tdownloading: 'Wird heruntergeladen…',\n\tdownloadFailed: 'Download fehlgeschlagen',\n\tfilesMadeOnDownload: 'Wird beim Herunterladen erstellt',\n\tdownload: 'Herunterladen',\n\tmakingFiles: 'Dateien werden erstellt',\n\tfilesMadeIn: 'Erstellt in {seconds} s',\n\tnoFilesForInputs: 'Für diese Eingaben gibt es nichts herunterzuladen.',\n\ttryAgain: 'Erneut versuchen',\n\tcancel: 'Abbrechen',\n\tcopy: 'Kopieren',\n\tcopied: 'Kopiert!',\n\tchartReceiving: 'Diagrammdaten werden empfangen…',\n\tchartRenderFailed: 'Diagramm konnte nicht dargestellt werden',\n\tdownloadChartImage: 'Diagramm als Bild herunterladen',\n\tfullscreenUnavailable: 'Vollbild nicht verfügbar: {error}',\n\texitFullscreenFailed: 'Vollbild konnte nicht beendet werden: {error}',\n\n\timageViewer: 'Bildbetrachter',\n\timageLoading: 'Bild wird geladen…',\n\timageUnsupported: 'Bildformat nicht unterstützt: {ext}. Unterstützt: {formats}',\n\timageUnknownFormat: '(unbekannt)',\n\timageDecodeFailed: '{file} konnte nicht gelesen werden',\n\tpreviousImage: 'Vorheriges Bild',\n\tnextImage: 'Nächstes Bild',\n\tzoomHint: 'Zum Zoomen Strg oder ⌘ halten und scrollen',\n\tzoomIn: 'Vergrössern',\n\tzoomOut: 'Verkleinern',\n\tzoomFit: 'Einpassen',\n\tzoomActual: 'Originalgrösse',\n\tdownloadImage: 'Bild herunterladen'\n};\n\nexport const VIEWER_MESSAGES: Record<Locale, ViewerMessages> = { en, de };\n\nexport const DEFAULT_LOCALE: Locale = 'en';\n\n/** Resolve a catalog for a locale, falling back to English for unknown locales. */\nexport function messagesFor(locale: Locale | undefined): ViewerMessages {\n\treturn VIEWER_MESSAGES[locale ?? DEFAULT_LOCALE] ?? VIEWER_MESSAGES[DEFAULT_LOCALE];\n}\n\n/** Layers a host's partial overrides over a full catalog. An `undefined` entry keeps the base string. */\nexport function withOverrides(\n\tbase: ViewerMessages,\n\toverrides: Partial<ViewerMessages> | undefined\n): ViewerMessages {\n\tif (!overrides) return base;\n\tconst merged = { ...base };\n\tfor (const [key, value] of Object.entries(overrides) as [keyof ViewerMessages, string][]) {\n\t\tif (value !== undefined) merged[key] = value;\n\t}\n\treturn merged;\n}\n\n/** Fills each `{name}` placeholder from `vars`; an unknown placeholder is left as written. */\nexport function formatMessage(template: string, vars: Record<string, string | number>): string {\n\treturn template.replace(/\\{(\\w+)\\}/g, (placeholder, name: string) =>\n\t\tname in vars ? String(vars[name]) : placeholder\n\t);\n}\n\n/** Picks the singular or plural form for `count` and fills its `{count}`. */\nexport function formatCount(count: number, one: string, other: string): string {\n\treturn formatMessage(count === 1 ? one : other, { count });\n}\n","import { getContext, setContext } from 'svelte';\nimport {\n\ttype Locale,\n\ttype ViewerMessages,\n\tmessagesFor,\n\twithOverrides,\n\tDEFAULT_LOCALE\n} from './messages';\n\n// Carries the UI locale down to the viewer and its panels without threading a\n// `lang` prop through every layer.\n//\n// Resolution order for any consuming component:\n// explicit `lang` prop → nearest locale context → English default\n// and the strings are that locale's catalog with any `messages` overrides on top.\n//\n// Two ways to provide it:\n// - Standalone: <Viewer lang=\"de\" /> — Viewer provides the context itself.\n// - In an app: call setLocaleContext(() => app.locale) once at the root; the\n// viewer (and anything else) reads it.\n\nconst LOCALE_CONTEXT_KEY = Symbol('viewer-locale-context');\n\nexport interface LocaleContext {\n\treadonly locale: Locale;\n\treadonly messages: ViewerMessages;\n}\n\n/**\n * Provide the locale to descendants. Pass getters, not values: they are re-read on every\n * consumer render, so a reactive source (a `$state`, the app's Paraglide locale) switches\n * the language live. `getOverrides` replaces individual strings of the resolved catalog.\n */\nexport function setLocaleContext(\n\tgetLocale: () => Locale | undefined,\n\tgetOverrides?: () => Partial<ViewerMessages> | undefined\n): void {\n\tconst ctx: LocaleContext = {\n\t\tget locale() {\n\t\t\treturn getLocale() ?? DEFAULT_LOCALE;\n\t\t},\n\t\tget messages() {\n\t\t\treturn withOverrides(messagesFor(getLocale()), getOverrides?.());\n\t\t}\n\t};\n\tsetContext(LOCALE_CONTEXT_KEY, ctx);\n}\n\n/**\n * Re-provides the nearest context for a component that takes its own `lang`/`messages` props.\n * Without `lang`, or with the inherited locale, the subtree keeps the overrides an outer provider\n * applied; a different `lang` starts from that locale's catalog, since those overrides were\n * written for another language.\n */\nexport function layerLocaleContext(\n\tgetLang: () => Locale | undefined,\n\tgetOverrides?: () => Partial<ViewerMessages> | undefined\n): LocaleContext {\n\tconst outer = getLocaleContext();\n\tconst ctx: LocaleContext = {\n\t\tget locale() {\n\t\t\treturn getLang() ?? outer.locale;\n\t\t},\n\t\tget messages() {\n\t\t\tconst lang = getLang();\n\t\t\tconst base = lang === undefined || lang === outer.locale ? outer.messages : messagesFor(lang);\n\t\t\treturn withOverrides(base, getOverrides?.());\n\t\t}\n\t};\n\tsetContext(LOCALE_CONTEXT_KEY, ctx);\n\treturn ctx;\n}\n\n/**\n * Falls back to an English-only context when no provider exists (a primitive used in\n * isolation), so consumers never need a null check.\n */\nexport function getLocaleContext(): LocaleContext {\n\treturn (\n\t\tgetContext<LocaleContext | undefined>(LOCALE_CONTEXT_KEY) ?? {\n\t\t\tget locale() {\n\t\t\t\treturn DEFAULT_LOCALE;\n\t\t\t},\n\t\t\tget messages() {\n\t\t\t\treturn messagesFor(DEFAULT_LOCALE);\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,SAAgB,YAAY,QAA4C;CACvE,OAAO,gBAAgB,UAAA,SAA6B,gBAAA;AACrD;;AAGA,SAAgB,cACf,MACA,WACiB;CACjB,IAAI,CAAC,WAAW,OAAO;CACvB,MAAM,SAAS,EAAE,GAAG,KAAK;CACzB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,SAAS,GAClD,IAAI,UAAU,KAAA,GAAW,OAAO,OAAO;CAExC,OAAO;AACR;;AAGA,SAAgB,cAAc,UAAkB,MAA+C;CAC9F,OAAO,SAAS,QAAQ,eAAe,aAAa,SACnD,QAAQ,OAAO,OAAO,KAAK,KAAK,IAAI,WACrC;AACD;;AAGA,SAAgB,YAAY,OAAe,KAAa,OAAuB;CAC9E,OAAO,cAAc,UAAU,IAAI,MAAM,OAAO,EAAE,MAAM,CAAC;AAC1D;;ACrsBA,IAAM,qBAAqB,OAAO,uBAAuB;;;;;;;AAiCzD,SAAgB,mBACf,SACA,cACgB;CAChB,MAAM,QAAQ,iBAAA;CACd,MAAM,MAAA;EACL,IAAI,SAAS;GACZ,OAAO,QAAA,KAAa,MAAM;EAC3B;EACA,IAAI,WAAW;GACd,MAAM,OAAO,QAAA;GAEb,OAAO,cADM,SAAS,KAAA,KAAa,SAAS,MAAM,SAAS,MAAM,WAAW,YAAY,IAAI,GACjE,eAAA,CAAA;EAC5B;;CAED,WAAW,oBAAoB,GAAG;CAClC,OAAO;AACR;;;;;AAMA,SAAgB,mBAAkC;CACjD,OACC,WAAsC,kBAAkB,KAAA;EACvD,IAAI,SAAS;GACZ,OAAA;EACD;EACA,IAAI,WAAW;GACd,OAAO,YAAA,IAA0B;EAClC;;AAGH"}
@@ -19,15 +19,24 @@ import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, ran
19
19
  var OAUTH_SCOPES = [
20
20
  "read",
21
21
  "solve",
22
+ "write",
22
23
  "upload",
23
24
  "create_projects"
24
25
  ];
25
26
  /**
26
- * All a registered (DCR or CIMD) client can be granted. Its name and redirects
27
+ * All a host may hand registered (DCR or CIMD) clients. Their name and redirects
27
28
  * are whatever the registrant chose, so `upload`, which puts code on the org's
28
- * Compute server, and `create_projects` stay with the built-in client and a
29
- * look-alike can't phish for them.
29
+ * Compute server, and `create_projects` aren't here. `write` is, but `write:all`
30
+ * covers both at `/api/v1` and can delete projects and definitions, so it is
31
+ * off by default. An allowlist: a new scope reaches registered clients only
32
+ * once it is added here.
30
33
  */
34
+ var REGISTERABLE_SCOPES = [
35
+ "read",
36
+ "solve",
37
+ "write"
38
+ ];
39
+ /** The default `registeredClientScopes`. */
31
40
  var REGISTERED_CLIENT_SCOPES = ["read", "solve"];
32
41
  var GRASSHOPPER_CLIENT = {
33
42
  clientId: "selva-grasshopper",
@@ -74,20 +83,26 @@ function mcpResourceUrl(origin) {
74
83
  function resourceMetadataUrl(origin) {
75
84
  return `${origin}/.well-known/oauth-protected-resource${MCP_PATH}`;
76
85
  }
77
- /** RFC 9728. Claude uses only the first authorization server. */
78
- function protectedResourceMetadata(origin) {
86
+ /**
87
+ * RFC 9728. Claude uses only the first authorization server. `scopes` is what a
88
+ * registered client may be granted; prefer the server's own method, which
89
+ * passes its `registeredClientScopes`.
90
+ */
91
+ function protectedResourceMetadata(origin, scopes = REGISTERED_CLIENT_SCOPES) {
79
92
  return {
80
93
  resource: mcpResourceUrl(origin),
81
94
  authorization_servers: [origin],
82
- scopes_supported: [...REGISTERED_CLIENT_SCOPES],
95
+ scopes_supported: [...scopes],
83
96
  bearer_methods_supported: ["header"]
84
97
  };
85
98
  }
86
99
  /**
87
100
  * RFC 8414. Claude picks Client ID Metadata Documents only when both
88
101
  * `client_id_metadata_document_supported` and the `none` auth method appear.
102
+ * Advertises only scopes some client can be granted: a client that asks for one
103
+ * it can never get re-authorizes in a loop. Prefer the server's own method.
89
104
  */
90
- function authorizationServerMetadata(origin) {
105
+ function authorizationServerMetadata(origin, registeredScopes = REGISTERED_CLIENT_SCOPES) {
91
106
  return {
92
107
  issuer: origin,
93
108
  authorization_endpoint: `${origin}/oauth/authorize`,
@@ -97,11 +112,21 @@ function authorizationServerMetadata(origin) {
97
112
  grant_types_supported: ["authorization_code"],
98
113
  code_challenge_methods_supported: ["S256"],
99
114
  token_endpoint_auth_methods_supported: ["none"],
100
- scopes_supported: [...OAUTH_SCOPES],
115
+ scopes_supported: OAUTH_SCOPES.filter((s) => GRASSHOPPER_CLIENT.scopes.includes(s) || registeredScopes.includes(s)),
101
116
  client_id_metadata_document_supported: true,
102
117
  authorization_response_iss_parameter_supported: true
103
118
  };
104
119
  }
120
+ /**
121
+ * The host's list, checked: a JS host or a cast gets past the type, and a list
122
+ * without `read` would leave every consent page empty with a message blaming
123
+ * the user's account.
124
+ */
125
+ function checkRegisteredScopes(scopes) {
126
+ for (const s of scopes) if (!REGISTERABLE_SCOPES.includes(s)) throw new TypeError(`registeredClientScopes: "${s}" can't be granted to a registered client.`);
127
+ if (!scopes.includes("read")) throw new TypeError("registeredClientScopes must include \"read\".");
128
+ return REGISTERABLE_SCOPES.filter((s) => scopes.includes(s));
129
+ }
105
130
  function createOAuthServer(options) {
106
131
  const { origin } = options;
107
132
  const now = options.now ?? Date.now;
@@ -111,6 +136,7 @@ function createOAuthServer(options) {
111
136
  const previousSignKey = previous ? derive(previous, "selva-oauth-client") : void 0;
112
137
  const previousCodeKey = previous ? derive(previous, `selva-oauth-code:${origin}`) : void 0;
113
138
  const redeemed = options.redeemedCodes ?? /* @__PURE__ */ new Map();
139
+ const registeredScopes = checkRegisteredScopes(options.registeredClientScopes ?? REGISTERED_CLIENT_SCOPES);
114
140
  const metadataCache = /* @__PURE__ */ new Map();
115
141
  /** RFC 7591. The client id carries the metadata, signed, so nothing is stored. */
116
142
  function register(input) {
@@ -159,7 +185,7 @@ function createOAuthServer(options) {
159
185
  name: meta.n || "An MCP client",
160
186
  redirectUris: meta.r,
161
187
  builtIn: false,
162
- scopes: REGISTERED_CLIENT_SCOPES
188
+ scopes: registeredScopes
163
189
  };
164
190
  }
165
191
  async function metadataClient(url) {
@@ -170,7 +196,7 @@ function createOAuthServer(options) {
170
196
  }
171
197
  if (!options.fetchClientMetadata) throw new OAuthError("invalid_client", "This server does not accept URL client ids.");
172
198
  try {
173
- const client = await readMetadata(url, options.fetchClientMetadata);
199
+ const client = await readMetadata(url, options.fetchClientMetadata, registeredScopes);
174
200
  remember(url, {
175
201
  at: now(),
176
202
  client
@@ -284,15 +310,17 @@ function createOAuthServer(options) {
284
310
  approve,
285
311
  deny,
286
312
  exchange,
287
- protectedResourceMetadata: () => protectedResourceMetadata(origin),
288
- authorizationServerMetadata: () => authorizationServerMetadata(origin)
313
+ /** All a registered client can be granted: the MCP 401 challenge's scopes. */
314
+ registeredScopes,
315
+ protectedResourceMetadata: () => protectedResourceMetadata(origin, registeredScopes),
316
+ authorizationServerMetadata: () => authorizationServerMetadata(origin, registeredScopes)
289
317
  };
290
318
  }
291
319
  /** OAuth scopes to the API scopes a minted token gets. */
292
320
  function apiScopesFor(scopes) {
293
321
  return scopes.map((s) => `${s}:all`);
294
322
  }
295
- async function readMetadata(url, fetchClientMetadata) {
323
+ async function readMetadata(url, fetchClientMetadata, scopes) {
296
324
  let doc;
297
325
  try {
298
326
  doc = await fetchClientMetadata(url);
@@ -305,7 +333,7 @@ async function readMetadata(url, fetchClientMetadata) {
305
333
  name: typeof doc.client_name === "string" && doc.client_name.trim() ? doc.client_name.trim().slice(0, CLIENT_NAME_MAX) : new URL(url).host,
306
334
  redirectUris: checkRedirectUris(doc.redirect_uris),
307
335
  builtIn: false,
308
- scopes: REGISTERED_CLIENT_SCOPES
336
+ scopes
309
337
  };
310
338
  }
311
339
  /**
@@ -313,34 +341,52 @@ async function readMetadata(url, fetchClientMetadata) {
313
341
  * that is dropped, not refused, so a client that asks for every advertised
314
342
  * scope still signs in with what it may have. No `scope` at all means all of
315
343
  * them. Asking only for scopes it may not have gets `read`, never more than it
316
- * asked for. `read` rides along with `solve`, which the consent page offers as
317
- * "read and run solves".
344
+ * asked for. `read` rides along with `solve` and `write`, which the consent
345
+ * page offers as "read and run solves" and "read and change".
318
346
  */
319
347
  function parseScopes(raw, allowed) {
320
348
  const requested = (raw ?? "").split(" ").filter(Boolean);
321
349
  if (!requested.length) return [...allowed];
322
350
  const asked = requested.filter((s) => allowed.includes(s));
323
351
  if (!asked.length) return allowed.includes("read") ? ["read"] : [];
324
- return allowed.filter((s) => asked.includes(s) || s === "read" && asked.includes("solve"));
352
+ const impliesRead = asked.includes("solve") || asked.includes("write");
353
+ return allowed.filter((s) => asked.includes(s) || s === "read" && impliesRead);
325
354
  }
326
355
  /**
327
- * The access levels a consent page offers for a request, narrowest first. The
328
- * user may narrow what the client asked for, never widen it. An upload request
329
- * is offered as asked: narrowing it to read would leave the client unable to
330
- * do the one thing it signed in for.
356
+ * The access levels a consent page offers for a request: `read` first, all it
357
+ * asked for last. The user may narrow what the client asked for, never widen
358
+ * it. `write` is offered with and without `solve`, so change access needn't
359
+ * spend compute budget, and a host policy that allows one can still grant it.
360
+ * An upload request is offered as asked: narrowing it to read would leave the
361
+ * client unable to do the one thing it signed in for.
331
362
  */
332
363
  function consentChoices(scopes) {
364
+ if (!scopes.length) return [];
333
365
  if (scopes.includes("upload")) return [{
334
366
  access: "upload",
335
367
  scopes: [...scopes]
336
368
  }];
369
+ const solve = scopes.includes("solve");
370
+ const write = scopes.includes("write");
337
371
  const choices = [{
338
372
  access: "read",
339
373
  scopes: ["read"]
340
374
  }];
341
- if (scopes.includes("solve")) choices.push({
375
+ if (solve) choices.push({
342
376
  access: "solve",
343
- scopes: [...scopes]
377
+ scopes: ["read", "solve"]
378
+ });
379
+ if (write) choices.push({
380
+ access: "write",
381
+ scopes: ["read", "write"]
382
+ });
383
+ if (solve && write) choices.push({
384
+ access: "write_and_solve",
385
+ scopes: [
386
+ "read",
387
+ "solve",
388
+ "write"
389
+ ]
344
390
  });
345
391
  return choices;
346
392
  }
@@ -422,6 +468,6 @@ function safeEqual(a, b) {
422
468
  const y = Buffer.from(b);
423
469
  return x.length === y.length && timingSafeEqual(x, y);
424
470
  }
425
- export { authorizationServerMetadata as a, isLoopbackRedirect as c, apiScopesFor as i, protectedResourceMetadata as l, OAuthError as n, consentChoices as o, REGISTERED_CLIENT_SCOPES as r, createOAuthServer as s, CODE_TTL_MS as t, resourceMetadataUrl as u };
471
+ export { createOAuthServer as a, consentChoices as i, OAuthError as n, isLoopbackRedirect as o, apiScopesFor as r, resourceMetadataUrl as s, CODE_TTL_MS as t };
426
472
 
427
473
  //# sourceMappingURL=oauth.js.map