@xyd-js/cli 0.1.0-xyd.21 → 0.1.0-xyd.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.cli/dist/index.js +12417 -0
  2. package/.cli/host/.react-router/types/app/+types/root.ts +40 -0
  3. package/.cli/host/node_modules/.vite/deps/@mdx-js_mdx.js +81 -0
  4. package/.cli/host/node_modules/.vite/deps/@mdx-js_mdx.js.map +7 -0
  5. package/.cli/host/node_modules/.vite/deps/@mdx-js_rollup.js +4003 -0
  6. package/.cli/host/node_modules/.vite/deps/@mdx-js_rollup.js.map +7 -0
  7. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-icons.js +7531 -0
  8. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-icons.js.map +7 -0
  9. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-tabs.js +917 -0
  10. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-tabs.js.map +7 -0
  11. package/.cli/host/node_modules/.vite/deps/_metadata.json +157 -0
  12. package/.cli/host/node_modules/.vite/deps/chunk-2TUXWMP5.js +46 -0
  13. package/.cli/host/node_modules/.vite/deps/chunk-2TUXWMP5.js.map +7 -0
  14. package/.cli/host/node_modules/.vite/deps/chunk-DNIFH2K7.js +3461 -0
  15. package/.cli/host/node_modules/.vite/deps/chunk-DNIFH2K7.js.map +7 -0
  16. package/.cli/host/node_modules/.vite/deps/chunk-ERHH4CDL.js +23875 -0
  17. package/.cli/host/node_modules/.vite/deps/chunk-ERHH4CDL.js.map +7 -0
  18. package/.cli/host/node_modules/.vite/deps/chunk-ETJV5QNK.js +27 -0
  19. package/.cli/host/node_modules/.vite/deps/chunk-ETJV5QNK.js.map +7 -0
  20. package/.cli/host/node_modules/.vite/deps/chunk-GPEJJ3KZ.js +1906 -0
  21. package/.cli/host/node_modules/.vite/deps/chunk-GPEJJ3KZ.js.map +7 -0
  22. package/.cli/host/node_modules/.vite/deps/chunk-IVP26VTC.js +21 -0
  23. package/.cli/host/node_modules/.vite/deps/chunk-IVP26VTC.js.map +7 -0
  24. package/.cli/host/node_modules/.vite/deps/chunk-MJUUSK53.js +894 -0
  25. package/.cli/host/node_modules/.vite/deps/chunk-MJUUSK53.js.map +7 -0
  26. package/.cli/host/node_modules/.vite/deps/chunk-NHN7DW4J.js +928 -0
  27. package/.cli/host/node_modules/.vite/deps/chunk-NHN7DW4J.js.map +7 -0
  28. package/.cli/host/node_modules/.vite/deps/chunk-OO6QDGMA.js +10609 -0
  29. package/.cli/host/node_modules/.vite/deps/chunk-OO6QDGMA.js.map +7 -0
  30. package/.cli/host/node_modules/.vite/deps/chunk-OUN4SSIE.js +205 -0
  31. package/.cli/host/node_modules/.vite/deps/chunk-OUN4SSIE.js.map +7 -0
  32. package/.cli/host/node_modules/.vite/deps/chunk-TKNG6GUJ.js +894 -0
  33. package/.cli/host/node_modules/.vite/deps/chunk-TKNG6GUJ.js.map +7 -0
  34. package/.cli/host/node_modules/.vite/deps/chunk-TM4FKLNO.js +21628 -0
  35. package/.cli/host/node_modules/.vite/deps/chunk-TM4FKLNO.js.map +7 -0
  36. package/.cli/host/node_modules/.vite/deps/chunk-V2IF7L2E.js +12 -0
  37. package/.cli/host/node_modules/.vite/deps/chunk-V2IF7L2E.js.map +7 -0
  38. package/.cli/host/node_modules/.vite/deps/gray-matter.js +3492 -0
  39. package/.cli/host/node_modules/.vite/deps/gray-matter.js.map +7 -0
  40. package/.cli/host/node_modules/.vite/deps/lucide-react.js +34742 -0
  41. package/.cli/host/node_modules/.vite/deps/lucide-react.js.map +7 -0
  42. package/.cli/host/node_modules/.vite/deps/package.json +3 -0
  43. package/.cli/host/node_modules/.vite/deps/react-dom.js +7 -0
  44. package/.cli/host/node_modules/.vite/deps/react-dom.js.map +7 -0
  45. package/.cli/host/node_modules/.vite/deps/react-dom_client.js +39 -0
  46. package/.cli/host/node_modules/.vite/deps/react-dom_client.js.map +7 -0
  47. package/.cli/host/node_modules/.vite/deps/react-router.js +243 -0
  48. package/.cli/host/node_modules/.vite/deps/react-router.js.map +7 -0
  49. package/.cli/host/node_modules/.vite/deps/react-router_dom.js +212 -0
  50. package/.cli/host/node_modules/.vite/deps/react-router_dom.js.map +7 -0
  51. package/.cli/host/node_modules/.vite/deps/react.js +6 -0
  52. package/.cli/host/node_modules/.vite/deps/react.js.map +7 -0
  53. package/.cli/host/node_modules/.vite/deps/react_jsx-dev-runtime.js +913 -0
  54. package/.cli/host/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
  55. package/.cli/host/node_modules/.vite/deps/react_jsx-runtime.js +7 -0
  56. package/.cli/host/node_modules/.vite/deps/react_jsx-runtime.js.map +7 -0
  57. package/.cli/host/node_modules/.vite/deps/remark-frontmatter.js +428 -0
  58. package/.cli/host/node_modules/.vite/deps/remark-frontmatter.js.map +7 -0
  59. package/.cli/host/node_modules/.vite/deps/remark-gfm.js +3122 -0
  60. package/.cli/host/node_modules/.vite/deps/remark-gfm.js.map +7 -0
  61. package/.cli/host/node_modules/.vite/deps/remark-mdx-frontmatter.js +10482 -0
  62. package/.cli/host/node_modules/.vite/deps/remark-mdx-frontmatter.js.map +7 -0
  63. package/.cli/host/node_modules/.vite/deps/unist-util-visit.js +14 -0
  64. package/.cli/host/node_modules/.vite/deps/unist-util-visit.js.map +7 -0
  65. package/.cli/host/node_modules/.vite/deps/vfile.js +8 -0
  66. package/.cli/host/node_modules/.vite/deps/vfile.js.map +7 -0
  67. package/.cli/host/package.json +43 -0
  68. package/.cli/plugins/xyd-plugin-zero/src/pages/api-reference.tsx +202 -79
  69. package/.cli/plugins/xyd-plugin-zero/src/pages/docs.tsx +3 -12
  70. package/bin.js +3 -0
  71. package/package.json +18 -15
  72. package/.cli/bin.js +0 -3
  73. package/.cli/index.js +0 -24939
  74. package/.cli/package-lock.json +0 -7943
  75. package/.cli/package.json +0 -37
  76. package/postinstall.js +0 -15
  77. /package/.cli/{index.d.ts → dist/index.d.ts} +0 -0
  78. /package/.cli/{app → host/app}/root.tsx +0 -0
  79. /package/.cli/{app → host/app}/routes.ts +0 -0
  80. /package/.cli/{postcss.config.cjs → host/postcss.config.cjs} +0 -0
  81. /package/.cli/{react-router.config.ts → host/react-router.config.ts} +0 -0
  82. /package/.cli/{tsconfig.json → host/tsconfig.json} +0 -0
  83. /package/.cli/{vite.config.ts → host/vite.config.ts} +0 -0
@@ -0,0 +1,3461 @@
1
+ import {
2
+ asciiAlpha,
3
+ asciiAlphanumeric,
4
+ asciiAtext,
5
+ asciiControl,
6
+ asciiDigit,
7
+ asciiHexDigit,
8
+ asciiPunctuation,
9
+ codes,
10
+ constants,
11
+ markdownLineEnding,
12
+ markdownLineEndingOrSpace,
13
+ markdownSpace,
14
+ ok,
15
+ types,
16
+ unicodePunctuation,
17
+ unicodeWhitespace,
18
+ values
19
+ } from "./chunk-MJUUSK53.js";
20
+
21
+ // ../node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/dev/index.js
22
+ function splice(list2, start, remove, items) {
23
+ const end = list2.length;
24
+ let chunkStart = 0;
25
+ let parameters;
26
+ if (start < 0) {
27
+ start = -start > end ? 0 : end + start;
28
+ } else {
29
+ start = start > end ? end : start;
30
+ }
31
+ remove = remove > 0 ? remove : 0;
32
+ if (items.length < constants.v8MaxSafeChunkSize) {
33
+ parameters = Array.from(items);
34
+ parameters.unshift(start, remove);
35
+ list2.splice(...parameters);
36
+ } else {
37
+ if (remove) list2.splice(start, remove);
38
+ while (chunkStart < items.length) {
39
+ parameters = items.slice(
40
+ chunkStart,
41
+ chunkStart + constants.v8MaxSafeChunkSize
42
+ );
43
+ parameters.unshift(start, 0);
44
+ list2.splice(...parameters);
45
+ chunkStart += constants.v8MaxSafeChunkSize;
46
+ start += constants.v8MaxSafeChunkSize;
47
+ }
48
+ }
49
+ }
50
+ function push(list2, items) {
51
+ if (list2.length > 0) {
52
+ splice(list2, list2.length, 0, items);
53
+ return list2;
54
+ }
55
+ return items;
56
+ }
57
+
58
+ // ../node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
59
+ var hasOwnProperty = {}.hasOwnProperty;
60
+ function combineExtensions(extensions) {
61
+ const all2 = {};
62
+ let index = -1;
63
+ while (++index < extensions.length) {
64
+ syntaxExtension(all2, extensions[index]);
65
+ }
66
+ return all2;
67
+ }
68
+ function syntaxExtension(all2, extension) {
69
+ let hook;
70
+ for (hook in extension) {
71
+ const maybe = hasOwnProperty.call(all2, hook) ? all2[hook] : void 0;
72
+ const left = maybe || (all2[hook] = {});
73
+ const right = extension[hook];
74
+ let code;
75
+ if (right) {
76
+ for (code in right) {
77
+ if (!hasOwnProperty.call(left, code)) left[code] = [];
78
+ const value = right[code];
79
+ constructs(
80
+ // @ts-expect-error Looks like a list.
81
+ left[code],
82
+ Array.isArray(value) ? value : value ? [value] : []
83
+ );
84
+ }
85
+ }
86
+ }
87
+ }
88
+ function constructs(existing, list2) {
89
+ let index = -1;
90
+ const before = [];
91
+ while (++index < list2.length) {
92
+ ;
93
+ (list2[index].add === "after" ? existing : before).push(list2[index]);
94
+ }
95
+ splice(existing, 0, 0, before);
96
+ }
97
+
98
+ // ../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
99
+ function ccount(value, character) {
100
+ const source = String(value);
101
+ if (typeof character !== "string") {
102
+ throw new TypeError("Expected character");
103
+ }
104
+ let count = 0;
105
+ let index = source.indexOf(character);
106
+ while (index !== -1) {
107
+ count++;
108
+ index = source.indexOf(character, index + character.length);
109
+ }
110
+ return count;
111
+ }
112
+
113
+ // ../node_modules/.pnpm/decode-named-character-reference@1.0.2/node_modules/decode-named-character-reference/index.dom.js
114
+ var element = document.createElement("i");
115
+ function decodeNamedCharacterReference(value) {
116
+ const characterReference2 = "&" + value + ";";
117
+ element.innerHTML = characterReference2;
118
+ const char = element.textContent;
119
+ if (char.charCodeAt(char.length - 1) === 59 && value !== "semi") {
120
+ return false;
121
+ }
122
+ return char === characterReference2 ? false : char;
123
+ }
124
+
125
+ // ../node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/dev/index.js
126
+ function factorySpace(effects, ok2, type, max) {
127
+ const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
128
+ let size = 0;
129
+ return start;
130
+ function start(code) {
131
+ if (markdownSpace(code)) {
132
+ effects.enter(type);
133
+ return prefix(code);
134
+ }
135
+ return ok2(code);
136
+ }
137
+ function prefix(code) {
138
+ if (markdownSpace(code) && size++ < limit) {
139
+ effects.consume(code);
140
+ return prefix;
141
+ }
142
+ effects.exit(type);
143
+ return ok2(code);
144
+ }
145
+ }
146
+
147
+ // ../node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/dev/index.js
148
+ function classifyCharacter(code) {
149
+ if (code === codes.eof || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {
150
+ return constants.characterGroupWhitespace;
151
+ }
152
+ if (unicodePunctuation(code)) {
153
+ return constants.characterGroupPunctuation;
154
+ }
155
+ }
156
+
157
+ // ../node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
158
+ function resolveAll(constructs2, events, context) {
159
+ const called = [];
160
+ let index = -1;
161
+ while (++index < constructs2.length) {
162
+ const resolve = constructs2[index].resolveAll;
163
+ if (resolve && !called.includes(resolve)) {
164
+ events = resolve(events, context);
165
+ called.push(resolve);
166
+ }
167
+ }
168
+ return events;
169
+ }
170
+
171
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/blank-line.js
172
+ var blankLine = { partial: true, tokenize: tokenizeBlankLine };
173
+ function tokenizeBlankLine(effects, ok2, nok) {
174
+ return start;
175
+ function start(code) {
176
+ return markdownSpace(code) ? factorySpace(effects, after, types.linePrefix)(code) : after(code);
177
+ }
178
+ function after(code) {
179
+ return code === codes.eof || markdownLineEnding(code) ? ok2(code) : nok(code);
180
+ }
181
+ }
182
+
183
+ // ../node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/dev/index.js
184
+ function normalizeIdentifier(value) {
185
+ return value.replace(/[\t\n\r ]+/g, values.space).replace(/^ | $/g, "").toLowerCase().toUpperCase();
186
+ }
187
+
188
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/attention.js
189
+ var attention = {
190
+ name: "attention",
191
+ resolveAll: resolveAllAttention,
192
+ tokenize: tokenizeAttention
193
+ };
194
+ function resolveAllAttention(events, context) {
195
+ let index = -1;
196
+ let open;
197
+ let group;
198
+ let text;
199
+ let openingSequence;
200
+ let closingSequence;
201
+ let use;
202
+ let nextEvents;
203
+ let offset;
204
+ while (++index < events.length) {
205
+ if (events[index][0] === "enter" && events[index][1].type === "attentionSequence" && events[index][1]._close) {
206
+ open = index;
207
+ while (open--) {
208
+ if (events[open][0] === "exit" && events[open][1].type === "attentionSequence" && events[open][1]._open && // If the markers are the same:
209
+ context.sliceSerialize(events[open][1]).charCodeAt(0) === context.sliceSerialize(events[index][1]).charCodeAt(0)) {
210
+ if ((events[open][1]._close || events[index][1]._open) && (events[index][1].end.offset - events[index][1].start.offset) % 3 && !((events[open][1].end.offset - events[open][1].start.offset + events[index][1].end.offset - events[index][1].start.offset) % 3)) {
211
+ continue;
212
+ }
213
+ use = events[open][1].end.offset - events[open][1].start.offset > 1 && events[index][1].end.offset - events[index][1].start.offset > 1 ? 2 : 1;
214
+ const start = { ...events[open][1].end };
215
+ const end = { ...events[index][1].start };
216
+ movePoint(start, -use);
217
+ movePoint(end, use);
218
+ openingSequence = {
219
+ type: use > 1 ? types.strongSequence : types.emphasisSequence,
220
+ start,
221
+ end: { ...events[open][1].end }
222
+ };
223
+ closingSequence = {
224
+ type: use > 1 ? types.strongSequence : types.emphasisSequence,
225
+ start: { ...events[index][1].start },
226
+ end
227
+ };
228
+ text = {
229
+ type: use > 1 ? types.strongText : types.emphasisText,
230
+ start: { ...events[open][1].end },
231
+ end: { ...events[index][1].start }
232
+ };
233
+ group = {
234
+ type: use > 1 ? types.strong : types.emphasis,
235
+ start: { ...openingSequence.start },
236
+ end: { ...closingSequence.end }
237
+ };
238
+ events[open][1].end = { ...openingSequence.start };
239
+ events[index][1].start = { ...closingSequence.end };
240
+ nextEvents = [];
241
+ if (events[open][1].end.offset - events[open][1].start.offset) {
242
+ nextEvents = push(nextEvents, [
243
+ ["enter", events[open][1], context],
244
+ ["exit", events[open][1], context]
245
+ ]);
246
+ }
247
+ nextEvents = push(nextEvents, [
248
+ ["enter", group, context],
249
+ ["enter", openingSequence, context],
250
+ ["exit", openingSequence, context],
251
+ ["enter", text, context]
252
+ ]);
253
+ ok(
254
+ context.parser.constructs.insideSpan.null,
255
+ "expected `insideSpan` to be populated"
256
+ );
257
+ nextEvents = push(
258
+ nextEvents,
259
+ resolveAll(
260
+ context.parser.constructs.insideSpan.null,
261
+ events.slice(open + 1, index),
262
+ context
263
+ )
264
+ );
265
+ nextEvents = push(nextEvents, [
266
+ ["exit", text, context],
267
+ ["enter", closingSequence, context],
268
+ ["exit", closingSequence, context],
269
+ ["exit", group, context]
270
+ ]);
271
+ if (events[index][1].end.offset - events[index][1].start.offset) {
272
+ offset = 2;
273
+ nextEvents = push(nextEvents, [
274
+ ["enter", events[index][1], context],
275
+ ["exit", events[index][1], context]
276
+ ]);
277
+ } else {
278
+ offset = 0;
279
+ }
280
+ splice(events, open - 1, index - open + 3, nextEvents);
281
+ index = open + nextEvents.length - offset - 2;
282
+ break;
283
+ }
284
+ }
285
+ }
286
+ }
287
+ index = -1;
288
+ while (++index < events.length) {
289
+ if (events[index][1].type === "attentionSequence") {
290
+ events[index][1].type = "data";
291
+ }
292
+ }
293
+ return events;
294
+ }
295
+ function tokenizeAttention(effects, ok2) {
296
+ const attentionMarkers = this.parser.constructs.attentionMarkers.null;
297
+ const previous2 = this.previous;
298
+ const before = classifyCharacter(previous2);
299
+ let marker;
300
+ return start;
301
+ function start(code) {
302
+ ok(
303
+ code === codes.asterisk || code === codes.underscore,
304
+ "expected asterisk or underscore"
305
+ );
306
+ marker = code;
307
+ effects.enter("attentionSequence");
308
+ return inside(code);
309
+ }
310
+ function inside(code) {
311
+ if (code === marker) {
312
+ effects.consume(code);
313
+ return inside;
314
+ }
315
+ const token = effects.exit("attentionSequence");
316
+ const after = classifyCharacter(code);
317
+ ok(attentionMarkers, "expected `attentionMarkers` to be populated");
318
+ const open = !after || after === constants.characterGroupPunctuation && before || attentionMarkers.includes(code);
319
+ const close = !before || before === constants.characterGroupPunctuation && after || attentionMarkers.includes(previous2);
320
+ token._open = Boolean(
321
+ marker === codes.asterisk ? open : open && (before || !close)
322
+ );
323
+ token._close = Boolean(
324
+ marker === codes.asterisk ? close : close && (after || !open)
325
+ );
326
+ return ok2(code);
327
+ }
328
+ }
329
+ function movePoint(point, offset) {
330
+ point.column += offset;
331
+ point.offset += offset;
332
+ point._bufferIndex += offset;
333
+ }
334
+
335
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/autolink.js
336
+ var autolink = { name: "autolink", tokenize: tokenizeAutolink };
337
+ function tokenizeAutolink(effects, ok2, nok) {
338
+ let size = 0;
339
+ return start;
340
+ function start(code) {
341
+ ok(code === codes.lessThan, "expected `<`");
342
+ effects.enter(types.autolink);
343
+ effects.enter(types.autolinkMarker);
344
+ effects.consume(code);
345
+ effects.exit(types.autolinkMarker);
346
+ effects.enter(types.autolinkProtocol);
347
+ return open;
348
+ }
349
+ function open(code) {
350
+ if (asciiAlpha(code)) {
351
+ effects.consume(code);
352
+ return schemeOrEmailAtext;
353
+ }
354
+ if (code === codes.atSign) {
355
+ return nok(code);
356
+ }
357
+ return emailAtext(code);
358
+ }
359
+ function schemeOrEmailAtext(code) {
360
+ if (code === codes.plusSign || code === codes.dash || code === codes.dot || asciiAlphanumeric(code)) {
361
+ size = 1;
362
+ return schemeInsideOrEmailAtext(code);
363
+ }
364
+ return emailAtext(code);
365
+ }
366
+ function schemeInsideOrEmailAtext(code) {
367
+ if (code === codes.colon) {
368
+ effects.consume(code);
369
+ size = 0;
370
+ return urlInside;
371
+ }
372
+ if ((code === codes.plusSign || code === codes.dash || code === codes.dot || asciiAlphanumeric(code)) && size++ < constants.autolinkSchemeSizeMax) {
373
+ effects.consume(code);
374
+ return schemeInsideOrEmailAtext;
375
+ }
376
+ size = 0;
377
+ return emailAtext(code);
378
+ }
379
+ function urlInside(code) {
380
+ if (code === codes.greaterThan) {
381
+ effects.exit(types.autolinkProtocol);
382
+ effects.enter(types.autolinkMarker);
383
+ effects.consume(code);
384
+ effects.exit(types.autolinkMarker);
385
+ effects.exit(types.autolink);
386
+ return ok2;
387
+ }
388
+ if (code === codes.eof || code === codes.space || code === codes.lessThan || asciiControl(code)) {
389
+ return nok(code);
390
+ }
391
+ effects.consume(code);
392
+ return urlInside;
393
+ }
394
+ function emailAtext(code) {
395
+ if (code === codes.atSign) {
396
+ effects.consume(code);
397
+ return emailAtSignOrDot;
398
+ }
399
+ if (asciiAtext(code)) {
400
+ effects.consume(code);
401
+ return emailAtext;
402
+ }
403
+ return nok(code);
404
+ }
405
+ function emailAtSignOrDot(code) {
406
+ return asciiAlphanumeric(code) ? emailLabel(code) : nok(code);
407
+ }
408
+ function emailLabel(code) {
409
+ if (code === codes.dot) {
410
+ effects.consume(code);
411
+ size = 0;
412
+ return emailAtSignOrDot;
413
+ }
414
+ if (code === codes.greaterThan) {
415
+ effects.exit(types.autolinkProtocol).type = types.autolinkEmail;
416
+ effects.enter(types.autolinkMarker);
417
+ effects.consume(code);
418
+ effects.exit(types.autolinkMarker);
419
+ effects.exit(types.autolink);
420
+ return ok2;
421
+ }
422
+ return emailValue(code);
423
+ }
424
+ function emailValue(code) {
425
+ if ((code === codes.dash || asciiAlphanumeric(code)) && size++ < constants.autolinkDomainSizeMax) {
426
+ const next = code === codes.dash ? emailValue : emailLabel;
427
+ effects.consume(code);
428
+ return next;
429
+ }
430
+ return nok(code);
431
+ }
432
+ }
433
+
434
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/block-quote.js
435
+ var blockQuote = {
436
+ continuation: { tokenize: tokenizeBlockQuoteContinuation },
437
+ exit,
438
+ name: "blockQuote",
439
+ tokenize: tokenizeBlockQuoteStart
440
+ };
441
+ function tokenizeBlockQuoteStart(effects, ok2, nok) {
442
+ const self = this;
443
+ return start;
444
+ function start(code) {
445
+ if (code === codes.greaterThan) {
446
+ const state = self.containerState;
447
+ ok(state, "expected `containerState` to be defined in container");
448
+ if (!state.open) {
449
+ effects.enter(types.blockQuote, { _container: true });
450
+ state.open = true;
451
+ }
452
+ effects.enter(types.blockQuotePrefix);
453
+ effects.enter(types.blockQuoteMarker);
454
+ effects.consume(code);
455
+ effects.exit(types.blockQuoteMarker);
456
+ return after;
457
+ }
458
+ return nok(code);
459
+ }
460
+ function after(code) {
461
+ if (markdownSpace(code)) {
462
+ effects.enter(types.blockQuotePrefixWhitespace);
463
+ effects.consume(code);
464
+ effects.exit(types.blockQuotePrefixWhitespace);
465
+ effects.exit(types.blockQuotePrefix);
466
+ return ok2;
467
+ }
468
+ effects.exit(types.blockQuotePrefix);
469
+ return ok2(code);
470
+ }
471
+ }
472
+ function tokenizeBlockQuoteContinuation(effects, ok2, nok) {
473
+ const self = this;
474
+ return contStart;
475
+ function contStart(code) {
476
+ if (markdownSpace(code)) {
477
+ ok(
478
+ self.parser.constructs.disable.null,
479
+ "expected `disable.null` to be populated"
480
+ );
481
+ return factorySpace(
482
+ effects,
483
+ contBefore,
484
+ types.linePrefix,
485
+ self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize
486
+ )(code);
487
+ }
488
+ return contBefore(code);
489
+ }
490
+ function contBefore(code) {
491
+ return effects.attempt(blockQuote, ok2, nok)(code);
492
+ }
493
+ }
494
+ function exit(effects) {
495
+ effects.exit(types.blockQuote);
496
+ }
497
+
498
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/character-escape.js
499
+ var characterEscape = {
500
+ name: "characterEscape",
501
+ tokenize: tokenizeCharacterEscape
502
+ };
503
+ function tokenizeCharacterEscape(effects, ok2, nok) {
504
+ return start;
505
+ function start(code) {
506
+ ok(code === codes.backslash, "expected `\\`");
507
+ effects.enter(types.characterEscape);
508
+ effects.enter(types.escapeMarker);
509
+ effects.consume(code);
510
+ effects.exit(types.escapeMarker);
511
+ return inside;
512
+ }
513
+ function inside(code) {
514
+ if (asciiPunctuation(code)) {
515
+ effects.enter(types.characterEscapeValue);
516
+ effects.consume(code);
517
+ effects.exit(types.characterEscapeValue);
518
+ effects.exit(types.characterEscape);
519
+ return ok2;
520
+ }
521
+ return nok(code);
522
+ }
523
+ }
524
+
525
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/character-reference.js
526
+ var characterReference = {
527
+ name: "characterReference",
528
+ tokenize: tokenizeCharacterReference
529
+ };
530
+ function tokenizeCharacterReference(effects, ok2, nok) {
531
+ const self = this;
532
+ let size = 0;
533
+ let max;
534
+ let test;
535
+ return start;
536
+ function start(code) {
537
+ ok(code === codes.ampersand, "expected `&`");
538
+ effects.enter(types.characterReference);
539
+ effects.enter(types.characterReferenceMarker);
540
+ effects.consume(code);
541
+ effects.exit(types.characterReferenceMarker);
542
+ return open;
543
+ }
544
+ function open(code) {
545
+ if (code === codes.numberSign) {
546
+ effects.enter(types.characterReferenceMarkerNumeric);
547
+ effects.consume(code);
548
+ effects.exit(types.characterReferenceMarkerNumeric);
549
+ return numeric;
550
+ }
551
+ effects.enter(types.characterReferenceValue);
552
+ max = constants.characterReferenceNamedSizeMax;
553
+ test = asciiAlphanumeric;
554
+ return value(code);
555
+ }
556
+ function numeric(code) {
557
+ if (code === codes.uppercaseX || code === codes.lowercaseX) {
558
+ effects.enter(types.characterReferenceMarkerHexadecimal);
559
+ effects.consume(code);
560
+ effects.exit(types.characterReferenceMarkerHexadecimal);
561
+ effects.enter(types.characterReferenceValue);
562
+ max = constants.characterReferenceHexadecimalSizeMax;
563
+ test = asciiHexDigit;
564
+ return value;
565
+ }
566
+ effects.enter(types.characterReferenceValue);
567
+ max = constants.characterReferenceDecimalSizeMax;
568
+ test = asciiDigit;
569
+ return value(code);
570
+ }
571
+ function value(code) {
572
+ if (code === codes.semicolon && size) {
573
+ const token = effects.exit(types.characterReferenceValue);
574
+ if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self.sliceSerialize(token))) {
575
+ return nok(code);
576
+ }
577
+ effects.enter(types.characterReferenceMarker);
578
+ effects.consume(code);
579
+ effects.exit(types.characterReferenceMarker);
580
+ effects.exit(types.characterReference);
581
+ return ok2;
582
+ }
583
+ if (test(code) && size++ < max) {
584
+ effects.consume(code);
585
+ return value;
586
+ }
587
+ return nok(code);
588
+ }
589
+ }
590
+
591
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/code-fenced.js
592
+ var nonLazyContinuation = {
593
+ partial: true,
594
+ tokenize: tokenizeNonLazyContinuation
595
+ };
596
+ var codeFenced = {
597
+ concrete: true,
598
+ name: "codeFenced",
599
+ tokenize: tokenizeCodeFenced
600
+ };
601
+ function tokenizeCodeFenced(effects, ok2, nok) {
602
+ const self = this;
603
+ const closeStart = { partial: true, tokenize: tokenizeCloseStart };
604
+ let initialPrefix = 0;
605
+ let sizeOpen = 0;
606
+ let marker;
607
+ return start;
608
+ function start(code) {
609
+ return beforeSequenceOpen(code);
610
+ }
611
+ function beforeSequenceOpen(code) {
612
+ ok(
613
+ code === codes.graveAccent || code === codes.tilde,
614
+ "expected `` ` `` or `~`"
615
+ );
616
+ const tail = self.events[self.events.length - 1];
617
+ initialPrefix = tail && tail[1].type === types.linePrefix ? tail[2].sliceSerialize(tail[1], true).length : 0;
618
+ marker = code;
619
+ effects.enter(types.codeFenced);
620
+ effects.enter(types.codeFencedFence);
621
+ effects.enter(types.codeFencedFenceSequence);
622
+ return sequenceOpen(code);
623
+ }
624
+ function sequenceOpen(code) {
625
+ if (code === marker) {
626
+ sizeOpen++;
627
+ effects.consume(code);
628
+ return sequenceOpen;
629
+ }
630
+ if (sizeOpen < constants.codeFencedSequenceSizeMin) {
631
+ return nok(code);
632
+ }
633
+ effects.exit(types.codeFencedFenceSequence);
634
+ return markdownSpace(code) ? factorySpace(effects, infoBefore, types.whitespace)(code) : infoBefore(code);
635
+ }
636
+ function infoBefore(code) {
637
+ if (code === codes.eof || markdownLineEnding(code)) {
638
+ effects.exit(types.codeFencedFence);
639
+ return self.interrupt ? ok2(code) : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);
640
+ }
641
+ effects.enter(types.codeFencedFenceInfo);
642
+ effects.enter(types.chunkString, { contentType: constants.contentTypeString });
643
+ return info(code);
644
+ }
645
+ function info(code) {
646
+ if (code === codes.eof || markdownLineEnding(code)) {
647
+ effects.exit(types.chunkString);
648
+ effects.exit(types.codeFencedFenceInfo);
649
+ return infoBefore(code);
650
+ }
651
+ if (markdownSpace(code)) {
652
+ effects.exit(types.chunkString);
653
+ effects.exit(types.codeFencedFenceInfo);
654
+ return factorySpace(effects, metaBefore, types.whitespace)(code);
655
+ }
656
+ if (code === codes.graveAccent && code === marker) {
657
+ return nok(code);
658
+ }
659
+ effects.consume(code);
660
+ return info;
661
+ }
662
+ function metaBefore(code) {
663
+ if (code === codes.eof || markdownLineEnding(code)) {
664
+ return infoBefore(code);
665
+ }
666
+ effects.enter(types.codeFencedFenceMeta);
667
+ effects.enter(types.chunkString, { contentType: constants.contentTypeString });
668
+ return meta(code);
669
+ }
670
+ function meta(code) {
671
+ if (code === codes.eof || markdownLineEnding(code)) {
672
+ effects.exit(types.chunkString);
673
+ effects.exit(types.codeFencedFenceMeta);
674
+ return infoBefore(code);
675
+ }
676
+ if (code === codes.graveAccent && code === marker) {
677
+ return nok(code);
678
+ }
679
+ effects.consume(code);
680
+ return meta;
681
+ }
682
+ function atNonLazyBreak(code) {
683
+ ok(markdownLineEnding(code), "expected eol");
684
+ return effects.attempt(closeStart, after, contentBefore)(code);
685
+ }
686
+ function contentBefore(code) {
687
+ ok(markdownLineEnding(code), "expected eol");
688
+ effects.enter(types.lineEnding);
689
+ effects.consume(code);
690
+ effects.exit(types.lineEnding);
691
+ return contentStart;
692
+ }
693
+ function contentStart(code) {
694
+ return initialPrefix > 0 && markdownSpace(code) ? factorySpace(
695
+ effects,
696
+ beforeContentChunk,
697
+ types.linePrefix,
698
+ initialPrefix + 1
699
+ )(code) : beforeContentChunk(code);
700
+ }
701
+ function beforeContentChunk(code) {
702
+ if (code === codes.eof || markdownLineEnding(code)) {
703
+ return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code);
704
+ }
705
+ effects.enter(types.codeFlowValue);
706
+ return contentChunk(code);
707
+ }
708
+ function contentChunk(code) {
709
+ if (code === codes.eof || markdownLineEnding(code)) {
710
+ effects.exit(types.codeFlowValue);
711
+ return beforeContentChunk(code);
712
+ }
713
+ effects.consume(code);
714
+ return contentChunk;
715
+ }
716
+ function after(code) {
717
+ effects.exit(types.codeFenced);
718
+ return ok2(code);
719
+ }
720
+ function tokenizeCloseStart(effects2, ok3, nok2) {
721
+ let size = 0;
722
+ return startBefore;
723
+ function startBefore(code) {
724
+ ok(markdownLineEnding(code), "expected eol");
725
+ effects2.enter(types.lineEnding);
726
+ effects2.consume(code);
727
+ effects2.exit(types.lineEnding);
728
+ return start2;
729
+ }
730
+ function start2(code) {
731
+ ok(
732
+ self.parser.constructs.disable.null,
733
+ "expected `disable.null` to be populated"
734
+ );
735
+ effects2.enter(types.codeFencedFence);
736
+ return markdownSpace(code) ? factorySpace(
737
+ effects2,
738
+ beforeSequenceClose,
739
+ types.linePrefix,
740
+ self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize
741
+ )(code) : beforeSequenceClose(code);
742
+ }
743
+ function beforeSequenceClose(code) {
744
+ if (code === marker) {
745
+ effects2.enter(types.codeFencedFenceSequence);
746
+ return sequenceClose(code);
747
+ }
748
+ return nok2(code);
749
+ }
750
+ function sequenceClose(code) {
751
+ if (code === marker) {
752
+ size++;
753
+ effects2.consume(code);
754
+ return sequenceClose;
755
+ }
756
+ if (size >= sizeOpen) {
757
+ effects2.exit(types.codeFencedFenceSequence);
758
+ return markdownSpace(code) ? factorySpace(effects2, sequenceCloseAfter, types.whitespace)(code) : sequenceCloseAfter(code);
759
+ }
760
+ return nok2(code);
761
+ }
762
+ function sequenceCloseAfter(code) {
763
+ if (code === codes.eof || markdownLineEnding(code)) {
764
+ effects2.exit(types.codeFencedFence);
765
+ return ok3(code);
766
+ }
767
+ return nok2(code);
768
+ }
769
+ }
770
+ }
771
+ function tokenizeNonLazyContinuation(effects, ok2, nok) {
772
+ const self = this;
773
+ return start;
774
+ function start(code) {
775
+ if (code === codes.eof) {
776
+ return nok(code);
777
+ }
778
+ ok(markdownLineEnding(code), "expected eol");
779
+ effects.enter(types.lineEnding);
780
+ effects.consume(code);
781
+ effects.exit(types.lineEnding);
782
+ return lineStart;
783
+ }
784
+ function lineStart(code) {
785
+ return self.parser.lazy[self.now().line] ? nok(code) : ok2(code);
786
+ }
787
+ }
788
+
789
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/code-indented.js
790
+ var codeIndented = {
791
+ name: "codeIndented",
792
+ tokenize: tokenizeCodeIndented
793
+ };
794
+ var furtherStart = { partial: true, tokenize: tokenizeFurtherStart };
795
+ function tokenizeCodeIndented(effects, ok2, nok) {
796
+ const self = this;
797
+ return start;
798
+ function start(code) {
799
+ ok(markdownSpace(code));
800
+ effects.enter(types.codeIndented);
801
+ return factorySpace(
802
+ effects,
803
+ afterPrefix,
804
+ types.linePrefix,
805
+ constants.tabSize + 1
806
+ )(code);
807
+ }
808
+ function afterPrefix(code) {
809
+ const tail = self.events[self.events.length - 1];
810
+ return tail && tail[1].type === types.linePrefix && tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize ? atBreak(code) : nok(code);
811
+ }
812
+ function atBreak(code) {
813
+ if (code === codes.eof) {
814
+ return after(code);
815
+ }
816
+ if (markdownLineEnding(code)) {
817
+ return effects.attempt(furtherStart, atBreak, after)(code);
818
+ }
819
+ effects.enter(types.codeFlowValue);
820
+ return inside(code);
821
+ }
822
+ function inside(code) {
823
+ if (code === codes.eof || markdownLineEnding(code)) {
824
+ effects.exit(types.codeFlowValue);
825
+ return atBreak(code);
826
+ }
827
+ effects.consume(code);
828
+ return inside;
829
+ }
830
+ function after(code) {
831
+ effects.exit(types.codeIndented);
832
+ return ok2(code);
833
+ }
834
+ }
835
+ function tokenizeFurtherStart(effects, ok2, nok) {
836
+ const self = this;
837
+ return furtherStart2;
838
+ function furtherStart2(code) {
839
+ if (self.parser.lazy[self.now().line]) {
840
+ return nok(code);
841
+ }
842
+ if (markdownLineEnding(code)) {
843
+ effects.enter(types.lineEnding);
844
+ effects.consume(code);
845
+ effects.exit(types.lineEnding);
846
+ return furtherStart2;
847
+ }
848
+ return factorySpace(
849
+ effects,
850
+ afterPrefix,
851
+ types.linePrefix,
852
+ constants.tabSize + 1
853
+ )(code);
854
+ }
855
+ function afterPrefix(code) {
856
+ const tail = self.events[self.events.length - 1];
857
+ return tail && tail[1].type === types.linePrefix && tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize ? ok2(code) : markdownLineEnding(code) ? furtherStart2(code) : nok(code);
858
+ }
859
+ }
860
+
861
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/code-text.js
862
+ var codeText = {
863
+ name: "codeText",
864
+ previous,
865
+ resolve: resolveCodeText,
866
+ tokenize: tokenizeCodeText
867
+ };
868
+ function resolveCodeText(events) {
869
+ let tailExitIndex = events.length - 4;
870
+ let headEnterIndex = 3;
871
+ let index;
872
+ let enter;
873
+ if ((events[headEnterIndex][1].type === types.lineEnding || events[headEnterIndex][1].type === "space") && (events[tailExitIndex][1].type === types.lineEnding || events[tailExitIndex][1].type === "space")) {
874
+ index = headEnterIndex;
875
+ while (++index < tailExitIndex) {
876
+ if (events[index][1].type === types.codeTextData) {
877
+ events[headEnterIndex][1].type = types.codeTextPadding;
878
+ events[tailExitIndex][1].type = types.codeTextPadding;
879
+ headEnterIndex += 2;
880
+ tailExitIndex -= 2;
881
+ break;
882
+ }
883
+ }
884
+ }
885
+ index = headEnterIndex - 1;
886
+ tailExitIndex++;
887
+ while (++index <= tailExitIndex) {
888
+ if (enter === void 0) {
889
+ if (index !== tailExitIndex && events[index][1].type !== types.lineEnding) {
890
+ enter = index;
891
+ }
892
+ } else if (index === tailExitIndex || events[index][1].type === types.lineEnding) {
893
+ events[enter][1].type = types.codeTextData;
894
+ if (index !== enter + 2) {
895
+ events[enter][1].end = events[index - 1][1].end;
896
+ events.splice(enter + 2, index - enter - 2);
897
+ tailExitIndex -= index - enter - 2;
898
+ index = enter + 2;
899
+ }
900
+ enter = void 0;
901
+ }
902
+ }
903
+ return events;
904
+ }
905
+ function previous(code) {
906
+ return code !== codes.graveAccent || this.events[this.events.length - 1][1].type === types.characterEscape;
907
+ }
908
+ function tokenizeCodeText(effects, ok2, nok) {
909
+ const self = this;
910
+ let sizeOpen = 0;
911
+ let size;
912
+ let token;
913
+ return start;
914
+ function start(code) {
915
+ ok(code === codes.graveAccent, "expected `` ` ``");
916
+ ok(previous.call(self, self.previous), "expected correct previous");
917
+ effects.enter(types.codeText);
918
+ effects.enter(types.codeTextSequence);
919
+ return sequenceOpen(code);
920
+ }
921
+ function sequenceOpen(code) {
922
+ if (code === codes.graveAccent) {
923
+ effects.consume(code);
924
+ sizeOpen++;
925
+ return sequenceOpen;
926
+ }
927
+ effects.exit(types.codeTextSequence);
928
+ return between(code);
929
+ }
930
+ function between(code) {
931
+ if (code === codes.eof) {
932
+ return nok(code);
933
+ }
934
+ if (code === codes.space) {
935
+ effects.enter("space");
936
+ effects.consume(code);
937
+ effects.exit("space");
938
+ return between;
939
+ }
940
+ if (code === codes.graveAccent) {
941
+ token = effects.enter(types.codeTextSequence);
942
+ size = 0;
943
+ return sequenceClose(code);
944
+ }
945
+ if (markdownLineEnding(code)) {
946
+ effects.enter(types.lineEnding);
947
+ effects.consume(code);
948
+ effects.exit(types.lineEnding);
949
+ return between;
950
+ }
951
+ effects.enter(types.codeTextData);
952
+ return data(code);
953
+ }
954
+ function data(code) {
955
+ if (code === codes.eof || code === codes.space || code === codes.graveAccent || markdownLineEnding(code)) {
956
+ effects.exit(types.codeTextData);
957
+ return between(code);
958
+ }
959
+ effects.consume(code);
960
+ return data;
961
+ }
962
+ function sequenceClose(code) {
963
+ if (code === codes.graveAccent) {
964
+ effects.consume(code);
965
+ size++;
966
+ return sequenceClose;
967
+ }
968
+ if (size === sizeOpen) {
969
+ effects.exit(types.codeTextSequence);
970
+ effects.exit(types.codeText);
971
+ return ok2(code);
972
+ }
973
+ token.type = types.codeTextData;
974
+ return data(code);
975
+ }
976
+ }
977
+
978
+ // ../node_modules/.pnpm/micromark-util-subtokenize@2.0.3/node_modules/micromark-util-subtokenize/dev/lib/splice-buffer.js
979
+ var SpliceBuffer = class {
980
+ /**
981
+ * @param {ReadonlyArray<T> | null | undefined} [initial]
982
+ * Initial items (optional).
983
+ * @returns
984
+ * Splice buffer.
985
+ */
986
+ constructor(initial) {
987
+ this.left = initial ? [...initial] : [];
988
+ this.right = [];
989
+ }
990
+ /**
991
+ * Array access;
992
+ * does not move the cursor.
993
+ *
994
+ * @param {number} index
995
+ * Index.
996
+ * @return {T}
997
+ * Item.
998
+ */
999
+ get(index) {
1000
+ if (index < 0 || index >= this.left.length + this.right.length) {
1001
+ throw new RangeError(
1002
+ "Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`"
1003
+ );
1004
+ }
1005
+ if (index < this.left.length) return this.left[index];
1006
+ return this.right[this.right.length - index + this.left.length - 1];
1007
+ }
1008
+ /**
1009
+ * The length of the splice buffer, one greater than the largest index in the
1010
+ * array.
1011
+ */
1012
+ get length() {
1013
+ return this.left.length + this.right.length;
1014
+ }
1015
+ /**
1016
+ * Remove and return `list[0]`;
1017
+ * moves the cursor to `0`.
1018
+ *
1019
+ * @returns {T | undefined}
1020
+ * Item, optional.
1021
+ */
1022
+ shift() {
1023
+ this.setCursor(0);
1024
+ return this.right.pop();
1025
+ }
1026
+ /**
1027
+ * Slice the buffer to get an array;
1028
+ * does not move the cursor.
1029
+ *
1030
+ * @param {number} start
1031
+ * Start.
1032
+ * @param {number | null | undefined} [end]
1033
+ * End (optional).
1034
+ * @returns {Array<T>}
1035
+ * Array of items.
1036
+ */
1037
+ slice(start, end) {
1038
+ const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end;
1039
+ if (stop < this.left.length) {
1040
+ return this.left.slice(start, stop);
1041
+ }
1042
+ if (start > this.left.length) {
1043
+ return this.right.slice(
1044
+ this.right.length - stop + this.left.length,
1045
+ this.right.length - start + this.left.length
1046
+ ).reverse();
1047
+ }
1048
+ return this.left.slice(start).concat(
1049
+ this.right.slice(this.right.length - stop + this.left.length).reverse()
1050
+ );
1051
+ }
1052
+ /**
1053
+ * Mimics the behavior of Array.prototype.splice() except for the change of
1054
+ * interface necessary to avoid segfaults when patching in very large arrays.
1055
+ *
1056
+ * This operation moves cursor is moved to `start` and results in the cursor
1057
+ * placed after any inserted items.
1058
+ *
1059
+ * @param {number} start
1060
+ * Start;
1061
+ * zero-based index at which to start changing the array;
1062
+ * negative numbers count backwards from the end of the array and values
1063
+ * that are out-of bounds are clamped to the appropriate end of the array.
1064
+ * @param {number | null | undefined} [deleteCount=0]
1065
+ * Delete count (default: `0`);
1066
+ * maximum number of elements to delete, starting from start.
1067
+ * @param {Array<T> | null | undefined} [items=[]]
1068
+ * Items to include in place of the deleted items (default: `[]`).
1069
+ * @return {Array<T>}
1070
+ * Any removed items.
1071
+ */
1072
+ splice(start, deleteCount, items) {
1073
+ const count = deleteCount || 0;
1074
+ this.setCursor(Math.trunc(start));
1075
+ const removed = this.right.splice(
1076
+ this.right.length - count,
1077
+ Number.POSITIVE_INFINITY
1078
+ );
1079
+ if (items) chunkedPush(this.left, items);
1080
+ return removed.reverse();
1081
+ }
1082
+ /**
1083
+ * Remove and return the highest-numbered item in the array, so
1084
+ * `list[list.length - 1]`;
1085
+ * Moves the cursor to `length`.
1086
+ *
1087
+ * @returns {T | undefined}
1088
+ * Item, optional.
1089
+ */
1090
+ pop() {
1091
+ this.setCursor(Number.POSITIVE_INFINITY);
1092
+ return this.left.pop();
1093
+ }
1094
+ /**
1095
+ * Inserts a single item to the high-numbered side of the array;
1096
+ * moves the cursor to `length`.
1097
+ *
1098
+ * @param {T} item
1099
+ * Item.
1100
+ * @returns {undefined}
1101
+ * Nothing.
1102
+ */
1103
+ push(item) {
1104
+ this.setCursor(Number.POSITIVE_INFINITY);
1105
+ this.left.push(item);
1106
+ }
1107
+ /**
1108
+ * Inserts many items to the high-numbered side of the array.
1109
+ * Moves the cursor to `length`.
1110
+ *
1111
+ * @param {Array<T>} items
1112
+ * Items.
1113
+ * @returns {undefined}
1114
+ * Nothing.
1115
+ */
1116
+ pushMany(items) {
1117
+ this.setCursor(Number.POSITIVE_INFINITY);
1118
+ chunkedPush(this.left, items);
1119
+ }
1120
+ /**
1121
+ * Inserts a single item to the low-numbered side of the array;
1122
+ * Moves the cursor to `0`.
1123
+ *
1124
+ * @param {T} item
1125
+ * Item.
1126
+ * @returns {undefined}
1127
+ * Nothing.
1128
+ */
1129
+ unshift(item) {
1130
+ this.setCursor(0);
1131
+ this.right.push(item);
1132
+ }
1133
+ /**
1134
+ * Inserts many items to the low-numbered side of the array;
1135
+ * moves the cursor to `0`.
1136
+ *
1137
+ * @param {Array<T>} items
1138
+ * Items.
1139
+ * @returns {undefined}
1140
+ * Nothing.
1141
+ */
1142
+ unshiftMany(items) {
1143
+ this.setCursor(0);
1144
+ chunkedPush(this.right, items.reverse());
1145
+ }
1146
+ /**
1147
+ * Move the cursor to a specific position in the array. Requires
1148
+ * time proportional to the distance moved.
1149
+ *
1150
+ * If `n < 0`, the cursor will end up at the beginning.
1151
+ * If `n > length`, the cursor will end up at the end.
1152
+ *
1153
+ * @param {number} n
1154
+ * Position.
1155
+ * @return {undefined}
1156
+ * Nothing.
1157
+ */
1158
+ setCursor(n) {
1159
+ if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0)
1160
+ return;
1161
+ if (n < this.left.length) {
1162
+ const removed = this.left.splice(n, Number.POSITIVE_INFINITY);
1163
+ chunkedPush(this.right, removed.reverse());
1164
+ } else {
1165
+ const removed = this.right.splice(
1166
+ this.left.length + this.right.length - n,
1167
+ Number.POSITIVE_INFINITY
1168
+ );
1169
+ chunkedPush(this.left, removed.reverse());
1170
+ }
1171
+ }
1172
+ };
1173
+ function chunkedPush(list2, right) {
1174
+ let chunkStart = 0;
1175
+ if (right.length < constants.v8MaxSafeChunkSize) {
1176
+ list2.push(...right);
1177
+ } else {
1178
+ while (chunkStart < right.length) {
1179
+ list2.push(
1180
+ ...right.slice(chunkStart, chunkStart + constants.v8MaxSafeChunkSize)
1181
+ );
1182
+ chunkStart += constants.v8MaxSafeChunkSize;
1183
+ }
1184
+ }
1185
+ }
1186
+
1187
+ // ../node_modules/.pnpm/micromark-util-subtokenize@2.0.3/node_modules/micromark-util-subtokenize/dev/index.js
1188
+ function subtokenize(eventsArray) {
1189
+ const jumps = {};
1190
+ let index = -1;
1191
+ let event;
1192
+ let lineIndex;
1193
+ let otherIndex;
1194
+ let otherEvent;
1195
+ let parameters;
1196
+ let subevents;
1197
+ let more;
1198
+ const events = new SpliceBuffer(eventsArray);
1199
+ while (++index < events.length) {
1200
+ while (index in jumps) {
1201
+ index = jumps[index];
1202
+ }
1203
+ event = events.get(index);
1204
+ if (index && event[1].type === types.chunkFlow && events.get(index - 1)[1].type === types.listItemPrefix) {
1205
+ ok(event[1]._tokenizer, "expected `_tokenizer` on subtokens");
1206
+ subevents = event[1]._tokenizer.events;
1207
+ otherIndex = 0;
1208
+ if (otherIndex < subevents.length && subevents[otherIndex][1].type === types.lineEndingBlank) {
1209
+ otherIndex += 2;
1210
+ }
1211
+ if (otherIndex < subevents.length && subevents[otherIndex][1].type === types.content) {
1212
+ while (++otherIndex < subevents.length) {
1213
+ if (subevents[otherIndex][1].type === types.content) {
1214
+ break;
1215
+ }
1216
+ if (subevents[otherIndex][1].type === types.chunkText) {
1217
+ subevents[otherIndex][1]._isInFirstContentOfListItem = true;
1218
+ otherIndex++;
1219
+ }
1220
+ }
1221
+ }
1222
+ }
1223
+ if (event[0] === "enter") {
1224
+ if (event[1].contentType) {
1225
+ Object.assign(jumps, subcontent(events, index));
1226
+ index = jumps[index];
1227
+ more = true;
1228
+ }
1229
+ } else if (event[1]._container) {
1230
+ otherIndex = index;
1231
+ lineIndex = void 0;
1232
+ while (otherIndex--) {
1233
+ otherEvent = events.get(otherIndex);
1234
+ if (otherEvent[1].type === types.lineEnding || otherEvent[1].type === types.lineEndingBlank) {
1235
+ if (otherEvent[0] === "enter") {
1236
+ if (lineIndex) {
1237
+ events.get(lineIndex)[1].type = types.lineEndingBlank;
1238
+ }
1239
+ otherEvent[1].type = types.lineEnding;
1240
+ lineIndex = otherIndex;
1241
+ }
1242
+ } else {
1243
+ break;
1244
+ }
1245
+ }
1246
+ if (lineIndex) {
1247
+ event[1].end = { ...events.get(lineIndex)[1].start };
1248
+ parameters = events.slice(lineIndex, index);
1249
+ parameters.unshift(event);
1250
+ events.splice(lineIndex, index - lineIndex + 1, parameters);
1251
+ }
1252
+ }
1253
+ }
1254
+ splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));
1255
+ return !more;
1256
+ }
1257
+ function subcontent(events, eventIndex) {
1258
+ const token = events.get(eventIndex)[1];
1259
+ const context = events.get(eventIndex)[2];
1260
+ let startPosition = eventIndex - 1;
1261
+ const startPositions = [];
1262
+ ok(token.contentType, "expected `contentType` on subtokens");
1263
+ const tokenizer = token._tokenizer || context.parser[token.contentType](token.start);
1264
+ const childEvents = tokenizer.events;
1265
+ const jumps = [];
1266
+ const gaps = {};
1267
+ let stream;
1268
+ let previous2;
1269
+ let index = -1;
1270
+ let current = token;
1271
+ let adjust = 0;
1272
+ let start = 0;
1273
+ const breaks = [start];
1274
+ while (current) {
1275
+ while (events.get(++startPosition)[1] !== current) {
1276
+ }
1277
+ ok(
1278
+ !previous2 || current.previous === previous2,
1279
+ "expected previous to match"
1280
+ );
1281
+ ok(!previous2 || previous2.next === current, "expected next to match");
1282
+ startPositions.push(startPosition);
1283
+ if (!current._tokenizer) {
1284
+ stream = context.sliceStream(current);
1285
+ if (!current.next) {
1286
+ stream.push(codes.eof);
1287
+ }
1288
+ if (previous2) {
1289
+ tokenizer.defineSkip(current.start);
1290
+ }
1291
+ if (current._isInFirstContentOfListItem) {
1292
+ tokenizer._gfmTasklistFirstContentOfListItem = true;
1293
+ }
1294
+ tokenizer.write(stream);
1295
+ if (current._isInFirstContentOfListItem) {
1296
+ tokenizer._gfmTasklistFirstContentOfListItem = void 0;
1297
+ }
1298
+ }
1299
+ previous2 = current;
1300
+ current = current.next;
1301
+ }
1302
+ current = token;
1303
+ while (++index < childEvents.length) {
1304
+ if (
1305
+ // Find a void token that includes a break.
1306
+ childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line
1307
+ ) {
1308
+ ok(current, "expected a current token");
1309
+ start = index + 1;
1310
+ breaks.push(start);
1311
+ current._tokenizer = void 0;
1312
+ current.previous = void 0;
1313
+ current = current.next;
1314
+ }
1315
+ }
1316
+ tokenizer.events = [];
1317
+ if (current) {
1318
+ current._tokenizer = void 0;
1319
+ current.previous = void 0;
1320
+ ok(!current.next, "expected no next token");
1321
+ } else {
1322
+ breaks.pop();
1323
+ }
1324
+ index = breaks.length;
1325
+ while (index--) {
1326
+ const slice = childEvents.slice(breaks[index], breaks[index + 1]);
1327
+ const start2 = startPositions.pop();
1328
+ ok(start2 !== void 0, "expected a start position when splicing");
1329
+ jumps.push([start2, start2 + slice.length - 1]);
1330
+ events.splice(start2, 2, slice);
1331
+ }
1332
+ jumps.reverse();
1333
+ index = -1;
1334
+ while (++index < jumps.length) {
1335
+ gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];
1336
+ adjust += jumps[index][1] - jumps[index][0] - 1;
1337
+ }
1338
+ return gaps;
1339
+ }
1340
+
1341
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/content.js
1342
+ var content = { resolve: resolveContent, tokenize: tokenizeContent };
1343
+ var continuationConstruct = { partial: true, tokenize: tokenizeContinuation };
1344
+ function resolveContent(events) {
1345
+ subtokenize(events);
1346
+ return events;
1347
+ }
1348
+ function tokenizeContent(effects, ok2) {
1349
+ let previous2;
1350
+ return chunkStart;
1351
+ function chunkStart(code) {
1352
+ ok(
1353
+ code !== codes.eof && !markdownLineEnding(code),
1354
+ "expected no eof or eol"
1355
+ );
1356
+ effects.enter(types.content);
1357
+ previous2 = effects.enter(types.chunkContent, {
1358
+ contentType: constants.contentTypeContent
1359
+ });
1360
+ return chunkInside(code);
1361
+ }
1362
+ function chunkInside(code) {
1363
+ if (code === codes.eof) {
1364
+ return contentEnd(code);
1365
+ }
1366
+ if (markdownLineEnding(code)) {
1367
+ return effects.check(
1368
+ continuationConstruct,
1369
+ contentContinue,
1370
+ contentEnd
1371
+ )(code);
1372
+ }
1373
+ effects.consume(code);
1374
+ return chunkInside;
1375
+ }
1376
+ function contentEnd(code) {
1377
+ effects.exit(types.chunkContent);
1378
+ effects.exit(types.content);
1379
+ return ok2(code);
1380
+ }
1381
+ function contentContinue(code) {
1382
+ ok(markdownLineEnding(code), "expected eol");
1383
+ effects.consume(code);
1384
+ effects.exit(types.chunkContent);
1385
+ ok(previous2, "expected previous token");
1386
+ previous2.next = effects.enter(types.chunkContent, {
1387
+ contentType: constants.contentTypeContent,
1388
+ previous: previous2
1389
+ });
1390
+ previous2 = previous2.next;
1391
+ return chunkInside;
1392
+ }
1393
+ }
1394
+ function tokenizeContinuation(effects, ok2, nok) {
1395
+ const self = this;
1396
+ return startLookahead;
1397
+ function startLookahead(code) {
1398
+ ok(markdownLineEnding(code), "expected a line ending");
1399
+ effects.exit(types.chunkContent);
1400
+ effects.enter(types.lineEnding);
1401
+ effects.consume(code);
1402
+ effects.exit(types.lineEnding);
1403
+ return factorySpace(effects, prefixed, types.linePrefix);
1404
+ }
1405
+ function prefixed(code) {
1406
+ if (code === codes.eof || markdownLineEnding(code)) {
1407
+ return nok(code);
1408
+ }
1409
+ ok(
1410
+ self.parser.constructs.disable.null,
1411
+ "expected `disable.null` to be populated"
1412
+ );
1413
+ const tail = self.events[self.events.length - 1];
1414
+ if (!self.parser.constructs.disable.null.includes("codeIndented") && tail && tail[1].type === types.linePrefix && tail[2].sliceSerialize(tail[1], true).length >= constants.tabSize) {
1415
+ return ok2(code);
1416
+ }
1417
+ return effects.interrupt(self.parser.constructs.flow, nok, ok2)(code);
1418
+ }
1419
+ }
1420
+
1421
+ // ../node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/dev/index.js
1422
+ function factoryDestination(effects, ok2, nok, type, literalType, literalMarkerType, rawType, stringType, max) {
1423
+ const limit = max || Number.POSITIVE_INFINITY;
1424
+ let balance = 0;
1425
+ return start;
1426
+ function start(code) {
1427
+ if (code === codes.lessThan) {
1428
+ effects.enter(type);
1429
+ effects.enter(literalType);
1430
+ effects.enter(literalMarkerType);
1431
+ effects.consume(code);
1432
+ effects.exit(literalMarkerType);
1433
+ return enclosedBefore;
1434
+ }
1435
+ if (code === codes.eof || code === codes.space || code === codes.rightParenthesis || asciiControl(code)) {
1436
+ return nok(code);
1437
+ }
1438
+ effects.enter(type);
1439
+ effects.enter(rawType);
1440
+ effects.enter(stringType);
1441
+ effects.enter(types.chunkString, { contentType: constants.contentTypeString });
1442
+ return raw(code);
1443
+ }
1444
+ function enclosedBefore(code) {
1445
+ if (code === codes.greaterThan) {
1446
+ effects.enter(literalMarkerType);
1447
+ effects.consume(code);
1448
+ effects.exit(literalMarkerType);
1449
+ effects.exit(literalType);
1450
+ effects.exit(type);
1451
+ return ok2;
1452
+ }
1453
+ effects.enter(stringType);
1454
+ effects.enter(types.chunkString, { contentType: constants.contentTypeString });
1455
+ return enclosed(code);
1456
+ }
1457
+ function enclosed(code) {
1458
+ if (code === codes.greaterThan) {
1459
+ effects.exit(types.chunkString);
1460
+ effects.exit(stringType);
1461
+ return enclosedBefore(code);
1462
+ }
1463
+ if (code === codes.eof || code === codes.lessThan || markdownLineEnding(code)) {
1464
+ return nok(code);
1465
+ }
1466
+ effects.consume(code);
1467
+ return code === codes.backslash ? enclosedEscape : enclosed;
1468
+ }
1469
+ function enclosedEscape(code) {
1470
+ if (code === codes.lessThan || code === codes.greaterThan || code === codes.backslash) {
1471
+ effects.consume(code);
1472
+ return enclosed;
1473
+ }
1474
+ return enclosed(code);
1475
+ }
1476
+ function raw(code) {
1477
+ if (!balance && (code === codes.eof || code === codes.rightParenthesis || markdownLineEndingOrSpace(code))) {
1478
+ effects.exit(types.chunkString);
1479
+ effects.exit(stringType);
1480
+ effects.exit(rawType);
1481
+ effects.exit(type);
1482
+ return ok2(code);
1483
+ }
1484
+ if (balance < limit && code === codes.leftParenthesis) {
1485
+ effects.consume(code);
1486
+ balance++;
1487
+ return raw;
1488
+ }
1489
+ if (code === codes.rightParenthesis) {
1490
+ effects.consume(code);
1491
+ balance--;
1492
+ return raw;
1493
+ }
1494
+ if (code === codes.eof || code === codes.space || code === codes.leftParenthesis || asciiControl(code)) {
1495
+ return nok(code);
1496
+ }
1497
+ effects.consume(code);
1498
+ return code === codes.backslash ? rawEscape : raw;
1499
+ }
1500
+ function rawEscape(code) {
1501
+ if (code === codes.leftParenthesis || code === codes.rightParenthesis || code === codes.backslash) {
1502
+ effects.consume(code);
1503
+ return raw;
1504
+ }
1505
+ return raw(code);
1506
+ }
1507
+ }
1508
+
1509
+ // ../node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/dev/index.js
1510
+ function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
1511
+ const self = this;
1512
+ let size = 0;
1513
+ let seen;
1514
+ return start;
1515
+ function start(code) {
1516
+ ok(code === codes.leftSquareBracket, "expected `[`");
1517
+ effects.enter(type);
1518
+ effects.enter(markerType);
1519
+ effects.consume(code);
1520
+ effects.exit(markerType);
1521
+ effects.enter(stringType);
1522
+ return atBreak;
1523
+ }
1524
+ function atBreak(code) {
1525
+ if (size > constants.linkReferenceSizeMax || code === codes.eof || code === codes.leftSquareBracket || code === codes.rightSquareBracket && !seen || // To do: remove in the future once we’ve switched from
1526
+ // `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
1527
+ // which doesn’t need this.
1528
+ // Hidden footnotes hook.
1529
+ /* c8 ignore next 3 */
1530
+ code === codes.caret && !size && "_hiddenFootnoteSupport" in self.parser.constructs) {
1531
+ return nok(code);
1532
+ }
1533
+ if (code === codes.rightSquareBracket) {
1534
+ effects.exit(stringType);
1535
+ effects.enter(markerType);
1536
+ effects.consume(code);
1537
+ effects.exit(markerType);
1538
+ effects.exit(type);
1539
+ return ok2;
1540
+ }
1541
+ if (markdownLineEnding(code)) {
1542
+ effects.enter(types.lineEnding);
1543
+ effects.consume(code);
1544
+ effects.exit(types.lineEnding);
1545
+ return atBreak;
1546
+ }
1547
+ effects.enter(types.chunkString, { contentType: constants.contentTypeString });
1548
+ return labelInside(code);
1549
+ }
1550
+ function labelInside(code) {
1551
+ if (code === codes.eof || code === codes.leftSquareBracket || code === codes.rightSquareBracket || markdownLineEnding(code) || size++ > constants.linkReferenceSizeMax) {
1552
+ effects.exit(types.chunkString);
1553
+ return atBreak(code);
1554
+ }
1555
+ effects.consume(code);
1556
+ if (!seen) seen = !markdownSpace(code);
1557
+ return code === codes.backslash ? labelEscape : labelInside;
1558
+ }
1559
+ function labelEscape(code) {
1560
+ if (code === codes.leftSquareBracket || code === codes.backslash || code === codes.rightSquareBracket) {
1561
+ effects.consume(code);
1562
+ size++;
1563
+ return labelInside;
1564
+ }
1565
+ return labelInside(code);
1566
+ }
1567
+ }
1568
+
1569
+ // ../node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/dev/index.js
1570
+ function factoryTitle(effects, ok2, nok, type, markerType, stringType) {
1571
+ let marker;
1572
+ return start;
1573
+ function start(code) {
1574
+ if (code === codes.quotationMark || code === codes.apostrophe || code === codes.leftParenthesis) {
1575
+ effects.enter(type);
1576
+ effects.enter(markerType);
1577
+ effects.consume(code);
1578
+ effects.exit(markerType);
1579
+ marker = code === codes.leftParenthesis ? codes.rightParenthesis : code;
1580
+ return begin;
1581
+ }
1582
+ return nok(code);
1583
+ }
1584
+ function begin(code) {
1585
+ if (code === marker) {
1586
+ effects.enter(markerType);
1587
+ effects.consume(code);
1588
+ effects.exit(markerType);
1589
+ effects.exit(type);
1590
+ return ok2;
1591
+ }
1592
+ effects.enter(stringType);
1593
+ return atBreak(code);
1594
+ }
1595
+ function atBreak(code) {
1596
+ if (code === marker) {
1597
+ effects.exit(stringType);
1598
+ return begin(marker);
1599
+ }
1600
+ if (code === codes.eof) {
1601
+ return nok(code);
1602
+ }
1603
+ if (markdownLineEnding(code)) {
1604
+ effects.enter(types.lineEnding);
1605
+ effects.consume(code);
1606
+ effects.exit(types.lineEnding);
1607
+ return factorySpace(effects, atBreak, types.linePrefix);
1608
+ }
1609
+ effects.enter(types.chunkString, { contentType: constants.contentTypeString });
1610
+ return inside(code);
1611
+ }
1612
+ function inside(code) {
1613
+ if (code === marker || code === codes.eof || markdownLineEnding(code)) {
1614
+ effects.exit(types.chunkString);
1615
+ return atBreak(code);
1616
+ }
1617
+ effects.consume(code);
1618
+ return code === codes.backslash ? escape : inside;
1619
+ }
1620
+ function escape(code) {
1621
+ if (code === marker || code === codes.backslash) {
1622
+ effects.consume(code);
1623
+ return inside;
1624
+ }
1625
+ return inside(code);
1626
+ }
1627
+ }
1628
+
1629
+ // ../node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/dev/index.js
1630
+ function factoryWhitespace(effects, ok2) {
1631
+ let seen;
1632
+ return start;
1633
+ function start(code) {
1634
+ if (markdownLineEnding(code)) {
1635
+ effects.enter(types.lineEnding);
1636
+ effects.consume(code);
1637
+ effects.exit(types.lineEnding);
1638
+ seen = true;
1639
+ return start;
1640
+ }
1641
+ if (markdownSpace(code)) {
1642
+ return factorySpace(
1643
+ effects,
1644
+ start,
1645
+ seen ? types.linePrefix : types.lineSuffix
1646
+ )(code);
1647
+ }
1648
+ return ok2(code);
1649
+ }
1650
+ }
1651
+
1652
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/definition.js
1653
+ var definition = { name: "definition", tokenize: tokenizeDefinition };
1654
+ var titleBefore = { partial: true, tokenize: tokenizeTitleBefore };
1655
+ function tokenizeDefinition(effects, ok2, nok) {
1656
+ const self = this;
1657
+ let identifier;
1658
+ return start;
1659
+ function start(code) {
1660
+ effects.enter(types.definition);
1661
+ return before(code);
1662
+ }
1663
+ function before(code) {
1664
+ ok(code === codes.leftSquareBracket, "expected `[`");
1665
+ return factoryLabel.call(
1666
+ self,
1667
+ effects,
1668
+ labelAfter,
1669
+ // Note: we don’t need to reset the way `markdown-rs` does.
1670
+ nok,
1671
+ types.definitionLabel,
1672
+ types.definitionLabelMarker,
1673
+ types.definitionLabelString
1674
+ )(code);
1675
+ }
1676
+ function labelAfter(code) {
1677
+ identifier = normalizeIdentifier(
1678
+ self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
1679
+ );
1680
+ if (code === codes.colon) {
1681
+ effects.enter(types.definitionMarker);
1682
+ effects.consume(code);
1683
+ effects.exit(types.definitionMarker);
1684
+ return markerAfter;
1685
+ }
1686
+ return nok(code);
1687
+ }
1688
+ function markerAfter(code) {
1689
+ return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, destinationBefore)(code) : destinationBefore(code);
1690
+ }
1691
+ function destinationBefore(code) {
1692
+ return factoryDestination(
1693
+ effects,
1694
+ destinationAfter,
1695
+ // Note: we don’t need to reset the way `markdown-rs` does.
1696
+ nok,
1697
+ types.definitionDestination,
1698
+ types.definitionDestinationLiteral,
1699
+ types.definitionDestinationLiteralMarker,
1700
+ types.definitionDestinationRaw,
1701
+ types.definitionDestinationString
1702
+ )(code);
1703
+ }
1704
+ function destinationAfter(code) {
1705
+ return effects.attempt(titleBefore, after, after)(code);
1706
+ }
1707
+ function after(code) {
1708
+ return markdownSpace(code) ? factorySpace(effects, afterWhitespace, types.whitespace)(code) : afterWhitespace(code);
1709
+ }
1710
+ function afterWhitespace(code) {
1711
+ if (code === codes.eof || markdownLineEnding(code)) {
1712
+ effects.exit(types.definition);
1713
+ self.parser.defined.push(identifier);
1714
+ return ok2(code);
1715
+ }
1716
+ return nok(code);
1717
+ }
1718
+ }
1719
+ function tokenizeTitleBefore(effects, ok2, nok) {
1720
+ return titleBefore2;
1721
+ function titleBefore2(code) {
1722
+ return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, beforeMarker)(code) : nok(code);
1723
+ }
1724
+ function beforeMarker(code) {
1725
+ return factoryTitle(
1726
+ effects,
1727
+ titleAfter,
1728
+ nok,
1729
+ types.definitionTitle,
1730
+ types.definitionTitleMarker,
1731
+ types.definitionTitleString
1732
+ )(code);
1733
+ }
1734
+ function titleAfter(code) {
1735
+ return markdownSpace(code) ? factorySpace(
1736
+ effects,
1737
+ titleAfterOptionalWhitespace,
1738
+ types.whitespace
1739
+ )(code) : titleAfterOptionalWhitespace(code);
1740
+ }
1741
+ function titleAfterOptionalWhitespace(code) {
1742
+ return code === codes.eof || markdownLineEnding(code) ? ok2(code) : nok(code);
1743
+ }
1744
+ }
1745
+
1746
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js
1747
+ var hardBreakEscape = {
1748
+ name: "hardBreakEscape",
1749
+ tokenize: tokenizeHardBreakEscape
1750
+ };
1751
+ function tokenizeHardBreakEscape(effects, ok2, nok) {
1752
+ return start;
1753
+ function start(code) {
1754
+ ok(code === codes.backslash, "expected `\\`");
1755
+ effects.enter(types.hardBreakEscape);
1756
+ effects.consume(code);
1757
+ return after;
1758
+ }
1759
+ function after(code) {
1760
+ if (markdownLineEnding(code)) {
1761
+ effects.exit(types.hardBreakEscape);
1762
+ return ok2(code);
1763
+ }
1764
+ return nok(code);
1765
+ }
1766
+ }
1767
+
1768
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/heading-atx.js
1769
+ var headingAtx = {
1770
+ name: "headingAtx",
1771
+ resolve: resolveHeadingAtx,
1772
+ tokenize: tokenizeHeadingAtx
1773
+ };
1774
+ function resolveHeadingAtx(events, context) {
1775
+ let contentEnd = events.length - 2;
1776
+ let contentStart = 3;
1777
+ let content2;
1778
+ let text;
1779
+ if (events[contentStart][1].type === types.whitespace) {
1780
+ contentStart += 2;
1781
+ }
1782
+ if (contentEnd - 2 > contentStart && events[contentEnd][1].type === types.whitespace) {
1783
+ contentEnd -= 2;
1784
+ }
1785
+ if (events[contentEnd][1].type === types.atxHeadingSequence && (contentStart === contentEnd - 1 || contentEnd - 4 > contentStart && events[contentEnd - 2][1].type === types.whitespace)) {
1786
+ contentEnd -= contentStart + 1 === contentEnd ? 2 : 4;
1787
+ }
1788
+ if (contentEnd > contentStart) {
1789
+ content2 = {
1790
+ type: types.atxHeadingText,
1791
+ start: events[contentStart][1].start,
1792
+ end: events[contentEnd][1].end
1793
+ };
1794
+ text = {
1795
+ type: types.chunkText,
1796
+ start: events[contentStart][1].start,
1797
+ end: events[contentEnd][1].end,
1798
+ contentType: constants.contentTypeText
1799
+ };
1800
+ splice(events, contentStart, contentEnd - contentStart + 1, [
1801
+ ["enter", content2, context],
1802
+ ["enter", text, context],
1803
+ ["exit", text, context],
1804
+ ["exit", content2, context]
1805
+ ]);
1806
+ }
1807
+ return events;
1808
+ }
1809
+ function tokenizeHeadingAtx(effects, ok2, nok) {
1810
+ let size = 0;
1811
+ return start;
1812
+ function start(code) {
1813
+ effects.enter(types.atxHeading);
1814
+ return before(code);
1815
+ }
1816
+ function before(code) {
1817
+ ok(code === codes.numberSign, "expected `#`");
1818
+ effects.enter(types.atxHeadingSequence);
1819
+ return sequenceOpen(code);
1820
+ }
1821
+ function sequenceOpen(code) {
1822
+ if (code === codes.numberSign && size++ < constants.atxHeadingOpeningFenceSizeMax) {
1823
+ effects.consume(code);
1824
+ return sequenceOpen;
1825
+ }
1826
+ if (code === codes.eof || markdownLineEndingOrSpace(code)) {
1827
+ effects.exit(types.atxHeadingSequence);
1828
+ return atBreak(code);
1829
+ }
1830
+ return nok(code);
1831
+ }
1832
+ function atBreak(code) {
1833
+ if (code === codes.numberSign) {
1834
+ effects.enter(types.atxHeadingSequence);
1835
+ return sequenceFurther(code);
1836
+ }
1837
+ if (code === codes.eof || markdownLineEnding(code)) {
1838
+ effects.exit(types.atxHeading);
1839
+ return ok2(code);
1840
+ }
1841
+ if (markdownSpace(code)) {
1842
+ return factorySpace(effects, atBreak, types.whitespace)(code);
1843
+ }
1844
+ effects.enter(types.atxHeadingText);
1845
+ return data(code);
1846
+ }
1847
+ function sequenceFurther(code) {
1848
+ if (code === codes.numberSign) {
1849
+ effects.consume(code);
1850
+ return sequenceFurther;
1851
+ }
1852
+ effects.exit(types.atxHeadingSequence);
1853
+ return atBreak(code);
1854
+ }
1855
+ function data(code) {
1856
+ if (code === codes.eof || code === codes.numberSign || markdownLineEndingOrSpace(code)) {
1857
+ effects.exit(types.atxHeadingText);
1858
+ return atBreak(code);
1859
+ }
1860
+ effects.consume(code);
1861
+ return data;
1862
+ }
1863
+ }
1864
+
1865
+ // ../node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
1866
+ var htmlBlockNames = [
1867
+ "address",
1868
+ "article",
1869
+ "aside",
1870
+ "base",
1871
+ "basefont",
1872
+ "blockquote",
1873
+ "body",
1874
+ "caption",
1875
+ "center",
1876
+ "col",
1877
+ "colgroup",
1878
+ "dd",
1879
+ "details",
1880
+ "dialog",
1881
+ "dir",
1882
+ "div",
1883
+ "dl",
1884
+ "dt",
1885
+ "fieldset",
1886
+ "figcaption",
1887
+ "figure",
1888
+ "footer",
1889
+ "form",
1890
+ "frame",
1891
+ "frameset",
1892
+ "h1",
1893
+ "h2",
1894
+ "h3",
1895
+ "h4",
1896
+ "h5",
1897
+ "h6",
1898
+ "head",
1899
+ "header",
1900
+ "hr",
1901
+ "html",
1902
+ "iframe",
1903
+ "legend",
1904
+ "li",
1905
+ "link",
1906
+ "main",
1907
+ "menu",
1908
+ "menuitem",
1909
+ "nav",
1910
+ "noframes",
1911
+ "ol",
1912
+ "optgroup",
1913
+ "option",
1914
+ "p",
1915
+ "param",
1916
+ "search",
1917
+ "section",
1918
+ "summary",
1919
+ "table",
1920
+ "tbody",
1921
+ "td",
1922
+ "tfoot",
1923
+ "th",
1924
+ "thead",
1925
+ "title",
1926
+ "tr",
1927
+ "track",
1928
+ "ul"
1929
+ ];
1930
+ var htmlRawNames = ["pre", "script", "style", "textarea"];
1931
+
1932
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/html-flow.js
1933
+ var htmlFlow = {
1934
+ concrete: true,
1935
+ name: "htmlFlow",
1936
+ resolveTo: resolveToHtmlFlow,
1937
+ tokenize: tokenizeHtmlFlow
1938
+ };
1939
+ var blankLineBefore = { partial: true, tokenize: tokenizeBlankLineBefore };
1940
+ var nonLazyContinuationStart = {
1941
+ partial: true,
1942
+ tokenize: tokenizeNonLazyContinuationStart
1943
+ };
1944
+ function resolveToHtmlFlow(events) {
1945
+ let index = events.length;
1946
+ while (index--) {
1947
+ if (events[index][0] === "enter" && events[index][1].type === types.htmlFlow) {
1948
+ break;
1949
+ }
1950
+ }
1951
+ if (index > 1 && events[index - 2][1].type === types.linePrefix) {
1952
+ events[index][1].start = events[index - 2][1].start;
1953
+ events[index + 1][1].start = events[index - 2][1].start;
1954
+ events.splice(index - 2, 2);
1955
+ }
1956
+ return events;
1957
+ }
1958
+ function tokenizeHtmlFlow(effects, ok2, nok) {
1959
+ const self = this;
1960
+ let marker;
1961
+ let closingTag;
1962
+ let buffer;
1963
+ let index;
1964
+ let markerB;
1965
+ return start;
1966
+ function start(code) {
1967
+ return before(code);
1968
+ }
1969
+ function before(code) {
1970
+ ok(code === codes.lessThan, "expected `<`");
1971
+ effects.enter(types.htmlFlow);
1972
+ effects.enter(types.htmlFlowData);
1973
+ effects.consume(code);
1974
+ return open;
1975
+ }
1976
+ function open(code) {
1977
+ if (code === codes.exclamationMark) {
1978
+ effects.consume(code);
1979
+ return declarationOpen;
1980
+ }
1981
+ if (code === codes.slash) {
1982
+ effects.consume(code);
1983
+ closingTag = true;
1984
+ return tagCloseStart;
1985
+ }
1986
+ if (code === codes.questionMark) {
1987
+ effects.consume(code);
1988
+ marker = constants.htmlInstruction;
1989
+ return self.interrupt ? ok2 : continuationDeclarationInside;
1990
+ }
1991
+ if (asciiAlpha(code)) {
1992
+ ok(code !== null);
1993
+ effects.consume(code);
1994
+ buffer = String.fromCharCode(code);
1995
+ return tagName;
1996
+ }
1997
+ return nok(code);
1998
+ }
1999
+ function declarationOpen(code) {
2000
+ if (code === codes.dash) {
2001
+ effects.consume(code);
2002
+ marker = constants.htmlComment;
2003
+ return commentOpenInside;
2004
+ }
2005
+ if (code === codes.leftSquareBracket) {
2006
+ effects.consume(code);
2007
+ marker = constants.htmlCdata;
2008
+ index = 0;
2009
+ return cdataOpenInside;
2010
+ }
2011
+ if (asciiAlpha(code)) {
2012
+ effects.consume(code);
2013
+ marker = constants.htmlDeclaration;
2014
+ return self.interrupt ? ok2 : continuationDeclarationInside;
2015
+ }
2016
+ return nok(code);
2017
+ }
2018
+ function commentOpenInside(code) {
2019
+ if (code === codes.dash) {
2020
+ effects.consume(code);
2021
+ return self.interrupt ? ok2 : continuationDeclarationInside;
2022
+ }
2023
+ return nok(code);
2024
+ }
2025
+ function cdataOpenInside(code) {
2026
+ const value = constants.cdataOpeningString;
2027
+ if (code === value.charCodeAt(index++)) {
2028
+ effects.consume(code);
2029
+ if (index === value.length) {
2030
+ return self.interrupt ? ok2 : continuation;
2031
+ }
2032
+ return cdataOpenInside;
2033
+ }
2034
+ return nok(code);
2035
+ }
2036
+ function tagCloseStart(code) {
2037
+ if (asciiAlpha(code)) {
2038
+ ok(code !== null);
2039
+ effects.consume(code);
2040
+ buffer = String.fromCharCode(code);
2041
+ return tagName;
2042
+ }
2043
+ return nok(code);
2044
+ }
2045
+ function tagName(code) {
2046
+ if (code === codes.eof || code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) {
2047
+ const slash = code === codes.slash;
2048
+ const name = buffer.toLowerCase();
2049
+ if (!slash && !closingTag && htmlRawNames.includes(name)) {
2050
+ marker = constants.htmlRaw;
2051
+ return self.interrupt ? ok2(code) : continuation(code);
2052
+ }
2053
+ if (htmlBlockNames.includes(buffer.toLowerCase())) {
2054
+ marker = constants.htmlBasic;
2055
+ if (slash) {
2056
+ effects.consume(code);
2057
+ return basicSelfClosing;
2058
+ }
2059
+ return self.interrupt ? ok2(code) : continuation(code);
2060
+ }
2061
+ marker = constants.htmlComplete;
2062
+ return self.interrupt && !self.parser.lazy[self.now().line] ? nok(code) : closingTag ? completeClosingTagAfter(code) : completeAttributeNameBefore(code);
2063
+ }
2064
+ if (code === codes.dash || asciiAlphanumeric(code)) {
2065
+ effects.consume(code);
2066
+ buffer += String.fromCharCode(code);
2067
+ return tagName;
2068
+ }
2069
+ return nok(code);
2070
+ }
2071
+ function basicSelfClosing(code) {
2072
+ if (code === codes.greaterThan) {
2073
+ effects.consume(code);
2074
+ return self.interrupt ? ok2 : continuation;
2075
+ }
2076
+ return nok(code);
2077
+ }
2078
+ function completeClosingTagAfter(code) {
2079
+ if (markdownSpace(code)) {
2080
+ effects.consume(code);
2081
+ return completeClosingTagAfter;
2082
+ }
2083
+ return completeEnd(code);
2084
+ }
2085
+ function completeAttributeNameBefore(code) {
2086
+ if (code === codes.slash) {
2087
+ effects.consume(code);
2088
+ return completeEnd;
2089
+ }
2090
+ if (code === codes.colon || code === codes.underscore || asciiAlpha(code)) {
2091
+ effects.consume(code);
2092
+ return completeAttributeName;
2093
+ }
2094
+ if (markdownSpace(code)) {
2095
+ effects.consume(code);
2096
+ return completeAttributeNameBefore;
2097
+ }
2098
+ return completeEnd(code);
2099
+ }
2100
+ function completeAttributeName(code) {
2101
+ if (code === codes.dash || code === codes.dot || code === codes.colon || code === codes.underscore || asciiAlphanumeric(code)) {
2102
+ effects.consume(code);
2103
+ return completeAttributeName;
2104
+ }
2105
+ return completeAttributeNameAfter(code);
2106
+ }
2107
+ function completeAttributeNameAfter(code) {
2108
+ if (code === codes.equalsTo) {
2109
+ effects.consume(code);
2110
+ return completeAttributeValueBefore;
2111
+ }
2112
+ if (markdownSpace(code)) {
2113
+ effects.consume(code);
2114
+ return completeAttributeNameAfter;
2115
+ }
2116
+ return completeAttributeNameBefore(code);
2117
+ }
2118
+ function completeAttributeValueBefore(code) {
2119
+ if (code === codes.eof || code === codes.lessThan || code === codes.equalsTo || code === codes.greaterThan || code === codes.graveAccent) {
2120
+ return nok(code);
2121
+ }
2122
+ if (code === codes.quotationMark || code === codes.apostrophe) {
2123
+ effects.consume(code);
2124
+ markerB = code;
2125
+ return completeAttributeValueQuoted;
2126
+ }
2127
+ if (markdownSpace(code)) {
2128
+ effects.consume(code);
2129
+ return completeAttributeValueBefore;
2130
+ }
2131
+ return completeAttributeValueUnquoted(code);
2132
+ }
2133
+ function completeAttributeValueQuoted(code) {
2134
+ if (code === markerB) {
2135
+ effects.consume(code);
2136
+ markerB = null;
2137
+ return completeAttributeValueQuotedAfter;
2138
+ }
2139
+ if (code === codes.eof || markdownLineEnding(code)) {
2140
+ return nok(code);
2141
+ }
2142
+ effects.consume(code);
2143
+ return completeAttributeValueQuoted;
2144
+ }
2145
+ function completeAttributeValueUnquoted(code) {
2146
+ if (code === codes.eof || code === codes.quotationMark || code === codes.apostrophe || code === codes.slash || code === codes.lessThan || code === codes.equalsTo || code === codes.greaterThan || code === codes.graveAccent || markdownLineEndingOrSpace(code)) {
2147
+ return completeAttributeNameAfter(code);
2148
+ }
2149
+ effects.consume(code);
2150
+ return completeAttributeValueUnquoted;
2151
+ }
2152
+ function completeAttributeValueQuotedAfter(code) {
2153
+ if (code === codes.slash || code === codes.greaterThan || markdownSpace(code)) {
2154
+ return completeAttributeNameBefore(code);
2155
+ }
2156
+ return nok(code);
2157
+ }
2158
+ function completeEnd(code) {
2159
+ if (code === codes.greaterThan) {
2160
+ effects.consume(code);
2161
+ return completeAfter;
2162
+ }
2163
+ return nok(code);
2164
+ }
2165
+ function completeAfter(code) {
2166
+ if (code === codes.eof || markdownLineEnding(code)) {
2167
+ return continuation(code);
2168
+ }
2169
+ if (markdownSpace(code)) {
2170
+ effects.consume(code);
2171
+ return completeAfter;
2172
+ }
2173
+ return nok(code);
2174
+ }
2175
+ function continuation(code) {
2176
+ if (code === codes.dash && marker === constants.htmlComment) {
2177
+ effects.consume(code);
2178
+ return continuationCommentInside;
2179
+ }
2180
+ if (code === codes.lessThan && marker === constants.htmlRaw) {
2181
+ effects.consume(code);
2182
+ return continuationRawTagOpen;
2183
+ }
2184
+ if (code === codes.greaterThan && marker === constants.htmlDeclaration) {
2185
+ effects.consume(code);
2186
+ return continuationClose;
2187
+ }
2188
+ if (code === codes.questionMark && marker === constants.htmlInstruction) {
2189
+ effects.consume(code);
2190
+ return continuationDeclarationInside;
2191
+ }
2192
+ if (code === codes.rightSquareBracket && marker === constants.htmlCdata) {
2193
+ effects.consume(code);
2194
+ return continuationCdataInside;
2195
+ }
2196
+ if (markdownLineEnding(code) && (marker === constants.htmlBasic || marker === constants.htmlComplete)) {
2197
+ effects.exit(types.htmlFlowData);
2198
+ return effects.check(
2199
+ blankLineBefore,
2200
+ continuationAfter,
2201
+ continuationStart
2202
+ )(code);
2203
+ }
2204
+ if (code === codes.eof || markdownLineEnding(code)) {
2205
+ effects.exit(types.htmlFlowData);
2206
+ return continuationStart(code);
2207
+ }
2208
+ effects.consume(code);
2209
+ return continuation;
2210
+ }
2211
+ function continuationStart(code) {
2212
+ return effects.check(
2213
+ nonLazyContinuationStart,
2214
+ continuationStartNonLazy,
2215
+ continuationAfter
2216
+ )(code);
2217
+ }
2218
+ function continuationStartNonLazy(code) {
2219
+ ok(markdownLineEnding(code));
2220
+ effects.enter(types.lineEnding);
2221
+ effects.consume(code);
2222
+ effects.exit(types.lineEnding);
2223
+ return continuationBefore;
2224
+ }
2225
+ function continuationBefore(code) {
2226
+ if (code === codes.eof || markdownLineEnding(code)) {
2227
+ return continuationStart(code);
2228
+ }
2229
+ effects.enter(types.htmlFlowData);
2230
+ return continuation(code);
2231
+ }
2232
+ function continuationCommentInside(code) {
2233
+ if (code === codes.dash) {
2234
+ effects.consume(code);
2235
+ return continuationDeclarationInside;
2236
+ }
2237
+ return continuation(code);
2238
+ }
2239
+ function continuationRawTagOpen(code) {
2240
+ if (code === codes.slash) {
2241
+ effects.consume(code);
2242
+ buffer = "";
2243
+ return continuationRawEndTag;
2244
+ }
2245
+ return continuation(code);
2246
+ }
2247
+ function continuationRawEndTag(code) {
2248
+ if (code === codes.greaterThan) {
2249
+ const name = buffer.toLowerCase();
2250
+ if (htmlRawNames.includes(name)) {
2251
+ effects.consume(code);
2252
+ return continuationClose;
2253
+ }
2254
+ return continuation(code);
2255
+ }
2256
+ if (asciiAlpha(code) && buffer.length < constants.htmlRawSizeMax) {
2257
+ ok(code !== null);
2258
+ effects.consume(code);
2259
+ buffer += String.fromCharCode(code);
2260
+ return continuationRawEndTag;
2261
+ }
2262
+ return continuation(code);
2263
+ }
2264
+ function continuationCdataInside(code) {
2265
+ if (code === codes.rightSquareBracket) {
2266
+ effects.consume(code);
2267
+ return continuationDeclarationInside;
2268
+ }
2269
+ return continuation(code);
2270
+ }
2271
+ function continuationDeclarationInside(code) {
2272
+ if (code === codes.greaterThan) {
2273
+ effects.consume(code);
2274
+ return continuationClose;
2275
+ }
2276
+ if (code === codes.dash && marker === constants.htmlComment) {
2277
+ effects.consume(code);
2278
+ return continuationDeclarationInside;
2279
+ }
2280
+ return continuation(code);
2281
+ }
2282
+ function continuationClose(code) {
2283
+ if (code === codes.eof || markdownLineEnding(code)) {
2284
+ effects.exit(types.htmlFlowData);
2285
+ return continuationAfter(code);
2286
+ }
2287
+ effects.consume(code);
2288
+ return continuationClose;
2289
+ }
2290
+ function continuationAfter(code) {
2291
+ effects.exit(types.htmlFlow);
2292
+ return ok2(code);
2293
+ }
2294
+ }
2295
+ function tokenizeNonLazyContinuationStart(effects, ok2, nok) {
2296
+ const self = this;
2297
+ return start;
2298
+ function start(code) {
2299
+ if (markdownLineEnding(code)) {
2300
+ effects.enter(types.lineEnding);
2301
+ effects.consume(code);
2302
+ effects.exit(types.lineEnding);
2303
+ return after;
2304
+ }
2305
+ return nok(code);
2306
+ }
2307
+ function after(code) {
2308
+ return self.parser.lazy[self.now().line] ? nok(code) : ok2(code);
2309
+ }
2310
+ }
2311
+ function tokenizeBlankLineBefore(effects, ok2, nok) {
2312
+ return start;
2313
+ function start(code) {
2314
+ ok(markdownLineEnding(code), "expected a line ending");
2315
+ effects.enter(types.lineEnding);
2316
+ effects.consume(code);
2317
+ effects.exit(types.lineEnding);
2318
+ return effects.attempt(blankLine, ok2, nok);
2319
+ }
2320
+ }
2321
+
2322
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/html-text.js
2323
+ var htmlText = { name: "htmlText", tokenize: tokenizeHtmlText };
2324
+ function tokenizeHtmlText(effects, ok2, nok) {
2325
+ const self = this;
2326
+ let marker;
2327
+ let index;
2328
+ let returnState;
2329
+ return start;
2330
+ function start(code) {
2331
+ ok(code === codes.lessThan, "expected `<`");
2332
+ effects.enter(types.htmlText);
2333
+ effects.enter(types.htmlTextData);
2334
+ effects.consume(code);
2335
+ return open;
2336
+ }
2337
+ function open(code) {
2338
+ if (code === codes.exclamationMark) {
2339
+ effects.consume(code);
2340
+ return declarationOpen;
2341
+ }
2342
+ if (code === codes.slash) {
2343
+ effects.consume(code);
2344
+ return tagCloseStart;
2345
+ }
2346
+ if (code === codes.questionMark) {
2347
+ effects.consume(code);
2348
+ return instruction;
2349
+ }
2350
+ if (asciiAlpha(code)) {
2351
+ effects.consume(code);
2352
+ return tagOpen;
2353
+ }
2354
+ return nok(code);
2355
+ }
2356
+ function declarationOpen(code) {
2357
+ if (code === codes.dash) {
2358
+ effects.consume(code);
2359
+ return commentOpenInside;
2360
+ }
2361
+ if (code === codes.leftSquareBracket) {
2362
+ effects.consume(code);
2363
+ index = 0;
2364
+ return cdataOpenInside;
2365
+ }
2366
+ if (asciiAlpha(code)) {
2367
+ effects.consume(code);
2368
+ return declaration;
2369
+ }
2370
+ return nok(code);
2371
+ }
2372
+ function commentOpenInside(code) {
2373
+ if (code === codes.dash) {
2374
+ effects.consume(code);
2375
+ return commentEnd;
2376
+ }
2377
+ return nok(code);
2378
+ }
2379
+ function comment(code) {
2380
+ if (code === codes.eof) {
2381
+ return nok(code);
2382
+ }
2383
+ if (code === codes.dash) {
2384
+ effects.consume(code);
2385
+ return commentClose;
2386
+ }
2387
+ if (markdownLineEnding(code)) {
2388
+ returnState = comment;
2389
+ return lineEndingBefore(code);
2390
+ }
2391
+ effects.consume(code);
2392
+ return comment;
2393
+ }
2394
+ function commentClose(code) {
2395
+ if (code === codes.dash) {
2396
+ effects.consume(code);
2397
+ return commentEnd;
2398
+ }
2399
+ return comment(code);
2400
+ }
2401
+ function commentEnd(code) {
2402
+ return code === codes.greaterThan ? end(code) : code === codes.dash ? commentClose(code) : comment(code);
2403
+ }
2404
+ function cdataOpenInside(code) {
2405
+ const value = constants.cdataOpeningString;
2406
+ if (code === value.charCodeAt(index++)) {
2407
+ effects.consume(code);
2408
+ return index === value.length ? cdata : cdataOpenInside;
2409
+ }
2410
+ return nok(code);
2411
+ }
2412
+ function cdata(code) {
2413
+ if (code === codes.eof) {
2414
+ return nok(code);
2415
+ }
2416
+ if (code === codes.rightSquareBracket) {
2417
+ effects.consume(code);
2418
+ return cdataClose;
2419
+ }
2420
+ if (markdownLineEnding(code)) {
2421
+ returnState = cdata;
2422
+ return lineEndingBefore(code);
2423
+ }
2424
+ effects.consume(code);
2425
+ return cdata;
2426
+ }
2427
+ function cdataClose(code) {
2428
+ if (code === codes.rightSquareBracket) {
2429
+ effects.consume(code);
2430
+ return cdataEnd;
2431
+ }
2432
+ return cdata(code);
2433
+ }
2434
+ function cdataEnd(code) {
2435
+ if (code === codes.greaterThan) {
2436
+ return end(code);
2437
+ }
2438
+ if (code === codes.rightSquareBracket) {
2439
+ effects.consume(code);
2440
+ return cdataEnd;
2441
+ }
2442
+ return cdata(code);
2443
+ }
2444
+ function declaration(code) {
2445
+ if (code === codes.eof || code === codes.greaterThan) {
2446
+ return end(code);
2447
+ }
2448
+ if (markdownLineEnding(code)) {
2449
+ returnState = declaration;
2450
+ return lineEndingBefore(code);
2451
+ }
2452
+ effects.consume(code);
2453
+ return declaration;
2454
+ }
2455
+ function instruction(code) {
2456
+ if (code === codes.eof) {
2457
+ return nok(code);
2458
+ }
2459
+ if (code === codes.questionMark) {
2460
+ effects.consume(code);
2461
+ return instructionClose;
2462
+ }
2463
+ if (markdownLineEnding(code)) {
2464
+ returnState = instruction;
2465
+ return lineEndingBefore(code);
2466
+ }
2467
+ effects.consume(code);
2468
+ return instruction;
2469
+ }
2470
+ function instructionClose(code) {
2471
+ return code === codes.greaterThan ? end(code) : instruction(code);
2472
+ }
2473
+ function tagCloseStart(code) {
2474
+ if (asciiAlpha(code)) {
2475
+ effects.consume(code);
2476
+ return tagClose;
2477
+ }
2478
+ return nok(code);
2479
+ }
2480
+ function tagClose(code) {
2481
+ if (code === codes.dash || asciiAlphanumeric(code)) {
2482
+ effects.consume(code);
2483
+ return tagClose;
2484
+ }
2485
+ return tagCloseBetween(code);
2486
+ }
2487
+ function tagCloseBetween(code) {
2488
+ if (markdownLineEnding(code)) {
2489
+ returnState = tagCloseBetween;
2490
+ return lineEndingBefore(code);
2491
+ }
2492
+ if (markdownSpace(code)) {
2493
+ effects.consume(code);
2494
+ return tagCloseBetween;
2495
+ }
2496
+ return end(code);
2497
+ }
2498
+ function tagOpen(code) {
2499
+ if (code === codes.dash || asciiAlphanumeric(code)) {
2500
+ effects.consume(code);
2501
+ return tagOpen;
2502
+ }
2503
+ if (code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) {
2504
+ return tagOpenBetween(code);
2505
+ }
2506
+ return nok(code);
2507
+ }
2508
+ function tagOpenBetween(code) {
2509
+ if (code === codes.slash) {
2510
+ effects.consume(code);
2511
+ return end;
2512
+ }
2513
+ if (code === codes.colon || code === codes.underscore || asciiAlpha(code)) {
2514
+ effects.consume(code);
2515
+ return tagOpenAttributeName;
2516
+ }
2517
+ if (markdownLineEnding(code)) {
2518
+ returnState = tagOpenBetween;
2519
+ return lineEndingBefore(code);
2520
+ }
2521
+ if (markdownSpace(code)) {
2522
+ effects.consume(code);
2523
+ return tagOpenBetween;
2524
+ }
2525
+ return end(code);
2526
+ }
2527
+ function tagOpenAttributeName(code) {
2528
+ if (code === codes.dash || code === codes.dot || code === codes.colon || code === codes.underscore || asciiAlphanumeric(code)) {
2529
+ effects.consume(code);
2530
+ return tagOpenAttributeName;
2531
+ }
2532
+ return tagOpenAttributeNameAfter(code);
2533
+ }
2534
+ function tagOpenAttributeNameAfter(code) {
2535
+ if (code === codes.equalsTo) {
2536
+ effects.consume(code);
2537
+ return tagOpenAttributeValueBefore;
2538
+ }
2539
+ if (markdownLineEnding(code)) {
2540
+ returnState = tagOpenAttributeNameAfter;
2541
+ return lineEndingBefore(code);
2542
+ }
2543
+ if (markdownSpace(code)) {
2544
+ effects.consume(code);
2545
+ return tagOpenAttributeNameAfter;
2546
+ }
2547
+ return tagOpenBetween(code);
2548
+ }
2549
+ function tagOpenAttributeValueBefore(code) {
2550
+ if (code === codes.eof || code === codes.lessThan || code === codes.equalsTo || code === codes.greaterThan || code === codes.graveAccent) {
2551
+ return nok(code);
2552
+ }
2553
+ if (code === codes.quotationMark || code === codes.apostrophe) {
2554
+ effects.consume(code);
2555
+ marker = code;
2556
+ return tagOpenAttributeValueQuoted;
2557
+ }
2558
+ if (markdownLineEnding(code)) {
2559
+ returnState = tagOpenAttributeValueBefore;
2560
+ return lineEndingBefore(code);
2561
+ }
2562
+ if (markdownSpace(code)) {
2563
+ effects.consume(code);
2564
+ return tagOpenAttributeValueBefore;
2565
+ }
2566
+ effects.consume(code);
2567
+ return tagOpenAttributeValueUnquoted;
2568
+ }
2569
+ function tagOpenAttributeValueQuoted(code) {
2570
+ if (code === marker) {
2571
+ effects.consume(code);
2572
+ marker = void 0;
2573
+ return tagOpenAttributeValueQuotedAfter;
2574
+ }
2575
+ if (code === codes.eof) {
2576
+ return nok(code);
2577
+ }
2578
+ if (markdownLineEnding(code)) {
2579
+ returnState = tagOpenAttributeValueQuoted;
2580
+ return lineEndingBefore(code);
2581
+ }
2582
+ effects.consume(code);
2583
+ return tagOpenAttributeValueQuoted;
2584
+ }
2585
+ function tagOpenAttributeValueUnquoted(code) {
2586
+ if (code === codes.eof || code === codes.quotationMark || code === codes.apostrophe || code === codes.lessThan || code === codes.equalsTo || code === codes.graveAccent) {
2587
+ return nok(code);
2588
+ }
2589
+ if (code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) {
2590
+ return tagOpenBetween(code);
2591
+ }
2592
+ effects.consume(code);
2593
+ return tagOpenAttributeValueUnquoted;
2594
+ }
2595
+ function tagOpenAttributeValueQuotedAfter(code) {
2596
+ if (code === codes.slash || code === codes.greaterThan || markdownLineEndingOrSpace(code)) {
2597
+ return tagOpenBetween(code);
2598
+ }
2599
+ return nok(code);
2600
+ }
2601
+ function end(code) {
2602
+ if (code === codes.greaterThan) {
2603
+ effects.consume(code);
2604
+ effects.exit(types.htmlTextData);
2605
+ effects.exit(types.htmlText);
2606
+ return ok2;
2607
+ }
2608
+ return nok(code);
2609
+ }
2610
+ function lineEndingBefore(code) {
2611
+ ok(returnState, "expected return state");
2612
+ ok(markdownLineEnding(code), "expected eol");
2613
+ effects.exit(types.htmlTextData);
2614
+ effects.enter(types.lineEnding);
2615
+ effects.consume(code);
2616
+ effects.exit(types.lineEnding);
2617
+ return lineEndingAfter;
2618
+ }
2619
+ function lineEndingAfter(code) {
2620
+ ok(
2621
+ self.parser.constructs.disable.null,
2622
+ "expected `disable.null` to be populated"
2623
+ );
2624
+ return markdownSpace(code) ? factorySpace(
2625
+ effects,
2626
+ lineEndingAfterPrefix,
2627
+ types.linePrefix,
2628
+ self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize
2629
+ )(code) : lineEndingAfterPrefix(code);
2630
+ }
2631
+ function lineEndingAfterPrefix(code) {
2632
+ effects.enter(types.htmlTextData);
2633
+ return returnState(code);
2634
+ }
2635
+ }
2636
+
2637
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/label-end.js
2638
+ var labelEnd = {
2639
+ name: "labelEnd",
2640
+ resolveAll: resolveAllLabelEnd,
2641
+ resolveTo: resolveToLabelEnd,
2642
+ tokenize: tokenizeLabelEnd
2643
+ };
2644
+ var resourceConstruct = { tokenize: tokenizeResource };
2645
+ var referenceFullConstruct = { tokenize: tokenizeReferenceFull };
2646
+ var referenceCollapsedConstruct = { tokenize: tokenizeReferenceCollapsed };
2647
+ function resolveAllLabelEnd(events) {
2648
+ let index = -1;
2649
+ const newEvents = [];
2650
+ while (++index < events.length) {
2651
+ const token = events[index][1];
2652
+ newEvents.push(events[index]);
2653
+ if (token.type === types.labelImage || token.type === types.labelLink || token.type === types.labelEnd) {
2654
+ const offset = token.type === types.labelImage ? 4 : 2;
2655
+ token.type = types.data;
2656
+ index += offset;
2657
+ }
2658
+ }
2659
+ if (events.length !== newEvents.length) {
2660
+ splice(events, 0, events.length, newEvents);
2661
+ }
2662
+ return events;
2663
+ }
2664
+ function resolveToLabelEnd(events, context) {
2665
+ let index = events.length;
2666
+ let offset = 0;
2667
+ let token;
2668
+ let open;
2669
+ let close;
2670
+ let media;
2671
+ while (index--) {
2672
+ token = events[index][1];
2673
+ if (open) {
2674
+ if (token.type === types.link || token.type === types.labelLink && token._inactive) {
2675
+ break;
2676
+ }
2677
+ if (events[index][0] === "enter" && token.type === types.labelLink) {
2678
+ token._inactive = true;
2679
+ }
2680
+ } else if (close) {
2681
+ if (events[index][0] === "enter" && (token.type === types.labelImage || token.type === types.labelLink) && !token._balanced) {
2682
+ open = index;
2683
+ if (token.type !== types.labelLink) {
2684
+ offset = 2;
2685
+ break;
2686
+ }
2687
+ }
2688
+ } else if (token.type === types.labelEnd) {
2689
+ close = index;
2690
+ }
2691
+ }
2692
+ ok(open !== void 0, "`open` is supposed to be found");
2693
+ ok(close !== void 0, "`close` is supposed to be found");
2694
+ const group = {
2695
+ type: events[open][1].type === types.labelLink ? types.link : types.image,
2696
+ start: { ...events[open][1].start },
2697
+ end: { ...events[events.length - 1][1].end }
2698
+ };
2699
+ const label = {
2700
+ type: types.label,
2701
+ start: { ...events[open][1].start },
2702
+ end: { ...events[close][1].end }
2703
+ };
2704
+ const text = {
2705
+ type: types.labelText,
2706
+ start: { ...events[open + offset + 2][1].end },
2707
+ end: { ...events[close - 2][1].start }
2708
+ };
2709
+ media = [
2710
+ ["enter", group, context],
2711
+ ["enter", label, context]
2712
+ ];
2713
+ media = push(media, events.slice(open + 1, open + offset + 3));
2714
+ media = push(media, [["enter", text, context]]);
2715
+ ok(
2716
+ context.parser.constructs.insideSpan.null,
2717
+ "expected `insideSpan.null` to be populated"
2718
+ );
2719
+ media = push(
2720
+ media,
2721
+ resolveAll(
2722
+ context.parser.constructs.insideSpan.null,
2723
+ events.slice(open + offset + 4, close - 3),
2724
+ context
2725
+ )
2726
+ );
2727
+ media = push(media, [
2728
+ ["exit", text, context],
2729
+ events[close - 2],
2730
+ events[close - 1],
2731
+ ["exit", label, context]
2732
+ ]);
2733
+ media = push(media, events.slice(close + 1));
2734
+ media = push(media, [["exit", group, context]]);
2735
+ splice(events, open, events.length, media);
2736
+ return events;
2737
+ }
2738
+ function tokenizeLabelEnd(effects, ok2, nok) {
2739
+ const self = this;
2740
+ let index = self.events.length;
2741
+ let labelStart;
2742
+ let defined;
2743
+ while (index--) {
2744
+ if ((self.events[index][1].type === types.labelImage || self.events[index][1].type === types.labelLink) && !self.events[index][1]._balanced) {
2745
+ labelStart = self.events[index][1];
2746
+ break;
2747
+ }
2748
+ }
2749
+ return start;
2750
+ function start(code) {
2751
+ ok(code === codes.rightSquareBracket, "expected `]`");
2752
+ if (!labelStart) {
2753
+ return nok(code);
2754
+ }
2755
+ if (labelStart._inactive) {
2756
+ return labelEndNok(code);
2757
+ }
2758
+ defined = self.parser.defined.includes(
2759
+ normalizeIdentifier(
2760
+ self.sliceSerialize({ start: labelStart.end, end: self.now() })
2761
+ )
2762
+ );
2763
+ effects.enter(types.labelEnd);
2764
+ effects.enter(types.labelMarker);
2765
+ effects.consume(code);
2766
+ effects.exit(types.labelMarker);
2767
+ effects.exit(types.labelEnd);
2768
+ return after;
2769
+ }
2770
+ function after(code) {
2771
+ if (code === codes.leftParenthesis) {
2772
+ return effects.attempt(
2773
+ resourceConstruct,
2774
+ labelEndOk,
2775
+ defined ? labelEndOk : labelEndNok
2776
+ )(code);
2777
+ }
2778
+ if (code === codes.leftSquareBracket) {
2779
+ return effects.attempt(
2780
+ referenceFullConstruct,
2781
+ labelEndOk,
2782
+ defined ? referenceNotFull : labelEndNok
2783
+ )(code);
2784
+ }
2785
+ return defined ? labelEndOk(code) : labelEndNok(code);
2786
+ }
2787
+ function referenceNotFull(code) {
2788
+ return effects.attempt(
2789
+ referenceCollapsedConstruct,
2790
+ labelEndOk,
2791
+ labelEndNok
2792
+ )(code);
2793
+ }
2794
+ function labelEndOk(code) {
2795
+ return ok2(code);
2796
+ }
2797
+ function labelEndNok(code) {
2798
+ labelStart._balanced = true;
2799
+ return nok(code);
2800
+ }
2801
+ }
2802
+ function tokenizeResource(effects, ok2, nok) {
2803
+ return resourceStart;
2804
+ function resourceStart(code) {
2805
+ ok(code === codes.leftParenthesis, "expected left paren");
2806
+ effects.enter(types.resource);
2807
+ effects.enter(types.resourceMarker);
2808
+ effects.consume(code);
2809
+ effects.exit(types.resourceMarker);
2810
+ return resourceBefore;
2811
+ }
2812
+ function resourceBefore(code) {
2813
+ return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceOpen)(code) : resourceOpen(code);
2814
+ }
2815
+ function resourceOpen(code) {
2816
+ if (code === codes.rightParenthesis) {
2817
+ return resourceEnd(code);
2818
+ }
2819
+ return factoryDestination(
2820
+ effects,
2821
+ resourceDestinationAfter,
2822
+ resourceDestinationMissing,
2823
+ types.resourceDestination,
2824
+ types.resourceDestinationLiteral,
2825
+ types.resourceDestinationLiteralMarker,
2826
+ types.resourceDestinationRaw,
2827
+ types.resourceDestinationString,
2828
+ constants.linkResourceDestinationBalanceMax
2829
+ )(code);
2830
+ }
2831
+ function resourceDestinationAfter(code) {
2832
+ return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceBetween)(code) : resourceEnd(code);
2833
+ }
2834
+ function resourceDestinationMissing(code) {
2835
+ return nok(code);
2836
+ }
2837
+ function resourceBetween(code) {
2838
+ if (code === codes.quotationMark || code === codes.apostrophe || code === codes.leftParenthesis) {
2839
+ return factoryTitle(
2840
+ effects,
2841
+ resourceTitleAfter,
2842
+ nok,
2843
+ types.resourceTitle,
2844
+ types.resourceTitleMarker,
2845
+ types.resourceTitleString
2846
+ )(code);
2847
+ }
2848
+ return resourceEnd(code);
2849
+ }
2850
+ function resourceTitleAfter(code) {
2851
+ return markdownLineEndingOrSpace(code) ? factoryWhitespace(effects, resourceEnd)(code) : resourceEnd(code);
2852
+ }
2853
+ function resourceEnd(code) {
2854
+ if (code === codes.rightParenthesis) {
2855
+ effects.enter(types.resourceMarker);
2856
+ effects.consume(code);
2857
+ effects.exit(types.resourceMarker);
2858
+ effects.exit(types.resource);
2859
+ return ok2;
2860
+ }
2861
+ return nok(code);
2862
+ }
2863
+ }
2864
+ function tokenizeReferenceFull(effects, ok2, nok) {
2865
+ const self = this;
2866
+ return referenceFull;
2867
+ function referenceFull(code) {
2868
+ ok(code === codes.leftSquareBracket, "expected left bracket");
2869
+ return factoryLabel.call(
2870
+ self,
2871
+ effects,
2872
+ referenceFullAfter,
2873
+ referenceFullMissing,
2874
+ types.reference,
2875
+ types.referenceMarker,
2876
+ types.referenceString
2877
+ )(code);
2878
+ }
2879
+ function referenceFullAfter(code) {
2880
+ return self.parser.defined.includes(
2881
+ normalizeIdentifier(
2882
+ self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
2883
+ )
2884
+ ) ? ok2(code) : nok(code);
2885
+ }
2886
+ function referenceFullMissing(code) {
2887
+ return nok(code);
2888
+ }
2889
+ }
2890
+ function tokenizeReferenceCollapsed(effects, ok2, nok) {
2891
+ return referenceCollapsedStart;
2892
+ function referenceCollapsedStart(code) {
2893
+ ok(code === codes.leftSquareBracket, "expected left bracket");
2894
+ effects.enter(types.reference);
2895
+ effects.enter(types.referenceMarker);
2896
+ effects.consume(code);
2897
+ effects.exit(types.referenceMarker);
2898
+ return referenceCollapsedOpen;
2899
+ }
2900
+ function referenceCollapsedOpen(code) {
2901
+ if (code === codes.rightSquareBracket) {
2902
+ effects.enter(types.referenceMarker);
2903
+ effects.consume(code);
2904
+ effects.exit(types.referenceMarker);
2905
+ effects.exit(types.reference);
2906
+ return ok2;
2907
+ }
2908
+ return nok(code);
2909
+ }
2910
+ }
2911
+
2912
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/label-start-image.js
2913
+ var labelStartImage = {
2914
+ name: "labelStartImage",
2915
+ resolveAll: labelEnd.resolveAll,
2916
+ tokenize: tokenizeLabelStartImage
2917
+ };
2918
+ function tokenizeLabelStartImage(effects, ok2, nok) {
2919
+ const self = this;
2920
+ return start;
2921
+ function start(code) {
2922
+ ok(code === codes.exclamationMark, "expected `!`");
2923
+ effects.enter(types.labelImage);
2924
+ effects.enter(types.labelImageMarker);
2925
+ effects.consume(code);
2926
+ effects.exit(types.labelImageMarker);
2927
+ return open;
2928
+ }
2929
+ function open(code) {
2930
+ if (code === codes.leftSquareBracket) {
2931
+ effects.enter(types.labelMarker);
2932
+ effects.consume(code);
2933
+ effects.exit(types.labelMarker);
2934
+ effects.exit(types.labelImage);
2935
+ return after;
2936
+ }
2937
+ return nok(code);
2938
+ }
2939
+ function after(code) {
2940
+ return code === codes.caret && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok2(code);
2941
+ }
2942
+ }
2943
+
2944
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/label-start-link.js
2945
+ var labelStartLink = {
2946
+ name: "labelStartLink",
2947
+ resolveAll: labelEnd.resolveAll,
2948
+ tokenize: tokenizeLabelStartLink
2949
+ };
2950
+ function tokenizeLabelStartLink(effects, ok2, nok) {
2951
+ const self = this;
2952
+ return start;
2953
+ function start(code) {
2954
+ ok(code === codes.leftSquareBracket, "expected `[`");
2955
+ effects.enter(types.labelLink);
2956
+ effects.enter(types.labelMarker);
2957
+ effects.consume(code);
2958
+ effects.exit(types.labelMarker);
2959
+ effects.exit(types.labelLink);
2960
+ return after;
2961
+ }
2962
+ function after(code) {
2963
+ return code === codes.caret && "_hiddenFootnoteSupport" in self.parser.constructs ? nok(code) : ok2(code);
2964
+ }
2965
+ }
2966
+
2967
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/line-ending.js
2968
+ var lineEnding = { name: "lineEnding", tokenize: tokenizeLineEnding };
2969
+ function tokenizeLineEnding(effects, ok2) {
2970
+ return start;
2971
+ function start(code) {
2972
+ ok(markdownLineEnding(code), "expected eol");
2973
+ effects.enter(types.lineEnding);
2974
+ effects.consume(code);
2975
+ effects.exit(types.lineEnding);
2976
+ return factorySpace(effects, ok2, types.linePrefix);
2977
+ }
2978
+ }
2979
+
2980
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/thematic-break.js
2981
+ var thematicBreak = {
2982
+ name: "thematicBreak",
2983
+ tokenize: tokenizeThematicBreak
2984
+ };
2985
+ function tokenizeThematicBreak(effects, ok2, nok) {
2986
+ let size = 0;
2987
+ let marker;
2988
+ return start;
2989
+ function start(code) {
2990
+ effects.enter(types.thematicBreak);
2991
+ return before(code);
2992
+ }
2993
+ function before(code) {
2994
+ ok(
2995
+ code === codes.asterisk || code === codes.dash || code === codes.underscore,
2996
+ "expected `*`, `-`, or `_`"
2997
+ );
2998
+ marker = code;
2999
+ return atBreak(code);
3000
+ }
3001
+ function atBreak(code) {
3002
+ if (code === marker) {
3003
+ effects.enter(types.thematicBreakSequence);
3004
+ return sequence(code);
3005
+ }
3006
+ if (size >= constants.thematicBreakMarkerCountMin && (code === codes.eof || markdownLineEnding(code))) {
3007
+ effects.exit(types.thematicBreak);
3008
+ return ok2(code);
3009
+ }
3010
+ return nok(code);
3011
+ }
3012
+ function sequence(code) {
3013
+ if (code === marker) {
3014
+ effects.consume(code);
3015
+ size++;
3016
+ return sequence;
3017
+ }
3018
+ effects.exit(types.thematicBreakSequence);
3019
+ return markdownSpace(code) ? factorySpace(effects, atBreak, types.whitespace)(code) : atBreak(code);
3020
+ }
3021
+ }
3022
+
3023
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/list.js
3024
+ var list = {
3025
+ continuation: { tokenize: tokenizeListContinuation },
3026
+ exit: tokenizeListEnd,
3027
+ name: "list",
3028
+ tokenize: tokenizeListStart
3029
+ };
3030
+ var listItemPrefixWhitespaceConstruct = {
3031
+ partial: true,
3032
+ tokenize: tokenizeListItemPrefixWhitespace
3033
+ };
3034
+ var indentConstruct = { partial: true, tokenize: tokenizeIndent };
3035
+ function tokenizeListStart(effects, ok2, nok) {
3036
+ const self = this;
3037
+ const tail = self.events[self.events.length - 1];
3038
+ let initialSize = tail && tail[1].type === types.linePrefix ? tail[2].sliceSerialize(tail[1], true).length : 0;
3039
+ let size = 0;
3040
+ return start;
3041
+ function start(code) {
3042
+ ok(self.containerState, "expected state");
3043
+ const kind = self.containerState.type || (code === codes.asterisk || code === codes.plusSign || code === codes.dash ? types.listUnordered : types.listOrdered);
3044
+ if (kind === types.listUnordered ? !self.containerState.marker || code === self.containerState.marker : asciiDigit(code)) {
3045
+ if (!self.containerState.type) {
3046
+ self.containerState.type = kind;
3047
+ effects.enter(kind, { _container: true });
3048
+ }
3049
+ if (kind === types.listUnordered) {
3050
+ effects.enter(types.listItemPrefix);
3051
+ return code === codes.asterisk || code === codes.dash ? effects.check(thematicBreak, nok, atMarker)(code) : atMarker(code);
3052
+ }
3053
+ if (!self.interrupt || code === codes.digit1) {
3054
+ effects.enter(types.listItemPrefix);
3055
+ effects.enter(types.listItemValue);
3056
+ return inside(code);
3057
+ }
3058
+ }
3059
+ return nok(code);
3060
+ }
3061
+ function inside(code) {
3062
+ ok(self.containerState, "expected state");
3063
+ if (asciiDigit(code) && ++size < constants.listItemValueSizeMax) {
3064
+ effects.consume(code);
3065
+ return inside;
3066
+ }
3067
+ if ((!self.interrupt || size < 2) && (self.containerState.marker ? code === self.containerState.marker : code === codes.rightParenthesis || code === codes.dot)) {
3068
+ effects.exit(types.listItemValue);
3069
+ return atMarker(code);
3070
+ }
3071
+ return nok(code);
3072
+ }
3073
+ function atMarker(code) {
3074
+ ok(self.containerState, "expected state");
3075
+ ok(code !== codes.eof, "eof (`null`) is not a marker");
3076
+ effects.enter(types.listItemMarker);
3077
+ effects.consume(code);
3078
+ effects.exit(types.listItemMarker);
3079
+ self.containerState.marker = self.containerState.marker || code;
3080
+ return effects.check(
3081
+ blankLine,
3082
+ // Can’t be empty when interrupting.
3083
+ self.interrupt ? nok : onBlank,
3084
+ effects.attempt(
3085
+ listItemPrefixWhitespaceConstruct,
3086
+ endOfPrefix,
3087
+ otherPrefix
3088
+ )
3089
+ );
3090
+ }
3091
+ function onBlank(code) {
3092
+ ok(self.containerState, "expected state");
3093
+ self.containerState.initialBlankLine = true;
3094
+ initialSize++;
3095
+ return endOfPrefix(code);
3096
+ }
3097
+ function otherPrefix(code) {
3098
+ if (markdownSpace(code)) {
3099
+ effects.enter(types.listItemPrefixWhitespace);
3100
+ effects.consume(code);
3101
+ effects.exit(types.listItemPrefixWhitespace);
3102
+ return endOfPrefix;
3103
+ }
3104
+ return nok(code);
3105
+ }
3106
+ function endOfPrefix(code) {
3107
+ ok(self.containerState, "expected state");
3108
+ self.containerState.size = initialSize + self.sliceSerialize(effects.exit(types.listItemPrefix), true).length;
3109
+ return ok2(code);
3110
+ }
3111
+ }
3112
+ function tokenizeListContinuation(effects, ok2, nok) {
3113
+ const self = this;
3114
+ ok(self.containerState, "expected state");
3115
+ self.containerState._closeFlow = void 0;
3116
+ return effects.check(blankLine, onBlank, notBlank);
3117
+ function onBlank(code) {
3118
+ ok(self.containerState, "expected state");
3119
+ ok(typeof self.containerState.size === "number", "expected size");
3120
+ self.containerState.furtherBlankLines = self.containerState.furtherBlankLines || self.containerState.initialBlankLine;
3121
+ return factorySpace(
3122
+ effects,
3123
+ ok2,
3124
+ types.listItemIndent,
3125
+ self.containerState.size + 1
3126
+ )(code);
3127
+ }
3128
+ function notBlank(code) {
3129
+ ok(self.containerState, "expected state");
3130
+ if (self.containerState.furtherBlankLines || !markdownSpace(code)) {
3131
+ self.containerState.furtherBlankLines = void 0;
3132
+ self.containerState.initialBlankLine = void 0;
3133
+ return notInCurrentItem(code);
3134
+ }
3135
+ self.containerState.furtherBlankLines = void 0;
3136
+ self.containerState.initialBlankLine = void 0;
3137
+ return effects.attempt(indentConstruct, ok2, notInCurrentItem)(code);
3138
+ }
3139
+ function notInCurrentItem(code) {
3140
+ ok(self.containerState, "expected state");
3141
+ self.containerState._closeFlow = true;
3142
+ self.interrupt = void 0;
3143
+ ok(
3144
+ self.parser.constructs.disable.null,
3145
+ "expected `disable.null` to be populated"
3146
+ );
3147
+ return factorySpace(
3148
+ effects,
3149
+ effects.attempt(list, ok2, nok),
3150
+ types.linePrefix,
3151
+ self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize
3152
+ )(code);
3153
+ }
3154
+ }
3155
+ function tokenizeIndent(effects, ok2, nok) {
3156
+ const self = this;
3157
+ ok(self.containerState, "expected state");
3158
+ ok(typeof self.containerState.size === "number", "expected size");
3159
+ return factorySpace(
3160
+ effects,
3161
+ afterPrefix,
3162
+ types.listItemIndent,
3163
+ self.containerState.size + 1
3164
+ );
3165
+ function afterPrefix(code) {
3166
+ ok(self.containerState, "expected state");
3167
+ const tail = self.events[self.events.length - 1];
3168
+ return tail && tail[1].type === types.listItemIndent && tail[2].sliceSerialize(tail[1], true).length === self.containerState.size ? ok2(code) : nok(code);
3169
+ }
3170
+ }
3171
+ function tokenizeListEnd(effects) {
3172
+ ok(this.containerState, "expected state");
3173
+ ok(typeof this.containerState.type === "string", "expected type");
3174
+ effects.exit(this.containerState.type);
3175
+ }
3176
+ function tokenizeListItemPrefixWhitespace(effects, ok2, nok) {
3177
+ const self = this;
3178
+ ok(
3179
+ self.parser.constructs.disable.null,
3180
+ "expected `disable.null` to be populated"
3181
+ );
3182
+ return factorySpace(
3183
+ effects,
3184
+ afterPrefix,
3185
+ types.listItemPrefixWhitespace,
3186
+ self.parser.constructs.disable.null.includes("codeIndented") ? void 0 : constants.tabSize + 1
3187
+ );
3188
+ function afterPrefix(code) {
3189
+ const tail = self.events[self.events.length - 1];
3190
+ return !markdownSpace(code) && tail && tail[1].type === types.listItemPrefixWhitespace ? ok2(code) : nok(code);
3191
+ }
3192
+ }
3193
+
3194
+ // ../node_modules/.pnpm/micromark-core-commonmark@2.0.2/node_modules/micromark-core-commonmark/dev/lib/setext-underline.js
3195
+ var setextUnderline = {
3196
+ name: "setextUnderline",
3197
+ resolveTo: resolveToSetextUnderline,
3198
+ tokenize: tokenizeSetextUnderline
3199
+ };
3200
+ function resolveToSetextUnderline(events, context) {
3201
+ let index = events.length;
3202
+ let content2;
3203
+ let text;
3204
+ let definition2;
3205
+ while (index--) {
3206
+ if (events[index][0] === "enter") {
3207
+ if (events[index][1].type === types.content) {
3208
+ content2 = index;
3209
+ break;
3210
+ }
3211
+ if (events[index][1].type === types.paragraph) {
3212
+ text = index;
3213
+ }
3214
+ } else {
3215
+ if (events[index][1].type === types.content) {
3216
+ events.splice(index, 1);
3217
+ }
3218
+ if (!definition2 && events[index][1].type === types.definition) {
3219
+ definition2 = index;
3220
+ }
3221
+ }
3222
+ }
3223
+ ok(text !== void 0, "expected a `text` index to be found");
3224
+ ok(content2 !== void 0, "expected a `text` index to be found");
3225
+ const heading = {
3226
+ type: types.setextHeading,
3227
+ start: { ...events[text][1].start },
3228
+ end: { ...events[events.length - 1][1].end }
3229
+ };
3230
+ events[text][1].type = types.setextHeadingText;
3231
+ if (definition2) {
3232
+ events.splice(text, 0, ["enter", heading, context]);
3233
+ events.splice(definition2 + 1, 0, ["exit", events[content2][1], context]);
3234
+ events[content2][1].end = { ...events[definition2][1].end };
3235
+ } else {
3236
+ events[content2][1] = heading;
3237
+ }
3238
+ events.push(["exit", heading, context]);
3239
+ return events;
3240
+ }
3241
+ function tokenizeSetextUnderline(effects, ok2, nok) {
3242
+ const self = this;
3243
+ let marker;
3244
+ return start;
3245
+ function start(code) {
3246
+ let index = self.events.length;
3247
+ let paragraph;
3248
+ ok(
3249
+ code === codes.dash || code === codes.equalsTo,
3250
+ "expected `=` or `-`"
3251
+ );
3252
+ while (index--) {
3253
+ if (self.events[index][1].type !== types.lineEnding && self.events[index][1].type !== types.linePrefix && self.events[index][1].type !== types.content) {
3254
+ paragraph = self.events[index][1].type === types.paragraph;
3255
+ break;
3256
+ }
3257
+ }
3258
+ if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {
3259
+ effects.enter(types.setextHeadingLine);
3260
+ marker = code;
3261
+ return before(code);
3262
+ }
3263
+ return nok(code);
3264
+ }
3265
+ function before(code) {
3266
+ effects.enter(types.setextHeadingLineSequence);
3267
+ return inside(code);
3268
+ }
3269
+ function inside(code) {
3270
+ if (code === marker) {
3271
+ effects.consume(code);
3272
+ return inside;
3273
+ }
3274
+ effects.exit(types.setextHeadingLineSequence);
3275
+ return markdownSpace(code) ? factorySpace(effects, after, types.lineSuffix)(code) : after(code);
3276
+ }
3277
+ function after(code) {
3278
+ if (code === codes.eof || markdownLineEnding(code)) {
3279
+ effects.exit(types.setextHeadingLine);
3280
+ return ok2(code);
3281
+ }
3282
+ return nok(code);
3283
+ }
3284
+ }
3285
+
3286
+ // ../node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.js
3287
+ var emptyOptions = {};
3288
+ function toString(value, options) {
3289
+ const settings = options || emptyOptions;
3290
+ const includeImageAlt = typeof settings.includeImageAlt === "boolean" ? settings.includeImageAlt : true;
3291
+ const includeHtml = typeof settings.includeHtml === "boolean" ? settings.includeHtml : true;
3292
+ return one(value, includeImageAlt, includeHtml);
3293
+ }
3294
+ function one(value, includeImageAlt, includeHtml) {
3295
+ if (node(value)) {
3296
+ if ("value" in value) {
3297
+ return value.type === "html" && !includeHtml ? "" : value.value;
3298
+ }
3299
+ if (includeImageAlt && "alt" in value && value.alt) {
3300
+ return value.alt;
3301
+ }
3302
+ if ("children" in value) {
3303
+ return all(value.children, includeImageAlt, includeHtml);
3304
+ }
3305
+ }
3306
+ if (Array.isArray(value)) {
3307
+ return all(value, includeImageAlt, includeHtml);
3308
+ }
3309
+ return "";
3310
+ }
3311
+ function all(values2, includeImageAlt, includeHtml) {
3312
+ const result = [];
3313
+ let index = -1;
3314
+ while (++index < values2.length) {
3315
+ result[index] = one(values2[index], includeImageAlt, includeHtml);
3316
+ }
3317
+ return result.join("");
3318
+ }
3319
+ function node(value) {
3320
+ return Boolean(value && typeof value === "object");
3321
+ }
3322
+
3323
+ // ../node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/dev/index.js
3324
+ function decodeNumericCharacterReference(value, base) {
3325
+ const code = Number.parseInt(value, base);
3326
+ if (
3327
+ // C0 except for HT, LF, FF, CR, space.
3328
+ code < codes.ht || code === codes.vt || code > codes.cr && code < codes.space || // Control character (DEL) of C0, and C1 controls.
3329
+ code > codes.tilde && code < 160 || // Lone high surrogates and low surrogates.
3330
+ code > 55295 && code < 57344 || // Noncharacters.
3331
+ code > 64975 && code < 65008 || /* eslint-disable no-bitwise */
3332
+ (code & 65535) === 65535 || (code & 65535) === 65534 || /* eslint-enable no-bitwise */
3333
+ // Out of range
3334
+ code > 1114111
3335
+ ) {
3336
+ return values.replacementCharacter;
3337
+ }
3338
+ return String.fromCodePoint(code);
3339
+ }
3340
+
3341
+ // ../node_modules/.pnpm/micromark-util-sanitize-uri@2.0.1/node_modules/micromark-util-sanitize-uri/dev/index.js
3342
+ function normalizeUri(value) {
3343
+ const result = [];
3344
+ let index = -1;
3345
+ let start = 0;
3346
+ let skip = 0;
3347
+ while (++index < value.length) {
3348
+ const code = value.charCodeAt(index);
3349
+ let replace = "";
3350
+ if (code === codes.percentSign && asciiAlphanumeric(value.charCodeAt(index + 1)) && asciiAlphanumeric(value.charCodeAt(index + 2))) {
3351
+ skip = 2;
3352
+ } else if (code < 128) {
3353
+ if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {
3354
+ replace = String.fromCharCode(code);
3355
+ }
3356
+ } else if (code > 55295 && code < 57344) {
3357
+ const next = value.charCodeAt(index + 1);
3358
+ if (code < 56320 && next > 56319 && next < 57344) {
3359
+ replace = String.fromCharCode(code, next);
3360
+ skip = 1;
3361
+ } else {
3362
+ replace = values.replacementCharacter;
3363
+ }
3364
+ } else {
3365
+ replace = String.fromCharCode(code);
3366
+ }
3367
+ if (replace) {
3368
+ result.push(value.slice(start, index), encodeURIComponent(replace));
3369
+ start = index + skip + 1;
3370
+ replace = "";
3371
+ }
3372
+ if (skip) {
3373
+ index += skip;
3374
+ skip = 0;
3375
+ }
3376
+ }
3377
+ return result.join("") + value.slice(start);
3378
+ }
3379
+
3380
+ // ../node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/dev/index.js
3381
+ var characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
3382
+ function decodeString(value) {
3383
+ return value.replace(characterEscapeOrReference, decode);
3384
+ }
3385
+ function decode($0, $1, $2) {
3386
+ if ($1) {
3387
+ return $1;
3388
+ }
3389
+ const head = $2.charCodeAt(0);
3390
+ if (head === codes.numberSign) {
3391
+ const head2 = $2.charCodeAt(1);
3392
+ const hex = head2 === codes.lowercaseX || head2 === codes.uppercaseX;
3393
+ return decodeNumericCharacterReference(
3394
+ $2.slice(hex ? 2 : 1),
3395
+ hex ? constants.numericBaseHexadecimal : constants.numericBaseDecimal
3396
+ );
3397
+ }
3398
+ return decodeNamedCharacterReference($2) || $0;
3399
+ }
3400
+
3401
+ // ../node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js
3402
+ var own = {}.hasOwnProperty;
3403
+ function zwitch(key, options) {
3404
+ const settings = options || {};
3405
+ function one2(value, ...parameters) {
3406
+ let fn = one2.invalid;
3407
+ const handlers = one2.handlers;
3408
+ if (value && own.call(value, key)) {
3409
+ const id = String(value[key]);
3410
+ fn = own.call(handlers, id) ? handlers[id] : one2.unknown;
3411
+ }
3412
+ if (fn) {
3413
+ return fn.call(this, value, ...parameters);
3414
+ }
3415
+ }
3416
+ one2.handlers = settings.handlers || {};
3417
+ one2.invalid = settings.invalid;
3418
+ one2.unknown = settings.unknown;
3419
+ return one2;
3420
+ }
3421
+
3422
+ export {
3423
+ zwitch,
3424
+ ccount,
3425
+ decodeNamedCharacterReference,
3426
+ factorySpace,
3427
+ splice,
3428
+ push,
3429
+ classifyCharacter,
3430
+ resolveAll,
3431
+ attention,
3432
+ autolink,
3433
+ blankLine,
3434
+ blockQuote,
3435
+ characterEscape,
3436
+ characterReference,
3437
+ codeFenced,
3438
+ codeIndented,
3439
+ codeText,
3440
+ subtokenize,
3441
+ content,
3442
+ normalizeIdentifier,
3443
+ definition,
3444
+ hardBreakEscape,
3445
+ headingAtx,
3446
+ htmlFlow,
3447
+ htmlText,
3448
+ labelEnd,
3449
+ labelStartImage,
3450
+ labelStartLink,
3451
+ lineEnding,
3452
+ thematicBreak,
3453
+ list,
3454
+ setextUnderline,
3455
+ combineExtensions,
3456
+ toString,
3457
+ decodeNumericCharacterReference,
3458
+ normalizeUri,
3459
+ decodeString
3460
+ };
3461
+ //# sourceMappingURL=chunk-DNIFH2K7.js.map