reactive-md 0.9.1 → 0.9.2

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 (292) hide show
  1. package/CHANGELOG-ch.md +333 -319
  2. package/CHANGELOG.md +334 -320
  3. package/CONTRIBUTING-ch.md +22 -22
  4. package/CONTRIBUTING.md +22 -22
  5. package/README-ch.md +431 -431
  6. package/README-en.md +431 -431
  7. package/README.md +429 -429
  8. package/SECURITY-ch.md +83 -83
  9. package/SECURITY.md +83 -83
  10. package/bin/reactive-md.mjs +39 -39
  11. package/cli/args.mjs +263 -263
  12. package/cli/assets.mjs +395 -395
  13. package/cli/build.mjs +445 -445
  14. package/cli/check.mjs +444 -444
  15. package/cli/document.mjs +130 -130
  16. package/cli/errors.mjs +61 -61
  17. package/cli/fs-utils.mjs +133 -133
  18. package/cli/glob.mjs +203 -203
  19. package/cli/help.mjs +323 -323
  20. package/cli/init.mjs +1577 -1577
  21. package/cli/lint.mjs +177 -177
  22. package/cli/main.mjs +65 -65
  23. package/cli/migrate.mjs +368 -368
  24. package/cli/package-loader.mjs +41 -41
  25. package/cli/package.mjs +211 -211
  26. package/dist-library/{LocalDocumentView-sthUP0ct.js → LocalDocumentView-BuqgJZEY.js} +11 -11
  27. package/dist-library/{LocalDocumentViewCore-GiWV3bey.js → LocalDocumentViewCore-DXE0I0Qc.js} +210 -209
  28. package/dist-library/{LocalReactiveDocumentCore-ZjQSGyHE.js → LocalReactiveDocumentCore-CWBe4Mm5.js} +8 -8
  29. package/dist-library/{authoring-Dsune4Hy.js → authoring-Ci_KzJ0q.js} +53 -53
  30. package/dist-library/{compile-wUv8KEge.js → compile-Dx6Uw3D9.js} +11 -11
  31. package/dist-library/{compiler-core-As_m-MNm.js → compiler-core-DDDdvuLy.js} +883 -818
  32. package/dist-library/compiler-dxLPB9Ym.js +86 -0
  33. package/dist-library/{component-state-C52ZFJGl.js → component-state-BRwvTV0d.js} +15 -14
  34. package/dist-library/component-state-CwKX_SN5.js +763 -0
  35. package/dist-library/{config-BadfhjdP.js → config-DXLvctiZ.js} +68 -66
  36. package/dist-library/config-validation-D3D7Dy2J.js +586 -0
  37. package/dist-library/{controls-CcT6n7k_.js → controls-DoZyLCrV.js} +3 -3
  38. package/dist-library/{coordinate-CWS9p5q_.js → coordinate-B1VFK9fd.js} +2 -2
  39. package/dist-library/{data-table-Bgccxd7h.js → data-table-8-3F15Jf.js} +3 -3
  40. package/dist-library/{default-components-BwQf0oP-.js → default-components-s21NevON.js} +29 -28
  41. package/dist-library/{display-B-VhqVND.js → display-B_uutKkN.js} +1 -1
  42. package/dist-library/{config-validation-F47AcE6o.js → document-theme-C8J6UyNO.js} +193 -731
  43. package/dist-library/{export-BqVmTXm8.js → export-CIAIPBov.js} +35 -34
  44. package/dist-library/{gallery-CY6mTx8i.js → gallery-Dv1rOvL0.js} +1 -1
  45. package/dist-library/{html-CNT4KD-2.js → html-Cr4CBwAH.js} +42 -41
  46. package/dist-library/identity-BUx0Q_-d.js +40 -0
  47. package/dist-library/{incremental-Dv0FSp_U.js → incremental-9nx92u9c.js} +12 -10
  48. package/dist-library/{layout-C0YlEPGr.js → layout-BBB2VF0S.js} +1 -1
  49. package/dist-library/{mount-preset-KxvtKgJb.js → mount-preset-DMZ5wd3t.js} +3 -3
  50. package/dist-library/observability-4KqXhIEU.js +421 -0
  51. package/dist-library/observability-core-Bcu7vpnl.js +24 -0
  52. package/dist-library/{options-1aDLK7JY.js → options-BBp9IcHm.js} +4 -4
  53. package/dist-library/{package-core-WFK1RhAZ.js → package-core-K5xesGqy.js} +30 -29
  54. package/dist-library/{parser-standard-Yuf3A_VI.js → parser-standard-CBA1-hdG.js} +352 -352
  55. package/dist-library/{plugin-packs-B1XPWcFs.js → plugin-packs-Bh1HhLym.js} +3 -2
  56. package/dist-library/preset-core-DeZPA8IE.js +1298 -0
  57. package/dist-library/react-0DCh-Mar.js +7 -0
  58. package/dist-library/reactive-md-authoring.js +19 -19
  59. package/dist-library/reactive-md-build.js +48 -10
  60. package/dist-library/reactive-md-compiler-standard.js +6 -6
  61. package/dist-library/reactive-md-compiler.js +3 -3
  62. package/dist-library/reactive-md-default-packs.js +3 -2
  63. package/dist-library/reactive-md-default-preset.js +3 -2
  64. package/dist-library/reactive-md-export.js +4 -4
  65. package/dist-library/reactive-md-minimal-preset.js +2 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +3 -3
  67. package/dist-library/reactive-md-observability.js +4 -0
  68. package/dist-library/reactive-md-plugin-chart.js +3 -3
  69. package/dist-library/reactive-md-plugin-data.js +5 -5
  70. package/dist-library/reactive-md-plugin-diagram.js +4 -4
  71. package/dist-library/reactive-md-plugin-forms.js +4 -4
  72. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  73. package/dist-library/reactive-md-plugin-navigation.js +3 -3
  74. package/dist-library/reactive-md-plugin-network.js +4 -3
  75. package/dist-library/reactive-md-plugin-plot.js +4 -4
  76. package/dist-library/reactive-md-print.css +304 -304
  77. package/dist-library/reactive-md-react-minimal.js +4 -4
  78. package/dist-library/reactive-md-react-server.js +6 -6
  79. package/dist-library/reactive-md-react-unstyled.js +11 -11
  80. package/dist-library/reactive-md-react.js +11 -11
  81. package/dist-library/reactive-md-runtime-browser.js +2 -1
  82. package/dist-library/reactive-md-runtime.js +4 -3
  83. package/dist-library/reactive-md-sdk.js +8 -7
  84. package/dist-library/reactive-md-standalone-configured.js +2 -2
  85. package/dist-library/reactive-md-standalone-host.js +2 -2
  86. package/dist-library/reactive-md-testing-browser.js +2 -2
  87. package/dist-library/reactive-md-testing-react.js +6 -6
  88. package/dist-library/reactive-md-testing.js +5 -5
  89. package/dist-library/reactive-md.js +556 -367
  90. package/dist-library/{registry-B9NGct4d.js → registry-D6OGkOcX.js} +3 -3
  91. package/dist-library/{registry-core-Bbad9Bm2.js → registry-core-C9xOunaw.js} +1 -1
  92. package/dist-library/{resources-D2GDQS0p.js → resources-B0x_w3s9.js} +71 -46
  93. package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
  94. package/dist-library/{runtime-kcA7bG7G.js → runtime-BpQdZmFI.js} +311 -305
  95. package/dist-library/{schema-BufhKUSM.js → schema-BryM_VRW.js} +14 -14
  96. package/dist-library/{sdk-core-BoJT1SIt.js → sdk-core-ChslheKs.js} +33 -32
  97. package/dist-library/{session-core-nmJHuR9c.js → session-core-dxQCJBNa.js} +15 -14
  98. package/dist-library/{shareable-DpbE-59H.js → shareable-B8xMoGEa.js} +179 -176
  99. package/dist-library/types/build/diagnostics.d.ts +1 -1
  100. package/dist-library/types/local/index.d.ts +6 -0
  101. package/dist-library/types/local/observability-codes.d.ts +2 -0
  102. package/dist-library/types/local/observability-core.d.ts +25 -0
  103. package/dist-library/types/local/observability-messages.d.ts +6 -0
  104. package/dist-library/types/local/observability.d.ts +43 -0
  105. package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
  106. package/dist-library/types/local/transport/worker.d.ts +52 -1
  107. package/dist-library/types/local/types.d.ts +8 -0
  108. package/dist-library/types/observability.d.ts +7 -0
  109. package/dist-library/{types-BeNtPqdY.js → types-Ib5kSScP.js} +1 -1
  110. package/dist-library/types-daDo2c_w.js +3 -0
  111. package/dist-library/{validation-BEBA_HvS.js → validation-B3RI0xOk.js} +251 -249
  112. package/dist-library/version-DAxuGOG2.js +147 -0
  113. package/dist-library/{visual-frame-CyV1FXzs.js → visual-frame-_rcd5HUv.js} +1 -1
  114. package/dist-library/{visuals-BZbZYA7w.js → visuals-DkDhNdEZ.js} +17 -17
  115. package/dist-standalone/reactive-md-standalone.js +118 -118
  116. package/docs/README-ch.md +101 -95
  117. package/docs/README.md +101 -95
  118. package/docs/compatibility/api-stability-ch.md +25 -0
  119. package/docs/compatibility/api-stability-en.md +25 -0
  120. package/docs/compatibility/compatibility-ch.md +146 -129
  121. package/docs/compatibility/compatibility-en.md +146 -129
  122. package/docs/compatibility/compatibility-manifest.schema.json +161 -0
  123. package/docs/compatibility/deprecation-ch.md +21 -0
  124. package/docs/compatibility/deprecation-en.md +21 -0
  125. package/docs/compatibility/source-versioning-ch.md +162 -162
  126. package/docs/compatibility/source-versioning-en.md +162 -162
  127. package/docs/compatibility/support-matrix-ch.md +108 -0
  128. package/docs/compatibility/support-matrix-en.md +108 -0
  129. package/docs/development/component-development-ch.md +66 -66
  130. package/docs/development/component-development-en.md +66 -66
  131. package/docs/development/component-development-reference-ch.md +253 -253
  132. package/docs/development/component-development-reference-en.md +238 -238
  133. package/docs/development/component-protocol-ch.md +748 -748
  134. package/docs/development/component-protocol-en.md +750 -750
  135. package/docs/development/extension-tutorial-ch.md +308 -308
  136. package/docs/development/extension-tutorial-en.md +308 -308
  137. package/docs/development/performance-overview-ch.md +422 -422
  138. package/docs/development/performance-overview-en.md +422 -422
  139. package/docs/guides/local-guide-ch.md +532 -532
  140. package/docs/guides/local-guide-en.md +532 -532
  141. package/docs/integration/author-tools-ch.md +64 -64
  142. package/docs/integration/author-tools-en.md +64 -64
  143. package/docs/integration/compiler-ch.md +49 -49
  144. package/docs/integration/compiler-en.md +36 -36
  145. package/docs/integration/directory-discovery-en.md +1 -1
  146. package/docs/integration/editor-ch.md +295 -295
  147. package/docs/integration/editor-en.md +303 -303
  148. package/docs/integration/extension-sdk-ch.md +394 -394
  149. package/docs/integration/extension-sdk-en.md +379 -379
  150. package/docs/integration/local-integration-ch.md +646 -646
  151. package/docs/integration/local-integration-en.md +662 -662
  152. package/docs/integration/shareable-export-ch.md +307 -307
  153. package/docs/integration/shareable-export-en.md +309 -309
  154. package/docs/reference/diagnostics-counting-ch.md +104 -104
  155. package/docs/reference/diagnostics-counting-en.md +104 -104
  156. package/docs/reference/html-compatibility-ch.md +93 -93
  157. package/docs/reference/html-compatibility-en.md +95 -95
  158. package/docs/reference/local-interaction-syntax-ch.md +724 -724
  159. package/docs/reference/local-interaction-syntax-en.md +722 -722
  160. package/docs/reference/public-api-ch.md +33 -4
  161. package/docs/reference/public-api-en.md +33 -4
  162. package/docs/reference/theme-protocol-ch.md +198 -198
  163. package/docs/reference/theme-protocol-en.md +217 -217
  164. package/docs/releases/release-0.4.0-ch.md +91 -91
  165. package/docs/releases/release-0.4.0-en.md +91 -91
  166. package/docs/releases/release-0.4.1-ch.md +25 -25
  167. package/docs/releases/release-0.4.1-en.md +25 -25
  168. package/docs/releases/release-0.5.0-ch.md +43 -43
  169. package/docs/releases/release-0.5.0-en.md +43 -43
  170. package/docs/releases/release-0.5.1-ch.md +41 -41
  171. package/docs/releases/release-0.5.1-en.md +41 -41
  172. package/docs/releases/release-0.5.2-ch.md +37 -37
  173. package/docs/releases/release-0.5.2-en.md +37 -37
  174. package/docs/releases/release-0.5.3-ch.md +26 -26
  175. package/docs/releases/release-0.5.3-en.md +26 -26
  176. package/docs/releases/release-0.6.0-ch.md +59 -59
  177. package/docs/releases/release-0.6.0-en.md +59 -59
  178. package/docs/releases/release-0.6.1-ch.md +29 -29
  179. package/docs/releases/release-0.6.1-en.md +29 -29
  180. package/docs/releases/release-0.7.0-ch.md +86 -86
  181. package/docs/releases/release-0.7.0-en.md +86 -86
  182. package/docs/releases/release-0.9.2-ch.md +33 -0
  183. package/docs/releases/release-0.9.2-en.md +33 -0
  184. package/examples/component-package/README-ch.md +101 -101
  185. package/examples/component-package/README.md +133 -133
  186. package/examples/conformance/README-ch.md +55 -55
  187. package/examples/conformance/README.md +55 -55
  188. package/examples/conformance/component-protocol-1.json +482 -482
  189. package/examples/conformance/component-protocol-1.schema.json +76 -76
  190. package/examples/conformance/local-draft-1.json +50 -50
  191. package/examples/conformance/local-draft-2.json +212 -212
  192. package/examples/game-2048-package/LICENSE +21 -21
  193. package/examples/game-2048-package/NOTICES.md +11 -11
  194. package/examples/game-2048-package/README-ch.md +91 -91
  195. package/examples/game-2048-package/README.md +98 -98
  196. package/examples/game-2048-package/package.json +35 -35
  197. package/examples/game-2048-package/sample/document.reactive.md +17 -17
  198. package/examples/game-2048-package/scripts/build-export.mjs +44 -44
  199. package/examples/game-2048-package/scripts/build.mjs +130 -130
  200. package/examples/game-2048-package/scripts/verify.mjs +180 -180
  201. package/examples/game-2048-package/src/component.css +161 -161
  202. package/examples/game-2048-package/src/components.tsx +326 -326
  203. package/examples/game-2048-package/src/game-engine.ts +228 -228
  204. package/examples/game-2048-package/src/harness.tsx +34 -34
  205. package/examples/game-2048-package/src/manifest.ts +85 -85
  206. package/examples/game-2048-package/src/node-entry.ts +30 -30
  207. package/examples/game-2048-package/src/sample.ts +4 -4
  208. package/examples/game-2048-package/tsconfig.json +15 -15
  209. package/examples/integration/README-ch.md +82 -82
  210. package/examples/integration/README.md +82 -82
  211. package/examples/integration/core/index.mjs +32 -32
  212. package/examples/integration/extension-sdk/README-ch.md +24 -24
  213. package/examples/integration/extension-sdk/README.md +24 -24
  214. package/examples/integration/worker/index.html +19 -19
  215. package/examples/integration/worker/main.js +61 -61
  216. package/examples/integration/worker/package.json +13 -13
  217. package/examples/integration/worker/worker.js +3 -3
  218. package/examples/local/README-ch.md +76 -76
  219. package/examples/local/README.md +76 -76
  220. package/examples/local/charts.reactive.md +73 -73
  221. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  222. package/examples/local/recipes/invoice.reactive.md +36 -36
  223. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  224. package/examples/local/recipes/workshop.reactive.md +33 -33
  225. package/examples/local/showcase/README-ch.md +22 -22
  226. package/examples/local/showcase/README.md +31 -31
  227. package/examples/local/showcase/explore.reactive.md +102 -102
  228. package/examples/local/showcase/flow.reactive.md +86 -86
  229. package/examples/local/showcase/forms.reactive.md +126 -126
  230. package/examples/local/showcase/functions.reactive.md +119 -119
  231. package/examples/local/showcase/layout.reactive.md +100 -100
  232. package/examples/local/showcase/statistics.reactive.md +108 -108
  233. package/examples/local/showcase/tasks.reactive.md +89 -89
  234. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  235. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  236. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  237. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  238. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  239. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  240. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  241. package/examples/minimal-extension/README-ch.md +78 -78
  242. package/examples/minimal-extension/README.md +78 -78
  243. package/examples/minimal-extension/index.html +15 -15
  244. package/examples/minimal-extension/package.json +26 -26
  245. package/examples/minimal-extension/sample/document.reactive.md +10 -10
  246. package/examples/minimal-extension/scripts/build.mjs +32 -32
  247. package/examples/minimal-extension/scripts/export.mjs +72 -72
  248. package/examples/minimal-extension/scripts/test-node.mjs +75 -75
  249. package/examples/minimal-extension/src/extension.tsx +90 -90
  250. package/examples/minimal-extension/src/preview.tsx +12 -12
  251. package/examples/minimal-extension/src/source.ts +4 -4
  252. package/examples/minimal-extension/tsconfig.json +14 -14
  253. package/examples/sci-fi-theme/README-ch.md +133 -133
  254. package/examples/sci-fi-theme/README.md +148 -148
  255. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
  256. package/examples/sci-fi-theme/demo/demo.css +638 -638
  257. package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
  258. package/examples/sci-fi-theme/demo/index.html +13 -13
  259. package/examples/sci-fi-theme/demo/main.tsx +215 -215
  260. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
  261. package/examples/sci-fi-theme/docs/design-system.md +474 -474
  262. package/examples/sci-fi-theme/package.json +28 -28
  263. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
  264. package/examples/sci-fi-theme/src/components.css +2370 -2370
  265. package/examples/sci-fi-theme/src/index.ts +6 -6
  266. package/examples/sci-fi-theme/src/notch.css +142 -142
  267. package/examples/sci-fi-theme/src/sci-fi.css +7 -7
  268. package/examples/sci-fi-theme/src/theme.ts +39 -39
  269. package/examples/sci-fi-theme/tsconfig.json +20 -20
  270. package/examples/sci-fi-theme/vite.config.ts +24 -24
  271. package/examples/tetris-package/LICENSE +21 -21
  272. package/examples/tetris-package/NOTICES.md +11 -11
  273. package/examples/tetris-package/README-ch.md +91 -91
  274. package/examples/tetris-package/README.md +95 -95
  275. package/examples/tetris-package/package.json +35 -35
  276. package/examples/tetris-package/sample/document.reactive.md +16 -16
  277. package/examples/tetris-package/scripts/build-export.mjs +44 -44
  278. package/examples/tetris-package/scripts/build.mjs +130 -130
  279. package/examples/tetris-package/scripts/verify.mjs +173 -173
  280. package/examples/tetris-package/src/component.css +145 -145
  281. package/examples/tetris-package/src/components.tsx +334 -334
  282. package/examples/tetris-package/src/harness.tsx +34 -34
  283. package/examples/tetris-package/src/manifests.ts +93 -93
  284. package/examples/tetris-package/src/node-entry.ts +16 -16
  285. package/examples/tetris-package/src/sample.ts +4 -4
  286. package/examples/tetris-package/src/tetris-engine.ts +325 -325
  287. package/examples/tetris-package/tsconfig.json +15 -15
  288. package/package.json +7 -1
  289. package/dist-library/compiler-eOfcinZs.js +0 -62
  290. package/dist-library/component-state-BoLCGee4.js +0 -801
  291. package/dist-library/preset-core-CKc5YXSM.js +0 -1443
  292. package/dist-library/react-D5iGiUdL.js +0 -7
@@ -1,121 +1,123 @@
1
- import { $ as e, A as t, F as n, I as r, N as i, Q as a, R as o, X as s, Z as c, a as l, i as u, it as d, q as f, st as p, t as m } from "./preset-core-CKc5YXSM.js";
2
- import { D as h, E as g, O as _, T as v, V as y, _ as b, a as x, c as S, d as C, h as w, i as T, m as ee, n as E, o as te, p as ne, r as D, s as re, t as ie, v as ae, y as O } from "./config-validation-F47AcE6o.js";
3
- import { a as k, n as oe, s as se, t as ce } from "./compile-wUv8KEge.js";
4
- import { n as le } from "./props-sJ8vk0cr.js";
5
- import { p as ue, r as de, x as fe } from "./registry-core-Bbad9Bm2.js";
1
+ import { D as e, _ as t, g as n, i as r, o as i, r as a, t as o, v as s, w as c, y as l } from "./version-DAxuGOG2.js";
2
+ import { v as u } from "./document-theme-C8J6UyNO.js";
3
+ import { a as d, n as f, s as p, t as m } from "./compile-Dx6Uw3D9.js";
4
+ import { C as h, S as g, _, a as v, c as y, d as b, h as x, i as S, m as C, n as w, o as T, p as ee, r as E, s as te, t as ne, v as re, w as D, x as O, y as ie } from "./config-validation-D3D7Dy2J.js";
5
+ import { A as ae, N as oe, a as se, i as ce, t as le } from "./preset-core-DeZPA8IE.js";
6
+ import { n as ue } from "./props-sJ8vk0cr.js";
7
+ import { p as de, r as fe, x as pe } from "./registry-core-C9xOunaw.js";
6
8
  // node_modules/devlop/lib/default.js
7
- function pe() {}
9
+ function me() {}
8
10
  // node_modules/mdast-util-to-string/lib/index.js
9
- var me = {};
10
- function he(e, t) {
11
- let n = t || me;
12
- return ge(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
11
+ var he = {};
12
+ function ge(e, t) {
13
+ let n = t || he;
14
+ return _e(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
13
15
  }
14
- function ge(e, t, n) {
15
- if (ve(e)) {
16
+ function _e(e, t, n) {
17
+ if (ye(e)) {
16
18
  if ("value" in e) return e.type === "html" && !n ? "" : e.value;
17
19
  if (t && "alt" in e && e.alt) return e.alt;
18
- if ("children" in e) return _e(e.children, t, n);
20
+ if ("children" in e) return ve(e.children, t, n);
19
21
  }
20
- return Array.isArray(e) ? _e(e, t, n) : "";
22
+ return Array.isArray(e) ? ve(e, t, n) : "";
21
23
  }
22
- function _e(e, t, n) {
24
+ function ve(e, t, n) {
23
25
  let r = [], i = -1;
24
- for (; ++i < e.length;) r[i] = ge(e[i], t, n);
26
+ for (; ++i < e.length;) r[i] = _e(e[i], t, n);
25
27
  return r.join("");
26
28
  }
27
- function ve(e) {
29
+ function ye(e) {
28
30
  return !!(e && typeof e == "object");
29
31
  }
30
32
  // node_modules/micromark-util-chunked/index.js
31
- function A(e, t, n, r) {
33
+ function k(e, t, n, r) {
32
34
  let i = e.length, a = 0, o;
33
35
  if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
34
36
  else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
35
37
  }
36
- function ye(e, t) {
37
- return e.length > 0 ? (A(e, e.length, 0, t), e) : t;
38
+ function be(e, t) {
39
+ return e.length > 0 ? (k(e, e.length, 0, t), e) : t;
38
40
  }
39
41
  // node_modules/micromark-util-combine-extensions/index.js
40
- var j = {}.hasOwnProperty;
41
- function be(e) {
42
+ var A = {}.hasOwnProperty;
43
+ function xe(e) {
42
44
  let t = {}, n = -1;
43
- for (; ++n < e.length;) xe(t, e[n]);
45
+ for (; ++n < e.length;) Se(t, e[n]);
44
46
  return t;
45
47
  }
46
- function xe(e, t) {
48
+ function Se(e, t) {
47
49
  let n;
48
50
  for (n in t) {
49
- let r = (j.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
51
+ let r = (A.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
50
52
  if (i) for (a in i) {
51
- j.call(r, a) || (r[a] = []);
53
+ A.call(r, a) || (r[a] = []);
52
54
  let e = i[a];
53
- Se(r[a], Array.isArray(e) ? e : e ? [e] : []);
55
+ Ce(r[a], Array.isArray(e) ? e : e ? [e] : []);
54
56
  }
55
57
  }
56
58
  }
57
- function Se(e, t) {
59
+ function Ce(e, t) {
58
60
  let n = -1, r = [];
59
61
  for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
60
- A(e, 0, 0, r);
62
+ k(e, 0, 0, r);
61
63
  }
62
64
  // node_modules/micromark-util-normalize-identifier/index.js
63
- function Ce(e) {
65
+ function we(e) {
64
66
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
65
67
  }
66
68
  // node_modules/micromark-util-character/index.js
67
- var we = L(/[A-Za-z]/), Te = L(/[\dA-Za-z]/), Ee = L(/[#-'*+\--9=?A-Z^-~]/);
68
- function De(e) {
69
+ var Te = I(/[A-Za-z]/), Ee = I(/[\dA-Za-z]/), De = I(/[#-'*+\--9=?A-Z^-~]/);
70
+ function Oe(e) {
69
71
  return e !== null && (e < 32 || e === 127);
70
72
  }
71
- var Oe = L(/\d/), ke = L(/[\dA-Fa-f]/), Ae = L(/[!-/:-@[-`{-~]/);
72
- function M(e) {
73
+ var ke = I(/\d/), Ae = I(/[\dA-Fa-f]/), je = I(/[!-/:-@[-`{-~]/);
74
+ function j(e) {
73
75
  return e !== null && e < -2;
74
76
  }
75
- function N(e) {
77
+ function M(e) {
76
78
  return e !== null && (e < 0 || e === 32);
77
79
  }
78
- function P(e) {
80
+ function N(e) {
79
81
  return e === -2 || e === -1 || e === 32;
80
82
  }
81
- var F = L(/\p{P}|\p{S}/u), I = L(/\s/);
82
- function L(e) {
83
+ var P = I(/\p{P}|\p{S}/u), F = I(/\s/);
84
+ function I(e) {
83
85
  return t;
84
86
  function t(t) {
85
87
  return t !== null && t > -1 && e.test(String.fromCharCode(t));
86
88
  }
87
89
  }
88
90
  // node_modules/micromark-factory-space/index.js
89
- function R(e, t, n, r) {
91
+ function L(e, t, n, r) {
90
92
  let i = r ? r - 1 : Infinity, a = 0;
91
93
  return o;
92
94
  function o(r) {
93
- return P(r) ? (e.enter(n), s(r)) : t(r);
95
+ return N(r) ? (e.enter(n), s(r)) : t(r);
94
96
  }
95
97
  function s(r) {
96
- return P(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
98
+ return N(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
97
99
  }
98
100
  }
99
- function je(e, t, n, r, i, a) {
101
+ function Me(e, t, n, r, i, a) {
100
102
  let o = 0;
101
103
  return s;
102
104
  function s(t) {
103
- return a > 0 && P(t) ? (e.enter(r), c(t)) : l(t);
105
+ return a > 0 && N(t) ? (e.enter(r), c(t)) : l(t);
104
106
  }
105
107
  function c(t) {
106
- return P(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
108
+ return N(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
107
109
  }
108
110
  function l(e) {
109
111
  return o >= i ? t(e) : n(e);
110
112
  }
111
113
  }
112
114
  // node_modules/micromark-util-classify-character/index.js
113
- function Me(e) {
114
- if (e === null || N(e) || I(e)) return 1;
115
- if (F(e)) return 2;
115
+ function Ne(e) {
116
+ if (e === null || M(e) || F(e)) return 1;
117
+ if (P(e)) return 2;
116
118
  }
117
119
  // node_modules/micromark-util-resolve-all/index.js
118
- function Ne(e, t, n) {
120
+ function Pe(e, t, n) {
119
121
  let r = [], i = -1;
120
122
  for (; ++i < e.length;) {
121
123
  let a = e[i].resolveAll;
@@ -124,21 +126,21 @@ function Ne(e, t, n) {
124
126
  return t;
125
127
  }
126
128
  // node_modules/micromark-core-commonmark/lib/blank-line.js
127
- var Pe = {
129
+ var Fe = {
128
130
  partial: !0,
129
- tokenize: Fe
131
+ tokenize: Ie
130
132
  };
131
- function Fe(e, t, n) {
133
+ function Ie(e, t, n) {
132
134
  return r;
133
135
  function r(t) {
134
- return P(t) ? R(e, i, "linePrefix")(t) : i(t);
136
+ return N(t) ? L(e, i, "linePrefix")(t) : i(t);
135
137
  }
136
138
  function i(e) {
137
- return e === null || M(e) ? t(e) : n(e);
139
+ return e === null || j(e) ? t(e) : n(e);
138
140
  }
139
141
  }
140
142
  // src/local/html/html-table-names.ts
141
- var Ie = /* @__PURE__ */ new Set([
143
+ var Le = /* @__PURE__ */ new Set([
142
144
  "table",
143
145
  "caption",
144
146
  "colgroup",
@@ -149,7 +151,7 @@ var Ie = /* @__PURE__ */ new Set([
149
151
  "tr",
150
152
  "th",
151
153
  "td"
152
- ]), z = {
154
+ ]), R = {
153
155
  colgroup: /* @__PURE__ */ new Set(["span"]),
154
156
  col: /* @__PURE__ */ new Set(["span"]),
155
157
  td: /* @__PURE__ */ new Set([
@@ -167,13 +169,13 @@ var Ie = /* @__PURE__ */ new Set([
167
169
  "align"
168
170
  ])
169
171
  };
170
- function B(e, t) {
172
+ function z(e, t) {
171
173
  let n = t.trim();
172
174
  return [
173
175
  "colspan",
174
176
  "rowspan",
175
177
  "span"
176
- ].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ? _(t) !== null : e !== "scope" || [
178
+ ].includes(e) ? /^\d{1,5}$/.test(n) && Number(n) <= (e === "rowspan" ? 65534 : 1e3) && Number(n) >= (e === "rowspan" ? 0 : 1) : e === "align" ? D(t) !== null : e !== "scope" || [
177
179
  "row",
178
180
  "col",
179
181
  "rowgroup",
@@ -181,7 +183,7 @@ function B(e, t) {
181
183
  ].includes(n.toLowerCase());
182
184
  }
183
185
  // src/local/html/html-policy.ts
184
- var Le = {
186
+ var Re = {
185
187
  b: "strong",
186
188
  strong: "strong",
187
189
  i: "emphasis",
@@ -192,12 +194,12 @@ var Le = {
192
194
  mark: "mark",
193
195
  sup: "sup",
194
196
  sub: "sub"
195
- }, Re = /* @__PURE__ */ new Set([
197
+ }, ze = /* @__PURE__ */ new Set([
196
198
  "br",
197
199
  "hr",
198
200
  "img",
199
201
  "col"
200
- ]), ze = /* @__PURE__ */ new Set([
202
+ ]), Be = /* @__PURE__ */ new Set([
201
203
  "pre",
202
204
  "code",
203
205
  "script",
@@ -209,12 +211,12 @@ var Le = {
209
211
  "noembed",
210
212
  "noframes",
211
213
  "plaintext"
212
- ]), Be = /* @__PURE__ */ new Set([
214
+ ]), Ve = /* @__PURE__ */ new Set([
213
215
  "id",
214
216
  "title",
215
217
  "lang",
216
218
  "dir"
217
- ]), Ve = {
219
+ ]), He = {
218
220
  a: g,
219
221
  img: /* @__PURE__ */ new Set([
220
222
  "src",
@@ -224,9 +226,9 @@ var Le = {
224
226
  ]),
225
227
  ol: /* @__PURE__ */ new Set(["start"]),
226
228
  details: /* @__PURE__ */ new Set(["open"]),
227
- ...z
229
+ ...R
228
230
  };
229
- function He(e, t, n) {
231
+ function Ue(e, t, n) {
230
232
  let r = "";
231
233
  for (let i = t; i < n; i += 1) {
232
234
  let t = e[i];
@@ -236,36 +238,36 @@ function He(e, t, n) {
236
238
  }
237
239
  return -1;
238
240
  }
239
- function Ue(e, t, n) {
241
+ function We(e, t, n) {
240
242
  if (e.startsWith("<!-->", t)) return Math.min(n, t + 5);
241
243
  if (e.startsWith("<!--->", t)) return Math.min(n, t + 6);
242
244
  let r = e.indexOf("-->", t + 4);
243
245
  return r < 0 || r + 3 > n ? n : r + 3;
244
246
  }
245
- function We(e) {
247
+ function Ge(e) {
246
248
  return e.trim().replace(/[\u0000- ]+/g, "");
247
249
  }
248
- function V(e, t) {
249
- let n = /^([a-z][a-z0-9+.-]*):/i.exec(We(e));
250
+ function B(e, t) {
251
+ let n = /^([a-z][a-z0-9+.-]*):/i.exec(Ge(e));
250
252
  if (!n) return !1;
251
253
  let r = n[1].toLowerCase();
252
254
  return t === "image" ? r !== "http" && r !== "https" : r !== "http" && r !== "https" && r !== "mailto" && r !== "tel";
253
255
  }
254
- function Ge(e, t) {
255
- return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && v.has(e) || Be.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : Ve[e]?.has(t) ?? !1;
256
- }
257
256
  function Ke(e, t) {
257
+ return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && O.has(e) || Ve.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : He[e]?.has(t) ?? !1;
258
+ }
259
+ function qe(e, t) {
258
260
  return !(e === "dir" && ![
259
261
  "ltr",
260
262
  "rtl",
261
263
  "auto"
262
- ].includes(t.trim().toLowerCase()) || e === "id" && t.trim() === "" || (e === "width" || e === "height") && !/^\d{1,6}$/.test(t.trim()) || e === "start" && !/^-?\d{1,9}$/.test(t.trim()) || !B(e, t) || e === "href" && V(t, "link") || e === "src" && V(t, "image"));
264
+ ].includes(t.trim().toLowerCase()) || e === "id" && t.trim() === "" || (e === "width" || e === "height") && !/^\d{1,6}$/.test(t.trim()) || e === "start" && !/^-?\d{1,9}$/.test(t.trim()) || !z(e, t) || e === "href" && B(t, "link") || e === "src" && B(t, "image"));
263
265
  }
264
- function qe(e, t) {
265
- return v.has(e) ? _(t) : null;
266
+ function Je(e, t) {
267
+ return O.has(e) ? D(t) : null;
266
268
  }
267
- // src/local/types.ts
268
- var Je = (e) => e.attrs?.bind ?? `@${e.id}`, Ye = "local-draft-3", Xe = Object.freeze({}), Ze = Object.freeze([
269
+ // src/local/parsing/parser-capabilities.ts
270
+ var Ye = Object.freeze({}), Xe = Object.freeze([
269
271
  "anchor",
270
272
  "checkbox",
271
273
  "column",
@@ -283,80 +285,80 @@ var Je = (e) => e.attrs?.bind ?? `@${e.id}`, Ye = "local-draft-3", Xe = Object.f
283
285
  "toggle",
284
286
  "validation"
285
287
  ]);
286
- function Qe(e) {
288
+ function Ze(e) {
287
289
  let t = /* @__PURE__ */ new Set();
288
- for (let n of Ze) e(n) || t.add(n);
290
+ for (let n of Xe) e(n) || t.add(n);
289
291
  return t;
290
292
  }
291
293
  // src/sdk/compiler-config.ts
292
- var H = Object.freeze({
293
- id: u,
294
- version: l
295
- }), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap();
296
- function G(e, t = H) {
294
+ var V = Object.freeze({
295
+ id: ce,
296
+ version: se
297
+ }), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap();
298
+ function W(e, t = V) {
297
299
  if (e.length === 0) return;
298
- let n = t.id === H.id && t.version === H.version;
300
+ let n = t.id === V.id && t.version === V.version;
299
301
  if (n) {
300
- let t = U.get(e);
302
+ let t = H.get(e);
301
303
  if (t) return t;
302
304
  }
303
- let r = m({
304
- protocol: o,
305
+ let r = le({
306
+ protocol: i,
305
307
  id: t.id,
306
308
  version: t.version,
307
309
  components: e
308
310
  });
309
- return n && U.set(e, r), r;
311
+ return n && H.set(e, r), r;
310
312
  }
311
- function $e(e, t, n, r, i = "reactive-md-config/v1") {
312
- let a = w(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
313
+ function G(e, t, n, r, i = "reactive-md-config/v1") {
314
+ let a = x(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
313
315
  profile: i,
314
316
  key: r
315
317
  })] : []];
316
- return C(e, a, o);
318
+ return b(e, a, o);
317
319
  }
318
- function et(e) {
319
- return x(e) || T("assembly", "must be an object."), D(e, /* @__PURE__ */ new Set([
320
+ function Qe(e) {
321
+ return v(e) || S("assembly", "must be an object."), E(e, /* @__PURE__ */ new Set([
320
322
  "protocol",
321
323
  "presets",
322
324
  "components",
323
325
  "replacementPolicy",
324
326
  "themes"
325
- ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && T("assembly.protocol", `must be "${i}".`), ee(e);
327
+ ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && S("assembly.protocol", `must be "${o}".`), C(e);
326
328
  }
327
- function tt(e, a = [], o = []) {
328
- let s = ae(o);
329
- if (x(e) || T("config", "must be an object."), D(e, ie, "config"), e.protocol === "reactive-md-config/v2") {
330
- let n = et(e.assembly), r = $e(n, a, s);
331
- return t(n) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), r;
329
+ function $e(e, t = [], n = []) {
330
+ let i = re(n);
331
+ if (v(e) || S("config", "must be an object."), E(e, ne, "config"), e.protocol === "reactive-md-config/v2") {
332
+ let n = Qe(e.assembly), r = G(n, t, i);
333
+ return ae(n) > 16777216 && S("config", `serialized size exceeds the ${w}-byte budget.`), r;
332
334
  }
333
- e.protocol !== "reactive-md-config/v1" && T("config.protocol", `must be "${r}" (or legacy "${n}").`);
334
- let c = re(e.presets, H, s)[0] ?? H, l = b(c, s);
335
- l === void 0 && T("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${c.id}" ${c.version}.`);
336
- let u = l.legacyKeys[0];
337
- u === void 0 && T("presets", `local.config.migration-unsupported: profile "${l.name}" has no legacy key mapping.`), S(l, a);
338
- let d = te(e.components, a);
339
- d.some((e) => e.replaces !== void 0) && T("config", "replaces is not supported by reactive-md-config/v1.");
340
- let f = G(a, l.preset), p = Object.freeze({
341
- protocol: i,
342
- presets: Object.freeze(f ? [f] : []),
343
- components: d,
335
+ e.protocol !== "reactive-md-config/v1" && S("config.protocol", `must be "${r}" (or legacy "${a}").`);
336
+ let s = te(e.presets, V, i)[0] ?? V, c = _(s, i);
337
+ c === void 0 && S("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${s.id}" ${s.version}.`);
338
+ let l = c.legacyKeys[0];
339
+ l === void 0 && S("presets", `local.config.migration-unsupported: profile "${c.name}" has no legacy key mapping.`), y(c, t);
340
+ let u = T(e.components, t);
341
+ u.some((e) => e.replaces !== void 0) && S("config", "replaces is not supported by reactive-md-config/v1.");
342
+ let d = W(t, c.preset), f = Object.freeze({
343
+ protocol: o,
344
+ presets: Object.freeze(d ? [d] : []),
345
+ components: u,
344
346
  replacementPolicy: "forbid",
345
347
  themes: Object.freeze([])
346
- }), m = $e(p, a, s, a.length > 0 ? ne(l.preset, d) : void 0, u.profile);
347
- return t(p) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), m;
348
+ }), p = G(f, t, i, t.length > 0 ? ee(c.preset, u) : void 0, l.profile);
349
+ return ae(f) > 16777216 && S("config", `serialized size exceeds the ${w}-byte budget.`), p;
348
350
  }
349
- function nt(e) {
350
- let t = W.get(e);
351
+ function et(e) {
352
+ let t = U.get(e);
351
353
  if (t !== void 0) return t;
352
- let n = G(e), r = Object.freeze({
353
- protocol: i,
354
+ let n = W(e), r = Object.freeze({
355
+ protocol: o,
354
356
  presets: Object.freeze(n ? [n] : []),
355
357
  components: Object.freeze([]),
356
358
  replacementPolicy: "forbid",
357
359
  themes: Object.freeze([])
358
- }), a = w(r).key;
359
- return W.set(e, a), a;
360
+ }), i = x(r).key;
361
+ return U.set(e, i), i;
360
362
  }
361
363
  // src/local/configuration/capability-policy.ts
362
364
  var K = Object.freeze({
@@ -364,7 +366,7 @@ var K = Object.freeze({
364
366
  enableJavaScript: !1,
365
367
  enableExtendedHtml: !1
366
368
  });
367
- function rt(e, t) {
369
+ function tt(e, t) {
368
370
  return {
369
371
  enableCss: e?.enableCss === !0 && (t?.enableCss ?? K.enableCss) === !0,
370
372
  enableJavaScript: e?.enableJavaScript === !0 && t?.enableJavaScript === !0,
@@ -372,32 +374,32 @@ function rt(e, t) {
372
374
  };
373
375
  }
374
376
  // src/local/configuration/options-core.ts
375
- var it = [
377
+ var nt = [
376
378
  "enableCss",
377
379
  "enableJavaScript",
378
380
  "enableExtendedHtml"
379
- ], at = H;
381
+ ], rt = V;
380
382
  function q(e) {
381
383
  return typeof e == "object" && !!e && !Array.isArray(e);
382
384
  }
383
- var ot = "local.options.invalid.host-components", st = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, ct = /* @__PURE__ */ new Set([
385
+ var it = "local.options.invalid.host-components", at = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, ot = /* @__PURE__ */ new Set([
384
386
  "string",
385
387
  "number",
386
388
  "boolean",
387
389
  "enum"
388
- ]), lt = /* @__PURE__ */ new Set([
390
+ ]), st = /* @__PURE__ */ new Set([
389
391
  "leaf",
390
392
  "inline",
391
393
  "container"
392
- ]), ut = /* @__PURE__ */ new Set([
394
+ ]), ct = /* @__PURE__ */ new Set([
393
395
  "string",
394
396
  "number",
395
397
  "boolean"
396
- ]), dt = /* @__PURE__ */ new Set([
398
+ ]), lt = /* @__PURE__ */ new Set([
397
399
  "bind",
398
400
  "initial",
399
401
  "disabled"
400
- ]), ft = /* @__PURE__ */ new Set([
402
+ ]), ut = /* @__PURE__ */ new Set([
401
403
  "maxSyntaxNodes",
402
404
  "maxParseWork",
403
405
  "maxMarkdownDepth"
@@ -429,11 +431,11 @@ function Y(e) {
429
431
  return {
430
432
  ok: !1,
431
433
  message: `Compile option hostComponents is invalid: ${e}`,
432
- key: ot,
434
+ key: it,
433
435
  detail: e
434
436
  };
435
437
  }
436
- function pt(e, t) {
438
+ function dt(e, t) {
437
439
  if (e === void 0) return {
438
440
  ok: !0,
439
441
  binding: void 0
@@ -449,7 +451,7 @@ function pt(e, t) {
449
451
  "exclusive"
450
452
  ].includes(n)) return Y(`${t} "binding" has unknown field "${n}".`);
451
453
  let n = e.kind;
452
- if (typeof n != "string" || !ut.has(n)) return Y(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
454
+ if (typeof n != "string" || !ct.has(n)) return Y(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
453
455
  let r = { kind: n };
454
456
  if (Object.hasOwn(e, "exclusive") && e.exclusive !== void 0) {
455
457
  if (typeof e.exclusive != "boolean") return Y(`${t} "binding.exclusive" must be a boolean.`);
@@ -512,7 +514,7 @@ function pt(e, t) {
512
514
  binding: r
513
515
  };
514
516
  }
515
- function mt(e, t) {
517
+ function ft(e, t) {
516
518
  let n = [], r = /* @__PURE__ */ new Map();
517
519
  if (e === void 0) return {
518
520
  ok: !0,
@@ -523,7 +525,7 @@ function mt(e, t) {
523
525
  if (e.length > 32) return Y("accepts at most 32 components.");
524
526
  let i = /* @__PURE__ */ new Set();
525
527
  for (let e of t) i.add(e.name.toLowerCase());
526
- for (let e of O) i.add(e.name.toLowerCase());
528
+ for (let e of ie) i.add(e.name.toLowerCase());
527
529
  for (let e of h) i.add(e.toLowerCase());
528
530
  i.add("theme");
529
531
  for (let t = 0; t < e.length; t += 1) {
@@ -532,22 +534,22 @@ function mt(e, t) {
532
534
  let s = a.name;
533
535
  if (typeof s != "string") return Y(`${o} "name" must be a string.`);
534
536
  if (s.length > 128) return Y(`${o} "name" exceeds the 128-character limit.`);
535
- if (!st.test(s)) return Y(`${o} "name" ${s} must use lowercase kebab-case.`);
537
+ if (!at.test(s)) return Y(`${o} "name" ${s} must use lowercase kebab-case.`);
536
538
  if (i.has(s.toLowerCase())) return Y(`${o} "name" ${s} conflicts with a built-in component, HTML tag or theme.`);
537
539
  if (r.has(s.toLowerCase())) return Y(`${o} "name" ${s} is declared more than once.`);
538
- if (typeof a.form != "string" || !lt.has(a.form)) return Y(`${o} "form" must be "leaf", "inline" or "container".`);
539
- let c = a.form, l = pt(a.binding, o);
540
+ if (typeof a.form != "string" || !st.has(a.form)) return Y(`${o} "form" must be "leaf", "inline" or "container".`);
541
+ let c = a.form, l = dt(a.binding, o);
540
542
  if (!l.ok) return l;
541
543
  let u = l.binding, d = a.props;
542
544
  if (!q(d)) return Y(`${o} "props" must be an object.`);
543
- let p = {};
545
+ let f = {};
544
546
  for (let e of Object.keys(d)) {
545
- if (!st.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
546
- if (u && dt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
547
+ if (!at.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
548
+ if (u && lt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
547
549
  let t = d[e];
548
550
  if (!q(t)) return Y(`${o} property "${e}" must be an object.`);
549
551
  let n = t.kind;
550
- if (typeof n != "string" || !ct.has(n)) return Y(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
552
+ if (typeof n != "string" || !ot.has(n)) return Y(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
551
553
  let r = { kind: n };
552
554
  for (let n of ["required", "static"]) if (Object.hasOwn(t, n) && t[n] !== void 0) {
553
555
  if (typeof t[n] != "boolean") return Y(`${o} property "${e}" "${n}" must be a boolean.`);
@@ -581,18 +583,18 @@ function mt(e, t) {
581
583
  } catch {
582
584
  return Y(`${o} property "${e}" "pattern" is not a valid regular expression.`);
583
585
  }
584
- if (!f(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
586
+ if (!oe(n)) return Y(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
585
587
  r.pattern = n;
586
588
  }
587
- p[e] = r;
589
+ f[e] = r;
588
590
  }
589
- let m = {
591
+ let p = {
590
592
  name: s,
591
593
  form: c,
592
- props: p,
594
+ props: f,
593
595
  ...u ? { binding: u } : {}
594
596
  };
595
- n.push(m), r.set(s, m);
597
+ n.push(p), r.set(s, p);
596
598
  }
597
599
  return {
598
600
  ok: !0,
@@ -600,13 +602,13 @@ function mt(e, t) {
600
602
  hostByName: r
601
603
  };
602
604
  }
603
- function ht(e) {
605
+ function pt(e) {
604
606
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
605
607
  }
606
- function gt(e) {
608
+ function mt(e) {
607
609
  let t = e.static === !0 || e.dynamic === !1;
608
610
  if (e.kind === "enum") {
609
- let n = `^(?:${(e.enum ?? []).map(ht).join("|")})$`;
611
+ let n = `^(?:${(e.enum ?? []).map(pt).join("|")})$`;
610
612
  if (n.length <= 512) return {
611
613
  kind: "string",
612
614
  ...e.required === !0 ? { required: !0 } : {},
@@ -617,12 +619,12 @@ function gt(e) {
617
619
  let n = { kind: e.kind };
618
620
  return e.required === !0 && e.default === void 0 && (n.required = !0), t && (n.static = !0), e.enum && (n.enum = [...e.enum]), e.pattern !== void 0 && (n.pattern = e.pattern), n;
619
621
  }
620
- function _t(e) {
622
+ function ht(e) {
621
623
  let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
622
624
  for (let i of e.components) {
623
625
  let e = {};
624
- for (let t of Object.keys(i.props)) e[t] = gt(i.props[t]);
625
- let a = le(i), o = {
626
+ for (let t of Object.keys(i.props)) e[t] = mt(i.props[t]);
627
+ let a = ue(i), o = {
626
628
  name: i.name,
627
629
  form: i.form,
628
630
  props: e,
@@ -641,7 +643,7 @@ function X(e, t) {
641
643
  for (let t of e) n.set(t.name, t);
642
644
  let r = /* @__PURE__ */ new Map();
643
645
  for (let e of t.values()) r.set(e.name, e);
644
- for (let e of O) r.has(e.name) || r.set(e.name, fe(e));
646
+ for (let e of ie) r.has(e.name) || r.set(e.name, pe(e));
645
647
  return {
646
648
  componentByName: n,
647
649
  schemaByName: r
@@ -649,32 +651,32 @@ function X(e, t) {
649
651
  }
650
652
  function Z(e) {
651
653
  let t = /* @__PURE__ */ new Map();
652
- for (let n of e) t.set(n.name, de(n));
654
+ for (let n of e) t.set(n.name, fe(n));
653
655
  return t;
654
656
  }
655
- function vt(e, t) {
656
- let n = t.defaults, r = new Set(n.map((e) => e.name));
657
+ function gt(e, r) {
658
+ let i = r.defaults, a = new Set(i.map((e) => e.name));
657
659
  if (e !== void 0 && !q(e)) return {
658
660
  ok: !1,
659
661
  message: "Compile options must be an object.",
660
662
  key: "local.options.invalid.object"
661
663
  };
662
- let i = e ?? {}, o = { ...K };
663
- for (let e of it) {
664
- if (!Object.hasOwn(i, e)) continue;
665
- let t = i[e];
664
+ let o = e ?? {}, c = { ...K };
665
+ for (let e of nt) {
666
+ if (!Object.hasOwn(o, e)) continue;
667
+ let t = o[e];
666
668
  if (t !== void 0) {
667
669
  if (typeof t != "boolean") return {
668
670
  ok: !1,
669
671
  message: `Compile option ${e} must be a boolean.`,
670
672
  key: "local.options.invalid.html-flag"
671
673
  };
672
- o[e] = t;
674
+ c[e] = t;
673
675
  }
674
676
  }
675
677
  let l = !1;
676
- if (Object.hasOwn(i, "markdownBreaks")) {
677
- let e = i.markdownBreaks;
678
+ if (Object.hasOwn(o, "markdownBreaks")) {
679
+ let e = o.markdownBreaks;
678
680
  if (e !== void 0) {
679
681
  if (typeof e != "boolean") return {
680
682
  ok: !1,
@@ -685,8 +687,8 @@ function vt(e, t) {
685
687
  }
686
688
  }
687
689
  let u = !0;
688
- if (Object.hasOwn(i, "strict")) {
689
- let e = i.strict;
690
+ if (Object.hasOwn(o, "strict")) {
691
+ let e = o.strict;
690
692
  if (e !== void 0) {
691
693
  if (typeof e != "boolean") return {
692
694
  ok: !1,
@@ -696,22 +698,22 @@ function vt(e, t) {
696
698
  u = e;
697
699
  }
698
700
  }
699
- if (Object.hasOwn(i, "sourcePhase")) {
700
- let e = i.sourcePhase;
701
+ if (Object.hasOwn(o, "sourcePhase")) {
702
+ let e = o.sourcePhase;
701
703
  if (e !== void 0 && e !== "streaming" && e !== "final") return {
702
704
  ok: !1,
703
705
  message: "Compile option sourcePhase must be \"streaming\" or \"final\".",
704
706
  key: "local.options.invalid.source-phase"
705
707
  };
706
708
  }
707
- let d = i.limits, f = a, p = c, m = s;
709
+ let d = o.limits, f = s, p = t, m = n;
708
710
  if (d !== void 0) {
709
711
  if (!q(d)) return {
710
712
  ok: !1,
711
713
  message: "Compile option limits must be an object.",
712
714
  key: "local.options.invalid.limits"
713
715
  };
714
- for (let e of Object.keys(d)) if (!ft.has(e) && d[e] !== void 0) return {
716
+ for (let e of Object.keys(d)) if (!ut.has(e) && d[e] !== void 0) return {
715
717
  ok: !1,
716
718
  message: `Compile option limits.${e} is not supported.`,
717
719
  key: "local.options.invalid.limits-unknown",
@@ -727,7 +729,7 @@ function vt(e, t) {
727
729
  if (!n.ok) return n;
728
730
  m = n.value;
729
731
  }
730
- let h = Object.hasOwn(i, "config") && i.config !== void 0, g = Object.hasOwn(i, "hostComponents") && i.hostComponents !== void 0;
732
+ let h = Object.hasOwn(o, "config") && o.config !== void 0, g = Object.hasOwn(o, "hostComponents") && o.hostComponents !== void 0;
731
733
  if (h && g) return {
732
734
  ok: !1,
733
735
  message: "Compile option config cannot be combined with hostComponents.",
@@ -736,7 +738,7 @@ function vt(e, t) {
736
738
  let _, v, y, b, x, S, C, w, T;
737
739
  if (h) {
738
740
  try {
739
- _ = t.readConfig(i.config, n);
741
+ _ = r.readConfig(o.config, i);
740
742
  } catch (e) {
741
743
  let t = e instanceof Error ? e.message : String(e);
742
744
  return {
@@ -746,24 +748,24 @@ function vt(e, t) {
746
748
  detail: t
747
749
  };
748
750
  }
749
- let e = _t(_);
751
+ let e = ht(_);
750
752
  v = e.hostComponents, y = e.hostByName, b = e.sdkByName, x = _.registry;
751
- let r = X(x, Z(x));
752
- S = r.schemaByName, C = r.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
753
+ let t = X(x, Z(x));
754
+ S = t.schemaByName, C = t.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
753
755
  } else if (g) {
754
- let e = mt(i.hostComponents, n);
756
+ let e = ft(o.hostComponents, i);
755
757
  if (!e.ok) return e;
756
- v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = n;
757
- let t = Z(n);
758
- for (let [n, r] of e.hostByName) t.set(n, fe({
758
+ v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = i;
759
+ let t = Z(i);
760
+ for (let [n, r] of e.hostByName) t.set(n, pe({
759
761
  ...r,
760
762
  legacyHost: !0
761
763
  }));
762
- let r = X(n, t);
763
- S = r.schemaByName, C = r.componentByName, w = new Set(e.hostByName.keys()), T = new Set(e.hostByName.keys());
764
+ let n = X(i, t);
765
+ S = n.schemaByName, C = n.componentByName, w = new Set(e.hostByName.keys()), T = new Set(e.hostByName.keys());
764
766
  } else {
765
- v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = n;
766
- let e = X(n, Z(n));
767
+ v = [], y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), x = i;
768
+ let e = X(i, Z(i));
767
769
  S = e.schemaByName, C = e.componentByName, w = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
768
770
  }
769
771
  return {
@@ -771,7 +773,7 @@ function vt(e, t) {
771
773
  maxSyntaxNodes: f,
772
774
  maxParseWork: p,
773
775
  maxMarkdownDepth: m,
774
- html: o,
776
+ html: c,
775
777
  markdownBreaks: l,
776
778
  strict: u,
777
779
  hostComponents: v,
@@ -781,27 +783,27 @@ function vt(e, t) {
781
783
  registry: x,
782
784
  componentByName: C,
783
785
  schemaByName: S,
784
- defaultComponentNames: r,
785
- unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Qe((e) => S.has(e)) : /* @__PURE__ */ new Set(),
786
+ defaultComponentNames: a,
787
+ unmountedLeafNames: _?.presets.some((e) => e.id === "reactive-md/minimal") ? Ze((e) => S.has(e)) : /* @__PURE__ */ new Set(),
786
788
  externalComponentNames: w,
787
789
  legacyHostNames: T,
788
- componentConfigKey: _ ? t.configKey(_) : t.defaultConfigKey,
789
- capabilities: t.capabilities ?? Xe,
790
- ...t.preset ? { preset: t.preset } : {}
790
+ componentConfigKey: _ ? r.configKey(_) : r.defaultConfigKey,
791
+ capabilities: r.capabilities ?? Ye,
792
+ ...r.preset ? { preset: r.preset } : {}
791
793
  };
792
794
  }
793
- function yt(e, t = [], n) {
794
- let r = t.length > 0 ? at : void 0;
795
- return vt(e, {
795
+ function _t(e, t = [], n) {
796
+ let r = t.length > 0 ? rt : void 0;
797
+ return gt(e, {
796
798
  defaults: t,
797
799
  ...r ? { preset: r } : {},
798
- defaultConfigKey: nt(t),
799
- readConfig: tt,
800
+ defaultConfigKey: et(t),
801
+ readConfig: $e,
800
802
  configKey: (e) => e.key,
801
803
  ...n ? { capabilities: n } : {}
802
804
  });
803
805
  }
804
- function bt(e) {
806
+ function vt(e) {
805
807
  return e.componentConfigKey;
806
808
  }
807
809
  // src/local/configuration/kernel-value-rules.ts
@@ -810,9 +812,9 @@ function Q(e) {
810
812
  for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
811
813
  return t;
812
814
  }
813
- function xt(e) {
815
+ function yt(e) {
814
816
  let t = [];
815
- for (let n of ue(e)) switch (n.kind) {
817
+ for (let n of de(e)) switch (n.kind) {
816
818
  case "value-date":
817
819
  t.push(Q({
818
820
  kind: "date",
@@ -846,16 +848,16 @@ function xt(e) {
846
848
  }
847
849
  return t;
848
850
  }
849
- function St(e) {
851
+ function bt(e) {
850
852
  if (!e || typeof e != "object") return;
851
853
  let t = e.kernel;
852
854
  if (t && typeof t == "object") return t;
853
855
  }
854
- var Ct = /^[A-Za-z_][A-Za-z0-9_-]*$/;
855
- function wt(e) {
856
- return Ct.test(e);
856
+ var xt = /^[A-Za-z_][A-Za-z0-9_-]*$/;
857
+ function St(e) {
858
+ return xt.test(e);
857
859
  }
858
- function Tt(e, t, n) {
860
+ function Ct(e, t, n) {
859
861
  let r = [];
860
862
  for (let i of e) {
861
863
  let e = i.target;
@@ -881,23 +883,23 @@ function Tt(e, t, n) {
881
883
  return r;
882
884
  }
883
885
  Object.freeze({
884
- arrayLength: e,
886
+ arrayLength: l,
885
887
  dataTableColumns: 20,
886
888
  plotCurves: 16,
887
- plotPoints: p
889
+ plotPoints: e
888
890
  });
889
891
  // src/local/evaluation/computations.ts
890
892
  function $(e, t, n) {
891
- let r = t ? oe(t, n) : void 0;
893
+ let r = t ? f(t, n) : void 0;
892
894
  return e.expressionOffset + (r ?? Math.max(0, e.source.indexOf(n)));
893
895
  }
894
- function Et(e, t, n, r = "local.expression") {
895
- t instanceof k ? e(`${r}.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e(`${r}.invalid`, `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
896
+ function wt(e, t, n, r = "local.expression") {
897
+ t instanceof d ? e(`${r}.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e(`${r}.invalid`, `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
896
898
  }
897
- function Dt(e) {
898
- return e instanceof k ? e : new k("expression-eval", e instanceof Error ? e.message : String(e), 0);
899
+ function Tt(e) {
900
+ return e instanceof d ? e : new d("expression-eval", e instanceof Error ? e.message : String(e), 0);
899
901
  }
900
- function Ot(e, t) {
902
+ function Et(e, t) {
901
903
  let n = new Set(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
902
904
  for (let t of e) r.set(t, 0);
903
905
  for (let a of e) for (let e of t(a)) {
@@ -923,23 +925,23 @@ function Ot(e, t) {
923
925
  cyclic: e.filter((e) => !s.has(e))
924
926
  };
925
927
  }
926
- function kt(e) {
928
+ function Dt(e) {
927
929
  let t = Object.keys(e), n = new Set(t);
928
- return Ot(t, (t) => {
930
+ return Et(t, (t) => {
929
931
  let r = e[t];
930
932
  return r ? r.dependencies.filter((e) => n.has(e)) : [];
931
933
  });
932
934
  }
933
- function At(e, t, n, r = /* @__PURE__ */ new Set(), i) {
935
+ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
934
936
  let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = [], l = /* @__PURE__ */ new Set();
935
937
  for (let t of e) s.has(t.name) || (s.set(t.name, t), c.push(t.name));
936
938
  let u = new Set(c);
937
939
  for (let e of c) {
938
940
  let t = s.get(e), r;
939
941
  try {
940
- r = i?.expression(t.source) ?? ce(t.source);
942
+ r = i?.expression(t.source) ?? m(t.source);
941
943
  } catch (r) {
942
- Et(n, r, t.expressionOffset), l.add(e);
944
+ wt(n, r, t.expressionOffset), l.add(e);
943
945
  continue;
944
946
  }
945
947
  a.set(e, r), o.set(e, [...r.dependencies]);
@@ -959,27 +961,27 @@ function At(e, t, n, r = /* @__PURE__ */ new Set(), i) {
959
961
  Object.hasOwn(t, c) ? (n("local.computation.const", `Constant "${e}" cannot depend on ${r.has(c) ? "external data" : "control parameter"} "${c}".`, $(i, a.get(e), c)), d.add(e)) : o === "computed" && (n("local.computation.const", `Constant "${e}" cannot depend on computed value "${c}".`, $(i, a.get(e), c)), d.add(e));
960
962
  }
961
963
  }
962
- let { order: f, cyclic: p } = Ot(c, (e) => o.get(e) ?? []);
963
- if (p.length > 0) {
964
- let e = new Set(p), t = [], r = /* @__PURE__ */ new Map(), i = p[0];
964
+ let { order: f, cyclic: h } = Et(c, (e) => o.get(e) ?? []);
965
+ if (h.length > 0) {
966
+ let e = new Set(h), t = [], r = /* @__PURE__ */ new Map(), i = h[0];
965
967
  for (; !r.has(i);) {
966
968
  r.set(i, t.length), t.push(i);
967
969
  let n = (o.get(i) ?? []).find((t) => e.has(t));
968
970
  if (n === void 0) break;
969
971
  i = n;
970
972
  }
971
- let a = r.has(i) ? t.slice(r.get(i)) : [p[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
973
+ let a = r.has(i) ? t.slice(r.get(i)) : [h[0]], c = a.slice(0, 12).join(" → ") + (a.length > 12 ? " → …" : ` → ${a[0]}`);
972
974
  for (let e of a.slice(0, 100)) {
973
975
  let t = s.get(e);
974
976
  n("local.computation.cycle", `Computation "${e}" is part of a dependency cycle: ${c}.`, t.range.start, t.range.end);
975
977
  }
976
- for (let e of p) l.add(e);
978
+ for (let e of h) l.add(e);
977
979
  }
978
980
  for (let e of f) if (!l.has(e) && !(s.get(e).kind !== "const" || d.has(e)) && (o.get(e) ?? []).some((e) => u.has(e) ? s.get(e).kind === "const" && d.has(e) : !1)) {
979
981
  let t = s.get(e);
980
982
  n("local.computation.const", `Constant "${e}" indirectly depends on a value that is not a constant.`, t.expressionOffset), d.add(e);
981
983
  }
982
- let m = {}, h = { ...t };
984
+ let g = {}, _ = { ...t };
983
985
  for (let e of f) {
984
986
  if (l.has(e)) continue;
985
987
  let t = s.get(e);
@@ -989,18 +991,18 @@ function At(e, t, n, r = /* @__PURE__ */ new Set(), i) {
989
991
  }
990
992
  let r = a.get(e);
991
993
  try {
992
- let t = i ? i.infer(r, h) : r.inferType(h);
993
- m[e] = t, h[e] = t;
994
+ let t = i ? i.infer(r, _) : r.inferType(_);
995
+ g[e] = t, _[e] = t;
994
996
  } catch (r) {
995
- Et(n, r, t.expressionOffset), l.add(e);
997
+ wt(n, r, t.expressionOffset), l.add(e);
996
998
  }
997
999
  }
998
- let g = {}, _ = {}, v = /* @__PURE__ */ Error("failed constant read"), y = (e) => {
999
- l.add(e), Object.defineProperty(_, e, {
1000
+ let v = {}, y = {}, b = /* @__PURE__ */ Error("failed constant read"), x = (e) => {
1001
+ l.add(e), Object.defineProperty(y, e, {
1000
1002
  enumerable: !0,
1001
1003
  configurable: !0,
1002
1004
  get() {
1003
- throw v;
1005
+ throw b;
1004
1006
  }
1005
1007
  });
1006
1008
  };
@@ -1008,45 +1010,45 @@ function At(e, t, n, r = /* @__PURE__ */ new Set(), i) {
1008
1010
  if (l.has(e) || s.get(e).kind !== "const" || d.has(e)) continue;
1009
1011
  let t = s.get(e), r = a.get(e);
1010
1012
  try {
1011
- let i = r.evaluate(_), a = se(i);
1013
+ let i = r.evaluate(y), a = p(i);
1012
1014
  if (a) {
1013
- n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), y(e);
1015
+ n("local.computation.budget", `Constant "${e}": ${a}`, t.expressionOffset), x(e);
1014
1016
  continue;
1015
1017
  }
1016
- g[e] = Array.isArray(i) ? i.slice() : i, _[e] = g[e];
1018
+ v[e] = Array.isArray(i) ? i.slice() : i, y[e] = v[e];
1017
1019
  } catch (r) {
1018
- if (r === v) {
1019
- y(e);
1020
+ if (r === b) {
1021
+ x(e);
1020
1022
  continue;
1021
1023
  }
1022
- let i = Dt(r);
1023
- n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), y(e);
1024
+ let i = Tt(r);
1025
+ n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), x(e);
1024
1026
  }
1025
1027
  }
1026
- let b = {};
1028
+ let S = {};
1027
1029
  for (let e of c) {
1028
1030
  let t = s.get(e);
1029
- if (l.has(e) || m[e] === void 0) continue;
1031
+ if (l.has(e) || g[e] === void 0) continue;
1030
1032
  let n = {
1031
1033
  name: e,
1032
1034
  kind: t.kind,
1033
1035
  source: t.source,
1034
1036
  dependencies: [...o.get(e) ?? []],
1035
- type: m[e],
1037
+ type: g[e],
1036
1038
  nodeId: t.nodeId,
1037
1039
  range: { ...t.range }
1038
1040
  };
1039
- t.kind === "const" && Object.hasOwn(g, e) && (n.value = g[e]), b[e] = n;
1041
+ t.kind === "const" && Object.hasOwn(v, e) && (n.value = v[e]), S[e] = n;
1040
1042
  }
1041
1043
  return {
1042
- computations: b,
1043
- kinds: m,
1044
+ computations: S,
1045
+ kinds: g,
1044
1046
  order: f.filter((e) => !l.has(e)),
1045
1047
  expressions: a,
1046
- constValues: g
1048
+ constValues: v
1047
1049
  };
1048
1050
  }
1049
- function jt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1051
+ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1050
1052
  let o = {}, s = /* @__PURE__ */ new Map(), c = {};
1051
1053
  for (let [e, t] of Object.entries(r)) c[e] = t;
1052
1054
  for (let [e, t] of a) Object.defineProperty(c, e, {
@@ -1062,11 +1064,11 @@ function jt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1062
1064
  if (!t || t.kind === "const") continue;
1063
1065
  let i = n.get(r);
1064
1066
  if (i) try {
1065
- let e = i.evaluate(c), t = se(e);
1066
- if (t) throw new k("expression-budget", t, 0);
1067
+ let e = i.evaluate(c), t = p(e);
1068
+ if (t) throw new d("expression-budget", t, 0);
1067
1069
  o[r] = e, c[r] = e;
1068
1070
  } catch (e) {
1069
- let t = Dt(e);
1071
+ let t = Tt(e);
1070
1072
  s.set(r, t), Object.defineProperty(c, r, {
1071
1073
  enumerable: !0,
1072
1074
  configurable: !0,
@@ -1082,25 +1084,25 @@ function jt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1082
1084
  };
1083
1085
  }
1084
1086
  // src/local/evaluation/validation.ts
1085
- var Mt = "local.validation.failed", Nt = "local.validation.expression", Pt = "Validation failed.";
1086
- function Ft(e) {
1087
- return e.length > 2e3 ? `${y(e, d - 1)}…` : e;
1087
+ var At = "local.validation.failed", jt = "local.validation.expression", Mt = "Validation failed.";
1088
+ function Nt(e) {
1089
+ return e.length > 2e3 ? `${u(e, c - 1)}…` : e;
1088
1090
  }
1089
- function It(e) {
1091
+ function Pt(e) {
1090
1092
  let t = e.trim();
1091
1093
  return t ? t.split(/\s+/) : [];
1092
1094
  }
1093
- function Lt(e) {
1095
+ function Ft(e) {
1094
1096
  let t = [0];
1095
1097
  for (let n = 0; n < e.length; n += 1) e[n] === "\n" && t.push(n + 1);
1096
1098
  return t;
1097
1099
  }
1098
- function Rt(e) {
1100
+ function It(e) {
1099
1101
  if (!e || typeof e != "object") return !1;
1100
1102
  let t = e, n = t.range;
1101
1103
  return typeof t.expression == "string" && typeof t.message == "string" && Array.isArray(t.fields) && !!n && Number.isFinite(n.start) && Number.isFinite(n.end);
1102
1104
  }
1103
- function zt(e, t, n, r, i) {
1105
+ function Lt(e, t, n, r, i) {
1104
1106
  let a = e.length, o = Math.max(0, Math.min(a, Math.trunc(n.start))), s = Math.max(o + 1, Math.min(a, Math.trunc(n.end))), c = 0, l = Math.max(0, t.length - 1);
1105
1107
  for (; c < l;) {
1106
1108
  let e = Math.ceil((c + l) / 2);
@@ -1118,4 +1120,4 @@ function zt(e, t, n, r, i) {
1118
1120
  column: o - t[c] + 1
1119
1121
  };
1120
1122
  }
1121
- export { be as $, Ge as A, we as B, Je as C, qe as D, Re as E, Pe as F, ke as G, Ee as H, Ne as I, N as J, Ae as K, Me as L, z as M, Ie as N, Ue as O, B as P, Ce as Q, R, Ye as S, ze as T, De as U, Te as V, Oe as W, F as X, P as Y, I as Z, bt as _, Rt as a, K as b, zt as c, At as d, ye as et, wt as f, it as g, xt as h, Ft as i, Ke as j, He as k, jt as l, Tt as m, Mt as n, he as nt, Lt as o, St as p, M as q, Pt as r, pe as rt, It as s, Nt as t, A as tt, kt as u, yt as v, Le as w, rt as x, vt as y, je as z };
1123
+ export { k as $, R as A, De as B, Be as C, Ue as D, We as E, Ne as F, j as G, ke as H, L as I, P as J, M as K, Me as L, z as M, Fe as N, Ke as O, Pe as P, be as Q, Te as R, Re as S, Je as T, Ae as U, Oe as V, je as W, we as X, F as Y, xe as Z, vt as _, It as a, K as b, Lt as c, Ot as d, ge as et, St as f, nt as g, yt as h, Nt as i, Le as j, qe as k, kt as l, Ct as m, At as n, Ft as o, bt as p, N as q, Mt as r, Pt as s, jt as t, me as tt, Dt as u, _t as v, ze as w, tt as x, gt as y, Ee as z };