@art-md/constructs 0.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.
@@ -0,0 +1,3135 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.defineProperty, t = (t, n) => {
3
+ let r = {};
4
+ for (var i in t) e(r, i, {
5
+ get: t[i],
6
+ enumerable: !0
7
+ });
8
+ return n || e(r, Symbol.toStringTag, { value: "Module" }), r;
9
+ };
10
+ //#endregion
11
+ //#region ../primitives/src/document/createArtDocument.ts
12
+ function n(e) {
13
+ return {
14
+ construct: "Document",
15
+ children: e?.children ?? []
16
+ };
17
+ }
18
+ //#endregion
19
+ //#region ../primitives/src/parser/helpers/nodePosition.ts
20
+ function r(e) {
21
+ if (!e.position) throw Error(`Expected source position for ${e.type}`);
22
+ let t = e.position;
23
+ if (!t?.start || !t.end) throw Error(`Expected source position for ${e.type}`);
24
+ return {
25
+ start: {
26
+ line: t.start.line,
27
+ column: t.start.column,
28
+ offset: t.start.offset ?? 0
29
+ },
30
+ end: {
31
+ line: t.end.line,
32
+ column: t.end.column,
33
+ offset: t.end.offset ?? 0
34
+ }
35
+ };
36
+ }
37
+ //#endregion
38
+ //#region ../primitives/src/parser/helpers/sectionDepth.ts
39
+ function i(e) {
40
+ return e.depth ?? 1;
41
+ }
42
+ //#endregion
43
+ //#region src/factories/constructs/Document/factory/createDocument.ts
44
+ function a(e) {
45
+ return n({
46
+ ...e,
47
+ children: e.children || []
48
+ });
49
+ }
50
+ //#endregion
51
+ //#region src/factories/constructs/FieldBlock/factory/createFieldBlock.ts
52
+ function o(e) {
53
+ let t = {
54
+ construct: "FieldBlock",
55
+ name: e.name,
56
+ children: e.children ?? []
57
+ };
58
+ return e.tags?.length && (t.tags = e.tags), t;
59
+ }
60
+ //#endregion
61
+ //#region src/factories/constructs/FieldInline/factory/createFieldInline.ts
62
+ function s(e) {
63
+ let t = {
64
+ construct: "FieldInline",
65
+ name: e.name,
66
+ children: e.children ?? []
67
+ };
68
+ return e.tags?.length && (t.tags = e.tags), t;
69
+ }
70
+ //#endregion
71
+ //#region src/factories/constructs/NaturalBlock/factory/createNaturalBlock.ts
72
+ function c(e) {
73
+ let t = {
74
+ ...e.attributes,
75
+ construct: "NaturalBlock",
76
+ value: e.value,
77
+ children: e.children
78
+ };
79
+ return e.type && (t.type = e.type), e.lang !== void 0 && (t.lang = e.lang), e.meta !== void 0 && (t.meta = e.meta), e.tags?.length && (t.tags = e.tags), t;
80
+ }
81
+ //#endregion
82
+ //#region src/factories/constructs/NaturalExpression/factory/createNaturalExpression.ts
83
+ function l(e) {
84
+ return {
85
+ construct: "NaturalExpression",
86
+ type: e.type,
87
+ value: e.value,
88
+ attributes: e.attributes,
89
+ children: e.children ?? []
90
+ };
91
+ }
92
+ //#endregion
93
+ //#region src/factories/constructs/SectionBlock/factory/createSectionBlock.ts
94
+ function u(e) {
95
+ let t = {
96
+ construct: "SectionBlock",
97
+ name: e.name,
98
+ children: e.children ?? []
99
+ };
100
+ return e.kind && (t.kind = e.kind), e.depth !== void 0 && (t.depth = e.depth), e.tags?.length && (t.tags = e.tags), t;
101
+ }
102
+ //#endregion
103
+ //#region src/factories/constructs/Tag/factory/createTag.ts
104
+ function d(e) {
105
+ return {
106
+ construct: "Tag",
107
+ name: e.name
108
+ };
109
+ }
110
+ //#endregion
111
+ //#region src/factories/public.ts
112
+ var f = [
113
+ {
114
+ name: "Document",
115
+ factory: a
116
+ },
117
+ {
118
+ name: "FieldBlock",
119
+ factory: o
120
+ },
121
+ {
122
+ name: "FieldInline",
123
+ factory: s
124
+ },
125
+ {
126
+ name: "NaturalBlock",
127
+ factory: c
128
+ },
129
+ {
130
+ name: "NaturalExpression",
131
+ factory: l
132
+ },
133
+ {
134
+ name: "SectionBlock",
135
+ factory: u
136
+ },
137
+ {
138
+ name: "Tag",
139
+ factory: d
140
+ }
141
+ ], p = new Set([
142
+ "FieldBlock",
143
+ "FieldInline",
144
+ "SectionBlock"
145
+ ]);
146
+ function m(e, t) {
147
+ return p.has(e.construct) && t.parent() || t;
148
+ }
149
+ //#endregion
150
+ //#region src/parser/constructs/FieldBlock/private/integrator/createFieldBlockIntegrator.ts
151
+ function h() {
152
+ return { integrate(e, t, n) {
153
+ let r = n;
154
+ return e.captureChildConstruct(r), e.childContext(r, m);
155
+ } };
156
+ }
157
+ //#endregion
158
+ //#region src/parser/fields/constants.ts
159
+ var g = /^[A-Za-z][A-Za-z ]*:(?:\s|$)/;
160
+ //#endregion
161
+ //#region src/parser/mdast/rawSlice.ts
162
+ function _(e, t) {
163
+ return !e.position?.start || !e.position?.end ? "" : t.source.markdown.slice(e.position.start.offset, e.position.end.offset);
164
+ }
165
+ //#endregion
166
+ //#region src/parser/fields/stripStrong.ts
167
+ function v(e, t) {
168
+ let n = _(e, t);
169
+ return n.length >= 4 && (n.startsWith("**") && n.endsWith("**") || n.startsWith("__") && n.endsWith("__")) ? n.slice(2, -2) : n;
170
+ }
171
+ //#endregion
172
+ //#region src/parser/fields/isFieldStrong.ts
173
+ function y(e, t) {
174
+ return e.type === "strong" && g.test(v(e, t));
175
+ }
176
+ //#endregion
177
+ //#region src/parser/tags/extractTags.ts
178
+ var b = /^(.*?)((?:\(#[\w-]+\)\s*)+)$/, x = /\(#([\w-]+)\)/g;
179
+ function S(e) {
180
+ let t = e.trimEnd().match(b);
181
+ return !t || !t[1] || !t[2] ? {
182
+ tags: [],
183
+ stripped: e
184
+ } : {
185
+ tags: [...t[2].matchAll(x)].map((e) => d({ name: e[1] ?? "" })),
186
+ stripped: t[1].trimEnd()
187
+ };
188
+ }
189
+ //#endregion
190
+ //#region src/parser/constructs/FieldBlock/private/helpers/createFieldBlockFromNode.ts
191
+ function C(e, t) {
192
+ let n = e.children[0], i = _(e, t), a = _(n, t), { tags: s, stripped: c } = S(i.slice(a.length));
193
+ if (c.trim().length > 0) return null;
194
+ let l = v(n, t), u = l.indexOf(":"), d = o({
195
+ name: l.slice(0, u).trim(),
196
+ tags: s
197
+ });
198
+ return d.position = r(e), d;
199
+ }
200
+ //#endregion
201
+ //#region src/parser/constructs/FieldBlock/private/processor/createFieldBlockProcessor.ts
202
+ function w() {
203
+ return { captureNode(e, t) {
204
+ if (t.type !== "paragraph") return null;
205
+ let n = t, r = n.children[0];
206
+ return r === void 0 || !y(r, e) ? null : C(n, e);
207
+ } };
208
+ }
209
+ //#endregion
210
+ //#region src/parser/constructs/FieldBlock/createFieldBlockParser.ts
211
+ var T = () => ({
212
+ name: "FieldBlock",
213
+ processor: w(),
214
+ integrator: h()
215
+ });
216
+ //#endregion
217
+ //#region src/parser/naturalExpression/createNaturalExpressionFromNode.ts
218
+ function E(e) {
219
+ let { position: t, children: n, type: i, value: a, ...o } = e, s = [];
220
+ return Array.isArray(n) && (s = n.map((e) => E(e))), {
221
+ construct: "NaturalExpression",
222
+ type: i,
223
+ attributes: o,
224
+ value: a,
225
+ position: r(e),
226
+ children: s
227
+ };
228
+ }
229
+ //#endregion
230
+ //#region src/parser/constructs/FieldInline/private/helpers/trimFieldEdges.ts
231
+ function D(e) {
232
+ let t = [...e], n = t[0], r = t[t.length - 1];
233
+ return n?.type === "text" && typeof n?.value == "string" && (n.value = n.value.replace(/^\s+/, "")), r?.type === "text" && typeof r?.value == "string" && (r.value = r.value.replace(/\s+$/, "")), t.filter((e) => e.type !== "text" || typeof e.value == "string" && e.value.length > 0);
234
+ }
235
+ //#endregion
236
+ //#region src/parser/constructs/FieldInline/private/helpers/createFieldInlineFromNode.ts
237
+ function O(e, t) {
238
+ let n = e.children[0], i = _(e, t), a = _(n, t), { stripped: o } = S(i.slice(a.length));
239
+ if (o.trim().length === 0) return null;
240
+ let c = v(n, t), l = c.indexOf(":"), u = D(e.children.slice(1).map((e) => E(e))), d = u[u.length - 1], f = [];
241
+ if (d?.type === "text" && typeof d.value == "string") {
242
+ let e = S(d.value);
243
+ e.tags.length && (f = e.tags, d.value = e.stripped);
244
+ }
245
+ let p = s({
246
+ name: c.slice(0, l).trim(),
247
+ children: u,
248
+ tags: f
249
+ });
250
+ return p.position = r(e), p;
251
+ }
252
+ //#endregion
253
+ //#region src/parser/constructs/FieldInline/private/processor/createFieldInlineProcessor.ts
254
+ function k() {
255
+ return { captureNode(e, t) {
256
+ if (t.type !== "paragraph") return null;
257
+ let n = t, r = n.children[0];
258
+ return r === void 0 || !y(r, e) ? null : O(n, e);
259
+ } };
260
+ }
261
+ //#endregion
262
+ //#region src/parser/constructs/FieldInline/createFieldInlineParser.ts
263
+ var A = () => ({
264
+ name: "FieldInline",
265
+ processor: k()
266
+ }), j = (function(e) {
267
+ if (e == null) return I;
268
+ if (typeof e == "function") return F(e);
269
+ if (typeof e == "object") return Array.isArray(e) ? M(e) : N(e);
270
+ if (typeof e == "string") return P(e);
271
+ throw Error("Expected function, string, or object as test");
272
+ });
273
+ function M(e) {
274
+ let t = [], n = -1;
275
+ for (; ++n < e.length;) t[n] = j(e[n]);
276
+ return F(r);
277
+ function r(...e) {
278
+ let n = -1;
279
+ for (; ++n < t.length;) if (t[n].apply(this, e)) return !0;
280
+ return !1;
281
+ }
282
+ }
283
+ function N(e) {
284
+ let t = e;
285
+ return F(n);
286
+ function n(n) {
287
+ let r = n, i;
288
+ for (i in e) if (r[i] !== t[i]) return !1;
289
+ return !0;
290
+ }
291
+ }
292
+ function P(e) {
293
+ return F(t);
294
+ function t(t) {
295
+ return t && t.type === e;
296
+ }
297
+ }
298
+ function F(e) {
299
+ return t;
300
+ function t(t, n, r) {
301
+ return !!(L(t) && e.call(this, t, typeof n == "number" ? n : void 0, r || void 0));
302
+ }
303
+ }
304
+ function I() {
305
+ return !0;
306
+ }
307
+ function L(e) {
308
+ return typeof e == "object" && !!e && "type" in e;
309
+ }
310
+ //#endregion
311
+ //#region ../../node_modules/mdast-util-phrasing/lib/index.js
312
+ var R = j([
313
+ "break",
314
+ "delete",
315
+ "emphasis",
316
+ "footnote",
317
+ "footnoteReference",
318
+ "image",
319
+ "imageReference",
320
+ "inlineCode",
321
+ "inlineMath",
322
+ "link",
323
+ "linkReference",
324
+ "mdxJsxTextElement",
325
+ "mdxTextExpression",
326
+ "strong",
327
+ "text",
328
+ "textDirective"
329
+ ]);
330
+ //#endregion
331
+ //#region src/parser/constructs/NaturalBlock/private/helpers/createNaturalBlockFromNode.ts
332
+ function ee(e, t) {
333
+ let n = [];
334
+ if (Array.isArray(e.children)) {
335
+ let r = e.children ?? [], i = e.type === "paragraph" || e.type === "heading" || e.type === "tableCell";
336
+ n = r.map((e) => i || R(e) ? E(e) : ee(e, t));
337
+ }
338
+ let i = [];
339
+ if (e.type === "paragraph") {
340
+ let e = n[n.length - 1];
341
+ if (e?.type === "text" && typeof e.value == "string") {
342
+ let { tags: t, stripped: n } = S(e.value);
343
+ t.length && (i = t, e.value = n);
344
+ }
345
+ }
346
+ let { type: a, ...o } = e, s = c({
347
+ value: _(e, t),
348
+ children: n,
349
+ type: a,
350
+ attributes: o,
351
+ tags: i
352
+ });
353
+ return s.position = r(e), s;
354
+ }
355
+ //#endregion
356
+ //#region src/parser/constructs/NaturalBlock/private/processor/createNaturalBlockProcessor.ts
357
+ function te() {
358
+ return { captureNode(e, t) {
359
+ return ee(t, e);
360
+ } };
361
+ }
362
+ //#endregion
363
+ //#region src/parser/constructs/NaturalBlock/createNaturalBlockParser.ts
364
+ var ne = () => ({
365
+ name: "NaturalBlock",
366
+ processor: te()
367
+ });
368
+ //#endregion
369
+ //#region src/parser/constructs/SectionBlock/private/helpers/findParentSection.ts
370
+ function re(e) {
371
+ let t = e;
372
+ for (; t;) {
373
+ if (t.construct?.construct === "SectionBlock") return t.construct;
374
+ t = t.parent();
375
+ }
376
+ }
377
+ //#endregion
378
+ //#region src/parser/constructs/SectionBlock/private/integrator/createSectionBlockIntegrator.ts
379
+ function ie() {
380
+ return { integrate(e, t, n) {
381
+ let r = n, a = e, o = t;
382
+ for (; a.construct.construct === "SectionBlock";) {
383
+ let e = re(a);
384
+ if (e && i(e) >= o.depth) {
385
+ let e = a.parent();
386
+ e && (a = e);
387
+ } else break;
388
+ }
389
+ return a.captureChildConstruct(r), a.childContext(r);
390
+ } };
391
+ }
392
+ //#endregion
393
+ //#region src/parser/constructs/SectionBlock/private/constants.ts
394
+ var ae = /^([\w-]+(?: [\w-]+)*):\s*(.+)$/;
395
+ //#endregion
396
+ //#region src/parser/constructs/SectionBlock/private/helpers/createSectionBlockFromNode.ts
397
+ function oe(e, t) {
398
+ let { tags: n, stripped: i } = S(_(e, t).replace(/^[ \t]*#+[ \t]*/, "").trim()), a = i.match(ae), o = u({
399
+ name: a?.[2]?.trim() ?? i,
400
+ kind: a?.[1],
401
+ depth: e.depth,
402
+ children: [],
403
+ tags: n
404
+ });
405
+ return o.position = r(e), o;
406
+ }
407
+ //#endregion
408
+ //#region src/parser/constructs/SectionBlock/private/processor/createSectionBlockProcessor.ts
409
+ function se() {
410
+ return { captureNode(e, t) {
411
+ return t.type === "heading" ? oe(t, e) : null;
412
+ } };
413
+ }
414
+ //#endregion
415
+ //#region src/parser/constructs/SectionBlock/createSectionBlockParser.ts
416
+ var ce = () => ({
417
+ name: "SectionBlock",
418
+ processor: se(),
419
+ integrator: ie()
420
+ });
421
+ //#endregion
422
+ //#region src/parser/document/createArtDocumentFromNode.ts
423
+ function le(e) {
424
+ let t = a({});
425
+ return t.position = r(e), t;
426
+ }
427
+ //#endregion
428
+ //#region src/parser/public.ts
429
+ var ue = [
430
+ T,
431
+ A,
432
+ ce
433
+ ], de = ne;
434
+ //#endregion
435
+ //#region src/serializer/constructs/Document/createDocumentToMdast.ts
436
+ function fe() {
437
+ return {
438
+ name: "Document",
439
+ toMdast(e, t) {
440
+ return {
441
+ type: "root",
442
+ children: t
443
+ };
444
+ }
445
+ };
446
+ }
447
+ //#endregion
448
+ //#region src/serializer/tags/tagToMdast.ts
449
+ function pe(e) {
450
+ return {
451
+ type: "text",
452
+ value: `(#${e.name})`
453
+ };
454
+ }
455
+ //#endregion
456
+ //#region src/serializer/tags/tagsToMdast.ts
457
+ function z(e) {
458
+ return {
459
+ type: "text",
460
+ value: ` ${e.map((e) => pe(e).value).join(" ")}`
461
+ };
462
+ }
463
+ //#endregion
464
+ //#region src/serializer/constructs/FieldBlock/createFieldBlockToMdast.ts
465
+ function me() {
466
+ return {
467
+ name: "FieldBlock",
468
+ toMdast(e, t) {
469
+ let n = e, r = n.tags?.length ? z(n.tags) : null;
470
+ return {
471
+ type: "paragraph",
472
+ children: [{
473
+ type: "strong",
474
+ children: [{
475
+ type: "text",
476
+ value: `${n.name}:`
477
+ }]
478
+ }, ...r ? [r] : []]
479
+ };
480
+ }
481
+ };
482
+ }
483
+ //#endregion
484
+ //#region src/serializer/constructs/FieldInline/createFieldInlineToMdast.ts
485
+ function he() {
486
+ return {
487
+ name: "FieldInline",
488
+ toMdast(e, t) {
489
+ let n = e, r = n.tags?.length ? z(n.tags) : null;
490
+ return {
491
+ type: "paragraph",
492
+ children: [
493
+ {
494
+ type: "strong",
495
+ children: [{
496
+ type: "text",
497
+ value: `${n.name}:`
498
+ }]
499
+ },
500
+ {
501
+ type: "text",
502
+ value: " "
503
+ },
504
+ ...t,
505
+ ...r ? [r] : []
506
+ ]
507
+ };
508
+ }
509
+ };
510
+ }
511
+ //#endregion
512
+ //#region ../../node_modules/mdast-util-to-string/lib/index.js
513
+ var ge = {};
514
+ function _e(e, t) {
515
+ let n = t || ge;
516
+ return ve(e, typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, typeof n.includeHtml == "boolean" ? n.includeHtml : !0);
517
+ }
518
+ function ve(e, t, n) {
519
+ if (be(e)) {
520
+ if ("value" in e) return e.type === "html" && !n ? "" : e.value;
521
+ if (t && "alt" in e && e.alt) return e.alt;
522
+ if ("children" in e) return ye(e.children, t, n);
523
+ }
524
+ return Array.isArray(e) ? ye(e, t, n) : "";
525
+ }
526
+ function ye(e, t, n) {
527
+ let r = [], i = -1;
528
+ for (; ++i < e.length;) r[i] = ve(e[i], t, n);
529
+ return r.join("");
530
+ }
531
+ function be(e) {
532
+ return !!(e && typeof e == "object");
533
+ }
534
+ //#endregion
535
+ //#region ../../node_modules/decode-named-character-reference/index.dom.js
536
+ var xe = document.createElement("i");
537
+ function Se(e) {
538
+ let t = "&" + e + ";";
539
+ xe.innerHTML = t;
540
+ let n = xe.textContent;
541
+ return n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n;
542
+ }
543
+ //#endregion
544
+ //#region ../../node_modules/micromark-util-chunked/index.js
545
+ function B(e, t, n, r) {
546
+ let i = e.length, a = 0, o;
547
+ if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
548
+ else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
549
+ }
550
+ function V(e, t) {
551
+ return e.length > 0 ? (B(e, e.length, 0, t), e) : t;
552
+ }
553
+ //#endregion
554
+ //#region ../../node_modules/micromark-util-combine-extensions/index.js
555
+ var Ce = {}.hasOwnProperty;
556
+ function we(e) {
557
+ let t = {}, n = -1;
558
+ for (; ++n < e.length;) Te(t, e[n]);
559
+ return t;
560
+ }
561
+ function Te(e, t) {
562
+ let n;
563
+ for (n in t) {
564
+ let r = (Ce.call(e, n) ? e[n] : void 0) || (e[n] = {}), i = t[n], a;
565
+ if (i) for (a in i) {
566
+ Ce.call(r, a) || (r[a] = []);
567
+ let e = i[a];
568
+ Ee(r[a], Array.isArray(e) ? e : e ? [e] : []);
569
+ }
570
+ }
571
+ }
572
+ function Ee(e, t) {
573
+ let n = -1, r = [];
574
+ for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
575
+ B(e, 0, 0, r);
576
+ }
577
+ //#endregion
578
+ //#region ../../node_modules/micromark-util-decode-numeric-character-reference/index.js
579
+ function De(e, t) {
580
+ let n = Number.parseInt(e, t);
581
+ return n < 9 || n === 11 || n > 13 && n < 32 || n > 126 && n < 160 || n > 55295 && n < 57344 || n > 64975 && n < 65008 || (n & 65535) == 65535 || (n & 65535) == 65534 || n > 1114111 ? "�" : String.fromCodePoint(n);
582
+ }
583
+ //#endregion
584
+ //#region ../../node_modules/micromark-util-normalize-identifier/index.js
585
+ function H(e) {
586
+ return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
587
+ }
588
+ //#endregion
589
+ //#region ../../node_modules/micromark-util-character/index.js
590
+ var U = J(/[A-Za-z]/), W = J(/[\dA-Za-z]/), Oe = J(/[#-'*+\--9=?A-Z^-~]/);
591
+ function ke(e) {
592
+ return e !== null && (e < 32 || e === 127);
593
+ }
594
+ var Ae = J(/\d/), je = J(/[\dA-Fa-f]/), Me = J(/[!-/:-@[-`{-~]/);
595
+ function G(e) {
596
+ return e !== null && e < -2;
597
+ }
598
+ function K(e) {
599
+ return e !== null && (e < 0 || e === 32);
600
+ }
601
+ function q(e) {
602
+ return e === -2 || e === -1 || e === 32;
603
+ }
604
+ var Ne = J(/\p{P}|\p{S}/u), Pe = J(/\s/);
605
+ function J(e) {
606
+ return t;
607
+ function t(t) {
608
+ return t !== null && t > -1 && e.test(String.fromCharCode(t));
609
+ }
610
+ }
611
+ //#endregion
612
+ //#region ../../node_modules/micromark-factory-space/index.js
613
+ function Y(e, t, n, r) {
614
+ let i = r ? r - 1 : Infinity, a = 0;
615
+ return o;
616
+ function o(r) {
617
+ return q(r) ? (e.enter(n), s(r)) : t(r);
618
+ }
619
+ function s(r) {
620
+ return q(r) && a++ < i ? (e.consume(r), s) : (e.exit(n), t(r));
621
+ }
622
+ }
623
+ //#endregion
624
+ //#region ../../node_modules/micromark/lib/initialize/content.js
625
+ var Fe = { tokenize: Ie };
626
+ function Ie(e) {
627
+ let t = e.attempt(this.parser.constructs.contentInitial, r, i), n;
628
+ return t;
629
+ function r(n) {
630
+ if (n === null) {
631
+ e.consume(n);
632
+ return;
633
+ }
634
+ return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"), Y(e, t, "linePrefix");
635
+ }
636
+ function i(t) {
637
+ return e.enter("paragraph"), a(t);
638
+ }
639
+ function a(t) {
640
+ let r = e.enter("chunkText", {
641
+ contentType: "text",
642
+ previous: n
643
+ });
644
+ return n && (n.next = r), n = r, o(t);
645
+ }
646
+ function o(t) {
647
+ if (t === null) {
648
+ e.exit("chunkText"), e.exit("paragraph"), e.consume(t);
649
+ return;
650
+ }
651
+ return G(t) ? (e.consume(t), e.exit("chunkText"), a) : (e.consume(t), o);
652
+ }
653
+ }
654
+ //#endregion
655
+ //#region ../../node_modules/micromark/lib/initialize/document.js
656
+ var Le = { tokenize: ze }, Re = { tokenize: Be };
657
+ function ze(e) {
658
+ let t = this, n = [], r = 0, i, a, o;
659
+ return s;
660
+ function s(i) {
661
+ if (r < n.length) {
662
+ let a = n[r];
663
+ return t.containerState = a[1], e.attempt(a[0].continuation, c, l)(i);
664
+ }
665
+ return l(i);
666
+ }
667
+ function c(e) {
668
+ if (r++, t.containerState._closeFlow) {
669
+ t.containerState._closeFlow = void 0, i && v();
670
+ let n = t.events.length, a = n, o;
671
+ for (; a--;) if (t.events[a][0] === "exit" && t.events[a][1].type === "chunkFlow") {
672
+ o = t.events[a][1].end;
673
+ break;
674
+ }
675
+ _(r);
676
+ let s = n;
677
+ for (; s < t.events.length;) t.events[s][1].end = { ...o }, s++;
678
+ return B(t.events, a + 1, 0, t.events.slice(n)), t.events.length = s, l(e);
679
+ }
680
+ return s(e);
681
+ }
682
+ function l(a) {
683
+ if (r === n.length) {
684
+ if (!i) return f(a);
685
+ if (i.currentConstruct && i.currentConstruct.concrete) return m(a);
686
+ t.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
687
+ }
688
+ return t.containerState = {}, e.check(Re, u, d)(a);
689
+ }
690
+ function u(e) {
691
+ return i && v(), _(r), f(e);
692
+ }
693
+ function d(e) {
694
+ return t.parser.lazy[t.now().line] = r !== n.length, o = t.now().offset, m(e);
695
+ }
696
+ function f(n) {
697
+ return t.containerState = {}, e.attempt(Re, p, m)(n);
698
+ }
699
+ function p(e) {
700
+ return r++, n.push([t.currentConstruct, t.containerState]), f(e);
701
+ }
702
+ function m(n) {
703
+ if (n === null) {
704
+ i && v(), _(0), e.consume(n);
705
+ return;
706
+ }
707
+ return i ||= t.parser.flow(t.now()), e.enter("chunkFlow", {
708
+ _tokenizer: i,
709
+ contentType: "flow",
710
+ previous: a
711
+ }), h(n);
712
+ }
713
+ function h(n) {
714
+ if (n === null) {
715
+ g(e.exit("chunkFlow"), !0), _(0), e.consume(n);
716
+ return;
717
+ }
718
+ return G(n) ? (e.consume(n), g(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(n), h);
719
+ }
720
+ function g(e, n) {
721
+ let s = t.sliceStream(e);
722
+ if (n && s.push(null), e.previous = a, a && (a.next = e), a = e, i.defineSkip(e.start), i.write(s), t.parser.lazy[e.start.line]) {
723
+ let e = i.events.length;
724
+ for (; e--;) if (i.events[e][1].start.offset < o && (!i.events[e][1].end || i.events[e][1].end.offset > o)) return;
725
+ let n = t.events.length, a = n, s, c;
726
+ for (; a--;) if (t.events[a][0] === "exit" && t.events[a][1].type === "chunkFlow") {
727
+ if (s) {
728
+ c = t.events[a][1].end;
729
+ break;
730
+ }
731
+ s = !0;
732
+ }
733
+ for (_(r), e = n; e < t.events.length;) t.events[e][1].end = { ...c }, e++;
734
+ B(t.events, a + 1, 0, t.events.slice(n)), t.events.length = e;
735
+ }
736
+ }
737
+ function _(r) {
738
+ let i = n.length;
739
+ for (; i-- > r;) {
740
+ let r = n[i];
741
+ t.containerState = r[1], r[0].exit.call(t, e);
742
+ }
743
+ n.length = r;
744
+ }
745
+ function v() {
746
+ i.write([null]), a = void 0, i = void 0, t.containerState._closeFlow = void 0;
747
+ }
748
+ }
749
+ function Be(e, t, n) {
750
+ return Y(e, e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
751
+ }
752
+ //#endregion
753
+ //#region ../../node_modules/micromark-util-classify-character/index.js
754
+ function Ve(e) {
755
+ if (e === null || K(e) || Pe(e)) return 1;
756
+ if (Ne(e)) return 2;
757
+ }
758
+ //#endregion
759
+ //#region ../../node_modules/micromark-util-resolve-all/index.js
760
+ function He(e, t, n) {
761
+ let r = [], i = -1;
762
+ for (; ++i < e.length;) {
763
+ let a = e[i].resolveAll;
764
+ a && !r.includes(a) && (t = a(t, n), r.push(a));
765
+ }
766
+ return t;
767
+ }
768
+ //#endregion
769
+ //#region ../../node_modules/micromark-core-commonmark/lib/attention.js
770
+ var Ue = {
771
+ name: "attention",
772
+ resolveAll: We,
773
+ tokenize: Ge
774
+ };
775
+ function We(e, t) {
776
+ let n = -1, r, i, a, o, s, c, l, u;
777
+ for (; ++n < e.length;) if (e[n][0] === "enter" && e[n][1].type === "attentionSequence" && e[n][1]._close) {
778
+ for (r = n; r--;) if (e[r][0] === "exit" && e[r][1].type === "attentionSequence" && e[r][1]._open && t.sliceSerialize(e[r][1]).charCodeAt(0) === t.sliceSerialize(e[n][1]).charCodeAt(0)) {
779
+ if ((e[r][1]._close || e[n][1]._open) && (e[n][1].end.offset - e[n][1].start.offset) % 3 && !((e[r][1].end.offset - e[r][1].start.offset + e[n][1].end.offset - e[n][1].start.offset) % 3)) continue;
780
+ c = e[r][1].end.offset - e[r][1].start.offset > 1 && e[n][1].end.offset - e[n][1].start.offset > 1 ? 2 : 1;
781
+ let d = { ...e[r][1].end }, f = { ...e[n][1].start };
782
+ Ke(d, -c), Ke(f, c), o = {
783
+ type: c > 1 ? "strongSequence" : "emphasisSequence",
784
+ start: d,
785
+ end: { ...e[r][1].end }
786
+ }, s = {
787
+ type: c > 1 ? "strongSequence" : "emphasisSequence",
788
+ start: { ...e[n][1].start },
789
+ end: f
790
+ }, a = {
791
+ type: c > 1 ? "strongText" : "emphasisText",
792
+ start: { ...e[r][1].end },
793
+ end: { ...e[n][1].start }
794
+ }, i = {
795
+ type: c > 1 ? "strong" : "emphasis",
796
+ start: { ...o.start },
797
+ end: { ...s.end }
798
+ }, e[r][1].end = { ...o.start }, e[n][1].start = { ...s.end }, l = [], e[r][1].end.offset - e[r][1].start.offset && (l = V(l, [[
799
+ "enter",
800
+ e[r][1],
801
+ t
802
+ ], [
803
+ "exit",
804
+ e[r][1],
805
+ t
806
+ ]])), l = V(l, [
807
+ [
808
+ "enter",
809
+ i,
810
+ t
811
+ ],
812
+ [
813
+ "enter",
814
+ o,
815
+ t
816
+ ],
817
+ [
818
+ "exit",
819
+ o,
820
+ t
821
+ ],
822
+ [
823
+ "enter",
824
+ a,
825
+ t
826
+ ]
827
+ ]), l = V(l, He(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), l = V(l, [
828
+ [
829
+ "exit",
830
+ a,
831
+ t
832
+ ],
833
+ [
834
+ "enter",
835
+ s,
836
+ t
837
+ ],
838
+ [
839
+ "exit",
840
+ s,
841
+ t
842
+ ],
843
+ [
844
+ "exit",
845
+ i,
846
+ t
847
+ ]
848
+ ]), e[n][1].end.offset - e[n][1].start.offset ? (u = 2, l = V(l, [[
849
+ "enter",
850
+ e[n][1],
851
+ t
852
+ ], [
853
+ "exit",
854
+ e[n][1],
855
+ t
856
+ ]])) : u = 0, B(e, r - 1, n - r + 3, l), n = r + l.length - u - 2;
857
+ break;
858
+ }
859
+ }
860
+ for (n = -1; ++n < e.length;) e[n][1].type === "attentionSequence" && (e[n][1].type = "data");
861
+ return e;
862
+ }
863
+ function Ge(e, t) {
864
+ let n = this.parser.constructs.attentionMarkers.null, r = this.previous, i = Ve(r), a;
865
+ return o;
866
+ function o(t) {
867
+ return a = t, e.enter("attentionSequence"), s(t);
868
+ }
869
+ function s(o) {
870
+ if (o === a) return e.consume(o), s;
871
+ let c = e.exit("attentionSequence"), l = Ve(o), u = !l || l === 2 && i || n.includes(o), d = !i || i === 2 && l || n.includes(r);
872
+ return c._open = !!(a === 42 ? u : u && (i || !d)), c._close = !!(a === 42 ? d : d && (l || !u)), t(o);
873
+ }
874
+ }
875
+ function Ke(e, t) {
876
+ e.column += t, e.offset += t, e._bufferIndex += t;
877
+ }
878
+ //#endregion
879
+ //#region ../../node_modules/micromark-core-commonmark/lib/autolink.js
880
+ var qe = {
881
+ name: "autolink",
882
+ tokenize: Je
883
+ };
884
+ function Je(e, t, n) {
885
+ let r = 0;
886
+ return i;
887
+ function i(t) {
888
+ return e.enter("autolink"), e.enter("autolinkMarker"), e.consume(t), e.exit("autolinkMarker"), e.enter("autolinkProtocol"), a;
889
+ }
890
+ function a(t) {
891
+ return U(t) ? (e.consume(t), o) : t === 64 ? n(t) : l(t);
892
+ }
893
+ function o(e) {
894
+ return e === 43 || e === 45 || e === 46 || W(e) ? (r = 1, s(e)) : l(e);
895
+ }
896
+ function s(t) {
897
+ return t === 58 ? (e.consume(t), r = 0, c) : (t === 43 || t === 45 || t === 46 || W(t)) && r++ < 32 ? (e.consume(t), s) : (r = 0, l(t));
898
+ }
899
+ function c(r) {
900
+ return r === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(r), e.exit("autolinkMarker"), e.exit("autolink"), t) : r === null || r === 32 || r === 60 || ke(r) ? n(r) : (e.consume(r), c);
901
+ }
902
+ function l(t) {
903
+ return t === 64 ? (e.consume(t), u) : Oe(t) ? (e.consume(t), l) : n(t);
904
+ }
905
+ function u(e) {
906
+ return W(e) ? d(e) : n(e);
907
+ }
908
+ function d(n) {
909
+ return n === 46 ? (e.consume(n), r = 0, u) : n === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(n), e.exit("autolinkMarker"), e.exit("autolink"), t) : f(n);
910
+ }
911
+ function f(t) {
912
+ if ((t === 45 || W(t)) && r++ < 63) {
913
+ let n = t === 45 ? f : d;
914
+ return e.consume(t), n;
915
+ }
916
+ return n(t);
917
+ }
918
+ }
919
+ //#endregion
920
+ //#region ../../node_modules/micromark-core-commonmark/lib/blank-line.js
921
+ var Ye = {
922
+ partial: !0,
923
+ tokenize: Xe
924
+ };
925
+ function Xe(e, t, n) {
926
+ return r;
927
+ function r(t) {
928
+ return q(t) ? Y(e, i, "linePrefix")(t) : i(t);
929
+ }
930
+ function i(e) {
931
+ return e === null || G(e) ? t(e) : n(e);
932
+ }
933
+ }
934
+ //#endregion
935
+ //#region ../../node_modules/micromark-core-commonmark/lib/block-quote.js
936
+ var Ze = {
937
+ continuation: { tokenize: $e },
938
+ exit: et,
939
+ name: "blockQuote",
940
+ tokenize: Qe
941
+ };
942
+ function Qe(e, t, n) {
943
+ let r = this;
944
+ return i;
945
+ function i(t) {
946
+ if (t === 62) {
947
+ let n = r.containerState;
948
+ return n.open ||= (e.enter("blockQuote", { _container: !0 }), !0), e.enter("blockQuotePrefix"), e.enter("blockQuoteMarker"), e.consume(t), e.exit("blockQuoteMarker"), a;
949
+ }
950
+ return n(t);
951
+ }
952
+ function a(n) {
953
+ return q(n) ? (e.enter("blockQuotePrefixWhitespace"), e.consume(n), e.exit("blockQuotePrefixWhitespace"), e.exit("blockQuotePrefix"), t) : (e.exit("blockQuotePrefix"), t(n));
954
+ }
955
+ }
956
+ function $e(e, t, n) {
957
+ let r = this;
958
+ return i;
959
+ function i(t) {
960
+ return q(t) ? Y(e, a, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : a(t);
961
+ }
962
+ function a(r) {
963
+ return e.attempt(Ze, t, n)(r);
964
+ }
965
+ }
966
+ function et(e) {
967
+ e.exit("blockQuote");
968
+ }
969
+ //#endregion
970
+ //#region ../../node_modules/micromark-core-commonmark/lib/character-escape.js
971
+ var tt = {
972
+ name: "characterEscape",
973
+ tokenize: nt
974
+ };
975
+ function nt(e, t, n) {
976
+ return r;
977
+ function r(t) {
978
+ return e.enter("characterEscape"), e.enter("escapeMarker"), e.consume(t), e.exit("escapeMarker"), i;
979
+ }
980
+ function i(r) {
981
+ return Me(r) ? (e.enter("characterEscapeValue"), e.consume(r), e.exit("characterEscapeValue"), e.exit("characterEscape"), t) : n(r);
982
+ }
983
+ }
984
+ //#endregion
985
+ //#region ../../node_modules/micromark-core-commonmark/lib/character-reference.js
986
+ var rt = {
987
+ name: "characterReference",
988
+ tokenize: it
989
+ };
990
+ function it(e, t, n) {
991
+ let r = this, i = 0, a, o;
992
+ return s;
993
+ function s(t) {
994
+ return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(t), e.exit("characterReferenceMarker"), c;
995
+ }
996
+ function c(t) {
997
+ return t === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(t), e.exit("characterReferenceMarkerNumeric"), l) : (e.enter("characterReferenceValue"), a = 31, o = W, u(t));
998
+ }
999
+ function l(t) {
1000
+ return t === 88 || t === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(t), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), a = 6, o = je, u) : (e.enter("characterReferenceValue"), a = 7, o = Ae, u(t));
1001
+ }
1002
+ function u(s) {
1003
+ if (s === 59 && i) {
1004
+ let i = e.exit("characterReferenceValue");
1005
+ return o === W && !Se(r.sliceSerialize(i)) ? n(s) : (e.enter("characterReferenceMarker"), e.consume(s), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
1006
+ }
1007
+ return o(s) && i++ < a ? (e.consume(s), u) : n(s);
1008
+ }
1009
+ }
1010
+ //#endregion
1011
+ //#region ../../node_modules/micromark-core-commonmark/lib/code-fenced.js
1012
+ var at = {
1013
+ partial: !0,
1014
+ tokenize: ct
1015
+ }, ot = {
1016
+ concrete: !0,
1017
+ name: "codeFenced",
1018
+ tokenize: st
1019
+ };
1020
+ function st(e, t, n) {
1021
+ let r = this, i = {
1022
+ partial: !0,
1023
+ tokenize: x
1024
+ }, a = 0, o = 0, s;
1025
+ return c;
1026
+ function c(e) {
1027
+ return l(e);
1028
+ }
1029
+ function l(t) {
1030
+ let n = r.events[r.events.length - 1];
1031
+ return a = n && n[1].type === "linePrefix" ? n[2].sliceSerialize(n[1], !0).length : 0, s = t, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), u(t);
1032
+ }
1033
+ function u(t) {
1034
+ return t === s ? (o++, e.consume(t), u) : o < 3 ? n(t) : (e.exit("codeFencedFenceSequence"), q(t) ? Y(e, d, "whitespace")(t) : d(t));
1035
+ }
1036
+ function d(n) {
1037
+ return n === null || G(n) ? (e.exit("codeFencedFence"), r.interrupt ? t(n) : e.check(at, h, b)(n)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", { contentType: "string" }), f(n));
1038
+ }
1039
+ function f(t) {
1040
+ return t === null || G(t) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(t)) : q(t) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Y(e, p, "whitespace")(t)) : t === 96 && t === s ? n(t) : (e.consume(t), f);
1041
+ }
1042
+ function p(t) {
1043
+ return t === null || G(t) ? d(t) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", { contentType: "string" }), m(t));
1044
+ }
1045
+ function m(t) {
1046
+ return t === null || G(t) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), d(t)) : t === 96 && t === s ? n(t) : (e.consume(t), m);
1047
+ }
1048
+ function h(t) {
1049
+ return e.attempt(i, b, g)(t);
1050
+ }
1051
+ function g(t) {
1052
+ return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), _;
1053
+ }
1054
+ function _(t) {
1055
+ return a > 0 && q(t) ? Y(e, v, "linePrefix", a + 1)(t) : v(t);
1056
+ }
1057
+ function v(t) {
1058
+ return t === null || G(t) ? e.check(at, h, b)(t) : (e.enter("codeFlowValue"), y(t));
1059
+ }
1060
+ function y(t) {
1061
+ return t === null || G(t) ? (e.exit("codeFlowValue"), v(t)) : (e.consume(t), y);
1062
+ }
1063
+ function b(n) {
1064
+ return e.exit("codeFenced"), t(n);
1065
+ }
1066
+ function x(e, t, n) {
1067
+ let i = 0;
1068
+ return a;
1069
+ function a(t) {
1070
+ return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), c;
1071
+ }
1072
+ function c(t) {
1073
+ return e.enter("codeFencedFence"), q(t) ? Y(e, l, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : l(t);
1074
+ }
1075
+ function l(t) {
1076
+ return t === s ? (e.enter("codeFencedFenceSequence"), u(t)) : n(t);
1077
+ }
1078
+ function u(t) {
1079
+ return t === s ? (i++, e.consume(t), u) : i >= o ? (e.exit("codeFencedFenceSequence"), q(t) ? Y(e, d, "whitespace")(t) : d(t)) : n(t);
1080
+ }
1081
+ function d(r) {
1082
+ return r === null || G(r) ? (e.exit("codeFencedFence"), t(r)) : n(r);
1083
+ }
1084
+ }
1085
+ }
1086
+ function ct(e, t, n) {
1087
+ let r = this;
1088
+ return i;
1089
+ function i(t) {
1090
+ return t === null ? n(t) : (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), a);
1091
+ }
1092
+ function a(e) {
1093
+ return r.parser.lazy[r.now().line] ? n(e) : t(e);
1094
+ }
1095
+ }
1096
+ //#endregion
1097
+ //#region ../../node_modules/micromark-core-commonmark/lib/code-indented.js
1098
+ var lt = {
1099
+ name: "codeIndented",
1100
+ tokenize: dt
1101
+ }, ut = {
1102
+ partial: !0,
1103
+ tokenize: ft
1104
+ };
1105
+ function dt(e, t, n) {
1106
+ let r = this;
1107
+ return i;
1108
+ function i(t) {
1109
+ return e.enter("codeIndented"), Y(e, a, "linePrefix", 5)(t);
1110
+ }
1111
+ function a(e) {
1112
+ let t = r.events[r.events.length - 1];
1113
+ return t && t[1].type === "linePrefix" && t[2].sliceSerialize(t[1], !0).length >= 4 ? o(e) : n(e);
1114
+ }
1115
+ function o(t) {
1116
+ return t === null ? c(t) : G(t) ? e.attempt(ut, o, c)(t) : (e.enter("codeFlowValue"), s(t));
1117
+ }
1118
+ function s(t) {
1119
+ return t === null || G(t) ? (e.exit("codeFlowValue"), o(t)) : (e.consume(t), s);
1120
+ }
1121
+ function c(n) {
1122
+ return e.exit("codeIndented"), t(n);
1123
+ }
1124
+ }
1125
+ function ft(e, t, n) {
1126
+ let r = this;
1127
+ return i;
1128
+ function i(t) {
1129
+ return r.parser.lazy[r.now().line] ? n(t) : G(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), i) : Y(e, a, "linePrefix", 5)(t);
1130
+ }
1131
+ function a(e) {
1132
+ let a = r.events[r.events.length - 1];
1133
+ return a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(e) : G(e) ? i(e) : n(e);
1134
+ }
1135
+ }
1136
+ //#endregion
1137
+ //#region ../../node_modules/micromark-core-commonmark/lib/code-text.js
1138
+ var pt = {
1139
+ name: "codeText",
1140
+ previous: ht,
1141
+ resolve: mt,
1142
+ tokenize: gt
1143
+ };
1144
+ function mt(e) {
1145
+ let t = e.length - 4, n = 3, r, i;
1146
+ if ((e[n][1].type === "lineEnding" || e[n][1].type === "space") && (e[t][1].type === "lineEnding" || e[t][1].type === "space")) {
1147
+ for (r = n; ++r < t;) if (e[r][1].type === "codeTextData") {
1148
+ e[n][1].type = "codeTextPadding", e[t][1].type = "codeTextPadding", n += 2, t -= 2;
1149
+ break;
1150
+ }
1151
+ }
1152
+ for (r = n - 1, t++; ++r <= t;) i === void 0 ? r !== t && e[r][1].type !== "lineEnding" && (i = r) : (r === t || e[r][1].type === "lineEnding") && (e[i][1].type = "codeTextData", r !== i + 2 && (e[i][1].end = e[r - 1][1].end, e.splice(i + 2, r - i - 2), t -= r - i - 2, r = i + 2), i = void 0);
1153
+ return e;
1154
+ }
1155
+ function ht(e) {
1156
+ return e !== 96 || this.events[this.events.length - 1][1].type === "characterEscape";
1157
+ }
1158
+ function gt(e, t, n) {
1159
+ let r = 0, i, a;
1160
+ return o;
1161
+ function o(t) {
1162
+ return e.enter("codeText"), e.enter("codeTextSequence"), s(t);
1163
+ }
1164
+ function s(t) {
1165
+ return t === 96 ? (e.consume(t), r++, s) : (e.exit("codeTextSequence"), c(t));
1166
+ }
1167
+ function c(t) {
1168
+ return t === null ? n(t) : t === 32 ? (e.enter("space"), e.consume(t), e.exit("space"), c) : t === 96 ? (a = e.enter("codeTextSequence"), i = 0, u(t)) : G(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), c) : (e.enter("codeTextData"), l(t));
1169
+ }
1170
+ function l(t) {
1171
+ return t === null || t === 32 || t === 96 || G(t) ? (e.exit("codeTextData"), c(t)) : (e.consume(t), l);
1172
+ }
1173
+ function u(n) {
1174
+ return n === 96 ? (e.consume(n), i++, u) : i === r ? (e.exit("codeTextSequence"), e.exit("codeText"), t(n)) : (a.type = "codeTextData", l(n));
1175
+ }
1176
+ }
1177
+ //#endregion
1178
+ //#region ../../node_modules/micromark-util-subtokenize/lib/splice-buffer.js
1179
+ var _t = class {
1180
+ constructor(e) {
1181
+ this.left = e ? [...e] : [], this.right = [];
1182
+ }
1183
+ get(e) {
1184
+ if (e < 0 || e >= this.left.length + this.right.length) throw RangeError("Cannot access index `" + e + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
1185
+ return e < this.left.length ? this.left[e] : this.right[this.right.length - e + this.left.length - 1];
1186
+ }
1187
+ get length() {
1188
+ return this.left.length + this.right.length;
1189
+ }
1190
+ shift() {
1191
+ return this.setCursor(0), this.right.pop();
1192
+ }
1193
+ slice(e, t) {
1194
+ let n = t ?? Infinity;
1195
+ return n < this.left.length ? this.left.slice(e, n) : e > this.left.length ? this.right.slice(this.right.length - n + this.left.length, this.right.length - e + this.left.length).reverse() : this.left.slice(e).concat(this.right.slice(this.right.length - n + this.left.length).reverse());
1196
+ }
1197
+ splice(e, t, n) {
1198
+ let r = t || 0;
1199
+ this.setCursor(Math.trunc(e));
1200
+ let i = this.right.splice(this.right.length - r, Infinity);
1201
+ return n && X(this.left, n), i.reverse();
1202
+ }
1203
+ pop() {
1204
+ return this.setCursor(Infinity), this.left.pop();
1205
+ }
1206
+ push(e) {
1207
+ this.setCursor(Infinity), this.left.push(e);
1208
+ }
1209
+ pushMany(e) {
1210
+ this.setCursor(Infinity), X(this.left, e);
1211
+ }
1212
+ unshift(e) {
1213
+ this.setCursor(0), this.right.push(e);
1214
+ }
1215
+ unshiftMany(e) {
1216
+ this.setCursor(0), X(this.right, e.reverse());
1217
+ }
1218
+ setCursor(e) {
1219
+ if (!(e === this.left.length || e > this.left.length && this.right.length === 0 || e < 0 && this.left.length === 0)) if (e < this.left.length) {
1220
+ let t = this.left.splice(e, Infinity);
1221
+ X(this.right, t.reverse());
1222
+ } else {
1223
+ let t = this.right.splice(this.left.length + this.right.length - e, Infinity);
1224
+ X(this.left, t.reverse());
1225
+ }
1226
+ }
1227
+ };
1228
+ function X(e, t) {
1229
+ let n = 0;
1230
+ if (t.length < 1e4) e.push(...t);
1231
+ else for (; n < t.length;) e.push(...t.slice(n, n + 1e4)), n += 1e4;
1232
+ }
1233
+ //#endregion
1234
+ //#region ../../node_modules/micromark-util-subtokenize/index.js
1235
+ function vt(e) {
1236
+ let t = {}, n = -1, r, i, a, o, s, c, l, u = new _t(e);
1237
+ for (; ++n < u.length;) {
1238
+ for (; n in t;) n = t[n];
1239
+ if (r = u.get(n), n && r[1].type === "chunkFlow" && u.get(n - 1)[1].type === "listItemPrefix" && (c = r[1]._tokenizer.events, a = 0, a < c.length && c[a][1].type === "lineEndingBlank" && (a += 2), a < c.length && c[a][1].type === "content")) for (; ++a < c.length && c[a][1].type !== "content";) c[a][1].type === "chunkText" && (c[a][1]._isInFirstContentOfListItem = !0, a++);
1240
+ if (r[0] === "enter") r[1].contentType && (Object.assign(t, yt(u, n)), n = t[n], l = !0);
1241
+ else if (r[1]._container) {
1242
+ for (a = n, i = void 0; a--;) if (o = u.get(a), o[1].type === "lineEnding" || o[1].type === "lineEndingBlank") o[0] === "enter" && (i && (u.get(i)[1].type = "lineEndingBlank"), o[1].type = "lineEnding", i = a);
1243
+ else if (!(o[1].type === "linePrefix" || o[1].type === "listItemIndent")) break;
1244
+ i && (r[1].end = { ...u.get(i)[1].start }, s = u.slice(i, n), s.unshift(r), u.splice(i, n - i + 1, s));
1245
+ }
1246
+ }
1247
+ return B(e, 0, Infinity, u.slice(0)), !l;
1248
+ }
1249
+ function yt(e, t) {
1250
+ let n = e.get(t)[1], r = e.get(t)[2], i = t - 1, a = [], o = n._tokenizer;
1251
+ o || (o = r.parser[n.contentType](n.start), n._contentTypeTextTrailing && (o._contentTypeTextTrailing = !0));
1252
+ let s = o.events, c = [], l = {}, u, d, f = -1, p = n, m = 0, h = 0, g = [h];
1253
+ for (; p;) {
1254
+ for (; e.get(++i)[1] !== p;);
1255
+ a.push(i), p._tokenizer || (u = r.sliceStream(p), p.next || u.push(null), d && o.defineSkip(p.start), p._isInFirstContentOfListItem && (o._gfmTasklistFirstContentOfListItem = !0), o.write(u), p._isInFirstContentOfListItem && (o._gfmTasklistFirstContentOfListItem = void 0)), d = p, p = p.next;
1256
+ }
1257
+ for (p = n; ++f < s.length;) s[f][0] === "exit" && s[f - 1][0] === "enter" && s[f][1].type === s[f - 1][1].type && s[f][1].start.line !== s[f][1].end.line && (h = f + 1, g.push(h), p._tokenizer = void 0, p.previous = void 0, p = p.next);
1258
+ for (o.events = [], p ? (p._tokenizer = void 0, p.previous = void 0) : g.pop(), f = g.length; f--;) {
1259
+ let t = s.slice(g[f], g[f + 1]), n = a.pop();
1260
+ c.push([n, n + t.length - 1]), e.splice(n, 2, t);
1261
+ }
1262
+ for (c.reverse(), f = -1; ++f < c.length;) l[m + c[f][0]] = m + c[f][1], m += c[f][1] - c[f][0] - 1;
1263
+ return l;
1264
+ }
1265
+ //#endregion
1266
+ //#region ../../node_modules/micromark-core-commonmark/lib/content.js
1267
+ var bt = {
1268
+ resolve: St,
1269
+ tokenize: Ct
1270
+ }, xt = {
1271
+ partial: !0,
1272
+ tokenize: wt
1273
+ };
1274
+ function St(e) {
1275
+ return vt(e), e;
1276
+ }
1277
+ function Ct(e, t) {
1278
+ let n;
1279
+ return r;
1280
+ function r(t) {
1281
+ return e.enter("content"), n = e.enter("chunkContent", { contentType: "content" }), i(t);
1282
+ }
1283
+ function i(t) {
1284
+ return t === null ? a(t) : G(t) ? e.check(xt, o, a)(t) : (e.consume(t), i);
1285
+ }
1286
+ function a(n) {
1287
+ return e.exit("chunkContent"), e.exit("content"), t(n);
1288
+ }
1289
+ function o(t) {
1290
+ return e.consume(t), e.exit("chunkContent"), n.next = e.enter("chunkContent", {
1291
+ contentType: "content",
1292
+ previous: n
1293
+ }), n = n.next, i;
1294
+ }
1295
+ }
1296
+ function wt(e, t, n) {
1297
+ let r = this;
1298
+ return i;
1299
+ function i(t) {
1300
+ return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), Y(e, a, "linePrefix");
1301
+ }
1302
+ function a(i) {
1303
+ if (i === null || G(i)) return n(i);
1304
+ let a = r.events[r.events.length - 1];
1305
+ return !r.parser.constructs.disable.null.includes("codeIndented") && a && a[1].type === "linePrefix" && a[2].sliceSerialize(a[1], !0).length >= 4 ? t(i) : e.interrupt(r.parser.constructs.flow, n, t)(i);
1306
+ }
1307
+ }
1308
+ //#endregion
1309
+ //#region ../../node_modules/micromark-factory-destination/index.js
1310
+ function Tt(e, t, n, r, i, a, o, s, c) {
1311
+ let l = c || Infinity, u = 0;
1312
+ return d;
1313
+ function d(t) {
1314
+ return t === 60 ? (e.enter(r), e.enter(i), e.enter(a), e.consume(t), e.exit(a), f) : t === null || t === 32 || t === 41 || ke(t) ? n(t) : (e.enter(r), e.enter(o), e.enter(s), e.enter("chunkString", { contentType: "string" }), h(t));
1315
+ }
1316
+ function f(n) {
1317
+ return n === 62 ? (e.enter(a), e.consume(n), e.exit(a), e.exit(i), e.exit(r), t) : (e.enter(s), e.enter("chunkString", { contentType: "string" }), p(n));
1318
+ }
1319
+ function p(t) {
1320
+ return t === 62 ? (e.exit("chunkString"), e.exit(s), f(t)) : t === null || t === 60 || G(t) ? n(t) : (e.consume(t), t === 92 ? m : p);
1321
+ }
1322
+ function m(t) {
1323
+ return t === 60 || t === 62 || t === 92 ? (e.consume(t), p) : p(t);
1324
+ }
1325
+ function h(i) {
1326
+ return !u && (i === null || i === 41 || K(i)) ? (e.exit("chunkString"), e.exit(s), e.exit(o), e.exit(r), t(i)) : u < l && i === 40 ? (e.consume(i), u++, h) : i === 41 ? (e.consume(i), u--, h) : i === null || i === 32 || i === 40 || ke(i) ? n(i) : (e.consume(i), i === 92 ? g : h);
1327
+ }
1328
+ function g(t) {
1329
+ return t === 40 || t === 41 || t === 92 ? (e.consume(t), h) : h(t);
1330
+ }
1331
+ }
1332
+ //#endregion
1333
+ //#region ../../node_modules/micromark-factory-label/index.js
1334
+ function Et(e, t, n, r, i, a) {
1335
+ let o = this, s = 0, c;
1336
+ return l;
1337
+ function l(t) {
1338
+ return e.enter(r), e.enter(i), e.consume(t), e.exit(i), e.enter(a), u;
1339
+ }
1340
+ function u(l) {
1341
+ return s > 999 || l === null || l === 91 || l === 93 && !c || l === 94 && !s && "_hiddenFootnoteSupport" in o.parser.constructs ? n(l) : l === 93 ? (e.exit(a), e.enter(i), e.consume(l), e.exit(i), e.exit(r), t) : G(l) ? (e.enter("lineEnding"), e.consume(l), e.exit("lineEnding"), u) : (e.enter("chunkString", { contentType: "string" }), d(l));
1342
+ }
1343
+ function d(t) {
1344
+ return t === null || t === 91 || t === 93 || G(t) || s++ > 999 ? (e.exit("chunkString"), u(t)) : (e.consume(t), c ||= !q(t), t === 92 ? f : d);
1345
+ }
1346
+ function f(t) {
1347
+ return t === 91 || t === 92 || t === 93 ? (e.consume(t), s++, d) : d(t);
1348
+ }
1349
+ }
1350
+ //#endregion
1351
+ //#region ../../node_modules/micromark-factory-title/index.js
1352
+ function Dt(e, t, n, r, i, a) {
1353
+ let o;
1354
+ return s;
1355
+ function s(t) {
1356
+ return t === 34 || t === 39 || t === 40 ? (e.enter(r), e.enter(i), e.consume(t), e.exit(i), o = t === 40 ? 41 : t, c) : n(t);
1357
+ }
1358
+ function c(n) {
1359
+ return n === o ? (e.enter(i), e.consume(n), e.exit(i), e.exit(r), t) : (e.enter(a), l(n));
1360
+ }
1361
+ function l(t) {
1362
+ return t === o ? (e.exit(a), c(o)) : t === null ? n(t) : G(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), Y(e, l, "linePrefix")) : (e.enter("chunkString", { contentType: "string" }), u(t));
1363
+ }
1364
+ function u(t) {
1365
+ return t === o || t === null || G(t) ? (e.exit("chunkString"), l(t)) : (e.consume(t), t === 92 ? d : u);
1366
+ }
1367
+ function d(t) {
1368
+ return t === o || t === 92 ? (e.consume(t), u) : u(t);
1369
+ }
1370
+ }
1371
+ //#endregion
1372
+ //#region ../../node_modules/micromark-factory-whitespace/index.js
1373
+ function Z(e, t) {
1374
+ let n;
1375
+ return r;
1376
+ function r(i) {
1377
+ return G(i) ? (e.enter("lineEnding"), e.consume(i), e.exit("lineEnding"), n = !0, r) : q(i) ? Y(e, r, n ? "linePrefix" : "lineSuffix")(i) : t(i);
1378
+ }
1379
+ }
1380
+ //#endregion
1381
+ //#region ../../node_modules/micromark-core-commonmark/lib/definition.js
1382
+ var Ot = {
1383
+ name: "definition",
1384
+ tokenize: At
1385
+ }, kt = {
1386
+ partial: !0,
1387
+ tokenize: jt
1388
+ };
1389
+ function At(e, t, n) {
1390
+ let r = this, i;
1391
+ return a;
1392
+ function a(t) {
1393
+ return e.enter("definition"), o(t);
1394
+ }
1395
+ function o(t) {
1396
+ return Et.call(r, e, s, n, "definitionLabel", "definitionLabelMarker", "definitionLabelString")(t);
1397
+ }
1398
+ function s(t) {
1399
+ return i = H(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)), t === 58 ? (e.enter("definitionMarker"), e.consume(t), e.exit("definitionMarker"), c) : n(t);
1400
+ }
1401
+ function c(t) {
1402
+ return K(t) ? Z(e, l)(t) : l(t);
1403
+ }
1404
+ function l(t) {
1405
+ return Tt(e, u, n, "definitionDestination", "definitionDestinationLiteral", "definitionDestinationLiteralMarker", "definitionDestinationRaw", "definitionDestinationString")(t);
1406
+ }
1407
+ function u(t) {
1408
+ return e.attempt(kt, d, d)(t);
1409
+ }
1410
+ function d(t) {
1411
+ return q(t) ? Y(e, f, "whitespace")(t) : f(t);
1412
+ }
1413
+ function f(a) {
1414
+ return a === null || G(a) ? (e.exit("definition"), r.parser.defined.push(i), t(a)) : n(a);
1415
+ }
1416
+ }
1417
+ function jt(e, t, n) {
1418
+ return r;
1419
+ function r(t) {
1420
+ return K(t) ? Z(e, i)(t) : n(t);
1421
+ }
1422
+ function i(t) {
1423
+ return Dt(e, a, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(t);
1424
+ }
1425
+ function a(t) {
1426
+ return q(t) ? Y(e, o, "whitespace")(t) : o(t);
1427
+ }
1428
+ function o(e) {
1429
+ return e === null || G(e) ? t(e) : n(e);
1430
+ }
1431
+ }
1432
+ //#endregion
1433
+ //#region ../../node_modules/micromark-core-commonmark/lib/hard-break-escape.js
1434
+ var Mt = {
1435
+ name: "hardBreakEscape",
1436
+ tokenize: Nt
1437
+ };
1438
+ function Nt(e, t, n) {
1439
+ return r;
1440
+ function r(t) {
1441
+ return e.enter("hardBreakEscape"), e.consume(t), i;
1442
+ }
1443
+ function i(r) {
1444
+ return G(r) ? (e.exit("hardBreakEscape"), t(r)) : n(r);
1445
+ }
1446
+ }
1447
+ //#endregion
1448
+ //#region ../../node_modules/micromark-core-commonmark/lib/heading-atx.js
1449
+ var Pt = {
1450
+ name: "headingAtx",
1451
+ resolve: Ft,
1452
+ tokenize: It
1453
+ };
1454
+ function Ft(e, t) {
1455
+ let n = e.length - 2, r = 3, i, a;
1456
+ return e[r][1].type === "whitespace" && (r += 2), n - 2 > r && e[n][1].type === "whitespace" && (n -= 2), e[n][1].type === "atxHeadingSequence" && (r === n - 1 || n - 4 > r && e[n - 2][1].type === "whitespace") && (n -= r + 1 === n ? 2 : 4), n > r && (i = {
1457
+ type: "atxHeadingText",
1458
+ start: e[r][1].start,
1459
+ end: e[n][1].end
1460
+ }, a = {
1461
+ type: "chunkText",
1462
+ start: e[r][1].start,
1463
+ end: e[n][1].end,
1464
+ contentType: "text"
1465
+ }, B(e, r, n - r + 1, [
1466
+ [
1467
+ "enter",
1468
+ i,
1469
+ t
1470
+ ],
1471
+ [
1472
+ "enter",
1473
+ a,
1474
+ t
1475
+ ],
1476
+ [
1477
+ "exit",
1478
+ a,
1479
+ t
1480
+ ],
1481
+ [
1482
+ "exit",
1483
+ i,
1484
+ t
1485
+ ]
1486
+ ])), e;
1487
+ }
1488
+ function It(e, t, n) {
1489
+ let r = 0;
1490
+ return i;
1491
+ function i(t) {
1492
+ return e.enter("atxHeading"), a(t);
1493
+ }
1494
+ function a(t) {
1495
+ return e.enter("atxHeadingSequence"), o(t);
1496
+ }
1497
+ function o(t) {
1498
+ return t === 35 && r++ < 6 ? (e.consume(t), o) : t === null || K(t) ? (e.exit("atxHeadingSequence"), s(t)) : n(t);
1499
+ }
1500
+ function s(n) {
1501
+ return n === 35 ? (e.enter("atxHeadingSequence"), c(n)) : n === null || G(n) ? (e.exit("atxHeading"), t(n)) : q(n) ? Y(e, s, "whitespace")(n) : (e.enter("atxHeadingText"), l(n));
1502
+ }
1503
+ function c(t) {
1504
+ return t === 35 ? (e.consume(t), c) : (e.exit("atxHeadingSequence"), s(t));
1505
+ }
1506
+ function l(t) {
1507
+ return t === null || t === 35 || K(t) ? (e.exit("atxHeadingText"), s(t)) : (e.consume(t), l);
1508
+ }
1509
+ }
1510
+ //#endregion
1511
+ //#region ../../node_modules/micromark-util-html-tag-name/index.js
1512
+ var Lt = /* @__PURE__ */ "address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."), Rt = [
1513
+ "pre",
1514
+ "script",
1515
+ "style",
1516
+ "textarea"
1517
+ ], zt = {
1518
+ concrete: !0,
1519
+ name: "htmlFlow",
1520
+ resolveTo: Ht,
1521
+ tokenize: Ut
1522
+ }, Bt = {
1523
+ partial: !0,
1524
+ tokenize: Gt
1525
+ }, Vt = {
1526
+ partial: !0,
1527
+ tokenize: Wt
1528
+ };
1529
+ function Ht(e) {
1530
+ let t = e.length;
1531
+ for (; t-- && !(e[t][0] === "enter" && e[t][1].type === "htmlFlow"););
1532
+ return t > 1 && e[t - 2][1].type === "linePrefix" && (e[t][1].start = e[t - 2][1].start, e[t + 1][1].start = e[t - 2][1].start, e.splice(t - 2, 2)), e;
1533
+ }
1534
+ function Ut(e, t, n) {
1535
+ let r = this, i, a, o, s, c;
1536
+ return l;
1537
+ function l(e) {
1538
+ return u(e);
1539
+ }
1540
+ function u(t) {
1541
+ return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(t), d;
1542
+ }
1543
+ function d(s) {
1544
+ return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : I) : U(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
1545
+ }
1546
+ function f(a) {
1547
+ return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : U(a) ? (e.consume(a), i = 4, r.interrupt ? t : I) : n(a);
1548
+ }
1549
+ function p(i) {
1550
+ return i === 45 ? (e.consume(i), r.interrupt ? t : I) : n(i);
1551
+ }
1552
+ function m(i) {
1553
+ return i === "CDATA[".charCodeAt(s++) ? (e.consume(i), s === 6 ? r.interrupt ? t : O : m) : n(i);
1554
+ }
1555
+ function h(t) {
1556
+ return U(t) ? (e.consume(t), o = String.fromCharCode(t), g) : n(t);
1557
+ }
1558
+ function g(s) {
1559
+ if (s === null || s === 47 || s === 62 || K(s)) {
1560
+ let c = s === 47, l = o.toLowerCase();
1561
+ return !c && !a && Rt.includes(l) ? (i = 1, r.interrupt ? t(s) : O(s)) : Lt.includes(o.toLowerCase()) ? (i = 6, c ? (e.consume(s), _) : r.interrupt ? t(s) : O(s)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(s) : a ? v(s) : y(s));
1562
+ }
1563
+ return s === 45 || W(s) ? (e.consume(s), o += String.fromCharCode(s), g) : n(s);
1564
+ }
1565
+ function _(i) {
1566
+ return i === 62 ? (e.consume(i), r.interrupt ? t : O) : n(i);
1567
+ }
1568
+ function v(t) {
1569
+ return q(t) ? (e.consume(t), v) : E(t);
1570
+ }
1571
+ function y(t) {
1572
+ return t === 47 ? (e.consume(t), E) : t === 58 || t === 95 || U(t) ? (e.consume(t), b) : q(t) ? (e.consume(t), y) : E(t);
1573
+ }
1574
+ function b(t) {
1575
+ return t === 45 || t === 46 || t === 58 || t === 95 || W(t) ? (e.consume(t), b) : x(t);
1576
+ }
1577
+ function x(t) {
1578
+ return t === 61 ? (e.consume(t), S) : q(t) ? (e.consume(t), x) : y(t);
1579
+ }
1580
+ function S(t) {
1581
+ return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), c = t, C) : q(t) ? (e.consume(t), S) : w(t);
1582
+ }
1583
+ function C(t) {
1584
+ return t === c ? (e.consume(t), c = null, T) : t === null || G(t) ? n(t) : (e.consume(t), C);
1585
+ }
1586
+ function w(t) {
1587
+ return t === null || t === 34 || t === 39 || t === 47 || t === 60 || t === 61 || t === 62 || t === 96 || K(t) ? x(t) : (e.consume(t), w);
1588
+ }
1589
+ function T(e) {
1590
+ return e === 47 || e === 62 || q(e) ? y(e) : n(e);
1591
+ }
1592
+ function E(t) {
1593
+ return t === 62 ? (e.consume(t), D) : n(t);
1594
+ }
1595
+ function D(t) {
1596
+ return t === null || G(t) ? O(t) : q(t) ? (e.consume(t), D) : n(t);
1597
+ }
1598
+ function O(t) {
1599
+ return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t), L) : t === 63 && i === 3 ? (e.consume(t), I) : t === 93 && i === 5 ? (e.consume(t), F) : G(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Bt, R, k)(t)) : t === null || G(t) ? (e.exit("htmlFlowData"), k(t)) : (e.consume(t), O);
1600
+ }
1601
+ function k(t) {
1602
+ return e.check(Vt, A, R)(t);
1603
+ }
1604
+ function A(t) {
1605
+ return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), j;
1606
+ }
1607
+ function j(t) {
1608
+ return t === null || G(t) ? k(t) : (e.enter("htmlFlowData"), O(t));
1609
+ }
1610
+ function M(t) {
1611
+ return t === 45 ? (e.consume(t), I) : O(t);
1612
+ }
1613
+ function N(t) {
1614
+ return t === 47 ? (e.consume(t), o = "", P) : O(t);
1615
+ }
1616
+ function P(t) {
1617
+ if (t === 62) {
1618
+ let n = o.toLowerCase();
1619
+ return Rt.includes(n) ? (e.consume(t), L) : O(t);
1620
+ }
1621
+ return U(t) && o.length < 8 ? (e.consume(t), o += String.fromCharCode(t), P) : O(t);
1622
+ }
1623
+ function F(t) {
1624
+ return t === 93 ? (e.consume(t), I) : O(t);
1625
+ }
1626
+ function I(t) {
1627
+ return t === 62 ? (e.consume(t), L) : t === 45 && i === 2 ? (e.consume(t), I) : O(t);
1628
+ }
1629
+ function L(t) {
1630
+ return t === null || G(t) ? (e.exit("htmlFlowData"), R(t)) : (e.consume(t), L);
1631
+ }
1632
+ function R(n) {
1633
+ return e.exit("htmlFlow"), t(n);
1634
+ }
1635
+ }
1636
+ function Wt(e, t, n) {
1637
+ let r = this;
1638
+ return i;
1639
+ function i(t) {
1640
+ return G(t) ? (e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), a) : n(t);
1641
+ }
1642
+ function a(e) {
1643
+ return r.parser.lazy[r.now().line] ? n(e) : t(e);
1644
+ }
1645
+ }
1646
+ function Gt(e, t, n) {
1647
+ return r;
1648
+ function r(r) {
1649
+ return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), e.attempt(Ye, t, n);
1650
+ }
1651
+ }
1652
+ //#endregion
1653
+ //#region ../../node_modules/micromark-core-commonmark/lib/html-text.js
1654
+ var Kt = {
1655
+ name: "htmlText",
1656
+ tokenize: qt
1657
+ };
1658
+ function qt(e, t, n) {
1659
+ let r = this, i, a, o;
1660
+ return s;
1661
+ function s(t) {
1662
+ return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(t), c;
1663
+ }
1664
+ function c(t) {
1665
+ return t === 33 ? (e.consume(t), l) : t === 47 ? (e.consume(t), x) : t === 63 ? (e.consume(t), y) : U(t) ? (e.consume(t), w) : n(t);
1666
+ }
1667
+ function l(t) {
1668
+ return t === 45 ? (e.consume(t), u) : t === 91 ? (e.consume(t), a = 0, m) : U(t) ? (e.consume(t), v) : n(t);
1669
+ }
1670
+ function u(t) {
1671
+ return t === 45 ? (e.consume(t), p) : n(t);
1672
+ }
1673
+ function d(t) {
1674
+ return t === null ? n(t) : t === 45 ? (e.consume(t), f) : G(t) ? (o = d, N(t)) : (e.consume(t), d);
1675
+ }
1676
+ function f(t) {
1677
+ return t === 45 ? (e.consume(t), p) : d(t);
1678
+ }
1679
+ function p(e) {
1680
+ return e === 62 ? M(e) : e === 45 ? f(e) : d(e);
1681
+ }
1682
+ function m(t) {
1683
+ return t === "CDATA[".charCodeAt(a++) ? (e.consume(t), a === 6 ? h : m) : n(t);
1684
+ }
1685
+ function h(t) {
1686
+ return t === null ? n(t) : t === 93 ? (e.consume(t), g) : G(t) ? (o = h, N(t)) : (e.consume(t), h);
1687
+ }
1688
+ function g(t) {
1689
+ return t === 93 ? (e.consume(t), _) : h(t);
1690
+ }
1691
+ function _(t) {
1692
+ return t === 62 ? M(t) : t === 93 ? (e.consume(t), _) : h(t);
1693
+ }
1694
+ function v(t) {
1695
+ return t === null || t === 62 ? M(t) : G(t) ? (o = v, N(t)) : (e.consume(t), v);
1696
+ }
1697
+ function y(t) {
1698
+ return t === null ? n(t) : t === 63 ? (e.consume(t), b) : G(t) ? (o = y, N(t)) : (e.consume(t), y);
1699
+ }
1700
+ function b(e) {
1701
+ return e === 62 ? M(e) : y(e);
1702
+ }
1703
+ function x(t) {
1704
+ return U(t) ? (e.consume(t), S) : n(t);
1705
+ }
1706
+ function S(t) {
1707
+ return t === 45 || W(t) ? (e.consume(t), S) : C(t);
1708
+ }
1709
+ function C(t) {
1710
+ return G(t) ? (o = C, N(t)) : q(t) ? (e.consume(t), C) : M(t);
1711
+ }
1712
+ function w(t) {
1713
+ return t === 45 || W(t) ? (e.consume(t), w) : t === 47 || t === 62 || K(t) ? T(t) : n(t);
1714
+ }
1715
+ function T(t) {
1716
+ return t === 47 ? (e.consume(t), M) : t === 58 || t === 95 || U(t) ? (e.consume(t), E) : G(t) ? (o = T, N(t)) : q(t) ? (e.consume(t), T) : M(t);
1717
+ }
1718
+ function E(t) {
1719
+ return t === 45 || t === 46 || t === 58 || t === 95 || W(t) ? (e.consume(t), E) : D(t);
1720
+ }
1721
+ function D(t) {
1722
+ return t === 61 ? (e.consume(t), O) : G(t) ? (o = D, N(t)) : q(t) ? (e.consume(t), D) : T(t);
1723
+ }
1724
+ function O(t) {
1725
+ return t === null || t === 60 || t === 61 || t === 62 || t === 96 ? n(t) : t === 34 || t === 39 ? (e.consume(t), i = t, k) : G(t) ? (o = O, N(t)) : q(t) ? (e.consume(t), O) : (e.consume(t), A);
1726
+ }
1727
+ function k(t) {
1728
+ return t === i ? (e.consume(t), i = void 0, j) : t === null ? n(t) : G(t) ? (o = k, N(t)) : (e.consume(t), k);
1729
+ }
1730
+ function A(t) {
1731
+ return t === null || t === 34 || t === 39 || t === 60 || t === 61 || t === 96 ? n(t) : t === 47 || t === 62 || K(t) ? T(t) : (e.consume(t), A);
1732
+ }
1733
+ function j(e) {
1734
+ return e === 47 || e === 62 || K(e) ? T(e) : n(e);
1735
+ }
1736
+ function M(r) {
1737
+ return r === 62 ? (e.consume(r), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(r);
1738
+ }
1739
+ function N(t) {
1740
+ return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), P;
1741
+ }
1742
+ function P(t) {
1743
+ return q(t) ? Y(e, F, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : F(t);
1744
+ }
1745
+ function F(t) {
1746
+ return e.enter("htmlTextData"), o(t);
1747
+ }
1748
+ }
1749
+ //#endregion
1750
+ //#region ../../node_modules/micromark-core-commonmark/lib/label-end.js
1751
+ var Jt = {
1752
+ name: "labelEnd",
1753
+ resolveAll: Qt,
1754
+ resolveTo: $t,
1755
+ tokenize: en
1756
+ }, Yt = { tokenize: tn }, Xt = { tokenize: nn }, Zt = { tokenize: rn };
1757
+ function Qt(e) {
1758
+ let t = -1, n = [];
1759
+ for (; ++t < e.length;) {
1760
+ let r = e[t][1];
1761
+ if (n.push(e[t]), r.type === "labelImage" || r.type === "labelLink" || r.type === "labelEnd") {
1762
+ let e = r.type === "labelImage" ? 4 : 2;
1763
+ r.type = "data", t += e;
1764
+ }
1765
+ }
1766
+ return e.length !== n.length && B(e, 0, e.length, n), e;
1767
+ }
1768
+ function $t(e, t) {
1769
+ let n = e.length, r = 0, i, a, o, s;
1770
+ for (; n--;) if (i = e[n][1], a) {
1771
+ if (i.type === "link" || i.type === "labelLink" && i._inactive) break;
1772
+ e[n][0] === "enter" && i.type === "labelLink" && (i._inactive = !0);
1773
+ } else if (o) {
1774
+ if (e[n][0] === "enter" && (i.type === "labelImage" || i.type === "labelLink") && !i._balanced && (a = n, i.type !== "labelLink")) {
1775
+ r = 2;
1776
+ break;
1777
+ }
1778
+ } else i.type === "labelEnd" && (o = n);
1779
+ let c = {
1780
+ type: e[a][1].type === "labelLink" ? "link" : "image",
1781
+ start: { ...e[a][1].start },
1782
+ end: { ...e[e.length - 1][1].end }
1783
+ }, l = {
1784
+ type: "label",
1785
+ start: { ...e[a][1].start },
1786
+ end: { ...e[o][1].end }
1787
+ }, u = {
1788
+ type: "labelText",
1789
+ start: { ...e[a + r + 2][1].end },
1790
+ end: { ...e[o - 2][1].start }
1791
+ };
1792
+ return s = [[
1793
+ "enter",
1794
+ c,
1795
+ t
1796
+ ], [
1797
+ "enter",
1798
+ l,
1799
+ t
1800
+ ]], s = V(s, e.slice(a + 1, a + r + 3)), s = V(s, [[
1801
+ "enter",
1802
+ u,
1803
+ t
1804
+ ]]), s = V(s, He(t.parser.constructs.insideSpan.null, e.slice(a + r + 4, o - 3), t)), s = V(s, [
1805
+ [
1806
+ "exit",
1807
+ u,
1808
+ t
1809
+ ],
1810
+ e[o - 2],
1811
+ e[o - 1],
1812
+ [
1813
+ "exit",
1814
+ l,
1815
+ t
1816
+ ]
1817
+ ]), s = V(s, e.slice(o + 1)), s = V(s, [[
1818
+ "exit",
1819
+ c,
1820
+ t
1821
+ ]]), B(e, a, e.length, s), e;
1822
+ }
1823
+ function en(e, t, n) {
1824
+ let r = this, i = r.events.length, a, o;
1825
+ for (; i--;) if ((r.events[i][1].type === "labelImage" || r.events[i][1].type === "labelLink") && !r.events[i][1]._balanced) {
1826
+ a = r.events[i][1];
1827
+ break;
1828
+ }
1829
+ return s;
1830
+ function s(t) {
1831
+ return a ? a._inactive ? d(t) : (o = r.parser.defined.includes(H(r.sliceSerialize({
1832
+ start: a.end,
1833
+ end: r.now()
1834
+ }))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(t), e.exit("labelMarker"), e.exit("labelEnd"), c) : n(t);
1835
+ }
1836
+ function c(t) {
1837
+ return t === 40 ? e.attempt(Yt, u, o ? u : d)(t) : t === 91 ? e.attempt(Xt, u, o ? l : d)(t) : o ? u(t) : d(t);
1838
+ }
1839
+ function l(t) {
1840
+ return e.attempt(Zt, u, d)(t);
1841
+ }
1842
+ function u(e) {
1843
+ return t(e);
1844
+ }
1845
+ function d(e) {
1846
+ return a._balanced = !0, n(e);
1847
+ }
1848
+ }
1849
+ function tn(e, t, n) {
1850
+ return r;
1851
+ function r(t) {
1852
+ return e.enter("resource"), e.enter("resourceMarker"), e.consume(t), e.exit("resourceMarker"), i;
1853
+ }
1854
+ function i(t) {
1855
+ return K(t) ? Z(e, a)(t) : a(t);
1856
+ }
1857
+ function a(t) {
1858
+ return t === 41 ? u(t) : Tt(e, o, s, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(t);
1859
+ }
1860
+ function o(t) {
1861
+ return K(t) ? Z(e, c)(t) : u(t);
1862
+ }
1863
+ function s(e) {
1864
+ return n(e);
1865
+ }
1866
+ function c(t) {
1867
+ return t === 34 || t === 39 || t === 40 ? Dt(e, l, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(t) : u(t);
1868
+ }
1869
+ function l(t) {
1870
+ return K(t) ? Z(e, u)(t) : u(t);
1871
+ }
1872
+ function u(r) {
1873
+ return r === 41 ? (e.enter("resourceMarker"), e.consume(r), e.exit("resourceMarker"), e.exit("resource"), t) : n(r);
1874
+ }
1875
+ }
1876
+ function nn(e, t, n) {
1877
+ let r = this;
1878
+ return i;
1879
+ function i(t) {
1880
+ return Et.call(r, e, a, o, "reference", "referenceMarker", "referenceString")(t);
1881
+ }
1882
+ function a(e) {
1883
+ return r.parser.defined.includes(H(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1))) ? t(e) : n(e);
1884
+ }
1885
+ function o(e) {
1886
+ return n(e);
1887
+ }
1888
+ }
1889
+ function rn(e, t, n) {
1890
+ return r;
1891
+ function r(t) {
1892
+ return e.enter("reference"), e.enter("referenceMarker"), e.consume(t), e.exit("referenceMarker"), i;
1893
+ }
1894
+ function i(r) {
1895
+ return r === 93 ? (e.enter("referenceMarker"), e.consume(r), e.exit("referenceMarker"), e.exit("reference"), t) : n(r);
1896
+ }
1897
+ }
1898
+ //#endregion
1899
+ //#region ../../node_modules/micromark-core-commonmark/lib/label-start-image.js
1900
+ var an = {
1901
+ name: "labelStartImage",
1902
+ resolveAll: Jt.resolveAll,
1903
+ tokenize: on
1904
+ };
1905
+ function on(e, t, n) {
1906
+ let r = this;
1907
+ return i;
1908
+ function i(t) {
1909
+ return e.enter("labelImage"), e.enter("labelImageMarker"), e.consume(t), e.exit("labelImageMarker"), a;
1910
+ }
1911
+ function a(t) {
1912
+ return t === 91 ? (e.enter("labelMarker"), e.consume(t), e.exit("labelMarker"), e.exit("labelImage"), o) : n(t);
1913
+ }
1914
+ function o(e) {
1915
+ /* c8 ignore next 3 */
1916
+ return e === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(e) : t(e);
1917
+ }
1918
+ }
1919
+ //#endregion
1920
+ //#region ../../node_modules/micromark-core-commonmark/lib/label-start-link.js
1921
+ var sn = {
1922
+ name: "labelStartLink",
1923
+ resolveAll: Jt.resolveAll,
1924
+ tokenize: cn
1925
+ };
1926
+ function cn(e, t, n) {
1927
+ let r = this;
1928
+ return i;
1929
+ function i(t) {
1930
+ return e.enter("labelLink"), e.enter("labelMarker"), e.consume(t), e.exit("labelMarker"), e.exit("labelLink"), a;
1931
+ }
1932
+ function a(e) {
1933
+ /* c8 ignore next 3 */
1934
+ return e === 94 && "_hiddenFootnoteSupport" in r.parser.constructs ? n(e) : t(e);
1935
+ }
1936
+ }
1937
+ //#endregion
1938
+ //#region ../../node_modules/micromark-core-commonmark/lib/line-ending.js
1939
+ var ln = {
1940
+ name: "lineEnding",
1941
+ tokenize: un
1942
+ };
1943
+ function un(e, t) {
1944
+ return n;
1945
+ function n(n) {
1946
+ return e.enter("lineEnding"), e.consume(n), e.exit("lineEnding"), Y(e, t, "linePrefix");
1947
+ }
1948
+ }
1949
+ //#endregion
1950
+ //#region ../../node_modules/micromark-core-commonmark/lib/thematic-break.js
1951
+ var dn = {
1952
+ name: "thematicBreak",
1953
+ tokenize: fn
1954
+ };
1955
+ function fn(e, t, n) {
1956
+ let r = 0, i;
1957
+ return a;
1958
+ function a(t) {
1959
+ return e.enter("thematicBreak"), o(t);
1960
+ }
1961
+ function o(e) {
1962
+ return i = e, s(e);
1963
+ }
1964
+ function s(a) {
1965
+ return a === i ? (e.enter("thematicBreakSequence"), c(a)) : r >= 3 && (a === null || G(a)) ? (e.exit("thematicBreak"), t(a)) : n(a);
1966
+ }
1967
+ function c(t) {
1968
+ return t === i ? (e.consume(t), r++, c) : (e.exit("thematicBreakSequence"), q(t) ? Y(e, s, "whitespace")(t) : s(t));
1969
+ }
1970
+ }
1971
+ //#endregion
1972
+ //#region ../../node_modules/micromark-core-commonmark/lib/list.js
1973
+ var Q = {
1974
+ continuation: { tokenize: gn },
1975
+ exit: vn,
1976
+ name: "list",
1977
+ tokenize: hn
1978
+ }, pn = {
1979
+ partial: !0,
1980
+ tokenize: yn
1981
+ }, mn = {
1982
+ partial: !0,
1983
+ tokenize: _n
1984
+ };
1985
+ function hn(e, t, n) {
1986
+ let r = this, i = r.events[r.events.length - 1], a = i && i[1].type === "linePrefix" ? i[2].sliceSerialize(i[1], !0).length : 0, o = 0;
1987
+ return s;
1988
+ function s(t) {
1989
+ let i = r.containerState.type || (t === 42 || t === 43 || t === 45 ? "listUnordered" : "listOrdered");
1990
+ if (i === "listUnordered" ? !r.containerState.marker || t === r.containerState.marker : Ae(t)) {
1991
+ if (r.containerState.type || (r.containerState.type = i, e.enter(i, { _container: !0 })), i === "listUnordered") return e.enter("listItemPrefix"), t === 42 || t === 45 ? e.check(dn, n, l)(t) : l(t);
1992
+ if (!r.interrupt || t === 49) return e.enter("listItemPrefix"), e.enter("listItemValue"), c(t);
1993
+ }
1994
+ return n(t);
1995
+ }
1996
+ function c(t) {
1997
+ return Ae(t) && ++o < 10 ? (e.consume(t), c) : (!r.interrupt || o < 2) && (r.containerState.marker ? t === r.containerState.marker : t === 41 || t === 46) ? (e.exit("listItemValue"), l(t)) : n(t);
1998
+ }
1999
+ function l(t) {
2000
+ return e.enter("listItemMarker"), e.consume(t), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || t, e.check(Ye, r.interrupt ? n : u, e.attempt(pn, f, d));
2001
+ }
2002
+ function u(e) {
2003
+ return r.containerState.initialBlankLine = !0, a++, f(e);
2004
+ }
2005
+ function d(t) {
2006
+ return q(t) ? (e.enter("listItemPrefixWhitespace"), e.consume(t), e.exit("listItemPrefixWhitespace"), f) : n(t);
2007
+ }
2008
+ function f(n) {
2009
+ return r.containerState.size = a + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, t(n);
2010
+ }
2011
+ }
2012
+ function gn(e, t, n) {
2013
+ let r = this;
2014
+ return r.containerState._closeFlow = void 0, e.check(Ye, i, a);
2015
+ function i(n) {
2016
+ return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, Y(e, t, "listItemIndent", r.containerState.size + 1)(n);
2017
+ }
2018
+ function a(n) {
2019
+ return r.containerState.furtherBlankLines || !q(n) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, o(n)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(mn, t, o)(n));
2020
+ }
2021
+ function o(i) {
2022
+ return r.containerState._closeFlow = !0, r.interrupt = void 0, Y(e, e.attempt(Q, t, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(i);
2023
+ }
2024
+ }
2025
+ function _n(e, t, n) {
2026
+ let r = this;
2027
+ return Y(e, i, "listItemIndent", r.containerState.size + 1);
2028
+ function i(e) {
2029
+ let i = r.events[r.events.length - 1];
2030
+ return i && i[1].type === "listItemIndent" && i[2].sliceSerialize(i[1], !0).length === r.containerState.size ? t(e) : n(e);
2031
+ }
2032
+ }
2033
+ function vn(e) {
2034
+ e.exit(this.containerState.type);
2035
+ }
2036
+ function yn(e, t, n) {
2037
+ let r = this;
2038
+ return Y(e, i, "listItemPrefixWhitespace", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
2039
+ function i(e) {
2040
+ let i = r.events[r.events.length - 1];
2041
+ return !q(e) && i && i[1].type === "listItemPrefixWhitespace" ? t(e) : n(e);
2042
+ }
2043
+ }
2044
+ //#endregion
2045
+ //#region ../../node_modules/micromark-core-commonmark/lib/setext-underline.js
2046
+ var bn = {
2047
+ name: "setextUnderline",
2048
+ resolveTo: xn,
2049
+ tokenize: Sn
2050
+ };
2051
+ function xn(e, t) {
2052
+ let n = e.length, r, i, a;
2053
+ for (; n--;) if (e[n][0] === "enter") {
2054
+ if (e[n][1].type === "content") {
2055
+ r = n;
2056
+ break;
2057
+ }
2058
+ e[n][1].type === "paragraph" && (i = n);
2059
+ } else e[n][1].type === "content" && e.splice(n, 1), !a && e[n][1].type === "definition" && (a = n);
2060
+ let o = {
2061
+ type: "setextHeading",
2062
+ start: { ...e[r][1].start },
2063
+ end: { ...e[e.length - 1][1].end }
2064
+ };
2065
+ return e[i][1].type = "setextHeadingText", a ? (e.splice(i, 0, [
2066
+ "enter",
2067
+ o,
2068
+ t
2069
+ ]), e.splice(a + 1, 0, [
2070
+ "exit",
2071
+ e[r][1],
2072
+ t
2073
+ ]), e[r][1].end = { ...e[a][1].end }) : e[r][1] = o, e.push([
2074
+ "exit",
2075
+ o,
2076
+ t
2077
+ ]), e;
2078
+ }
2079
+ function Sn(e, t, n) {
2080
+ let r = this, i;
2081
+ return a;
2082
+ function a(t) {
2083
+ let a = r.events.length, s;
2084
+ for (; a--;) if (r.events[a][1].type !== "lineEnding" && r.events[a][1].type !== "linePrefix" && r.events[a][1].type !== "content") {
2085
+ s = r.events[a][1].type === "paragraph";
2086
+ break;
2087
+ }
2088
+ return !r.parser.lazy[r.now().line] && (r.interrupt || s) ? (e.enter("setextHeadingLine"), i = t, o(t)) : n(t);
2089
+ }
2090
+ function o(t) {
2091
+ return e.enter("setextHeadingLineSequence"), s(t);
2092
+ }
2093
+ function s(t) {
2094
+ return t === i ? (e.consume(t), s) : (e.exit("setextHeadingLineSequence"), q(t) ? Y(e, c, "lineSuffix")(t) : c(t));
2095
+ }
2096
+ function c(r) {
2097
+ return r === null || G(r) ? (e.exit("setextHeadingLine"), t(r)) : n(r);
2098
+ }
2099
+ }
2100
+ //#endregion
2101
+ //#region ../../node_modules/micromark/lib/initialize/flow.js
2102
+ var Cn = { tokenize: wn };
2103
+ function wn(e) {
2104
+ let t = this, n = e.attempt(Ye, r, e.attempt(this.parser.constructs.flowInitial, i, Y(e, e.attempt(this.parser.constructs.flow, i, e.attempt(bt, i)), "linePrefix")));
2105
+ return n;
2106
+ function r(r) {
2107
+ if (r === null) {
2108
+ e.consume(r);
2109
+ return;
2110
+ }
2111
+ return e.enter("lineEndingBlank"), e.consume(r), e.exit("lineEndingBlank"), t.currentConstruct = void 0, n;
2112
+ }
2113
+ function i(r) {
2114
+ if (r === null) {
2115
+ e.consume(r);
2116
+ return;
2117
+ }
2118
+ return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), t.currentConstruct = void 0, n;
2119
+ }
2120
+ }
2121
+ //#endregion
2122
+ //#region ../../node_modules/micromark/lib/initialize/text.js
2123
+ var Tn = { resolveAll: kn() }, En = On("string"), Dn = On("text");
2124
+ function On(e) {
2125
+ return {
2126
+ resolveAll: kn(e === "text" ? An : void 0),
2127
+ tokenize: t
2128
+ };
2129
+ function t(t) {
2130
+ let n = this, r = this.parser.constructs[e], i = t.attempt(r, a, o);
2131
+ return a;
2132
+ function a(e) {
2133
+ return c(e) ? i(e) : o(e);
2134
+ }
2135
+ function o(e) {
2136
+ if (e === null) {
2137
+ t.consume(e);
2138
+ return;
2139
+ }
2140
+ return t.enter("data"), t.consume(e), s;
2141
+ }
2142
+ function s(e) {
2143
+ return c(e) ? (t.exit("data"), i(e)) : (t.consume(e), s);
2144
+ }
2145
+ function c(e) {
2146
+ if (e === null) return !0;
2147
+ let t = r[e], i = -1;
2148
+ if (t) for (; ++i < t.length;) {
2149
+ let e = t[i];
2150
+ if (!e.previous || e.previous.call(n, n.previous)) return !0;
2151
+ }
2152
+ return !1;
2153
+ }
2154
+ }
2155
+ }
2156
+ function kn(e) {
2157
+ return t;
2158
+ function t(t, n) {
2159
+ let r = -1, i;
2160
+ for (; ++r <= t.length;) i === void 0 ? t[r] && t[r][1].type === "data" && (i = r, r++) : (!t[r] || t[r][1].type !== "data") && (r !== i + 2 && (t[i][1].end = t[r - 1][1].end, t.splice(i + 2, r - i - 2), r = i + 2), i = void 0);
2161
+ return e ? e(t, n) : t;
2162
+ }
2163
+ }
2164
+ function An(e, t) {
2165
+ let n = 0;
2166
+ for (; ++n <= e.length;) if ((n === e.length || e[n][1].type === "lineEnding") && e[n - 1][1].type === "data") {
2167
+ let r = e[n - 1][1], i = t.sliceStream(r), a = i.length, o = -1, s = 0, c;
2168
+ for (; a--;) {
2169
+ let e = i[a];
2170
+ if (typeof e == "string") {
2171
+ for (o = e.length; e.charCodeAt(o - 1) === 32;) s++, o--;
2172
+ if (o) break;
2173
+ o = -1;
2174
+ } else if (e === -2) c = !0, s++;
2175
+ else if (e !== -1) {
2176
+ a++;
2177
+ break;
2178
+ }
2179
+ }
2180
+ if (t._contentTypeTextTrailing && n === e.length && (s = 0), s) {
2181
+ let i = {
2182
+ type: n === e.length || c || s < 2 ? "lineSuffix" : "hardBreakTrailing",
2183
+ start: {
2184
+ _bufferIndex: a ? o : r.start._bufferIndex + o,
2185
+ _index: r.start._index + a,
2186
+ line: r.end.line,
2187
+ column: r.end.column - s,
2188
+ offset: r.end.offset - s
2189
+ },
2190
+ end: { ...r.end }
2191
+ };
2192
+ r.end = { ...i.start }, r.start.offset === r.end.offset ? Object.assign(r, i) : (e.splice(n, 0, [
2193
+ "enter",
2194
+ i,
2195
+ t
2196
+ ], [
2197
+ "exit",
2198
+ i,
2199
+ t
2200
+ ]), n += 2);
2201
+ }
2202
+ n++;
2203
+ }
2204
+ return e;
2205
+ }
2206
+ //#endregion
2207
+ //#region ../../node_modules/micromark/lib/constructs.js
2208
+ var jn = /* @__PURE__ */ t({
2209
+ attentionMarkers: () => zn,
2210
+ contentInitial: () => Nn,
2211
+ disable: () => Bn,
2212
+ document: () => Mn,
2213
+ flow: () => Fn,
2214
+ flowInitial: () => Pn,
2215
+ insideSpan: () => Rn,
2216
+ string: () => In,
2217
+ text: () => Ln
2218
+ }), Mn = {
2219
+ 42: Q,
2220
+ 43: Q,
2221
+ 45: Q,
2222
+ 48: Q,
2223
+ 49: Q,
2224
+ 50: Q,
2225
+ 51: Q,
2226
+ 52: Q,
2227
+ 53: Q,
2228
+ 54: Q,
2229
+ 55: Q,
2230
+ 56: Q,
2231
+ 57: Q,
2232
+ 62: Ze
2233
+ }, Nn = { 91: Ot }, Pn = {
2234
+ [-2]: lt,
2235
+ [-1]: lt,
2236
+ 32: lt
2237
+ }, Fn = {
2238
+ 35: Pt,
2239
+ 42: dn,
2240
+ 45: [bn, dn],
2241
+ 60: zt,
2242
+ 61: bn,
2243
+ 95: dn,
2244
+ 96: ot,
2245
+ 126: ot
2246
+ }, In = {
2247
+ 38: rt,
2248
+ 92: tt
2249
+ }, Ln = {
2250
+ [-5]: ln,
2251
+ [-4]: ln,
2252
+ [-3]: ln,
2253
+ 33: an,
2254
+ 38: rt,
2255
+ 42: Ue,
2256
+ 60: [qe, Kt],
2257
+ 91: sn,
2258
+ 92: [Mt, tt],
2259
+ 93: Jt,
2260
+ 95: Ue,
2261
+ 96: pt
2262
+ }, Rn = { null: [Ue, Tn] }, zn = { null: [42, 95] }, Bn = { null: [] };
2263
+ //#endregion
2264
+ //#region ../../node_modules/micromark/lib/create-tokenizer.js
2265
+ function Vn(e, t, n) {
2266
+ let r = {
2267
+ _bufferIndex: -1,
2268
+ _index: 0,
2269
+ line: n && n.line || 1,
2270
+ column: n && n.column || 1,
2271
+ offset: n && n.offset || 0
2272
+ }, i = {}, a = [], o = [], s = [], c = {
2273
+ attempt: C(x),
2274
+ check: C(S),
2275
+ consume: v,
2276
+ enter: y,
2277
+ exit: b,
2278
+ interrupt: C(S, { interrupt: !0 })
2279
+ }, l = {
2280
+ code: null,
2281
+ containerState: {},
2282
+ defineSkip: h,
2283
+ events: [],
2284
+ now: m,
2285
+ parser: e,
2286
+ previous: null,
2287
+ sliceSerialize: f,
2288
+ sliceStream: p,
2289
+ write: d
2290
+ }, u = t.tokenize.call(l, c);
2291
+ return t.resolveAll && a.push(t), l;
2292
+ function d(e) {
2293
+ return o = V(o, e), g(), o[o.length - 1] === null ? (w(t, 0), l.events = He(a, l.events, l), l.events) : [];
2294
+ }
2295
+ function f(e, t) {
2296
+ return Un(p(e), t);
2297
+ }
2298
+ function p(e) {
2299
+ return Hn(o, e);
2300
+ }
2301
+ function m() {
2302
+ let { _bufferIndex: e, _index: t, line: n, column: i, offset: a } = r;
2303
+ return {
2304
+ _bufferIndex: e,
2305
+ _index: t,
2306
+ line: n,
2307
+ column: i,
2308
+ offset: a
2309
+ };
2310
+ }
2311
+ function h(e) {
2312
+ i[e.line] = e.column, E();
2313
+ }
2314
+ function g() {
2315
+ let e;
2316
+ for (; r._index < o.length;) {
2317
+ let t = o[r._index];
2318
+ if (typeof t == "string") for (e = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === e && r._bufferIndex < t.length;) _(t.charCodeAt(r._bufferIndex));
2319
+ else _(t);
2320
+ }
2321
+ }
2322
+ function _(e) {
2323
+ u = u(e);
2324
+ }
2325
+ function v(e) {
2326
+ G(e) ? (r.line++, r.column = 1, r.offset += e === -3 ? 2 : 1, E()) : e !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === o[r._index].length && (r._bufferIndex = -1, r._index++)), l.previous = e;
2327
+ }
2328
+ function y(e, t) {
2329
+ let n = t || {};
2330
+ return n.type = e, n.start = m(), l.events.push([
2331
+ "enter",
2332
+ n,
2333
+ l
2334
+ ]), s.push(n), n;
2335
+ }
2336
+ function b(e) {
2337
+ let t = s.pop();
2338
+ return t.end = m(), l.events.push([
2339
+ "exit",
2340
+ t,
2341
+ l
2342
+ ]), t;
2343
+ }
2344
+ function x(e, t) {
2345
+ w(e, t.from);
2346
+ }
2347
+ function S(e, t) {
2348
+ t.restore();
2349
+ }
2350
+ function C(e, t) {
2351
+ return n;
2352
+ function n(n, r, i) {
2353
+ let a, o, s, u;
2354
+ return Array.isArray(n) ? f(n) : "tokenize" in n ? f([n]) : d(n);
2355
+ function d(e) {
2356
+ return t;
2357
+ function t(t) {
2358
+ let n = t !== null && e[t], r = t !== null && e.null;
2359
+ return f([...Array.isArray(n) ? n : n ? [n] : [], ...Array.isArray(r) ? r : r ? [r] : []])(t);
2360
+ }
2361
+ }
2362
+ function f(e) {
2363
+ return a = e, o = 0, e.length === 0 ? i : p(e[o]);
2364
+ }
2365
+ function p(e) {
2366
+ return n;
2367
+ function n(n) {
2368
+ return u = T(), s = e, e.partial || (l.currentConstruct = e), e.name && l.parser.constructs.disable.null.includes(e.name) ? h(n) : e.tokenize.call(t ? Object.assign(Object.create(l), t) : l, c, m, h)(n);
2369
+ }
2370
+ }
2371
+ function m(t) {
2372
+ return e(s, u), r;
2373
+ }
2374
+ function h(e) {
2375
+ return u.restore(), ++o < a.length ? p(a[o]) : i;
2376
+ }
2377
+ }
2378
+ }
2379
+ function w(e, t) {
2380
+ e.resolveAll && !a.includes(e) && a.push(e), e.resolve && B(l.events, t, l.events.length - t, e.resolve(l.events.slice(t), l)), e.resolveTo && (l.events = e.resolveTo(l.events, l));
2381
+ }
2382
+ function T() {
2383
+ let e = m(), t = l.previous, n = l.currentConstruct, i = l.events.length, a = Array.from(s);
2384
+ return {
2385
+ from: i,
2386
+ restore: o
2387
+ };
2388
+ function o() {
2389
+ r = e, l.previous = t, l.currentConstruct = n, l.events.length = i, s = a, E();
2390
+ }
2391
+ }
2392
+ function E() {
2393
+ r.line in i && r.column < 2 && (r.column = i[r.line], r.offset += i[r.line] - 1);
2394
+ }
2395
+ }
2396
+ function Hn(e, t) {
2397
+ let n = t.start._index, r = t.start._bufferIndex, i = t.end._index, a = t.end._bufferIndex, o;
2398
+ if (n === i) o = [e[n].slice(r, a)];
2399
+ else {
2400
+ if (o = e.slice(n, i), r > -1) {
2401
+ let e = o[0];
2402
+ typeof e == "string" ? o[0] = e.slice(r) : o.shift();
2403
+ }
2404
+ a > 0 && o.push(e[i].slice(0, a));
2405
+ }
2406
+ return o;
2407
+ }
2408
+ function Un(e, t) {
2409
+ let n = -1, r = [], i;
2410
+ for (; ++n < e.length;) {
2411
+ let a = e[n], o;
2412
+ if (typeof a == "string") o = a;
2413
+ else switch (a) {
2414
+ case -5:
2415
+ o = "\r";
2416
+ break;
2417
+ case -4:
2418
+ o = "\n";
2419
+ break;
2420
+ case -3:
2421
+ o = "\r\n";
2422
+ break;
2423
+ case -2:
2424
+ o = t ? " " : " ";
2425
+ break;
2426
+ case -1:
2427
+ if (!t && i) continue;
2428
+ o = " ";
2429
+ break;
2430
+ default: o = String.fromCharCode(a);
2431
+ }
2432
+ i = a === -2, r.push(o);
2433
+ }
2434
+ return r.join("");
2435
+ }
2436
+ //#endregion
2437
+ //#region ../../node_modules/micromark/lib/parse.js
2438
+ function Wn(e) {
2439
+ let t = {
2440
+ constructs: we([jn, ...(e || {}).extensions || []]),
2441
+ content: n(Fe),
2442
+ defined: [],
2443
+ document: n(Le),
2444
+ flow: n(Cn),
2445
+ lazy: {},
2446
+ string: n(En),
2447
+ text: n(Dn)
2448
+ };
2449
+ return t;
2450
+ function n(e) {
2451
+ return n;
2452
+ function n(n) {
2453
+ return Vn(t, e, n);
2454
+ }
2455
+ }
2456
+ }
2457
+ //#endregion
2458
+ //#region ../../node_modules/micromark/lib/postprocess.js
2459
+ function Gn(e) {
2460
+ for (; !vt(e););
2461
+ return e;
2462
+ }
2463
+ //#endregion
2464
+ //#region ../../node_modules/micromark/lib/preprocess.js
2465
+ var Kn = /[\0\t\n\r]/g;
2466
+ function qn() {
2467
+ let e = 1, t = "", n = !0, r;
2468
+ return i;
2469
+ function i(i, a, o) {
2470
+ let s = [], c, l, u, d, f;
2471
+ for (i = t + (typeof i == "string" ? i.toString() : new TextDecoder(a || void 0).decode(i)), u = 0, t = "", n &&= (i.charCodeAt(0) === 65279 && u++, void 0); u < i.length;) {
2472
+ if (Kn.lastIndex = u, c = Kn.exec(i), d = c && c.index !== void 0 ? c.index : i.length, f = i.charCodeAt(d), !c) {
2473
+ t = i.slice(u);
2474
+ break;
2475
+ }
2476
+ if (f === 10 && u === d && r) s.push(-3), r = void 0;
2477
+ else switch (r &&= (s.push(-5), void 0), u < d && (s.push(i.slice(u, d)), e += d - u), f) {
2478
+ case 0:
2479
+ s.push(65533), e++;
2480
+ break;
2481
+ case 9:
2482
+ for (l = Math.ceil(e / 4) * 4, s.push(-2); e++ < l;) s.push(-1);
2483
+ break;
2484
+ case 10:
2485
+ s.push(-4), e = 1;
2486
+ break;
2487
+ default: r = !0, e = 1;
2488
+ }
2489
+ u = d + 1;
2490
+ }
2491
+ return o && (r && s.push(-5), t && s.push(t), s.push(null)), s;
2492
+ }
2493
+ }
2494
+ //#endregion
2495
+ //#region ../../node_modules/micromark-util-decode-string/index.js
2496
+ var Jn = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
2497
+ function Yn(e) {
2498
+ return e.replace(Jn, Xn);
2499
+ }
2500
+ function Xn(e, t, n) {
2501
+ if (t) return t;
2502
+ if (n.charCodeAt(0) === 35) {
2503
+ let e = n.charCodeAt(1), t = e === 120 || e === 88;
2504
+ return De(n.slice(t ? 2 : 1), t ? 16 : 10);
2505
+ }
2506
+ return Se(n) || e;
2507
+ }
2508
+ //#endregion
2509
+ //#region ../../node_modules/unist-util-stringify-position/lib/index.js
2510
+ function Zn(e) {
2511
+ return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? $n(e.position) : "start" in e || "end" in e ? $n(e) : "line" in e || "column" in e ? Qn(e) : "";
2512
+ }
2513
+ function Qn(e) {
2514
+ return er(e && e.line) + ":" + er(e && e.column);
2515
+ }
2516
+ function $n(e) {
2517
+ return Qn(e && e.start) + "-" + Qn(e && e.end);
2518
+ }
2519
+ function er(e) {
2520
+ return e && typeof e == "number" ? e : 1;
2521
+ }
2522
+ //#endregion
2523
+ //#region ../../node_modules/mdast-util-from-markdown/lib/index.js
2524
+ var tr = {}.hasOwnProperty;
2525
+ function nr(e, t, n) {
2526
+ return t && typeof t == "object" && (n = t, t = void 0), rr(n)(Gn(Wn(n).document().write(qn()(e, t, !0))));
2527
+ }
2528
+ function rr(e) {
2529
+ let t = {
2530
+ transforms: [],
2531
+ canContainEols: [
2532
+ "emphasis",
2533
+ "fragment",
2534
+ "heading",
2535
+ "paragraph",
2536
+ "strong"
2537
+ ],
2538
+ enter: {
2539
+ autolink: a(he),
2540
+ autolinkProtocol: T,
2541
+ autolinkEmail: T,
2542
+ atxHeading: a(fe),
2543
+ blockQuote: a(se),
2544
+ characterEscape: T,
2545
+ characterReference: T,
2546
+ codeFenced: a(ce),
2547
+ codeFencedFenceInfo: o,
2548
+ codeFencedFenceMeta: o,
2549
+ codeIndented: a(ce, o),
2550
+ codeText: a(le, o),
2551
+ codeTextData: T,
2552
+ data: T,
2553
+ codeFlowValue: T,
2554
+ definition: a(ue),
2555
+ definitionDestinationString: o,
2556
+ definitionLabelString: o,
2557
+ definitionTitleString: o,
2558
+ emphasis: a(de),
2559
+ hardBreakEscape: a(pe),
2560
+ hardBreakTrailing: a(pe),
2561
+ htmlFlow: a(z, o),
2562
+ htmlFlowData: T,
2563
+ htmlText: a(z, o),
2564
+ htmlTextData: T,
2565
+ image: a(me),
2566
+ label: o,
2567
+ link: a(he),
2568
+ listItem: a(ve),
2569
+ listItemValue: f,
2570
+ listOrdered: a(ge, d),
2571
+ listUnordered: a(ge),
2572
+ paragraph: a(ye),
2573
+ reference: ee,
2574
+ referenceString: o,
2575
+ resourceDestinationString: o,
2576
+ resourceTitleString: o,
2577
+ setextHeading: a(fe),
2578
+ strong: a(be),
2579
+ thematicBreak: a(B)
2580
+ },
2581
+ exit: {
2582
+ atxHeading: c(),
2583
+ atxHeadingSequence: x,
2584
+ autolink: c(),
2585
+ autolinkEmail: oe,
2586
+ autolinkProtocol: ae,
2587
+ blockQuote: c(),
2588
+ characterEscapeValue: E,
2589
+ characterReferenceMarkerHexadecimal: ne,
2590
+ characterReferenceMarkerNumeric: ne,
2591
+ characterReferenceValue: re,
2592
+ characterReference: ie,
2593
+ codeFenced: c(g),
2594
+ codeFencedFence: h,
2595
+ codeFencedFenceInfo: p,
2596
+ codeFencedFenceMeta: m,
2597
+ codeFlowValue: E,
2598
+ codeIndented: c(_),
2599
+ codeText: c(j),
2600
+ codeTextData: E,
2601
+ data: E,
2602
+ definition: c(),
2603
+ definitionDestinationString: b,
2604
+ definitionLabelString: v,
2605
+ definitionTitleString: y,
2606
+ emphasis: c(),
2607
+ hardBreakEscape: c(O),
2608
+ hardBreakTrailing: c(O),
2609
+ htmlFlow: c(k),
2610
+ htmlFlowData: E,
2611
+ htmlText: c(A),
2612
+ htmlTextData: E,
2613
+ image: c(N),
2614
+ label: F,
2615
+ labelText: P,
2616
+ lineEnding: D,
2617
+ link: c(M),
2618
+ listItem: c(),
2619
+ listOrdered: c(),
2620
+ listUnordered: c(),
2621
+ paragraph: c(),
2622
+ referenceString: te,
2623
+ resourceDestinationString: I,
2624
+ resourceTitleString: L,
2625
+ resource: R,
2626
+ setextHeading: c(w),
2627
+ setextHeadingLineSequence: C,
2628
+ setextHeadingText: S,
2629
+ strong: c(),
2630
+ thematicBreak: c()
2631
+ }
2632
+ };
2633
+ ir(t, (e || {}).mdastExtensions || []);
2634
+ let n = {};
2635
+ return r;
2636
+ function r(e) {
2637
+ let r = {
2638
+ type: "root",
2639
+ children: []
2640
+ }, a = {
2641
+ stack: [r],
2642
+ tokenStack: [],
2643
+ config: t,
2644
+ enter: s,
2645
+ exit: l,
2646
+ buffer: o,
2647
+ resume: u,
2648
+ data: n
2649
+ }, c = [], d = -1;
2650
+ for (; ++d < e.length;) (e[d][1].type === "listOrdered" || e[d][1].type === "listUnordered") && (e[d][0] === "enter" ? c.push(d) : d = i(e, c.pop(), d));
2651
+ for (d = -1; ++d < e.length;) {
2652
+ let n = t[e[d][0]];
2653
+ tr.call(n, e[d][1].type) && n[e[d][1].type].call(Object.assign({ sliceSerialize: e[d][2].sliceSerialize }, a), e[d][1]);
2654
+ }
2655
+ if (a.tokenStack.length > 0) {
2656
+ let e = a.tokenStack[a.tokenStack.length - 1];
2657
+ (e[1] || or).call(a, void 0, e[0]);
2658
+ }
2659
+ for (r.position = {
2660
+ start: $(e.length > 0 ? e[0][1].start : {
2661
+ line: 1,
2662
+ column: 1,
2663
+ offset: 0
2664
+ }),
2665
+ end: $(e.length > 0 ? e[e.length - 2][1].end : {
2666
+ line: 1,
2667
+ column: 1,
2668
+ offset: 0
2669
+ })
2670
+ }, d = -1; ++d < t.transforms.length;) r = t.transforms[d](r) || r;
2671
+ return r;
2672
+ }
2673
+ function i(e, t, n) {
2674
+ let r = t - 1, i = -1, a = !1, o, s, c, l;
2675
+ for (; ++r <= n;) {
2676
+ let t = e[r];
2677
+ switch (t[1].type) {
2678
+ case "listUnordered":
2679
+ case "listOrdered":
2680
+ case "blockQuote":
2681
+ t[0] === "enter" ? i++ : i--, l = void 0;
2682
+ break;
2683
+ case "lineEndingBlank":
2684
+ t[0] === "enter" && (o && !l && !i && !c && (c = r), l = void 0);
2685
+ break;
2686
+ case "linePrefix":
2687
+ case "listItemValue":
2688
+ case "listItemMarker":
2689
+ case "listItemPrefix":
2690
+ case "listItemPrefixWhitespace": break;
2691
+ default: l = void 0;
2692
+ }
2693
+ if (!i && t[0] === "enter" && t[1].type === "listItemPrefix" || i === -1 && t[0] === "exit" && (t[1].type === "listUnordered" || t[1].type === "listOrdered")) {
2694
+ if (o) {
2695
+ let i = r;
2696
+ for (s = void 0; i--;) {
2697
+ let t = e[i];
2698
+ if (t[1].type === "lineEnding" || t[1].type === "lineEndingBlank") {
2699
+ if (t[0] === "exit") continue;
2700
+ s && (e[s][1].type = "lineEndingBlank", a = !0), t[1].type = "lineEnding", s = i;
2701
+ } else if (!(t[1].type === "linePrefix" || t[1].type === "blockQuotePrefix" || t[1].type === "blockQuotePrefixWhitespace" || t[1].type === "blockQuoteMarker" || t[1].type === "listItemIndent")) break;
2702
+ }
2703
+ c && (!s || c < s) && (o._spread = !0), o.end = Object.assign({}, s ? e[s][1].start : t[1].end), e.splice(s || r, 0, [
2704
+ "exit",
2705
+ o,
2706
+ t[2]
2707
+ ]), r++, n++;
2708
+ }
2709
+ if (t[1].type === "listItemPrefix") {
2710
+ let i = {
2711
+ type: "listItem",
2712
+ _spread: !1,
2713
+ start: Object.assign({}, t[1].start),
2714
+ end: void 0
2715
+ };
2716
+ o = i, e.splice(r, 0, [
2717
+ "enter",
2718
+ i,
2719
+ t[2]
2720
+ ]), r++, n++, c = void 0, l = !0;
2721
+ }
2722
+ }
2723
+ }
2724
+ return e[t][1]._spread = a, n;
2725
+ }
2726
+ function a(e, t) {
2727
+ return n;
2728
+ function n(n) {
2729
+ s.call(this, e(n), n), t && t.call(this, n);
2730
+ }
2731
+ }
2732
+ function o() {
2733
+ this.stack.push({
2734
+ type: "fragment",
2735
+ children: []
2736
+ });
2737
+ }
2738
+ function s(e, t, n) {
2739
+ this.stack[this.stack.length - 1].children.push(e), this.stack.push(e), this.tokenStack.push([t, n || void 0]), e.position = {
2740
+ start: $(t.start),
2741
+ end: void 0
2742
+ };
2743
+ }
2744
+ function c(e) {
2745
+ return t;
2746
+ function t(t) {
2747
+ e && e.call(this, t), l.call(this, t);
2748
+ }
2749
+ }
2750
+ function l(e, t) {
2751
+ let n = this.stack.pop(), r = this.tokenStack.pop();
2752
+ if (r) r[0].type !== e.type && (t ? t.call(this, e, r[0]) : (r[1] || or).call(this, e, r[0]));
2753
+ else throw Error("Cannot close `" + e.type + "` (" + Zn({
2754
+ start: e.start,
2755
+ end: e.end
2756
+ }) + "): it’s not open");
2757
+ n.position.end = $(e.end);
2758
+ }
2759
+ function u() {
2760
+ return _e(this.stack.pop());
2761
+ }
2762
+ function d() {
2763
+ this.data.expectingFirstListItemValue = !0;
2764
+ }
2765
+ function f(e) {
2766
+ if (this.data.expectingFirstListItemValue) {
2767
+ let t = this.stack[this.stack.length - 2];
2768
+ t.start = Number.parseInt(this.sliceSerialize(e), 10), this.data.expectingFirstListItemValue = void 0;
2769
+ }
2770
+ }
2771
+ function p() {
2772
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2773
+ t.lang = e;
2774
+ }
2775
+ function m() {
2776
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2777
+ t.meta = e;
2778
+ }
2779
+ function h() {
2780
+ this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
2781
+ }
2782
+ function g() {
2783
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2784
+ t.value = e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
2785
+ }
2786
+ function _() {
2787
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2788
+ t.value = e.replace(/(\r?\n|\r)$/g, "");
2789
+ }
2790
+ function v(e) {
2791
+ let t = this.resume(), n = this.stack[this.stack.length - 1];
2792
+ n.label = t, n.identifier = H(this.sliceSerialize(e)).toLowerCase();
2793
+ }
2794
+ function y() {
2795
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2796
+ t.title = e;
2797
+ }
2798
+ function b() {
2799
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2800
+ t.url = e;
2801
+ }
2802
+ function x(e) {
2803
+ let t = this.stack[this.stack.length - 1];
2804
+ t.depth ||= this.sliceSerialize(e).length;
2805
+ }
2806
+ function S() {
2807
+ this.data.setextHeadingSlurpLineEnding = !0;
2808
+ }
2809
+ function C(e) {
2810
+ let t = this.stack[this.stack.length - 1];
2811
+ t.depth = this.sliceSerialize(e).codePointAt(0) === 61 ? 1 : 2;
2812
+ }
2813
+ function w() {
2814
+ this.data.setextHeadingSlurpLineEnding = void 0;
2815
+ }
2816
+ function T(e) {
2817
+ let t = this.stack[this.stack.length - 1].children, n = t[t.length - 1];
2818
+ (!n || n.type !== "text") && (n = xe(), n.position = {
2819
+ start: $(e.start),
2820
+ end: void 0
2821
+ }, t.push(n)), this.stack.push(n);
2822
+ }
2823
+ function E(e) {
2824
+ let t = this.stack.pop();
2825
+ t.value += this.sliceSerialize(e), t.position.end = $(e.end);
2826
+ }
2827
+ function D(e) {
2828
+ let n = this.stack[this.stack.length - 1];
2829
+ if (this.data.atHardBreak) {
2830
+ let t = n.children[n.children.length - 1];
2831
+ t.position.end = $(e.end), this.data.atHardBreak = void 0;
2832
+ return;
2833
+ }
2834
+ !this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(n.type) && (T.call(this, e), E.call(this, e));
2835
+ }
2836
+ function O() {
2837
+ this.data.atHardBreak = !0;
2838
+ }
2839
+ function k() {
2840
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2841
+ t.value = e;
2842
+ }
2843
+ function A() {
2844
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2845
+ t.value = e;
2846
+ }
2847
+ function j() {
2848
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2849
+ t.value = e;
2850
+ }
2851
+ function M() {
2852
+ let e = this.stack[this.stack.length - 1];
2853
+ if (this.data.inReference) {
2854
+ let t = this.data.referenceType || "shortcut";
2855
+ e.type += "Reference", e.referenceType = t, delete e.url, delete e.title;
2856
+ } else delete e.identifier, delete e.label;
2857
+ this.data.referenceType = void 0;
2858
+ }
2859
+ function N() {
2860
+ let e = this.stack[this.stack.length - 1];
2861
+ if (this.data.inReference) {
2862
+ let t = this.data.referenceType || "shortcut";
2863
+ e.type += "Reference", e.referenceType = t, delete e.url, delete e.title;
2864
+ } else delete e.identifier, delete e.label;
2865
+ this.data.referenceType = void 0;
2866
+ }
2867
+ function P(e) {
2868
+ let t = this.sliceSerialize(e), n = this.stack[this.stack.length - 2];
2869
+ n.label = Yn(t), n.identifier = H(t).toLowerCase();
2870
+ }
2871
+ function F() {
2872
+ let e = this.stack[this.stack.length - 1], t = this.resume(), n = this.stack[this.stack.length - 1];
2873
+ this.data.inReference = !0, n.type === "link" ? n.children = e.children : n.alt = t;
2874
+ }
2875
+ function I() {
2876
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2877
+ t.url = e;
2878
+ }
2879
+ function L() {
2880
+ let e = this.resume(), t = this.stack[this.stack.length - 1];
2881
+ t.title = e;
2882
+ }
2883
+ function R() {
2884
+ this.data.inReference = void 0;
2885
+ }
2886
+ function ee() {
2887
+ this.data.referenceType = "collapsed";
2888
+ }
2889
+ function te(e) {
2890
+ let t = this.resume(), n = this.stack[this.stack.length - 1];
2891
+ n.label = t, n.identifier = H(this.sliceSerialize(e)).toLowerCase(), this.data.referenceType = "full";
2892
+ }
2893
+ function ne(e) {
2894
+ this.data.characterReferenceType = e.type;
2895
+ }
2896
+ function re(e) {
2897
+ let t = this.sliceSerialize(e), n = this.data.characterReferenceType, r;
2898
+ n ? (r = De(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r = Se(t);
2899
+ let i = this.stack[this.stack.length - 1];
2900
+ i.value += r;
2901
+ }
2902
+ function ie(e) {
2903
+ let t = this.stack.pop();
2904
+ t.position.end = $(e.end);
2905
+ }
2906
+ function ae(e) {
2907
+ E.call(this, e);
2908
+ let t = this.stack[this.stack.length - 1];
2909
+ t.url = this.sliceSerialize(e);
2910
+ }
2911
+ function oe(e) {
2912
+ E.call(this, e);
2913
+ let t = this.stack[this.stack.length - 1];
2914
+ t.url = "mailto:" + this.sliceSerialize(e);
2915
+ }
2916
+ function se() {
2917
+ return {
2918
+ type: "blockquote",
2919
+ children: []
2920
+ };
2921
+ }
2922
+ function ce() {
2923
+ return {
2924
+ type: "code",
2925
+ lang: null,
2926
+ meta: null,
2927
+ value: ""
2928
+ };
2929
+ }
2930
+ function le() {
2931
+ return {
2932
+ type: "inlineCode",
2933
+ value: ""
2934
+ };
2935
+ }
2936
+ function ue() {
2937
+ return {
2938
+ type: "definition",
2939
+ identifier: "",
2940
+ label: null,
2941
+ title: null,
2942
+ url: ""
2943
+ };
2944
+ }
2945
+ function de() {
2946
+ return {
2947
+ type: "emphasis",
2948
+ children: []
2949
+ };
2950
+ }
2951
+ function fe() {
2952
+ return {
2953
+ type: "heading",
2954
+ depth: 0,
2955
+ children: []
2956
+ };
2957
+ }
2958
+ function pe() {
2959
+ return { type: "break" };
2960
+ }
2961
+ function z() {
2962
+ return {
2963
+ type: "html",
2964
+ value: ""
2965
+ };
2966
+ }
2967
+ function me() {
2968
+ return {
2969
+ type: "image",
2970
+ title: null,
2971
+ url: "",
2972
+ alt: null
2973
+ };
2974
+ }
2975
+ function he() {
2976
+ return {
2977
+ type: "link",
2978
+ title: null,
2979
+ url: "",
2980
+ children: []
2981
+ };
2982
+ }
2983
+ function ge(e) {
2984
+ return {
2985
+ type: "list",
2986
+ ordered: e.type === "listOrdered",
2987
+ start: null,
2988
+ spread: e._spread,
2989
+ children: []
2990
+ };
2991
+ }
2992
+ function ve(e) {
2993
+ return {
2994
+ type: "listItem",
2995
+ spread: e._spread,
2996
+ checked: null,
2997
+ children: []
2998
+ };
2999
+ }
3000
+ function ye() {
3001
+ return {
3002
+ type: "paragraph",
3003
+ children: []
3004
+ };
3005
+ }
3006
+ function be() {
3007
+ return {
3008
+ type: "strong",
3009
+ children: []
3010
+ };
3011
+ }
3012
+ function xe() {
3013
+ return {
3014
+ type: "text",
3015
+ value: ""
3016
+ };
3017
+ }
3018
+ function B() {
3019
+ return { type: "thematicBreak" };
3020
+ }
3021
+ }
3022
+ function $(e) {
3023
+ return {
3024
+ line: e.line,
3025
+ column: e.column,
3026
+ offset: e.offset
3027
+ };
3028
+ }
3029
+ function ir(e, t) {
3030
+ let n = -1;
3031
+ for (; ++n < t.length;) {
3032
+ let r = t[n];
3033
+ Array.isArray(r) ? ir(e, r) : ar(e, r);
3034
+ }
3035
+ }
3036
+ function ar(e, t) {
3037
+ let n;
3038
+ for (n in t) if (tr.call(t, n)) switch (n) {
3039
+ case "canContainEols": {
3040
+ let r = t[n];
3041
+ r && e[n].push(...r);
3042
+ break;
3043
+ }
3044
+ case "transforms": {
3045
+ let r = t[n];
3046
+ r && e[n].push(...r);
3047
+ break;
3048
+ }
3049
+ case "enter":
3050
+ case "exit": {
3051
+ let r = t[n];
3052
+ r && Object.assign(e[n], r);
3053
+ break;
3054
+ }
3055
+ }
3056
+ }
3057
+ function or(e, t) {
3058
+ throw Error(e ? "Cannot close `" + e.type + "` (" + Zn({
3059
+ start: e.start,
3060
+ end: e.end
3061
+ }) + "): a different token (`" + t.type + "`, " + Zn({
3062
+ start: t.start,
3063
+ end: t.end
3064
+ }) + ") is open" : "Cannot close document, a token (`" + t.type + "`, " + Zn({
3065
+ start: t.start,
3066
+ end: t.end
3067
+ }) + ") is still open");
3068
+ }
3069
+ //#endregion
3070
+ //#region src/serializer/constructs/NaturalBlock/createNaturalBlockToMdast.ts
3071
+ function sr() {
3072
+ return {
3073
+ name: "NaturalBlock",
3074
+ toMdast(e, t) {
3075
+ let n = e, r = nr(n.value);
3076
+ if (n.type === "paragraph" && t.length > 0) {
3077
+ let e = r.children.find((e) => e.type === "paragraph");
3078
+ if (e && "children" in e) {
3079
+ let r = n.tags?.length ? z(n.tags) : null;
3080
+ e.children = [...t, ...r ? [r] : []];
3081
+ }
3082
+ }
3083
+ return {
3084
+ type: "root",
3085
+ children: r.children
3086
+ };
3087
+ }
3088
+ };
3089
+ }
3090
+ //#endregion
3091
+ //#region src/serializer/constructs/NaturalExpression/createNaturalExpressionToMdast.ts
3092
+ function cr() {
3093
+ return {
3094
+ name: "NaturalExpression",
3095
+ toMdast(e, t) {
3096
+ let n = e, r = { ...n.attributes };
3097
+ return {
3098
+ type: n.type,
3099
+ value: n.value,
3100
+ children: t,
3101
+ ...r
3102
+ };
3103
+ }
3104
+ };
3105
+ }
3106
+ //#endregion
3107
+ //#region src/serializer/constructs/SectionBlock/createSectionBlockToMdast.ts
3108
+ function lr() {
3109
+ return {
3110
+ name: "SectionBlock",
3111
+ toMdast(e, t) {
3112
+ let n = e, r = n.depth ?? 1, i = nr(`# ${n.name}`).children.find((e) => e.type === "heading"), a = n.tags?.length ? z(n.tags) : null;
3113
+ return {
3114
+ type: "heading",
3115
+ depth: r,
3116
+ children: i && "children" in i ? [...i.children, ...a ? [a] : []] : [{
3117
+ type: "text",
3118
+ value: n.name
3119
+ }, ...a ? [a] : []]
3120
+ };
3121
+ }
3122
+ };
3123
+ }
3124
+ //#endregion
3125
+ //#region src/serializer/public.ts
3126
+ var ur = [
3127
+ fe,
3128
+ me,
3129
+ he,
3130
+ sr,
3131
+ cr,
3132
+ lr
3133
+ ];
3134
+ //#endregion
3135
+ export { ue as CONSTRUCT_PARSERS, ur as CONSTRUCT_SERIALIZERS, de as DEFAULT_CONSTRUCT_PARSER, f as FACTORIES, le as createArtDocumentFromNode };