@coderminer/vue-markdown 0.0.0-stage → 1.0.1

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 (232) hide show
  1. package/CHANGELOG.md +226 -0
  2. package/LICENSE +21 -0
  3. package/README.md +584 -3
  4. package/README.zh-CN.md +550 -0
  5. package/dist/chunks/MarkdownBlockquote-DVXziX2t.js +16 -0
  6. package/dist/chunks/MarkdownBreak-BwCi2Itt.js +16 -0
  7. package/dist/chunks/MarkdownCode-B1k9tmW5.js +63 -0
  8. package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js +49 -0
  9. package/dist/chunks/MarkdownContent-BAK6dqo7.js +13 -0
  10. package/dist/chunks/MarkdownCustomTag-lZJHsD6f.js +46 -0
  11. package/dist/chunks/MarkdownEmphasis-CppivOEu.js +16 -0
  12. package/dist/chunks/MarkdownEmpty-Av5k6bqa.js +14 -0
  13. package/dist/chunks/MarkdownError-C0sPs5W0.js +17 -0
  14. package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js +22 -0
  15. package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js +21 -0
  16. package/dist/chunks/MarkdownHeading-DaNcP0_6.js +29 -0
  17. package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js +16 -0
  18. package/dist/chunks/MarkdownHtml-66lYkvwM.js +13 -0
  19. package/dist/chunks/MarkdownImage-BRy76svs.js +51 -0
  20. package/dist/chunks/MarkdownInlineCode-MXZYFwex.js +16 -0
  21. package/dist/chunks/MarkdownLink-Dbx3NwgV.js +45 -0
  22. package/dist/chunks/MarkdownList-BJ-_C71k.js +20 -0
  23. package/dist/chunks/MarkdownListItem-Z1EHIY26.js +16 -0
  24. package/dist/chunks/MarkdownLoading-D-RYtXxf.js +15 -0
  25. package/dist/chunks/MarkdownParagraph-BxLSmSaG.js +16 -0
  26. package/dist/chunks/MarkdownRenderer-OlkdsvI3.js +482 -0
  27. package/dist/chunks/MarkdownRoot-DEE6iVfh.js +23 -0
  28. package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js +16 -0
  29. package/dist/chunks/MarkdownStrong-uU5MzAoJ.js +16 -0
  30. package/dist/chunks/MarkdownTable-DmBTg_CR.js +16 -0
  31. package/dist/chunks/MarkdownTableCell-eiCJe847.js +31 -0
  32. package/dist/chunks/MarkdownTableRow-DuJaPntg.js +16 -0
  33. package/dist/chunks/MarkdownTableSection-PFHz-R33.js +24 -0
  34. package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js +38 -0
  35. package/dist/chunks/MarkdownToc-DHWWoH6t.js +49 -0
  36. package/dist/chunks/MarkdownTocItem-DT9mR3vL.js +25 -0
  37. package/dist/chunks/MermaidLiveEditor-1TKkI5bp.js +414 -0
  38. package/dist/chunks/VueSyntaxHighlighter-BWpCO-cX.js +260 -0
  39. package/dist/chunks/adapters-CMwX_NEI.js +26 -0
  40. package/dist/chunks/asyncToGenerator-ChigusFD.js +26 -0
  41. package/dist/chunks/blank-line-CKKsFeKR.js +88 -0
  42. package/dist/chunks/codemirror-DyphMAEg.js +82 -0
  43. package/dist/chunks/config-aRYo2R8_.js +10 -0
  44. package/dist/chunks/context-8NfW6fxI.js +30 -0
  45. package/dist/chunks/convert-hast-C4Rg2ZuF.js +6 -0
  46. package/dist/chunks/default-ZQ5aHh-N.js +3 -0
  47. package/dist/chunks/diagnostics-CtHoJyiX.js +23 -0
  48. package/dist/chunks/export-BrgMLgUp.js +1574 -0
  49. package/dist/chunks/hast-to-nodes-DuZsi4XT.js +29 -0
  50. package/dist/chunks/hast-util-from-html-D3e_iQ89.js +5088 -0
  51. package/dist/chunks/highlightjs-BxJFpKS1.js +196 -0
  52. package/dist/chunks/identity-Bi27FKyx.js +6243 -0
  53. package/dist/chunks/labels-BtHiUTQI.js +47 -0
  54. package/dist/chunks/lib-CCnkLL6S.js +252 -0
  55. package/dist/chunks/longest-streak-DZE_EqsU.js +8 -0
  56. package/dist/chunks/micromark-factory-space-CpXAnYUY.js +137 -0
  57. package/dist/chunks/normalize-VKfQXZiK.js +226 -0
  58. package/dist/chunks/objectSpread2-CtBNx0TF.js +57 -0
  59. package/dist/chunks/plugin-YWo5uqTh.js +27 -0
  60. package/dist/chunks/preset-BjaOuJUL.js +44 -0
  61. package/dist/chunks/registry-B7BfEkuy.js +6150 -0
  62. package/dist/chunks/render-DAqK0w5J.js +1754 -0
  63. package/dist/chunks/rolldown-runtime-QGRDbDUS.js +19 -0
  64. package/dist/chunks/runtime-D95F41zG.js +574 -0
  65. package/dist/chunks/security-y4EwUyAs.js +212 -0
  66. package/dist/chunks/shared-NjFDPmkb.js +67 -0
  67. package/dist/chunks/space-separated-tokens-1ebNqf35.js +1097 -0
  68. package/dist/chunks/url-D2BoivaE.js +24 -0
  69. package/dist/chunks/useActiveHeading-CnyGTG1u.js +359 -0
  70. package/dist/components/CodeBlock.d.ts +73 -0
  71. package/dist/components/CodeBlock.js +1 -0
  72. package/dist/components/Icon.d.ts +6 -0
  73. package/dist/components/MarkdownBlockquote.d.ts +18 -0
  74. package/dist/components/MarkdownBlockquote.js +1 -0
  75. package/dist/components/MarkdownBreak.d.ts +8 -0
  76. package/dist/components/MarkdownBreak.js +1 -0
  77. package/dist/components/MarkdownChildren.d.ts +17 -0
  78. package/dist/components/MarkdownCode.d.ts +29 -0
  79. package/dist/components/MarkdownCode.js +1 -0
  80. package/dist/components/MarkdownConfigProvider.d.ts +33 -0
  81. package/dist/components/MarkdownConfigProvider.js +1 -0
  82. package/dist/components/MarkdownContent.d.ts +16 -0
  83. package/dist/components/MarkdownContent.js +1 -0
  84. package/dist/components/MarkdownCustomTag.d.ts +20 -0
  85. package/dist/components/MarkdownCustomTag.js +1 -0
  86. package/dist/components/MarkdownEmphasis.d.ts +18 -0
  87. package/dist/components/MarkdownEmphasis.js +1 -0
  88. package/dist/components/MarkdownEmpty.d.ts +8 -0
  89. package/dist/components/MarkdownEmpty.js +1 -0
  90. package/dist/components/MarkdownError.d.ts +11 -0
  91. package/dist/components/MarkdownError.js +1 -0
  92. package/dist/components/MarkdownFootnoteReference.d.ts +19 -0
  93. package/dist/components/MarkdownFootnoteReference.js +1 -0
  94. package/dist/components/MarkdownFootnotes.d.ts +17 -0
  95. package/dist/components/MarkdownFootnotes.js +1 -0
  96. package/dist/components/MarkdownHeading.d.ts +18 -0
  97. package/dist/components/MarkdownHeading.js +1 -0
  98. package/dist/components/MarkdownHorizontalRule.d.ts +8 -0
  99. package/dist/components/MarkdownHorizontalRule.js +1 -0
  100. package/dist/components/MarkdownHtml.d.ts +8 -0
  101. package/dist/components/MarkdownHtml.js +1 -0
  102. package/dist/components/MarkdownImage.d.ts +15 -0
  103. package/dist/components/MarkdownImage.js +1 -0
  104. package/dist/components/MarkdownInlineCode.d.ts +18 -0
  105. package/dist/components/MarkdownInlineCode.js +1 -0
  106. package/dist/components/MarkdownLink.d.ts +22 -0
  107. package/dist/components/MarkdownLink.js +1 -0
  108. package/dist/components/MarkdownList.d.ts +18 -0
  109. package/dist/components/MarkdownList.js +1 -0
  110. package/dist/components/MarkdownListItem.d.ts +18 -0
  111. package/dist/components/MarkdownListItem.js +1 -0
  112. package/dist/components/MarkdownLoading.d.ts +8 -0
  113. package/dist/components/MarkdownLoading.js +1 -0
  114. package/dist/components/MarkdownMath.d.ts +12 -0
  115. package/dist/components/MarkdownMath.js +1 -0
  116. package/dist/components/MarkdownMermaid.d.ts +78 -0
  117. package/dist/components/MarkdownMermaid.js +1 -0
  118. package/dist/components/MarkdownParagraph.d.ts +18 -0
  119. package/dist/components/MarkdownParagraph.js +1 -0
  120. package/dist/components/MarkdownRenderer.d.ts +167 -0
  121. package/dist/components/MarkdownRenderer.js +1 -0
  122. package/dist/components/MarkdownRoot.d.ts +24 -0
  123. package/dist/components/MarkdownRoot.js +1 -0
  124. package/dist/components/MarkdownStrikethrough.d.ts +18 -0
  125. package/dist/components/MarkdownStrikethrough.js +1 -0
  126. package/dist/components/MarkdownStrong.d.ts +18 -0
  127. package/dist/components/MarkdownStrong.js +1 -0
  128. package/dist/components/MarkdownTable.d.ts +18 -0
  129. package/dist/components/MarkdownTable.js +1 -0
  130. package/dist/components/MarkdownTableCell.d.ts +20 -0
  131. package/dist/components/MarkdownTableCell.js +1 -0
  132. package/dist/components/MarkdownTableRow.d.ts +18 -0
  133. package/dist/components/MarkdownTableRow.js +1 -0
  134. package/dist/components/MarkdownTableSection.d.ts +18 -0
  135. package/dist/components/MarkdownTableSection.js +1 -0
  136. package/dist/components/MarkdownTaskItem.d.ts +20 -0
  137. package/dist/components/MarkdownTaskItem.js +1 -0
  138. package/dist/components/MarkdownToc.d.ts +36 -0
  139. package/dist/components/MarkdownToc.js +1 -0
  140. package/dist/components/MarkdownTocItem.d.ts +14 -0
  141. package/dist/components/MarkdownTocItem.js +1 -0
  142. package/dist/components/MermaidBlock.d.ts +50 -0
  143. package/dist/components/MermaidBlock.js +1 -0
  144. package/dist/components/MermaidLiveEditor.d.ts +44 -0
  145. package/dist/components/MermaidLiveEditor.js +1 -0
  146. package/dist/components/VueSyntaxHighlighter.d.ts +39 -0
  147. package/dist/components/VueSyntaxHighlighter.js +1 -0
  148. package/dist/components/codeRegion.d.ts +14 -0
  149. package/dist/components/config.d.ts +7 -0
  150. package/dist/components/context.d.ts +45 -0
  151. package/dist/components/index.d.ts +42 -0
  152. package/dist/components/index.js +38 -0
  153. package/dist/components/render.d.ts +9 -0
  154. package/dist/components/scroll-lock.d.ts +7 -0
  155. package/dist/components/types.d.ts +61 -0
  156. package/dist/composables/useActiveHeading.d.ts +12 -0
  157. package/dist/composables/useCodeHighlighter.d.ts +30 -0
  158. package/dist/composables/useLineWindow.d.ts +38 -0
  159. package/dist/composables/useMarkdownDocument.d.ts +25 -0
  160. package/dist/core/adapters.d.ts +7 -0
  161. package/dist/core/config.d.ts +5 -0
  162. package/dist/core/diagnostics.d.ts +9 -0
  163. package/dist/core/finalize.d.ts +18 -0
  164. package/dist/core/hast-nodes.d.ts +3 -0
  165. package/dist/core/hast-to-nodes.d.ts +9 -0
  166. package/dist/core/highlight-lines.d.ts +8 -0
  167. package/dist/core/identity.d.ts +4 -0
  168. package/dist/core/labels.d.ts +4 -0
  169. package/dist/core/manifest.d.ts +38 -0
  170. package/dist/core/memo.d.ts +5 -0
  171. package/dist/core/model-hast.d.ts +8 -0
  172. package/dist/core/model.d.ts +10 -0
  173. package/dist/core/normalize.d.ts +37 -0
  174. package/dist/core/parts.d.ts +136 -0
  175. package/dist/core/preset.d.ts +10 -0
  176. package/dist/core/run.d.ts +16 -0
  177. package/dist/core/search.d.ts +5 -0
  178. package/dist/core/security.d.ts +21 -0
  179. package/dist/core/slugger.d.ts +13 -0
  180. package/dist/core/types.d.ts +392 -0
  181. package/dist/core/url.d.ts +10 -0
  182. package/dist/editor/codemirror.d.ts +14 -0
  183. package/dist/editor/index.d.ts +2 -0
  184. package/dist/editor/index.js +1 -0
  185. package/dist/export/index.d.ts +6 -0
  186. package/dist/headless.d.ts +21 -0
  187. package/dist/headless.js +12 -0
  188. package/dist/highlight/convert-hast.d.ts +8 -0
  189. package/dist/highlight/highlightjs.d.ts +7 -0
  190. package/dist/highlight/index.d.ts +4 -0
  191. package/dist/highlight/index.js +4 -0
  192. package/dist/highlight/shared.d.ts +11 -0
  193. package/dist/highlight/shiki.d.ts +7 -0
  194. package/dist/highlight/shiki.js +75 -0
  195. package/dist/html/index.d.ts +17 -0
  196. package/dist/html/index.js +11 -0
  197. package/dist/index.d.ts +24 -0
  198. package/dist/index.js +53 -0
  199. package/dist/math/index.d.ts +4 -0
  200. package/dist/math/index.js +585 -0
  201. package/dist/math/katex.d.ts +4 -0
  202. package/dist/math/plugin.d.ts +20 -0
  203. package/dist/mermaid/index.d.ts +6 -0
  204. package/dist/mermaid/index.js +8 -0
  205. package/dist/mermaid/plugin.d.ts +17 -0
  206. package/dist/mermaid/runtime.d.ts +14 -0
  207. package/dist/mermaid/sanitize-svg-lazy.d.ts +10 -0
  208. package/dist/mermaid/sanitize-svg.d.ts +3 -0
  209. package/dist/mermaid/sanitize.d.ts +16 -0
  210. package/dist/node-components.d.ts +1 -0
  211. package/dist/node-components.js +39 -0
  212. package/dist/pipeline/custom.d.ts +8 -0
  213. package/dist/pipeline/identity.d.ts +12 -0
  214. package/dist/pipeline/index.d.ts +5 -0
  215. package/dist/pipeline/official.d.ts +6 -0
  216. package/dist/pipeline.d.ts +1 -0
  217. package/dist/pipeline.js +1 -0
  218. package/dist/plugins/builtin.d.ts +15 -0
  219. package/dist/plugins/define.d.ts +7 -0
  220. package/dist/plugins/registry.d.ts +16 -0
  221. package/dist/plugins/source.d.ts +7 -0
  222. package/dist/plugins.d.ts +3 -0
  223. package/dist/plugins.js +1 -0
  224. package/dist/presets.d.ts +3 -0
  225. package/dist/presets.js +1 -0
  226. package/dist/style.css +2 -0
  227. package/dist/styles/components.css +737 -0
  228. package/dist/styles/index.d.ts +1 -0
  229. package/dist/styles/math-full.css +3 -0
  230. package/dist/styles/math.css +18 -0
  231. package/dist/styles/tokens.css +96 -0
  232. package/package.json +214 -6
@@ -0,0 +1,1574 @@
1
+ import { t as e } from "./objectSpread2-CtBNx0TF.js";
2
+ import { c as t, d as n, l as r, u as i } from "./useActiveHeading-CnyGTG1u.js";
3
+ import { i as a, m as o, t as s } from "./registry-B7BfEkuy.js";
4
+ import { a as c, l, r as u } from "./identity-Bi27FKyx.js";
5
+ import { a as d, i as f, n as p, o as m, s as h } from "./space-separated-tokens-1ebNqf35.js";
6
+ import { t as g } from "./asyncToGenerator-ChigusFD.js";
7
+ // src/core/parts.ts
8
+ var _ = "vmd-", v = {
9
+ root: "root",
10
+ body: "body",
11
+ tocColumn: "toc-column",
12
+ content: "content",
13
+ toc: "toc",
14
+ tocNav: "toc-nav",
15
+ tocItem: "toc-item",
16
+ paragraph: "paragraph",
17
+ heading: "heading",
18
+ headingAnchor: "heading-anchor",
19
+ emphasis: "emphasis",
20
+ strong: "strong",
21
+ strikethrough: "strikethrough",
22
+ link: "link",
23
+ image: "image",
24
+ list: "list",
25
+ listItem: "list-item",
26
+ blockquote: "blockquote",
27
+ hr: "hr",
28
+ break: "break",
29
+ table: "table",
30
+ tableSection: "table-section",
31
+ tableRow: "table-row",
32
+ tableCell: "table-cell",
33
+ inlineCode: "inline-code",
34
+ code: "code",
35
+ codeHeader: "code-header",
36
+ codeTitle: "code-title",
37
+ codeFileName: "code-file-name",
38
+ codeHeading: "code-heading",
39
+ codeLang: "code-lang",
40
+ codeToolbar: "code-toolbar",
41
+ codeActions: "code-actions",
42
+ codeAction: "code-action",
43
+ codeBody: "code-body",
44
+ codeFeedback: "code-feedback",
45
+ highlighter: "highlighter",
46
+ highlighterHeader: "highlighter-header",
47
+ highlighterActions: "highlighter-actions",
48
+ highlighterFooter: "highlighter-footer",
49
+ highlighterBody: "highlighter-body",
50
+ highlighterGutter: "highlighter-gutter",
51
+ highlighterLine: "highlighter-line",
52
+ highlighterHidden: "highlighter-hidden",
53
+ highlighterEmpty: "highlighter-empty",
54
+ highlighterToggle: "highlighter-toggle",
55
+ math: "math",
56
+ mathError: "math-error",
57
+ mermaid: "mermaid",
58
+ mermaidHeader: "mermaid-header",
59
+ mermaidTabs: "mermaid-tabs",
60
+ mermaidActions: "mermaid-actions",
61
+ mermaidAction: "mermaid-action",
62
+ mermaidPreview: "mermaid-preview",
63
+ mermaidSource: "mermaid-source",
64
+ mermaidPending: "mermaid-pending",
65
+ mermaidError: "mermaid-error",
66
+ mermaidFallback: "mermaid-fallback",
67
+ mermaidRetry: "mermaid-retry",
68
+ mermaidFullscreen: "mermaid-fullscreen",
69
+ editor: "editor",
70
+ editorPane: "editor-pane",
71
+ editorDivider: "editor-divider",
72
+ editorPreview: "editor-preview",
73
+ editorDiagnostics: "editor-diagnostics",
74
+ editorEmpty: "editor-empty",
75
+ editorToolbar: "editor-toolbar",
76
+ editorFullscreen: "editor-fullscreen",
77
+ html: "html",
78
+ customTag: "custom-tag",
79
+ taskItem: "task-item",
80
+ taskCheckbox: "task-checkbox",
81
+ footnoteReference: "footnote-reference",
82
+ footnotes: "footnotes",
83
+ searchMatch: "search-match",
84
+ error: "error",
85
+ empty: "empty",
86
+ loading: "loading"
87
+ }, y = {
88
+ fontFamily: "--vmd-font-family",
89
+ fontMono: "--vmd-font-mono",
90
+ fontSize: "--vmd-font-size",
91
+ lineHeight: "--vmd-line-height",
92
+ colorText: "--vmd-color-text",
93
+ colorMuted: "--vmd-color-muted",
94
+ colorBg: "--vmd-color-bg",
95
+ colorSurface: "--vmd-color-surface",
96
+ colorBorder: "--vmd-color-border",
97
+ colorAccent: "--vmd-color-accent",
98
+ colorAccentContrast: "--vmd-color-accent-contrast",
99
+ colorDanger: "--vmd-color-danger",
100
+ colorSuccess: "--vmd-color-success",
101
+ space1: "--vmd-space-1",
102
+ space2: "--vmd-space-2",
103
+ space3: "--vmd-space-3",
104
+ space4: "--vmd-space-4",
105
+ space5: "--vmd-space-5",
106
+ space6: "--vmd-space-6",
107
+ radiusSm: "--vmd-radius-sm",
108
+ radiusMd: "--vmd-radius-md",
109
+ radiusLg: "--vmd-radius-lg",
110
+ shadowSm: "--vmd-shadow-sm",
111
+ shadowMd: "--vmd-shadow-md",
112
+ motionDuration: "--vmd-motion-duration",
113
+ motionEasing: "--vmd-motion-easing",
114
+ codeBg: "--vmd-code-bg",
115
+ codeText: "--vmd-code-text",
116
+ codeBorder: "--vmd-code-border",
117
+ codeToolbarBg: "--vmd-code-toolbar-bg",
118
+ mathColor: "--vmd-math-color",
119
+ mathBg: "--vmd-math-bg",
120
+ mermaidBg: "--vmd-mermaid-bg",
121
+ mermaidBorder: "--vmd-mermaid-border",
122
+ zFullscreen: "--vmd-z-fullscreen"
123
+ };
124
+ function b(e) {
125
+ return {
126
+ class: `${_}${e}`,
127
+ "data-vmd-part": e
128
+ };
129
+ }
130
+ function x(e, t) {
131
+ return t ? `${_}${e} ${t}` : `${_}${e}`;
132
+ }
133
+ var S = Object.keys(v).map((e) => v[e]), C = Object.keys(y).map((e) => y[e]), w = C, T = (e, t) => {
134
+ var n, r, i, a, o;
135
+ return {
136
+ name: e,
137
+ parts: (n = t.parts) == null ? [] : n,
138
+ tokens: (r = t.tokens) == null ? [] : r,
139
+ slots: (i = t.slots) == null ? [] : i,
140
+ labels: (a = t.labels) == null ? [] : a,
141
+ overrideKeys: (o = t.overrideKeys) == null ? [] : o,
142
+ tags: t.tags,
143
+ behaviors: t.behaviors
144
+ };
145
+ }, E = {
146
+ MarkdownRenderer: T("MarkdownRenderer", {
147
+ parts: Object.values(v),
148
+ tokens: w,
149
+ slots: [
150
+ "root",
151
+ "toc",
152
+ "toc-item",
153
+ "content",
154
+ "error",
155
+ "empty",
156
+ "loading",
157
+ "code",
158
+ "code-actions",
159
+ "header",
160
+ "toolbar",
161
+ "tabs",
162
+ "actions",
163
+ "footer",
164
+ "highlighter",
165
+ "math",
166
+ "math-error",
167
+ "mermaid",
168
+ "mermaid-error",
169
+ "editor",
170
+ "editor-diagnostics",
171
+ "preview",
172
+ "fullscreen"
173
+ ],
174
+ labels: [
175
+ "toc",
176
+ "error",
177
+ "empty",
178
+ "loading",
179
+ "headingAnchor"
180
+ ],
181
+ overrideKeys: [
182
+ "components",
183
+ "regions",
184
+ "nodeComponents",
185
+ "labels",
186
+ "theme",
187
+ "tokens"
188
+ ],
189
+ behaviors: [
190
+ "pipeline",
191
+ "slugger",
192
+ "urlTransform",
193
+ "highlighter",
194
+ "mathEngine",
195
+ "mermaidRenderer",
196
+ "diagnosticsFormatter"
197
+ ]
198
+ }),
199
+ MarkdownRoot: T("MarkdownRoot", {
200
+ parts: ["root"],
201
+ tokens: w,
202
+ slots: ["default"],
203
+ overrideKeys: [
204
+ "as",
205
+ "tokens",
206
+ "theme"
207
+ ]
208
+ }),
209
+ MarkdownContent: T("MarkdownContent", {
210
+ parts: ["content"],
211
+ slots: ["default"],
212
+ overrideKeys: ["regions.content"]
213
+ }),
214
+ MarkdownToc: T("MarkdownToc", {
215
+ parts: [
216
+ "toc",
217
+ "toc-nav",
218
+ "toc-item"
219
+ ],
220
+ tokens: [
221
+ "--vmd-color-accent",
222
+ "--vmd-color-muted",
223
+ "--vmd-space-1",
224
+ "--vmd-space-3",
225
+ "--vmd-space-4"
226
+ ],
227
+ labels: ["toc"],
228
+ overrideKeys: [
229
+ "regions.toc",
230
+ "regions.tocItem",
231
+ "tocItem"
232
+ ]
233
+ }),
234
+ MarkdownTocItem: T("MarkdownTocItem", {
235
+ parts: ["toc-item"],
236
+ tokens: ["--vmd-color-accent", "--vmd-color-muted"],
237
+ labels: ["toc"],
238
+ overrideKeys: ["regions.tocItem"]
239
+ }),
240
+ MarkdownError: T("MarkdownError", {
241
+ parts: ["error"],
242
+ tokens: [
243
+ "--vmd-color-danger",
244
+ "--vmd-space-3",
245
+ "--vmd-space-4",
246
+ "--vmd-radius-md"
247
+ ],
248
+ labels: ["error"],
249
+ overrideKeys: ["regions.error"]
250
+ }),
251
+ MarkdownEmpty: T("MarkdownEmpty", {
252
+ parts: ["empty"],
253
+ tokens: ["--vmd-color-muted"],
254
+ labels: ["empty"],
255
+ overrideKeys: ["regions.empty"]
256
+ }),
257
+ MarkdownLoading: T("MarkdownLoading", {
258
+ parts: ["loading"],
259
+ tokens: ["--vmd-color-muted"],
260
+ labels: ["loading"],
261
+ overrideKeys: ["regions.loading"]
262
+ }),
263
+ MarkdownParagraph: T("MarkdownParagraph", {
264
+ parts: ["paragraph"],
265
+ tokens: ["--vmd-space-4"],
266
+ slots: ["default"],
267
+ overrideKeys: ["p", "paragraph"],
268
+ tags: ["p"]
269
+ }),
270
+ MarkdownHeading: T("MarkdownHeading", {
271
+ parts: ["heading", "heading-anchor"],
272
+ tokens: [
273
+ "--vmd-space-2",
274
+ "--vmd-space-3",
275
+ "--vmd-space-5",
276
+ "--vmd-color-muted"
277
+ ],
278
+ slots: ["default"],
279
+ labels: ["headingAnchor"],
280
+ overrideKeys: [
281
+ "h1",
282
+ "h2",
283
+ "h3",
284
+ "h4",
285
+ "h5",
286
+ "h6",
287
+ "heading"
288
+ ],
289
+ tags: [
290
+ "h1",
291
+ "h2",
292
+ "h3",
293
+ "h4",
294
+ "h5",
295
+ "h6"
296
+ ]
297
+ }),
298
+ MarkdownEmphasis: T("MarkdownEmphasis", {
299
+ parts: ["emphasis"],
300
+ slots: ["default"],
301
+ overrideKeys: ["em", "emphasis"],
302
+ tags: ["em"]
303
+ }),
304
+ MarkdownStrong: T("MarkdownStrong", {
305
+ parts: ["strong"],
306
+ slots: ["default"],
307
+ overrideKeys: ["strong"],
308
+ tags: ["strong"]
309
+ }),
310
+ MarkdownStrikethrough: T("MarkdownStrikethrough", {
311
+ parts: ["strikethrough"],
312
+ slots: ["default"],
313
+ overrideKeys: ["del", "strikethrough"],
314
+ tags: ["del"]
315
+ }),
316
+ MarkdownLink: T("MarkdownLink", {
317
+ parts: ["link"],
318
+ tokens: ["--vmd-color-accent"],
319
+ slots: ["default"],
320
+ labels: ["externalLink"],
321
+ overrideKeys: ["a", "link"],
322
+ tags: ["a"]
323
+ }),
324
+ MarkdownImage: T("MarkdownImage", {
325
+ parts: ["image"],
326
+ slots: ["fallback"],
327
+ overrideKeys: ["img", "image"],
328
+ tags: ["img"]
329
+ }),
330
+ MarkdownList: T("MarkdownList", {
331
+ parts: ["list"],
332
+ tokens: ["--vmd-space-4", "--vmd-space-5"],
333
+ slots: ["default"],
334
+ overrideKeys: [
335
+ "ul",
336
+ "ol",
337
+ "list"
338
+ ],
339
+ tags: ["ul", "ol"]
340
+ }),
341
+ MarkdownListItem: T("MarkdownListItem", {
342
+ parts: ["list-item"],
343
+ tokens: ["--vmd-space-1"],
344
+ slots: ["default"],
345
+ overrideKeys: ["li", "listItem"],
346
+ tags: ["li"]
347
+ }),
348
+ MarkdownBlockquote: T("MarkdownBlockquote", {
349
+ parts: ["blockquote"],
350
+ tokens: [
351
+ "--vmd-space-4",
352
+ "--vmd-color-border",
353
+ "--vmd-color-muted"
354
+ ],
355
+ slots: ["default"],
356
+ overrideKeys: ["blockquote"],
357
+ tags: ["blockquote"]
358
+ }),
359
+ MarkdownHorizontalRule: T("MarkdownHorizontalRule", {
360
+ parts: ["hr"],
361
+ tokens: ["--vmd-space-5", "--vmd-color-border"],
362
+ overrideKeys: ["hr", "horizontalRule"],
363
+ tags: ["hr"]
364
+ }),
365
+ MarkdownTable: T("MarkdownTable", {
366
+ parts: ["table"],
367
+ tokens: ["--vmd-space-4"],
368
+ slots: ["default"],
369
+ overrideKeys: ["table"],
370
+ tags: ["table"]
371
+ }),
372
+ MarkdownTableSection: T("MarkdownTableSection", {
373
+ parts: ["table-section"],
374
+ tokens: ["--vmd-color-surface"],
375
+ slots: ["default"],
376
+ overrideKeys: [
377
+ "thead",
378
+ "tbody",
379
+ "tfoot",
380
+ "tableSection"
381
+ ],
382
+ tags: [
383
+ "thead",
384
+ "tbody",
385
+ "tfoot"
386
+ ]
387
+ }),
388
+ MarkdownTableRow: T("MarkdownTableRow", {
389
+ parts: ["table-row"],
390
+ slots: ["default"],
391
+ overrideKeys: ["tr", "tableRow"],
392
+ tags: ["tr"]
393
+ }),
394
+ MarkdownTableCell: T("MarkdownTableCell", {
395
+ parts: ["table-cell"],
396
+ tokens: [
397
+ "--vmd-space-2",
398
+ "--vmd-space-3",
399
+ "--vmd-color-border"
400
+ ],
401
+ slots: ["default"],
402
+ overrideKeys: [
403
+ "th",
404
+ "td",
405
+ "tableCell"
406
+ ],
407
+ tags: ["th", "td"]
408
+ }),
409
+ MarkdownInlineCode: T("MarkdownInlineCode", {
410
+ parts: ["inline-code"],
411
+ tokens: [
412
+ "--vmd-code-bg",
413
+ "--vmd-code-text",
414
+ "--vmd-font-mono",
415
+ "--vmd-radius-sm"
416
+ ],
417
+ slots: ["default"],
418
+ overrideKeys: ["code", "inlineCode"],
419
+ tags: ["code"]
420
+ }),
421
+ MarkdownCode: T("MarkdownCode", {
422
+ parts: ["code"],
423
+ tokens: [
424
+ "--vmd-code-bg",
425
+ "--vmd-code-text",
426
+ "--vmd-code-border",
427
+ "--vmd-code-toolbar-bg",
428
+ "--vmd-font-mono"
429
+ ],
430
+ slots: [
431
+ "default",
432
+ "code",
433
+ "code-actions"
434
+ ],
435
+ labels: [
436
+ "copy",
437
+ "copied",
438
+ "download"
439
+ ],
440
+ overrideKeys: ["pre", "code"],
441
+ tags: ["pre", "code"],
442
+ behaviors: ["highlighter"]
443
+ }),
444
+ CodeBlock: T("CodeBlock", {
445
+ parts: [
446
+ "code",
447
+ "code-header",
448
+ "code-heading",
449
+ "code-title",
450
+ "code-file-name",
451
+ "code-lang",
452
+ "code-toolbar",
453
+ "code-body",
454
+ "code-action",
455
+ "code-feedback",
456
+ "highlighter-line",
457
+ "highlighter-gutter",
458
+ "highlighter-toggle"
459
+ ],
460
+ tokens: [
461
+ "--vmd-code-bg",
462
+ "--vmd-code-text",
463
+ "--vmd-code-border",
464
+ "--vmd-code-toolbar-bg",
465
+ "--vmd-font-mono"
466
+ ],
467
+ slots: [
468
+ "code",
469
+ "code-actions",
470
+ "header",
471
+ "toolbar"
472
+ ],
473
+ labels: [
474
+ "copy",
475
+ "copied",
476
+ "copyFailed",
477
+ "download",
478
+ "showAll",
479
+ "showLess"
480
+ ],
481
+ overrideKeys: [
482
+ "pre",
483
+ "code",
484
+ "codeBlock"
485
+ ],
486
+ tags: ["pre", "code"],
487
+ behaviors: ["highlighter"]
488
+ }),
489
+ VueSyntaxHighlighter: T("VueSyntaxHighlighter", {
490
+ parts: [
491
+ "highlighter",
492
+ "highlighter-header",
493
+ "highlighter-actions",
494
+ "highlighter-footer",
495
+ "highlighter-body",
496
+ "highlighter-line",
497
+ "highlighter-gutter",
498
+ "highlighter-empty",
499
+ "highlighter-toggle"
500
+ ],
501
+ tokens: [
502
+ "--vmd-code-bg",
503
+ "--vmd-code-text",
504
+ "--vmd-font-mono"
505
+ ],
506
+ slots: [
507
+ "header",
508
+ "footer",
509
+ "empty",
510
+ "actions",
511
+ "highlighter"
512
+ ],
513
+ labels: [
514
+ "empty",
515
+ "showAll",
516
+ "showLess",
517
+ "copyFailed"
518
+ ],
519
+ overrideKeys: ["highlighter"],
520
+ behaviors: ["highlighter"]
521
+ }),
522
+ MarkdownTaskItem: T("MarkdownTaskItem", {
523
+ parts: ["task-item", "task-checkbox"],
524
+ tokens: w,
525
+ slots: ["default"],
526
+ labels: [],
527
+ overrideKeys: ["li", "taskItem"],
528
+ tags: ["li"],
529
+ behaviors: ["task-change"]
530
+ }),
531
+ MarkdownFootnoteReference: T("MarkdownFootnoteReference", {
532
+ parts: ["footnote-reference"],
533
+ labels: ["footnoteReference"],
534
+ overrideKeys: ["sup", "footnoteReference"],
535
+ tags: ["sup"]
536
+ }),
537
+ MarkdownFootnotes: T("MarkdownFootnotes", {
538
+ parts: ["footnotes"],
539
+ labels: ["footnotes"],
540
+ slots: ["default"],
541
+ overrideKeys: ["section", "footnotes"],
542
+ tags: ["section"]
543
+ }),
544
+ MarkdownMath: T("MarkdownMath", {
545
+ parts: ["math"],
546
+ tokens: ["--vmd-math-color", "--vmd-math-bg"],
547
+ slots: ["math", "math-error"],
548
+ labels: ["math"],
549
+ overrideKeys: ["math"],
550
+ behaviors: ["mathEngine"]
551
+ }),
552
+ MermaidBlock: T("MermaidBlock", {
553
+ parts: [
554
+ "mermaid",
555
+ "mermaid-header",
556
+ "mermaid-tabs",
557
+ "mermaid-actions",
558
+ "mermaid-action",
559
+ "mermaid-preview",
560
+ "mermaid-source",
561
+ "mermaid-pending",
562
+ "mermaid-error",
563
+ "mermaid-fallback",
564
+ "mermaid-fullscreen"
565
+ ],
566
+ tokens: ["--vmd-mermaid-bg", "--vmd-mermaid-border"],
567
+ slots: [
568
+ "mermaid",
569
+ "mermaid-error",
570
+ "header",
571
+ "tabs",
572
+ "actions"
573
+ ],
574
+ labels: [
575
+ "mermaid",
576
+ "mermaidFallback",
577
+ "preview",
578
+ "source",
579
+ "retry",
580
+ "exportPng",
581
+ "download",
582
+ "fullscreen",
583
+ "exitFullscreen",
584
+ "zoomIn",
585
+ "zoomOut",
586
+ "reset",
587
+ "copy",
588
+ "copied"
589
+ ],
590
+ overrideKeys: ["mermaid", "mermaidBlock"],
591
+ behaviors: ["mermaidRenderer"]
592
+ }),
593
+ MermaidLiveEditor: T("MermaidLiveEditor", {
594
+ parts: [
595
+ "editor",
596
+ "editor-toolbar",
597
+ "editor-pane",
598
+ "editor-divider",
599
+ "editor-preview",
600
+ "editor-diagnostics",
601
+ "editor-empty",
602
+ "editor-fullscreen",
603
+ "mermaid",
604
+ "mermaid-header",
605
+ "mermaid-tabs",
606
+ "mermaid-actions",
607
+ "mermaid-action",
608
+ "mermaid-preview",
609
+ "mermaid-source",
610
+ "mermaid-pending",
611
+ "mermaid-error",
612
+ "mermaid-fallback",
613
+ "mermaid-fullscreen"
614
+ ],
615
+ tokens: w,
616
+ slots: [
617
+ "toolbar",
618
+ "editor",
619
+ "preview",
620
+ "editor-diagnostics",
621
+ "empty",
622
+ "fullscreen"
623
+ ],
624
+ labels: [
625
+ "editor",
626
+ "editorEmpty",
627
+ "editorLine",
628
+ "editorSplitter",
629
+ "editorDiagnostics",
630
+ "editorReset",
631
+ "editorSyntaxError",
632
+ "editorParseError",
633
+ "fullscreen",
634
+ "exitFullscreen",
635
+ "reset",
636
+ "mermaid",
637
+ "mermaidFallback"
638
+ ],
639
+ overrideKeys: ["editor", "diagnosticsFormatter"],
640
+ behaviors: ["mermaidRenderer", "diagnosticsFormatter"]
641
+ }),
642
+ MarkdownMermaid: T("MarkdownMermaid", {
643
+ parts: [
644
+ "mermaid",
645
+ "mermaid-header",
646
+ "mermaid-tabs",
647
+ "mermaid-actions",
648
+ "mermaid-action",
649
+ "mermaid-preview",
650
+ "mermaid-source",
651
+ "mermaid-pending",
652
+ "mermaid-error",
653
+ "mermaid-fallback",
654
+ "mermaid-fullscreen"
655
+ ],
656
+ tokens: ["--vmd-mermaid-bg", "--vmd-mermaid-border"],
657
+ slots: [
658
+ "mermaid",
659
+ "mermaid-error",
660
+ "header",
661
+ "tabs",
662
+ "actions"
663
+ ],
664
+ labels: [
665
+ "mermaid",
666
+ "mermaidFallback",
667
+ "preview",
668
+ "source",
669
+ "retry",
670
+ "exportPng",
671
+ "download",
672
+ "fullscreen",
673
+ "exitFullscreen",
674
+ "zoomIn",
675
+ "zoomOut",
676
+ "reset",
677
+ "copy",
678
+ "copied"
679
+ ],
680
+ overrideKeys: ["mermaid", "mermaidBlock"],
681
+ behaviors: ["mermaidRenderer"]
682
+ }),
683
+ MarkdownBreak: T("MarkdownBreak", {
684
+ parts: ["break"],
685
+ overrideKeys: ["br", "break"],
686
+ tags: ["br"]
687
+ }),
688
+ MarkdownHtml: T("MarkdownHtml", {
689
+ parts: ["html"],
690
+ overrideKeys: ["html"]
691
+ }),
692
+ MarkdownCustomTag: T("MarkdownCustomTag", {
693
+ parts: ["custom-tag"],
694
+ slots: ["default"],
695
+ overrideKeys: ["customTag", "x-*"]
696
+ }),
697
+ MarkdownChildren: T("MarkdownChildren", {
698
+ parts: [],
699
+ overrideKeys: []
700
+ })
701
+ };
702
+ function ee(e) {
703
+ return E[e];
704
+ }
705
+ function te(e, t) {
706
+ let n = [];
707
+ if (t.parts) {
708
+ let r = new Set(e.parts), i = new Set(t.parts);
709
+ for (let t of i) r.has(t) || n.push({
710
+ code: "undeclared-part",
711
+ component: e.name,
712
+ message: `Rendered part "${t}" is not declared by ${e.name}.`
713
+ });
714
+ for (let a of r) !i.has(a) && t.mode !== "observed" && n.push({
715
+ code: "missing-part",
716
+ component: e.name,
717
+ message: `Declared part "${a}" was not rendered by ${e.name}.`
718
+ });
719
+ }
720
+ if (t.labels) {
721
+ let r = new Set(e.labels);
722
+ for (let i of t.labels) r.has(i) || n.push({
723
+ code: "undeclared-label",
724
+ component: e.name,
725
+ message: `Label "${i}" is not declared by ${e.name}.`
726
+ });
727
+ }
728
+ if (t.slots) {
729
+ let r = new Set(e.slots);
730
+ for (let i of t.slots) r.has(i) || n.push({
731
+ code: "missing-slot",
732
+ component: e.name,
733
+ message: `Slot "${i}" is not declared by ${e.name}.`
734
+ });
735
+ }
736
+ return n;
737
+ }
738
+ function ne(e = E) {
739
+ let t = [], n = /* @__PURE__ */ new Set();
740
+ for (let r of Object.values(e)) n.has(r.name) && t.push({
741
+ code: "duplicate-manifest",
742
+ component: r.name,
743
+ message: `Duplicate manifest name "${r.name}".`
744
+ }), n.add(r.name);
745
+ return t;
746
+ }
747
+ // node_modules/html-void-elements/index.js
748
+ var re = [
749
+ "area",
750
+ "base",
751
+ "basefont",
752
+ "bgsound",
753
+ "br",
754
+ "col",
755
+ "command",
756
+ "embed",
757
+ "frame",
758
+ "hr",
759
+ "image",
760
+ "img",
761
+ "input",
762
+ "keygen",
763
+ "link",
764
+ "meta",
765
+ "param",
766
+ "source",
767
+ "track",
768
+ "wbr"
769
+ ], D = {}.hasOwnProperty;
770
+ function ie(e, t) {
771
+ let n = t || {};
772
+ function r(t, ...n) {
773
+ let i = r.invalid, a = r.handlers;
774
+ if (t && D.call(t, e)) {
775
+ let n = String(t[e]);
776
+ i = D.call(a, n) ? a[n] : r.unknown;
777
+ }
778
+ if (i) return i.call(this, t, ...n);
779
+ }
780
+ return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
781
+ }
782
+ // node_modules/stringify-entities/lib/core.js
783
+ var ae = /["&'<>`]/g, oe = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, se = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g, ce = /[|\\{}()[\]^$+*?.]/g, O = /* @__PURE__ */ new WeakMap();
784
+ function le(e, t) {
785
+ return e = e.replace(t.subset ? ue(t.subset) : ae, r), t.subset || t.escapeOnly ? e : e.replace(oe, n).replace(se, r);
786
+ function n(e, n, r) {
787
+ return t.format((e.charCodeAt(0) - 55296) * 1024 + e.charCodeAt(1) - 56320 + 65536, r.charCodeAt(n + 2), t);
788
+ }
789
+ function r(e, n, r) {
790
+ return t.format(e.charCodeAt(0), r.charCodeAt(n + 1), t);
791
+ }
792
+ }
793
+ function ue(e) {
794
+ let t = O.get(e);
795
+ return t || (t = de(e), O.set(e, t)), t;
796
+ }
797
+ function de(e) {
798
+ let t = [], n = -1;
799
+ for (; ++n < e.length;) t.push(e[n].replace(ce, "\\$&"));
800
+ return RegExp("(?:" + t.join("|") + ")", "g");
801
+ }
802
+ // node_modules/stringify-entities/lib/util/to-hexadecimal.js
803
+ var fe = /[\dA-Fa-f]/;
804
+ function pe(e, t, n) {
805
+ let r = "&#x" + e.toString(16).toUpperCase();
806
+ return n && t && !fe.test(String.fromCharCode(t)) ? r : r + ";";
807
+ }
808
+ // node_modules/stringify-entities/lib/util/to-decimal.js
809
+ var me = /\d/;
810
+ function he(e, t, n) {
811
+ let r = "&#" + String(e);
812
+ return n && t && !me.test(String.fromCharCode(t)) ? r : r + ";";
813
+ }
814
+ // node_modules/character-entities-legacy/index.js
815
+ var ge = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), k = {
816
+ nbsp: "\xA0",
817
+ iexcl: "¡",
818
+ cent: "¢",
819
+ pound: "£",
820
+ curren: "¤",
821
+ yen: "¥",
822
+ brvbar: "¦",
823
+ sect: "§",
824
+ uml: "¨",
825
+ copy: "©",
826
+ ordf: "ª",
827
+ laquo: "«",
828
+ not: "¬",
829
+ shy: "­",
830
+ reg: "®",
831
+ macr: "¯",
832
+ deg: "°",
833
+ plusmn: "±",
834
+ sup2: "²",
835
+ sup3: "³",
836
+ acute: "´",
837
+ micro: "µ",
838
+ para: "¶",
839
+ middot: "·",
840
+ cedil: "¸",
841
+ sup1: "¹",
842
+ ordm: "º",
843
+ raquo: "»",
844
+ frac14: "¼",
845
+ frac12: "½",
846
+ frac34: "¾",
847
+ iquest: "¿",
848
+ Agrave: "À",
849
+ Aacute: "Á",
850
+ Acirc: "Â",
851
+ Atilde: "Ã",
852
+ Auml: "Ä",
853
+ Aring: "Å",
854
+ AElig: "Æ",
855
+ Ccedil: "Ç",
856
+ Egrave: "È",
857
+ Eacute: "É",
858
+ Ecirc: "Ê",
859
+ Euml: "Ë",
860
+ Igrave: "Ì",
861
+ Iacute: "Í",
862
+ Icirc: "Î",
863
+ Iuml: "Ï",
864
+ ETH: "Ð",
865
+ Ntilde: "Ñ",
866
+ Ograve: "Ò",
867
+ Oacute: "Ó",
868
+ Ocirc: "Ô",
869
+ Otilde: "Õ",
870
+ Ouml: "Ö",
871
+ times: "×",
872
+ Oslash: "Ø",
873
+ Ugrave: "Ù",
874
+ Uacute: "Ú",
875
+ Ucirc: "Û",
876
+ Uuml: "Ü",
877
+ Yacute: "Ý",
878
+ THORN: "Þ",
879
+ szlig: "ß",
880
+ agrave: "à",
881
+ aacute: "á",
882
+ acirc: "â",
883
+ atilde: "ã",
884
+ auml: "ä",
885
+ aring: "å",
886
+ aelig: "æ",
887
+ ccedil: "ç",
888
+ egrave: "è",
889
+ eacute: "é",
890
+ ecirc: "ê",
891
+ euml: "ë",
892
+ igrave: "ì",
893
+ iacute: "í",
894
+ icirc: "î",
895
+ iuml: "ï",
896
+ eth: "ð",
897
+ ntilde: "ñ",
898
+ ograve: "ò",
899
+ oacute: "ó",
900
+ ocirc: "ô",
901
+ otilde: "õ",
902
+ ouml: "ö",
903
+ divide: "÷",
904
+ oslash: "ø",
905
+ ugrave: "ù",
906
+ uacute: "ú",
907
+ ucirc: "û",
908
+ uuml: "ü",
909
+ yacute: "ý",
910
+ thorn: "þ",
911
+ yuml: "ÿ",
912
+ fnof: "ƒ",
913
+ Alpha: "Α",
914
+ Beta: "Β",
915
+ Gamma: "Γ",
916
+ Delta: "Δ",
917
+ Epsilon: "Ε",
918
+ Zeta: "Ζ",
919
+ Eta: "Η",
920
+ Theta: "Θ",
921
+ Iota: "Ι",
922
+ Kappa: "Κ",
923
+ Lambda: "Λ",
924
+ Mu: "Μ",
925
+ Nu: "Ν",
926
+ Xi: "Ξ",
927
+ Omicron: "Ο",
928
+ Pi: "Π",
929
+ Rho: "Ρ",
930
+ Sigma: "Σ",
931
+ Tau: "Τ",
932
+ Upsilon: "Υ",
933
+ Phi: "Φ",
934
+ Chi: "Χ",
935
+ Psi: "Ψ",
936
+ Omega: "Ω",
937
+ alpha: "α",
938
+ beta: "β",
939
+ gamma: "γ",
940
+ delta: "δ",
941
+ epsilon: "ε",
942
+ zeta: "ζ",
943
+ eta: "η",
944
+ theta: "θ",
945
+ iota: "ι",
946
+ kappa: "κ",
947
+ lambda: "λ",
948
+ mu: "μ",
949
+ nu: "ν",
950
+ xi: "ξ",
951
+ omicron: "ο",
952
+ pi: "π",
953
+ rho: "ρ",
954
+ sigmaf: "ς",
955
+ sigma: "σ",
956
+ tau: "τ",
957
+ upsilon: "υ",
958
+ phi: "φ",
959
+ chi: "χ",
960
+ psi: "ψ",
961
+ omega: "ω",
962
+ thetasym: "ϑ",
963
+ upsih: "ϒ",
964
+ piv: "ϖ",
965
+ bull: "•",
966
+ hellip: "…",
967
+ prime: "′",
968
+ Prime: "″",
969
+ oline: "‾",
970
+ frasl: "⁄",
971
+ weierp: "℘",
972
+ image: "ℑ",
973
+ real: "ℜ",
974
+ trade: "™",
975
+ alefsym: "ℵ",
976
+ larr: "←",
977
+ uarr: "↑",
978
+ rarr: "→",
979
+ darr: "↓",
980
+ harr: "↔",
981
+ crarr: "↵",
982
+ lArr: "⇐",
983
+ uArr: "⇑",
984
+ rArr: "⇒",
985
+ dArr: "⇓",
986
+ hArr: "⇔",
987
+ forall: "∀",
988
+ part: "∂",
989
+ exist: "∃",
990
+ empty: "∅",
991
+ nabla: "∇",
992
+ isin: "∈",
993
+ notin: "∉",
994
+ ni: "∋",
995
+ prod: "∏",
996
+ sum: "∑",
997
+ minus: "−",
998
+ lowast: "∗",
999
+ radic: "√",
1000
+ prop: "∝",
1001
+ infin: "∞",
1002
+ ang: "∠",
1003
+ and: "∧",
1004
+ or: "∨",
1005
+ cap: "∩",
1006
+ cup: "∪",
1007
+ int: "∫",
1008
+ there4: "∴",
1009
+ sim: "∼",
1010
+ cong: "≅",
1011
+ asymp: "≈",
1012
+ ne: "≠",
1013
+ equiv: "≡",
1014
+ le: "≤",
1015
+ ge: "≥",
1016
+ sub: "⊂",
1017
+ sup: "⊃",
1018
+ nsub: "⊄",
1019
+ sube: "⊆",
1020
+ supe: "⊇",
1021
+ oplus: "⊕",
1022
+ otimes: "⊗",
1023
+ perp: "⊥",
1024
+ sdot: "⋅",
1025
+ lceil: "⌈",
1026
+ rceil: "⌉",
1027
+ lfloor: "⌊",
1028
+ rfloor: "⌋",
1029
+ lang: "〈",
1030
+ rang: "〉",
1031
+ loz: "◊",
1032
+ spades: "♠",
1033
+ clubs: "♣",
1034
+ hearts: "♥",
1035
+ diams: "♦",
1036
+ quot: "\"",
1037
+ amp: "&",
1038
+ lt: "<",
1039
+ gt: ">",
1040
+ OElig: "Œ",
1041
+ oelig: "œ",
1042
+ Scaron: "Š",
1043
+ scaron: "š",
1044
+ Yuml: "Ÿ",
1045
+ circ: "ˆ",
1046
+ tilde: "˜",
1047
+ ensp: " ",
1048
+ emsp: " ",
1049
+ thinsp: " ",
1050
+ zwnj: "‌",
1051
+ zwj: "‍",
1052
+ lrm: "‎",
1053
+ rlm: "‏",
1054
+ ndash: "–",
1055
+ mdash: "—",
1056
+ lsquo: "‘",
1057
+ rsquo: "’",
1058
+ sbquo: "‚",
1059
+ ldquo: "“",
1060
+ rdquo: "”",
1061
+ bdquo: "„",
1062
+ dagger: "†",
1063
+ Dagger: "‡",
1064
+ permil: "‰",
1065
+ lsaquo: "‹",
1066
+ rsaquo: "›",
1067
+ euro: "€"
1068
+ }, _e = [
1069
+ "cent",
1070
+ "copy",
1071
+ "divide",
1072
+ "gt",
1073
+ "lt",
1074
+ "not",
1075
+ "para",
1076
+ "times"
1077
+ ], A = {}.hasOwnProperty, j = {}, M;
1078
+ for (M in k) A.call(k, M) && (j[k[M]] = M);
1079
+ var ve = /[^\dA-Za-z]/;
1080
+ function ye(e, t, n, r) {
1081
+ let i = String.fromCharCode(e);
1082
+ if (A.call(j, i)) {
1083
+ let e = j[i], a = "&" + e;
1084
+ return n && ge.includes(e) && !_e.includes(e) && (!r || t && t !== 61 && ve.test(String.fromCharCode(t))) ? a : a + ";";
1085
+ }
1086
+ return "";
1087
+ }
1088
+ // node_modules/stringify-entities/lib/util/format-smart.js
1089
+ function be(e, t, n) {
1090
+ let r = pe(e, t, n.omitOptionalSemicolons), i;
1091
+ if ((n.useNamedReferences || n.useShortestReferences) && (i = ye(e, t, n.omitOptionalSemicolons, n.attribute)), (n.useShortestReferences || !i) && n.useShortestReferences) {
1092
+ let i = he(e, t, n.omitOptionalSemicolons);
1093
+ i.length < r.length && (r = i);
1094
+ }
1095
+ return i && (!n.useShortestReferences || i.length < r.length) ? i : r;
1096
+ }
1097
+ // node_modules/stringify-entities/lib/index.js
1098
+ function N(e, t) {
1099
+ return le(e, Object.assign({ format: be }, t));
1100
+ }
1101
+ // node_modules/hast-util-to-html/lib/handle/comment.js
1102
+ var xe = /^>|^->|<!--|-->|--!>|<!-$/g, Se = [">"], Ce = ["<", ">"];
1103
+ function we(e, t, n, r) {
1104
+ return r.settings.bogusComments ? "<?" + N(e.value, Object.assign({}, r.settings.characterReferences, { subset: Se })) + ">" : "<!--" + e.value.replace(xe, i) + "-->";
1105
+ function i(e) {
1106
+ return N(e, Object.assign({}, r.settings.characterReferences, { subset: Ce }));
1107
+ }
1108
+ }
1109
+ // node_modules/hast-util-to-html/lib/handle/doctype.js
1110
+ function Te(e, t, n, r) {
1111
+ return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
1112
+ }
1113
+ // node_modules/hast-util-whitespace/lib/index.js
1114
+ var Ee = /[ \t\n\f\r]/g;
1115
+ function P(e) {
1116
+ return typeof e == "object" ? e.type === "text" && F(e.value) : F(e);
1117
+ }
1118
+ function F(e) {
1119
+ return e.replace(Ee, "") === "";
1120
+ }
1121
+ // node_modules/hast-util-to-html/lib/omission/util/siblings.js
1122
+ var I = R(1), L = R(-1), De = [];
1123
+ function R(e) {
1124
+ return t;
1125
+ function t(t, n, r) {
1126
+ let i = t ? t.children : De, a = (n || 0) + e, o = i[a];
1127
+ if (!r) for (; o && P(o);) a += e, o = i[a];
1128
+ return o;
1129
+ }
1130
+ }
1131
+ // node_modules/hast-util-to-html/lib/omission/omission.js
1132
+ var Oe = {}.hasOwnProperty;
1133
+ function z(e) {
1134
+ return t;
1135
+ function t(t, n, r) {
1136
+ return Oe.call(e, t.tagName) && e[t.tagName](t, n, r);
1137
+ }
1138
+ }
1139
+ // node_modules/hast-util-to-html/lib/omission/closing.js
1140
+ var B = z({
1141
+ body: Ae,
1142
+ caption: V,
1143
+ colgroup: V,
1144
+ dd: Pe,
1145
+ dt: Ne,
1146
+ head: V,
1147
+ html: ke,
1148
+ li: Me,
1149
+ optgroup: Fe,
1150
+ option: Ie,
1151
+ p: je,
1152
+ rp: H,
1153
+ rt: H,
1154
+ tbody: Re,
1155
+ td: U,
1156
+ tfoot: ze,
1157
+ th: U,
1158
+ thead: Le,
1159
+ tr: Be
1160
+ });
1161
+ function V(e, t, n) {
1162
+ let r = I(n, t, !0);
1163
+ return !r || r.type !== "comment" && !(r.type === "text" && P(r.value.charAt(0)));
1164
+ }
1165
+ function ke(e, t, n) {
1166
+ let r = I(n, t);
1167
+ return !r || r.type !== "comment";
1168
+ }
1169
+ function Ae(e, t, n) {
1170
+ let r = I(n, t);
1171
+ return !r || r.type !== "comment";
1172
+ }
1173
+ function je(e, t, n) {
1174
+ let r = I(n, t);
1175
+ return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || n.type !== "element" || n.tagName !== "a" && n.tagName !== "audio" && n.tagName !== "del" && n.tagName !== "ins" && n.tagName !== "map" && n.tagName !== "noscript" && n.tagName !== "video";
1176
+ }
1177
+ function Me(e, t, n) {
1178
+ let r = I(n, t);
1179
+ return !r || r.type === "element" && r.tagName === "li";
1180
+ }
1181
+ function Ne(e, t, n) {
1182
+ let r = I(n, t);
1183
+ return !(!r || r.type !== "element" || r.tagName !== "dt" && r.tagName !== "dd");
1184
+ }
1185
+ function Pe(e, t, n) {
1186
+ let r = I(n, t);
1187
+ return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
1188
+ }
1189
+ function H(e, t, n) {
1190
+ let r = I(n, t);
1191
+ return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
1192
+ }
1193
+ function Fe(e, t, n) {
1194
+ let r = I(n, t);
1195
+ return !r || r.type === "element" && r.tagName === "optgroup";
1196
+ }
1197
+ function Ie(e, t, n) {
1198
+ let r = I(n, t);
1199
+ return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
1200
+ }
1201
+ function Le(e, t, n) {
1202
+ let r = I(n, t);
1203
+ return !(!r || r.type !== "element" || r.tagName !== "tbody" && r.tagName !== "tfoot");
1204
+ }
1205
+ function Re(e, t, n) {
1206
+ let r = I(n, t);
1207
+ return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
1208
+ }
1209
+ function ze(e, t, n) {
1210
+ return !I(n, t);
1211
+ }
1212
+ function Be(e, t, n) {
1213
+ let r = I(n, t);
1214
+ return !r || r.type === "element" && r.tagName === "tr";
1215
+ }
1216
+ function U(e, t, n) {
1217
+ let r = I(n, t);
1218
+ return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
1219
+ }
1220
+ // node_modules/hast-util-to-html/lib/omission/opening.js
1221
+ var Ve = z({
1222
+ body: We,
1223
+ colgroup: Ge,
1224
+ head: Ue,
1225
+ html: He,
1226
+ tbody: Ke
1227
+ });
1228
+ function He(e) {
1229
+ let t = I(e, -1);
1230
+ return !t || t.type !== "comment";
1231
+ }
1232
+ function Ue(e) {
1233
+ let t = /* @__PURE__ */ new Set();
1234
+ for (let n of e.children) if (n.type === "element" && (n.tagName === "base" || n.tagName === "title")) {
1235
+ if (t.has(n.tagName)) return !1;
1236
+ t.add(n.tagName);
1237
+ }
1238
+ let n = e.children[0];
1239
+ return !n || n.type === "element";
1240
+ }
1241
+ function We(e) {
1242
+ let t = I(e, -1, !0);
1243
+ return !t || t.type !== "comment" && !(t.type === "text" && P(t.value.charAt(0))) && (t.type !== "element" || t.tagName !== "meta" && t.tagName !== "link" && t.tagName !== "script" && t.tagName !== "style" && t.tagName !== "template");
1244
+ }
1245
+ function Ge(e, t, n) {
1246
+ let r = L(n, t), i = I(e, -1, !0);
1247
+ return n && r && r.type === "element" && r.tagName === "colgroup" && B(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "col");
1248
+ }
1249
+ function Ke(e, t, n) {
1250
+ let r = L(n, t), i = I(e, -1);
1251
+ return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && B(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "tr");
1252
+ }
1253
+ // node_modules/hast-util-to-html/lib/handle/element.js
1254
+ var W = {
1255
+ name: [[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")], ["\0 \n\f\r \"&'/<=>".split(""), "\0 \n\f\r \"&'/<=>`".split("")]],
1256
+ unquoted: [[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")], ["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]],
1257
+ single: [["&'".split(""), "\"&'`".split("")], ["\0&'".split(""), "\0\"&'`".split("")]],
1258
+ double: [["\"&".split(""), "\"&'`".split("")], ["\0\"&".split(""), "\0\"&'`".split("")]]
1259
+ };
1260
+ function qe(e, t, n, r) {
1261
+ let i = r.schema, a = i.space !== "svg" && r.settings.omitOptionalTags, o = i.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(e.tagName.toLowerCase()), s = [], c;
1262
+ i.space === "html" && e.tagName === "svg" && (r.schema = m);
1263
+ let l = Je(r, e.properties), u = r.all(i.space === "html" && e.tagName === "template" ? e.content : e);
1264
+ return r.schema = i, u && (o = !1), !l && a && Ve(e, t, n) || (s.push("<", e.tagName, l ? " " + l : ""), o && (i.space === "svg" || r.settings.closeSelfClosing) && (c = l.charAt(l.length - 1), (!r.settings.tightSelfClosing || c === "/" || c && c !== "\"" && c !== "'") && s.push(" "), s.push("/")), s.push(">")), s.push(u), o || a && B(e, t, n) || s.push("</" + e.tagName + ">"), s.join("");
1265
+ }
1266
+ function Je(e, t) {
1267
+ let n = [], r = -1, i;
1268
+ if (t) {
1269
+ for (i in t) if (t[i] !== null && t[i] !== void 0) {
1270
+ let r = Ye(e, i, t[i]);
1271
+ r && n.push(r);
1272
+ }
1273
+ }
1274
+ for (; ++r < n.length;) {
1275
+ let t = e.settings.tightAttributes ? n[r].charAt(n[r].length - 1) : void 0;
1276
+ r !== n.length - 1 && t !== "\"" && t !== "'" && (n[r] += " ");
1277
+ }
1278
+ return n.join("");
1279
+ }
1280
+ function Ye(e, t, n) {
1281
+ let r = h(e.schema, t), i = e.settings.allowParseErrors && e.schema.space === "html" ? 0 : 1, a = +!e.settings.allowDangerousCharacters, s = e.quote, c;
1282
+ if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n)) return "";
1283
+ let l = N(r.attribute, Object.assign({}, e.settings.characterReferences, { subset: W.name[i][a] }));
1284
+ return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? f : p)(n, { padLeft: !e.settings.tightCommaSeparatedLists }) : String(n), e.settings.collapseEmptyAttributes && !n) ? l : (e.settings.preferUnquoted && (c = N(n, Object.assign({}, e.settings.characterReferences, {
1285
+ attribute: !0,
1286
+ subset: W.unquoted[i][a]
1287
+ }))), c !== n && (e.settings.quoteSmart && o(n, s) > o(n, e.alternative) && (s = e.alternative), c = s + N(n, Object.assign({}, e.settings.characterReferences, {
1288
+ subset: (s === "'" ? W.single : W.double)[i][a],
1289
+ attribute: !0
1290
+ })) + s), l + (c && "=" + c));
1291
+ }
1292
+ // node_modules/hast-util-to-html/lib/handle/text.js
1293
+ var Xe = ["<", "&"];
1294
+ function G(e, t, n, r) {
1295
+ return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? e.value : N(e.value, Object.assign({}, r.settings.characterReferences, { subset: Xe }));
1296
+ }
1297
+ // node_modules/hast-util-to-html/lib/handle/raw.js
1298
+ function Ze(e, t, n, r) {
1299
+ return r.settings.allowDangerousHtml ? e.value : G(e, t, n, r);
1300
+ }
1301
+ // node_modules/hast-util-to-html/lib/handle/root.js
1302
+ function Qe(e, t, n, r) {
1303
+ return r.all(e);
1304
+ }
1305
+ // node_modules/hast-util-to-html/lib/handle/index.js
1306
+ var $e = ie("type", {
1307
+ invalid: et,
1308
+ unknown: tt,
1309
+ handlers: {
1310
+ comment: we,
1311
+ doctype: Te,
1312
+ element: qe,
1313
+ raw: Ze,
1314
+ root: Qe,
1315
+ text: G
1316
+ }
1317
+ });
1318
+ function et(e) {
1319
+ throw Error("Expected node, not `" + e + "`");
1320
+ }
1321
+ function tt(e) {
1322
+ throw Error("Cannot compile unknown node `" + e.type + "`");
1323
+ }
1324
+ // node_modules/hast-util-to-html/lib/index.js
1325
+ var nt = {}, rt = {}, it = [];
1326
+ function at(e, t) {
1327
+ let n = t || nt, r = n.quote || "\"", i = r === "\"" ? "'" : "\"";
1328
+ if (r !== "\"" && r !== "'") throw Error("Invalid quote `" + r + "`, expected `'` or `\"`");
1329
+ return {
1330
+ one: ot,
1331
+ all: st,
1332
+ settings: {
1333
+ omitOptionalTags: n.omitOptionalTags || !1,
1334
+ allowParseErrors: n.allowParseErrors || !1,
1335
+ allowDangerousCharacters: n.allowDangerousCharacters || !1,
1336
+ quoteSmart: n.quoteSmart || !1,
1337
+ preferUnquoted: n.preferUnquoted || !1,
1338
+ tightAttributes: n.tightAttributes || !1,
1339
+ upperDoctype: n.upperDoctype || !1,
1340
+ tightDoctype: n.tightDoctype || !1,
1341
+ bogusComments: n.bogusComments || !1,
1342
+ tightCommaSeparatedLists: n.tightCommaSeparatedLists || !1,
1343
+ tightSelfClosing: n.tightSelfClosing || !1,
1344
+ collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
1345
+ allowDangerousHtml: n.allowDangerousHtml || !1,
1346
+ voids: n.voids || re,
1347
+ characterReferences: n.characterReferences || rt,
1348
+ closeSelfClosing: n.closeSelfClosing || !1,
1349
+ closeEmptyElements: n.closeEmptyElements || !1
1350
+ },
1351
+ schema: n.space === "svg" ? m : d,
1352
+ quote: r,
1353
+ alternative: i
1354
+ }.one(Array.isArray(e) ? {
1355
+ type: "root",
1356
+ children: e
1357
+ } : e, void 0, void 0);
1358
+ }
1359
+ function ot(e, t, n) {
1360
+ return $e(e, t, n, this);
1361
+ }
1362
+ function st(e) {
1363
+ let t = [], n = e && e.children || it, r = -1;
1364
+ for (; ++r < n.length;) t[r] = this.one(n[r], r, e);
1365
+ return t.join("");
1366
+ }
1367
+ // node_modules/rehype-stringify/lib/index.js
1368
+ function ct(t) {
1369
+ let n = this, r = e(e({}, n.data("settings")), t);
1370
+ n.compiler = i;
1371
+ function i(e) {
1372
+ return at(e, r);
1373
+ }
1374
+ }
1375
+ // src/core/model-hast.ts
1376
+ var lt = /* @__PURE__ */ new Set([
1377
+ "checked",
1378
+ "disabled",
1379
+ "hidden",
1380
+ "open",
1381
+ "reversed",
1382
+ "multiple",
1383
+ "required",
1384
+ "selected"
1385
+ ]), ut = {
1386
+ class: "className",
1387
+ for: "htmlFor",
1388
+ tabindex: "tabIndex",
1389
+ colspan: "colSpan",
1390
+ rowspan: "rowSpan",
1391
+ readonly: "readOnly",
1392
+ maxlength: "maxLength",
1393
+ minlength: "minLength",
1394
+ referrerpolicy: "referrerPolicy",
1395
+ crossorigin: "crossOrigin",
1396
+ srcset: "srcSet",
1397
+ datetime: "dateTime",
1398
+ "http-equiv": "httpEquiv"
1399
+ };
1400
+ function K(e) {
1401
+ let t = {};
1402
+ for (let i of Object.keys(e)) {
1403
+ var n, r;
1404
+ let a = (n = e[i]) == null ? "" : n, o = (r = ut[i]) == null ? i : r;
1405
+ lt.has(i) ? t[o] = a !== "false" : i === "class" ? t.className = a.split(/\s+/).filter(Boolean) : t[o] = a;
1406
+ }
1407
+ return t;
1408
+ }
1409
+ var dt = /* @__PURE__ */ new Set(/* @__PURE__ */ "p.h1.h2.h3.h4.h5.h6.ul.ol.li.blockquote.pre.table.thead.tbody.tfoot.tr.th.td.hr.div.section.figure.figcaption.dl.dt.dd.details.summary".split("."));
1410
+ function q(e, t, n) {
1411
+ return {
1412
+ type: "element",
1413
+ tagName: e,
1414
+ properties: t,
1415
+ children: J(n)
1416
+ };
1417
+ }
1418
+ function ft(e) {
1419
+ return e.type === "element" && dt.has(e.tagName);
1420
+ }
1421
+ function J(e) {
1422
+ let t = [];
1423
+ for (let n of e) {
1424
+ let e = t[t.length - 1], r = (e == null ? void 0 : e.type) === "text" && /\n\s*$/.test(e.value);
1425
+ t.length > 0 && ft(n) && !r && t.push({
1426
+ type: "text",
1427
+ value: "\n"
1428
+ }), t.push(n);
1429
+ }
1430
+ return t;
1431
+ }
1432
+ function pt(e, t) {
1433
+ return q("pre", {}, [q("code", t ? { className: [`language-${t}`] } : {}, [{
1434
+ type: "text",
1435
+ value: e
1436
+ }])]);
1437
+ }
1438
+ function mt(e) {
1439
+ switch (e.kind) {
1440
+ case "text": return !e.segments || e.segments.length === 0 ? {
1441
+ type: "text",
1442
+ value: e.value
1443
+ } : e.segments.map((e) => e.match ? q("mark", {
1444
+ className: ["vmd-search-match"],
1445
+ "data-vmd-part": "search-match"
1446
+ }, [{
1447
+ type: "text",
1448
+ value: e.value
1449
+ }]) : {
1450
+ type: "text",
1451
+ value: e.value
1452
+ });
1453
+ case "element": return q(e.tag, K(e.attrs), Y(e.children));
1454
+ case "code": return pt(e.code, e.language);
1455
+ case "math": {
1456
+ var t;
1457
+ let n = Y((t = e.rendered) == null ? [] : t);
1458
+ return q("span", {
1459
+ "data-vmd-part": "math",
1460
+ "data-vmd-math": "",
1461
+ "data-tex": e.tex,
1462
+ "data-display": e.displayMode ? "true" : "false"
1463
+ }, n.length > 0 ? n : [{
1464
+ type: "text",
1465
+ value: e.tex
1466
+ }]);
1467
+ }
1468
+ case "mermaid": return q("pre", {
1469
+ "data-vmd-part": "mermaid",
1470
+ "data-vmd-mermaid": ""
1471
+ }, [q("code", { className: ["language-mermaid"] }, [{
1472
+ type: "text",
1473
+ value: e.code
1474
+ }])]);
1475
+ case "custom": return q(e.tag, K(e.attrs), Y(e.children));
1476
+ case "plugin": {
1477
+ var n;
1478
+ let t = Y((n = e.children) == null ? [] : n), r = {
1479
+ "data-vmd-part": "plugin",
1480
+ "data-plugin-type": e.type,
1481
+ "data-plugin-key": e.key
1482
+ };
1483
+ return t.length === 0 && (r["data-plugin-unrendered"] = ""), q("span", r, t);
1484
+ }
1485
+ default: return;
1486
+ }
1487
+ }
1488
+ function Y(e) {
1489
+ let t = [];
1490
+ for (let n of e) {
1491
+ let e = mt(n);
1492
+ e && (Array.isArray(e) ? t.push(...e) : t.push(e));
1493
+ }
1494
+ return t;
1495
+ }
1496
+ function ht(e) {
1497
+ return {
1498
+ type: "root",
1499
+ children: J(Y(e.nodes))
1500
+ };
1501
+ }
1502
+ // src/core/run.ts
1503
+ function X(r, o = {}, l = []) {
1504
+ var u, d, f, p, m, h, g;
1505
+ let _ = s((u = o.plugins) == null ? a : u, (d = o.disablePlugins) == null ? [] : d);
1506
+ l.push(..._.diagnostics);
1507
+ let v = c(o.pipeline);
1508
+ l.push(...v.diagnostics);
1509
+ let y = [..._.remarkPlugins, ...(f = o.remarkPlugins) == null ? [] : f], b = [..._.rehypePlugins, ...(p = o.rehypePlugins) == null ? [] : p], x = t(r, _.plugins, o, l), S = (m = o.slugger) == null ? i() : m, C = n(S), w = {
1510
+ source: x,
1511
+ options: o,
1512
+ plugins: _.plugins,
1513
+ remarkPlugins: y,
1514
+ rehypePlugins: b,
1515
+ remarkRehypeOptions: e(e({}, _.remarkRehypeOptions), (h = o.remarkRehypeOptions) == null ? {} : h),
1516
+ slugger: C,
1517
+ idPrefix: (g = o.idPrefix) == null ? "" : g,
1518
+ diagnostics: l
1519
+ };
1520
+ return {
1521
+ pipeline: v.pipeline,
1522
+ plugins: _,
1523
+ source: x,
1524
+ context: w,
1525
+ slugger: C,
1526
+ diagnostics: l
1527
+ };
1528
+ }
1529
+ // src/export/index.ts
1530
+ function Z(e) {
1531
+ return l().use(ct).stringify(ht(e));
1532
+ }
1533
+ function Q(e) {
1534
+ if (e.some((e) => e.severity === "error")) throw Error(e.map((e) => e.message).join(" "));
1535
+ }
1536
+ function gt(e) {
1537
+ return $.apply(this, arguments);
1538
+ }
1539
+ function $() {
1540
+ return $ = g(function* (e, t = {}) {
1541
+ var n, i, a;
1542
+ let o = [], s = X(e, t, o);
1543
+ (n = (i = s.slugger).reset) == null || n.call(i);
1544
+ let c = u(yield s.pipeline.process(s.source, s.context)), l = r({
1545
+ source: s.source,
1546
+ result: c,
1547
+ options: t,
1548
+ plugins: s.plugins,
1549
+ pipelineName: s.pipeline.name,
1550
+ slugger: s.slugger,
1551
+ idPrefix: (a = t.idPrefix) == null ? "" : a,
1552
+ diagnostics: o
1553
+ });
1554
+ return Q(o), Z(l);
1555
+ }), $.apply(this, arguments);
1556
+ }
1557
+ function _t(e, t = {}) {
1558
+ var n, i, a;
1559
+ let o = [], s = X(e, t, o);
1560
+ if (!s.pipeline.processSync) throw Error("The configured pipeline does not support synchronous export.");
1561
+ (n = (i = s.slugger).reset) == null || n.call(i);
1562
+ let c = u(s.pipeline.processSync(s.source, s.context)), l = r({
1563
+ source: s.source,
1564
+ result: c,
1565
+ options: t,
1566
+ plugins: s.plugins,
1567
+ pipelineName: s.pipeline.name,
1568
+ slugger: s.slugger,
1569
+ idPrefix: (a = t.idPrefix) == null ? "" : a,
1570
+ diagnostics: o
1571
+ });
1572
+ return Q(o), Z(l);
1573
+ }
1574
+ export { te as a, S as c, _ as d, b as f, ee as i, y as l, _t as n, ne as o, x as p, E as r, v as s, gt as t, C as u };