reactive-md 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG-ch.md +34 -0
  2. package/CHANGELOG.md +34 -0
  3. package/README-ch.md +7 -7
  4. package/README-en.md +7 -7
  5. package/README.md +7 -7
  6. package/THIRD_PARTY_NOTICES.md +0 -57
  7. package/cli/help.mjs +6 -4
  8. package/cli/init.mjs +1 -1
  9. package/cli/migrate.mjs +1 -1
  10. package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
  11. package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
  12. package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
  13. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  14. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  15. package/dist-library/choice-values-BItGjPD2.js +58 -0
  16. package/dist-library/compile-B35rfzKr.js +1742 -0
  17. package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
  18. package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
  19. package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
  20. package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
  21. package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
  22. package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
  23. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  24. package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
  25. package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
  26. package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
  27. package/dist-library/data-table-CSAkm1eU.js +290 -0
  28. package/dist-library/data-table-model-DruztQFt.js +391 -0
  29. package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
  30. package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
  31. package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
  32. package/dist-library/default-options-By16CVw1.js +131 -0
  33. package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
  34. package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
  35. package/dist-library/display-Bb6hAG5T.js +2065 -0
  36. package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
  37. package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
  38. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  39. package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
  40. package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
  41. package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
  42. package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
  43. package/dist-library/layout-CPQggKxk.js +592 -0
  44. package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
  45. package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
  46. package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
  47. package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
  48. package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
  49. package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
  50. package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
  51. package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
  52. package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
  53. package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
  54. package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
  55. package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
  56. package/dist-library/reactive-md-authoring.js +277 -269
  57. package/dist-library/reactive-md-build.js +327 -33
  58. package/dist-library/reactive-md-compiler-session.js +3 -3
  59. package/dist-library/reactive-md-compiler-standard.js +10 -10
  60. package/dist-library/reactive-md-compiler.js +3 -3
  61. package/dist-library/reactive-md-contracts.js +4 -4
  62. package/dist-library/reactive-md-default-packs.js +4 -3
  63. package/dist-library/reactive-md-default-preset.js +3 -3
  64. package/dist-library/reactive-md-export.js +6 -6
  65. package/dist-library/reactive-md-minimal-preset.js +3 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +18 -17
  67. package/dist-library/reactive-md-minimal.css +1 -1
  68. package/dist-library/reactive-md-observability.js +2 -2
  69. package/dist-library/reactive-md-pack-style-manifest.js +8 -0
  70. package/dist-library/reactive-md-plugin-chart.js +13 -9
  71. package/dist-library/reactive-md-plugin-data.js +4 -4
  72. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  73. package/dist-library/reactive-md-plugin-forms.js +5 -5
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +10 -10
  76. package/dist-library/reactive-md-plugin-network.js +5 -5
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-react-component-accordion.js +3 -3
  79. package/dist-library/reactive-md-react-component-alert.js +3 -3
  80. package/dist-library/reactive-md-react-component-anchor.js +3 -3
  81. package/dist-library/reactive-md-react-component-badge.js +3 -3
  82. package/dist-library/reactive-md-react-component-card.js +3 -3
  83. package/dist-library/reactive-md-react-component-chart.js +2 -2
  84. package/dist-library/reactive-md-react-component-checkbox.js +2 -2
  85. package/dist-library/reactive-md-react-component-checklist.js +2 -2
  86. package/dist-library/reactive-md-react-component-choices.js +2 -2
  87. package/dist-library/reactive-md-react-component-column.js +1 -1
  88. package/dist-library/reactive-md-react-component-coordinate.js +2 -2
  89. package/dist-library/reactive-md-react-component-counter.js +2 -2
  90. package/dist-library/reactive-md-react-component-data-table.js +2 -2
  91. package/dist-library/reactive-md-react-component-date.js +2 -2
  92. package/dist-library/reactive-md-react-component-diagram.js +2 -2
  93. package/dist-library/reactive-md-react-component-disclosure.js +3 -3
  94. package/dist-library/reactive-md-react-component-edge.js +1 -1
  95. package/dist-library/reactive-md-react-component-else.js +10 -0
  96. package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
  97. package/dist-library/reactive-md-react-component-gallery.js +2 -2
  98. package/dist-library/reactive-md-react-component-grid.js +3 -3
  99. package/dist-library/reactive-md-react-component-if.js +3 -3
  100. package/dist-library/reactive-md-react-component-input.js +2 -2
  101. package/dist-library/reactive-md-react-component-jump.js +3 -3
  102. package/dist-library/reactive-md-react-component-multi-select.js +2 -2
  103. package/dist-library/reactive-md-react-component-node.js +2 -2
  104. package/dist-library/reactive-md-react-component-number.js +2 -2
  105. package/dist-library/reactive-md-react-component-option.js +1 -1
  106. package/dist-library/reactive-md-react-component-panel.js +3 -3
  107. package/dist-library/reactive-md-react-component-plot.js +2 -2
  108. package/dist-library/reactive-md-react-component-progress.js +2 -2
  109. package/dist-library/reactive-md-react-component-quiz.js +2 -2
  110. package/dist-library/reactive-md-react-component-radio-group.js +2 -2
  111. package/dist-library/reactive-md-react-component-range-slider.js +2 -2
  112. package/dist-library/reactive-md-react-component-section.js +3 -3
  113. package/dist-library/reactive-md-react-component-select.js +2 -2
  114. package/dist-library/reactive-md-react-component-slider.js +2 -2
  115. package/dist-library/reactive-md-react-component-step.js +3 -3
  116. package/dist-library/reactive-md-react-component-steps.js +3 -3
  117. package/dist-library/reactive-md-react-component-tab.js +3 -3
  118. package/dist-library/reactive-md-react-component-table.js +2 -2
  119. package/dist-library/reactive-md-react-component-tabs.js +3 -3
  120. package/dist-library/reactive-md-react-component-text.js +3 -3
  121. package/dist-library/reactive-md-react-component-textarea.js +2 -2
  122. package/dist-library/reactive-md-react-component-timeline.js +2 -2
  123. package/dist-library/reactive-md-react-component-timer.js +2 -2
  124. package/dist-library/reactive-md-react-component-toggle.js +2 -2
  125. package/dist-library/reactive-md-react-component-tooltip.js +3 -3
  126. package/dist-library/reactive-md-react-component-validation.js +3 -3
  127. package/dist-library/reactive-md-react-minimal.js +4 -4
  128. package/dist-library/reactive-md-react-pack-controls.js +4 -4
  129. package/dist-library/reactive-md-react-pack-data.js +3 -3
  130. package/dist-library/reactive-md-react-pack-layout.js +25 -24
  131. package/dist-library/reactive-md-react-pack-visuals.js +2 -2
  132. package/dist-library/reactive-md-react-packed.js +6 -6
  133. package/dist-library/reactive-md-react-server.js +37 -36
  134. package/dist-library/reactive-md-react-static-server.js +2 -2
  135. package/dist-library/reactive-md-react-static.js +1 -1
  136. package/dist-library/reactive-md-react-unstyled.js +12 -12
  137. package/dist-library/reactive-md-react.js +12 -12
  138. package/dist-library/reactive-md-scan.js +1 -1
  139. package/dist-library/reactive-md-sdk.js +23 -9
  140. package/dist-library/reactive-md-standalone-configured.js +2 -2
  141. package/dist-library/reactive-md-standalone-host.js +2 -2
  142. package/dist-library/reactive-md-testing-browser.js +2 -2
  143. package/dist-library/reactive-md-testing-react.js +6 -6
  144. package/dist-library/reactive-md-testing.js +6 -6
  145. package/dist-library/reactive-md-vite.js +25 -9
  146. package/dist-library/reactive-md-worker-pool.js +3 -3
  147. package/dist-library/reactive-md.css +1 -1
  148. package/dist-library/reactive-md.js +52 -43
  149. package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
  150. package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
  151. package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
  152. package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
  153. package/dist-library/rmd-pack-layout.css +9 -0
  154. package/dist-library/rmd-pack-resource-layout.css +9 -0
  155. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  156. package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
  157. package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
  158. package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
  159. package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
  160. package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
  161. package/dist-library/shareable-CHCDnl6j.js +844 -0
  162. package/dist-library/types/authoring/catalog.d.ts +3 -1
  163. package/dist-library/types/authoring/index.d.ts +1 -1
  164. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  165. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  166. package/dist-library/types/components/entries/else.d.ts +3 -0
  167. package/dist-library/types/components/layout/layout.d.ts +5 -0
  168. package/dist-library/types/components/shared/visuals.d.ts +1 -1
  169. package/dist-library/types/components/table/data-table-model.d.ts +95 -2
  170. package/dist-library/types/components/table/data-table.d.ts +2 -2
  171. package/dist-library/types/contracts/component-kernel.d.ts +5 -0
  172. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  173. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  174. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  175. package/dist-library/types/export/index.d.ts +4 -1
  176. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  177. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  178. package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
  179. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  180. package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
  181. package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
  182. package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
  183. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
  184. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
  185. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  186. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  187. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  188. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  189. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  190. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  191. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  192. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  193. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  194. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  195. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  196. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  197. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  198. package/dist-library/types/local/index.d.ts +4 -3
  199. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  200. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  201. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  202. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  203. package/dist-library/types/local/runtime/state.d.ts +30 -15
  204. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  205. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  206. package/dist-library/types/local/source/authoring.d.ts +10 -0
  207. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  208. package/dist-library/types/local/types.d.ts +33 -2
  209. package/dist-library/types/react/component-api.d.ts +21 -2
  210. package/dist-library/types/react/component-utils.d.ts +11 -0
  211. package/dist-library/types/react/font-aliases.d.ts +2 -0
  212. package/dist-library/types/react/package-core.d.ts +3 -0
  213. package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
  214. package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
  215. package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
  216. package/dist-library/types/react/sdk-core.d.ts +3 -1
  217. package/dist-library/types/sdk/assembly.d.ts +3 -0
  218. package/dist-library/types/sdk/font.d.ts +13 -0
  219. package/dist-library/types/sdk/index.d.ts +1 -0
  220. package/dist-library/types/sdk/theme.d.ts +5 -0
  221. package/dist-library/types/sdk/types.d.ts +6 -0
  222. package/dist-library/types/sdk/version.d.ts +1 -1
  223. package/dist-library/types/shareable.d.ts +15 -3
  224. package/dist-library/types/standalone/prepare.d.ts +4 -2
  225. package/dist-library/types/standalone/session-core.d.ts +4 -1
  226. package/dist-library/types/vite/index.d.ts +3 -0
  227. package/dist-library/types/vite/registration.d.ts +1 -0
  228. package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
  229. package/dist-library/types-FYhRWRn9.js +3 -0
  230. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  231. package/dist-library/validation-DRuW0Wl9.js +433 -0
  232. package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
  233. package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
  234. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  235. package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
  236. package/dist-standalone/reactive-md-standalone.css +1 -1
  237. package/dist-standalone/reactive-md-standalone.js +128 -368
  238. package/docs/README-ch.md +3 -1
  239. package/docs/README.md +3 -1
  240. package/docs/compatibility/api-stability-ch.md +1 -1
  241. package/docs/compatibility/api-stability-en.md +1 -1
  242. package/docs/compatibility/compatibility-ch.md +15 -15
  243. package/docs/compatibility/compatibility-en.md +15 -15
  244. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  245. package/docs/compatibility/deprecation-ch.md +2 -2
  246. package/docs/compatibility/deprecation-en.md +2 -2
  247. package/docs/compatibility/source-versioning-ch.md +22 -14
  248. package/docs/compatibility/source-versioning-en.md +22 -13
  249. package/docs/compatibility/support-matrix-ch.md +4 -3
  250. package/docs/compatibility/support-matrix-en.md +4 -3
  251. package/docs/development/component-development-ch.md +2 -2
  252. package/docs/development/component-development-en.md +2 -2
  253. package/docs/development/component-protocol-ch.md +18 -18
  254. package/docs/development/component-protocol-en.md +14 -14
  255. package/docs/guides/local-guide-ch.md +109 -20
  256. package/docs/guides/local-guide-en.md +109 -20
  257. package/docs/integration/author-tools-ch.md +1 -1
  258. package/docs/integration/author-tools-en.md +1 -1
  259. package/docs/integration/editor-ch.md +3 -3
  260. package/docs/integration/editor-en.md +3 -3
  261. package/docs/integration/extension-sdk-ch.md +29 -3
  262. package/docs/integration/extension-sdk-en.md +29 -3
  263. package/docs/integration/local-integration-ch.md +3 -3
  264. package/docs/integration/local-integration-en.md +3 -3
  265. package/docs/integration/pdf-export-ch.md +42 -0
  266. package/docs/integration/pdf-export-en.md +42 -0
  267. package/docs/integration/shareable-export-ch.md +11 -19
  268. package/docs/integration/shareable-export-en.md +11 -19
  269. package/docs/reference/diagnostics-counting-ch.md +24 -1
  270. package/docs/reference/diagnostics-counting-en.md +24 -1
  271. package/docs/reference/local-interaction-syntax-ch.md +222 -33
  272. package/docs/reference/local-interaction-syntax-en.md +220 -31
  273. package/docs/reference/public-api-ch.md +24 -18
  274. package/docs/reference/public-api-en.md +24 -18
  275. package/docs/reference/theme-protocol-ch.md +1 -1
  276. package/docs/reference/theme-protocol-en.md +1 -1
  277. package/docs/releases/release-0.10.0-ch.md +45 -0
  278. package/docs/releases/release-0.10.0-en.md +45 -0
  279. package/examples/conformance/README-ch.md +3 -3
  280. package/examples/conformance/README.md +3 -3
  281. package/examples/conformance/local-draft-4.json +441 -0
  282. package/examples/integration/README-ch.md +3 -3
  283. package/examples/integration/README.md +3 -3
  284. package/examples/integration/chat-session/package.json +1 -1
  285. package/examples/local/README-ch.md +1 -1
  286. package/examples/local/README.md +1 -1
  287. package/package.json +6 -1
  288. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
  289. package/dist-library/authoring-B14SsOXZ.js +0 -893
  290. package/dist-library/compile-D50B5_Ww.js +0 -1249
  291. package/dist-library/computations-CffoW7Ff.js +0 -340
  292. package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
  293. package/dist-library/default-options-DU5dxuU6.js +0 -125
  294. package/dist-library/layout-BfUzzO2b.js +0 -553
  295. package/dist-library/runtime-CuJndKqK.js +0 -1289
  296. package/dist-library/shareable-C6mUerpQ.js +0 -817
  297. package/dist-library/types-daDo2c_w.js +0 -3
  298. package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
  299. package/dist-library/visuals-CoVSjVD8.js +0 -49159
@@ -1,124 +1,123 @@
1
- import { S as e, a as t, f as n, i as r, n as i, r as a } from "./limits-CFERRrlC.js";
2
- import { v as o } from "./document-theme-DBAfnk7y.js";
3
- import { c as s, f as c, u as l } from "./computations-CffoW7Ff.js";
4
- import { a as u, i as d, o as f, r as p, t as m } from "./schema-core-4sd1Vu7V.js";
5
- import { A as h, N as g, a as _, i as v, t as y } from "./preset-core-BW3NWZJ9.js";
6
- import { i as b, r as x, s as S, t as C } from "./version-B0G1699c.js";
7
- import { n as w } from "./props-pJRrfDc6.js";
8
- import { b as T } from "./component-kernel-IG4wOO0i.js";
9
- import { r as E } from "./registry-core-CziAIP5P.js";
10
- import { _ as D, a as O, c as k, d as A, h as j, i as M, m as ee, n as N, o as te, p as ne, r as re, s as ie, t as ae, v as oe } from "./config-validation-Cpol91_M.js";
1
+ import { S as e, a as t, i as n, n as r, r as i } from "./limits-CFERRrlC.js";
2
+ import { A as a, F as o, a as s, i as c, t as l } from "./preset-core-BKPbH_Nv.js";
3
+ import { C as u, x as d, y as f } from "./validation-DRuW0Wl9.js";
4
+ import { a as p, i as m, o as h, r as g, t as _ } from "./schema-core-CDXfxdID.js";
5
+ import { b as ee } from "./component-kernel-CsJSabHX.js";
6
+ import { i as v, r as y, s as b, t as x } from "./version-4wzhbvDG.js";
7
+ import { n as S } from "./props-0iDqxlTk.js";
8
+ import { r as C } from "./registry-core-DxEaxhJ6.js";
9
+ import { _ as w, a as T, c as E, d as D, h as O, i as k, m as A, n as j, o as te, p as ne, r as M, s as re, t as ie, v as ae } from "./config-validation-DbmsWAEV.js";
11
10
  // node_modules/mdast-util-to-string/lib/index.js
12
- var se = {};
13
- function ce(e, t) {
14
- let n = t || se;
15
- return P(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
11
+ var oe = {};
12
+ function se(e, t) {
13
+ let n = t || oe;
14
+ return ce(e, typeof n.includeImageAlt != "boolean" || n.includeImageAlt, typeof n.includeHtml != "boolean" || n.includeHtml);
16
15
  }
17
- function P(e, t, n) {
18
- if (le(e)) {
16
+ function ce(e, t, n) {
17
+ if (ue(e)) {
19
18
  if ("value" in e) return e.type === "html" && !n ? "" : e.value;
20
19
  if (t && "alt" in e && e.alt) return e.alt;
21
- if ("children" in e) return F(e.children, t, n);
20
+ if ("children" in e) return le(e.children, t, n);
22
21
  }
23
- return Array.isArray(e) ? F(e, t, n) : "";
22
+ return Array.isArray(e) ? le(e, t, n) : "";
24
23
  }
25
- function F(e, t, n) {
24
+ function le(e, t, n) {
26
25
  let r = [], i = -1;
27
- for (; ++i < e.length;) r[i] = P(e[i], t, n);
26
+ for (; ++i < e.length;) r[i] = ce(e[i], t, n);
28
27
  return r.join("");
29
28
  }
30
- function le(e) {
29
+ function ue(e) {
31
30
  return !!(e && typeof e == "object");
32
31
  }
33
32
  // node_modules/micromark-util-chunked/index.js
34
- function I(e, t, n, r) {
33
+ function N(e, t, n, r) {
35
34
  let i = e.length, a = 0, o;
36
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);
37
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;
38
37
  }
39
- function ue(e, t) {
40
- return e.length > 0 ? (I(e, e.length, 0, t), e) : t;
38
+ function de(e, t) {
39
+ return e.length > 0 ? (N(e, e.length, 0, t), e) : t;
41
40
  }
42
41
  // node_modules/micromark-util-combine-extensions/index.js
43
- var L = {}.hasOwnProperty;
44
- function de(e) {
42
+ var P = {}.hasOwnProperty;
43
+ function fe(e) {
45
44
  let t = {}, n = -1;
46
- for (; ++n < e.length;) fe(t, e[n]);
45
+ for (; ++n < e.length;) pe(t, e[n]);
47
46
  return t;
48
47
  }
49
- function fe(e, t) {
48
+ function pe(e, t) {
50
49
  let n;
51
50
  for (n in t) {
52
- let r = (L.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
51
+ let r = (P.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
53
52
  if (i) for (a in i) {
54
- L.call(r, a) || (r[a] = []);
53
+ P.call(r, a) || (r[a] = []);
55
54
  let e = i[a];
56
- pe(r[a], Array.isArray(e) ? e : e ? [e] : []);
55
+ me(r[a], Array.isArray(e) ? e : e ? [e] : []);
57
56
  }
58
57
  }
59
58
  }
60
- function pe(e, t) {
59
+ function me(e, t) {
61
60
  let n = -1, r = [];
62
61
  for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
63
- I(e, 0, 0, r);
62
+ N(e, 0, 0, r);
64
63
  }
65
64
  // node_modules/micromark-util-normalize-identifier/index.js
66
- function me(e) {
65
+ function he(e) {
67
66
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
68
67
  }
69
68
  // node_modules/micromark-util-character/index.js
70
- var he = U(/[A-Za-z]/), ge = U(/[\dA-Za-z]/), _e = U(/[#-'*+\--9=?A-Z^-~]/);
71
- function ve(e) {
69
+ var ge = B(/[A-Za-z]/), _e = B(/[\dA-Za-z]/), ve = B(/[#-'*+\--9=?A-Z^-~]/);
70
+ function ye(e) {
72
71
  return e !== null && (e < 32 || e === 127);
73
72
  }
74
- var ye = U(/\d/), be = U(/[\dA-Fa-f]/), xe = U(/[!-/:-@[-`{-~]/);
75
- function R(e) {
73
+ var be = B(/\d/), xe = B(/[\dA-Fa-f]/), Se = B(/[!-/:-@[-`{-~]/);
74
+ function F(e) {
76
75
  return e !== null && e < -2;
77
76
  }
78
- function z(e) {
77
+ function I(e) {
79
78
  return e !== null && (e < 0 || e === 32);
80
79
  }
81
- function B(e) {
80
+ function L(e) {
82
81
  return e === -2 || e === -1 || e === 32;
83
82
  }
84
- var V = U(/\p{P}|\p{S}/u), H = U(/\s/);
85
- function U(e) {
83
+ var R = B(/\p{P}|\p{S}/u), z = B(/\s/);
84
+ function B(e) {
86
85
  return t;
87
86
  function t(t) {
88
87
  return t !== null && t > -1 && e.test(String.fromCharCode(t));
89
88
  }
90
89
  }
91
90
  // node_modules/micromark-factory-space/index.js
92
- function W(e, t, n, r) {
91
+ function V(e, t, n, r) {
93
92
  let i = r ? r - 1 : Infinity, a = 0;
94
93
  return o;
95
94
  function o(r) {
96
- return B(r) ? (e.enter(n), s(r)) : t(r);
95
+ return L(r) ? (e.enter(n), s(r)) : t(r);
97
96
  }
98
97
  function s(r) {
99
- return B(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
98
+ return L(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
100
99
  }
101
100
  }
102
- function Se(e, t, n, r, i, a) {
101
+ function Ce(e, t, n, r, i, a) {
103
102
  let o = 0;
104
103
  return s;
105
104
  function s(t) {
106
- return a > 0 && B(t) ? (e.enter(r), c(t)) : l(t);
105
+ return a > 0 && L(t) ? (e.enter(r), c(t)) : l(t);
107
106
  }
108
107
  function c(t) {
109
- return B(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
108
+ return L(t) && o < a ? (e.consume(t), o++, c) : (e.exit(r), l(t));
110
109
  }
111
110
  function l(e) {
112
111
  return o >= i ? t(e) : n(e);
113
112
  }
114
113
  }
115
114
  // node_modules/micromark-util-classify-character/index.js
116
- function Ce(e) {
117
- if (e === null || z(e) || H(e)) return 1;
118
- if (V(e)) return 2;
115
+ function we(e) {
116
+ if (e === null || I(e) || z(e)) return 1;
117
+ if (R(e)) return 2;
119
118
  }
120
119
  // node_modules/micromark-util-resolve-all/index.js
121
- function we(e, t, n) {
120
+ function Te(e, t, n) {
122
121
  let r = [], i = -1;
123
122
  for (; ++i < e.length;) {
124
123
  let a = e[i].resolveAll;
@@ -127,21 +126,21 @@ function we(e, t, n) {
127
126
  return t;
128
127
  }
129
128
  // node_modules/micromark-core-commonmark/lib/blank-line.js
130
- var Te = {
129
+ var Ee = {
131
130
  partial: !0,
132
- tokenize: Ee
131
+ tokenize: De
133
132
  };
134
- function Ee(e, t, n) {
133
+ function De(e, t, n) {
135
134
  return r;
136
135
  function r(t) {
137
- return B(t) ? W(e, i, "linePrefix")(t) : i(t);
136
+ return L(t) ? V(e, i, "linePrefix")(t) : i(t);
138
137
  }
139
138
  function i(e) {
140
- return e === null || R(e) ? t(e) : n(e);
139
+ return e === null || F(e) ? t(e) : n(e);
141
140
  }
142
141
  }
143
142
  // src/local/html/html-policy.ts
144
- var De = {
143
+ var Oe = {
145
144
  b: "strong",
146
145
  strong: "strong",
147
146
  i: "emphasis",
@@ -152,12 +151,12 @@ var De = {
152
151
  mark: "mark",
153
152
  sup: "sup",
154
153
  sub: "sub"
155
- }, Oe = /* @__PURE__ */ new Set([
154
+ }, ke = /* @__PURE__ */ new Set([
156
155
  "br",
157
156
  "hr",
158
157
  "img",
159
158
  "col"
160
- ]), ke = /* @__PURE__ */ new Set([
159
+ ]), Ae = /* @__PURE__ */ new Set([
161
160
  "pre",
162
161
  "code",
163
162
  "script",
@@ -169,13 +168,13 @@ var De = {
169
168
  "noembed",
170
169
  "noframes",
171
170
  "plaintext"
172
- ]), Ae = /* @__PURE__ */ new Set([
171
+ ]), je = /* @__PURE__ */ new Set([
173
172
  "id",
174
173
  "title",
175
174
  "lang",
176
175
  "dir"
177
- ]), je = {
178
- a: d,
176
+ ]), Me = {
177
+ a: m,
179
178
  img: /* @__PURE__ */ new Set([
180
179
  "src",
181
180
  "alt",
@@ -184,9 +183,9 @@ var De = {
184
183
  ]),
185
184
  ol: /* @__PURE__ */ new Set(["start"]),
186
185
  details: /* @__PURE__ */ new Set(["open"]),
187
- ...l
186
+ ...d
188
187
  };
189
- function Me(e, t, n) {
188
+ function Ne(e, t, n) {
190
189
  let r = "";
191
190
  for (let i = t; i < n; i += 1) {
192
191
  let t = e[i];
@@ -196,36 +195,36 @@ function Me(e, t, n) {
196
195
  }
197
196
  return -1;
198
197
  }
199
- function Ne(e, t, n) {
198
+ function Pe(e, t, n) {
200
199
  if (e.startsWith("<!-->", t)) return Math.min(n, t + 5);
201
200
  if (e.startsWith("<!--->", t)) return Math.min(n, t + 6);
202
201
  let r = e.indexOf("-->", t + 4);
203
202
  return r < 0 || r + 3 > n ? n : r + 3;
204
203
  }
205
- function Pe(e) {
204
+ function Fe(e) {
206
205
  return e.trim().replace(/[\u0000- ]+/g, "");
207
206
  }
208
- function G(e, t) {
209
- let n = /^([a-z][a-z0-9+.-]*):/i.exec(Pe(e));
207
+ function H(e, t) {
208
+ let n = /^([a-z][a-z0-9+.-]*):/i.exec(Fe(e));
210
209
  if (!n) return !1;
211
210
  let r = n[1].toLowerCase();
212
211
  return t === "image" ? r !== "http" && r !== "https" : r !== "http" && r !== "https" && r !== "mailto" && r !== "tel";
213
212
  }
214
- function Fe(e, t) {
215
- return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && p.has(e) || Ae.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : je[e]?.has(t) ?? !1;
216
- }
217
213
  function Ie(e, t) {
214
+ return t === "class" || t === "style" || /^on[a-z]/i.test(t) ? !1 : t === "align" && g.has(e) || je.has(t) || /^aria-[a-z0-9_.-]+$/.test(t) || /^data-[a-z0-9_.-]+$/.test(t) ? !0 : Me[e]?.has(t) ?? !1;
215
+ }
216
+ function Le(e, t) {
218
217
  return !(e === "dir" && ![
219
218
  "ltr",
220
219
  "rtl",
221
220
  "auto"
222
- ].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()) || !c(e, t) || e === "href" && G(t, "link") || e === "src" && G(t, "image"));
221
+ ].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()) || !u(e, t) || e === "href" && H(t, "link") || e === "src" && H(t, "image"));
223
222
  }
224
- function Le(e, t) {
225
- return p.has(e) ? f(t) : null;
223
+ function Re(e, t) {
224
+ return g.has(e) ? h(t) : null;
226
225
  }
227
226
  // src/local/parsing/parser-capabilities.ts
228
- var Re = Object.freeze({}), ze = Object.freeze([
227
+ var ze = Object.freeze({}), Be = Object.freeze([
229
228
  "anchor",
230
229
  "checkbox",
231
230
  "column",
@@ -243,96 +242,97 @@ var Re = Object.freeze({}), ze = Object.freeze([
243
242
  "toggle",
244
243
  "validation"
245
244
  ]);
246
- function Be(e) {
245
+ function Ve(e) {
247
246
  let t = /* @__PURE__ */ new Set();
248
- for (let n of ze) e(n) || t.add(n);
247
+ for (let n of Be) e(n) || t.add(n);
249
248
  return t;
250
249
  }
251
250
  // src/sdk/compiler-config.ts
252
- var K = Object.freeze({
253
- id: v,
254
- version: _
255
- }), Ve = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap();
256
- function Ue(e, t = K) {
251
+ var U = Object.freeze({
252
+ id: c,
253
+ version: s
254
+ }), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap();
255
+ function He(e, t = U) {
257
256
  if (e.length === 0) return;
258
- let n = t.id === K.id && t.version === K.version;
257
+ let n = t.id === U.id && t.version === U.version;
259
258
  if (n) {
260
- let t = Ve.get(e);
259
+ let t = W.get(e);
261
260
  if (t) return t;
262
261
  }
263
- let r = y({
264
- protocol: S,
262
+ let r = l({
263
+ protocol: b,
265
264
  id: t.id,
266
265
  version: t.version,
267
266
  components: e
268
267
  });
269
- return n && Ve.set(e, r), r;
268
+ return n && W.set(e, r), r;
270
269
  }
271
- function We(e, t, n, r, i = "reactive-md-config/v1") {
272
- let a = j(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
270
+ function Ue(e, t, n, r, i = "reactive-md-config/v1") {
271
+ let a = O(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
273
272
  profile: i,
274
273
  key: r
275
274
  })] : []];
276
- return A(e, a, o);
275
+ return D(e, a, o);
277
276
  }
278
- function Ge(e) {
279
- return O(e) || M("assembly", "must be an object."), re(e, /* @__PURE__ */ new Set([
277
+ function We(e) {
278
+ return T(e) || k("assembly", "must be an object."), M(e, /* @__PURE__ */ new Set([
280
279
  "protocol",
281
280
  "presets",
282
281
  "components",
283
282
  "replacementPolicy",
284
- "themes"
285
- ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && M("assembly.protocol", `must be "${C}".`), ee(e);
286
- }
287
- function Ke(e, t = [], n = []) {
288
- let r = oe(n);
289
- if (O(e) || M("config", "must be an object."), re(e, ae, "config"), e.protocol === "reactive-md-config/v2") {
290
- let n = Ge(e.assembly), i = We(n, t, r);
291
- return h(n) > 16777216 && M("config", `serialized size exceeds the ${N}-byte budget.`), i;
292
- }
293
- e.protocol !== "reactive-md-config/v1" && M("config.protocol", `must be "${b}" (or legacy "${x}").`);
294
- let i = ie(e.presets, K, r)[0] ?? K, a = D(i, r);
295
- a === void 0 && M("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${i.id}" ${i.version}.`);
296
- let o = a.legacyKeys[0];
297
- o === void 0 && M("presets", `local.config.migration-unsupported: profile "${a.name}" has no legacy key mapping.`), k(a, t);
298
- let s = te(e.components, t);
299
- s.some((e) => e.replaces !== void 0) && M("config", "replaces is not supported by reactive-md-config/v1.");
300
- let c = Ue(t, a.preset), l = Object.freeze({
301
- protocol: C,
302
- presets: Object.freeze(c ? [c] : []),
303
- components: s,
283
+ "themes",
284
+ "fonts"
285
+ ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && k("assembly.protocol", `must be "${x}".`), A(e);
286
+ }
287
+ function Ge(e, t = [], n = []) {
288
+ let r = ae(n);
289
+ if (T(e) || k("config", "must be an object."), M(e, ie, "config"), e.protocol === "reactive-md-config/v2") {
290
+ let n = We(e.assembly), i = Ue(n, t, r);
291
+ return a(n) > 16777216 && k("config", `serialized size exceeds the ${j}-byte budget.`), i;
292
+ }
293
+ e.protocol !== "reactive-md-config/v1" && k("config.protocol", `must be "${v}" (or legacy "${y}").`);
294
+ let i = re(e.presets, U, r)[0] ?? U, o = w(i, r);
295
+ o === void 0 && k("presets", `local.config.migration-unsupported: no compatibility profile matches preset "${i.id}" ${i.version}.`);
296
+ let s = o.legacyKeys[0];
297
+ s === void 0 && k("presets", `local.config.migration-unsupported: profile "${o.name}" has no legacy key mapping.`), E(o, t);
298
+ let c = te(e.components, t);
299
+ c.some((e) => e.replaces !== void 0) && k("config", "replaces is not supported by reactive-md-config/v1.");
300
+ let l = He(t, o.preset), u = Object.freeze({
301
+ protocol: x,
302
+ presets: Object.freeze(l ? [l] : []),
303
+ components: c,
304
304
  replacementPolicy: "forbid",
305
305
  themes: Object.freeze([])
306
- }), u = We(l, t, r, t.length > 0 ? ne(a.preset, s) : void 0, o.profile);
307
- return h(l) > 16777216 && M("config", `serialized size exceeds the ${N}-byte budget.`), u;
306
+ }), d = Ue(u, t, r, t.length > 0 ? ne(o.preset, c) : void 0, s.profile);
307
+ return a(u) > 16777216 && k("config", `serialized size exceeds the ${j}-byte budget.`), d;
308
308
  }
309
- function qe(e) {
310
- let t = He.get(e);
309
+ function Ke(e) {
310
+ let t = G.get(e);
311
311
  if (t !== void 0) return t;
312
- let n = Ue(e), r = Object.freeze({
313
- protocol: C,
312
+ let n = He(e), r = Object.freeze({
313
+ protocol: x,
314
314
  presets: Object.freeze(n ? [n] : []),
315
315
  components: Object.freeze([]),
316
316
  replacementPolicy: "forbid",
317
317
  themes: Object.freeze([])
318
- }), i = j(r).key;
319
- return He.set(e, i), i;
318
+ }), i = O(r).key;
319
+ return G.set(e, i), i;
320
320
  }
321
- var q = Object.freeze({
321
+ var K = Object.freeze({
322
322
  expressions: "evaluate",
323
323
  onUnsupported: "error",
324
324
  allowImages: !0,
325
325
  allowInteractive: !0,
326
326
  allowExternalSlots: !1
327
327
  });
328
- function J(e) {
329
- if (e === void 0) return q;
328
+ function q(e) {
329
+ if (e === void 0) return K;
330
330
  if (typeof e != "object" || !e || Array.isArray(e)) return null;
331
331
  let t = Object.getPrototypeOf(e);
332
332
  if (t !== Object.prototype && t !== null) return null;
333
- let n = { ...q };
333
+ let n = { ...K };
334
334
  for (let [t, r] of Object.entries(e)) {
335
- if (!Object.hasOwn(q, t)) return null;
335
+ if (!Object.hasOwn(K, t)) return null;
336
336
  if (r !== void 0) switch (t) {
337
337
  case "expressions":
338
338
  if (r !== "evaluate" && r !== "literal") return null;
@@ -349,45 +349,45 @@ function J(e) {
349
349
  n[t] = r;
350
350
  }
351
351
  }
352
- return Object.keys(q).every((e) => n[e] === q[e]) ? q : Object.freeze(n);
352
+ return Object.keys(K).every((e) => n[e] === K[e]) ? K : Object.freeze(n);
353
353
  }
354
- function Je(e) {
355
- let t = J(e);
356
- return t ? t === q ? "" : `:embedding=4:${Object.values(t).join(":")}` : ":embedding=invalid";
354
+ function qe(e) {
355
+ let t = q(e);
356
+ return t ? t === K ? "" : `:embedding=4:${Object.values(t).join(":")}` : ":embedding=invalid";
357
357
  }
358
358
  // src/local/configuration/options-core.ts
359
- var Ye = [
359
+ var Je = [
360
360
  "enableCss",
361
361
  "enableJavaScript",
362
362
  "enableExtendedHtml"
363
- ], Xe = K;
364
- function Y(e) {
363
+ ], Ye = U;
364
+ function J(e) {
365
365
  return typeof e == "object" && !!e && !Array.isArray(e);
366
366
  }
367
- var Ze = "local.options.invalid.host-components", Qe = "local.options.invalid.host-body", $e = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, et = /* @__PURE__ */ new Set([
367
+ var Xe = "local.options.invalid.host-components", Ze = "local.options.invalid.host-body", Qe = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, $e = /* @__PURE__ */ new Set([
368
368
  "string",
369
369
  "number",
370
370
  "boolean",
371
371
  "enum"
372
- ]), tt = /* @__PURE__ */ new Set([
372
+ ]), et = /* @__PURE__ */ new Set([
373
373
  "leaf",
374
374
  "inline",
375
375
  "container"
376
- ]), nt = /* @__PURE__ */ new Set([
376
+ ]), tt = /* @__PURE__ */ new Set([
377
377
  "string",
378
378
  "number",
379
379
  "boolean"
380
- ]), rt = /* @__PURE__ */ new Set([
380
+ ]), nt = /* @__PURE__ */ new Set([
381
381
  "bind",
382
382
  "initial",
383
383
  "disabled"
384
- ]), it = /* @__PURE__ */ new Set([
384
+ ]), rt = /* @__PURE__ */ new Set([
385
385
  "maxSyntaxNodes",
386
386
  "maxParseWork",
387
387
  "maxMarkdownDepth",
388
388
  "maxRawBodyChars"
389
389
  ]);
390
- function X(e, t, n, r) {
390
+ function Y(e, t, n, r) {
391
391
  if (!Object.hasOwn(e, t)) return {
392
392
  ok: !0,
393
393
  value: n
@@ -410,7 +410,7 @@ function X(e, t, n, r) {
410
410
  value: i
411
411
  };
412
412
  }
413
- function Z(e, t = Ze) {
413
+ function X(e, t = Xe) {
414
414
  return {
415
415
  ok: !1,
416
416
  message: `Compile option hostComponents is invalid: ${e}`,
@@ -418,12 +418,12 @@ function Z(e, t = Ze) {
418
418
  detail: e
419
419
  };
420
420
  }
421
- function at(e, t) {
421
+ function it(e, t) {
422
422
  if (e === void 0) return {
423
423
  ok: !0,
424
424
  binding: void 0
425
425
  };
426
- if (!Y(e)) return Z(`${t} "binding" must be an object.`);
426
+ if (!J(e)) return X(`${t} "binding" must be an object.`);
427
427
  for (let n of Object.keys(e)) if (![
428
428
  "kind",
429
429
  "initialRule",
@@ -432,12 +432,12 @@ function at(e, t) {
432
432
  "step",
433
433
  "options",
434
434
  "exclusive"
435
- ].includes(n)) return Z(`${t} "binding" has unknown field "${n}".`);
435
+ ].includes(n)) return X(`${t} "binding" has unknown field "${n}".`);
436
436
  let n = e.kind;
437
- if (typeof n != "string" || !nt.has(n)) return Z(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
437
+ if (typeof n != "string" || !tt.has(n)) return X(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
438
438
  let r = { kind: n };
439
439
  if (Object.hasOwn(e, "exclusive") && e.exclusive !== void 0) {
440
- if (typeof e.exclusive != "boolean") return Z(`${t} "binding.exclusive" must be a boolean.`);
440
+ if (typeof e.exclusive != "boolean") return X(`${t} "binding.exclusive" must be a boolean.`);
441
441
  r.exclusive = e.exclusive;
442
442
  }
443
443
  if (Object.hasOwn(e, "initialRule") && e.initialRule !== void 0) {
@@ -448,7 +448,7 @@ function at(e, t) {
448
448
  "nearest-zero",
449
449
  "min",
450
450
  "first-option"
451
- ].includes(n)) return Z(`${t} "binding.initialRule" is not supported.`);
451
+ ].includes(n)) return X(`${t} "binding.initialRule" is not supported.`);
452
452
  r.initialRule = n;
453
453
  }
454
454
  for (let n of [
@@ -457,39 +457,39 @@ function at(e, t) {
457
457
  "step"
458
458
  ]) {
459
459
  if (!Object.hasOwn(e, n) || e[n] === void 0) continue;
460
- if (r.kind !== "number") return Z(`${t} "binding.${n}" is only valid for number bindings.`);
460
+ if (r.kind !== "number") return X(`${t} "binding.${n}" is only valid for number bindings.`);
461
461
  let i = e[n];
462
- if (typeof i != "number" || !Number.isFinite(i)) return Z(`${t} "binding.${n}" must be a finite number.`);
462
+ if (typeof i != "number" || !Number.isFinite(i)) return X(`${t} "binding.${n}" must be a finite number.`);
463
463
  r[n] = i;
464
464
  }
465
465
  if (r.kind === "number") {
466
- if (r.step !== void 0 && !(r.step > 0)) return Z(`${t} "binding.step" must be greater than 0.`);
467
- if (r.min !== void 0 && r.max !== void 0 && r.min > r.max) return Z(`${t} "binding.min" cannot exceed "binding.max".`);
468
- if (r.initialRule !== void 0 && !["min", "nearest-zero"].includes(r.initialRule)) return Z(`${t} "binding.initialRule" must be "min" or "nearest-zero" for number bindings.`);
466
+ if (r.step !== void 0 && !(r.step > 0)) return X(`${t} "binding.step" must be greater than 0.`);
467
+ if (r.min !== void 0 && r.max !== void 0 && r.min > r.max) return X(`${t} "binding.min" cannot exceed "binding.max".`);
468
+ if (r.initialRule !== void 0 && !["min", "nearest-zero"].includes(r.initialRule)) return X(`${t} "binding.initialRule" must be "min" or "nearest-zero" for number bindings.`);
469
469
  r.initialRule ??= "nearest-zero";
470
470
  }
471
471
  let i = Object.hasOwn(e, "options") && e.options !== void 0;
472
472
  if (i) {
473
- if (r.kind !== "string") return Z(`${t} "binding.options" is only valid for string bindings.`);
473
+ if (r.kind !== "string") return X(`${t} "binding.options" is only valid for string bindings.`);
474
474
  let n = e.options;
475
- if (!Array.isArray(n) || n.length === 0) return Z(`${t} "binding.options" must be a non-empty string array.`);
476
- if (n.length > 64) return Z(`${t} "binding.options" accepts at most 64 values.`);
475
+ if (!Array.isArray(n) || n.length === 0) return X(`${t} "binding.options" must be a non-empty string array.`);
476
+ if (n.length > 64) return X(`${t} "binding.options" accepts at most 64 values.`);
477
477
  let i = /* @__PURE__ */ new Set(), a = [];
478
478
  for (let e of n) {
479
- if (typeof e != "string" || e === "") return Z(`${t} "binding.options" must be a non-empty string array.`);
480
- if (e.length > 128) return Z(`${t} "binding.options" value exceeds the 128-character limit.`);
481
- if (i.has(e)) return Z(`${t} "binding.options" value "${e}" is declared more than once.`);
479
+ if (typeof e != "string" || e === "") return X(`${t} "binding.options" must be a non-empty string array.`);
480
+ if (e.length > 128) return X(`${t} "binding.options" value exceeds the 128-character limit.`);
481
+ if (i.has(e)) return X(`${t} "binding.options" value "${e}" is declared more than once.`);
482
482
  i.add(e), a.push(e);
483
483
  }
484
484
  r.options = a, r.initialRule ??= "first-option";
485
485
  }
486
486
  if (r.kind === "string") {
487
487
  let e = i ? "first-option" : "empty";
488
- if (r.initialRule !== void 0 && r.initialRule !== e) return Z(`${t} "binding.initialRule" must be "${e}" for ${i ? "choice" : "string"} bindings.`);
488
+ if (r.initialRule !== void 0 && r.initialRule !== e) return X(`${t} "binding.initialRule" must be "${e}" for ${i ? "choice" : "string"} bindings.`);
489
489
  r.initialRule ??= e;
490
490
  }
491
491
  if (r.kind === "boolean") {
492
- if (r.initialRule !== void 0 && r.initialRule !== "false") return Z(`${t} "binding.initialRule" must be "false" for boolean bindings.`);
492
+ if (r.initialRule !== void 0 && r.initialRule !== "false") return X(`${t} "binding.initialRule" must be "false" for boolean bindings.`);
493
493
  r.initialRule ??= "false";
494
494
  }
495
495
  return {
@@ -497,94 +497,94 @@ function at(e, t) {
497
497
  binding: r
498
498
  };
499
499
  }
500
- function ot(e, t) {
500
+ function at(e, t) {
501
501
  let n = [], r = /* @__PURE__ */ new Map();
502
502
  if (e === void 0) return {
503
503
  ok: !0,
504
504
  hostComponents: n,
505
505
  hostByName: r
506
506
  };
507
- if (!Array.isArray(e)) return Z("must be an array.");
508
- if (e.length > 32) return Z("accepts at most 32 components.");
507
+ if (!Array.isArray(e)) return X("must be an array.");
508
+ if (e.length > 32) return X("accepts at most 32 components.");
509
509
  let i = /* @__PURE__ */ new Set();
510
510
  for (let e of t) i.add(e.name.toLowerCase());
511
- for (let e of m) i.add(e.name.toLowerCase());
512
- for (let e of u) i.add(e.toLowerCase());
511
+ for (let e of _) i.add(e.name.toLowerCase());
512
+ for (let e of p) i.add(e.toLowerCase());
513
513
  i.add("theme");
514
514
  for (let t = 0; t < e.length; t += 1) {
515
- let a = e[t], o = `hostComponents[${t}]`;
516
- if (!Y(a)) return Z(`${o} must be an object.`);
517
- let s = a.name;
518
- if (typeof s != "string") return Z(`${o} "name" must be a string.`);
519
- if (s.length > 128) return Z(`${o} "name" exceeds the 128-character limit.`);
520
- if (!$e.test(s)) return Z(`${o} "name" ${s} must use lowercase kebab-case.`);
521
- if (i.has(s.toLowerCase())) return Z(`${o} "name" ${s} conflicts with a built-in component, HTML tag or theme.`);
522
- if (r.has(s.toLowerCase())) return Z(`${o} "name" ${s} is declared more than once.`);
523
- if (typeof a.form != "string" || !tt.has(a.form)) return Z(`${o} "form" must be "leaf", "inline" or "container".`);
524
- let c = a.form, l;
515
+ let a = e[t], s = `hostComponents[${t}]`;
516
+ if (!J(a)) return X(`${s} must be an object.`);
517
+ let c = a.name;
518
+ if (typeof c != "string") return X(`${s} "name" must be a string.`);
519
+ if (c.length > 128) return X(`${s} "name" exceeds the 128-character limit.`);
520
+ if (!Qe.test(c)) return X(`${s} "name" ${c} must use lowercase kebab-case.`);
521
+ if (i.has(c.toLowerCase())) return X(`${s} "name" ${c} conflicts with a built-in component, HTML tag or theme.`);
522
+ if (r.has(c.toLowerCase())) return X(`${s} "name" ${c} is declared more than once.`);
523
+ if (typeof a.form != "string" || !et.has(a.form)) return X(`${s} "form" must be "leaf", "inline" or "container".`);
524
+ let l = a.form, u;
525
525
  if (Object.hasOwn(a, "body") && a.body !== void 0) {
526
- if (a.body !== "markdown" && a.body !== "raw") return Z(`${o} "body" must be "markdown" or "raw".`, Qe);
527
- if (c !== "container") return Z(`${o} "body" is only valid for a container component.`, Qe);
528
- l = a.body;
526
+ if (a.body !== "markdown" && a.body !== "raw") return X(`${s} "body" must be "markdown" or "raw".`, Ze);
527
+ if (l !== "container") return X(`${s} "body" is only valid for a container component.`, Ze);
528
+ u = a.body;
529
529
  }
530
- let u = at(a.binding, o);
531
- if (!u.ok) return u;
532
- let d = u.binding, f = a.props;
533
- if (!Y(f)) return Z(`${o} "props" must be an object.`);
534
- let p = {};
535
- for (let e of Object.keys(f)) {
536
- if (!$e.test(e)) return Z(`${o} property "${e}" must use lowercase kebab-case.`);
537
- if (d && rt.has(e)) return Z(`${o} property "${e}" is reserved by the host binding.`);
538
- let t = f[e];
539
- if (!Y(t)) return Z(`${o} property "${e}" must be an object.`);
530
+ let d = it(a.binding, s);
531
+ if (!d.ok) return d;
532
+ let f = d.binding, p = a.props;
533
+ if (!J(p)) return X(`${s} "props" must be an object.`);
534
+ let m = {};
535
+ for (let e of Object.keys(p)) {
536
+ if (!Qe.test(e)) return X(`${s} property "${e}" must use lowercase kebab-case.`);
537
+ if (f && nt.has(e)) return X(`${s} property "${e}" is reserved by the host binding.`);
538
+ let t = p[e];
539
+ if (!J(t)) return X(`${s} property "${e}" must be an object.`);
540
540
  let n = t.kind;
541
- if (typeof n != "string" || !et.has(n)) return Z(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
541
+ if (typeof n != "string" || !$e.has(n)) return X(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
542
542
  let r = { kind: n };
543
543
  for (let n of ["required", "static"]) if (Object.hasOwn(t, n) && t[n] !== void 0) {
544
- if (typeof t[n] != "boolean") return Z(`${o} property "${e}" "${n}" must be a boolean.`);
544
+ if (typeof t[n] != "boolean") return X(`${s} property "${e}" "${n}" must be a boolean.`);
545
545
  r[n] = t[n];
546
546
  }
547
547
  let i = Object.hasOwn(t, "enum") && t.enum !== void 0;
548
548
  if (n !== "enum") {
549
- if (i) return Z(`${o} property "${e}" has "enum" but kind is "${n}".`);
549
+ if (i) return X(`${s} property "${e}" has "enum" but kind is "${n}".`);
550
550
  } else {
551
551
  let n = t.enum;
552
- if (!Array.isArray(n) || n.length === 0) return Z(`${o} property "${e}" "enum" must be a non-empty string array.`);
553
- if (n.length > 64) return Z(`${o} property "${e}" "enum" accepts at most 64 values.`);
552
+ if (!Array.isArray(n) || n.length === 0) return X(`${s} property "${e}" "enum" must be a non-empty string array.`);
553
+ if (n.length > 64) return X(`${s} property "${e}" "enum" accepts at most 64 values.`);
554
554
  let i = /* @__PURE__ */ new Set();
555
555
  for (let t of n) {
556
- if (typeof t != "string") return Z(`${o} property "${e}" "enum" must be a non-empty string array.`);
557
- if (t.length > 128) return Z(`${o} property "${e}" enum value exceeds the 128-character limit.`);
558
- if (i.has(t)) return Z(`${o} property "${e}" enum value "${t}" is declared more than once.`);
556
+ if (typeof t != "string") return X(`${s} property "${e}" "enum" must be a non-empty string array.`);
557
+ if (t.length > 128) return X(`${s} property "${e}" enum value exceeds the 128-character limit.`);
558
+ if (i.has(t)) return X(`${s} property "${e}" enum value "${t}" is declared more than once.`);
559
559
  i.add(t);
560
560
  }
561
561
  r.enum = [...n];
562
562
  }
563
563
  let a = Object.hasOwn(t, "pattern") && t.pattern !== void 0;
564
564
  if (n !== "string") {
565
- if (a) return Z(`${o} property "${e}" has "pattern" but kind is "${n}".`);
565
+ if (a) return X(`${s} property "${e}" has "pattern" but kind is "${n}".`);
566
566
  } else if (a) {
567
567
  let n = t.pattern;
568
- if (typeof n != "string") return Z(`${o} property "${e}" "pattern" must be a string.`);
569
- if (n.length > 512) return Z(`${o} property "${e}" "pattern" exceeds the 512-character limit.`);
568
+ if (typeof n != "string") return X(`${s} property "${e}" "pattern" must be a string.`);
569
+ if (n.length > 512) return X(`${s} property "${e}" "pattern" exceeds the 512-character limit.`);
570
570
  try {
571
571
  new RegExp(n);
572
572
  } catch {
573
- return Z(`${o} property "${e}" "pattern" is not a valid regular expression.`);
573
+ return X(`${s} property "${e}" "pattern" is not a valid regular expression.`);
574
574
  }
575
- if (!g(n)) return Z(`${o} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
575
+ if (!o(n)) return X(`${s} property "${e}" "pattern" uses unsupported regex syntax; nested quantifiers, quantified alternation, backreferences and lookarounds are rejected.`);
576
576
  r.pattern = n;
577
577
  }
578
- p[e] = r;
578
+ m[e] = r;
579
579
  }
580
- let m = {
581
- name: s,
582
- form: c,
583
- props: p,
584
- ...d ? { binding: d } : {},
585
- ...l ? { body: l } : {}
580
+ let h = {
581
+ name: c,
582
+ form: l,
583
+ props: m,
584
+ ...f ? { binding: f } : {},
585
+ ...u ? { body: u } : {}
586
586
  };
587
- n.push(m), r.set(s, m);
587
+ n.push(h), r.set(c, h);
588
588
  }
589
589
  return {
590
590
  ok: !0,
@@ -592,13 +592,18 @@ function ot(e, t) {
592
592
  hostByName: r
593
593
  };
594
594
  }
595
- function st(e) {
595
+ function ot(e) {
596
596
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
597
597
  }
598
- function ct(e) {
598
+ function st(e) {
599
599
  let t = e.static === !0 || e.dynamic === !1;
600
+ if (e.kind === "enum" && e.allowPositiveNumber) return {
601
+ kind: "string",
602
+ ...e.required === !0 && e.default === void 0 ? { required: !0 } : {},
603
+ ...t ? { static: !0 } : {}
604
+ };
600
605
  if (e.kind === "enum") {
601
- let n = `^(?:${(e.enum ?? []).map(st).join("|")})$`;
606
+ let n = `^(?:${(e.enum ?? []).map(ot).join("|")})$`;
602
607
  if (n.length <= 512) return {
603
608
  kind: "string",
604
609
  ...e.required === !0 ? { required: !0 } : {},
@@ -609,18 +614,18 @@ function ct(e) {
609
614
  let n = { kind: e.kind };
610
615
  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;
611
616
  }
612
- function lt(e) {
617
+ function ct(e) {
613
618
  if (e.form === "container" && e.body === "raw") return {
614
619
  rule: "raw-body",
615
620
  label: "none"
616
621
  };
617
622
  }
618
- function ut(e) {
623
+ function lt(e) {
619
624
  let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
620
625
  for (let i of e.components) {
621
626
  let e = {};
622
- for (let t of Object.keys(i.props)) e[t] = ct(i.props[t]);
623
- let a = w(i), o = {
627
+ for (let t of Object.keys(i.props)) e[t] = st(i.props[t]);
628
+ let a = S(i), o = {
624
629
  name: i.name,
625
630
  form: i.form,
626
631
  props: e,
@@ -635,51 +640,51 @@ function ut(e) {
635
640
  sdkByName: r
636
641
  };
637
642
  }
638
- function Q(e, t) {
643
+ function Z(e, t) {
639
644
  let n = /* @__PURE__ */ new Map();
640
645
  for (let t of e) n.set(t.name, t);
641
646
  let r = /* @__PURE__ */ new Map();
642
647
  for (let e of t.values()) r.set(e.name, e);
643
- for (let e of m) r.has(e.name) || r.set(e.name, T(e));
648
+ for (let e of _) r.has(e.name) || r.set(e.name, ee(e));
644
649
  return {
645
650
  componentByName: n,
646
651
  schemaByName: r
647
652
  };
648
653
  }
649
- function $(e) {
654
+ function Q(e) {
650
655
  let t = /* @__PURE__ */ new Map();
651
- for (let n of e) t.set(n.name, E(n));
656
+ for (let n of e) t.set(n.name, C(n));
652
657
  return t;
653
658
  }
654
- function dt(n, o) {
655
- let c = o.defaults, l = new Set(c.map((e) => e.name));
656
- if (n !== void 0 && !Y(n)) return {
659
+ function ut(a, o) {
660
+ let s = o.defaults, c = new Set(s.map((e) => e.name));
661
+ if (a !== void 0 && !J(a)) return {
657
662
  ok: !1,
658
663
  message: "Compile options must be an object.",
659
664
  key: "local.options.invalid.object"
660
665
  };
661
- let u = n ?? {}, d = J(Object.hasOwn(u, "embedding") ? u.embedding : void 0);
662
- if (!d) return {
666
+ let l = a ?? {}, u = q(Object.hasOwn(l, "embedding") ? l.embedding : void 0);
667
+ if (!u) return {
663
668
  ok: !1,
664
669
  key: "local.options.invalid.embedding",
665
670
  message: "Invalid embedding compile options."
666
671
  };
667
- let f = { ...s };
668
- for (let e of Ye) {
669
- if (!Object.hasOwn(u, e)) continue;
670
- let t = u[e];
672
+ let d = { ...f };
673
+ for (let e of Je) {
674
+ if (!Object.hasOwn(l, e)) continue;
675
+ let t = l[e];
671
676
  if (t !== void 0) {
672
677
  if (typeof t != "boolean") return {
673
678
  ok: !1,
674
679
  message: `Compile option ${e} must be a boolean.`,
675
680
  key: "local.options.invalid.html-flag"
676
681
  };
677
- f[e] = t;
682
+ d[e] = t;
678
683
  }
679
684
  }
680
685
  let p = !1;
681
- if (Object.hasOwn(u, "markdownBreaks")) {
682
- let e = u.markdownBreaks;
686
+ if (Object.hasOwn(l, "markdownBreaks")) {
687
+ let e = l.markdownBreaks;
683
688
  if (e !== void 0) {
684
689
  if (typeof e != "boolean") return {
685
690
  ok: !1,
@@ -690,8 +695,8 @@ function dt(n, o) {
690
695
  }
691
696
  }
692
697
  let m = !0;
693
- if (Object.hasOwn(u, "strict")) {
694
- let e = u.strict;
698
+ if (Object.hasOwn(l, "strict")) {
699
+ let e = l.strict;
695
700
  if (e !== void 0) {
696
701
  if (typeof e != "boolean") return {
697
702
  ok: !1,
@@ -702,8 +707,8 @@ function dt(n, o) {
702
707
  }
703
708
  }
704
709
  let h;
705
- if (Object.hasOwn(u, "sourcePhase")) {
706
- let e = u.sourcePhase;
710
+ if (Object.hasOwn(l, "sourcePhase")) {
711
+ let e = l.sourcePhase;
707
712
  if (e !== void 0 && e !== "streaming" && e !== "final") return {
708
713
  ok: !1,
709
714
  message: "Compile option sourcePhase must be \"streaming\" or \"final\".",
@@ -711,42 +716,42 @@ function dt(n, o) {
711
716
  };
712
717
  (e === "streaming" || e === "final") && (h = e);
713
718
  }
714
- let g = u.limits, _ = t, v = a, y = i, b = r;
719
+ let g = l.limits, _ = t, v = i, y = r, b = n;
715
720
  if (g !== void 0) {
716
- if (!Y(g)) return {
721
+ if (!J(g)) return {
717
722
  ok: !1,
718
723
  message: "Compile option limits must be an object.",
719
724
  key: "local.options.invalid.limits"
720
725
  };
721
- for (let e of Object.keys(g)) if (!it.has(e) && g[e] !== void 0) return {
726
+ for (let e of Object.keys(g)) if (!rt.has(e) && g[e] !== void 0) return {
722
727
  ok: !1,
723
728
  message: `Compile option limits.${e} is not supported.`,
724
729
  key: "local.options.invalid.limits-unknown",
725
730
  detail: e
726
731
  };
727
- let t = X(g, "maxSyntaxNodes", _);
732
+ let t = Y(g, "maxSyntaxNodes", _);
728
733
  if (!t.ok) return t;
729
734
  _ = t.value;
730
- let n = X(g, "maxParseWork", v);
735
+ let n = Y(g, "maxParseWork", v);
731
736
  if (!n.ok) return n;
732
737
  v = n.value;
733
- let r = X(g, "maxMarkdownDepth", y);
738
+ let r = Y(g, "maxMarkdownDepth", y);
734
739
  if (!r.ok) return r;
735
740
  y = r.value;
736
- let i = X(g, "maxRawBodyChars", b, e);
741
+ let i = Y(g, "maxRawBodyChars", b, e);
737
742
  if (!i.ok) return i;
738
743
  b = i.value;
739
744
  }
740
- let x = Object.hasOwn(u, "config") && u.config !== void 0, S = Object.hasOwn(u, "hostComponents") && u.hostComponents !== void 0;
745
+ let x = Object.hasOwn(l, "config") && l.config !== void 0, S = Object.hasOwn(l, "hostComponents") && l.hostComponents !== void 0;
741
746
  if (x && S) return {
742
747
  ok: !1,
743
748
  message: "Compile option config cannot be combined with hostComponents.",
744
749
  key: "local.options.invalid.config-conflict"
745
750
  };
746
- let C, w, E, D, O, k, A, j, M;
751
+ let C, w, T, E, D, O, k, A, j;
747
752
  if (x) {
748
753
  try {
749
- C = o.readConfig(u.config, c);
754
+ C = o.readConfig(l.config, s);
750
755
  } catch (e) {
751
756
  let t = e instanceof Error ? e.message : String(e);
752
757
  return {
@@ -756,28 +761,28 @@ function dt(n, o) {
756
761
  detail: t
757
762
  };
758
763
  }
759
- let e = ut(C);
760
- w = e.hostComponents, E = e.hostByName, D = e.sdkByName, O = C.registry;
761
- let t = Q(O, $(O));
762
- k = t.schemaByName, A = t.componentByName, j = new Set(C.components.map((e) => e.name)), M = /* @__PURE__ */ new Set();
764
+ let e = lt(C);
765
+ w = e.hostComponents, T = e.hostByName, E = e.sdkByName, D = C.registry;
766
+ let t = Z(D, Q(D));
767
+ O = t.schemaByName, k = t.componentByName, A = new Set(C.components.map((e) => e.name)), j = /* @__PURE__ */ new Set();
763
768
  } else if (S) {
764
- let e = ot(u.hostComponents, c);
769
+ let e = at(l.hostComponents, s);
765
770
  if (!e.ok) return e;
766
- w = e.hostComponents, E = e.hostByName, D = /* @__PURE__ */ new Map(), O = c;
767
- let t = $(c);
771
+ w = e.hostComponents, T = e.hostByName, E = /* @__PURE__ */ new Map(), D = s;
772
+ let t = Q(s);
768
773
  for (let [n, r] of e.hostByName) {
769
- let e = lt(r);
770
- t.set(n, T({
774
+ let e = ct(r);
775
+ t.set(n, ee({
771
776
  ...r,
772
777
  legacyHost: !0
773
778
  }, e ? { structure: e } : void 0));
774
779
  }
775
- let n = Q(c, t);
776
- k = n.schemaByName, A = n.componentByName, j = new Set(e.hostByName.keys()), M = new Set(e.hostByName.keys());
780
+ let n = Z(s, t);
781
+ O = n.schemaByName, k = n.componentByName, A = new Set(e.hostByName.keys()), j = new Set(e.hostByName.keys());
777
782
  } else {
778
- w = [], E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), O = c;
779
- let e = Q(c, $(c));
780
- k = e.schemaByName, A = e.componentByName, j = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
783
+ w = [], T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), D = s;
784
+ let e = Z(s, Q(s));
785
+ O = e.schemaByName, k = e.componentByName, A = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Set();
781
786
  }
782
787
  return {
783
788
  ok: !0,
@@ -786,75 +791,147 @@ function dt(n, o) {
786
791
  maxMarkdownDepth: y,
787
792
  maxRawBodyChars: b,
788
793
  ...h ? { sourcePhase: h } : {},
789
- html: f,
794
+ html: d,
790
795
  markdownBreaks: p,
791
- embedding: d,
796
+ embedding: u,
792
797
  strict: m,
793
798
  hostComponents: w,
794
- hostByName: E,
799
+ hostByName: T,
795
800
  ...C ? { config: C } : {},
796
- sdkByName: D,
797
- registry: O,
798
- componentByName: A,
799
- schemaByName: k,
800
- defaultComponentNames: l,
801
- unmountedLeafNames: C?.presets.some((e) => e.id === "reactive-md/minimal") ? Be((e) => k.has(e)) : /* @__PURE__ */ new Set(),
802
- externalComponentNames: j,
803
- legacyHostNames: M,
801
+ sdkByName: E,
802
+ registry: D,
803
+ componentByName: k,
804
+ schemaByName: O,
805
+ defaultComponentNames: c,
806
+ unmountedLeafNames: C?.presets.some((e) => e.id === "reactive-md/minimal") ? Ve((e) => O.has(e)) : /* @__PURE__ */ new Set(),
807
+ externalComponentNames: A,
808
+ legacyHostNames: j,
804
809
  componentConfigKey: C ? o.configKey(C) : o.defaultConfigKey,
805
- capabilities: o.capabilities ?? Re,
810
+ capabilities: o.capabilities ?? ze,
806
811
  ...o.preset ? { preset: o.preset } : {}
807
812
  };
808
813
  }
809
- function ft(e, t = [], n) {
810
- let r = t.length > 0 ? Xe : void 0;
811
- return dt(e, {
814
+ function dt(e, t = [], n) {
815
+ let r = t.length > 0 ? Ye : void 0;
816
+ return ut(e, {
812
817
  defaults: t,
813
818
  ...r ? { preset: r } : {},
814
- defaultConfigKey: qe(t),
815
- readConfig: Ke,
819
+ defaultConfigKey: Ke(t),
820
+ readConfig: Ge,
816
821
  configKey: (e) => e.key,
817
822
  ...n ? { capabilities: n } : {}
818
823
  });
819
824
  }
820
- function pt(e) {
825
+ function ft(e) {
821
826
  return e.componentConfigKey;
822
827
  }
823
- // src/local/evaluation/validation.ts
824
- var mt = "local.validation.failed", ht = "local.validation.expression", gt = "Validation failed.";
825
- function _t(e) {
826
- return e.length > 2e3 ? `${o(e, n - 1)}…` : e;
827
- }
828
- function vt(e) {
829
- let t = e.trim();
830
- return t ? t.split(/\s+/) : [];
831
- }
832
- function yt(e) {
833
- let t = [0];
834
- for (let n = 0; n < e.length; n += 1) e[n] === "\n" && t.push(n + 1);
835
- return t;
836
- }
837
- function bt(e) {
838
- if (!e || typeof e != "object") return !1;
839
- let t = e, n = t.range;
840
- return typeof t.expression == "string" && typeof t.message == "string" && Array.isArray(t.fields) && !!n && Number.isFinite(n.start) && Number.isFinite(n.end);
841
- }
842
- function xt(e, t, n, r, i) {
843
- 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);
844
- for (; c < l;) {
845
- let e = Math.ceil((c + l) / 2);
846
- t[e] <= o ? c = e : l = e - 1;
847
- }
848
- return {
849
- code: r,
850
- message: i,
851
- severity: "error",
852
- range: {
853
- start: o,
854
- end: s
855
- },
856
- line: c + 1,
857
- column: o - t[c] + 1
858
- };
859
- }
860
- export { _e as A, me as B, Te as C, Se as D, W as E, R as F, ue as H, z as I, B as L, ye as M, be as N, he as O, xe as P, V as R, Ie as S, Ce as T, I as U, de as V, ce as W, Oe as _, bt as a, Me as b, xt as c, ft as d, dt as f, ke as g, De as h, _t as i, ve as j, ge as k, Ye as l, J as m, mt as n, yt as o, Je as p, gt as r, vt as s, ht as t, pt as u, Le as v, we as w, Fe as x, Ne as y, H as z };
828
+ // src/contracts/sha256-utf16.ts
829
+ var pt = new Uint32Array([
830
+ 1116352408,
831
+ 1899447441,
832
+ 3049323471,
833
+ 3921009573,
834
+ 961987163,
835
+ 1508970993,
836
+ 2453635748,
837
+ 2870763221,
838
+ 3624381080,
839
+ 310598401,
840
+ 607225278,
841
+ 1426881987,
842
+ 1925078388,
843
+ 2162078206,
844
+ 2614888103,
845
+ 3248222580,
846
+ 3835390401,
847
+ 4022224774,
848
+ 264347078,
849
+ 604807628,
850
+ 770255983,
851
+ 1249150122,
852
+ 1555081692,
853
+ 1996064986,
854
+ 2554220882,
855
+ 2821834349,
856
+ 2952996808,
857
+ 3210313671,
858
+ 3336571891,
859
+ 3584528711,
860
+ 113926993,
861
+ 338241895,
862
+ 666307205,
863
+ 773529912,
864
+ 1294757372,
865
+ 1396182291,
866
+ 1695183700,
867
+ 1986661051,
868
+ 2177026350,
869
+ 2456956037,
870
+ 2730485921,
871
+ 2820302411,
872
+ 3259730800,
873
+ 3345764771,
874
+ 3516065817,
875
+ 3600352804,
876
+ 4094571909,
877
+ 275423344,
878
+ 430227734,
879
+ 506948616,
880
+ 659060556,
881
+ 883997877,
882
+ 958139571,
883
+ 1322822218,
884
+ 1537002063,
885
+ 1747873779,
886
+ 1955562222,
887
+ 2024104815,
888
+ 2227730452,
889
+ 2361852424,
890
+ 2428436474,
891
+ 2756734187,
892
+ 3204031479,
893
+ 3329325298
894
+ ]);
895
+ function $(e, t) {
896
+ return e >>> t | e << 32 - t;
897
+ }
898
+ function mt(e) {
899
+ let t = e.length * 2, n = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(Math.ceil((t + 9) / 64) * 64));
900
+ for (let t = 0; t < e.length; t += 1) n.setUint16(t * 2, e.charCodeAt(t), !0);
901
+ n.setUint8(t, 128), n.setUint32(n.byteLength - 8, Math.floor(t / 536870912)), n.setUint32(n.byteLength - 4, t * 8);
902
+ let r = new Uint32Array([
903
+ 1779033703,
904
+ 3144134277,
905
+ 1013904242,
906
+ 2773480762,
907
+ 1359893119,
908
+ 2600822924,
909
+ 528734635,
910
+ 1541459225
911
+ ]), i = /* @__PURE__ */ new Uint32Array(64);
912
+ for (let e = 0; e < n.byteLength; e += 64) {
913
+ for (let t = 0; t < 16; t += 1) i[t] = n.getUint32(e + t * 4);
914
+ for (let e = 16; e < 64; e += 1) {
915
+ let t = i[e - 15], n = i[e - 2], r = $(t, 7) ^ $(t, 18) ^ t >>> 3, a = $(n, 17) ^ $(n, 19) ^ n >>> 10;
916
+ i[e] = i[e - 16] + r + i[e - 7] + a;
917
+ }
918
+ let [t, a, o, s, c, l, u, d] = r;
919
+ for (let e = 0; e < 64; e += 1) {
920
+ let n = $(c, 6) ^ $(c, 11) ^ $(c, 25), r = c & l ^ ~c & u, f = d + n + r + pt[e] + i[e], p = $(t, 2) ^ $(t, 13) ^ $(t, 22), m = t & a ^ t & o ^ a & o;
921
+ d = u, u = l, l = c, c = s + f >>> 0, s = o, o = a, a = t, t = f + p + m >>> 0;
922
+ }
923
+ let f = [
924
+ t,
925
+ a,
926
+ o,
927
+ s,
928
+ c,
929
+ l,
930
+ u,
931
+ d
932
+ ];
933
+ for (let e = 0; e < r.length; e += 1) r[e] += f[e];
934
+ }
935
+ return "sha256:" + Array.from(r, (e) => e.toString(16).padStart(8, "0")).join("");
936
+ }
937
+ export { L as A, ve as C, Se as D, xe as E, de as F, N as I, se as L, z as M, he as N, F as O, fe as P, _e as S, be as T, Te as _, ut as a, Ce as b, Oe as c, Re as d, Pe as f, Ee as g, Le as h, dt as i, R as j, I as k, Ae as l, Ie as m, Je as n, qe as o, Ne as p, ft as r, q as s, mt as t, ke as u, we as v, ye as w, ge as x, V as y };