zt-react-milkdown 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +149 -0
  2. package/dist/commands-CDrea4WB.cjs +1 -0
  3. package/dist/commands-DoqeX5uJ.js +36 -0
  4. package/dist/debounce-Bqj_3iJs.cjs +1 -0
  5. package/dist/debounce-Cuk3VGPr.js +118 -0
  6. package/dist/dist-BCCSKc3M.cjs +5 -0
  7. package/dist/dist-C0PSMrs7.cjs +37 -0
  8. package/dist/dist-CPVooDwj.cjs +2 -0
  9. package/dist/dist-CxZn1qUo.js +1584 -0
  10. package/dist/dist-Cxaq2crg.js +409 -0
  11. package/dist/dist-DaM7GJv6.js +3499 -0
  12. package/dist/dist-Dhukmh4L.js +7562 -0
  13. package/dist/dist-mOpTMw1E.cjs +1 -0
  14. package/dist/floating-ui.dom-CKbcbmJV.js +883 -0
  15. package/dist/floating-ui.dom-VaZZ2gzS.cjs +1 -0
  16. package/dist/index.browser-5LtNN9G9.cjs +1 -0
  17. package/dist/index.browser-D2DmEB8o.js +26 -0
  18. package/dist/index.cjs +393 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.mjs +43325 -0
  21. package/dist/lib-38nxOnTd.cjs +4 -0
  22. package/dist/lib-8Tr6mAln.cjs +1 -0
  23. package/dist/lib-B0rHJ9lJ.js +28 -0
  24. package/dist/lib-BJgvZywM.cjs +3 -0
  25. package/dist/lib-BNOSyYeU.cjs +3 -0
  26. package/dist/lib-C5AzmhNY.cjs +5 -0
  27. package/dist/lib-C8xOD1Bp.cjs +1 -0
  28. package/dist/lib-CCUU16r8.js +1081 -0
  29. package/dist/lib-CK9MEMX-.js +73 -0
  30. package/dist/lib-D4HMdvmK.cjs +1 -0
  31. package/dist/lib-DWZA8C0h.cjs +1 -0
  32. package/dist/lib-Dbe-cVjv.js +367 -0
  33. package/dist/lib-DkE7Uq2b.js +1886 -0
  34. package/dist/lib-DzK_kn7a.js +21 -0
  35. package/dist/lib-IahjxPWM.cjs +3 -0
  36. package/dist/lib-m8lKZKxK.js +80 -0
  37. package/dist/lib-r5eNG0sa.js +754 -0
  38. package/dist/lib-wmHesNI0.js +2223 -0
  39. package/dist/rolldown-runtime-CerMd-t8.cjs +1 -0
  40. package/dist/rolldown-runtime-DnwLefa7.js +23 -0
  41. package/dist/schema-list-DSdBEAWW.js +171 -0
  42. package/dist/schema-list-bL8FNes5.cjs +1 -0
  43. package/dist/src/components/ui/button.d.ts +16 -0
  44. package/dist/src/components/ui/button.d.ts.map +1 -0
  45. package/dist/src/components/ui/dialog.d.ts +36 -0
  46. package/dist/src/components/ui/dialog.d.ts.map +1 -0
  47. package/dist/src/components/ui/popover.d.ts +14 -0
  48. package/dist/src/components/ui/popover.d.ts.map +1 -0
  49. package/dist/src/core/commands.d.ts +7 -0
  50. package/dist/src/core/commands.d.ts.map +1 -0
  51. package/dist/src/core/createEditor.d.ts +6 -0
  52. package/dist/src/core/createEditor.d.ts.map +1 -0
  53. package/dist/src/core/schema.d.ts +8 -0
  54. package/dist/src/core/schema.d.ts.map +1 -0
  55. package/dist/src/index.d.ts +4 -0
  56. package/dist/src/index.d.ts.map +1 -0
  57. package/dist/src/lib/editor-overlay-position.d.ts +83 -0
  58. package/dist/src/lib/editor-overlay-position.d.ts.map +1 -0
  59. package/dist/src/lib/global-scroll-listener.d.ts +9 -0
  60. package/dist/src/lib/global-scroll-listener.d.ts.map +1 -0
  61. package/dist/src/lib/utils.d.ts +6 -0
  62. package/dist/src/lib/utils.d.ts.map +1 -0
  63. package/dist/src/local/en-US.d.ts +6 -0
  64. package/dist/src/local/en-US.d.ts.map +1 -0
  65. package/dist/src/local/i18n.d.ts +10 -0
  66. package/dist/src/local/i18n.d.ts.map +1 -0
  67. package/dist/src/local/zh-CN.d.ts +6 -0
  68. package/dist/src/local/zh-CN.d.ts.map +1 -0
  69. package/dist/src/plugins/custom/blockquote/blockquote-backspace-lift.d.ts +5 -0
  70. package/dist/src/plugins/custom/blockquote/blockquote-backspace-lift.d.ts.map +1 -0
  71. package/dist/src/plugins/custom/blockquote/index.d.ts +3 -0
  72. package/dist/src/plugins/custom/blockquote/index.d.ts.map +1 -0
  73. package/dist/src/plugins/custom/code-block/code-block-editable.d.ts +7 -0
  74. package/dist/src/plugins/custom/code-block/code-block-editable.d.ts.map +1 -0
  75. package/dist/src/plugins/custom/code-block/code-block-language-picker.d.ts +7 -0
  76. package/dist/src/plugins/custom/code-block/code-block-language-picker.d.ts.map +1 -0
  77. package/dist/src/plugins/custom/code-block/code-block-mod-a-select.d.ts +5 -0
  78. package/dist/src/plugins/custom/code-block/code-block-mod-a-select.d.ts.map +1 -0
  79. package/dist/src/plugins/custom/code-block/code-block-prism.d.ts +5 -0
  80. package/dist/src/plugins/custom/code-block/code-block-prism.d.ts.map +1 -0
  81. package/dist/src/plugins/custom/code-block/index.d.ts +9 -0
  82. package/dist/src/plugins/custom/code-block/index.d.ts.map +1 -0
  83. package/dist/src/plugins/custom/cursor/drop-cursor.d.ts +5 -0
  84. package/dist/src/plugins/custom/cursor/drop-cursor.d.ts.map +1 -0
  85. package/dist/src/plugins/custom/cursor/gap-cursor.d.ts +5 -0
  86. package/dist/src/plugins/custom/cursor/gap-cursor.d.ts.map +1 -0
  87. package/dist/src/plugins/custom/cursor/index.d.ts +5 -0
  88. package/dist/src/plugins/custom/cursor/index.d.ts.map +1 -0
  89. package/dist/src/plugins/custom/image/image-editable.d.ts +7 -0
  90. package/dist/src/plugins/custom/image/image-editable.d.ts.map +1 -0
  91. package/dist/src/plugins/custom/image/image-resizable-schema.d.ts +41 -0
  92. package/dist/src/plugins/custom/image/image-resizable-schema.d.ts.map +1 -0
  93. package/dist/src/plugins/custom/image/image-upload-dialog/ImageUploadDialog.d.ts +31 -0
  94. package/dist/src/plugins/custom/image/image-upload-dialog/ImageUploadDialog.d.ts.map +1 -0
  95. package/dist/src/plugins/custom/image/image-upload-dialog/index.d.ts +20 -0
  96. package/dist/src/plugins/custom/image/image-upload-dialog/index.d.ts.map +1 -0
  97. package/dist/src/plugins/custom/image/index.d.ts +7 -0
  98. package/dist/src/plugins/custom/image/index.d.ts.map +1 -0
  99. package/dist/src/plugins/custom/indent/index.d.ts +3 -0
  100. package/dist/src/plugins/custom/indent/index.d.ts.map +1 -0
  101. package/dist/src/plugins/custom/indent/tab-space-indent.d.ts +5 -0
  102. package/dist/src/plugins/custom/indent/tab-space-indent.d.ts.map +1 -0
  103. package/dist/src/plugins/custom/list/index.d.ts +3 -0
  104. package/dist/src/plugins/custom/list/index.d.ts.map +1 -0
  105. package/dist/src/plugins/custom/list/task-list-toggle.d.ts +5 -0
  106. package/dist/src/plugins/custom/list/task-list-toggle.d.ts.map +1 -0
  107. package/dist/src/plugins/custom/math/index.d.ts +7 -0
  108. package/dist/src/plugins/custom/math/index.d.ts.map +1 -0
  109. package/dist/src/plugins/custom/math/math-backspace-entry.d.ts +5 -0
  110. package/dist/src/plugins/custom/math/math-backspace-entry.d.ts.map +1 -0
  111. package/dist/src/plugins/custom/math/math-block-editable.d.ts +7 -0
  112. package/dist/src/plugins/custom/math/math-block-editable.d.ts.map +1 -0
  113. package/dist/src/plugins/custom/math/math-plugin.d.ts +47 -0
  114. package/dist/src/plugins/custom/math/math-plugin.d.ts.map +1 -0
  115. package/dist/src/plugins/custom/selection-tooltip/constants.d.ts +7 -0
  116. package/dist/src/plugins/custom/selection-tooltip/constants.d.ts.map +1 -0
  117. package/dist/src/plugins/custom/selection-tooltip/index.d.ts +7 -0
  118. package/dist/src/plugins/custom/selection-tooltip/index.d.ts.map +1 -0
  119. package/dist/src/plugins/custom/selection-tooltip/mark-logic.d.ts +25 -0
  120. package/dist/src/plugins/custom/selection-tooltip/mark-logic.d.ts.map +1 -0
  121. package/dist/src/plugins/custom/selection-tooltip/tooltip-view.d.ts +21 -0
  122. package/dist/src/plugins/custom/selection-tooltip/tooltip-view.d.ts.map +1 -0
  123. package/dist/src/plugins/custom/selection-tooltip/types.d.ts +58 -0
  124. package/dist/src/plugins/custom/selection-tooltip/types.d.ts.map +1 -0
  125. package/dist/src/plugins/custom/slash-menu/index.d.ts +9 -0
  126. package/dist/src/plugins/custom/slash-menu/index.d.ts.map +1 -0
  127. package/dist/src/plugins/custom/slash-menu/slash-menu-commands.d.ts +6 -0
  128. package/dist/src/plugins/custom/slash-menu/slash-menu-commands.d.ts.map +1 -0
  129. package/dist/src/plugins/custom/slash-menu/slash-menu-logic.d.ts +23 -0
  130. package/dist/src/plugins/custom/slash-menu/slash-menu-logic.d.ts.map +1 -0
  131. package/dist/src/plugins/custom/slash-menu/slash-menu-view.d.ts +50 -0
  132. package/dist/src/plugins/custom/slash-menu/slash-menu-view.d.ts.map +1 -0
  133. package/dist/src/plugins/custom/slash-menu/slash-menu.d.ts +15 -0
  134. package/dist/src/plugins/custom/slash-menu/slash-menu.d.ts.map +1 -0
  135. package/dist/src/plugins/custom/table/index.d.ts +13 -0
  136. package/dist/src/plugins/custom/table/index.d.ts.map +1 -0
  137. package/dist/src/plugins/custom/table/table-arrow-entry.d.ts +5 -0
  138. package/dist/src/plugins/custom/table/table-arrow-entry.d.ts.map +1 -0
  139. package/dist/src/plugins/custom/table/table-deletion-actions.d.ts +10 -0
  140. package/dist/src/plugins/custom/table/table-deletion-actions.d.ts.map +1 -0
  141. package/dist/src/plugins/custom/table/table-focus-actions.d.ts +7 -0
  142. package/dist/src/plugins/custom/table/table-focus-actions.d.ts.map +1 -0
  143. package/dist/src/plugins/custom/table/table-more-actions.d.ts +37 -0
  144. package/dist/src/plugins/custom/table/table-more-actions.d.ts.map +1 -0
  145. package/dist/src/plugins/custom/table/table-row-insertion.d.ts +35 -0
  146. package/dist/src/plugins/custom/table/table-row-insertion.d.ts.map +1 -0
  147. package/dist/src/plugins/custom/table/table-selection.d.ts +30 -0
  148. package/dist/src/plugins/custom/table/table-selection.d.ts.map +1 -0
  149. package/dist/src/plugins/preset-common.d.ts +56 -0
  150. package/dist/src/plugins/preset-common.d.ts.map +1 -0
  151. package/dist/src/react/components/MilkdownEditor.d.ts +7 -0
  152. package/dist/src/react/components/MilkdownEditor.d.ts.map +1 -0
  153. package/dist/src/react/components/index.d.ts +2 -0
  154. package/dist/src/react/components/index.d.ts.map +1 -0
  155. package/dist/src/react/context/EditorContext.d.ts +16 -0
  156. package/dist/src/react/context/EditorContext.d.ts.map +1 -0
  157. package/dist/src/react/hooks/useCloseOnGlobalScroll.d.ts +5 -0
  158. package/dist/src/react/hooks/useCloseOnGlobalScroll.d.ts.map +1 -0
  159. package/dist/src/react/hooks/useControlledState.d.ts +9 -0
  160. package/dist/src/react/hooks/useControlledState.d.ts.map +1 -0
  161. package/dist/src/react/hooks/useMilkdownEditor.d.ts +35 -0
  162. package/dist/src/react/hooks/useMilkdownEditor.d.ts.map +1 -0
  163. package/dist/src/types/editor.d.ts +233 -0
  164. package/dist/src/types/editor.d.ts.map +1 -0
  165. package/dist/src/types/plugin.d.ts +10 -0
  166. package/dist/src/types/plugin.d.ts.map +1 -0
  167. package/dist/src/utils/guard.d.ts +5 -0
  168. package/dist/src/utils/guard.d.ts.map +1 -0
  169. package/dist/src/utils/markdown.d.ts +9 -0
  170. package/dist/src/utils/markdown.d.ts.map +1 -0
  171. package/dist/state-CHAiIqOA.cjs +1 -0
  172. package/dist/state-DNxqltZl.js +16 -0
  173. package/dist/style.css +3 -0
  174. package/package.json +89 -0
@@ -0,0 +1,2223 @@
1
+ import { C as e, a as t, c as n, i as r, k as i, o as a } from "./dist-DaM7GJv6.js";
2
+ import { A as o, L as s, N as c, P as l, V as u, s as d } from "./lib-CCUU16r8.js";
3
+ import { A as f, C as p, D as m, E as ee, M as h, N as te, O as g, P as _, S as v, T as y, _ as ne, b, g as x, j as S, k as C, n as w, o as T, p as re, t as ie, w as E, x as ae } from "./dist-Dhukmh4L.js";
4
+ import { O as oe } from "./dist-Cxaq2crg.js";
5
+ import { a as se, c as D, d as ce, f as le, i as ue, l as de, r as fe, t as O, u as k } from "./lib-Dbe-cVjv.js";
6
+ import { i as pe, r as me } from "./lib-DkE7Uq2b.js";
7
+ import { _ as he, c as ge, d as _e, f as ve, g as ye, h as be, i as xe, l as Se, m as Ce, n as A, p as we, r as Te, s as Ee, t as j, u as De, v as Oe, y as ke } from "./dist-CxZn1qUo.js";
8
+ //#region node_modules/.pnpm/prosemirror-safari-ime-span@1.0.2/node_modules/prosemirror-safari-ime-span/dist/index.js
9
+ var M = typeof navigator < "u" ? navigator : null, Ae = M && M.userAgent || "", je = /Edge\/(\d+)/.exec(Ae), Me = /MSIE \d/.exec(Ae), Ne = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ae), Pe = !(Me || Ne || je) && !!M && /Apple Computer/.test(M.vendor), Fe = new t("safari-ime-span"), Ie = !1, Le = {
10
+ key: Fe,
11
+ props: {
12
+ decorations: Re,
13
+ handleDOMEvents: {
14
+ compositionstart: () => {
15
+ Ie = !0;
16
+ },
17
+ compositionend: () => {
18
+ Ie = !1;
19
+ }
20
+ }
21
+ }
22
+ };
23
+ function Re(e) {
24
+ let { $from: t, $to: n, to: r } = e.selection;
25
+ if (Ie && t.sameParent(n)) {
26
+ let t = ie.widget(r, ze, {
27
+ ignoreSelection: !0,
28
+ key: "safari-ime-span"
29
+ });
30
+ return w.create(e.doc, [t]);
31
+ }
32
+ }
33
+ function ze(e) {
34
+ let t = e.dom.ownerDocument.createElement("span");
35
+ return t.className = "ProseMirror-safari-ime-span", t;
36
+ }
37
+ var Be = new r(Pe ? Le : { key: Fe });
38
+ //#endregion
39
+ //#region node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
40
+ function Ve(e, t) {
41
+ let n = String(e);
42
+ if (typeof t != "string") throw TypeError("Expected character");
43
+ let r = 0, i = n.indexOf(t);
44
+ for (; i !== -1;) r++, i = n.indexOf(t, i + t.length);
45
+ return r;
46
+ }
47
+ //#endregion
48
+ //#region node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
49
+ function He(e) {
50
+ if (typeof e != "string") throw TypeError("Expected a string");
51
+ return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
52
+ }
53
+ //#endregion
54
+ //#region node_modules/.pnpm/mdast-util-find-and-replace@3.0.2/node_modules/mdast-util-find-and-replace/lib/index.js
55
+ function Ue(e, t, n) {
56
+ let r = ne((n || {}).ignore || []), i = We(t), a = -1;
57
+ for (; ++a < i.length;) x(e, "text", o);
58
+ function o(e, t) {
59
+ let n = -1, i;
60
+ for (; ++n < t.length;) {
61
+ let e = t[n], a = i ? i.children : void 0;
62
+ if (r(e, a ? a.indexOf(e) : void 0, i)) return;
63
+ i = e;
64
+ }
65
+ if (i) return s(e, t);
66
+ }
67
+ function s(e, t) {
68
+ let n = t[t.length - 1], r = i[a][0], o = i[a][1], s = 0, c = n.children.indexOf(e), l = !1, u = [];
69
+ r.lastIndex = 0;
70
+ let d = r.exec(e.value);
71
+ for (; d;) {
72
+ let n = d.index, i = {
73
+ index: d.index,
74
+ input: d.input,
75
+ stack: [...t, e]
76
+ }, a = o(...d, i);
77
+ if (typeof a == "string" && (a = a.length > 0 ? {
78
+ type: "text",
79
+ value: a
80
+ } : void 0), a === !1 ? r.lastIndex = n + 1 : (s !== n && u.push({
81
+ type: "text",
82
+ value: e.value.slice(s, n)
83
+ }), Array.isArray(a) ? u.push(...a) : a && u.push(a), s = n + d[0].length, l = !0), !r.global) break;
84
+ d = r.exec(e.value);
85
+ }
86
+ return l ? (s < e.value.length && u.push({
87
+ type: "text",
88
+ value: e.value.slice(s)
89
+ }), n.children.splice(c, 1, ...u)) : u = [e], c + u.length;
90
+ }
91
+ }
92
+ function We(e) {
93
+ let t = [];
94
+ if (!Array.isArray(e)) throw TypeError("Expected find and replace tuple or list of tuples");
95
+ let n = !e[0] || Array.isArray(e[0]) ? e : [e], r = -1;
96
+ for (; ++r < n.length;) {
97
+ let e = n[r];
98
+ t.push([Ge(e[0]), Ke(e[1])]);
99
+ }
100
+ return t;
101
+ }
102
+ function Ge(e) {
103
+ return typeof e == "string" ? new RegExp(He(e), "g") : e;
104
+ }
105
+ function Ke(e) {
106
+ return typeof e == "function" ? e : function() {
107
+ return e;
108
+ };
109
+ }
110
+ //#endregion
111
+ //#region node_modules/.pnpm/mdast-util-gfm-autolink-literal@2.0.1/node_modules/mdast-util-gfm-autolink-literal/lib/index.js
112
+ var qe = "phrasing", Je = [
113
+ "autolink",
114
+ "link",
115
+ "image",
116
+ "label"
117
+ ];
118
+ function Ye() {
119
+ return {
120
+ transforms: [rt],
121
+ enter: {
122
+ literalAutolink: Ze,
123
+ literalAutolinkEmail: Qe,
124
+ literalAutolinkHttp: Qe,
125
+ literalAutolinkWww: Qe
126
+ },
127
+ exit: {
128
+ literalAutolink: nt,
129
+ literalAutolinkEmail: tt,
130
+ literalAutolinkHttp: $e,
131
+ literalAutolinkWww: et
132
+ }
133
+ };
134
+ }
135
+ function Xe() {
136
+ return { unsafe: [
137
+ {
138
+ character: "@",
139
+ before: "[+\\-.\\w]",
140
+ after: "[\\-.\\w]",
141
+ inConstruct: qe,
142
+ notInConstruct: Je
143
+ },
144
+ {
145
+ character: ".",
146
+ before: "[Ww]",
147
+ after: "[\\-.\\w]",
148
+ inConstruct: qe,
149
+ notInConstruct: Je
150
+ },
151
+ {
152
+ character: ":",
153
+ before: "[ps]",
154
+ after: "\\/",
155
+ inConstruct: qe,
156
+ notInConstruct: Je
157
+ }
158
+ ] };
159
+ }
160
+ function Ze(e) {
161
+ this.enter({
162
+ type: "link",
163
+ title: null,
164
+ url: "",
165
+ children: []
166
+ }, e);
167
+ }
168
+ function Qe(e) {
169
+ this.config.enter.autolinkProtocol.call(this, e);
170
+ }
171
+ function $e(e) {
172
+ this.config.exit.autolinkProtocol.call(this, e);
173
+ }
174
+ function et(e) {
175
+ this.config.exit.data.call(this, e);
176
+ let t = this.stack[this.stack.length - 1];
177
+ t.type, t.url = "http://" + this.sliceSerialize(e);
178
+ }
179
+ function tt(e) {
180
+ this.config.exit.autolinkEmail.call(this, e);
181
+ }
182
+ function nt(e) {
183
+ this.exit(e);
184
+ }
185
+ function rt(e) {
186
+ Ue(e, [[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, it], [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, at]], { ignore: ["link", "linkReference"] });
187
+ }
188
+ function it(e, t, n, r, i) {
189
+ let a = "";
190
+ if (!ct(i) || (/^w/i.test(t) && (n = t + n, t = "", a = "http://"), !ot(n))) return !1;
191
+ let o = st(n + r);
192
+ if (!o[0]) return !1;
193
+ let s = {
194
+ type: "link",
195
+ title: null,
196
+ url: a + t + o[0],
197
+ children: [{
198
+ type: "text",
199
+ value: t + o[0]
200
+ }]
201
+ };
202
+ return o[1] ? [s, {
203
+ type: "text",
204
+ value: o[1]
205
+ }] : s;
206
+ }
207
+ function at(e, t, n, r) {
208
+ return !ct(r, !0) || /[-\d_]$/.test(n) ? !1 : {
209
+ type: "link",
210
+ title: null,
211
+ url: "mailto:" + t + "@" + n,
212
+ children: [{
213
+ type: "text",
214
+ value: t + "@" + n
215
+ }]
216
+ };
217
+ }
218
+ function ot(e) {
219
+ let t = e.split(".");
220
+ return !(t.length < 2 || t[t.length - 1] && (/_/.test(t[t.length - 1]) || !/[a-zA-Z\d]/.test(t[t.length - 1])) || t[t.length - 2] && (/_/.test(t[t.length - 2]) || !/[a-zA-Z\d]/.test(t[t.length - 2])));
221
+ }
222
+ function st(e) {
223
+ let t = /[!"&'),.:;<>?\]}]+$/.exec(e);
224
+ if (!t) return [e, void 0];
225
+ e = e.slice(0, t.index);
226
+ let n = t[0], r = n.indexOf(")"), i = Ve(e, "("), a = Ve(e, ")");
227
+ for (; r !== -1 && i > a;) e += n.slice(0, r + 1), n = n.slice(r + 1), r = n.indexOf(")"), a++;
228
+ return [e, n];
229
+ }
230
+ function ct(e, t) {
231
+ let n = e.input.charCodeAt(e.index - 1);
232
+ return (e.index === 0 || S(n) || f(n)) && (!t || n !== 47);
233
+ }
234
+ //#endregion
235
+ //#region node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0/node_modules/mdast-util-gfm-footnote/lib/index.js
236
+ vt.peek = _t;
237
+ function lt() {
238
+ this.buffer();
239
+ }
240
+ function ut(e) {
241
+ this.enter({
242
+ type: "footnoteReference",
243
+ identifier: "",
244
+ label: ""
245
+ }, e);
246
+ }
247
+ function dt() {
248
+ this.buffer();
249
+ }
250
+ function ft(e) {
251
+ this.enter({
252
+ type: "footnoteDefinition",
253
+ identifier: "",
254
+ label: "",
255
+ children: []
256
+ }, e);
257
+ }
258
+ function pt(e) {
259
+ let t = this.resume(), n = this.stack[this.stack.length - 1];
260
+ n.type, n.identifier = h(this.sliceSerialize(e)).toLowerCase(), n.label = t;
261
+ }
262
+ function mt(e) {
263
+ this.exit(e);
264
+ }
265
+ function ht(e) {
266
+ let t = this.resume(), n = this.stack[this.stack.length - 1];
267
+ n.type, n.identifier = h(this.sliceSerialize(e)).toLowerCase(), n.label = t;
268
+ }
269
+ function gt(e) {
270
+ this.exit(e);
271
+ }
272
+ function _t() {
273
+ return "[";
274
+ }
275
+ function vt(e, t, n, r) {
276
+ let i = n.createTracker(r), a = i.move("[^"), o = n.enter("footnoteReference"), s = n.enter("reference");
277
+ return a += i.move(n.safe(n.associationId(e), {
278
+ after: "]",
279
+ before: a
280
+ })), s(), o(), a += i.move("]"), a;
281
+ }
282
+ function yt() {
283
+ return {
284
+ enter: {
285
+ gfmFootnoteCallString: lt,
286
+ gfmFootnoteCall: ut,
287
+ gfmFootnoteDefinitionLabelString: dt,
288
+ gfmFootnoteDefinition: ft
289
+ },
290
+ exit: {
291
+ gfmFootnoteCallString: pt,
292
+ gfmFootnoteCall: mt,
293
+ gfmFootnoteDefinitionLabelString: ht,
294
+ gfmFootnoteDefinition: gt
295
+ }
296
+ };
297
+ }
298
+ function bt(e) {
299
+ let t = !1;
300
+ return e && e.firstLineBlank && (t = !0), {
301
+ handlers: {
302
+ footnoteDefinition: n,
303
+ footnoteReference: vt
304
+ },
305
+ unsafe: [{
306
+ character: "[",
307
+ inConstruct: [
308
+ "label",
309
+ "phrasing",
310
+ "reference"
311
+ ]
312
+ }]
313
+ };
314
+ function n(e, n, r, i) {
315
+ let a = r.createTracker(i), o = a.move("[^"), s = r.enter("footnoteDefinition"), c = r.enter("label");
316
+ return o += a.move(r.safe(r.associationId(e), {
317
+ before: o,
318
+ after: "]"
319
+ })), c(), o += a.move("]:"), e.children && e.children.length > 0 && (a.shift(4), o += a.move((t ? "\n" : " ") + r.indentLines(r.containerFlow(e, a.current()), t ? St : xt))), s(), o;
320
+ }
321
+ }
322
+ function xt(e, t, n) {
323
+ return t === 0 ? e : St(e, t, n);
324
+ }
325
+ function St(e, t, n) {
326
+ return (n ? "" : " ") + e;
327
+ }
328
+ //#endregion
329
+ //#region node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0/node_modules/mdast-util-gfm-strikethrough/lib/index.js
330
+ var Ct = [
331
+ "autolink",
332
+ "destinationLiteral",
333
+ "destinationRaw",
334
+ "reference",
335
+ "titleQuote",
336
+ "titleApostrophe"
337
+ ];
338
+ Ot.peek = kt;
339
+ function wt() {
340
+ return {
341
+ canContainEols: ["delete"],
342
+ enter: { strikethrough: Et },
343
+ exit: { strikethrough: Dt }
344
+ };
345
+ }
346
+ function Tt() {
347
+ return {
348
+ unsafe: [{
349
+ character: "~",
350
+ inConstruct: "phrasing",
351
+ notInConstruct: Ct
352
+ }],
353
+ handlers: { delete: Ot }
354
+ };
355
+ }
356
+ function Et(e) {
357
+ this.enter({
358
+ type: "delete",
359
+ children: []
360
+ }, e);
361
+ }
362
+ function Dt(e) {
363
+ this.exit(e);
364
+ }
365
+ function Ot(e, t, n, r) {
366
+ let i = n.createTracker(r), a = n.enter("strikethrough"), o = i.move("~~");
367
+ return o += n.containerPhrasing(e, {
368
+ ...i.current(),
369
+ before: o,
370
+ after: "~"
371
+ }), o += i.move("~~"), a(), o;
372
+ }
373
+ function kt() {
374
+ return "~";
375
+ }
376
+ //#endregion
377
+ //#region node_modules/.pnpm/markdown-table@3.0.4/node_modules/markdown-table/index.js
378
+ function At(e) {
379
+ return e.length;
380
+ }
381
+ function jt(e, t) {
382
+ let n = t || {}, r = (n.align || []).concat(), i = n.stringLength || At, a = [], o = [], s = [], c = [], l = 0, u = -1;
383
+ for (; ++u < e.length;) {
384
+ let t = [], r = [], a = -1;
385
+ for (e[u].length > l && (l = e[u].length); ++a < e[u].length;) {
386
+ let o = Mt(e[u][a]);
387
+ if (n.alignDelimiters !== !1) {
388
+ let e = i(o);
389
+ r[a] = e, (c[a] === void 0 || e > c[a]) && (c[a] = e);
390
+ }
391
+ t.push(o);
392
+ }
393
+ o[u] = t, s[u] = r;
394
+ }
395
+ let d = -1;
396
+ if (typeof r == "object" && "length" in r) for (; ++d < l;) a[d] = Nt(r[d]);
397
+ else {
398
+ let e = Nt(r);
399
+ for (; ++d < l;) a[d] = e;
400
+ }
401
+ d = -1;
402
+ let f = [], p = [];
403
+ for (; ++d < l;) {
404
+ let e = a[d], t = "", r = "";
405
+ e === 99 ? (t = ":", r = ":") : e === 108 ? t = ":" : e === 114 && (r = ":");
406
+ let i = n.alignDelimiters === !1 ? 1 : Math.max(1, c[d] - t.length - r.length), o = t + "-".repeat(i) + r;
407
+ n.alignDelimiters !== !1 && (i = t.length + i + r.length, i > c[d] && (c[d] = i), p[d] = i), f[d] = o;
408
+ }
409
+ o.splice(1, 0, f), s.splice(1, 0, p), u = -1;
410
+ let m = [];
411
+ for (; ++u < o.length;) {
412
+ let e = o[u], t = s[u];
413
+ d = -1;
414
+ let r = [];
415
+ for (; ++d < l;) {
416
+ let i = e[d] || "", o = "", s = "";
417
+ if (n.alignDelimiters !== !1) {
418
+ let e = c[d] - (t[d] || 0), n = a[d];
419
+ n === 114 ? o = " ".repeat(e) : n === 99 ? e % 2 ? (o = " ".repeat(e / 2 + .5), s = " ".repeat(e / 2 - .5)) : (o = " ".repeat(e / 2), s = o) : s = " ".repeat(e);
420
+ }
421
+ n.delimiterStart !== !1 && !d && r.push("|"), n.padding !== !1 && !(n.alignDelimiters === !1 && i === "") && (n.delimiterStart !== !1 || d) && r.push(" "), n.alignDelimiters !== !1 && r.push(o), r.push(i), n.alignDelimiters !== !1 && r.push(s), n.padding !== !1 && r.push(" "), (n.delimiterEnd !== !1 || d !== l - 1) && r.push("|");
422
+ }
423
+ m.push(n.delimiterEnd === !1 ? r.join("").replace(/ +$/, "") : r.join(""));
424
+ }
425
+ return m.join("\n");
426
+ }
427
+ function Mt(e) {
428
+ return e == null ? "" : String(e);
429
+ }
430
+ function Nt(e) {
431
+ let t = typeof e == "string" ? e.codePointAt(0) : 0;
432
+ return t === 67 || t === 99 ? 99 : t === 76 || t === 108 ? 108 : t === 82 || t === 114 ? 114 : 0;
433
+ }
434
+ //#endregion
435
+ //#region node_modules/.pnpm/mdast-util-gfm-table@2.0.0/node_modules/mdast-util-gfm-table/lib/index.js
436
+ function Pt() {
437
+ return {
438
+ enter: {
439
+ table: Ft,
440
+ tableData: zt,
441
+ tableHeader: zt,
442
+ tableRow: Lt
443
+ },
444
+ exit: {
445
+ codeText: Bt,
446
+ table: It,
447
+ tableData: Rt,
448
+ tableHeader: Rt,
449
+ tableRow: Rt
450
+ }
451
+ };
452
+ }
453
+ function Ft(e) {
454
+ let t = e._align;
455
+ this.enter({
456
+ type: "table",
457
+ align: t.map(function(e) {
458
+ return e === "none" ? null : e;
459
+ }),
460
+ children: []
461
+ }, e), this.data.inTable = !0;
462
+ }
463
+ function It(e) {
464
+ this.exit(e), this.data.inTable = void 0;
465
+ }
466
+ function Lt(e) {
467
+ this.enter({
468
+ type: "tableRow",
469
+ children: []
470
+ }, e);
471
+ }
472
+ function Rt(e) {
473
+ this.exit(e);
474
+ }
475
+ function zt(e) {
476
+ this.enter({
477
+ type: "tableCell",
478
+ children: []
479
+ }, e);
480
+ }
481
+ function Bt(e) {
482
+ let t = this.resume();
483
+ this.data.inTable && (t = t.replace(/\\([\\|])/g, Vt));
484
+ let n = this.stack[this.stack.length - 1];
485
+ n.type, n.value = t, this.exit(e);
486
+ }
487
+ function Vt(e, t) {
488
+ return t === "|" ? t : e;
489
+ }
490
+ function Ht(e) {
491
+ let t = e || {}, n = t.tableCellPadding, r = t.tablePipeAlign, i = t.stringLength, a = n ? " " : "|";
492
+ return {
493
+ unsafe: [
494
+ {
495
+ character: "\r",
496
+ inConstruct: "tableCell"
497
+ },
498
+ {
499
+ character: "\n",
500
+ inConstruct: "tableCell"
501
+ },
502
+ {
503
+ atBreak: !0,
504
+ character: "|",
505
+ after: "[ :-]"
506
+ },
507
+ {
508
+ character: "|",
509
+ inConstruct: "tableCell"
510
+ },
511
+ {
512
+ atBreak: !0,
513
+ character: ":",
514
+ after: "-"
515
+ },
516
+ {
517
+ atBreak: !0,
518
+ character: "-",
519
+ after: "[:|-]"
520
+ }
521
+ ],
522
+ handlers: {
523
+ inlineCode: f,
524
+ table: o,
525
+ tableCell: c,
526
+ tableRow: s
527
+ }
528
+ };
529
+ function o(e, t, n, r) {
530
+ return l(u(e, n, r), e.align);
531
+ }
532
+ function s(e, t, n, r) {
533
+ let i = l([d(e, n, r)]);
534
+ return i.slice(0, i.indexOf("\n"));
535
+ }
536
+ function c(e, t, n, r) {
537
+ let i = n.enter("tableCell"), o = n.enter("phrasing"), s = n.containerPhrasing(e, {
538
+ ...r,
539
+ before: a,
540
+ after: a
541
+ });
542
+ return o(), i(), s;
543
+ }
544
+ function l(e, t) {
545
+ return jt(e, {
546
+ align: t,
547
+ alignDelimiters: r,
548
+ padding: n,
549
+ stringLength: i
550
+ });
551
+ }
552
+ function u(e, t, n) {
553
+ let r = e.children, i = -1, a = [], o = t.enter("table");
554
+ for (; ++i < r.length;) a[i] = d(r[i], t, n);
555
+ return o(), a;
556
+ }
557
+ function d(e, t, n) {
558
+ let r = e.children, i = -1, a = [], o = t.enter("tableRow");
559
+ for (; ++i < r.length;) a[i] = c(r[i], e, t, n);
560
+ return o(), a;
561
+ }
562
+ function f(e, t, n) {
563
+ let r = re.inlineCode(e, t, n);
564
+ return n.stack.includes("tableCell") && (r = r.replace(/\|/g, "\\$&")), r;
565
+ }
566
+ }
567
+ //#endregion
568
+ //#region node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0/node_modules/mdast-util-gfm-task-list-item/lib/index.js
569
+ function Ut() {
570
+ return { exit: {
571
+ taskListCheckValueChecked: Gt,
572
+ taskListCheckValueUnchecked: Gt,
573
+ paragraph: Kt
574
+ } };
575
+ }
576
+ function Wt() {
577
+ return {
578
+ unsafe: [{
579
+ atBreak: !0,
580
+ character: "-",
581
+ after: "[:|-]"
582
+ }],
583
+ handlers: { listItem: qt }
584
+ };
585
+ }
586
+ function Gt(e) {
587
+ let t = this.stack[this.stack.length - 2];
588
+ t.type, t.checked = e.type === "taskListCheckValueChecked";
589
+ }
590
+ function Kt(e) {
591
+ let t = this.stack[this.stack.length - 2];
592
+ if (t && t.type === "listItem" && typeof t.checked == "boolean") {
593
+ let e = this.stack[this.stack.length - 1];
594
+ e.type;
595
+ let n = e.children[0];
596
+ if (n && n.type === "text") {
597
+ let r = t.children, i = -1, a;
598
+ for (; ++i < r.length;) {
599
+ let e = r[i];
600
+ if (e.type === "paragraph") {
601
+ a = e;
602
+ break;
603
+ }
604
+ }
605
+ a === e && (n.value = n.value.slice(1), n.value.length === 0 ? e.children.shift() : e.position && n.position && typeof n.position.start.offset == "number" && (n.position.start.column++, n.position.start.offset++, e.position.start = Object.assign({}, n.position.start)));
606
+ }
607
+ }
608
+ this.exit(e);
609
+ }
610
+ function qt(e, t, n, r) {
611
+ let i = e.children[0], a = typeof e.checked == "boolean" && i && i.type === "paragraph", o = "[" + (e.checked ? "x" : " ") + "] ", s = n.createTracker(r);
612
+ a && s.move(o);
613
+ let c = re.listItem(e, t, n, {
614
+ ...r,
615
+ ...s.current()
616
+ });
617
+ return a && (c = c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, l)), c;
618
+ function l(e) {
619
+ return e + o;
620
+ }
621
+ }
622
+ //#endregion
623
+ //#region node_modules/.pnpm/mdast-util-gfm@3.1.0/node_modules/mdast-util-gfm/lib/index.js
624
+ function Jt() {
625
+ return [
626
+ Ye(),
627
+ yt(),
628
+ wt(),
629
+ Pt(),
630
+ Ut()
631
+ ];
632
+ }
633
+ function Yt(e) {
634
+ return { extensions: [
635
+ Xe(),
636
+ bt(e),
637
+ Tt(),
638
+ Ht(e),
639
+ Wt()
640
+ ] };
641
+ }
642
+ //#endregion
643
+ //#region node_modules/.pnpm/micromark-extension-gfm-autolink-literal@2.1.0/node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
644
+ var Xt = {
645
+ tokenize: cn,
646
+ partial: !0
647
+ }, Zt = {
648
+ tokenize: ln,
649
+ partial: !0
650
+ }, Qt = {
651
+ tokenize: un,
652
+ partial: !0
653
+ }, $t = {
654
+ tokenize: dn,
655
+ partial: !0
656
+ }, en = {
657
+ tokenize: fn,
658
+ partial: !0
659
+ }, tn = {
660
+ name: "wwwAutolink",
661
+ tokenize: on,
662
+ previous: pn
663
+ }, nn = {
664
+ name: "protocolAutolink",
665
+ tokenize: sn,
666
+ previous: mn
667
+ }, N = {
668
+ name: "emailAutolink",
669
+ tokenize: an,
670
+ previous: hn
671
+ }, P = {};
672
+ function rn() {
673
+ return { text: P };
674
+ }
675
+ for (var F = 48; F < 123;) P[F] = N, F++, F === 58 ? F = 65 : F === 91 && (F = 97);
676
+ P[43] = N, P[45] = N, P[46] = N, P[95] = N, P[72] = [N, nn], P[104] = [N, nn], P[87] = [N, tn], P[119] = [N, tn];
677
+ function an(e, t, n) {
678
+ let r = this, i, a;
679
+ return o;
680
+ function o(t) {
681
+ return !gn(t) || !hn.call(r, r.previous) || _n(r.events) ? n(t) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), s(t));
682
+ }
683
+ function s(t) {
684
+ return gn(t) ? (e.consume(t), s) : t === 64 ? (e.consume(t), c) : n(t);
685
+ }
686
+ function c(t) {
687
+ return t === 46 ? e.check(en, u, l)(t) : t === 45 || t === 95 || y(t) ? (a = !0, e.consume(t), c) : u(t);
688
+ }
689
+ function l(t) {
690
+ return e.consume(t), i = !0, c;
691
+ }
692
+ function u(o) {
693
+ return a && i && E(r.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), t(o)) : n(o);
694
+ }
695
+ }
696
+ function on(e, t, n) {
697
+ let r = this;
698
+ return i;
699
+ function i(t) {
700
+ return t !== 87 && t !== 119 || !pn.call(r, r.previous) || _n(r.events) ? n(t) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(Xt, e.attempt(Zt, e.attempt(Qt, a), n), n)(t));
701
+ }
702
+ function a(n) {
703
+ return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), t(n);
704
+ }
705
+ }
706
+ function sn(e, t, n) {
707
+ let r = this, i = "", a = !1;
708
+ return o;
709
+ function o(t) {
710
+ return (t === 72 || t === 104) && mn.call(r, r.previous) && !_n(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), i += String.fromCodePoint(t), e.consume(t), s) : n(t);
711
+ }
712
+ function s(t) {
713
+ if (E(t) && i.length < 5) return i += String.fromCodePoint(t), e.consume(t), s;
714
+ if (t === 58) {
715
+ let n = i.toLowerCase();
716
+ if (n === "http" || n === "https") return e.consume(t), c;
717
+ }
718
+ return n(t);
719
+ }
720
+ function c(t) {
721
+ return t === 47 ? (e.consume(t), a ? l : (a = !0, c)) : n(t);
722
+ }
723
+ function l(t) {
724
+ return t === null || ee(t) || g(t) || S(t) || f(t) ? n(t) : e.attempt(Zt, e.attempt(Qt, u), n)(t);
725
+ }
726
+ function u(n) {
727
+ return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(n);
728
+ }
729
+ }
730
+ function cn(e, t, n) {
731
+ let r = 0;
732
+ return i;
733
+ function i(t) {
734
+ return (t === 87 || t === 119) && r < 3 ? (r++, e.consume(t), i) : t === 46 && r === 3 ? (e.consume(t), a) : n(t);
735
+ }
736
+ function a(e) {
737
+ return e === null ? n(e) : t(e);
738
+ }
739
+ }
740
+ function ln(e, t, n) {
741
+ let r, i, a;
742
+ return o;
743
+ function o(t) {
744
+ return t === 46 || t === 95 ? e.check($t, c, s)(t) : t === null || g(t) || S(t) || t !== 45 && f(t) ? c(t) : (a = !0, e.consume(t), o);
745
+ }
746
+ function s(t) {
747
+ return t === 95 ? r = !0 : (i = r, r = void 0), e.consume(t), o;
748
+ }
749
+ function c(e) {
750
+ return i || r || !a ? n(e) : t(e);
751
+ }
752
+ }
753
+ function un(e, t) {
754
+ let n = 0, r = 0;
755
+ return i;
756
+ function i(o) {
757
+ return o === 40 ? (n++, e.consume(o), i) : o === 41 && r < n ? a(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check($t, t, a)(o) : o === null || g(o) || S(o) ? t(o) : (e.consume(o), i);
758
+ }
759
+ function a(t) {
760
+ return t === 41 && r++, e.consume(t), i;
761
+ }
762
+ }
763
+ function dn(e, t, n) {
764
+ return r;
765
+ function r(o) {
766
+ return o === 33 || o === 34 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 63 || o === 95 || o === 126 ? (e.consume(o), r) : o === 38 ? (e.consume(o), a) : o === 93 ? (e.consume(o), i) : o === 60 || o === null || g(o) || S(o) ? t(o) : n(o);
767
+ }
768
+ function i(e) {
769
+ return e === null || e === 40 || e === 91 || g(e) || S(e) ? t(e) : r(e);
770
+ }
771
+ function a(e) {
772
+ return E(e) ? o(e) : n(e);
773
+ }
774
+ function o(t) {
775
+ return t === 59 ? (e.consume(t), r) : E(t) ? (e.consume(t), o) : n(t);
776
+ }
777
+ }
778
+ function fn(e, t, n) {
779
+ return r;
780
+ function r(t) {
781
+ return e.consume(t), i;
782
+ }
783
+ function i(e) {
784
+ return y(e) ? n(e) : t(e);
785
+ }
786
+ }
787
+ function pn(e) {
788
+ return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || g(e);
789
+ }
790
+ function mn(e) {
791
+ return !E(e);
792
+ }
793
+ function hn(e) {
794
+ return !(e === 47 || gn(e));
795
+ }
796
+ function gn(e) {
797
+ return e === 43 || e === 45 || e === 46 || e === 95 || y(e);
798
+ }
799
+ function _n(e) {
800
+ let t = e.length, n = !1;
801
+ for (; t--;) {
802
+ let r = e[t][1];
803
+ if ((r.type === "labelLink" || r.type === "labelImage") && !r._balanced) {
804
+ n = !0;
805
+ break;
806
+ }
807
+ if (r._gfmAutolinkLiteralWalkedInto) {
808
+ n = !1;
809
+ break;
810
+ }
811
+ }
812
+ return e.length > 0 && !n && (e[e.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), n;
813
+ }
814
+ //#endregion
815
+ //#region node_modules/.pnpm/micromark-extension-gfm-footnote@2.1.0/node_modules/micromark-extension-gfm-footnote/lib/syntax.js
816
+ var vn = {
817
+ tokenize: En,
818
+ partial: !0
819
+ };
820
+ function yn() {
821
+ return {
822
+ document: { 91: {
823
+ name: "gfmFootnoteDefinition",
824
+ tokenize: Cn,
825
+ continuation: { tokenize: wn },
826
+ exit: Tn
827
+ } },
828
+ text: {
829
+ 91: {
830
+ name: "gfmFootnoteCall",
831
+ tokenize: Sn
832
+ },
833
+ 93: {
834
+ name: "gfmPotentialFootnoteCall",
835
+ add: "after",
836
+ tokenize: bn,
837
+ resolveTo: xn
838
+ }
839
+ }
840
+ };
841
+ }
842
+ function bn(e, t, n) {
843
+ let r = this, i = r.events.length, a = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []), o;
844
+ for (; i--;) {
845
+ let e = r.events[i][1];
846
+ if (e.type === "labelImage") {
847
+ o = e;
848
+ break;
849
+ }
850
+ if (e.type === "gfmFootnoteCall" || e.type === "labelLink" || e.type === "label" || e.type === "image" || e.type === "link") break;
851
+ }
852
+ return s;
853
+ function s(i) {
854
+ if (!o || !o._balanced) return n(i);
855
+ let s = h(r.sliceSerialize({
856
+ start: o.end,
857
+ end: r.now()
858
+ }));
859
+ return s.codePointAt(0) !== 94 || !a.includes(s.slice(1)) ? n(i) : (e.enter("gfmFootnoteCallLabelMarker"), e.consume(i), e.exit("gfmFootnoteCallLabelMarker"), t(i));
860
+ }
861
+ }
862
+ function xn(e, t) {
863
+ let n = e.length;
864
+ for (; n--;) if (e[n][1].type === "labelImage" && e[n][0] === "enter") {
865
+ e[n][1];
866
+ break;
867
+ }
868
+ e[n + 1][1].type = "data", e[n + 3][1].type = "gfmFootnoteCallLabelMarker";
869
+ let r = {
870
+ type: "gfmFootnoteCall",
871
+ start: Object.assign({}, e[n + 3][1].start),
872
+ end: Object.assign({}, e[e.length - 1][1].end)
873
+ }, i = {
874
+ type: "gfmFootnoteCallMarker",
875
+ start: Object.assign({}, e[n + 3][1].end),
876
+ end: Object.assign({}, e[n + 3][1].end)
877
+ };
878
+ i.end.column++, i.end.offset++, i.end._bufferIndex++;
879
+ let a = {
880
+ type: "gfmFootnoteCallString",
881
+ start: Object.assign({}, i.end),
882
+ end: Object.assign({}, e[e.length - 1][1].start)
883
+ }, o = {
884
+ type: "chunkString",
885
+ contentType: "string",
886
+ start: Object.assign({}, a.start),
887
+ end: Object.assign({}, a.end)
888
+ }, s = [
889
+ e[n + 1],
890
+ e[n + 2],
891
+ [
892
+ "enter",
893
+ r,
894
+ t
895
+ ],
896
+ e[n + 3],
897
+ e[n + 4],
898
+ [
899
+ "enter",
900
+ i,
901
+ t
902
+ ],
903
+ [
904
+ "exit",
905
+ i,
906
+ t
907
+ ],
908
+ [
909
+ "enter",
910
+ a,
911
+ t
912
+ ],
913
+ [
914
+ "enter",
915
+ o,
916
+ t
917
+ ],
918
+ [
919
+ "exit",
920
+ o,
921
+ t
922
+ ],
923
+ [
924
+ "exit",
925
+ a,
926
+ t
927
+ ],
928
+ e[e.length - 2],
929
+ e[e.length - 1],
930
+ [
931
+ "exit",
932
+ r,
933
+ t
934
+ ]
935
+ ];
936
+ return e.splice(n, e.length - n + 1, ...s), e;
937
+ }
938
+ function Sn(e, t, n) {
939
+ let r = this, i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []), a = 0, o;
940
+ return s;
941
+ function s(t) {
942
+ return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(t), e.exit("gfmFootnoteCallLabelMarker"), c;
943
+ }
944
+ function c(t) {
945
+ return t === 94 ? (e.enter("gfmFootnoteCallMarker"), e.consume(t), e.exit("gfmFootnoteCallMarker"), e.enter("gfmFootnoteCallString"), e.enter("chunkString").contentType = "string", l) : n(t);
946
+ }
947
+ function l(s) {
948
+ if (a > 999 || s === 93 && !o || s === null || s === 91 || g(s)) return n(s);
949
+ if (s === 93) {
950
+ e.exit("chunkString");
951
+ let a = e.exit("gfmFootnoteCallString");
952
+ return i.includes(h(r.sliceSerialize(a))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(s), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), t) : n(s);
953
+ }
954
+ return g(s) || (o = !0), a++, e.consume(s), s === 92 ? u : l;
955
+ }
956
+ function u(t) {
957
+ return t === 91 || t === 92 || t === 93 ? (e.consume(t), a++, l) : l(t);
958
+ }
959
+ }
960
+ function Cn(e, t, n) {
961
+ let r = this, i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []), a, o = 0, s;
962
+ return c;
963
+ function c(t) {
964
+ return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionLabelMarker"), l;
965
+ }
966
+ function l(t) {
967
+ return t === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", u) : n(t);
968
+ }
969
+ function u(t) {
970
+ if (o > 999 || t === 93 && !s || t === null || t === 91 || g(t)) return n(t);
971
+ if (t === 93) {
972
+ e.exit("chunkString");
973
+ let n = e.exit("gfmFootnoteDefinitionLabelString");
974
+ return a = h(r.sliceSerialize(n)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), f;
975
+ }
976
+ return g(t) || (s = !0), o++, e.consume(t), t === 92 ? d : u;
977
+ }
978
+ function d(t) {
979
+ return t === 91 || t === 92 || t === 93 ? (e.consume(t), o++, u) : u(t);
980
+ }
981
+ function f(t) {
982
+ return t === 58 ? (e.enter("definitionMarker"), e.consume(t), e.exit("definitionMarker"), i.includes(a) || i.push(a), p(e, m, "gfmFootnoteDefinitionWhitespace")) : n(t);
983
+ }
984
+ function m(e) {
985
+ return t(e);
986
+ }
987
+ }
988
+ function wn(e, t, n) {
989
+ return e.check(b, t, e.attempt(vn, t, n));
990
+ }
991
+ function Tn(e) {
992
+ e.exit("gfmFootnoteDefinition");
993
+ }
994
+ function En(e, t, n) {
995
+ let r = this;
996
+ return p(e, i, "gfmFootnoteDefinitionIndent", 5);
997
+ function i(e) {
998
+ let i = r.events[r.events.length - 1];
999
+ return i && i[1].type === "gfmFootnoteDefinitionIndent" && i[2].sliceSerialize(i[1], !0).length === 4 ? t(e) : n(e);
1000
+ }
1001
+ }
1002
+ //#endregion
1003
+ //#region node_modules/.pnpm/micromark-extension-gfm-strikethrough@2.1.0/node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
1004
+ function Dn(e) {
1005
+ let t = (e || {}).singleTilde, n = {
1006
+ name: "strikethrough",
1007
+ tokenize: i,
1008
+ resolveAll: r
1009
+ };
1010
+ return t ??= !0, {
1011
+ text: { 126: n },
1012
+ insideSpan: { null: [n] },
1013
+ attentionMarkers: { null: [126] }
1014
+ };
1015
+ function r(e, t) {
1016
+ let n = -1;
1017
+ for (; ++n < e.length;) if (e[n][0] === "enter" && e[n][1].type === "strikethroughSequenceTemporary" && e[n][1]._close) {
1018
+ let r = n;
1019
+ for (; r--;) if (e[r][0] === "exit" && e[r][1].type === "strikethroughSequenceTemporary" && e[r][1]._open && e[n][1].end.offset - e[n][1].start.offset === e[r][1].end.offset - e[r][1].start.offset) {
1020
+ e[n][1].type = "strikethroughSequence", e[r][1].type = "strikethroughSequence";
1021
+ let i = {
1022
+ type: "strikethrough",
1023
+ start: Object.assign({}, e[r][1].start),
1024
+ end: Object.assign({}, e[n][1].end)
1025
+ }, a = {
1026
+ type: "strikethroughText",
1027
+ start: Object.assign({}, e[r][1].end),
1028
+ end: Object.assign({}, e[n][1].start)
1029
+ }, o = [
1030
+ [
1031
+ "enter",
1032
+ i,
1033
+ t
1034
+ ],
1035
+ [
1036
+ "enter",
1037
+ e[r][1],
1038
+ t
1039
+ ],
1040
+ [
1041
+ "exit",
1042
+ e[r][1],
1043
+ t
1044
+ ],
1045
+ [
1046
+ "enter",
1047
+ a,
1048
+ t
1049
+ ]
1050
+ ], s = t.parser.constructs.insideSpan.null;
1051
+ s && _(o, o.length, 0, ae(s, e.slice(r + 1, n), t)), _(o, o.length, 0, [
1052
+ [
1053
+ "exit",
1054
+ a,
1055
+ t
1056
+ ],
1057
+ [
1058
+ "enter",
1059
+ e[n][1],
1060
+ t
1061
+ ],
1062
+ [
1063
+ "exit",
1064
+ e[n][1],
1065
+ t
1066
+ ],
1067
+ [
1068
+ "exit",
1069
+ i,
1070
+ t
1071
+ ]
1072
+ ]), _(e, r - 1, n - r + 3, o), n = r + o.length - 2;
1073
+ break;
1074
+ }
1075
+ }
1076
+ for (n = -1; ++n < e.length;) e[n][1].type === "strikethroughSequenceTemporary" && (e[n][1].type = "data");
1077
+ return e;
1078
+ }
1079
+ function i(e, n, r) {
1080
+ let i = this.previous, a = this.events, o = 0;
1081
+ return s;
1082
+ function s(t) {
1083
+ return i === 126 && a[a.length - 1][1].type !== "characterEscape" ? r(t) : (e.enter("strikethroughSequenceTemporary"), c(t));
1084
+ }
1085
+ function c(a) {
1086
+ let s = v(i);
1087
+ if (a === 126) return o > 1 ? r(a) : (e.consume(a), o++, c);
1088
+ if (o < 2 && !t) return r(a);
1089
+ let l = e.exit("strikethroughSequenceTemporary"), u = v(a);
1090
+ return l._open = !u || u === 2 && !!s, l._close = !s || s === 2 && !!u, n(a);
1091
+ }
1092
+ }
1093
+ }
1094
+ //#endregion
1095
+ //#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/edit-map.js
1096
+ var On = class {
1097
+ constructor() {
1098
+ this.map = [];
1099
+ }
1100
+ add(e, t, n) {
1101
+ kn(this, e, t, n);
1102
+ }
1103
+ consume(e) {
1104
+ /* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
1105
+ if (this.map.sort(function(e, t) {
1106
+ return e[0] - t[0];
1107
+ }), this.map.length === 0) return;
1108
+ let t = this.map.length, n = [];
1109
+ for (; t > 0;) --t, n.push(e.slice(this.map[t][0] + this.map[t][1]), this.map[t][2]), e.length = this.map[t][0];
1110
+ n.push(e.slice()), e.length = 0;
1111
+ let r = n.pop();
1112
+ for (; r;) {
1113
+ for (let t of r) e.push(t);
1114
+ r = n.pop();
1115
+ }
1116
+ this.map.length = 0;
1117
+ }
1118
+ };
1119
+ function kn(e, t, n, r) {
1120
+ let i = 0;
1121
+ if (!(n === 0 && r.length === 0)) {
1122
+ for (; i < e.map.length;) {
1123
+ if (e.map[i][0] === t) {
1124
+ e.map[i][1] += n, e.map[i][2].push(...r);
1125
+ return;
1126
+ }
1127
+ i += 1;
1128
+ }
1129
+ e.map.push([
1130
+ t,
1131
+ n,
1132
+ r
1133
+ ]);
1134
+ }
1135
+ }
1136
+ //#endregion
1137
+ //#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/infer.js
1138
+ function An(e, t) {
1139
+ let n = !1, r = [];
1140
+ for (; t < e.length;) {
1141
+ let i = e[t];
1142
+ if (n) {
1143
+ if (i[0] === "enter") i[1].type === "tableContent" && r.push(e[t + 1][1].type === "tableDelimiterMarker" ? "left" : "none");
1144
+ else if (i[1].type === "tableContent") {
1145
+ if (e[t - 1][1].type === "tableDelimiterMarker") {
1146
+ let e = r.length - 1;
1147
+ r[e] = r[e] === "left" ? "center" : "right";
1148
+ }
1149
+ } else if (i[1].type === "tableDelimiterRow") break;
1150
+ } else i[0] === "enter" && i[1].type === "tableDelimiterRow" && (n = !0);
1151
+ t += 1;
1152
+ }
1153
+ return r;
1154
+ }
1155
+ //#endregion
1156
+ //#region node_modules/.pnpm/micromark-extension-gfm-table@2.1.1/node_modules/micromark-extension-gfm-table/lib/syntax.js
1157
+ function jn() {
1158
+ return { flow: { null: {
1159
+ name: "table",
1160
+ tokenize: Mn,
1161
+ resolveAll: Nn
1162
+ } } };
1163
+ }
1164
+ function Mn(e, t, n) {
1165
+ let r = this, i = 0, a = 0, o;
1166
+ return s;
1167
+ function s(e) {
1168
+ let t = r.events.length - 1;
1169
+ for (; t > -1;) {
1170
+ let e = r.events[t][1].type;
1171
+ if (e === "lineEnding" || e === "linePrefix") t--;
1172
+ else break;
1173
+ }
1174
+ let i = t > -1 ? r.events[t][1].type : null, a = i === "tableHead" || i === "tableRow" ? S : c;
1175
+ return a === S && r.parser.lazy[r.now().line] ? n(e) : a(e);
1176
+ }
1177
+ function c(t) {
1178
+ return e.enter("tableHead"), e.enter("tableRow"), l(t);
1179
+ }
1180
+ function l(e) {
1181
+ return e === 124 ? u(e) : (o = !0, a += 1, u(e));
1182
+ }
1183
+ function u(t) {
1184
+ return t === null ? n(t) : m(t) ? a > 1 ? (a = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), ee) : n(t) : C(t) ? p(e, u, "whitespace")(t) : (a += 1, o && (o = !1, i += 1), t === 124 ? (e.enter("tableCellDivider"), e.consume(t), e.exit("tableCellDivider"), o = !0, u) : (e.enter("data"), d(t)));
1185
+ }
1186
+ function d(t) {
1187
+ return t === null || t === 124 || g(t) ? (e.exit("data"), u(t)) : (e.consume(t), t === 92 ? f : d);
1188
+ }
1189
+ function f(t) {
1190
+ return t === 92 || t === 124 ? (e.consume(t), d) : d(t);
1191
+ }
1192
+ function ee(t) {
1193
+ return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(t) : (e.enter("tableDelimiterRow"), o = !1, C(t) ? p(e, h, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : h(t));
1194
+ }
1195
+ function h(t) {
1196
+ return t === 45 || t === 58 ? _(t) : t === 124 ? (o = !0, e.enter("tableCellDivider"), e.consume(t), e.exit("tableCellDivider"), te) : x(t);
1197
+ }
1198
+ function te(t) {
1199
+ return C(t) ? p(e, _, "whitespace")(t) : _(t);
1200
+ }
1201
+ function _(t) {
1202
+ return t === 58 ? (a += 1, o = !0, e.enter("tableDelimiterMarker"), e.consume(t), e.exit("tableDelimiterMarker"), v) : t === 45 ? (a += 1, v(t)) : t === null || m(t) ? b(t) : x(t);
1203
+ }
1204
+ function v(t) {
1205
+ return t === 45 ? (e.enter("tableDelimiterFiller"), y(t)) : x(t);
1206
+ }
1207
+ function y(t) {
1208
+ return t === 45 ? (e.consume(t), y) : t === 58 ? (o = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(t), e.exit("tableDelimiterMarker"), ne) : (e.exit("tableDelimiterFiller"), ne(t));
1209
+ }
1210
+ function ne(t) {
1211
+ return C(t) ? p(e, b, "whitespace")(t) : b(t);
1212
+ }
1213
+ function b(n) {
1214
+ return n === 124 ? h(n) : n === null || m(n) ? !o || i !== a ? x(n) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(n)) : x(n);
1215
+ }
1216
+ function x(e) {
1217
+ return n(e);
1218
+ }
1219
+ function S(t) {
1220
+ return e.enter("tableRow"), w(t);
1221
+ }
1222
+ function w(n) {
1223
+ return n === 124 ? (e.enter("tableCellDivider"), e.consume(n), e.exit("tableCellDivider"), w) : n === null || m(n) ? (e.exit("tableRow"), t(n)) : C(n) ? p(e, w, "whitespace")(n) : (e.enter("data"), T(n));
1224
+ }
1225
+ function T(t) {
1226
+ return t === null || t === 124 || g(t) ? (e.exit("data"), w(t)) : (e.consume(t), t === 92 ? re : T);
1227
+ }
1228
+ function re(t) {
1229
+ return t === 92 || t === 124 ? (e.consume(t), T) : T(t);
1230
+ }
1231
+ }
1232
+ function Nn(e, t) {
1233
+ let n = -1, r = !0, i = 0, a = [
1234
+ 0,
1235
+ 0,
1236
+ 0,
1237
+ 0
1238
+ ], o = [
1239
+ 0,
1240
+ 0,
1241
+ 0,
1242
+ 0
1243
+ ], s = !1, c = 0, l, u, d, f = new On();
1244
+ for (; ++n < e.length;) {
1245
+ let p = e[n], m = p[1];
1246
+ p[0] === "enter" ? m.type === "tableHead" ? (s = !1, c !== 0 && (Pn(f, t, c, l, u), u = void 0, c = 0), l = {
1247
+ type: "table",
1248
+ start: Object.assign({}, m.start),
1249
+ end: Object.assign({}, m.end)
1250
+ }, f.add(n, 0, [[
1251
+ "enter",
1252
+ l,
1253
+ t
1254
+ ]])) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (r = !0, d = void 0, a = [
1255
+ 0,
1256
+ 0,
1257
+ 0,
1258
+ 0
1259
+ ], o = [
1260
+ 0,
1261
+ n + 1,
1262
+ 0,
1263
+ 0
1264
+ ], s && (s = !1, u = {
1265
+ type: "tableBody",
1266
+ start: Object.assign({}, m.start),
1267
+ end: Object.assign({}, m.end)
1268
+ }, f.add(n, 0, [[
1269
+ "enter",
1270
+ u,
1271
+ t
1272
+ ]])), i = m.type === "tableDelimiterRow" ? 2 : u ? 3 : 1) : i && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") ? (r = !1, o[2] === 0 && (a[1] !== 0 && (o[0] = o[1], d = I(f, t, a, i, void 0, d), a = [
1273
+ 0,
1274
+ 0,
1275
+ 0,
1276
+ 0
1277
+ ]), o[2] = n)) : m.type === "tableCellDivider" && (r ? r = !1 : (a[1] !== 0 && (o[0] = o[1], d = I(f, t, a, i, void 0, d)), a = o, o = [
1278
+ a[1],
1279
+ n,
1280
+ 0,
1281
+ 0
1282
+ ])) : m.type === "tableHead" ? (s = !0, c = n) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (c = n, a[1] === 0 ? o[1] !== 0 && (d = I(f, t, o, i, n, d)) : (o[0] = o[1], d = I(f, t, a, i, n, d)), i = 0) : i && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") && (o[3] = n);
1283
+ }
1284
+ for (c !== 0 && Pn(f, t, c, l, u), f.consume(t.events), n = -1; ++n < t.events.length;) {
1285
+ let e = t.events[n];
1286
+ e[0] === "enter" && e[1].type === "table" && (e[1]._align = An(t.events, n));
1287
+ }
1288
+ return e;
1289
+ }
1290
+ function I(e, t, n, r, i, a) {
1291
+ let o = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData";
1292
+ n[0] !== 0 && (a.end = Object.assign({}, L(t.events, n[0])), e.add(n[0], 0, [[
1293
+ "exit",
1294
+ a,
1295
+ t
1296
+ ]]));
1297
+ let s = L(t.events, n[1]);
1298
+ if (a = {
1299
+ type: o,
1300
+ start: Object.assign({}, s),
1301
+ end: Object.assign({}, s)
1302
+ }, e.add(n[1], 0, [[
1303
+ "enter",
1304
+ a,
1305
+ t
1306
+ ]]), n[2] !== 0) {
1307
+ let i = L(t.events, n[2]), a = L(t.events, n[3]), o = {
1308
+ type: "tableContent",
1309
+ start: Object.assign({}, i),
1310
+ end: Object.assign({}, a)
1311
+ };
1312
+ if (e.add(n[2], 0, [[
1313
+ "enter",
1314
+ o,
1315
+ t
1316
+ ]]), r !== 2) {
1317
+ let r = t.events[n[2]], i = t.events[n[3]];
1318
+ if (r[1].end = Object.assign({}, i[1].end), r[1].type = "chunkText", r[1].contentType = "text", n[3] > n[2] + 1) {
1319
+ let t = n[2] + 1, r = n[3] - n[2] - 1;
1320
+ e.add(t, r, []);
1321
+ }
1322
+ }
1323
+ e.add(n[3] + 1, 0, [[
1324
+ "exit",
1325
+ o,
1326
+ t
1327
+ ]]);
1328
+ }
1329
+ return i !== void 0 && (a.end = Object.assign({}, L(t.events, i)), e.add(i, 0, [[
1330
+ "exit",
1331
+ a,
1332
+ t
1333
+ ]]), a = void 0), a;
1334
+ }
1335
+ function Pn(e, t, n, r, i) {
1336
+ let a = [], o = L(t.events, n);
1337
+ i && (i.end = Object.assign({}, o), a.push([
1338
+ "exit",
1339
+ i,
1340
+ t
1341
+ ])), r.end = Object.assign({}, o), a.push([
1342
+ "exit",
1343
+ r,
1344
+ t
1345
+ ]), e.add(n + 1, 0, a);
1346
+ }
1347
+ function L(e, t) {
1348
+ let n = e[t], r = n[0] === "enter" ? "start" : "end";
1349
+ return n[1][r];
1350
+ }
1351
+ //#endregion
1352
+ //#region node_modules/.pnpm/micromark-extension-gfm-task-list-item@2.1.0/node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
1353
+ var Fn = {
1354
+ name: "tasklistCheck",
1355
+ tokenize: Ln
1356
+ };
1357
+ function In() {
1358
+ return { text: { 91: Fn } };
1359
+ }
1360
+ function Ln(e, t, n) {
1361
+ let r = this;
1362
+ return i;
1363
+ function i(t) {
1364
+ return r.previous !== null || !r._gfmTasklistFirstContentOfListItem ? n(t) : (e.enter("taskListCheck"), e.enter("taskListCheckMarker"), e.consume(t), e.exit("taskListCheckMarker"), a);
1365
+ }
1366
+ function a(t) {
1367
+ return g(t) ? (e.enter("taskListCheckValueUnchecked"), e.consume(t), e.exit("taskListCheckValueUnchecked"), o) : t === 88 || t === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(t), e.exit("taskListCheckValueChecked"), o) : n(t);
1368
+ }
1369
+ function o(t) {
1370
+ return t === 93 ? (e.enter("taskListCheckMarker"), e.consume(t), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), s) : n(t);
1371
+ }
1372
+ function s(r) {
1373
+ return m(r) ? t(r) : C(r) ? e.check({ tokenize: Rn }, t, n)(r) : n(r);
1374
+ }
1375
+ }
1376
+ function Rn(e, t, n) {
1377
+ return p(e, r, "whitespace");
1378
+ function r(e) {
1379
+ return e === null ? n(e) : t(e);
1380
+ }
1381
+ }
1382
+ //#endregion
1383
+ //#region node_modules/.pnpm/micromark-extension-gfm@3.0.0/node_modules/micromark-extension-gfm/index.js
1384
+ function zn(e) {
1385
+ return te([
1386
+ rn(),
1387
+ yn(),
1388
+ Dn(e),
1389
+ jn(),
1390
+ In()
1391
+ ]);
1392
+ }
1393
+ //#endregion
1394
+ //#region node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
1395
+ var Bn = {};
1396
+ function Vn(e) {
1397
+ let t = this, n = e || Bn, r = t.data(), i = r.micromarkExtensions ||= [], a = r.fromMarkdownExtensions ||= [], o = r.toMarkdownExtensions ||= [];
1398
+ i.push(zn(n)), a.push(Jt()), o.push(Yt(n));
1399
+ }
1400
+ //#endregion
1401
+ //#region node_modules/.pnpm/@milkdown+preset-gfm@7.20.0/node_modules/@milkdown/preset-gfm/lib/index.js
1402
+ function R(e, t) {
1403
+ return Object.assign(e, { meta: {
1404
+ package: "@milkdown/preset-gfm",
1405
+ ...t
1406
+ } }), e;
1407
+ }
1408
+ var z = ue("strike_through");
1409
+ R(z, {
1410
+ displayName: "Attr<strikethrough>",
1411
+ group: "Strikethrough"
1412
+ });
1413
+ var B = se("strike_through", (e) => ({
1414
+ parseDOM: [{ tag: "del" }, {
1415
+ style: "text-decoration",
1416
+ getAttrs: (e) => e === "line-through"
1417
+ }],
1418
+ toDOM: (t) => ["del", e.get(z.key)(t)],
1419
+ parseMarkdown: {
1420
+ match: (e) => e.type === "delete",
1421
+ runner: (e, t, n) => {
1422
+ e.openMark(n), e.next(t.children), e.closeMark(n);
1423
+ }
1424
+ },
1425
+ toMarkdown: {
1426
+ match: (e) => e.type.name === "strike_through",
1427
+ runner: (e, t) => {
1428
+ e.withMark(t, "delete");
1429
+ }
1430
+ }
1431
+ }));
1432
+ R(B.mark, {
1433
+ displayName: "MarkSchema<strikethrough>",
1434
+ group: "Strikethrough"
1435
+ }), R(B.ctx, {
1436
+ displayName: "MarkSchemaCtx<strikethrough>",
1437
+ group: "Strikethrough"
1438
+ });
1439
+ var V = O("ToggleStrikeThrough", (e) => () => oe(B.type(e)));
1440
+ R(V, {
1441
+ displayName: "Command<ToggleStrikethrough>",
1442
+ group: "Strikethrough"
1443
+ });
1444
+ var Hn = fe((e) => s(/(?<![\w:/])(~{1,2})(.+?)\1(?!\w|\/)/, B.type(e)));
1445
+ R(Hn, {
1446
+ displayName: "InputRule<strikethrough>",
1447
+ group: "Strikethrough"
1448
+ });
1449
+ var H = le("strikeThroughKeymap", { ToggleStrikethrough: {
1450
+ shortcuts: "Mod-Alt-x",
1451
+ command: (e) => {
1452
+ let t = e.get(d);
1453
+ return () => t.call(V.key);
1454
+ }
1455
+ } });
1456
+ R(H.ctx, {
1457
+ displayName: "KeymapCtx<strikethrough>",
1458
+ group: "Strikethrough"
1459
+ }), R(H.shortcuts, {
1460
+ displayName: "Keymap<strikethrough>",
1461
+ group: "Strikethrough"
1462
+ });
1463
+ var U = ke({
1464
+ tableGroup: "block",
1465
+ cellContent: "paragraph",
1466
+ cellAttributes: { alignment: {
1467
+ default: "left",
1468
+ getFromDOM: (e) => e.style.textAlign || "left",
1469
+ setDOMAttr: (e, t) => {
1470
+ t.style = `text-align: ${e || "left"}`;
1471
+ }
1472
+ } }
1473
+ }), W = D("table", () => ({
1474
+ ...U.table,
1475
+ content: "table_header_row table_row+",
1476
+ disableDropCursor: !0,
1477
+ parseMarkdown: {
1478
+ match: (e) => e.type === "table",
1479
+ runner: (e, t, n) => {
1480
+ let r = t.align, i = t.children.map((e, t) => ({
1481
+ ...e,
1482
+ align: r,
1483
+ isHeader: t === 0
1484
+ }));
1485
+ e.openNode(n), e.next(i), e.closeNode();
1486
+ }
1487
+ },
1488
+ toMarkdown: {
1489
+ match: (e) => e.type.name === "table",
1490
+ runner: (e, t) => {
1491
+ let n = t.content.firstChild?.content;
1492
+ if (!n) return;
1493
+ let r = [];
1494
+ n.forEach((e) => {
1495
+ r.push(e.attrs.alignment);
1496
+ }), e.openNode("table", void 0, { align: r }), e.next(t.content), e.closeNode();
1497
+ }
1498
+ }
1499
+ }));
1500
+ R(W.node, {
1501
+ displayName: "NodeSchema<table>",
1502
+ group: "Table"
1503
+ }), R(W.ctx, {
1504
+ displayName: "NodeSchemaCtx<table>",
1505
+ group: "Table"
1506
+ });
1507
+ var G = D("table_header_row", () => ({
1508
+ ...U.table_row,
1509
+ disableDropCursor: !0,
1510
+ content: "(table_header)*",
1511
+ parseDOM: [{ tag: "tr[data-is-header]" }, {
1512
+ tag: "tr",
1513
+ getAttrs: (e) => e instanceof HTMLElement && e.querySelector("th") ? {} : !1
1514
+ }],
1515
+ toDOM() {
1516
+ return [
1517
+ "tr",
1518
+ { "data-is-header": !0 },
1519
+ 0
1520
+ ];
1521
+ },
1522
+ parseMarkdown: {
1523
+ match: (e) => !!(e.type === "tableRow" && e.isHeader),
1524
+ runner: (e, t, n) => {
1525
+ let r = t.align, i = t.children.map((e, n) => ({
1526
+ ...e,
1527
+ align: r[n],
1528
+ isHeader: t.isHeader
1529
+ }));
1530
+ e.openNode(n), e.next(i), e.closeNode();
1531
+ }
1532
+ },
1533
+ toMarkdown: {
1534
+ match: (e) => e.type.name === "table_header_row",
1535
+ runner: (e, t) => {
1536
+ t.content.size !== 0 && (e.openNode("tableRow", void 0, { isHeader: !0 }), e.next(t.content), e.closeNode());
1537
+ }
1538
+ }
1539
+ }));
1540
+ R(G.node, {
1541
+ displayName: "NodeSchema<tableHeaderRow>",
1542
+ group: "Table"
1543
+ }), R(G.ctx, {
1544
+ displayName: "NodeSchemaCtx<tableHeaderRow>",
1545
+ group: "Table"
1546
+ });
1547
+ var K = D("table_row", () => ({
1548
+ ...U.table_row,
1549
+ disableDropCursor: !0,
1550
+ content: "(table_cell)*",
1551
+ parseMarkdown: {
1552
+ match: (e) => e.type === "tableRow",
1553
+ runner: (e, t, n) => {
1554
+ let r = t.align, i = t.children.map((e, t) => ({
1555
+ ...e,
1556
+ align: r[t]
1557
+ }));
1558
+ e.openNode(n), e.next(i), e.closeNode();
1559
+ }
1560
+ },
1561
+ toMarkdown: {
1562
+ match: (e) => e.type.name === "table_row",
1563
+ runner: (e, t) => {
1564
+ t.content.size !== 0 && (e.openNode("tableRow"), e.next(t.content), e.closeNode());
1565
+ }
1566
+ }
1567
+ }));
1568
+ R(K.node, {
1569
+ displayName: "NodeSchema<tableRow>",
1570
+ group: "Table"
1571
+ }), R(K.ctx, {
1572
+ displayName: "NodeSchemaCtx<tableRow>",
1573
+ group: "Table"
1574
+ });
1575
+ var q = D("table_cell", () => ({
1576
+ ...U.table_cell,
1577
+ disableDropCursor: !0,
1578
+ parseMarkdown: {
1579
+ match: (e) => e.type === "tableCell" && !e.isHeader,
1580
+ runner: (e, t, n) => {
1581
+ let r = t.align;
1582
+ e.openNode(n, { alignment: r }).openNode(e.schema.nodes.paragraph).next(t.children).closeNode().closeNode();
1583
+ }
1584
+ },
1585
+ toMarkdown: {
1586
+ match: (e) => e.type.name === "table_cell",
1587
+ runner: (e, t) => {
1588
+ e.openNode("tableCell").next(t.content).closeNode();
1589
+ }
1590
+ }
1591
+ }));
1592
+ R(q.node, {
1593
+ displayName: "NodeSchema<tableCell>",
1594
+ group: "Table"
1595
+ }), R(q.ctx, {
1596
+ displayName: "NodeSchemaCtx<tableCell>",
1597
+ group: "Table"
1598
+ });
1599
+ var J = D("table_header", () => ({
1600
+ ...U.table_header,
1601
+ disableDropCursor: !0,
1602
+ parseMarkdown: {
1603
+ match: (e) => e.type === "tableCell" && !!e.isHeader,
1604
+ runner: (e, t, n) => {
1605
+ let r = t.align;
1606
+ e.openNode(n, { alignment: r }), e.openNode(e.schema.nodes.paragraph), e.next(t.children), e.closeNode(), e.closeNode();
1607
+ }
1608
+ },
1609
+ toMarkdown: {
1610
+ match: (e) => e.type.name === "table_header",
1611
+ runner: (e, t) => {
1612
+ e.openNode("tableCell"), e.next(t.content), e.closeNode();
1613
+ }
1614
+ }
1615
+ }));
1616
+ R(J.node, {
1617
+ displayName: "NodeSchema<tableHeader>",
1618
+ group: "Table"
1619
+ }), R(J.ctx, {
1620
+ displayName: "NodeSchemaCtx<tableHeader>",
1621
+ group: "Table"
1622
+ });
1623
+ function Un(e, t = 3, n = 3) {
1624
+ let r = Array(n).fill(0).map(() => q.type(e).createAndFill()), i = Array(n).fill(0).map(() => J.type(e).createAndFill()), a = Array(t).fill(0).map((t, n) => n === 0 ? G.type(e).create(null, i) : K.type(e).create(null, r));
1625
+ return W.type(e).create(null, a);
1626
+ }
1627
+ function Wn(e, t) {
1628
+ let n = _e(t.$from);
1629
+ if (!n) return;
1630
+ let r = A.get(n.node);
1631
+ return (Array.isArray(e) ? e : [e]).filter((e) => e >= 0 && e <= r.width - 1).flatMap((e) => r.cellsInRect({
1632
+ left: e,
1633
+ right: e + 1,
1634
+ top: 0,
1635
+ bottom: r.height
1636
+ }).map((e) => {
1637
+ let t = n.node.nodeAt(e), r = e + n.start;
1638
+ return {
1639
+ pos: r,
1640
+ start: r + 1,
1641
+ node: t,
1642
+ depth: n.depth + 2
1643
+ };
1644
+ }));
1645
+ }
1646
+ function Gn(e, t) {
1647
+ let n = _e(t.$from);
1648
+ if (!n) return;
1649
+ let r = A.get(n.node);
1650
+ return (Array.isArray(e) ? e : [e]).filter((e) => e >= 0 && e <= r.height - 1).flatMap((e) => r.cellsInRect({
1651
+ left: 0,
1652
+ right: r.width,
1653
+ top: e,
1654
+ bottom: e + 1
1655
+ }).map((e) => {
1656
+ let t = n.node.nodeAt(e), r = e + n.start;
1657
+ return {
1658
+ pos: r,
1659
+ start: r + 1,
1660
+ node: t,
1661
+ depth: n.depth + 2
1662
+ };
1663
+ }));
1664
+ }
1665
+ function Kn(e) {
1666
+ return (t, n) => (r) => {
1667
+ n ??= r.selection.from;
1668
+ let i = r.doc.resolve(n), a = c((e) => e.type.name === "table")(i), s = a ? {
1669
+ node: a.node,
1670
+ from: a.start
1671
+ } : void 0, l = e === "row";
1672
+ if (s) {
1673
+ let e = A.get(s.node);
1674
+ if (t >= 0 && t < (l ? e.height : e.width)) {
1675
+ let n = e.positionAt(l ? t : e.height - 1, l ? e.width - 1 : t, s.node), i = r.doc.resolve(s.from + n), a = l ? j.rowSelection : j.colSelection, c = e.positionAt(l ? t : 0, l ? 0 : t, s.node), u = r.doc.resolve(s.from + c);
1676
+ return o(r.setSelection(a(i, u)));
1677
+ }
1678
+ }
1679
+ return r;
1680
+ };
1681
+ }
1682
+ var qn = Kn("row"), Jn = Kn("col");
1683
+ function Yn(e, t, { map: n, tableStart: r, table: i }, a) {
1684
+ let o = Array(a).fill(0).reduce((e, t, n) => e + i.child(n).nodeSize, r), s = Array(n.width).fill(0).map((t, r) => {
1685
+ let a = i.nodeAt(n.map[r]);
1686
+ return q.type(e).createAndFill({ alignment: a?.attrs.alignment });
1687
+ });
1688
+ return t.insert(o, K.type(e).create(null, s)), t;
1689
+ }
1690
+ function Xn(e) {
1691
+ let t = _e(e.$from);
1692
+ if (!t) return;
1693
+ let n = A.get(t.node);
1694
+ return n.cellsInRect({
1695
+ left: 0,
1696
+ right: n.width,
1697
+ top: 0,
1698
+ bottom: n.height
1699
+ }).map((e) => {
1700
+ let n = t.node.nodeAt(e), r = e + t.start;
1701
+ return {
1702
+ pos: r,
1703
+ start: r + 1,
1704
+ node: n
1705
+ };
1706
+ });
1707
+ }
1708
+ function Zn(e) {
1709
+ let t = Xn(e.selection);
1710
+ if (t && t[0]) {
1711
+ let n = e.doc.resolve(t[0].pos), r = t[t.length - 1];
1712
+ if (r) {
1713
+ let t = e.doc.resolve(r.pos);
1714
+ return o(e.setSelection(new j(t, n)));
1715
+ }
1716
+ }
1717
+ return e;
1718
+ }
1719
+ var Y = O("GoToPrevTableCell", () => () => ve(-1));
1720
+ R(Y, {
1721
+ displayName: "Command<goToPrevTableCellCommand>",
1722
+ group: "Table"
1723
+ });
1724
+ var X = O("GoToNextTableCell", () => () => ve(1));
1725
+ R(X, {
1726
+ displayName: "Command<goToNextTableCellCommand>",
1727
+ group: "Table"
1728
+ });
1729
+ var Z = O("ExitTable", (e) => () => (t, n) => {
1730
+ if (!we(t)) return !1;
1731
+ let { $head: r } = t.selection, i = l(r, W.type(e));
1732
+ if (!i) return !1;
1733
+ let { to: o } = i, s = t.tr.replaceWith(o, o, pe.type(e).createAndFill());
1734
+ return s.setSelection(a.near(s.doc.resolve(o), 1)).scrollIntoView(), n?.(s), !0;
1735
+ });
1736
+ R(Z, {
1737
+ displayName: "Command<breakTableCommand>",
1738
+ group: "Table"
1739
+ });
1740
+ var Qn = O("InsertTable", (e) => ({ row: t, col: n } = {}) => (r, i) => {
1741
+ let { selection: o, tr: s } = r, { from: c } = o, l = Un(e, t, n), u = s.replaceSelectionWith(l), d = a.findFrom(u.doc.resolve(c), 1, !0);
1742
+ return d && u.setSelection(d), i?.(u), !0;
1743
+ });
1744
+ R(Qn, {
1745
+ displayName: "Command<insertTableCommand>",
1746
+ group: "Table"
1747
+ });
1748
+ var $n = O("MoveRow", () => ({ from: e, to: t, pos: n } = {}) => be({
1749
+ from: e ?? 0,
1750
+ to: t ?? 0,
1751
+ pos: n
1752
+ }));
1753
+ R($n, {
1754
+ displayName: "Command<moveRowCommand>",
1755
+ group: "Table"
1756
+ });
1757
+ var er = O("MoveCol", () => ({ from: e, to: t, pos: n } = {}) => Ce({
1758
+ from: e ?? 0,
1759
+ to: t ?? 0,
1760
+ pos: n
1761
+ }));
1762
+ R(er, {
1763
+ displayName: "Command<moveColCommand>",
1764
+ group: "Table"
1765
+ });
1766
+ var tr = O("SelectRow", () => (e = { index: 0 }) => (t, n) => {
1767
+ let { tr: r } = t;
1768
+ return !!n?.(qn(e.index, e.pos)(r));
1769
+ });
1770
+ R(tr, {
1771
+ displayName: "Command<selectRowCommand>",
1772
+ group: "Table"
1773
+ });
1774
+ var nr = O("SelectCol", () => (e = { index: 0 }) => (t, n) => {
1775
+ let { tr: r } = t;
1776
+ return !!n?.(Jn(e.index, e.pos)(r));
1777
+ });
1778
+ R(nr, {
1779
+ displayName: "Command<selectColCommand>",
1780
+ group: "Table"
1781
+ });
1782
+ var rr = O("SelectTable", () => () => (e, t) => {
1783
+ let { tr: n } = e;
1784
+ return !!t?.(Zn(n));
1785
+ });
1786
+ R(rr, {
1787
+ displayName: "Command<selectTableCommand>",
1788
+ group: "Table"
1789
+ });
1790
+ var ir = O("DeleteSelectedCells", () => () => (e, t) => {
1791
+ let { selection: n } = e;
1792
+ if (!(n instanceof j)) return !1;
1793
+ let r = n.isRowSelection(), i = n.isColSelection();
1794
+ return r && i ? De(e, t) : i ? ge(e, t) : Se(e, t);
1795
+ });
1796
+ R(ir, {
1797
+ displayName: "Command<deleteSelectedCellsCommand>",
1798
+ group: "Table"
1799
+ });
1800
+ var ar = O("AddColBefore", () => () => xe);
1801
+ R(ar, {
1802
+ displayName: "Command<addColBeforeCommand>",
1803
+ group: "Table"
1804
+ });
1805
+ var or = O("AddColAfter", () => () => Te);
1806
+ R(or, {
1807
+ displayName: "Command<addColAfterCommand>",
1808
+ group: "Table"
1809
+ });
1810
+ var sr = O("AddRowBefore", (e) => () => (t, n) => {
1811
+ if (!we(t)) return !1;
1812
+ if (n) {
1813
+ let r = ye(t);
1814
+ n(Yn(e, t.tr, r, r.top));
1815
+ }
1816
+ return !0;
1817
+ });
1818
+ R(sr, {
1819
+ displayName: "Command<addRowBeforeCommand>",
1820
+ group: "Table"
1821
+ });
1822
+ var cr = O("AddRowAfter", (e) => () => (t, n) => {
1823
+ if (!we(t)) return !1;
1824
+ if (n) {
1825
+ let r = ye(t);
1826
+ n(Yn(e, t.tr, r, r.bottom));
1827
+ }
1828
+ return !0;
1829
+ });
1830
+ R(cr, {
1831
+ displayName: "Command<addRowAfterCommand>",
1832
+ group: "Table"
1833
+ });
1834
+ var lr = O("SetAlign", () => (e = "left") => he("alignment", e));
1835
+ R(lr, {
1836
+ displayName: "Command<setAlignCommand>",
1837
+ group: "Table"
1838
+ });
1839
+ var ur = fe((e) => new T(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/, (t, r, i, a) => {
1840
+ let o = t.doc.resolve(i);
1841
+ if (!o.node(-1).canReplaceWith(o.index(-1), o.indexAfter(-1), W.type(e))) return null;
1842
+ let s = Un(e, Math.max(Number(r.groups?.row ?? 0), 2), Number(r.groups?.col)), c = t.tr.replaceRangeWith(i, a, s);
1843
+ return c.setSelection(n.create(c.doc, i + 3)).scrollIntoView();
1844
+ }));
1845
+ R(ur, {
1846
+ displayName: "InputRule<insertTableInputRule>",
1847
+ group: "Table"
1848
+ });
1849
+ var dr = de((t) => ({ run: (n, r, a) => {
1850
+ if (a) return n;
1851
+ function o(n) {
1852
+ let r = n.childCount, a = n.lastChild?.childCount ?? 0;
1853
+ if (r === 0 || a === 0) return pe.type(t).create();
1854
+ let o = n.firstChild;
1855
+ if (!(a > 0 && o && o.childCount === 0)) return n;
1856
+ if (r >= 3) {
1857
+ let e = n.child(1), i = [];
1858
+ for (let n = 0; n < e.childCount; n++) {
1859
+ let r = e.child(n);
1860
+ i.push(J.type(t).create(r.attrs, r.content, r.marks));
1861
+ }
1862
+ let a = o.type.create(o.attrs, i), s = [];
1863
+ for (let e = 2; e < r; e++) s.push(n.child(e));
1864
+ return n.type.create(n.attrs, [a, ...s]);
1865
+ }
1866
+ let s = Array(a).fill(0).map(() => J.type(t).createAndFill()), c = new i(e.from(s), 0, 0), l = o.replace(0, 0, c);
1867
+ return n.replace(0, o.nodeSize, new i(e.from(l), 0, 0));
1868
+ }
1869
+ function s(n) {
1870
+ let r = K.type(t), i = [], a = [], s = !1;
1871
+ function c() {
1872
+ if (a.length === 0) return;
1873
+ let e = G.type(t).createAndFill(), n = W.type(t).create(null, [e, ...a]);
1874
+ i.push(o(n)), a = [];
1875
+ }
1876
+ return n.forEach((e) => {
1877
+ e.type === r ? (s = !0, a.push(e)) : (c(), i.push(e));
1878
+ }), c(), s ? e.from(i) : n;
1879
+ }
1880
+ function c(n) {
1881
+ let r = s(n), i = r !== n, a = [];
1882
+ return r.forEach((e) => {
1883
+ if (e.type === W.type(t)) {
1884
+ let t = o(e);
1885
+ t !== e && (i = !0), a.push(t);
1886
+ } else if (e.childCount > 0) {
1887
+ let t = c(e.content);
1888
+ t === e.content ? a.push(e) : (i = !0, a.push(e.copy(t)));
1889
+ } else a.push(e);
1890
+ }), i ? e.from(a) : n;
1891
+ }
1892
+ function l(n) {
1893
+ let r = [], i = [];
1894
+ n.forEach((e) => i.push(e));
1895
+ for (let e = 0; e < i.length; e++) {
1896
+ let n = i[e], a = i[e + 1];
1897
+ n.type === pe.type(t) && n.content.size === 0 && a && a.type === W.type(t) || r.push(n);
1898
+ }
1899
+ return r.length < i.length ? e.from(r) : n;
1900
+ }
1901
+ let u = c(n.content);
1902
+ return u = l(u), new i(e.from(u), n.openStart, n.openEnd);
1903
+ } }));
1904
+ R(dr, {
1905
+ displayName: "PasteRule<table>",
1906
+ group: "Table"
1907
+ });
1908
+ var Q = le("tableKeymap", {
1909
+ NextCell: {
1910
+ priority: 100,
1911
+ shortcuts: ["Mod-]", "Tab"],
1912
+ command: (e) => {
1913
+ let t = e.get(d);
1914
+ return () => t.call(X.key);
1915
+ }
1916
+ },
1917
+ PrevCell: {
1918
+ shortcuts: ["Mod-[", "Shift-Tab"],
1919
+ command: (e) => {
1920
+ let t = e.get(d);
1921
+ return () => t.call(Y.key);
1922
+ }
1923
+ },
1924
+ ExitTable: {
1925
+ shortcuts: ["Mod-Enter", "Enter"],
1926
+ command: (e) => {
1927
+ let t = e.get(d);
1928
+ return () => t.call(Z.key);
1929
+ }
1930
+ }
1931
+ });
1932
+ R(Q.ctx, {
1933
+ displayName: "KeymapCtx<table>",
1934
+ group: "Table"
1935
+ }), R(Q.shortcuts, {
1936
+ displayName: "Keymap<table>",
1937
+ group: "Table"
1938
+ });
1939
+ var fr = "footnote_definition", pr = "footnoteDefinition", $ = D("footnote_definition", () => ({
1940
+ group: "block",
1941
+ content: "block+",
1942
+ defining: !0,
1943
+ attrs: { label: {
1944
+ default: "",
1945
+ validate: "string"
1946
+ } },
1947
+ parseDOM: [{
1948
+ tag: `dl[data-type="${fr}"]`,
1949
+ getAttrs: (e) => {
1950
+ if (!(e instanceof HTMLElement)) throw u(e);
1951
+ return { label: e.dataset.label };
1952
+ },
1953
+ contentElement: "dd"
1954
+ }],
1955
+ toDOM: (e) => {
1956
+ let t = e.attrs.label;
1957
+ return [
1958
+ "dl",
1959
+ {
1960
+ "data-label": t,
1961
+ "data-type": fr
1962
+ },
1963
+ ["dt", t],
1964
+ ["dd", 0]
1965
+ ];
1966
+ },
1967
+ parseMarkdown: {
1968
+ match: ({ type: e }) => e === pr,
1969
+ runner: (e, t, n) => {
1970
+ e.openNode(n, { label: t.label }).next(t.children).closeNode();
1971
+ }
1972
+ },
1973
+ toMarkdown: {
1974
+ match: (e) => e.type.name === fr,
1975
+ runner: (e, t) => {
1976
+ e.openNode(pr, void 0, {
1977
+ label: t.attrs.label,
1978
+ identifier: t.attrs.label
1979
+ }).next(t.content).closeNode();
1980
+ }
1981
+ }
1982
+ }));
1983
+ R($.ctx, {
1984
+ displayName: "NodeSchemaCtx<footnodeDef>",
1985
+ group: "footnote"
1986
+ }), R($.node, {
1987
+ displayName: "NodeSchema<footnodeDef>",
1988
+ group: "footnote"
1989
+ });
1990
+ var mr = "footnote_reference", hr = D("footnote_reference", () => ({
1991
+ group: "inline",
1992
+ inline: !0,
1993
+ atom: !0,
1994
+ attrs: { label: {
1995
+ default: "",
1996
+ validate: "string"
1997
+ } },
1998
+ parseDOM: [{
1999
+ tag: `sup[data-type="${mr}"]`,
2000
+ getAttrs: (e) => {
2001
+ if (!(e instanceof HTMLElement)) throw u(e);
2002
+ return { label: e.dataset.label };
2003
+ }
2004
+ }],
2005
+ toDOM: (e) => {
2006
+ let t = e.attrs.label;
2007
+ return [
2008
+ "sup",
2009
+ {
2010
+ "data-label": t,
2011
+ "data-type": mr
2012
+ },
2013
+ t
2014
+ ];
2015
+ },
2016
+ parseMarkdown: {
2017
+ match: ({ type: e }) => e === "footnoteReference",
2018
+ runner: (e, t, n) => {
2019
+ e.addNode(n, { label: t.label });
2020
+ }
2021
+ },
2022
+ toMarkdown: {
2023
+ match: (e) => e.type.name === mr,
2024
+ runner: (e, t) => {
2025
+ e.addNode("footnoteReference", void 0, void 0, {
2026
+ label: t.attrs.label,
2027
+ identifier: t.attrs.label
2028
+ });
2029
+ }
2030
+ }
2031
+ }));
2032
+ R(hr.ctx, {
2033
+ displayName: "NodeSchemaCtx<footnodeRef>",
2034
+ group: "footnote"
2035
+ }), R(hr.node, {
2036
+ displayName: "NodeSchema<footnodeRef>",
2037
+ group: "footnote"
2038
+ });
2039
+ var gr = me.extendSchema((e) => (t) => {
2040
+ let n = e(t);
2041
+ return {
2042
+ ...n,
2043
+ attrs: {
2044
+ ...n.attrs,
2045
+ checked: {
2046
+ default: null,
2047
+ validate: "boolean|null"
2048
+ }
2049
+ },
2050
+ parseDOM: [{
2051
+ tag: "li[data-item-type=\"task\"]",
2052
+ getAttrs: (e) => {
2053
+ if (!(e instanceof HTMLElement)) throw u(e);
2054
+ return {
2055
+ label: e.dataset.label,
2056
+ listType: e.dataset.listType,
2057
+ spread: e.dataset.spread,
2058
+ checked: e.dataset.checked ? e.dataset.checked === "true" : null
2059
+ };
2060
+ }
2061
+ }, ...n?.parseDOM || []],
2062
+ toDOM: (e) => n.toDOM && e.attrs.checked == null ? n.toDOM(e) : [
2063
+ "li",
2064
+ {
2065
+ "data-item-type": "task",
2066
+ "data-label": e.attrs.label,
2067
+ "data-list-type": e.attrs.listType,
2068
+ "data-spread": e.attrs.spread,
2069
+ "data-checked": e.attrs.checked
2070
+ },
2071
+ 0
2072
+ ],
2073
+ parseMarkdown: {
2074
+ match: ({ type: e }) => e === "listItem",
2075
+ runner: (e, t, r) => {
2076
+ if (t.checked == null) {
2077
+ n.parseMarkdown.runner(e, t, r);
2078
+ return;
2079
+ }
2080
+ let i = t.label == null ? "•" : `${t.label}.`, a = t.checked == null ? null : !!t.checked, o = t.label == null ? "bullet" : "ordered", s = t.spread == null ? "true" : `${t.spread}`;
2081
+ e.openNode(r, {
2082
+ label: i,
2083
+ listType: o,
2084
+ spread: s,
2085
+ checked: a
2086
+ }), e.next(t.children), e.closeNode();
2087
+ }
2088
+ },
2089
+ toMarkdown: {
2090
+ match: (e) => e.type.name === "list_item",
2091
+ runner: (e, t) => {
2092
+ if (t.attrs.checked == null) {
2093
+ n.toMarkdown.runner(e, t);
2094
+ return;
2095
+ }
2096
+ let r = t.attrs.label, i = t.attrs.listType, a = t.attrs.spread === "true", o = t.attrs.checked;
2097
+ e.openNode("listItem", void 0, {
2098
+ label: r,
2099
+ listType: i,
2100
+ spread: a,
2101
+ checked: o
2102
+ }), e.next(t.content), e.closeNode();
2103
+ }
2104
+ }
2105
+ };
2106
+ });
2107
+ R(gr.node, {
2108
+ displayName: "NodeSchema<taskListItem>",
2109
+ group: "ListItem"
2110
+ }), R(gr.ctx, {
2111
+ displayName: "NodeSchemaCtx<taskListItem>",
2112
+ group: "ListItem"
2113
+ });
2114
+ var _r = fe(() => new T(/^\[(?<checked>\s|x)\]\s$/, (e, t, n, r) => {
2115
+ let i = e.doc.resolve(n), a = 0, o = i.node(a);
2116
+ for (; o && o.type.name !== "list_item";) a--, o = i.node(a);
2117
+ if (!o || o.attrs.checked != null) return null;
2118
+ let s = t.groups?.checked === "x", c = i.before(a), l = e.tr;
2119
+ return l.deleteRange(n, r).setNodeMarkup(c, void 0, {
2120
+ ...o.attrs,
2121
+ checked: s
2122
+ }), l;
2123
+ }));
2124
+ R(_r, {
2125
+ displayName: "InputRule<wrapInTaskListInputRule>",
2126
+ group: "ListItem"
2127
+ });
2128
+ var vr = [H, Q].flat(), yr = [ur, _r], br = [Hn], xr = [dr], Sr = k(() => Be);
2129
+ R(Sr, {
2130
+ displayName: "Prose<autoInsertSpanPlugin>",
2131
+ group: "Prose"
2132
+ });
2133
+ var Cr = k(() => Ee({}));
2134
+ R(Cr, {
2135
+ displayName: "Prose<columnResizingPlugin>",
2136
+ group: "Prose"
2137
+ });
2138
+ var wr = k(() => Oe({ allowTableNodeSelection: !0 }));
2139
+ R(wr, {
2140
+ displayName: "Prose<tableEditingPlugin>",
2141
+ group: "Prose"
2142
+ });
2143
+ var Tr = ce("remarkGFM", () => Vn);
2144
+ R(Tr.plugin, {
2145
+ displayName: "Remark<remarkGFMPlugin>",
2146
+ group: "Remark"
2147
+ }), R(Tr.options, {
2148
+ displayName: "RemarkConfig<remarkGFMPlugin>",
2149
+ group: "Remark"
2150
+ });
2151
+ var Er = new t("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");
2152
+ function Dr(e, t) {
2153
+ let n = 0;
2154
+ return t.forEach((t, r, i) => {
2155
+ t === e && (n = i);
2156
+ }), n;
2157
+ }
2158
+ var Or = k(() => new r({
2159
+ key: Er,
2160
+ appendTransaction: (e, t, n) => {
2161
+ let r;
2162
+ return t.doc !== n.doc && n.doc.descendants((e, t) => {
2163
+ if (r ||= n.tr, e.type.name !== "table_cell") return;
2164
+ let i = n.doc.resolve(t), a = i.node(i.depth), o = i.node(i.depth - 1).firstChild;
2165
+ if (!o) return;
2166
+ let s = Dr(e, a), c = o.maybeChild(s);
2167
+ if (!c) return;
2168
+ let l = c.attrs.alignment;
2169
+ l !== e.attrs.alignment && r.setNodeMarkup(t, void 0, {
2170
+ ...e.attrs,
2171
+ alignment: l
2172
+ });
2173
+ }), r;
2174
+ }
2175
+ }));
2176
+ R(Or, {
2177
+ displayName: "Prose<keepTableAlignPlugin>",
2178
+ group: "Prose"
2179
+ });
2180
+ var kr = [
2181
+ Or,
2182
+ Sr,
2183
+ Tr,
2184
+ wr
2185
+ ].flat(), Ar = [
2186
+ gr,
2187
+ W,
2188
+ G,
2189
+ K,
2190
+ J,
2191
+ q,
2192
+ $,
2193
+ hr,
2194
+ z,
2195
+ B
2196
+ ].flat(), jr = [
2197
+ X,
2198
+ Y,
2199
+ Z,
2200
+ Qn,
2201
+ $n,
2202
+ er,
2203
+ tr,
2204
+ nr,
2205
+ rr,
2206
+ ir,
2207
+ sr,
2208
+ cr,
2209
+ ar,
2210
+ or,
2211
+ lr,
2212
+ V
2213
+ ], Mr = [
2214
+ Ar,
2215
+ yr,
2216
+ xr,
2217
+ br,
2218
+ vr,
2219
+ jr,
2220
+ kr
2221
+ ].flat();
2222
+ //#endregion
2223
+ export { or as addColAfterCommand, ar as addColBeforeCommand, cr as addRowAfterCommand, sr as addRowBeforeCommand, Yn as addRowWithAlignment, Sr as autoInsertSpanPlugin, Cr as columnResizingPlugin, jr as commands, Un as createTable, ir as deleteSelectedCellsCommand, Z as exitTable, gr as extendListItemSchemaForTask, $ as footnoteDefinitionSchema, hr as footnoteReferenceSchema, Xn as getAllCellsInTable, Wn as getCellsInCol, Gn as getCellsInRow, Mr as gfm, X as goToNextTableCellCommand, Y as goToPrevTableCellCommand, yr as inputRules, Qn as insertTableCommand, ur as insertTableInputRule, Or as keepTableAlignPlugin, vr as keymap, br as markInputRules, er as moveColCommand, $n as moveRowCommand, xr as pasteRules, kr as plugins, Tr as remarkGFMPlugin, Ar as schema, Jn as selectCol, nr as selectColCommand, Kn as selectLine, qn as selectRow, tr as selectRowCommand, Zn as selectTable, rr as selectTableCommand, lr as setAlignCommand, z as strikethroughAttr, Hn as strikethroughInputRule, H as strikethroughKeymap, B as strikethroughSchema, q as tableCellSchema, wr as tableEditingPlugin, G as tableHeaderRowSchema, J as tableHeaderSchema, Q as tableKeymap, dr as tablePasteRule, K as tableRowSchema, W as tableSchema, V as toggleStrikethroughCommand, _r as wrapInTaskListInputRule };