@coderminer/vue-markdown 1.0.0 → 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 (179) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/README.md +7 -2
  3. package/README.zh-CN.md +6 -3
  4. package/dist/chunks/MarkdownBlockquote-DVXziX2t.js +0 -2
  5. package/dist/chunks/MarkdownBreak-BwCi2Itt.js +0 -2
  6. package/dist/chunks/MarkdownCode-B1k9tmW5.js +0 -2
  7. package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js +0 -2
  8. package/dist/chunks/MarkdownContent-BAK6dqo7.js +0 -2
  9. package/dist/chunks/MarkdownCustomTag-lZJHsD6f.js +46 -0
  10. package/dist/chunks/MarkdownEmphasis-CppivOEu.js +0 -2
  11. package/dist/chunks/MarkdownEmpty-Av5k6bqa.js +0 -2
  12. package/dist/chunks/MarkdownError-C0sPs5W0.js +0 -2
  13. package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js +0 -2
  14. package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js +0 -2
  15. package/dist/chunks/MarkdownHeading-DaNcP0_6.js +0 -2
  16. package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js +0 -2
  17. package/dist/chunks/MarkdownHtml-66lYkvwM.js +0 -2
  18. package/dist/chunks/MarkdownImage-BRy76svs.js +0 -2
  19. package/dist/chunks/MarkdownInlineCode-MXZYFwex.js +0 -2
  20. package/dist/chunks/MarkdownLink-Dbx3NwgV.js +0 -2
  21. package/dist/chunks/MarkdownList-BJ-_C71k.js +0 -2
  22. package/dist/chunks/MarkdownListItem-Z1EHIY26.js +0 -2
  23. package/dist/chunks/MarkdownLoading-D-RYtXxf.js +0 -2
  24. package/dist/chunks/MarkdownParagraph-BxLSmSaG.js +0 -2
  25. package/dist/chunks/MarkdownRenderer-OlkdsvI3.js +482 -0
  26. package/dist/chunks/MarkdownRoot-DEE6iVfh.js +0 -2
  27. package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js +0 -2
  28. package/dist/chunks/MarkdownStrong-uU5MzAoJ.js +0 -2
  29. package/dist/chunks/MarkdownTable-DmBTg_CR.js +0 -2
  30. package/dist/chunks/MarkdownTableCell-eiCJe847.js +0 -2
  31. package/dist/chunks/MarkdownTableRow-DuJaPntg.js +0 -2
  32. package/dist/chunks/MarkdownTableSection-PFHz-R33.js +0 -2
  33. package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js +0 -2
  34. package/dist/chunks/{MarkdownToc-BdOHF-Yo.js → MarkdownToc-DHWWoH6t.js} +1 -3
  35. package/dist/chunks/MarkdownTocItem-DT9mR3vL.js +0 -2
  36. package/dist/chunks/{MermaidLiveEditor-W-qf3G-5.js → MermaidLiveEditor-1TKkI5bp.js} +1 -3
  37. package/dist/chunks/{VueSyntaxHighlighter-DyLsYMwy.js → VueSyntaxHighlighter-BWpCO-cX.js} +1 -3
  38. package/dist/chunks/adapters-CMwX_NEI.js +0 -2
  39. package/dist/chunks/{blank-line-Cb-JBP_5.js → blank-line-CKKsFeKR.js} +1 -3
  40. package/dist/chunks/codemirror-DyphMAEg.js +0 -2
  41. package/dist/chunks/config-aRYo2R8_.js +0 -2
  42. package/dist/chunks/context-8NfW6fxI.js +0 -2
  43. package/dist/chunks/convert-hast-C4Rg2ZuF.js +6 -0
  44. package/dist/chunks/default-ZQ5aHh-N.js +3 -0
  45. package/dist/chunks/diagnostics-CtHoJyiX.js +0 -2
  46. package/dist/chunks/{export-DZQ3cUry.js → export-BrgMLgUp.js} +13 -14
  47. package/dist/chunks/hast-to-nodes-DuZsi4XT.js +29 -0
  48. package/dist/chunks/{lib-BQiWGWpu.js → hast-util-from-html-D3e_iQ89.js} +495 -494
  49. package/dist/chunks/highlightjs-BxJFpKS1.js +196 -0
  50. package/dist/chunks/{identity-jZEhX2d5.js → identity-Bi27FKyx.js} +7 -8
  51. package/dist/chunks/labels-BtHiUTQI.js +0 -2
  52. package/dist/chunks/lib-CCnkLL6S.js +252 -0
  53. package/dist/chunks/longest-streak-DZE_EqsU.js +0 -2
  54. package/dist/chunks/{micromark-factory-space-Db040TnW.js → micromark-factory-space-CpXAnYUY.js} +2 -4
  55. package/dist/chunks/{normalize-CRYv3Wqt.js → normalize-VKfQXZiK.js} +57 -51
  56. package/dist/chunks/{plugin-DqkFHyny.js → plugin-YWo5uqTh.js} +1 -2
  57. package/dist/chunks/preset-BjaOuJUL.js +0 -2
  58. package/dist/chunks/{registry-DLjr93-V.js → registry-B7BfEkuy.js} +1051 -1045
  59. package/dist/chunks/{render-Cs8iKrgz.js → render-DAqK0w5J.js} +524 -494
  60. package/dist/chunks/{default-DWVS-I_8.js → rolldown-runtime-QGRDbDUS.js} +1 -5
  61. package/dist/chunks/{runtime-DJMnzjah.js → runtime-D95F41zG.js} +145 -117
  62. package/dist/chunks/security-y4EwUyAs.js +0 -2
  63. package/dist/chunks/{shared-DNAvZ-UY.js → shared-NjFDPmkb.js} +18 -27
  64. package/dist/chunks/{space-separated-tokens-CmBjEPdR.js → space-separated-tokens-1ebNqf35.js} +1 -3
  65. package/dist/chunks/url-D2BoivaE.js +0 -2
  66. package/dist/chunks/{useActiveHeading-BaGVMJnB.js → useActiveHeading-CnyGTG1u.js} +165 -122
  67. package/dist/components/CodeBlock.js +1 -1
  68. package/dist/components/MarkdownCustomTag.js +1 -1
  69. package/dist/components/MarkdownMath.js +1 -1
  70. package/dist/components/MarkdownMermaid.d.ts +3 -3
  71. package/dist/components/MarkdownMermaid.js +1 -1
  72. package/dist/components/MarkdownRenderer.d.ts +16 -19
  73. package/dist/components/MarkdownRenderer.js +1 -1
  74. package/dist/components/MarkdownToc.js +1 -1
  75. package/dist/components/MermaidBlock.js +1 -1
  76. package/dist/components/MermaidLiveEditor.js +1 -1
  77. package/dist/components/VueSyntaxHighlighter.js +1 -1
  78. package/dist/components/context.d.ts +2 -2
  79. package/dist/components/index.js +6 -6
  80. package/dist/components/types.d.ts +34 -2
  81. package/dist/composables/useMarkdownDocument.d.ts +2 -0
  82. package/dist/core/hast-nodes.d.ts +0 -3
  83. package/dist/core/hast-to-nodes.d.ts +9 -0
  84. package/dist/core/normalize.d.ts +10 -0
  85. package/dist/core/parts.d.ts +1 -0
  86. package/dist/core/slugger.d.ts +7 -0
  87. package/dist/core/types.d.ts +3 -1
  88. package/dist/headless.js +8 -8
  89. package/dist/highlight/convert-hast.d.ts +8 -0
  90. package/dist/highlight/index.d.ts +2 -1
  91. package/dist/highlight/index.js +4 -3
  92. package/dist/highlight/shared.d.ts +0 -5
  93. package/dist/highlight/shiki.js +2 -3
  94. package/dist/html/index.js +0 -2
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +47 -49
  97. package/dist/math/index.js +18 -16
  98. package/dist/mermaid/index.d.ts +2 -1
  99. package/dist/mermaid/index.js +8 -3
  100. package/dist/mermaid/plugin.d.ts +3 -0
  101. package/dist/mermaid/runtime.d.ts +3 -1
  102. package/dist/mermaid/sanitize-svg-lazy.d.ts +10 -0
  103. package/dist/mermaid/sanitize-svg.d.ts +3 -0
  104. package/dist/mermaid/sanitize.d.ts +6 -2
  105. package/dist/node-components.js +6 -6
  106. package/dist/pipeline.js +1 -1
  107. package/dist/plugins.js +1 -1
  108. package/dist/styles/components.css +25 -0
  109. package/package.json +6 -3
  110. package/dist/chunks/MarkdownBlockquote-DVXziX2t.js.map +0 -1
  111. package/dist/chunks/MarkdownBreak-BwCi2Itt.js.map +0 -1
  112. package/dist/chunks/MarkdownCode-B1k9tmW5.js.map +0 -1
  113. package/dist/chunks/MarkdownConfigProvider-5N3ylrIu.js.map +0 -1
  114. package/dist/chunks/MarkdownContent-BAK6dqo7.js.map +0 -1
  115. package/dist/chunks/MarkdownCustomTag-BBdn3-WO.js +0 -42
  116. package/dist/chunks/MarkdownCustomTag-BBdn3-WO.js.map +0 -1
  117. package/dist/chunks/MarkdownEmphasis-CppivOEu.js.map +0 -1
  118. package/dist/chunks/MarkdownEmpty-Av5k6bqa.js.map +0 -1
  119. package/dist/chunks/MarkdownError-C0sPs5W0.js.map +0 -1
  120. package/dist/chunks/MarkdownFootnoteReference-Dy3Khwyj.js.map +0 -1
  121. package/dist/chunks/MarkdownFootnotes-BRPzkbXv.js.map +0 -1
  122. package/dist/chunks/MarkdownHeading-DaNcP0_6.js.map +0 -1
  123. package/dist/chunks/MarkdownHorizontalRule-QNe_cuUI.js.map +0 -1
  124. package/dist/chunks/MarkdownHtml-66lYkvwM.js.map +0 -1
  125. package/dist/chunks/MarkdownImage-BRy76svs.js.map +0 -1
  126. package/dist/chunks/MarkdownInlineCode-MXZYFwex.js.map +0 -1
  127. package/dist/chunks/MarkdownLink-Dbx3NwgV.js.map +0 -1
  128. package/dist/chunks/MarkdownList-BJ-_C71k.js.map +0 -1
  129. package/dist/chunks/MarkdownListItem-Z1EHIY26.js.map +0 -1
  130. package/dist/chunks/MarkdownLoading-D-RYtXxf.js.map +0 -1
  131. package/dist/chunks/MarkdownParagraph-BxLSmSaG.js.map +0 -1
  132. package/dist/chunks/MarkdownRenderer-DLRRfsdI.js +0 -416
  133. package/dist/chunks/MarkdownRenderer-DLRRfsdI.js.map +0 -1
  134. package/dist/chunks/MarkdownRoot-DEE6iVfh.js.map +0 -1
  135. package/dist/chunks/MarkdownStrikethrough-CblvbqDk.js.map +0 -1
  136. package/dist/chunks/MarkdownStrong-uU5MzAoJ.js.map +0 -1
  137. package/dist/chunks/MarkdownTable-DmBTg_CR.js.map +0 -1
  138. package/dist/chunks/MarkdownTableCell-eiCJe847.js.map +0 -1
  139. package/dist/chunks/MarkdownTableRow-DuJaPntg.js.map +0 -1
  140. package/dist/chunks/MarkdownTableSection-PFHz-R33.js.map +0 -1
  141. package/dist/chunks/MarkdownTaskItem-BcmKo1lk.js.map +0 -1
  142. package/dist/chunks/MarkdownToc-BdOHF-Yo.js.map +0 -1
  143. package/dist/chunks/MarkdownTocItem-DT9mR3vL.js.map +0 -1
  144. package/dist/chunks/MermaidLiveEditor-W-qf3G-5.js.map +0 -1
  145. package/dist/chunks/VueSyntaxHighlighter-DyLsYMwy.js.map +0 -1
  146. package/dist/chunks/adapters-CMwX_NEI.js.map +0 -1
  147. package/dist/chunks/blank-line-Cb-JBP_5.js.map +0 -1
  148. package/dist/chunks/codemirror-DyphMAEg.js.map +0 -1
  149. package/dist/chunks/config-aRYo2R8_.js.map +0 -1
  150. package/dist/chunks/context-8NfW6fxI.js.map +0 -1
  151. package/dist/chunks/default-DWVS-I_8.js.map +0 -1
  152. package/dist/chunks/diagnostics-CtHoJyiX.js.map +0 -1
  153. package/dist/chunks/export-DZQ3cUry.js.map +0 -1
  154. package/dist/chunks/hast-nodes-C0bX3M5Z.js +0 -35
  155. package/dist/chunks/hast-nodes-C0bX3M5Z.js.map +0 -1
  156. package/dist/chunks/highlightjs-BEh-YwEG.js +0 -6041
  157. package/dist/chunks/highlightjs-BEh-YwEG.js.map +0 -1
  158. package/dist/chunks/identity-jZEhX2d5.js.map +0 -1
  159. package/dist/chunks/labels-BtHiUTQI.js.map +0 -1
  160. package/dist/chunks/lib-BQiWGWpu.js.map +0 -1
  161. package/dist/chunks/lib-LwqA_W3J.js +0 -127
  162. package/dist/chunks/lib-LwqA_W3J.js.map +0 -1
  163. package/dist/chunks/longest-streak-DZE_EqsU.js.map +0 -1
  164. package/dist/chunks/micromark-factory-space-Db040TnW.js.map +0 -1
  165. package/dist/chunks/normalize-CRYv3Wqt.js.map +0 -1
  166. package/dist/chunks/plugin-DqkFHyny.js.map +0 -1
  167. package/dist/chunks/preset-BjaOuJUL.js.map +0 -1
  168. package/dist/chunks/registry-DLjr93-V.js.map +0 -1
  169. package/dist/chunks/render-Cs8iKrgz.js.map +0 -1
  170. package/dist/chunks/runtime-DJMnzjah.js.map +0 -1
  171. package/dist/chunks/security-y4EwUyAs.js.map +0 -1
  172. package/dist/chunks/shared-DNAvZ-UY.js.map +0 -1
  173. package/dist/chunks/space-separated-tokens-CmBjEPdR.js.map +0 -1
  174. package/dist/chunks/url-D2BoivaE.js.map +0 -1
  175. package/dist/chunks/useActiveHeading-BaGVMJnB.js.map +0 -1
  176. package/dist/highlight/shiki.js.map +0 -1
  177. package/dist/html/index.js.map +0 -1
  178. package/dist/index.js.map +0 -1
  179. package/dist/math/index.js.map +0 -1
@@ -5,11 +5,11 @@ import { i } from "./adapters-CMwX_NEI.js";
5
5
  import { t as a } from "./asyncToGenerator-ChigusFD.js";
6
6
  import { r as o } from "./config-aRYo2R8_.js";
7
7
  import { n as s, r as c } from "./context-8NfW6fxI.js";
8
- import { a as l, i as u, o as d } from "./shared-DNAvZ-UY.js";
8
+ import { i as l, n as u, r as d } from "./shared-NjFDPmkb.js";
9
9
  import { n as f, t as p } from "./MarkdownCode-B1k9tmW5.js";
10
10
  import { t as m } from "./MarkdownBlockquote-DVXziX2t.js";
11
11
  import { t as h } from "./MarkdownBreak-BwCi2Itt.js";
12
- import { t as g } from "./MarkdownCustomTag-BBdn3-WO.js";
12
+ import { t as g } from "./MarkdownCustomTag-lZJHsD6f.js";
13
13
  import { t as _ } from "./MarkdownEmphasis-CppivOEu.js";
14
14
  import { t as v } from "./MarkdownHeading-DaNcP0_6.js";
15
15
  import { t as y } from "./MarkdownHorizontalRule-QNe_cuUI.js";
@@ -17,37 +17,37 @@ import { t as b } from "./MarkdownImage-BRy76svs.js";
17
17
  import { t as x } from "./MarkdownInlineCode-MXZYFwex.js";
18
18
  import { t as S } from "./MarkdownLink-Dbx3NwgV.js";
19
19
  import { t as C } from "./MarkdownList-BJ-_C71k.js";
20
- import { a as ee, n as te, o as ne, t as re } from "./runtime-DJMnzjah.js";
21
- import { t as ie } from "./MarkdownListItem-Z1EHIY26.js";
22
- import { t as w } from "./MarkdownFootnoteReference-Dy3Khwyj.js";
23
- import { t as T } from "./MarkdownFootnotes-BRPzkbXv.js";
24
- import { t as E } from "./MarkdownParagraph-BxLSmSaG.js";
25
- import { t as D } from "./MarkdownStrikethrough-CblvbqDk.js";
26
- import { t as ae } from "./MarkdownTaskItem-BcmKo1lk.js";
27
- import { t as O } from "./MarkdownStrong-uU5MzAoJ.js";
28
- import { t as oe } from "./MarkdownTable-DmBTg_CR.js";
29
- import { t as se } from "./MarkdownTableCell-eiCJe847.js";
30
- import { t as k } from "./MarkdownTableRow-DuJaPntg.js";
31
- import { t as ce } from "./MarkdownTableSection-PFHz-R33.js";
32
- import { computed as A, createBlock as j, createCommentVNode as le, createElementBlock as M, createElementVNode as ue, createSlots as N, createVNode as P, defineComponent as F, guardReactiveProps as I, h as L, normalizeClass as de, normalizeProps as R, normalizeStyle as fe, onMounted as z, onScopeDispose as B, onUnmounted as pe, openBlock as V, ref as H, renderSlot as U, resolveDynamicComponent as me, shallowRef as W, toDisplayString as he, toValue as G, unref as K, useSlots as ge, watch as _e, withCtx as q } from "vue";
20
+ import { i as ee, n as te, s as ne, t as re } from "./runtime-D95F41zG.js";
21
+ import { t as w } from "./MarkdownListItem-Z1EHIY26.js";
22
+ import { t as T } from "./MarkdownFootnoteReference-Dy3Khwyj.js";
23
+ import { t as E } from "./MarkdownFootnotes-BRPzkbXv.js";
24
+ import { t as D } from "./MarkdownParagraph-BxLSmSaG.js";
25
+ import { t as O } from "./MarkdownStrikethrough-CblvbqDk.js";
26
+ import { t as k } from "./MarkdownTaskItem-BcmKo1lk.js";
27
+ import { t as ie } from "./MarkdownStrong-uU5MzAoJ.js";
28
+ import { t as ae } from "./MarkdownTable-DmBTg_CR.js";
29
+ import { t as A } from "./MarkdownTableCell-eiCJe847.js";
30
+ import { t as oe } from "./MarkdownTableRow-DuJaPntg.js";
31
+ import { t as j } from "./MarkdownTableSection-PFHz-R33.js";
32
+ import { computed as M, createBlock as N, createCommentVNode as se, createElementBlock as P, createElementVNode as ce, createSlots as le, createVNode as F, defineComponent as I, guardReactiveProps as L, h as R, normalizeClass as ue, normalizeProps as z, normalizeStyle as de, onMounted as B, onScopeDispose as V, onUnmounted as fe, openBlock as H, ref as U, renderSlot as W, resolveDynamicComponent as pe, shallowRef as G, toDisplayString as me, toValue as K, unref as q, useSlots as he, watch as ge, withCtx as J } from "vue";
33
33
  // src/composables/useCodeHighlighter.ts
34
- var J;
35
- function Y() {
36
- return J || (J = import("./highlightjs-BEh-YwEG.js").then((e) => e.n).then((e) => e.highlightjs).catch((e) => {
37
- throw J = void 0, e;
38
- })), J;
34
+ var Y;
35
+ function _e() {
36
+ return Y || (Y = import("./highlightjs-BxJFpKS1.js").then((e) => e.n).then((e) => e.highlightjs).catch((e) => {
37
+ throw Y = void 0, e;
38
+ })), Y;
39
39
  }
40
40
  function ve(e) {
41
- let r = A(() => {
41
+ let r = M(() => {
42
42
  var t, n;
43
- return (t = (n = G(e.theme)) == null ? G(e.contextTheme) : n) == null ? "light" : t;
44
- }), i = W(u(G(e.source), G(e.language))), o = W(G(e.highlighter)), s = /* @__PURE__ */ new Set();
43
+ return (t = (n = K(e.theme)) == null ? K(e.contextTheme) : n) == null ? "light" : t;
44
+ }), i = G(u(K(e.source), K(e.language))), o = G(K(e.highlighter)), s = /* @__PURE__ */ new Set();
45
45
  function c(t) {
46
46
  var n;
47
47
  let r = `${t.code}\u001f${t.message}`;
48
48
  s.has(r) || (s.add(r), (n = e.onDiagnostic) == null || n.call(e, t));
49
49
  }
50
- function d() {
50
+ function l() {
51
51
  return r.value === "dark" || r.value === "auto" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
52
52
  }
53
53
  let f = 0, p;
@@ -58,13 +58,13 @@ function ve(e) {
58
58
  return h = a(function* () {
59
59
  var a;
60
60
  let s = ++f;
61
- if (!((a = G(e.enabled)) == null || a)) return;
62
- let p = G(e.highlighter);
61
+ if (!((a = K(e.enabled)) == null || a)) return;
62
+ let p = K(e.highlighter);
63
63
  if (p && typeof p.highlight != "function" && (c(n("highlighter-invalid", "The supplied highlighter does not implement `highlight()`. Falling back to plain text.", {
64
64
  severity: "warning",
65
65
  phase: "render"
66
66
  })), p = void 0), !p) try {
67
- p = yield Y();
67
+ p = yield _e();
68
68
  } catch (e) {
69
69
  c(n("highlighter-unavailable", "The default highlight.js adapter could not be loaded. Install the optional `highlight.js` peer dependency to enable syntax highlighting.", {
70
70
  severity: "warning",
@@ -73,14 +73,14 @@ function ve(e) {
73
73
  }
74
74
  if (s !== f) return;
75
75
  if (!p || typeof p.highlight != "function") {
76
- o.value = void 0, i.value = u(G(e.source), G(e.language));
76
+ o.value = void 0, i.value = u(K(e.source), K(e.language));
77
77
  return;
78
78
  }
79
79
  o.value = p;
80
80
  try {
81
81
  var m, h;
82
82
  yield (m = p.load) == null ? void 0 : m.call(p);
83
- let t = G(e.language);
83
+ let t = K(e.language);
84
84
  t && (yield (h = p.loadLanguage) == null ? void 0 : h.call(p, t));
85
85
  } catch (e) {
86
86
  c(n("highlighter-load", `The highlighter could not prepare this language: ${t(e)}`, {
@@ -89,39 +89,39 @@ function ve(e) {
89
89
  }));
90
90
  }
91
91
  if (s !== f) return;
92
- let g = G(e.source), _ = G(e.language);
93
- i.value = l(p, g, _, {
92
+ let g = K(e.source), _ = K(e.language);
93
+ i.value = d(p, g, _, {
94
94
  theme: r.value,
95
- colorScheme: d()
95
+ colorScheme: l()
96
96
  });
97
97
  }), h.apply(this, arguments);
98
98
  }
99
99
  function g() {
100
100
  var t;
101
101
  p && (clearTimeout(p), p = void 0);
102
- let n = (t = G(e.delay)) == null ? 0 : t;
102
+ let n = (t = K(e.delay)) == null ? 0 : t;
103
103
  return n > 0 ? new Promise((e) => {
104
104
  p = setTimeout(() => {
105
105
  p = void 0, m().then(e);
106
106
  }, n);
107
107
  }) : m();
108
108
  }
109
- _e(() => [G(e.source), G(e.language)], ([e, t]) => {
109
+ ge(() => [K(e.source), K(e.language)], ([e, t]) => {
110
110
  i.value = u(e, t);
111
- }), _e(() => {
111
+ }), ge(() => {
112
112
  var t;
113
113
  return [
114
- G(e.source),
115
- G(e.language),
116
- G(e.highlighter),
114
+ K(e.source),
115
+ K(e.language),
116
+ K(e.highlighter),
117
117
  r.value,
118
- (t = G(e.enabled)) == null || t
118
+ (t = K(e.enabled)) == null || t
119
119
  ];
120
120
  }, () => {
121
121
  g();
122
- }), z(() => {
123
- g();
124
122
  }), B(() => {
123
+ g();
124
+ }), V(() => {
125
125
  f += 1, p && (clearTimeout(p), p = void 0);
126
126
  });
127
127
  function _() {
@@ -136,7 +136,7 @@ function ve(e) {
136
136
  };
137
137
  }
138
138
  // src/core/highlight-lines.ts
139
- function ye(e) {
139
+ function X(e) {
140
140
  let t = /* @__PURE__ */ new Set();
141
141
  for (let n of e == null ? [] : e) {
142
142
  if (typeof n == "number") {
@@ -152,20 +152,20 @@ function ye(e) {
152
152
  return t;
153
153
  }
154
154
  // src/composables/useLineWindow.ts
155
- function be(e) {
156
- let t = A(() => d(G(e.nodes))), n = A(() => t.value.length), r = H(!1), i = H(0), a = H(0), o = H(), s = H(!1), c = A(() => ye(G(e.highlightLines))), l = A(() => {
155
+ function ye(e) {
156
+ let t = M(() => l(K(e.nodes))), n = M(() => t.value.length), r = U(!1), i = U(0), a = U(0), o = U(), s = U(!1), c = M(() => X(K(e.highlightLines))), u = M(() => {
157
157
  var t;
158
- return Math.max(0, (t = G(e.maxLines)) == null ? 0 : t);
159
- }), u = A(() => l.value > 0 && n.value > l.value), f = A(() => u.value && !r.value), p = A(() => f.value ? Math.min(n.value, l.value) : n.value), m = A(() => {
158
+ return Math.max(0, (t = K(e.maxLines)) == null ? 0 : t);
159
+ }), d = M(() => u.value > 0 && n.value > u.value), f = M(() => d.value && !r.value), p = M(() => f.value ? Math.min(n.value, u.value) : n.value), m = M(() => {
160
160
  var t;
161
- return (t = G(e.virtual)) != null && t;
162
- }), h = A(() => {
161
+ return (t = K(e.virtual)) != null && t;
162
+ }), h = M(() => {
163
163
  var t;
164
- return (t = G(e.virtualThreshold)) == null ? 200 : t;
165
- }), g = A(() => {
164
+ return (t = K(e.virtualThreshold)) == null ? 200 : t;
165
+ }), g = M(() => {
166
166
  var t;
167
- return (t = G(e.lineHeight)) == null ? 20 : t;
168
- }), _ = A(() => s.value && m.value && p.value >= h.value), v = A(() => _.value ? Math.max(0, Math.floor(i.value / g.value) - 4) : 0), y = A(() => _.value ? Math.min(p.value, Math.ceil((i.value + a.value) / g.value) + 4) : p.value), b = A(() => {
167
+ return (t = K(e.lineHeight)) == null ? 20 : t;
168
+ }), _ = M(() => s.value && m.value && p.value >= h.value), v = M(() => _.value ? Math.max(0, Math.floor(i.value / g.value) - 4) : 0), y = M(() => _.value ? Math.min(p.value, Math.ceil((i.value + a.value) / g.value) + 4) : p.value), b = M(() => {
169
169
  let e = [];
170
170
  for (let r = v.value; r < y.value; r += 1) {
171
171
  var n;
@@ -189,14 +189,14 @@ function be(e) {
189
189
  function ee(e) {
190
190
  return c.value.has(e + 1);
191
191
  }
192
- return z(() => {
192
+ return B(() => {
193
193
  S(), s.value = !0;
194
- }), _e(() => G(e.source), () => {
194
+ }), ge(() => K(e.source), () => {
195
195
  r.value = !1;
196
196
  }), {
197
197
  highlightedLines: t,
198
198
  expanded: r,
199
- truncatable: u,
199
+ truncatable: d,
200
200
  totalLines: p,
201
201
  virtualActive: _,
202
202
  startLine: v,
@@ -211,7 +211,7 @@ function be(e) {
211
211
  };
212
212
  }
213
213
  // src/components/Icon.ts
214
- var X = {
214
+ var Z = {
215
215
  copy: ["M8 8h12v12H8z", "M4 16V4h12"],
216
216
  check: ["M4 12l5 5L20 6"],
217
217
  download: [
@@ -266,7 +266,7 @@ var X = {
266
266
  "M14 15h6v4h-6z",
267
267
  "M7 9v3h10v3"
268
268
  ]
269
- }, Z = (e) => L("svg", {
269
+ }, be = (e) => R("svg", {
270
270
  class: "vmd-icon",
271
271
  viewBox: "0 0 24 24",
272
272
  "aria-hidden": "true",
@@ -276,7 +276,7 @@ var X = {
276
276
  "stroke-width": 1.8,
277
277
  "stroke-linecap": "round",
278
278
  "stroke-linejoin": "round"
279
- }, X[e.name].map((e) => L("path", { d: e }))), xe = [
279
+ }, Z[e.name].map((e) => R("path", { d: e }))), xe = [
280
280
  "data-vmd-theme",
281
281
  "data-language",
282
282
  "data-highlighter",
@@ -292,7 +292,7 @@ var X = {
292
292
  key: 2,
293
293
  "data-vmd-part": "code-body",
294
294
  class: "vmd-code-body"
295
- }, Ee = /* @__PURE__ */ F({
295
+ }, Ee = /* @__PURE__ */ I({
296
296
  __name: "CodeBlock",
297
297
  props: {
298
298
  node: {},
@@ -340,16 +340,16 @@ var X = {
340
340
  "error"
341
341
  ],
342
342
  setup(i, { expose: l, emit: u }) {
343
- let d = i, p = u, m = c(), h = o(), g = ge(), _ = f({
343
+ let d = i, p = u, m = c(), h = o(), g = he(), _ = f({
344
344
  standalone: () => d.standalone,
345
345
  ignoreRegion: () => d.ignoreRegion
346
- }), v = A(() => {
346
+ }), v = M(() => {
347
347
  var e, t;
348
348
  return d.code === void 0 ? (e = (t = d.node) == null ? void 0 : t.code) == null ? "" : e : d.code;
349
- }), y = A(() => {
349
+ }), y = M(() => {
350
350
  var e, t;
351
351
  return d.language === void 0 ? (e = (t = d.node) == null ? void 0 : t.language) == null ? "" : e : d.language;
352
- }), b = A(() => y.value || "text");
352
+ }), b = M(() => y.value || "text");
353
353
  function x(e) {
354
354
  var t;
355
355
  (t = m.onRenderError) == null || t.call(m, e), p("error", e);
@@ -368,7 +368,7 @@ var X = {
368
368
  },
369
369
  enabled: () => !_.value,
370
370
  onDiagnostic: x
371
- }), { highlightedLines: ne, expanded: re, truncatable: ie, virtualActive: w, startLine: T, endLine: E, totalLines: D, visibleLines: ae, lineHeight: O, scrollRef: oe, onScroll: se, toggle: k, isHighlightedLine: ce } = be({
371
+ }), { highlightedLines: ne, expanded: re, truncatable: w, virtualActive: T, startLine: E, endLine: D, totalLines: O, visibleLines: k, lineHeight: ie, scrollRef: ae, onScroll: A, toggle: oe, isHighlightedLine: j } = ye({
372
372
  nodes: () => S.value.nodes,
373
373
  source: v,
374
374
  maxLines: () => d.maxLines,
@@ -376,15 +376,15 @@ var X = {
376
376
  virtualThreshold: () => d.virtualThreshold,
377
377
  lineHeight: () => d.lineHeight,
378
378
  highlightLines: () => d.highlightLines
379
- }), le = A(() => S.value.mode === "block"), N = A(() => d.lineNumbers || d.highlightLines.length > 0 || d.maxLines > 0 || d.virtual), I = H("idle"), R = A(() => I.value === "copied" ? e(m.labels.copied) : I.value === "failed" ? e(m.labels.copyFailed) : ""), z, B;
380
- pe(() => {
381
- z && clearTimeout(z), B && URL.revokeObjectURL(B);
379
+ }), se = M(() => S.value.mode === "block"), le = M(() => d.lineNumbers || d.highlightLines.length > 0 || d.maxLines > 0 || d.virtual), L = U("idle"), z = M(() => L.value === "copied" ? e(m.labels.copied) : L.value === "failed" ? e(m.labels.copyFailed) : ""), B, V;
380
+ fe(() => {
381
+ B && clearTimeout(B), V && URL.revokeObjectURL(V);
382
382
  });
383
- function W() {
384
- return he.apply(this, arguments);
383
+ function G() {
384
+ return me.apply(this, arguments);
385
385
  }
386
- function he() {
387
- return he = a(function* () {
386
+ function me() {
387
+ return me = a(function* () {
388
388
  let e = v.value;
389
389
  try {
390
390
  if (typeof navigator < "u" && navigator.clipboard) yield navigator.clipboard.writeText(e);
@@ -394,31 +394,31 @@ var X = {
394
394
  let n = document.execCommand("copy");
395
395
  if (t.remove(), n === !1) throw Error("The copy command was rejected.");
396
396
  } else throw Error("Clipboard access is not available.");
397
- p("copy", e), I.value = "copied", z && clearTimeout(z), z = setTimeout(() => {
398
- I.value = "idle";
397
+ p("copy", e), L.value = "copied", B && clearTimeout(B), B = setTimeout(() => {
398
+ L.value = "idle";
399
399
  }, 1500);
400
400
  } catch (e) {
401
- I.value = "failed", x(n("copy-error", `The source could not be copied to the clipboard: ${t(e)}`, {
401
+ L.value = "failed", x(n("copy-error", `The source could not be copied to the clipboard: ${t(e)}`, {
402
402
  severity: "warning",
403
403
  phase: "render"
404
- })), z && clearTimeout(z), z = setTimeout(() => {
405
- I.value = "idle";
404
+ })), B && clearTimeout(B), B = setTimeout(() => {
405
+ L.value = "idle";
406
406
  }, 1500);
407
407
  }
408
- }), he.apply(this, arguments);
408
+ }), me.apply(this, arguments);
409
409
  }
410
- function G() {
411
- return J.apply(this, arguments);
410
+ function K() {
411
+ return Y.apply(this, arguments);
412
412
  }
413
- function J() {
414
- return J = a(function* () {
413
+ function Y() {
414
+ return Y = a(function* () {
415
415
  let e = v.value;
416
416
  if (typeof document < "u" && typeof URL < "u") try {
417
417
  let t = new Blob([e], { type: "text/plain;charset=utf-8" }), n = URL.createObjectURL(t);
418
- B = n;
418
+ V = n;
419
419
  let r = document.createElement("a");
420
420
  r.href = n, r.download = d.fileName || `code.${y.value || "txt"}`, r.click(), setTimeout(() => {
421
- URL.revokeObjectURL(n), B === n && (B = void 0);
421
+ URL.revokeObjectURL(n), V === n && (V = void 0);
422
422
  }, 1e3), p("download", e);
423
423
  } catch (e) {
424
424
  x(n("download-error", `The source could not be downloaded: ${t(e)}`, {
@@ -426,101 +426,101 @@ var X = {
426
426
  phase: "render"
427
427
  }));
428
428
  }
429
- }), J.apply(this, arguments);
429
+ }), Y.apply(this, arguments);
430
430
  }
431
- let Y = A(() => ({
432
- copy: W,
433
- download: G
434
- })), ye = A(() => ({
431
+ let _e = M(() => ({
432
+ copy: G,
433
+ download: K
434
+ })), X = M(() => ({
435
435
  node: d.node,
436
436
  source: v.value,
437
437
  language: y.value,
438
438
  highlighted: S.value,
439
439
  nodes: S.value.nodes,
440
440
  lines: ne.value,
441
- visibleLines: ae.value,
442
- actions: Y.value
443
- })), X = A(() => ({
441
+ visibleLines: k.value,
442
+ actions: _e.value
443
+ })), Z = M(() => ({
444
444
  source: v.value,
445
445
  language: y.value,
446
446
  fileName: d.fileName,
447
447
  title: d.title,
448
448
  highlighted: S.value,
449
449
  nodes: S.value.nodes,
450
- actions: Y.value
451
- })), Ee = A(() => r(r({}, X.value), {}, { label: b.value }));
450
+ actions: _e.value
451
+ })), Ee = M(() => r(r({}, Z.value), {}, { label: b.value }));
452
452
  function De() {
453
453
  let t = [];
454
- w.value && T.value > 0 && t.push(L("div", {
454
+ T.value && E.value > 0 && t.push(R("div", {
455
455
  key: "spacer-top",
456
456
  "aria-hidden": "true",
457
- style: { height: `${T.value * O.value}px` }
457
+ style: { height: `${E.value * ie.value}px` }
458
458
  }));
459
- for (let e of ae.value) {
460
- let n = ce(e.index);
461
- t.push(L("div", {
459
+ for (let e of k.value) {
460
+ let n = j(e.index);
461
+ t.push(R("div", {
462
462
  class: "vmd-highlighter-line",
463
463
  "data-vmd-part": "highlighter-line",
464
464
  "data-line": String(e.index + 1),
465
465
  "data-highlighted": n ? "true" : void 0,
466
466
  key: `line-${e.index}`
467
- }, [d.lineNumbers ? L("span", {
467
+ }, [d.lineNumbers ? R("span", {
468
468
  class: "vmd-highlighter-gutter",
469
469
  "data-vmd-part": "highlighter-gutter",
470
470
  "aria-hidden": "true"
471
- }, String(e.index + 1)) : null, L("code", { class: ["vmd-highlighter-code", y.value ? `language-${y.value}` : void 0] }, $(e.nodes, m))]));
471
+ }, String(e.index + 1)) : null, R("code", { class: ["vmd-highlighter-code", y.value ? `language-${y.value}` : void 0] }, $(e.nodes, m))]));
472
472
  }
473
- return w.value && E.value < D.value && t.push(L("div", {
473
+ return T.value && D.value < O.value && t.push(R("div", {
474
474
  key: "spacer-bottom",
475
475
  "aria-hidden": "true",
476
- style: { height: `${(D.value - E.value) * O.value}px` }
477
- })), ie.value && t.push(L("button", {
476
+ style: { height: `${(O.value - D.value) * ie.value}px` }
477
+ })), w.value && t.push(R("button", {
478
478
  type: "button",
479
479
  class: "vmd-highlighter-toggle",
480
480
  "data-vmd-part": "highlighter-toggle",
481
481
  "aria-expanded": re.value ? "true" : "false",
482
- onClick: k
482
+ onClick: oe
483
483
  }, re.value ? e(m.labels.showLess) : e(m.labels.showAll))), t;
484
484
  }
485
- let Oe = F({ setup() {
486
- return () => m.renderHostSlot("code", ye.value, () => {
485
+ let Oe = I({ setup() {
486
+ return () => m.renderHostSlot("code", X.value, () => {
487
487
  let e = g.code;
488
488
  if (e) {
489
- let t = e(ye.value);
489
+ let t = e(X.value);
490
490
  if (!s(t)) return t;
491
491
  }
492
- return le.value ? $(S.value.nodes, m) : N.value ? De() : $(S.value.nodes, m);
492
+ return se.value ? $(S.value.nodes, m) : le.value ? De() : $(S.value.nodes, m);
493
493
  });
494
- } }), ke = F({ setup() {
495
- return () => m.renderHostSlot("toolbar", X.value, () => {
494
+ } }), ke = I({ setup() {
495
+ return () => m.renderHostSlot("toolbar", Z.value, () => {
496
496
  let r = g.toolbar;
497
497
  if (r) {
498
- let e = r(X.value);
498
+ let e = r(Z.value);
499
499
  if (!s(e)) return e;
500
500
  }
501
- return m.renderHostSlot("code-actions", X.value, () => {
501
+ return m.renderHostSlot("code-actions", Z.value, () => {
502
502
  let r = g["code-actions"];
503
503
  if (r) {
504
- let e = r(X.value);
504
+ let e = r(Z.value);
505
505
  if (!s(e)) return e;
506
506
  }
507
507
  if (!d.showActions && d.actions.length === 0) return null;
508
508
  let i = [];
509
509
  if (d.showActions) {
510
- let t = I.value === "copied" ? e(m.labels.copied) : I.value === "failed" ? e(m.labels.copyFailed) : e(m.labels.copy);
511
- if (i.push(L("button", {
510
+ let t = L.value === "copied" ? e(m.labels.copied) : L.value === "failed" ? e(m.labels.copyFailed) : e(m.labels.copy);
511
+ if (i.push(R("button", {
512
512
  type: "button",
513
513
  class: "vmd-code-action",
514
514
  "data-vmd-part": "code-action",
515
515
  "data-action": "copy",
516
516
  "data-icon": "true",
517
- "data-state": I.value,
517
+ "data-state": L.value,
518
518
  "aria-label": t,
519
519
  title: t,
520
- onClick: W
521
- }, [L(Z, { name: I.value === "copied" ? "check" : "copy" }), L("span", { class: "vmd-visually-hidden" }, t)])), d.showDownload) {
520
+ onClick: G
521
+ }, [R(be, { name: L.value === "copied" ? "check" : "copy" }), R("span", { class: "vmd-visually-hidden" }, t)])), d.showDownload) {
522
522
  let t = e(m.labels.download);
523
- i.push(L("button", {
523
+ i.push(R("button", {
524
524
  type: "button",
525
525
  class: "vmd-code-action",
526
526
  "data-vmd-part": "code-action",
@@ -528,11 +528,11 @@ var X = {
528
528
  "data-icon": "true",
529
529
  "aria-label": t,
530
530
  title: t,
531
- onClick: G
532
- }, [L(Z, { name: "download" }), L("span", { class: "vmd-visually-hidden" }, t)]));
531
+ onClick: K
532
+ }, [R(be, { name: "download" }), R("span", { class: "vmd-visually-hidden" }, t)]));
533
533
  }
534
534
  }
535
- for (let r of d.actions) i.push(L("button", {
535
+ for (let r of d.actions) i.push(R("button", {
536
536
  type: "button",
537
537
  class: "vmd-code-action",
538
538
  "data-vmd-part": "code-action",
@@ -543,8 +543,8 @@ var X = {
543
543
  yield r.run({
544
544
  code: v.value,
545
545
  language: y.value,
546
- copy: W,
547
- download: G
546
+ copy: G,
547
+ download: K
548
548
  }), p("action", r.key);
549
549
  } catch (e) {
550
550
  x(n("action-error", `The "${r.key}" action failed: ${t(e)}`, {
@@ -558,61 +558,61 @@ var X = {
558
558
  };
559
559
  }()
560
560
  }, e(r.label)));
561
- return i.push(L("span", {
561
+ return i.push(R("span", {
562
562
  class: "vmd-code-feedback",
563
563
  "data-vmd-part": "code-feedback",
564
- "data-state": I.value,
564
+ "data-state": L.value,
565
565
  role: "status",
566
566
  "aria-live": "polite"
567
- }, R.value)), i;
567
+ }, z.value)), i;
568
568
  });
569
569
  });
570
- } }), Ae = F({ setup() {
570
+ } }), Ae = I({ setup() {
571
571
  return () => m.renderHostSlot("header", Ee.value, () => {
572
572
  let e = g.header;
573
573
  if (e) {
574
574
  let t = e(Ee.value);
575
575
  if (!s(t)) return t;
576
576
  }
577
- return [L("span", {
577
+ return [R("span", {
578
578
  class: "vmd-code-heading",
579
579
  "data-vmd-part": "code-heading"
580
580
  }, [
581
- L(Z, { name: "source" }),
582
- d.title ? L("span", {
581
+ R(be, { name: "source" }),
582
+ d.title ? R("span", {
583
583
  class: "vmd-code-title",
584
584
  "data-vmd-part": "code-title"
585
585
  }, d.title) : null,
586
- d.fileName ? L("span", {
586
+ d.fileName ? R("span", {
587
587
  class: "vmd-code-file-name",
588
588
  "data-vmd-part": "code-file-name"
589
589
  }, d.fileName) : null,
590
- L("span", {
590
+ R("span", {
591
591
  class: "vmd-code-lang",
592
592
  "data-vmd-part": "code-lang"
593
593
  }, b.value)
594
- ]), L("span", {
594
+ ]), R("span", {
595
595
  class: "vmd-code-toolbar",
596
596
  "data-vmd-part": "code-toolbar"
597
- }, [L(ke)])];
597
+ }, [R(ke)])];
598
598
  });
599
599
  } });
600
- return _e(() => [v.value, y.value], () => {
601
- I.value = "idle";
600
+ return ge(() => [v.value, y.value], () => {
601
+ L.value = "idle";
602
602
  }), l({
603
- copy: W,
604
- download: G,
603
+ copy: G,
604
+ download: K,
605
605
  getHighlighted: te,
606
606
  highlighted: S
607
607
  }), (e, t) => {
608
608
  var n;
609
- return K(_) ? (V(), j(me(K(_)), {
609
+ return q(_) ? (H(), N(pe(q(_)), {
610
610
  key: 0,
611
611
  node: i.node,
612
612
  code: v.value,
613
613
  language: y.value,
614
- theme: K(ee),
615
- highlighter: K(C),
614
+ theme: q(ee),
615
+ highlighter: q(C),
616
616
  actions: i.actions,
617
617
  "show-actions": i.showActions,
618
618
  "show-download": i.showDownload,
@@ -623,14 +623,14 @@ var X = {
623
623
  "max-lines": i.maxLines,
624
624
  virtual: i.virtual,
625
625
  "virtual-threshold": i.virtualThreshold,
626
- "line-height": K(O),
626
+ "line-height": q(ie),
627
627
  delay: i.delay,
628
- highlighted: K(S),
629
- "action-handlers": Y.value,
630
- copy: W,
631
- download: G
628
+ highlighted: q(S),
629
+ "action-handlers": _e.value,
630
+ copy: G,
631
+ download: K
632
632
  }, {
633
- default: q(() => [U(e.$slots, "default")]),
633
+ default: J(() => [W(e.$slots, "default")]),
634
634
  _: 3
635
635
  }, 8, [
636
636
  "node",
@@ -652,27 +652,27 @@ var X = {
652
652
  "delay",
653
653
  "highlighted",
654
654
  "action-handlers"
655
- ])) : (V(), M("div", {
655
+ ])) : (H(), P("div", {
656
656
  key: 1,
657
657
  "data-vmd-part": "code",
658
658
  class: "vmd-code vmd-code-block",
659
- "data-vmd-theme": K(ee),
659
+ "data-vmd-theme": q(ee),
660
660
  "data-language": b.value,
661
- "data-highlighter": (n = K(C)) == null ? void 0 : n.id,
662
- "data-virtual": K(w) ? "true" : void 0
663
- }, [ue("div", Se, [P(K(Ae))]), le.value ? (V(), M("div", Ce, [P(K(Oe))])) : N.value ? (V(), M("div", {
661
+ "data-highlighter": (n = q(C)) == null ? void 0 : n.id,
662
+ "data-virtual": q(T) ? "true" : void 0
663
+ }, [ce("div", Se, [F(q(Ae))]), se.value ? (H(), P("div", Ce, [F(q(Oe))])) : le.value ? (H(), P("div", {
664
664
  key: 1,
665
665
  ref_key: "scrollRef",
666
- ref: oe,
666
+ ref: ae,
667
667
  "data-vmd-part": "code-body",
668
668
  class: "vmd-code-body vmd-code-lines",
669
- "data-virtual": K(w) ? "true" : void 0,
670
- style: fe(K(w) ? {
671
- maxHeight: `${K(O) * 20}px`,
669
+ "data-virtual": q(T) ? "true" : void 0,
670
+ style: de(q(T) ? {
671
+ maxHeight: `${q(ie) * 20}px`,
672
672
  overflow: "auto"
673
673
  } : void 0),
674
- onScroll: t[0] || (t[0] = (...e) => K(se) && K(se)(...e))
675
- }, [P(K(Oe))], 44, we)) : (V(), M("pre", Te, [ue("code", { class: de(["vmd-code-element", y.value ? `language-${y.value}` : void 0]) }, [P(K(Oe))], 2)]))], 8, xe));
674
+ onScroll: t[0] || (t[0] = (...e) => q(A) && q(A)(...e))
675
+ }, [F(q(Oe))], 44, we)) : (H(), P("pre", Te, [ce("code", { class: ue(["vmd-code-element", y.value ? `language-${y.value}` : void 0]) }, [F(q(Oe))], 2)]))], 8, xe));
676
676
  };
677
677
  }
678
678
  }), De = [
@@ -684,7 +684,7 @@ var X = {
684
684
  "data-vmd-part": "math-error",
685
685
  class: "vmd-math-error",
686
686
  role: "status"
687
- }, ke = /* @__PURE__ */ F({
687
+ }, ke = /* @__PURE__ */ I({
688
688
  __name: "MarkdownMath",
689
689
  props: {
690
690
  node: {},
@@ -695,19 +695,19 @@ var X = {
695
695
  mathEngine: {}
696
696
  },
697
697
  setup(t) {
698
- let r = t, i = c(), a = A(() => {
698
+ let r = t, i = c(), a = M(() => {
699
699
  var e, t;
700
700
  return (e = r.tex) == null ? ((t = r.node) == null ? void 0 : t.kind) === "math" ? r.node.tex : "" : e;
701
- }), o = A(() => {
701
+ }), o = M(() => {
702
702
  var e, t;
703
703
  return (e = r.displayMode) == null ? ((t = r.node) == null ? void 0 : t.kind) === "math" && r.node.displayMode : e;
704
- }), s = A(() => {
704
+ }), s = M(() => {
705
705
  var e, t;
706
706
  return (e = r.rendered) == null ? ((t = r.node) == null ? void 0 : t.kind) === "math" ? r.node.rendered : [] : e;
707
- }), l = A(() => {
707
+ }), l = M(() => {
708
708
  var e;
709
709
  return (e = r.mathEngine) == null ? i.mathEngine : e;
710
- }), u = A(() => {
710
+ }), u = M(() => {
711
711
  if (l.value) try {
712
712
  return l.value.render(a.value, { displayMode: o.value });
713
713
  } catch (e) {
@@ -720,7 +720,7 @@ var X = {
720
720
  error: e instanceof Error ? e.message : String(e)
721
721
  };
722
722
  }
723
- }), d = A(() => !l.value && (s.value === void 0 || s.value.length === 0) && a.value !== ""), f = A(() => {
723
+ }), d = M(() => !l.value && (s.value === void 0 || s.value.length === 0) && a.value !== ""), f = M(() => {
724
724
  var e, t, n;
725
725
  let r = (e = (t = (n = u.value) == null ? void 0 : n.nodes) == null ? s.value : t) == null ? [] : e;
726
726
  return r.length > 0 ? r : d.value ? [{
@@ -738,10 +738,10 @@ var X = {
738
738
  if (e) return e;
739
739
  }
740
740
  }
741
- let m = A(() => u.value ? void 0 : p(s.value)), h = A(() => {
741
+ let m = M(() => u.value ? void 0 : p(s.value)), h = M(() => {
742
742
  var e, t, n;
743
743
  return (e = (t = r.error) == null ? (n = u.value) == null ? void 0 : n.error : t) == null ? m.value : e;
744
- }), g = A(() => e(i.labels.math, { tex: a.value })), _ = !1;
744
+ }), g = M(() => e(i.labels.math, { tex: a.value })), _ = !1;
745
745
  function v() {
746
746
  if (!_) {
747
747
  if (h.value) {
@@ -760,28 +760,28 @@ var X = {
760
760
  }
761
761
  }
762
762
  }
763
- z(v), _e([h, d], v);
764
- let y = F({ setup() {
763
+ B(v), ge([h, d], v);
764
+ let y = I({ setup() {
765
765
  return () => i.renderHostSlot("math", {
766
766
  tex: a.value,
767
767
  displayMode: o.value,
768
768
  rendered: f.value,
769
769
  error: h.value
770
770
  }, () => $(f.value, i));
771
- } }), b = F({ setup() {
771
+ } }), b = I({ setup() {
772
772
  return () => i.renderHostSlot("math-error", {
773
773
  tex: a.value,
774
774
  error: h.value,
775
775
  retry: () => void 0
776
- }, () => L("span", { class: "vmd-math-fallback" }, a.value));
776
+ }, () => R("span", { class: "vmd-math-fallback" }, a.value));
777
777
  } });
778
- return (e, t) => (V(), M("span", {
778
+ return (e, t) => (H(), P("span", {
779
779
  "data-vmd-part": "math",
780
780
  class: "vmd-math",
781
781
  "data-display": o.value ? "true" : "false",
782
782
  "data-error": h.value ? "true" : void 0,
783
783
  "aria-label": g.value
784
- }, [h.value ? (V(), M("span", Oe, [P(K(b))])) : (V(), j(K(y), { key: 1 }))], 8, De));
784
+ }, [h.value ? (H(), P("span", Oe, [F(q(b))])) : (H(), N(q(y), { key: 1 }))], 8, De));
785
785
  }
786
786
  }), Ae = [
787
787
  "data-vmd-theme",
@@ -805,7 +805,7 @@ var X = {
805
805
  key: 1,
806
806
  "data-vmd-part": "mermaid-source",
807
807
  class: "vmd-mermaid-source"
808
- }, Ie = "Renderer returned no usable diagram output.", Le = /* @__PURE__ */ F({
808
+ }, Ie = "The Mermaid renderer returned an invalid result. Return an object such as `{ nodes }` or `{ svg }` from `render()`.", Le = "The Mermaid renderer returned no diagram nodes or SVG. Return `{ nodes }` or `{ svg }`, or remove the custom renderer to use the built-in runtime.", Re = "The Mermaid renderer returned SVG that sanitization rejected completely. Return safe SVG markup or sanitized `nodes` instead.", ze = "Mermaid produced no renderable diagram output. Check the diagram syntax and the installed `mermaid` version.", Be = "Mermaid produced SVG that sanitization rejected completely. Check the diagram syntax and the installed `mermaid` version.", Ve = "Mermaid source must be a string. If you used `renderMermaid()`, await its result before passing it as the source.", He = /* @__PURE__ */ I({
809
809
  __name: "MermaidBlock",
810
810
  props: {
811
811
  node: { default: void 0 },
@@ -839,96 +839,111 @@ var X = {
839
839
  "action"
840
840
  ],
841
841
  setup(o, { expose: l, emit: u }) {
842
- let d = o, f = u, p = c(), m = ge(), h = A(() => {
842
+ let d = o, f = u, p = c(), m = he(), h = M(() => {
843
843
  var e, t;
844
844
  return (e = d.source) == null ? ((t = d.node) == null ? void 0 : t.kind) === "mermaid" ? d.node.code : "" : e;
845
- }), g = A(() => {
845
+ }), g = M(() => typeof h.value == "string" ? h.value : ""), _ = M(() => {
846
846
  var e, t;
847
847
  return (e = (t = d.theme) == null ? p.theme : t) == null ? "light" : e;
848
- }), _ = H("idle"), v = W(), y = W(), b = H(""), x = H("preview"), S = H(1), C = H(!1), ie = H(), w = H(!1), T = !1, E, D = A(() => d.renderer && i(d.renderer) ? d.renderer : p.mermaidRenderer), ae = A(() => D.value && i(D.value) ? D.value.id : "mermaid"), O = A(() => e(p.labels.mermaid, { source: h.value })), oe = 0;
849
- function se(e) {
850
- var t;
851
- if (!e || typeof e != "object") return {
852
- nodes: [],
853
- error: Ie
854
- };
855
- let n = typeof e.svg == "string" && e.svg ? e.svg : void 0, i = Array.isArray(e.nodes) ? ee(e.nodes) : [];
856
- if (i.length > 0) return r(r({}, e), {}, {
857
- svg: n,
858
- nodes: i
859
- });
860
- if (n) {
861
- let t = ne(n);
862
- if (t.length > 0) return r(r({}, e), {}, {
848
+ }), v = U("idle"), y = G(), b = G(), x = U(""), S = U("preview"), C = U(1), w = U(!1), T = U(), E = U(!1), D = !1, O, k = M(() => d.renderer && i(d.renderer) ? d.renderer : p.mermaidRenderer), ie = M(() => k.value && i(k.value) ? k.value.id : "mermaid"), ae = M(() => e(p.labels.mermaid, { source: g.value })), A = 0;
849
+ function oe(e) {
850
+ return j.apply(this, arguments);
851
+ }
852
+ function j() {
853
+ return j = a(function* (e) {
854
+ var t;
855
+ if (!e || typeof e != "object") return {
856
+ nodes: [],
857
+ error: Ie
858
+ };
859
+ let n = typeof e.svg == "string" && e.svg ? e.svg : void 0, i = Array.isArray(e.nodes) ? ne(e.nodes) : [];
860
+ if (i.length > 0) return r(r({}, e), {}, {
863
861
  svg: n,
864
- nodes: t
862
+ nodes: i
865
863
  });
866
- }
867
- return r(r({}, e), {}, {
868
- svg: n,
869
- nodes: [],
870
- error: (t = e.error) == null ? Ie : t
871
- });
864
+ if (n) {
865
+ var a;
866
+ let t = yield ee(n);
867
+ return t.length > 0 ? r(r({}, e), {}, {
868
+ svg: n,
869
+ nodes: t
870
+ }) : r(r({}, e), {}, {
871
+ svg: n,
872
+ nodes: [],
873
+ error: (a = e.error) == null ? Re : a
874
+ });
875
+ }
876
+ return r(r({}, e), {}, {
877
+ svg: n,
878
+ nodes: [],
879
+ error: (t = e.error) == null ? Le : t
880
+ });
881
+ }), j.apply(this, arguments);
872
882
  }
873
- function k() {
874
- return ce.apply(this, arguments);
883
+ function N() {
884
+ return le.apply(this, arguments);
875
885
  }
876
- function ce() {
877
- return ce = a(function* () {
878
- let e = ++oe;
879
- _.value = "pending", b.value = "";
880
- let t = D.value, a = re(), o;
881
- if (t && i(t)) try {
882
- o = se(yield t.render(h.value, {
883
- theme: g.value,
884
- id: a
886
+ function le() {
887
+ return le = a(function* () {
888
+ if (!D) return;
889
+ let e = ++A;
890
+ v.value = "pending", x.value = "", C.value = 1;
891
+ let a = k.value, o = re(), s;
892
+ if (typeof h.value != "string") s = {
893
+ nodes: [],
894
+ error: Ve
895
+ };
896
+ else if (a && i(a)) try {
897
+ s = yield oe(yield a.render(g.value, {
898
+ theme: _.value,
899
+ id: o
885
900
  }));
886
901
  } catch (e) {
887
- o = {
902
+ s = {
888
903
  nodes: [],
889
- error: e instanceof Error ? e.message : String(e)
904
+ error: `The Mermaid renderer failed: ${t(e)}`
890
905
  };
891
906
  }
892
907
  else {
893
- let e = yield te(h.value, {
894
- theme: g.value,
895
- id: a
908
+ let e = yield te(g.value, {
909
+ theme: _.value,
910
+ id: o
896
911
  });
897
- o = e.error || e.nodes.length > 0 ? e : r(r({}, e), {}, { error: Ie });
912
+ s = e.error || e.nodes.length > 0 ? e : r(r({}, e), {}, { error: e.svg ? Be : ze });
898
913
  }
899
- if (e === oe) {
900
- if (v.value = o, o.error) {
901
- var s;
902
- _.value = "error", b.value = o.error, f("error", o.error);
903
- let e = o.error.indexOf("Mermaid is not available") !== -1;
904
- (s = p.onRenderError) == null || s.call(p, n(e ? "mermaid-unavailable" : "mermaid-error", o.error, { phase: "render" }));
905
- } else _.value = "ready", y.value = o, f("rendered", o);
914
+ if (D && e === A) {
915
+ if (y.value = s, s.error) {
916
+ var c;
917
+ v.value = "error", x.value = s.error, f("error", s.error);
918
+ let e = s.error.indexOf("Mermaid is not available") !== -1;
919
+ (c = p.onRenderError) == null || c.call(p, n(e ? "mermaid-unavailable" : "mermaid-error", s.error, { phase: "render" }));
920
+ } else v.value = "ready", b.value = s, f("rendered", s);
906
921
  }
907
- }), ce.apply(this, arguments);
922
+ }), le.apply(this, arguments);
908
923
  }
909
- z(() => {
910
- T = !0, k();
911
- }), pe(() => {
912
- T = !1, E && clearTimeout(E), typeof document < "u" && document.removeEventListener("keydown", B);
913
- }), _e(() => [
914
- h.value,
915
- D.value,
916
- g.value
924
+ B(() => {
925
+ D = !0, N();
926
+ }), fe(() => {
927
+ D = !1, A += 1, O && clearTimeout(O), typeof document < "u" && document.removeEventListener("keydown", pe);
928
+ }), ge(() => [
929
+ g.value,
930
+ k.value,
931
+ _.value
917
932
  ], () => {
918
- T && k();
933
+ D && N();
919
934
  });
920
- function j() {
921
- return N.apply(this, arguments);
935
+ function L() {
936
+ return ue.apply(this, arguments);
922
937
  }
923
- function N() {
924
- return N = a(function* () {
938
+ function ue() {
939
+ return ue = a(function* () {
925
940
  try {
926
- typeof navigator < "u" && navigator.clipboard && (yield navigator.clipboard.writeText(h.value)), w.value = !0, f("copy", h.value), E && clearTimeout(E), E = setTimeout(() => {
927
- w.value = !1;
941
+ typeof navigator < "u" && navigator.clipboard && (yield navigator.clipboard.writeText(g.value)), E.value = !0, f("copy", g.value), O && clearTimeout(O), O = setTimeout(() => {
942
+ E.value = !1;
928
943
  }, 1500);
929
944
  } catch (r) {
930
945
  var e;
931
- w.value = !1;
946
+ E.value = !1;
932
947
  let i = `The source could not be copied to the clipboard: ${t(r)}`;
933
948
  f("error", i), (e = p.onRenderError) == null || e.call(p, n("copy-error", i, {
934
949
  severity: "warning",
@@ -936,20 +951,20 @@ var X = {
936
951
  plugin: "mermaid"
937
952
  }));
938
953
  }
939
- }), N.apply(this, arguments);
954
+ }), ue.apply(this, arguments);
940
955
  }
941
- function I(e, t) {
956
+ function z(e, t) {
942
957
  if (typeof document > "u" || typeof URL > "u") return;
943
958
  let n = URL.createObjectURL(e), r = document.createElement("a");
944
959
  r.href = n, r.download = t, r.click(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
945
960
  }
946
961
  function de() {
947
- return R.apply(this, arguments);
962
+ return V.apply(this, arguments);
948
963
  }
949
- function R() {
950
- return R = a(function* () {
964
+ function V() {
965
+ return V = a(function* () {
951
966
  var e;
952
- let t = (e = y.value) == null ? void 0 : e.svg;
967
+ let t = (e = b.value) == null ? void 0 : e.svg;
953
968
  if (t && typeof document < "u" && typeof Image < "u") try {
954
969
  var n;
955
970
  let e = URL.createObjectURL(new Blob([t], { type: "image/svg+xml" })), r = new Image();
@@ -959,25 +974,25 @@ var X = {
959
974
  let i = document.createElement("canvas");
960
975
  i.width = r.width || 800, i.height = r.height || 600, (n = i.getContext("2d")) == null || n.drawImage(r, 0, 0), URL.revokeObjectURL(e);
961
976
  let a = yield new Promise((e) => i.toBlob(e, "image/png"));
962
- a && (I(a, "diagram.png"), f("export", "png"));
977
+ a && (z(a, "diagram.png"), f("export", "png"));
963
978
  } catch (e) {}
964
- }), R.apply(this, arguments);
979
+ }), V.apply(this, arguments);
965
980
  }
966
- function fe() {
981
+ function W() {
967
982
  var e;
968
- let t = (e = y.value) == null ? void 0 : e.svg;
969
- t && (I(new Blob([t], { type: "image/svg+xml" }), "diagram.svg"), f("export", "svg"));
983
+ let t = (e = b.value) == null ? void 0 : e.svg;
984
+ t && (z(new Blob([t], { type: "image/svg+xml" }), "diagram.svg"), f("export", "svg"));
970
985
  }
971
- function B(e) {
972
- e.key === "Escape" && C.value && U(!1);
986
+ function pe(e) {
987
+ e.key === "Escape" && w.value && K(!1);
973
988
  }
974
- function U() {
975
- return me.apply(this, arguments);
989
+ function K() {
990
+ return J.apply(this, arguments);
976
991
  }
977
- function me() {
978
- return me = a(function* (e = !C.value) {
992
+ function J() {
993
+ return J = a(function* (e = !w.value) {
979
994
  if (!d.allowFullscreen) return;
980
- let t = ie.value;
995
+ let t = T.value;
981
996
  if (typeof document < "u") {
982
997
  if (e) {
983
998
  var n;
@@ -985,48 +1000,65 @@ var X = {
985
1000
  var r;
986
1001
  yield t == null || (r = t.requestFullscreen) == null ? void 0 : r.call(t);
987
1002
  } catch (e) {}
988
- if (!T) return;
989
- C.value = !0, document.addEventListener("keydown", B), t == null || (n = t.focus) == null || n.call(t);
1003
+ if (!D) return;
1004
+ w.value = !0, document.addEventListener("keydown", pe), t == null || (n = t.focus) == null || n.call(t);
990
1005
  } else {
991
1006
  try {
992
1007
  document.fullscreenElement && (yield document.exitFullscreen());
993
1008
  } catch (e) {}
994
- if (!T) return;
995
- C.value = !1, document.removeEventListener("keydown", B);
1009
+ if (!D) return;
1010
+ w.value = !1, document.removeEventListener("keydown", pe);
996
1011
  }
997
- f("fullscreen", C.value);
1012
+ f("fullscreen", w.value);
998
1013
  }
999
- }), me.apply(this, arguments);
1014
+ }), J.apply(this, arguments);
1000
1015
  }
1001
- function G(e) {
1002
- S.value = Math.min(4, Math.max(.25, Number((S.value + e).toFixed(2))));
1016
+ function Y(e) {
1017
+ C.value = Math.min(4, Math.max(.25, Number((C.value + e).toFixed(2))));
1003
1018
  }
1004
- function q() {
1005
- S.value = 1;
1019
+ function _e() {
1020
+ C.value = 1;
1006
1021
  }
1007
- function J() {
1008
- x.value = "preview";
1022
+ function ve() {
1023
+ return R("button", {
1024
+ type: "button",
1025
+ class: "vmd-mermaid-retry",
1026
+ "data-vmd-part": "mermaid-retry",
1027
+ "data-action": "retry",
1028
+ onClick: X
1029
+ }, e(p.labels.retry));
1009
1030
  }
1010
- function Y() {
1011
- x.value = "source";
1031
+ function X() {
1032
+ return ye.apply(this, arguments);
1012
1033
  }
1013
- let ve = A(() => ({
1014
- copy: j,
1034
+ function ye() {
1035
+ return ye = a(function* () {
1036
+ C.value = 1, yield N();
1037
+ }), ye.apply(this, arguments);
1038
+ }
1039
+ function Z() {
1040
+ S.value = "preview", C.value = 1;
1041
+ }
1042
+ function xe() {
1043
+ S.value = "source";
1044
+ }
1045
+ let Se = M(() => ({
1046
+ copy: L,
1015
1047
  exportPng: de,
1016
- downloadSvg: fe,
1017
- fullscreen: () => U(),
1018
- retry: k,
1019
- zoomIn: () => G(.25),
1020
- zoomOut: () => G(-.25),
1021
- resetZoom: q
1048
+ downloadSvg: W,
1049
+ fullscreen: () => K(),
1050
+ retry: X,
1051
+ zoomIn: () => Y(.25),
1052
+ zoomOut: () => Y(-.25),
1053
+ resetZoom: _e
1022
1054
  }));
1023
- function ye(e) {
1024
- return be.apply(this, arguments);
1055
+ function Ce(e) {
1056
+ return we.apply(this, arguments);
1025
1057
  }
1026
- function be() {
1027
- return be = a(function* (e) {
1058
+ function we() {
1059
+ return we = a(function* (e) {
1028
1060
  try {
1029
- yield e.run(r({ source: h.value }, ve.value)), f("action", e.key);
1061
+ yield e.run(r({ source: g.value }, Se.value)), f("action", e.key);
1030
1062
  } catch (r) {
1031
1063
  var i;
1032
1064
  let a = `The "${e.key}" action failed: ${t(r)}`;
@@ -1036,144 +1068,144 @@ var X = {
1036
1068
  plugin: "mermaid"
1037
1069
  }));
1038
1070
  }
1039
- }), be.apply(this, arguments);
1071
+ }), we.apply(this, arguments);
1040
1072
  }
1041
- let X = A(() => ({
1042
- source: h.value,
1043
- label: O.value,
1044
- view: x.value,
1045
- status: _.value,
1046
- copied: w.value,
1047
- fullscreen: C.value,
1073
+ let Te = M(() => ({
1074
+ source: g.value,
1075
+ label: ae.value,
1076
+ view: S.value,
1077
+ status: v.value,
1078
+ copied: E.value,
1079
+ fullscreen: w.value,
1048
1080
  compact: d.compact,
1049
- actions: ve.value,
1050
- showPreview: J,
1051
- showSource: Y
1052
- })), xe = A(() => ({
1053
- view: x.value,
1054
- status: _.value,
1081
+ actions: Se.value,
1082
+ showPreview: Z,
1083
+ showSource: xe
1084
+ })), Ee = M(() => ({
1085
+ view: S.value,
1086
+ status: v.value,
1055
1087
  actions: {
1056
- preview: J,
1057
- source: Y
1088
+ preview: Z,
1089
+ source: xe
1058
1090
  }
1059
- })), Se = A(() => ({
1060
- source: h.value,
1061
- status: _.value,
1062
- copied: w.value,
1063
- fullscreen: C.value,
1091
+ })), De = M(() => ({
1092
+ source: g.value,
1093
+ status: v.value,
1094
+ copied: E.value,
1095
+ fullscreen: w.value,
1064
1096
  enableZoom: d.enableZoom,
1065
1097
  allowFullscreen: d.allowFullscreen,
1066
1098
  compact: d.compact,
1067
- actions: ve.value
1068
- })), Ce = F({ setup() {
1099
+ actions: Se.value
1100
+ })), Oe = I({ setup() {
1069
1101
  return () => {
1070
1102
  var t;
1071
1103
  return p.renderHostSlot("mermaid", {
1072
- source: h.value,
1073
- svg: (t = y.value) == null ? void 0 : t.svg,
1074
- status: _.value,
1075
- error: b.value,
1104
+ source: g.value,
1105
+ svg: (t = b.value) == null ? void 0 : t.svg,
1106
+ status: v.value,
1107
+ error: x.value,
1076
1108
  actions: {
1077
- copy: j,
1109
+ copy: L,
1078
1110
  exportPng: de,
1079
- fullscreen: () => U(),
1080
- retry: k
1111
+ fullscreen: () => K(),
1112
+ retry: X
1081
1113
  }
1082
1114
  }, () => {
1083
1115
  let t = m.mermaid;
1084
1116
  if (t) {
1085
1117
  var n;
1086
1118
  let e = t({
1087
- source: h.value,
1088
- svg: (n = y.value) == null ? void 0 : n.svg,
1089
- status: _.value,
1090
- error: b.value,
1119
+ source: g.value,
1120
+ svg: (n = b.value) == null ? void 0 : n.svg,
1121
+ status: v.value,
1122
+ error: x.value,
1091
1123
  actions: {
1092
- copy: j,
1124
+ copy: L,
1093
1125
  exportPng: de,
1094
- fullscreen: () => U(),
1095
- retry: k
1126
+ fullscreen: () => K(),
1127
+ retry: X
1096
1128
  }
1097
1129
  });
1098
1130
  if (!s(e)) return e;
1099
1131
  }
1100
- return y.value ? L("div", {
1132
+ return b.value ? R("div", {
1101
1133
  class: "vmd-mermaid-diagram",
1102
- style: { transform: `scale(${S.value})` }
1103
- }, $(y.value.nodes, p)) : _.value === "error" ? d.showErrors ? L("div", {
1134
+ style: { transform: `scale(${C.value})` }
1135
+ }, $(b.value.nodes, p)) : v.value === "error" ? d.showErrors ? R("div", {
1104
1136
  "data-vmd-part": "mermaid-error",
1105
1137
  class: "vmd-mermaid-error",
1106
1138
  role: "status"
1107
- }, b.value) : L("div", {
1139
+ }, [x.value, ve()]) : R("div", {
1108
1140
  "data-vmd-part": "mermaid-fallback",
1109
1141
  class: "vmd-mermaid-fallback",
1110
1142
  role: "status"
1111
- }, e(p.labels.mermaidFallback)) : L("div", {
1143
+ }, [R("span", { class: "vmd-mermaid-fallback-message" }, e(p.labels.mermaidFallback)), ve()]) : R("div", {
1112
1144
  "data-vmd-part": "mermaid-pending",
1113
1145
  class: "vmd-mermaid-pending",
1114
1146
  role: "status"
1115
1147
  }, "Rendering diagram…");
1116
1148
  });
1117
1149
  };
1118
- } }), we = F({ setup() {
1150
+ } }), ke = I({ setup() {
1119
1151
  return () => p.renderHostSlot("mermaid-error", {
1120
- source: h.value,
1121
- error: b.value,
1122
- retry: k,
1123
- focusSource: Y
1152
+ source: g.value,
1153
+ error: x.value,
1154
+ retry: X,
1155
+ focusSource: xe
1124
1156
  }, () => {
1125
1157
  let e = m["mermaid-error"];
1126
1158
  if (e) {
1127
1159
  let t = e({
1128
- source: h.value,
1129
- error: b.value,
1130
- retry: k,
1131
- focusSource: Y
1160
+ source: g.value,
1161
+ error: x.value,
1162
+ retry: X,
1163
+ focusSource: xe
1132
1164
  });
1133
1165
  if (!s(t)) return t;
1134
1166
  }
1135
- return L("div", {
1167
+ return R("div", {
1136
1168
  "data-vmd-part": "mermaid-error",
1137
1169
  class: "vmd-mermaid-error",
1138
1170
  role: "status"
1139
- }, b.value);
1171
+ }, [x.value, ve()]);
1140
1172
  });
1141
- } }), Te = F({ setup() {
1142
- return () => p.renderHostSlot("tabs", xe.value, () => {
1173
+ } }), He = I({ setup() {
1174
+ return () => p.renderHostSlot("tabs", Ee.value, () => {
1143
1175
  let t = m.tabs;
1144
1176
  if (t) {
1145
- let e = t(xe.value);
1177
+ let e = t(Ee.value);
1146
1178
  if (!s(e)) return e;
1147
1179
  }
1148
- return L("div", {
1180
+ return R("div", {
1149
1181
  "data-vmd-part": "mermaid-tabs",
1150
1182
  class: "vmd-mermaid-tabs",
1151
1183
  role: "tablist"
1152
- }, [L("button", {
1184
+ }, [R("button", {
1153
1185
  type: "button",
1154
1186
  role: "tab",
1155
1187
  "data-action": "preview",
1156
- "aria-selected": x.value === "preview" ? "true" : "false",
1157
- "data-active": x.value === "preview" ? "true" : void 0,
1158
- onClick: J
1159
- }, [L(Z, { name: "preview" }), e(p.labels.preview)]), L("button", {
1188
+ "aria-selected": S.value === "preview" ? "true" : "false",
1189
+ "data-active": S.value === "preview" ? "true" : void 0,
1190
+ onClick: Z
1191
+ }, [R(be, { name: "preview" }), e(p.labels.preview)]), R("button", {
1160
1192
  type: "button",
1161
1193
  role: "tab",
1162
1194
  "data-action": "source",
1163
- "aria-selected": x.value === "source" ? "true" : "false",
1164
- "data-active": x.value === "source" ? "true" : void 0,
1165
- onClick: Y
1166
- }, [L(Z, { name: "source" }), e(p.labels.source)])]);
1195
+ "aria-selected": S.value === "source" ? "true" : "false",
1196
+ "data-active": S.value === "source" ? "true" : void 0,
1197
+ onClick: xe
1198
+ }, [R(be, { name: "source" }), e(p.labels.source)])]);
1167
1199
  });
1168
- } }), Ee = F({ setup() {
1169
- return () => p.renderHostSlot("actions", Se.value, () => {
1200
+ } }), Ue = I({ setup() {
1201
+ return () => p.renderHostSlot("actions", De.value, () => {
1170
1202
  let t = m.actions;
1171
1203
  if (t) {
1172
- let e = t(Se.value);
1204
+ let e = t(De.value);
1173
1205
  if (!s(e)) return e;
1174
1206
  }
1175
1207
  if (d.compact) return null;
1176
- let n = w.value ? e(p.labels.copied) : e(p.labels.copy), r = (e, t, n, r) => L("button", {
1208
+ let n = E.value ? e(p.labels.copied) : e(p.labels.copy), r = (e, t, n, r) => R("button", {
1177
1209
  type: "button",
1178
1210
  class: "vmd-mermaid-action",
1179
1211
  "data-vmd-part": "mermaid-action",
@@ -1182,63 +1214,63 @@ var X = {
1182
1214
  "aria-label": t,
1183
1215
  title: t,
1184
1216
  onClick: r
1185
- }, [L(Z, { name: n }), L("span", { class: "vmd-visually-hidden" }, t)]), i = [];
1186
- d.enableZoom && i.push(r("zoom-in", e(p.labels.zoomIn), "zoom-in", () => G(.25)), r("zoom-out", e(p.labels.zoomOut), "zoom-out", () => G(-.25)), r("reset-zoom", e(p.labels.reset), "reset", q)), i.push(r("copy", n, w.value ? "check" : "copy", j), r("export-png", e(p.labels.exportPng), "image", de), r("download-svg", `${e(p.labels.download)} SVG`, "download", fe)), d.allowFullscreen && i.push(r("fullscreen", C.value ? e(p.labels.exitFullscreen) : e(p.labels.fullscreen), C.value ? "exit-fullscreen" : "fullscreen", () => U())), i.push(r("retry", e(p.labels.retry), "retry", k));
1217
+ }, [R(be, { name: n }), R("span", { class: "vmd-visually-hidden" }, t)]), i = [];
1218
+ d.enableZoom && i.push(r("zoom-in", e(p.labels.zoomIn), "zoom-in", () => Y(.25)), r("zoom-out", e(p.labels.zoomOut), "zoom-out", () => Y(-.25)), r("reset-zoom", e(p.labels.reset), "reset", _e)), i.push(r("copy", n, E.value ? "check" : "copy", L), r("export-png", e(p.labels.exportPng), "image", de), r("download-svg", `${e(p.labels.download)} SVG`, "download", W)), d.allowFullscreen && i.push(r("fullscreen", w.value ? e(p.labels.exitFullscreen) : e(p.labels.fullscreen), w.value ? "exit-fullscreen" : "fullscreen", () => K())), i.push(r("retry", e(p.labels.retry), "retry", X));
1187
1219
  for (let t of d.actions) {
1188
1220
  let n = e(t.label);
1189
- i.push(L("button", {
1221
+ i.push(R("button", {
1190
1222
  type: "button",
1191
1223
  class: "vmd-mermaid-action",
1192
1224
  "data-vmd-part": "mermaid-action",
1193
1225
  "data-action": t.key,
1194
- onClick: () => void ye(t)
1226
+ onClick: () => void Ce(t)
1195
1227
  }, n));
1196
1228
  }
1197
- return L("div", {
1229
+ return R("div", {
1198
1230
  "data-vmd-part": "mermaid-actions",
1199
1231
  class: "vmd-mermaid-actions"
1200
1232
  }, i);
1201
1233
  });
1202
- } }), De = F({ setup() {
1203
- return () => p.renderHostSlot("header", X.value, () => {
1234
+ } }), We = I({ setup() {
1235
+ return () => p.renderHostSlot("header", Te.value, () => {
1204
1236
  let e = m.header;
1205
1237
  if (e) {
1206
- let t = e(X.value);
1238
+ let t = e(Te.value);
1207
1239
  if (!s(t)) return t;
1208
1240
  }
1209
1241
  return [
1210
- L("span", { class: "vmd-mermaid-label" }, [L(Z, { name: "diagram" }), O.value]),
1211
- L(Te),
1212
- L(Ee)
1242
+ R("span", { class: "vmd-mermaid-label" }, [R(be, { name: "diagram" }), ae.value]),
1243
+ R(He),
1244
+ R(Ue)
1213
1245
  ];
1214
1246
  });
1215
1247
  } });
1216
1248
  return l({
1217
- render: k,
1218
- copy: j,
1249
+ render: N,
1250
+ copy: L,
1219
1251
  exportPng: de,
1220
- downloadSvg: fe,
1221
- toggleFullscreen: U
1222
- }), (e, t) => (V(), M("div", {
1252
+ downloadSvg: W,
1253
+ toggleFullscreen: K
1254
+ }), (e, t) => (H(), P("div", {
1223
1255
  ref_key: "root",
1224
- ref: ie,
1256
+ ref: T,
1225
1257
  "data-vmd-part": "mermaid",
1226
1258
  class: "vmd-mermaid",
1227
- "data-vmd-theme": g.value,
1228
- "data-status": _.value,
1229
- "data-renderer": ae.value,
1230
- "data-fullscreen": C.value ? "true" : void 0,
1259
+ "data-vmd-theme": _.value,
1260
+ "data-status": v.value,
1261
+ "data-renderer": ie.value,
1262
+ "data-fullscreen": w.value ? "true" : void 0,
1231
1263
  "data-compact": o.compact ? "true" : void 0,
1232
- "data-view": x.value,
1264
+ "data-view": S.value,
1233
1265
  role: "figure",
1234
- "aria-label": O.value,
1266
+ "aria-label": ae.value,
1235
1267
  tabindex: "-1"
1236
- }, [ue("div", {
1268
+ }, [ce("div", {
1237
1269
  class: "vmd-mermaid-surface",
1238
- "data-vmd-part": C.value ? "mermaid-fullscreen" : void 0
1239
- }, [ue("div", Me, [P(K(De))]), x.value === "preview" ? (V(), M("div", Ne, [y.value && _.value === "error" && o.showErrors ? (V(), M("div", Pe, [P(K(we))])) : le("", !0), P(K(Ce))])) : (V(), M("pre", Fe, [ue("code", null, he(h.value), 1)]))], 8, je)], 8, Ae));
1270
+ "data-vmd-part": w.value ? "mermaid-fullscreen" : void 0
1271
+ }, [ce("div", Me, [F(q(We))]), S.value === "preview" ? (H(), P("div", Ne, [b.value && v.value === "error" && o.showErrors ? (H(), P("div", Pe, [F(q(ke))])) : se("", !0), F(q(Oe))])) : (H(), P("pre", Fe, [ce("code", null, me(g.value), 1)]))], 8, je)], 8, Ae));
1240
1272
  }
1241
- }), Re = /* @__PURE__ */ F({
1273
+ }), Ue = /* @__PURE__ */ I({
1242
1274
  __name: "MarkdownMermaid",
1243
1275
  props: {
1244
1276
  node: { default: void 0 },
@@ -1272,10 +1304,10 @@ var X = {
1272
1304
  "action"
1273
1305
  ],
1274
1306
  setup(e, { expose: t, emit: n }) {
1275
- let r = e, i = n, a = c(), o = H(), s = A(() => {
1307
+ let r = e, i = n, a = c(), o = U(), s = M(() => {
1276
1308
  var e, t;
1277
1309
  return (e = r.code) == null ? ((t = r.node) == null ? void 0 : t.kind) === "mermaid" ? r.node.code : "" : e;
1278
- }), l = A(() => {
1310
+ }), l = M(() => {
1279
1311
  var e;
1280
1312
  return (e = a.regions) == null ? void 0 : e.mermaidBlock;
1281
1313
  });
@@ -1305,7 +1337,7 @@ var X = {
1305
1337
  exportPng: f,
1306
1338
  downloadSvg: p,
1307
1339
  toggleFullscreen: m
1308
- }), (t, n) => l.value ? (V(), j(me(l.value), {
1340
+ }), (t, n) => l.value ? (H(), N(pe(l.value), {
1309
1341
  key: 0,
1310
1342
  node: e.node,
1311
1343
  source: s.value,
@@ -1322,30 +1354,30 @@ var X = {
1322
1354
  onExport: n[3] || (n[3] = (e) => i("export", e)),
1323
1355
  onFullscreen: n[4] || (n[4] = (e) => i("fullscreen", e)),
1324
1356
  onAction: n[5] || (n[5] = (e) => i("action", e))
1325
- }, N({ _: 2 }, [
1357
+ }, le({ _: 2 }, [
1326
1358
  t.$slots.header ? {
1327
1359
  name: "header",
1328
- fn: q((e) => [U(t.$slots, "header", R(I(e || {})))]),
1360
+ fn: J((e) => [W(t.$slots, "header", z(L(e || {})))]),
1329
1361
  key: "0"
1330
1362
  } : void 0,
1331
1363
  t.$slots.tabs ? {
1332
1364
  name: "tabs",
1333
- fn: q((e) => [U(t.$slots, "tabs", R(I(e || {})))]),
1365
+ fn: J((e) => [W(t.$slots, "tabs", z(L(e || {})))]),
1334
1366
  key: "1"
1335
1367
  } : void 0,
1336
1368
  t.$slots.actions ? {
1337
1369
  name: "actions",
1338
- fn: q((e) => [U(t.$slots, "actions", R(I(e || {})))]),
1370
+ fn: J((e) => [W(t.$slots, "actions", z(L(e || {})))]),
1339
1371
  key: "2"
1340
1372
  } : void 0,
1341
1373
  t.$slots.mermaid ? {
1342
1374
  name: "mermaid",
1343
- fn: q((e) => [U(t.$slots, "mermaid", R(I(e || {})))]),
1375
+ fn: J((e) => [W(t.$slots, "mermaid", z(L(e || {})))]),
1344
1376
  key: "3"
1345
1377
  } : void 0,
1346
1378
  t.$slots["mermaid-error"] ? {
1347
1379
  name: "mermaid-error",
1348
- fn: q((e) => [U(t.$slots, "mermaid-error", R(I(e || {})))]),
1380
+ fn: J((e) => [W(t.$slots, "mermaid-error", z(L(e || {})))]),
1349
1381
  key: "4"
1350
1382
  } : void 0
1351
1383
  ]), 1064, [
@@ -1358,7 +1390,7 @@ var X = {
1358
1390
  "allow-fullscreen",
1359
1391
  "compact",
1360
1392
  "actions"
1361
- ])) : (V(), j(Le, {
1393
+ ])) : (H(), N(He, {
1362
1394
  key: 1,
1363
1395
  ref_key: "block",
1364
1396
  ref: o,
@@ -1377,30 +1409,30 @@ var X = {
1377
1409
  onExport: n[9] || (n[9] = (e) => i("export", e)),
1378
1410
  onFullscreen: n[10] || (n[10] = (e) => i("fullscreen", e)),
1379
1411
  onAction: n[11] || (n[11] = (e) => i("action", e))
1380
- }, N({ _: 2 }, [
1412
+ }, le({ _: 2 }, [
1381
1413
  t.$slots.header ? {
1382
1414
  name: "header",
1383
- fn: q((e) => [U(t.$slots, "header", R(I(e || {})))]),
1415
+ fn: J((e) => [W(t.$slots, "header", z(L(e || {})))]),
1384
1416
  key: "0"
1385
1417
  } : void 0,
1386
1418
  t.$slots.tabs ? {
1387
1419
  name: "tabs",
1388
- fn: q((e) => [U(t.$slots, "tabs", R(I(e || {})))]),
1420
+ fn: J((e) => [W(t.$slots, "tabs", z(L(e || {})))]),
1389
1421
  key: "1"
1390
1422
  } : void 0,
1391
1423
  t.$slots.actions ? {
1392
1424
  name: "actions",
1393
- fn: q((e) => [U(t.$slots, "actions", R(I(e || {})))]),
1425
+ fn: J((e) => [W(t.$slots, "actions", z(L(e || {})))]),
1394
1426
  key: "2"
1395
1427
  } : void 0,
1396
1428
  t.$slots.mermaid ? {
1397
1429
  name: "mermaid",
1398
- fn: q((e) => [U(t.$slots, "mermaid", R(I(e || {})))]),
1430
+ fn: J((e) => [W(t.$slots, "mermaid", z(L(e || {})))]),
1399
1431
  key: "3"
1400
1432
  } : void 0,
1401
1433
  t.$slots["mermaid-error"] ? {
1402
1434
  name: "mermaid-error",
1403
- fn: q((e) => [U(t.$slots, "mermaid-error", R(I(e || {})))]),
1435
+ fn: J((e) => [W(t.$slots, "mermaid-error", z(L(e || {})))]),
1404
1436
  key: "4"
1405
1437
  } : void 0
1406
1438
  ]), 1032, [
@@ -1415,8 +1447,8 @@ var X = {
1415
1447
  "actions"
1416
1448
  ]));
1417
1449
  }
1418
- }), ze = {
1419
- p: E,
1450
+ }), We = {
1451
+ p: D,
1420
1452
  h1: v,
1421
1453
  h2: v,
1422
1454
  h3: v,
@@ -1424,25 +1456,25 @@ var X = {
1424
1456
  h5: v,
1425
1457
  h6: v,
1426
1458
  em: _,
1427
- strong: O,
1428
- del: D,
1459
+ strong: ie,
1460
+ del: O,
1429
1461
  a: S,
1430
1462
  img: b,
1431
1463
  ul: C,
1432
1464
  ol: C,
1433
- li: ie,
1465
+ li: w,
1434
1466
  blockquote: m,
1435
1467
  hr: y,
1436
- table: oe,
1437
- thead: ce,
1438
- tbody: ce,
1439
- tfoot: ce,
1440
- tr: k,
1441
- th: se,
1442
- td: se,
1468
+ table: ae,
1469
+ thead: j,
1470
+ tbody: j,
1471
+ tfoot: j,
1472
+ tr: oe,
1473
+ th: A,
1474
+ td: A,
1443
1475
  code: x,
1444
1476
  br: h
1445
- }, Be = {
1477
+ }, Ge = {
1446
1478
  p: "paragraph",
1447
1479
  h1: "heading",
1448
1480
  h2: "heading",
@@ -1471,61 +1503,61 @@ var X = {
1471
1503
  br: "break",
1472
1504
  input: "taskItem"
1473
1505
  };
1474
- function Ve(e) {
1506
+ function Ke(e) {
1475
1507
  if (e === "code") return p;
1476
1508
  if (e === "custom") return g;
1477
1509
  if (e === "math") return ke;
1478
- if (e === "mermaid") return Re;
1510
+ if (e === "mermaid") return Ue;
1479
1511
  }
1480
1512
  function Q(e) {
1481
1513
  return typeof e == "string" || typeof e == "object";
1482
1514
  }
1483
- function He(e) {
1515
+ function qe(e) {
1484
1516
  return typeof e == "function";
1485
1517
  }
1486
- function Ue(e) {
1518
+ function Je(e) {
1487
1519
  var t;
1488
- return e.kind === "element" ? (t = Be[e.tag]) == null ? e.tag : t : e.kind;
1520
+ return e.kind === "element" ? (t = Ge[e.tag]) == null ? e.tag : t : e.kind;
1489
1521
  }
1490
- function We(e) {
1522
+ function Ye(e) {
1491
1523
  var t;
1492
1524
  return ((t = e.attrs.class) == null ? "" : t).split(/\s+/).filter(Boolean);
1493
1525
  }
1494
- function Ge(e) {
1526
+ function Xe(e) {
1495
1527
  return e.children.find((e) => e.kind === "element" && e.tag === "input" && e.attrs.type === "checkbox");
1496
1528
  }
1497
- function Ke(e) {
1529
+ function Ze(e) {
1498
1530
  if (e.kind === "element") {
1499
- if (e.tag === "li" && Ge(e)) return "taskItem";
1500
- if (e.tag === "sup" && (We(e).includes("footnote-ref") || e.attrs["data-footnote-ref"] !== void 0 || e.children.some((e) => e.kind === "element" && e.tag === "a" && (We(e).includes("footnote-ref") || e.attrs["data-footnote-ref"] !== void 0)))) return "footnoteReference";
1501
- if (e.tag === "section" && (We(e).includes("footnotes") || e.attrs["data-footnotes"] !== void 0)) return "footnotes";
1531
+ if (e.tag === "li" && Xe(e)) return "taskItem";
1532
+ if (e.tag === "sup" && (Ye(e).includes("footnote-ref") || e.attrs["data-footnote-ref"] !== void 0 || e.children.some((e) => e.kind === "element" && e.tag === "a" && (Ye(e).includes("footnote-ref") || e.attrs["data-footnote-ref"] !== void 0)))) return "footnoteReference";
1533
+ if (e.tag === "section" && (Ye(e).includes("footnotes") || e.attrs["data-footnotes"] !== void 0)) return "footnotes";
1502
1534
  }
1503
1535
  }
1504
- function qe(e, t) {
1505
- for (let n of e) if (n.kind === "element" && n.attrs.id === t || "children" in n && Array.isArray(n.children) && qe(n.children, t)) return !0;
1536
+ function Qe(e, t) {
1537
+ for (let n of e) if (n.kind === "element" && n.attrs.id === t || "children" in n && Array.isArray(n.children) && Qe(n.children, t)) return !0;
1506
1538
  return !1;
1507
1539
  }
1508
- function Je(e) {
1540
+ function $e(e) {
1509
1541
  if (e.kind === "element") for (let n of e.children) {
1510
1542
  var t;
1511
1543
  if (n.kind === "element" && n.tag === "a" && (t = n.attrs.href) != null && t.startsWith("#")) return n.attrs.href.slice(1);
1512
1544
  }
1513
1545
  }
1514
- function Ye(e) {
1546
+ function et(e) {
1515
1547
  if (e.kind === "element") {
1516
- let t = Ue(e);
1548
+ let t = Je(e);
1517
1549
  return t === e.tag ? [e.tag] : [e.tag, t];
1518
1550
  }
1519
1551
  return e.kind === "custom" ? [e.tag, "custom"] : e.kind === "plugin" ? [e.type, "plugin"] : [e.kind];
1520
1552
  }
1521
- function Xe(e, t) {
1522
- for (let r of Ye(e)) {
1553
+ function tt(e, t) {
1554
+ for (let r of et(e)) {
1523
1555
  var n;
1524
1556
  let e = (n = t.nodeComponents) == null ? void 0 : n[r];
1525
- if (He(e)) return e;
1557
+ if (qe(e)) return e;
1526
1558
  }
1527
1559
  }
1528
- function Ze(e, t) {
1560
+ function nt(e, t) {
1529
1561
  if (e.kind === "element" && e.tag === "code") {
1530
1562
  var n;
1531
1563
  let e = (n = t.nodeComponents) == null ? void 0 : n.inlineCode;
@@ -1533,14 +1565,14 @@ function Ze(e, t) {
1533
1565
  let r = t.components.code;
1534
1566
  return typeof r == "function" || Q(r) ? r : void 0;
1535
1567
  }
1536
- let r = Ke(e);
1568
+ let r = Ze(e);
1537
1569
  if (r) {
1538
1570
  var i;
1539
1571
  let e = (i = t.nodeComponents) == null ? void 0 : i[r];
1540
1572
  if (Q(e)) return e;
1541
1573
  }
1542
- let a = Ue(e);
1543
- for (let n of Ye(e)) {
1574
+ let a = Je(e);
1575
+ for (let n of et(e)) {
1544
1576
  var o, s;
1545
1577
  let e = (o = t.nodeComponents) == null ? void 0 : o[n];
1546
1578
  if (Q(e)) return e;
@@ -1552,29 +1584,29 @@ function Ze(e, t) {
1552
1584
  }
1553
1585
  }
1554
1586
  }
1555
- function Qe(e, t) {
1587
+ function rt(e, t) {
1556
1588
  if (!e.segments || e.segments.length === 0) return e.value;
1557
1589
  let n = t.components.mark;
1558
- return e.segments.map((e, t) => e.match ? typeof n == "string" ? L(n, {
1590
+ return e.segments.map((e, t) => e.match ? typeof n == "string" ? R(n, {
1559
1591
  class: "vmd-search-match",
1560
1592
  "data-vmd-part": "search-match",
1561
1593
  key: t
1562
- }, e.value) : typeof n == "object" || typeof n == "function" ? L(n, {
1594
+ }, e.value) : typeof n == "object" || typeof n == "function" ? R(n, {
1563
1595
  class: "vmd-search-match",
1564
1596
  "data-vmd-part": "search-match",
1565
1597
  key: t
1566
- }, { default: () => e.value }) : L("mark", {
1598
+ }, { default: () => e.value }) : R("mark", {
1567
1599
  class: "vmd-search-match",
1568
1600
  "data-vmd-part": "search-match",
1569
1601
  key: t
1570
1602
  }, e.value) : e.value);
1571
1603
  }
1572
- function $e(e, t) {
1604
+ function it(e, t) {
1573
1605
  var n;
1574
1606
  let r = (n = t.nodeComponents) == null ? void 0 : n[e];
1575
1607
  return Q(r) ? r : void 0;
1576
1608
  }
1577
- function et(e) {
1609
+ function at(e) {
1578
1610
  return e.kind === "element" || e.kind === "custom" ? {
1579
1611
  kind: e.kind,
1580
1612
  tag: e.tag,
@@ -1584,36 +1616,36 @@ function et(e) {
1584
1616
  attrs: {}
1585
1617
  };
1586
1618
  }
1587
- function tt(e, t) {
1619
+ function ot(e, t) {
1588
1620
  return () => $(e.children, t);
1589
1621
  }
1590
- var nt = /* @__PURE__ */ new WeakMap();
1591
- function rt(e) {
1592
- let t = nt.get(e);
1622
+ var st = /* @__PURE__ */ new WeakMap();
1623
+ function ct(e) {
1624
+ let t = st.get(e);
1593
1625
  if (t !== void 0) return t;
1594
1626
  let n = e.props, r = Array.isArray(n) ? n.indexOf("children") !== -1 : typeof n == "object" && !!n && Object.prototype.hasOwnProperty.call(n, "children");
1595
- return nt.set(e, r), r;
1627
+ return st.set(e, r), r;
1596
1628
  }
1597
- function it(e, t, n, i, a = {}, o) {
1629
+ function lt(e, t, n, i, a = {}, o) {
1598
1630
  let s = r(r(r({}, i), a), {}, { key: t.key });
1599
- "children" in s && (typeof e == "string" || !rt(e)) && delete s.children;
1631
+ "children" in s && (typeof e == "string" || !ct(e)) && delete s.children;
1600
1632
  let c = o == null ? (() => []) : o;
1601
- return typeof e == "string" ? L(e, s, c) : L(e, r(r({}, s), {}, { node: t }), { default: c });
1633
+ return typeof e == "string" ? R(e, s, c()) : R(e, r(r({}, s), {}, { node: t }), { default: c });
1602
1634
  }
1603
- function at(e, t, n = !1) {
1635
+ function ut(e, t, n = !1) {
1604
1636
  var i, a, o;
1605
1637
  let s = (i = t.nodeComponents) == null ? void 0 : i.code, c = e.language ? `language-${e.language}` : void 0, l = `${e.key}-code`;
1606
- if (!n && He(s)) return s(r(r({ node: e }, et(e)), {}, {
1638
+ if (!n && qe(s)) return s(r(r({ node: e }, at(e)), {}, {
1607
1639
  key: l,
1608
1640
  children: () => [e.code],
1609
- defaultRender: () => at(e, t, !0),
1641
+ defaultRender: () => ut(e, t, !0),
1610
1642
  context: t
1611
1643
  }));
1612
1644
  let u = (a = (o = Q(s) ? s : void 0) == null ? Q(t.components.code) ? t.components.code : void 0 : o) == null ? "code" : a;
1613
- return typeof u == "string" ? L(u, {
1645
+ return typeof u == "string" ? R(u, {
1614
1646
  class: c ? ["vmd-code-element", c] : "vmd-code-element",
1615
1647
  key: l
1616
- }, e.code) : L(u, r({
1648
+ }, e.code) : R(u, r({
1617
1649
  node: e,
1618
1650
  className: c,
1619
1651
  key: l
@@ -1622,103 +1654,101 @@ function at(e, t, n = !1) {
1622
1654
  language: e.language
1623
1655
  } : {}), { default: () => [e.code] });
1624
1656
  }
1625
- function ot(e, t) {
1657
+ function dt(e, t) {
1626
1658
  var n, r;
1627
1659
  let i = t.components.pre;
1628
- return typeof i == "function" || Q(i) ? it(i, e, t, {}, {}, () => [at(e, t)]) : Q(t.components.code) || Q((n = t.nodeComponents) == null ? void 0 : n.code) || He((r = t.nodeComponents) == null ? void 0 : r.code) ? it(p, e, t, {}, {}, () => [at(e, t)]) : L(Ee, {
1660
+ return typeof i == "function" || Q(i) ? lt(i, e, t, {}, {}, () => [ut(e, t)]) : Q(t.components.code) || Q((n = t.nodeComponents) == null ? void 0 : n.code) || qe((r = t.nodeComponents) == null ? void 0 : r.code) ? lt(p, e, t, {}, {}, () => [ut(e, t)]) : R(Ee, {
1629
1661
  node: e,
1630
1662
  key: e.key
1631
1663
  });
1632
1664
  }
1633
- function st(e, t) {
1634
- let n = Ge(e), r = (n == null ? void 0 : n.attrs.checked) !== void 0 && n.attrs.checked !== "false", i = e.children.filter((e) => e !== n);
1635
- return L(ae, {
1665
+ function ft(e, t) {
1666
+ let n = Xe(e), r = (n == null ? void 0 : n.attrs.checked) !== void 0 && n.attrs.checked !== "false", i = e.children.filter((e) => e !== n);
1667
+ return R(k, {
1636
1668
  node: e,
1637
1669
  key: e.key,
1638
1670
  checked: r,
1639
1671
  children: e.children
1640
1672
  }, { default: () => $(i, t) });
1641
1673
  }
1642
- function ct(e, t) {
1643
- return L(T, {
1674
+ function pt(e, t) {
1675
+ return R(E, {
1644
1676
  node: e,
1645
1677
  key: e.key
1646
1678
  }, { default: () => $(e.children, t) });
1647
1679
  }
1648
- function lt(e, t) {
1649
- let n = Je(e), r = n !== void 0 && t.document !== void 0 && !qe(t.document.nodes, n);
1650
- return L(w, {
1680
+ function mt(e, t) {
1681
+ let n = $e(e), r = n !== void 0 && t.document !== void 0 && !Qe(t.document.nodes, n);
1682
+ return R(T, {
1651
1683
  node: e,
1652
1684
  key: e.key,
1653
1685
  missing: r
1654
1686
  }, { default: () => $(e.children, t) });
1655
1687
  }
1656
- function ut(e, t, n) {
1657
- if (n === "taskItem") return st(e, t);
1658
- if (n === "footnotes") return ct(e, t);
1659
- if (n === "footnoteReference") return lt(e, t);
1688
+ function ht(e, t, n) {
1689
+ if (n === "taskItem") return ft(e, t);
1690
+ if (n === "footnotes") return pt(e, t);
1691
+ if (n === "footnoteReference") return mt(e, t);
1660
1692
  }
1661
- function dt(e, t) {
1693
+ function gt(e, t) {
1662
1694
  var n;
1663
- let r = (n = $e(e.tag, t)) == null ? $e("custom", t) : n;
1664
- return it(r == null ? g : r, e, t, e.attrs, {
1695
+ let r = (n = it(e.tag, t)) == null ? it("custom", t) : n;
1696
+ return lt(r == null ? g : r, e, t, e.attrs, {
1665
1697
  tag: e.tag,
1666
1698
  customProps: e.props
1667
- }, tt(e, t));
1699
+ }, ot(e, t));
1668
1700
  }
1669
- function ft(e, t) {
1701
+ function _t(e, t) {
1670
1702
  switch (e.kind) {
1671
- case "text": return Qe(e, t);
1703
+ case "text": return rt(e, t);
1672
1704
  case "element": {
1673
- let n = Ze(e, t);
1705
+ let n = nt(e, t);
1674
1706
  if (!n) {
1675
- let n = Ke(e), r = n ? ut(e, t, n) : void 0;
1707
+ let n = Ze(e), r = n ? ht(e, t, n) : void 0;
1676
1708
  if (r !== void 0) return r;
1677
1709
  }
1678
- let i = n == null ? ze[e.tag] : n;
1710
+ let i = n == null ? We[e.tag] : n;
1679
1711
  if (!i) {
1680
1712
  let n = r({}, e.attrs);
1681
- return delete n.children, L(e.tag, r(r({}, n), {}, { key: e.key }), tt(e, t));
1713
+ return delete n.children, R(e.tag, r(r({}, n), {}, { key: e.key }), ot(e, t)());
1682
1714
  }
1683
- return it(i, e, t, e.attrs, { children: e.children }, tt(e, t));
1715
+ return lt(i, e, t, e.attrs, { children: e.children }, ot(e, t));
1684
1716
  }
1685
- case "code": return ot(e, t);
1686
- case "custom": return dt(e, t);
1717
+ case "code": return dt(e, t);
1718
+ case "custom": return gt(e, t);
1687
1719
  case "math":
1688
1720
  var n, i;
1689
- return it((n = (i = Ze(e, t)) == null ? Ve("math") : i) == null ? "span" : n, e, t, {}, {
1721
+ return lt((n = (i = nt(e, t)) == null ? Ke("math") : i) == null ? "span" : n, e, t, {}, {
1690
1722
  tex: e.tex,
1691
1723
  displayMode: e.displayMode,
1692
1724
  rendered: e.rendered
1693
1725
  });
1694
1726
  case "mermaid":
1695
1727
  var a, o;
1696
- return it((a = (o = Ze(e, t)) == null ? Ve("mermaid") : o) == null ? "pre" : a, e, t, {}, { code: e.code });
1728
+ return lt((a = (o = nt(e, t)) == null ? Ke("mermaid") : o) == null ? "pre" : a, e, t, {}, { code: e.code });
1697
1729
  case "plugin":
1698
1730
  var s, c;
1699
- return it((s = (c = Ze(e, t)) == null ? Ve(e.type) : c) == null ? "div" : s, e, t, {}, { payload: e.payload }, e.children ? () => $(e.children, t) : () => []);
1731
+ return lt((s = (c = nt(e, t)) == null ? Ke(e.type) : c) == null ? "div" : s, e, t, {}, { payload: e.payload }, e.children ? () => $(e.children, t) : () => []);
1700
1732
  default: return null;
1701
1733
  }
1702
1734
  }
1703
- function pt(e, t) {
1704
- if (e.kind === "text") return Qe(e, t);
1735
+ function vt(e, t) {
1736
+ if (e.kind === "text") return rt(e, t);
1705
1737
  if (e.kind !== "code") {
1706
- let n = Xe(e, t);
1738
+ let n = tt(e, t);
1707
1739
  if (n) {
1708
- let i = n, a = e.kind === "element" || e.kind === "custom" ? tt(e, t) : void 0;
1709
- return i(r(r({ node: e }, et(e)), {}, {
1740
+ let i = n, a = e.kind === "element" || e.kind === "custom" ? ot(e, t) : void 0;
1741
+ return i(r(r({ node: e }, at(e)), {}, {
1710
1742
  key: e.key,
1711
1743
  children: () => a ? a() : [],
1712
- defaultRender: () => ft(e, t),
1744
+ defaultRender: () => _t(e, t),
1713
1745
  context: t
1714
1746
  }));
1715
1747
  }
1716
1748
  }
1717
- return ft(e, t);
1749
+ return _t(e, t);
1718
1750
  }
1719
1751
  function $(e, t) {
1720
- return e.map((e) => pt(e, t));
1752
+ return e.map((e) => vt(e, t));
1721
1753
  }
1722
- export { Ee as a, ke as i, Re as n, be as o, Le as r, ve as s, $ as t };
1723
-
1724
- //# sourceMappingURL=render-Cs8iKrgz.js.map
1754
+ export { Ee as a, ke as i, Ue as n, ye as o, He as r, ve as s, $ as t };