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.
- package/CHANGELOG-ch.md +34 -0
- package/CHANGELOG.md +34 -0
- package/README-ch.md +7 -7
- package/README-en.md +7 -7
- package/README.md +7 -7
- package/THIRD_PARTY_NOTICES.md +0 -57
- package/cli/help.mjs +6 -4
- package/cli/init.mjs +1 -1
- package/cli/migrate.mjs +1 -1
- package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
- package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
- package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
- package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
- package/dist-library/authoring-Bwu_zCWs.js +768 -0
- package/dist-library/choice-values-BItGjPD2.js +58 -0
- package/dist-library/compile-B35rfzKr.js +1742 -0
- package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
- package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
- package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
- package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
- package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
- package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
- package/dist-library/conditional-branches-CIhJXasR.js +17 -0
- package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
- package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
- package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
- package/dist-library/data-table-CSAkm1eU.js +290 -0
- package/dist-library/data-table-model-DruztQFt.js +391 -0
- package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
- package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
- package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
- package/dist-library/default-options-By16CVw1.js +131 -0
- package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
- package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
- package/dist-library/display-Bb6hAG5T.js +2065 -0
- package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
- package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
- package/dist-library/font-aliases-CKYjwn4o.js +4 -0
- package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
- package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
- package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
- package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
- package/dist-library/layout-CPQggKxk.js +592 -0
- package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
- package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
- package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
- package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
- package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
- package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
- package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
- package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
- package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
- package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
- package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
- package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
- package/dist-library/reactive-md-authoring.js +277 -269
- package/dist-library/reactive-md-build.js +327 -33
- package/dist-library/reactive-md-compiler-session.js +3 -3
- package/dist-library/reactive-md-compiler-standard.js +10 -10
- package/dist-library/reactive-md-compiler.js +3 -3
- package/dist-library/reactive-md-contracts.js +4 -4
- package/dist-library/reactive-md-default-packs.js +4 -3
- package/dist-library/reactive-md-default-preset.js +3 -3
- package/dist-library/reactive-md-export.js +6 -6
- package/dist-library/reactive-md-minimal-preset.js +3 -2
- package/dist-library/reactive-md-minimal-react-preset.js +18 -17
- package/dist-library/reactive-md-minimal.css +1 -1
- package/dist-library/reactive-md-observability.js +2 -2
- package/dist-library/reactive-md-pack-style-manifest.js +8 -0
- package/dist-library/reactive-md-plugin-chart.js +13 -9
- package/dist-library/reactive-md-plugin-data.js +4 -4
- package/dist-library/reactive-md-plugin-diagram.js +3 -3
- package/dist-library/reactive-md-plugin-forms.js +5 -5
- package/dist-library/reactive-md-plugin-gallery.js +3 -3
- package/dist-library/reactive-md-plugin-navigation.js +10 -10
- package/dist-library/reactive-md-plugin-network.js +5 -5
- package/dist-library/reactive-md-plugin-plot.js +4 -4
- package/dist-library/reactive-md-react-component-accordion.js +3 -3
- package/dist-library/reactive-md-react-component-alert.js +3 -3
- package/dist-library/reactive-md-react-component-anchor.js +3 -3
- package/dist-library/reactive-md-react-component-badge.js +3 -3
- package/dist-library/reactive-md-react-component-card.js +3 -3
- package/dist-library/reactive-md-react-component-chart.js +2 -2
- package/dist-library/reactive-md-react-component-checkbox.js +2 -2
- package/dist-library/reactive-md-react-component-checklist.js +2 -2
- package/dist-library/reactive-md-react-component-choices.js +2 -2
- package/dist-library/reactive-md-react-component-column.js +1 -1
- package/dist-library/reactive-md-react-component-coordinate.js +2 -2
- package/dist-library/reactive-md-react-component-counter.js +2 -2
- package/dist-library/reactive-md-react-component-data-table.js +2 -2
- package/dist-library/reactive-md-react-component-date.js +2 -2
- package/dist-library/reactive-md-react-component-diagram.js +2 -2
- package/dist-library/reactive-md-react-component-disclosure.js +3 -3
- package/dist-library/reactive-md-react-component-edge.js +1 -1
- package/dist-library/reactive-md-react-component-else.js +10 -0
- package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
- package/dist-library/reactive-md-react-component-gallery.js +2 -2
- package/dist-library/reactive-md-react-component-grid.js +3 -3
- package/dist-library/reactive-md-react-component-if.js +3 -3
- package/dist-library/reactive-md-react-component-input.js +2 -2
- package/dist-library/reactive-md-react-component-jump.js +3 -3
- package/dist-library/reactive-md-react-component-multi-select.js +2 -2
- package/dist-library/reactive-md-react-component-node.js +2 -2
- package/dist-library/reactive-md-react-component-number.js +2 -2
- package/dist-library/reactive-md-react-component-option.js +1 -1
- package/dist-library/reactive-md-react-component-panel.js +3 -3
- package/dist-library/reactive-md-react-component-plot.js +2 -2
- package/dist-library/reactive-md-react-component-progress.js +2 -2
- package/dist-library/reactive-md-react-component-quiz.js +2 -2
- package/dist-library/reactive-md-react-component-radio-group.js +2 -2
- package/dist-library/reactive-md-react-component-range-slider.js +2 -2
- package/dist-library/reactive-md-react-component-section.js +3 -3
- package/dist-library/reactive-md-react-component-select.js +2 -2
- package/dist-library/reactive-md-react-component-slider.js +2 -2
- package/dist-library/reactive-md-react-component-step.js +3 -3
- package/dist-library/reactive-md-react-component-steps.js +3 -3
- package/dist-library/reactive-md-react-component-tab.js +3 -3
- package/dist-library/reactive-md-react-component-table.js +2 -2
- package/dist-library/reactive-md-react-component-tabs.js +3 -3
- package/dist-library/reactive-md-react-component-text.js +3 -3
- package/dist-library/reactive-md-react-component-textarea.js +2 -2
- package/dist-library/reactive-md-react-component-timeline.js +2 -2
- package/dist-library/reactive-md-react-component-timer.js +2 -2
- package/dist-library/reactive-md-react-component-toggle.js +2 -2
- package/dist-library/reactive-md-react-component-tooltip.js +3 -3
- package/dist-library/reactive-md-react-component-validation.js +3 -3
- package/dist-library/reactive-md-react-minimal.js +4 -4
- package/dist-library/reactive-md-react-pack-controls.js +4 -4
- package/dist-library/reactive-md-react-pack-data.js +3 -3
- package/dist-library/reactive-md-react-pack-layout.js +25 -24
- package/dist-library/reactive-md-react-pack-visuals.js +2 -2
- package/dist-library/reactive-md-react-packed.js +6 -6
- package/dist-library/reactive-md-react-server.js +37 -36
- package/dist-library/reactive-md-react-static-server.js +2 -2
- package/dist-library/reactive-md-react-static.js +1 -1
- package/dist-library/reactive-md-react-unstyled.js +12 -12
- package/dist-library/reactive-md-react.js +12 -12
- package/dist-library/reactive-md-scan.js +1 -1
- package/dist-library/reactive-md-sdk.js +23 -9
- package/dist-library/reactive-md-standalone-configured.js +2 -2
- package/dist-library/reactive-md-standalone-host.js +2 -2
- package/dist-library/reactive-md-testing-browser.js +2 -2
- package/dist-library/reactive-md-testing-react.js +6 -6
- package/dist-library/reactive-md-testing.js +6 -6
- package/dist-library/reactive-md-vite.js +25 -9
- package/dist-library/reactive-md-worker-pool.js +3 -3
- package/dist-library/reactive-md.css +1 -1
- package/dist-library/reactive-md.js +52 -43
- package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
- package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
- package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
- package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
- package/dist-library/rmd-pack-layout.css +9 -0
- package/dist-library/rmd-pack-resource-layout.css +9 -0
- package/dist-library/runtime-BHeuLOv_.js +1369 -0
- package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
- package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
- package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
- package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
- package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
- package/dist-library/shareable-CHCDnl6j.js +844 -0
- package/dist-library/types/authoring/catalog.d.ts +3 -1
- package/dist-library/types/authoring/index.d.ts +1 -1
- package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
- package/dist-library/types/components/chart/default-chart.d.ts +7 -0
- package/dist-library/types/components/entries/else.d.ts +3 -0
- package/dist-library/types/components/layout/layout.d.ts +5 -0
- package/dist-library/types/components/shared/visuals.d.ts +1 -1
- package/dist-library/types/components/table/data-table-model.d.ts +95 -2
- package/dist-library/types/components/table/data-table.d.ts +2 -2
- package/dist-library/types/contracts/component-kernel.d.ts +5 -0
- package/dist-library/types/contracts/font-aliases.d.ts +18 -0
- package/dist-library/types/contracts/number-literal.d.ts +2 -0
- package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
- package/dist-library/types/export/index.d.ts +4 -1
- package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
- package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
- package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
- package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
- package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
- package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
- package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
- package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
- package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
- package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
- package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
- package/dist-library/types/local/evaluation/computations.d.ts +13 -5
- package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
- package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
- package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
- package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
- package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
- package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
- package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
- package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
- package/dist-library/types/local/evaluation/validation.d.ts +8 -6
- package/dist-library/types/local/index.d.ts +4 -3
- package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
- package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
- package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
- package/dist-library/types/local/runtime/runtime.d.ts +3 -1
- package/dist-library/types/local/runtime/state.d.ts +30 -15
- package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
- package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
- package/dist-library/types/local/source/authoring.d.ts +10 -0
- package/dist-library/types/local/source/source-migration.d.ts +1 -0
- package/dist-library/types/local/types.d.ts +33 -2
- package/dist-library/types/react/component-api.d.ts +21 -2
- package/dist-library/types/react/component-utils.d.ts +11 -0
- package/dist-library/types/react/font-aliases.d.ts +2 -0
- package/dist-library/types/react/package-core.d.ts +3 -0
- package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
- package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
- package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
- package/dist-library/types/react/sdk-core.d.ts +3 -1
- package/dist-library/types/sdk/assembly.d.ts +3 -0
- package/dist-library/types/sdk/font.d.ts +13 -0
- package/dist-library/types/sdk/index.d.ts +1 -0
- package/dist-library/types/sdk/theme.d.ts +5 -0
- package/dist-library/types/sdk/types.d.ts +6 -0
- package/dist-library/types/sdk/version.d.ts +1 -1
- package/dist-library/types/shareable.d.ts +15 -3
- package/dist-library/types/standalone/prepare.d.ts +4 -2
- package/dist-library/types/standalone/session-core.d.ts +4 -1
- package/dist-library/types/vite/index.d.ts +3 -0
- package/dist-library/types/vite/registration.d.ts +1 -0
- package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
- package/dist-library/types-FYhRWRn9.js +3 -0
- package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
- package/dist-library/validation-DRuW0Wl9.js +433 -0
- package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
- package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
- package/dist-library/visuals-7xzoL9ql.js +49340 -0
- package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
- package/dist-standalone/reactive-md-standalone.css +1 -1
- package/dist-standalone/reactive-md-standalone.js +128 -368
- package/docs/README-ch.md +3 -1
- package/docs/README.md +3 -1
- package/docs/compatibility/api-stability-ch.md +1 -1
- package/docs/compatibility/api-stability-en.md +1 -1
- package/docs/compatibility/compatibility-ch.md +15 -15
- package/docs/compatibility/compatibility-en.md +15 -15
- package/docs/compatibility/compatibility-manifest.schema.json +3 -2
- package/docs/compatibility/deprecation-ch.md +2 -2
- package/docs/compatibility/deprecation-en.md +2 -2
- package/docs/compatibility/source-versioning-ch.md +22 -14
- package/docs/compatibility/source-versioning-en.md +22 -13
- package/docs/compatibility/support-matrix-ch.md +4 -3
- package/docs/compatibility/support-matrix-en.md +4 -3
- package/docs/development/component-development-ch.md +2 -2
- package/docs/development/component-development-en.md +2 -2
- package/docs/development/component-protocol-ch.md +18 -18
- package/docs/development/component-protocol-en.md +14 -14
- package/docs/guides/local-guide-ch.md +109 -20
- package/docs/guides/local-guide-en.md +109 -20
- package/docs/integration/author-tools-ch.md +1 -1
- package/docs/integration/author-tools-en.md +1 -1
- package/docs/integration/editor-ch.md +3 -3
- package/docs/integration/editor-en.md +3 -3
- package/docs/integration/extension-sdk-ch.md +29 -3
- package/docs/integration/extension-sdk-en.md +29 -3
- package/docs/integration/local-integration-ch.md +3 -3
- package/docs/integration/local-integration-en.md +3 -3
- package/docs/integration/pdf-export-ch.md +42 -0
- package/docs/integration/pdf-export-en.md +42 -0
- package/docs/integration/shareable-export-ch.md +11 -19
- package/docs/integration/shareable-export-en.md +11 -19
- package/docs/reference/diagnostics-counting-ch.md +24 -1
- package/docs/reference/diagnostics-counting-en.md +24 -1
- package/docs/reference/local-interaction-syntax-ch.md +222 -33
- package/docs/reference/local-interaction-syntax-en.md +220 -31
- package/docs/reference/public-api-ch.md +24 -18
- package/docs/reference/public-api-en.md +24 -18
- package/docs/reference/theme-protocol-ch.md +1 -1
- package/docs/reference/theme-protocol-en.md +1 -1
- package/docs/releases/release-0.10.0-ch.md +45 -0
- package/docs/releases/release-0.10.0-en.md +45 -0
- package/examples/conformance/README-ch.md +3 -3
- package/examples/conformance/README.md +3 -3
- package/examples/conformance/local-draft-4.json +441 -0
- package/examples/integration/README-ch.md +3 -3
- package/examples/integration/README.md +3 -3
- package/examples/integration/chat-session/package.json +1 -1
- package/examples/local/README-ch.md +1 -1
- package/examples/local/README.md +1 -1
- package/package.json +6 -1
- package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
- package/dist-library/authoring-B14SsOXZ.js +0 -893
- package/dist-library/compile-D50B5_Ww.js +0 -1249
- package/dist-library/computations-CffoW7Ff.js +0 -340
- package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
- package/dist-library/default-options-DU5dxuU6.js +0 -125
- package/dist-library/layout-BfUzzO2b.js +0 -553
- package/dist-library/runtime-CuJndKqK.js +0 -1289
- package/dist-library/shareable-C6mUerpQ.js +0 -817
- package/dist-library/types-daDo2c_w.js +0 -3
- package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
- package/dist-library/visuals-CoVSjVD8.js +0 -49159
|
@@ -1,124 +1,123 @@
|
|
|
1
|
-
import { S as e, a as t,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
|
13
|
-
function
|
|
14
|
-
let n = t ||
|
|
15
|
-
return
|
|
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
|
|
18
|
-
if (
|
|
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
|
|
20
|
+
if ("children" in e) return le(e.children, t, n);
|
|
22
21
|
}
|
|
23
|
-
return Array.isArray(e) ?
|
|
22
|
+
return Array.isArray(e) ? le(e, t, n) : "";
|
|
24
23
|
}
|
|
25
|
-
function
|
|
24
|
+
function le(e, t, n) {
|
|
26
25
|
let r = [], i = -1;
|
|
27
|
-
for (; ++i < e.length;) r[i] =
|
|
26
|
+
for (; ++i < e.length;) r[i] = ce(e[i], t, n);
|
|
28
27
|
return r.join("");
|
|
29
28
|
}
|
|
30
|
-
function
|
|
29
|
+
function ue(e) {
|
|
31
30
|
return !!(e && typeof e == "object");
|
|
32
31
|
}
|
|
33
32
|
// node_modules/micromark-util-chunked/index.js
|
|
34
|
-
function
|
|
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
|
|
40
|
-
return e.length > 0 ? (
|
|
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
|
|
44
|
-
function
|
|
42
|
+
var P = {}.hasOwnProperty;
|
|
43
|
+
function fe(e) {
|
|
45
44
|
let t = {}, n = -1;
|
|
46
|
-
for (; ++n < e.length;)
|
|
45
|
+
for (; ++n < e.length;) pe(t, e[n]);
|
|
47
46
|
return t;
|
|
48
47
|
}
|
|
49
|
-
function
|
|
48
|
+
function pe(e, t) {
|
|
50
49
|
let n;
|
|
51
50
|
for (n in t) {
|
|
52
|
-
let r = (
|
|
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
|
-
|
|
53
|
+
P.call(r, a) || (r[a] = []);
|
|
55
54
|
let e = i[a];
|
|
56
|
-
|
|
55
|
+
me(r[a], Array.isArray(e) ? e : e ? [e] : []);
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
|
-
function
|
|
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
|
-
|
|
62
|
+
N(e, 0, 0, r);
|
|
64
63
|
}
|
|
65
64
|
// node_modules/micromark-util-normalize-identifier/index.js
|
|
66
|
-
function
|
|
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
|
|
71
|
-
function
|
|
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
|
|
75
|
-
function
|
|
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
|
|
77
|
+
function I(e) {
|
|
79
78
|
return e !== null && (e < 0 || e === 32);
|
|
80
79
|
}
|
|
81
|
-
function
|
|
80
|
+
function L(e) {
|
|
82
81
|
return e === -2 || e === -1 || e === 32;
|
|
83
82
|
}
|
|
84
|
-
var
|
|
85
|
-
function
|
|
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
|
|
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
|
|
95
|
+
return L(r) ? (e.enter(n), s(r)) : t(r);
|
|
97
96
|
}
|
|
98
97
|
function s(r) {
|
|
99
|
-
return
|
|
98
|
+
return L(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
|
-
function
|
|
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 &&
|
|
105
|
+
return a > 0 && L(t) ? (e.enter(r), c(t)) : l(t);
|
|
107
106
|
}
|
|
108
107
|
function c(t) {
|
|
109
|
-
return
|
|
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
|
|
117
|
-
if (e === null ||
|
|
118
|
-
if (
|
|
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
|
|
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
|
|
129
|
+
var Ee = {
|
|
131
130
|
partial: !0,
|
|
132
|
-
tokenize:
|
|
131
|
+
tokenize: De
|
|
133
132
|
};
|
|
134
|
-
function
|
|
133
|
+
function De(e, t, n) {
|
|
135
134
|
return r;
|
|
136
135
|
function r(t) {
|
|
137
|
-
return
|
|
136
|
+
return L(t) ? V(e, i, "linePrefix")(t) : i(t);
|
|
138
137
|
}
|
|
139
138
|
function i(e) {
|
|
140
|
-
return e === null ||
|
|
139
|
+
return e === null || F(e) ? t(e) : n(e);
|
|
141
140
|
}
|
|
142
141
|
}
|
|
143
142
|
// src/local/html/html-policy.ts
|
|
144
|
-
var
|
|
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
|
-
},
|
|
154
|
+
}, ke = /* @__PURE__ */ new Set([
|
|
156
155
|
"br",
|
|
157
156
|
"hr",
|
|
158
157
|
"img",
|
|
159
158
|
"col"
|
|
160
|
-
]),
|
|
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
|
-
]),
|
|
171
|
+
]), je = /* @__PURE__ */ new Set([
|
|
173
172
|
"id",
|
|
174
173
|
"title",
|
|
175
174
|
"lang",
|
|
176
175
|
"dir"
|
|
177
|
-
]),
|
|
178
|
-
a:
|
|
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
|
-
...
|
|
186
|
+
...d
|
|
188
187
|
};
|
|
189
|
-
function
|
|
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
|
|
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
|
|
204
|
+
function Fe(e) {
|
|
206
205
|
return e.trim().replace(/[\u0000- ]+/g, "");
|
|
207
206
|
}
|
|
208
|
-
function
|
|
209
|
-
let n = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
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()) || !
|
|
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
|
|
225
|
-
return
|
|
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
|
|
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
|
|
245
|
+
function Ve(e) {
|
|
247
246
|
let t = /* @__PURE__ */ new Set();
|
|
248
|
-
for (let n of
|
|
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
|
|
253
|
-
id:
|
|
254
|
-
version:
|
|
255
|
-
}),
|
|
256
|
-
function
|
|
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 ===
|
|
257
|
+
let n = t.id === U.id && t.version === U.version;
|
|
259
258
|
if (n) {
|
|
260
|
-
let t =
|
|
259
|
+
let t = W.get(e);
|
|
261
260
|
if (t) return t;
|
|
262
261
|
}
|
|
263
|
-
let r =
|
|
264
|
-
protocol:
|
|
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 &&
|
|
268
|
+
return n && W.set(e, r), r;
|
|
270
269
|
}
|
|
271
|
-
function
|
|
272
|
-
let a =
|
|
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
|
|
275
|
+
return D(e, a, o);
|
|
277
276
|
}
|
|
278
|
-
function
|
|
279
|
-
return
|
|
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
|
-
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
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
|
-
}),
|
|
307
|
-
return
|
|
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
|
|
310
|
-
let t =
|
|
309
|
+
function Ke(e) {
|
|
310
|
+
let t = G.get(e);
|
|
311
311
|
if (t !== void 0) return t;
|
|
312
|
-
let n =
|
|
313
|
-
protocol:
|
|
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 =
|
|
319
|
-
return
|
|
318
|
+
}), i = O(r).key;
|
|
319
|
+
return G.set(e, i), i;
|
|
320
320
|
}
|
|
321
|
-
var
|
|
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
|
|
329
|
-
if (e === void 0) return
|
|
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 = { ...
|
|
333
|
+
let n = { ...K };
|
|
334
334
|
for (let [t, r] of Object.entries(e)) {
|
|
335
|
-
if (!Object.hasOwn(
|
|
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(
|
|
352
|
+
return Object.keys(K).every((e) => n[e] === K[e]) ? K : Object.freeze(n);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
let t =
|
|
356
|
-
return t ? t ===
|
|
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
|
|
359
|
+
var Je = [
|
|
360
360
|
"enableCss",
|
|
361
361
|
"enableJavaScript",
|
|
362
362
|
"enableExtendedHtml"
|
|
363
|
-
],
|
|
364
|
-
function
|
|
363
|
+
], Ye = U;
|
|
364
|
+
function J(e) {
|
|
365
365
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
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
|
-
]),
|
|
372
|
+
]), et = /* @__PURE__ */ new Set([
|
|
373
373
|
"leaf",
|
|
374
374
|
"inline",
|
|
375
375
|
"container"
|
|
376
|
-
]),
|
|
376
|
+
]), tt = /* @__PURE__ */ new Set([
|
|
377
377
|
"string",
|
|
378
378
|
"number",
|
|
379
379
|
"boolean"
|
|
380
|
-
]),
|
|
380
|
+
]), nt = /* @__PURE__ */ new Set([
|
|
381
381
|
"bind",
|
|
382
382
|
"initial",
|
|
383
383
|
"disabled"
|
|
384
|
-
]),
|
|
384
|
+
]), rt = /* @__PURE__ */ new Set([
|
|
385
385
|
"maxSyntaxNodes",
|
|
386
386
|
"maxParseWork",
|
|
387
387
|
"maxMarkdownDepth",
|
|
388
388
|
"maxRawBodyChars"
|
|
389
389
|
]);
|
|
390
|
-
function
|
|
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
|
|
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
|
|
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 (!
|
|
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
|
|
435
|
+
].includes(n)) return X(`${t} "binding" has unknown field "${n}".`);
|
|
436
436
|
let n = e.kind;
|
|
437
|
-
if (typeof n != "string" || !
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
467
|
-
if (r.min !== void 0 && r.max !== void 0 && r.min > r.max) return
|
|
468
|
-
if (r.initialRule !== void 0 && !["min", "nearest-zero"].includes(r.initialRule)) return
|
|
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
|
|
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
|
|
476
|
-
if (n.length > 64) return
|
|
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
|
|
480
|
-
if (e.length > 128) return
|
|
481
|
-
if (i.has(e)) return
|
|
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
|
|
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
|
|
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
|
|
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
|
|
508
|
-
if (e.length > 32) return
|
|
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
|
|
512
|
-
for (let e of
|
|
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],
|
|
516
|
-
if (!
|
|
517
|
-
let
|
|
518
|
-
if (typeof
|
|
519
|
-
if (
|
|
520
|
-
if (
|
|
521
|
-
if (i.has(
|
|
522
|
-
if (r.has(
|
|
523
|
-
if (typeof a.form != "string" || !
|
|
524
|
-
let
|
|
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
|
|
527
|
-
if (
|
|
528
|
-
|
|
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
|
|
531
|
-
if (!
|
|
532
|
-
let
|
|
533
|
-
if (!
|
|
534
|
-
let
|
|
535
|
-
for (let e of Object.keys(
|
|
536
|
-
if (
|
|
537
|
-
if (
|
|
538
|
-
let t =
|
|
539
|
-
if (!
|
|
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" ||
|
|
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
|
|
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
|
|
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
|
|
553
|
-
if (n.length > 64) return
|
|
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
|
|
557
|
-
if (t.length > 128) return
|
|
558
|
-
if (i.has(t)) return
|
|
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
|
|
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
|
|
569
|
-
if (n.length > 512) return
|
|
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
|
|
573
|
+
return X(`${s} property "${e}" "pattern" is not a valid regular expression.`);
|
|
574
574
|
}
|
|
575
|
-
if (!
|
|
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
|
-
|
|
578
|
+
m[e] = r;
|
|
579
579
|
}
|
|
580
|
-
let
|
|
581
|
-
name:
|
|
582
|
-
form:
|
|
583
|
-
props:
|
|
584
|
-
...
|
|
585
|
-
...
|
|
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(
|
|
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
|
|
595
|
+
function ot(e) {
|
|
596
596
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
597
597
|
}
|
|
598
|
-
function
|
|
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(
|
|
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
|
|
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
|
|
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] =
|
|
623
|
-
let a =
|
|
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
|
|
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
|
|
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
|
|
654
|
+
function Q(e) {
|
|
650
655
|
let t = /* @__PURE__ */ new Map();
|
|
651
|
-
for (let n of e) t.set(n.name,
|
|
656
|
+
for (let n of e) t.set(n.name, C(n));
|
|
652
657
|
return t;
|
|
653
658
|
}
|
|
654
|
-
function
|
|
655
|
-
let
|
|
656
|
-
if (
|
|
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
|
|
662
|
-
if (!
|
|
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
|
|
668
|
-
for (let e of
|
|
669
|
-
if (!Object.hasOwn(
|
|
670
|
-
let t =
|
|
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
|
-
|
|
682
|
+
d[e] = t;
|
|
678
683
|
}
|
|
679
684
|
}
|
|
680
685
|
let p = !1;
|
|
681
|
-
if (Object.hasOwn(
|
|
682
|
-
let e =
|
|
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(
|
|
694
|
-
let e =
|
|
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(
|
|
706
|
-
let e =
|
|
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 =
|
|
719
|
+
let g = l.limits, _ = t, v = i, y = r, b = n;
|
|
715
720
|
if (g !== void 0) {
|
|
716
|
-
if (!
|
|
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 (!
|
|
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 =
|
|
732
|
+
let t = Y(g, "maxSyntaxNodes", _);
|
|
728
733
|
if (!t.ok) return t;
|
|
729
734
|
_ = t.value;
|
|
730
|
-
let n =
|
|
735
|
+
let n = Y(g, "maxParseWork", v);
|
|
731
736
|
if (!n.ok) return n;
|
|
732
737
|
v = n.value;
|
|
733
|
-
let r =
|
|
738
|
+
let r = Y(g, "maxMarkdownDepth", y);
|
|
734
739
|
if (!r.ok) return r;
|
|
735
740
|
y = r.value;
|
|
736
|
-
let i =
|
|
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(
|
|
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
|
|
751
|
+
let C, w, T, E, D, O, k, A, j;
|
|
747
752
|
if (x) {
|
|
748
753
|
try {
|
|
749
|
-
C = o.readConfig(
|
|
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 =
|
|
760
|
-
w = e.hostComponents,
|
|
761
|
-
let t =
|
|
762
|
-
|
|
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 =
|
|
769
|
+
let e = at(l.hostComponents, s);
|
|
765
770
|
if (!e.ok) return e;
|
|
766
|
-
w = e.hostComponents,
|
|
767
|
-
let t =
|
|
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 =
|
|
770
|
-
t.set(n,
|
|
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 =
|
|
776
|
-
|
|
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 = [],
|
|
779
|
-
let e =
|
|
780
|
-
|
|
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:
|
|
794
|
+
html: d,
|
|
790
795
|
markdownBreaks: p,
|
|
791
|
-
embedding:
|
|
796
|
+
embedding: u,
|
|
792
797
|
strict: m,
|
|
793
798
|
hostComponents: w,
|
|
794
|
-
hostByName:
|
|
799
|
+
hostByName: T,
|
|
795
800
|
...C ? { config: C } : {},
|
|
796
|
-
sdkByName:
|
|
797
|
-
registry:
|
|
798
|
-
componentByName:
|
|
799
|
-
schemaByName:
|
|
800
|
-
defaultComponentNames:
|
|
801
|
-
unmountedLeafNames: C?.presets.some((e) => e.id === "reactive-md/minimal") ?
|
|
802
|
-
externalComponentNames:
|
|
803
|
-
legacyHostNames:
|
|
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 ??
|
|
810
|
+
capabilities: o.capabilities ?? ze,
|
|
806
811
|
...o.preset ? { preset: o.preset } : {}
|
|
807
812
|
};
|
|
808
813
|
}
|
|
809
|
-
function
|
|
810
|
-
let r = t.length > 0 ?
|
|
811
|
-
return
|
|
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:
|
|
815
|
-
readConfig:
|
|
819
|
+
defaultConfigKey: Ke(t),
|
|
820
|
+
readConfig: Ge,
|
|
816
821
|
configKey: (e) => e.key,
|
|
817
822
|
...n ? { capabilities: n } : {}
|
|
818
823
|
});
|
|
819
824
|
}
|
|
820
|
-
function
|
|
825
|
+
function ft(e) {
|
|
821
826
|
return e.componentConfigKey;
|
|
822
827
|
}
|
|
823
|
-
// src/
|
|
824
|
-
var
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
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 };
|