@vaadin/bundles 24.8.0-alpha9 → 24.8.0-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2205 @@
1
+ (self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["vendors-node_modules_marked_lib_marked_esm_js"],{
2
+
3
+ /***/ "./node_modules/marked/lib/marked.esm.js":
4
+ /*!***********************************************!*\
5
+ !*** ./node_modules/marked/lib/marked.esm.js ***!
6
+ \***********************************************/
7
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
8
+
9
+ __webpack_require__.r(__webpack_exports__);
10
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11
+ /* harmony export */ "Hooks": () => (/* binding */ _Hooks),
12
+ /* harmony export */ "Lexer": () => (/* binding */ _Lexer),
13
+ /* harmony export */ "Marked": () => (/* binding */ Marked),
14
+ /* harmony export */ "Parser": () => (/* binding */ _Parser),
15
+ /* harmony export */ "Renderer": () => (/* binding */ _Renderer),
16
+ /* harmony export */ "TextRenderer": () => (/* binding */ _TextRenderer),
17
+ /* harmony export */ "Tokenizer": () => (/* binding */ _Tokenizer),
18
+ /* harmony export */ "defaults": () => (/* binding */ _defaults),
19
+ /* harmony export */ "getDefaults": () => (/* binding */ _getDefaults),
20
+ /* harmony export */ "lexer": () => (/* binding */ lexer),
21
+ /* harmony export */ "marked": () => (/* binding */ marked),
22
+ /* harmony export */ "options": () => (/* binding */ options),
23
+ /* harmony export */ "parse": () => (/* binding */ parse),
24
+ /* harmony export */ "parseInline": () => (/* binding */ parseInline),
25
+ /* harmony export */ "parser": () => (/* binding */ parser),
26
+ /* harmony export */ "setOptions": () => (/* binding */ setOptions),
27
+ /* harmony export */ "use": () => (/* binding */ use),
28
+ /* harmony export */ "walkTokens": () => (/* binding */ walkTokens)
29
+ /* harmony export */ });
30
+ /**
31
+ * marked v15.0.12 - a markdown parser
32
+ * Copyright (c) 2011-2025, Christopher Jeffrey. (MIT Licensed)
33
+ * https://github.com/markedjs/marked
34
+ */
35
+
36
+ /**
37
+ * DO NOT EDIT THIS FILE
38
+ * The code in this file is generated from files in ./src/
39
+ */
40
+
41
+
42
+ // src/defaults.ts
43
+ function _getDefaults() {
44
+ return {
45
+ async: false,
46
+ breaks: false,
47
+ extensions: null,
48
+ gfm: true,
49
+ hooks: null,
50
+ pedantic: false,
51
+ renderer: null,
52
+ silent: false,
53
+ tokenizer: null,
54
+ walkTokens: null
55
+ };
56
+ }
57
+ var _defaults = _getDefaults();
58
+ function changeDefaults(newDefaults) {
59
+ _defaults = newDefaults;
60
+ }
61
+
62
+ // src/rules.ts
63
+ var noopTest = { exec: () => null };
64
+ function edit(regex, opt = "") {
65
+ let source = typeof regex === "string" ? regex : regex.source;
66
+ const obj = {
67
+ replace: (name, val) => {
68
+ let valSource = typeof val === "string" ? val : val.source;
69
+ valSource = valSource.replace(other.caret, "$1");
70
+ source = source.replace(name, valSource);
71
+ return obj;
72
+ },
73
+ getRegex: () => {
74
+ return new RegExp(source, opt);
75
+ }
76
+ };
77
+ return obj;
78
+ }
79
+ var other = {
80
+ codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
81
+ outputLinkReplace: /\\([\[\]])/g,
82
+ indentCodeCompensation: /^(\s+)(?:```)/,
83
+ beginningSpace: /^\s+/,
84
+ endingHash: /#$/,
85
+ startingSpaceChar: /^ /,
86
+ endingSpaceChar: / $/,
87
+ nonSpaceChar: /[^ ]/,
88
+ newLineCharGlobal: /\n/g,
89
+ tabCharGlobal: /\t/g,
90
+ multipleSpaceGlobal: /\s+/g,
91
+ blankLine: /^[ \t]*$/,
92
+ doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
93
+ blockquoteStart: /^ {0,3}>/,
94
+ blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
95
+ blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
96
+ listReplaceTabs: /^\t+/,
97
+ listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
98
+ listIsTask: /^\[[ xX]\] /,
99
+ listReplaceTask: /^\[[ xX]\] +/,
100
+ anyLine: /\n.*\n/,
101
+ hrefBrackets: /^<(.*)>$/,
102
+ tableDelimiter: /[:|]/,
103
+ tableAlignChars: /^\||\| *$/g,
104
+ tableRowBlankLine: /\n[ \t]*$/,
105
+ tableAlignRight: /^ *-+: *$/,
106
+ tableAlignCenter: /^ *:-+: *$/,
107
+ tableAlignLeft: /^ *:-+ *$/,
108
+ startATag: /^<a /i,
109
+ endATag: /^<\/a>/i,
110
+ startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
111
+ endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
112
+ startAngleBracket: /^</,
113
+ endAngleBracket: />$/,
114
+ pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
115
+ unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
116
+ escapeTest: /[&<>"']/,
117
+ escapeReplace: /[&<>"']/g,
118
+ escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
119
+ escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
120
+ unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,
121
+ caret: /(^|[^\[])\^/g,
122
+ percentDecode: /%25/g,
123
+ findPipe: /\|/g,
124
+ splitPipe: / \|/,
125
+ slashPipe: /\\\|/g,
126
+ carriageReturn: /\r\n|\r/g,
127
+ spaceLine: /^ +$/gm,
128
+ notSpaceStart: /^\S*/,
129
+ endingNewline: /\n$/,
130
+ listItemRegex: (bull) => new RegExp(`^( {0,3}${bull})((?:[ ][^\\n]*)?(?:\\n|$))`),
131
+ nextBulletRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
132
+ hrRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
133
+ fencesBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\`\`\`|~~~)`),
134
+ headingBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`),
135
+ htmlBeginRegex: (indent) => new RegExp(`^ {0,${Math.min(3, indent - 1)}}<(?:[a-z].*>|!--)`, "i")
136
+ };
137
+ var newline = /^(?:[ \t]*(?:\n|$))+/;
138
+ var blockCode = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/;
139
+ var fences = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/;
140
+ var hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
141
+ var heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
142
+ var bullet = /(?:[*+-]|\d{1,9}[.)])/;
143
+ var lheadingCore = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
144
+ var lheading = edit(lheadingCore).replace(/bull/g, bullet).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex();
145
+ var lheadingGfm = edit(lheadingCore).replace(/bull/g, bullet).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex();
146
+ var _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
147
+ var blockText = /^[^\n]+/;
148
+ var _blockLabel = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
149
+ var def = edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", _blockLabel).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex();
150
+ var list = edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, bullet).getRegex();
151
+ var _tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
152
+ var _comment = /<!--(?:-?>|[\s\S]*?(?:-->|$))/;
153
+ var html = edit(
154
+ "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
155
+ "i"
156
+ ).replace("comment", _comment).replace("tag", _tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
157
+ var paragraph = edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
158
+ var blockquote = edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", paragraph).getRegex();
159
+ var blockNormal = {
160
+ blockquote,
161
+ code: blockCode,
162
+ def,
163
+ fences,
164
+ heading,
165
+ hr,
166
+ html,
167
+ lheading,
168
+ list,
169
+ newline,
170
+ paragraph,
171
+ table: noopTest,
172
+ text: blockText
173
+ };
174
+ var gfmTable = edit(
175
+ "^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
176
+ ).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex();
177
+ var blockGfm = {
178
+ ...blockNormal,
179
+ lheading: lheadingGfm,
180
+ table: gfmTable,
181
+ paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", gfmTable).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _tag).getRegex()
182
+ };
183
+ var blockPedantic = {
184
+ ...blockNormal,
185
+ html: edit(
186
+ `^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`
187
+ ).replace("comment", _comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
188
+ def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
189
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
190
+ fences: noopTest,
191
+ // fences not supported
192
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
193
+ paragraph: edit(_paragraph).replace("hr", hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", lheading).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
194
+ };
195
+ var escape = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/;
196
+ var inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/;
197
+ var br = /^( {2,}|\\)\n(?!\s*$)/;
198
+ var inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/;
199
+ var _punctuation = /[\p{P}\p{S}]/u;
200
+ var _punctuationOrSpace = /[\s\p{P}\p{S}]/u;
201
+ var _notPunctuationOrSpace = /[^\s\p{P}\p{S}]/u;
202
+ var punctuation = edit(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _punctuationOrSpace).getRegex();
203
+ var _punctuationGfmStrongEm = /(?!~)[\p{P}\p{S}]/u;
204
+ var _punctuationOrSpaceGfmStrongEm = /(?!~)[\s\p{P}\p{S}]/u;
205
+ var _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;
206
+ var blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
207
+ var emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
208
+ var emStrongLDelim = edit(emStrongLDelimCore, "u").replace(/punct/g, _punctuation).getRegex();
209
+ var emStrongLDelimGfm = edit(emStrongLDelimCore, "u").replace(/punct/g, _punctuationGfmStrongEm).getRegex();
210
+ var emStrongRDelimAstCore = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)";
211
+ var emStrongRDelimAst = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
212
+ var emStrongRDelimAstGfm = edit(emStrongRDelimAstCore, "gu").replace(/notPunctSpace/g, _notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g, _punctuationOrSpaceGfmStrongEm).replace(/punct/g, _punctuationGfmStrongEm).getRegex();
213
+ var emStrongRDelimUnd = edit(
214
+ "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)",
215
+ "gu"
216
+ ).replace(/notPunctSpace/g, _notPunctuationOrSpace).replace(/punctSpace/g, _punctuationOrSpace).replace(/punct/g, _punctuation).getRegex();
217
+ var anyPunctuation = edit(/\\(punct)/, "gu").replace(/punct/g, _punctuation).getRegex();
218
+ var autolink = edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex();
219
+ var _inlineComment = edit(_comment).replace("(?:-->|$)", "-->").getRegex();
220
+ var tag = edit(
221
+ "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
222
+ ).replace("comment", _inlineComment).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex();
223
+ var _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
224
+ var link = edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", _inlineLabel).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex();
225
+ var reflink = edit(/^!?\[(label)\]\[(ref)\]/).replace("label", _inlineLabel).replace("ref", _blockLabel).getRegex();
226
+ var nolink = edit(/^!?\[(ref)\](?:\[\])?/).replace("ref", _blockLabel).getRegex();
227
+ var reflinkSearch = edit("reflink|nolink(?!\\()", "g").replace("reflink", reflink).replace("nolink", nolink).getRegex();
228
+ var inlineNormal = {
229
+ _backpedal: noopTest,
230
+ // only used for GFM url
231
+ anyPunctuation,
232
+ autolink,
233
+ blockSkip,
234
+ br,
235
+ code: inlineCode,
236
+ del: noopTest,
237
+ emStrongLDelim,
238
+ emStrongRDelimAst,
239
+ emStrongRDelimUnd,
240
+ escape,
241
+ link,
242
+ nolink,
243
+ punctuation,
244
+ reflink,
245
+ reflinkSearch,
246
+ tag,
247
+ text: inlineText,
248
+ url: noopTest
249
+ };
250
+ var inlinePedantic = {
251
+ ...inlineNormal,
252
+ link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", _inlineLabel).getRegex(),
253
+ reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _inlineLabel).getRegex()
254
+ };
255
+ var inlineGfm = {
256
+ ...inlineNormal,
257
+ emStrongRDelimAst: emStrongRDelimAstGfm,
258
+ emStrongLDelim: emStrongLDelimGfm,
259
+ url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
260
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
261
+ del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
262
+ text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
263
+ };
264
+ var inlineBreaks = {
265
+ ...inlineGfm,
266
+ br: edit(br).replace("{2,}", "*").getRegex(),
267
+ text: edit(inlineGfm.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
268
+ };
269
+ var block = {
270
+ normal: blockNormal,
271
+ gfm: blockGfm,
272
+ pedantic: blockPedantic
273
+ };
274
+ var inline = {
275
+ normal: inlineNormal,
276
+ gfm: inlineGfm,
277
+ breaks: inlineBreaks,
278
+ pedantic: inlinePedantic
279
+ };
280
+
281
+ // src/helpers.ts
282
+ var escapeReplacements = {
283
+ "&": "&amp;",
284
+ "<": "&lt;",
285
+ ">": "&gt;",
286
+ '"': "&quot;",
287
+ "'": "&#39;"
288
+ };
289
+ var getEscapeReplacement = (ch) => escapeReplacements[ch];
290
+ function escape2(html2, encode) {
291
+ if (encode) {
292
+ if (other.escapeTest.test(html2)) {
293
+ return html2.replace(other.escapeReplace, getEscapeReplacement);
294
+ }
295
+ } else {
296
+ if (other.escapeTestNoEncode.test(html2)) {
297
+ return html2.replace(other.escapeReplaceNoEncode, getEscapeReplacement);
298
+ }
299
+ }
300
+ return html2;
301
+ }
302
+ function cleanUrl(href) {
303
+ try {
304
+ href = encodeURI(href).replace(other.percentDecode, "%");
305
+ } catch {
306
+ return null;
307
+ }
308
+ return href;
309
+ }
310
+ function splitCells(tableRow, count) {
311
+ const row = tableRow.replace(other.findPipe, (match, offset, str) => {
312
+ let escaped = false;
313
+ let curr = offset;
314
+ while (--curr >= 0 && str[curr] === "\\") escaped = !escaped;
315
+ if (escaped) {
316
+ return "|";
317
+ } else {
318
+ return " |";
319
+ }
320
+ }), cells = row.split(other.splitPipe);
321
+ let i = 0;
322
+ if (!cells[0].trim()) {
323
+ cells.shift();
324
+ }
325
+ if (cells.length > 0 && !cells.at(-1)?.trim()) {
326
+ cells.pop();
327
+ }
328
+ if (count) {
329
+ if (cells.length > count) {
330
+ cells.splice(count);
331
+ } else {
332
+ while (cells.length < count) cells.push("");
333
+ }
334
+ }
335
+ for (; i < cells.length; i++) {
336
+ cells[i] = cells[i].trim().replace(other.slashPipe, "|");
337
+ }
338
+ return cells;
339
+ }
340
+ function rtrim(str, c, invert) {
341
+ const l = str.length;
342
+ if (l === 0) {
343
+ return "";
344
+ }
345
+ let suffLen = 0;
346
+ while (suffLen < l) {
347
+ const currChar = str.charAt(l - suffLen - 1);
348
+ if (currChar === c && !invert) {
349
+ suffLen++;
350
+ } else if (currChar !== c && invert) {
351
+ suffLen++;
352
+ } else {
353
+ break;
354
+ }
355
+ }
356
+ return str.slice(0, l - suffLen);
357
+ }
358
+ function findClosingBracket(str, b) {
359
+ if (str.indexOf(b[1]) === -1) {
360
+ return -1;
361
+ }
362
+ let level = 0;
363
+ for (let i = 0; i < str.length; i++) {
364
+ if (str[i] === "\\") {
365
+ i++;
366
+ } else if (str[i] === b[0]) {
367
+ level++;
368
+ } else if (str[i] === b[1]) {
369
+ level--;
370
+ if (level < 0) {
371
+ return i;
372
+ }
373
+ }
374
+ }
375
+ if (level > 0) {
376
+ return -2;
377
+ }
378
+ return -1;
379
+ }
380
+
381
+ // src/Tokenizer.ts
382
+ function outputLink(cap, link2, raw, lexer2, rules) {
383
+ const href = link2.href;
384
+ const title = link2.title || null;
385
+ const text = cap[1].replace(rules.other.outputLinkReplace, "$1");
386
+ lexer2.state.inLink = true;
387
+ const token = {
388
+ type: cap[0].charAt(0) === "!" ? "image" : "link",
389
+ raw,
390
+ href,
391
+ title,
392
+ text,
393
+ tokens: lexer2.inlineTokens(text)
394
+ };
395
+ lexer2.state.inLink = false;
396
+ return token;
397
+ }
398
+ function indentCodeCompensation(raw, text, rules) {
399
+ const matchIndentToCode = raw.match(rules.other.indentCodeCompensation);
400
+ if (matchIndentToCode === null) {
401
+ return text;
402
+ }
403
+ const indentToCode = matchIndentToCode[1];
404
+ return text.split("\n").map((node) => {
405
+ const matchIndentInNode = node.match(rules.other.beginningSpace);
406
+ if (matchIndentInNode === null) {
407
+ return node;
408
+ }
409
+ const [indentInNode] = matchIndentInNode;
410
+ if (indentInNode.length >= indentToCode.length) {
411
+ return node.slice(indentToCode.length);
412
+ }
413
+ return node;
414
+ }).join("\n");
415
+ }
416
+ var _Tokenizer = class {
417
+ options;
418
+ rules;
419
+ // set by the lexer
420
+ lexer;
421
+ // set by the lexer
422
+ constructor(options2) {
423
+ this.options = options2 || _defaults;
424
+ }
425
+ space(src) {
426
+ const cap = this.rules.block.newline.exec(src);
427
+ if (cap && cap[0].length > 0) {
428
+ return {
429
+ type: "space",
430
+ raw: cap[0]
431
+ };
432
+ }
433
+ }
434
+ code(src) {
435
+ const cap = this.rules.block.code.exec(src);
436
+ if (cap) {
437
+ const text = cap[0].replace(this.rules.other.codeRemoveIndent, "");
438
+ return {
439
+ type: "code",
440
+ raw: cap[0],
441
+ codeBlockStyle: "indented",
442
+ text: !this.options.pedantic ? rtrim(text, "\n") : text
443
+ };
444
+ }
445
+ }
446
+ fences(src) {
447
+ const cap = this.rules.block.fences.exec(src);
448
+ if (cap) {
449
+ const raw = cap[0];
450
+ const text = indentCodeCompensation(raw, cap[3] || "", this.rules);
451
+ return {
452
+ type: "code",
453
+ raw,
454
+ lang: cap[2] ? cap[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : cap[2],
455
+ text
456
+ };
457
+ }
458
+ }
459
+ heading(src) {
460
+ const cap = this.rules.block.heading.exec(src);
461
+ if (cap) {
462
+ let text = cap[2].trim();
463
+ if (this.rules.other.endingHash.test(text)) {
464
+ const trimmed = rtrim(text, "#");
465
+ if (this.options.pedantic) {
466
+ text = trimmed.trim();
467
+ } else if (!trimmed || this.rules.other.endingSpaceChar.test(trimmed)) {
468
+ text = trimmed.trim();
469
+ }
470
+ }
471
+ return {
472
+ type: "heading",
473
+ raw: cap[0],
474
+ depth: cap[1].length,
475
+ text,
476
+ tokens: this.lexer.inline(text)
477
+ };
478
+ }
479
+ }
480
+ hr(src) {
481
+ const cap = this.rules.block.hr.exec(src);
482
+ if (cap) {
483
+ return {
484
+ type: "hr",
485
+ raw: rtrim(cap[0], "\n")
486
+ };
487
+ }
488
+ }
489
+ blockquote(src) {
490
+ const cap = this.rules.block.blockquote.exec(src);
491
+ if (cap) {
492
+ let lines = rtrim(cap[0], "\n").split("\n");
493
+ let raw = "";
494
+ let text = "";
495
+ const tokens = [];
496
+ while (lines.length > 0) {
497
+ let inBlockquote = false;
498
+ const currentLines = [];
499
+ let i;
500
+ for (i = 0; i < lines.length; i++) {
501
+ if (this.rules.other.blockquoteStart.test(lines[i])) {
502
+ currentLines.push(lines[i]);
503
+ inBlockquote = true;
504
+ } else if (!inBlockquote) {
505
+ currentLines.push(lines[i]);
506
+ } else {
507
+ break;
508
+ }
509
+ }
510
+ lines = lines.slice(i);
511
+ const currentRaw = currentLines.join("\n");
512
+ const currentText = currentRaw.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
513
+ raw = raw ? `${raw}
514
+ ${currentRaw}` : currentRaw;
515
+ text = text ? `${text}
516
+ ${currentText}` : currentText;
517
+ const top = this.lexer.state.top;
518
+ this.lexer.state.top = true;
519
+ this.lexer.blockTokens(currentText, tokens, true);
520
+ this.lexer.state.top = top;
521
+ if (lines.length === 0) {
522
+ break;
523
+ }
524
+ const lastToken = tokens.at(-1);
525
+ if (lastToken?.type === "code") {
526
+ break;
527
+ } else if (lastToken?.type === "blockquote") {
528
+ const oldToken = lastToken;
529
+ const newText = oldToken.raw + "\n" + lines.join("\n");
530
+ const newToken = this.blockquote(newText);
531
+ tokens[tokens.length - 1] = newToken;
532
+ raw = raw.substring(0, raw.length - oldToken.raw.length) + newToken.raw;
533
+ text = text.substring(0, text.length - oldToken.text.length) + newToken.text;
534
+ break;
535
+ } else if (lastToken?.type === "list") {
536
+ const oldToken = lastToken;
537
+ const newText = oldToken.raw + "\n" + lines.join("\n");
538
+ const newToken = this.list(newText);
539
+ tokens[tokens.length - 1] = newToken;
540
+ raw = raw.substring(0, raw.length - lastToken.raw.length) + newToken.raw;
541
+ text = text.substring(0, text.length - oldToken.raw.length) + newToken.raw;
542
+ lines = newText.substring(tokens.at(-1).raw.length).split("\n");
543
+ continue;
544
+ }
545
+ }
546
+ return {
547
+ type: "blockquote",
548
+ raw,
549
+ tokens,
550
+ text
551
+ };
552
+ }
553
+ }
554
+ list(src) {
555
+ let cap = this.rules.block.list.exec(src);
556
+ if (cap) {
557
+ let bull = cap[1].trim();
558
+ const isordered = bull.length > 1;
559
+ const list2 = {
560
+ type: "list",
561
+ raw: "",
562
+ ordered: isordered,
563
+ start: isordered ? +bull.slice(0, -1) : "",
564
+ loose: false,
565
+ items: []
566
+ };
567
+ bull = isordered ? `\\d{1,9}\\${bull.slice(-1)}` : `\\${bull}`;
568
+ if (this.options.pedantic) {
569
+ bull = isordered ? bull : "[*+-]";
570
+ }
571
+ const itemRegex = this.rules.other.listItemRegex(bull);
572
+ let endsWithBlankLine = false;
573
+ while (src) {
574
+ let endEarly = false;
575
+ let raw = "";
576
+ let itemContents = "";
577
+ if (!(cap = itemRegex.exec(src))) {
578
+ break;
579
+ }
580
+ if (this.rules.block.hr.test(src)) {
581
+ break;
582
+ }
583
+ raw = cap[0];
584
+ src = src.substring(raw.length);
585
+ let line = cap[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (t) => " ".repeat(3 * t.length));
586
+ let nextLine = src.split("\n", 1)[0];
587
+ let blankLine = !line.trim();
588
+ let indent = 0;
589
+ if (this.options.pedantic) {
590
+ indent = 2;
591
+ itemContents = line.trimStart();
592
+ } else if (blankLine) {
593
+ indent = cap[1].length + 1;
594
+ } else {
595
+ indent = cap[2].search(this.rules.other.nonSpaceChar);
596
+ indent = indent > 4 ? 1 : indent;
597
+ itemContents = line.slice(indent);
598
+ indent += cap[1].length;
599
+ }
600
+ if (blankLine && this.rules.other.blankLine.test(nextLine)) {
601
+ raw += nextLine + "\n";
602
+ src = src.substring(nextLine.length + 1);
603
+ endEarly = true;
604
+ }
605
+ if (!endEarly) {
606
+ const nextBulletRegex = this.rules.other.nextBulletRegex(indent);
607
+ const hrRegex = this.rules.other.hrRegex(indent);
608
+ const fencesBeginRegex = this.rules.other.fencesBeginRegex(indent);
609
+ const headingBeginRegex = this.rules.other.headingBeginRegex(indent);
610
+ const htmlBeginRegex = this.rules.other.htmlBeginRegex(indent);
611
+ while (src) {
612
+ const rawLine = src.split("\n", 1)[0];
613
+ let nextLineWithoutTabs;
614
+ nextLine = rawLine;
615
+ if (this.options.pedantic) {
616
+ nextLine = nextLine.replace(this.rules.other.listReplaceNesting, " ");
617
+ nextLineWithoutTabs = nextLine;
618
+ } else {
619
+ nextLineWithoutTabs = nextLine.replace(this.rules.other.tabCharGlobal, " ");
620
+ }
621
+ if (fencesBeginRegex.test(nextLine)) {
622
+ break;
623
+ }
624
+ if (headingBeginRegex.test(nextLine)) {
625
+ break;
626
+ }
627
+ if (htmlBeginRegex.test(nextLine)) {
628
+ break;
629
+ }
630
+ if (nextBulletRegex.test(nextLine)) {
631
+ break;
632
+ }
633
+ if (hrRegex.test(nextLine)) {
634
+ break;
635
+ }
636
+ if (nextLineWithoutTabs.search(this.rules.other.nonSpaceChar) >= indent || !nextLine.trim()) {
637
+ itemContents += "\n" + nextLineWithoutTabs.slice(indent);
638
+ } else {
639
+ if (blankLine) {
640
+ break;
641
+ }
642
+ if (line.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4) {
643
+ break;
644
+ }
645
+ if (fencesBeginRegex.test(line)) {
646
+ break;
647
+ }
648
+ if (headingBeginRegex.test(line)) {
649
+ break;
650
+ }
651
+ if (hrRegex.test(line)) {
652
+ break;
653
+ }
654
+ itemContents += "\n" + nextLine;
655
+ }
656
+ if (!blankLine && !nextLine.trim()) {
657
+ blankLine = true;
658
+ }
659
+ raw += rawLine + "\n";
660
+ src = src.substring(rawLine.length + 1);
661
+ line = nextLineWithoutTabs.slice(indent);
662
+ }
663
+ }
664
+ if (!list2.loose) {
665
+ if (endsWithBlankLine) {
666
+ list2.loose = true;
667
+ } else if (this.rules.other.doubleBlankLine.test(raw)) {
668
+ endsWithBlankLine = true;
669
+ }
670
+ }
671
+ let istask = null;
672
+ let ischecked;
673
+ if (this.options.gfm) {
674
+ istask = this.rules.other.listIsTask.exec(itemContents);
675
+ if (istask) {
676
+ ischecked = istask[0] !== "[ ] ";
677
+ itemContents = itemContents.replace(this.rules.other.listReplaceTask, "");
678
+ }
679
+ }
680
+ list2.items.push({
681
+ type: "list_item",
682
+ raw,
683
+ task: !!istask,
684
+ checked: ischecked,
685
+ loose: false,
686
+ text: itemContents,
687
+ tokens: []
688
+ });
689
+ list2.raw += raw;
690
+ }
691
+ const lastItem = list2.items.at(-1);
692
+ if (lastItem) {
693
+ lastItem.raw = lastItem.raw.trimEnd();
694
+ lastItem.text = lastItem.text.trimEnd();
695
+ } else {
696
+ return;
697
+ }
698
+ list2.raw = list2.raw.trimEnd();
699
+ for (let i = 0; i < list2.items.length; i++) {
700
+ this.lexer.state.top = false;
701
+ list2.items[i].tokens = this.lexer.blockTokens(list2.items[i].text, []);
702
+ if (!list2.loose) {
703
+ const spacers = list2.items[i].tokens.filter((t) => t.type === "space");
704
+ const hasMultipleLineBreaks = spacers.length > 0 && spacers.some((t) => this.rules.other.anyLine.test(t.raw));
705
+ list2.loose = hasMultipleLineBreaks;
706
+ }
707
+ }
708
+ if (list2.loose) {
709
+ for (let i = 0; i < list2.items.length; i++) {
710
+ list2.items[i].loose = true;
711
+ }
712
+ }
713
+ return list2;
714
+ }
715
+ }
716
+ html(src) {
717
+ const cap = this.rules.block.html.exec(src);
718
+ if (cap) {
719
+ const token = {
720
+ type: "html",
721
+ block: true,
722
+ raw: cap[0],
723
+ pre: cap[1] === "pre" || cap[1] === "script" || cap[1] === "style",
724
+ text: cap[0]
725
+ };
726
+ return token;
727
+ }
728
+ }
729
+ def(src) {
730
+ const cap = this.rules.block.def.exec(src);
731
+ if (cap) {
732
+ const tag2 = cap[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " ");
733
+ const href = cap[2] ? cap[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "";
734
+ const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : cap[3];
735
+ return {
736
+ type: "def",
737
+ tag: tag2,
738
+ raw: cap[0],
739
+ href,
740
+ title
741
+ };
742
+ }
743
+ }
744
+ table(src) {
745
+ const cap = this.rules.block.table.exec(src);
746
+ if (!cap) {
747
+ return;
748
+ }
749
+ if (!this.rules.other.tableDelimiter.test(cap[2])) {
750
+ return;
751
+ }
752
+ const headers = splitCells(cap[1]);
753
+ const aligns = cap[2].replace(this.rules.other.tableAlignChars, "").split("|");
754
+ const rows = cap[3]?.trim() ? cap[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [];
755
+ const item = {
756
+ type: "table",
757
+ raw: cap[0],
758
+ header: [],
759
+ align: [],
760
+ rows: []
761
+ };
762
+ if (headers.length !== aligns.length) {
763
+ return;
764
+ }
765
+ for (const align of aligns) {
766
+ if (this.rules.other.tableAlignRight.test(align)) {
767
+ item.align.push("right");
768
+ } else if (this.rules.other.tableAlignCenter.test(align)) {
769
+ item.align.push("center");
770
+ } else if (this.rules.other.tableAlignLeft.test(align)) {
771
+ item.align.push("left");
772
+ } else {
773
+ item.align.push(null);
774
+ }
775
+ }
776
+ for (let i = 0; i < headers.length; i++) {
777
+ item.header.push({
778
+ text: headers[i],
779
+ tokens: this.lexer.inline(headers[i]),
780
+ header: true,
781
+ align: item.align[i]
782
+ });
783
+ }
784
+ for (const row of rows) {
785
+ item.rows.push(splitCells(row, item.header.length).map((cell, i) => {
786
+ return {
787
+ text: cell,
788
+ tokens: this.lexer.inline(cell),
789
+ header: false,
790
+ align: item.align[i]
791
+ };
792
+ }));
793
+ }
794
+ return item;
795
+ }
796
+ lheading(src) {
797
+ const cap = this.rules.block.lheading.exec(src);
798
+ if (cap) {
799
+ return {
800
+ type: "heading",
801
+ raw: cap[0],
802
+ depth: cap[2].charAt(0) === "=" ? 1 : 2,
803
+ text: cap[1],
804
+ tokens: this.lexer.inline(cap[1])
805
+ };
806
+ }
807
+ }
808
+ paragraph(src) {
809
+ const cap = this.rules.block.paragraph.exec(src);
810
+ if (cap) {
811
+ const text = cap[1].charAt(cap[1].length - 1) === "\n" ? cap[1].slice(0, -1) : cap[1];
812
+ return {
813
+ type: "paragraph",
814
+ raw: cap[0],
815
+ text,
816
+ tokens: this.lexer.inline(text)
817
+ };
818
+ }
819
+ }
820
+ text(src) {
821
+ const cap = this.rules.block.text.exec(src);
822
+ if (cap) {
823
+ return {
824
+ type: "text",
825
+ raw: cap[0],
826
+ text: cap[0],
827
+ tokens: this.lexer.inline(cap[0])
828
+ };
829
+ }
830
+ }
831
+ escape(src) {
832
+ const cap = this.rules.inline.escape.exec(src);
833
+ if (cap) {
834
+ return {
835
+ type: "escape",
836
+ raw: cap[0],
837
+ text: cap[1]
838
+ };
839
+ }
840
+ }
841
+ tag(src) {
842
+ const cap = this.rules.inline.tag.exec(src);
843
+ if (cap) {
844
+ if (!this.lexer.state.inLink && this.rules.other.startATag.test(cap[0])) {
845
+ this.lexer.state.inLink = true;
846
+ } else if (this.lexer.state.inLink && this.rules.other.endATag.test(cap[0])) {
847
+ this.lexer.state.inLink = false;
848
+ }
849
+ if (!this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(cap[0])) {
850
+ this.lexer.state.inRawBlock = true;
851
+ } else if (this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(cap[0])) {
852
+ this.lexer.state.inRawBlock = false;
853
+ }
854
+ return {
855
+ type: "html",
856
+ raw: cap[0],
857
+ inLink: this.lexer.state.inLink,
858
+ inRawBlock: this.lexer.state.inRawBlock,
859
+ block: false,
860
+ text: cap[0]
861
+ };
862
+ }
863
+ }
864
+ link(src) {
865
+ const cap = this.rules.inline.link.exec(src);
866
+ if (cap) {
867
+ const trimmedUrl = cap[2].trim();
868
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(trimmedUrl)) {
869
+ if (!this.rules.other.endAngleBracket.test(trimmedUrl)) {
870
+ return;
871
+ }
872
+ const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), "\\");
873
+ if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {
874
+ return;
875
+ }
876
+ } else {
877
+ const lastParenIndex = findClosingBracket(cap[2], "()");
878
+ if (lastParenIndex === -2) {
879
+ return;
880
+ }
881
+ if (lastParenIndex > -1) {
882
+ const start = cap[0].indexOf("!") === 0 ? 5 : 4;
883
+ const linkLen = start + cap[1].length + lastParenIndex;
884
+ cap[2] = cap[2].substring(0, lastParenIndex);
885
+ cap[0] = cap[0].substring(0, linkLen).trim();
886
+ cap[3] = "";
887
+ }
888
+ }
889
+ let href = cap[2];
890
+ let title = "";
891
+ if (this.options.pedantic) {
892
+ const link2 = this.rules.other.pedanticHrefTitle.exec(href);
893
+ if (link2) {
894
+ href = link2[1];
895
+ title = link2[3];
896
+ }
897
+ } else {
898
+ title = cap[3] ? cap[3].slice(1, -1) : "";
899
+ }
900
+ href = href.trim();
901
+ if (this.rules.other.startAngleBracket.test(href)) {
902
+ if (this.options.pedantic && !this.rules.other.endAngleBracket.test(trimmedUrl)) {
903
+ href = href.slice(1);
904
+ } else {
905
+ href = href.slice(1, -1);
906
+ }
907
+ }
908
+ return outputLink(cap, {
909
+ href: href ? href.replace(this.rules.inline.anyPunctuation, "$1") : href,
910
+ title: title ? title.replace(this.rules.inline.anyPunctuation, "$1") : title
911
+ }, cap[0], this.lexer, this.rules);
912
+ }
913
+ }
914
+ reflink(src, links) {
915
+ let cap;
916
+ if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {
917
+ const linkString = (cap[2] || cap[1]).replace(this.rules.other.multipleSpaceGlobal, " ");
918
+ const link2 = links[linkString.toLowerCase()];
919
+ if (!link2) {
920
+ const text = cap[0].charAt(0);
921
+ return {
922
+ type: "text",
923
+ raw: text,
924
+ text
925
+ };
926
+ }
927
+ return outputLink(cap, link2, cap[0], this.lexer, this.rules);
928
+ }
929
+ }
930
+ emStrong(src, maskedSrc, prevChar = "") {
931
+ let match = this.rules.inline.emStrongLDelim.exec(src);
932
+ if (!match) return;
933
+ if (match[3] && prevChar.match(this.rules.other.unicodeAlphaNumeric)) return;
934
+ const nextChar = match[1] || match[2] || "";
935
+ if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
936
+ const lLength = [...match[0]].length - 1;
937
+ let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
938
+ const endReg = match[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
939
+ endReg.lastIndex = 0;
940
+ maskedSrc = maskedSrc.slice(-1 * src.length + lLength);
941
+ while ((match = endReg.exec(maskedSrc)) != null) {
942
+ rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
943
+ if (!rDelim) continue;
944
+ rLength = [...rDelim].length;
945
+ if (match[3] || match[4]) {
946
+ delimTotal += rLength;
947
+ continue;
948
+ } else if (match[5] || match[6]) {
949
+ if (lLength % 3 && !((lLength + rLength) % 3)) {
950
+ midDelimTotal += rLength;
951
+ continue;
952
+ }
953
+ }
954
+ delimTotal -= rLength;
955
+ if (delimTotal > 0) continue;
956
+ rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
957
+ const lastCharLength = [...match[0]][0].length;
958
+ const raw = src.slice(0, lLength + match.index + lastCharLength + rLength);
959
+ if (Math.min(lLength, rLength) % 2) {
960
+ const text2 = raw.slice(1, -1);
961
+ return {
962
+ type: "em",
963
+ raw,
964
+ text: text2,
965
+ tokens: this.lexer.inlineTokens(text2)
966
+ };
967
+ }
968
+ const text = raw.slice(2, -2);
969
+ return {
970
+ type: "strong",
971
+ raw,
972
+ text,
973
+ tokens: this.lexer.inlineTokens(text)
974
+ };
975
+ }
976
+ }
977
+ }
978
+ codespan(src) {
979
+ const cap = this.rules.inline.code.exec(src);
980
+ if (cap) {
981
+ let text = cap[2].replace(this.rules.other.newLineCharGlobal, " ");
982
+ const hasNonSpaceChars = this.rules.other.nonSpaceChar.test(text);
983
+ const hasSpaceCharsOnBothEnds = this.rules.other.startingSpaceChar.test(text) && this.rules.other.endingSpaceChar.test(text);
984
+ if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
985
+ text = text.substring(1, text.length - 1);
986
+ }
987
+ return {
988
+ type: "codespan",
989
+ raw: cap[0],
990
+ text
991
+ };
992
+ }
993
+ }
994
+ br(src) {
995
+ const cap = this.rules.inline.br.exec(src);
996
+ if (cap) {
997
+ return {
998
+ type: "br",
999
+ raw: cap[0]
1000
+ };
1001
+ }
1002
+ }
1003
+ del(src) {
1004
+ const cap = this.rules.inline.del.exec(src);
1005
+ if (cap) {
1006
+ return {
1007
+ type: "del",
1008
+ raw: cap[0],
1009
+ text: cap[2],
1010
+ tokens: this.lexer.inlineTokens(cap[2])
1011
+ };
1012
+ }
1013
+ }
1014
+ autolink(src) {
1015
+ const cap = this.rules.inline.autolink.exec(src);
1016
+ if (cap) {
1017
+ let text, href;
1018
+ if (cap[2] === "@") {
1019
+ text = cap[1];
1020
+ href = "mailto:" + text;
1021
+ } else {
1022
+ text = cap[1];
1023
+ href = text;
1024
+ }
1025
+ return {
1026
+ type: "link",
1027
+ raw: cap[0],
1028
+ text,
1029
+ href,
1030
+ tokens: [
1031
+ {
1032
+ type: "text",
1033
+ raw: text,
1034
+ text
1035
+ }
1036
+ ]
1037
+ };
1038
+ }
1039
+ }
1040
+ url(src) {
1041
+ let cap;
1042
+ if (cap = this.rules.inline.url.exec(src)) {
1043
+ let text, href;
1044
+ if (cap[2] === "@") {
1045
+ text = cap[0];
1046
+ href = "mailto:" + text;
1047
+ } else {
1048
+ let prevCapZero;
1049
+ do {
1050
+ prevCapZero = cap[0];
1051
+ cap[0] = this.rules.inline._backpedal.exec(cap[0])?.[0] ?? "";
1052
+ } while (prevCapZero !== cap[0]);
1053
+ text = cap[0];
1054
+ if (cap[1] === "www.") {
1055
+ href = "http://" + cap[0];
1056
+ } else {
1057
+ href = cap[0];
1058
+ }
1059
+ }
1060
+ return {
1061
+ type: "link",
1062
+ raw: cap[0],
1063
+ text,
1064
+ href,
1065
+ tokens: [
1066
+ {
1067
+ type: "text",
1068
+ raw: text,
1069
+ text
1070
+ }
1071
+ ]
1072
+ };
1073
+ }
1074
+ }
1075
+ inlineText(src) {
1076
+ const cap = this.rules.inline.text.exec(src);
1077
+ if (cap) {
1078
+ const escaped = this.lexer.state.inRawBlock;
1079
+ return {
1080
+ type: "text",
1081
+ raw: cap[0],
1082
+ text: cap[0],
1083
+ escaped
1084
+ };
1085
+ }
1086
+ }
1087
+ };
1088
+
1089
+ // src/Lexer.ts
1090
+ var _Lexer = class __Lexer {
1091
+ tokens;
1092
+ options;
1093
+ state;
1094
+ tokenizer;
1095
+ inlineQueue;
1096
+ constructor(options2) {
1097
+ this.tokens = [];
1098
+ this.tokens.links = /* @__PURE__ */ Object.create(null);
1099
+ this.options = options2 || _defaults;
1100
+ this.options.tokenizer = this.options.tokenizer || new _Tokenizer();
1101
+ this.tokenizer = this.options.tokenizer;
1102
+ this.tokenizer.options = this.options;
1103
+ this.tokenizer.lexer = this;
1104
+ this.inlineQueue = [];
1105
+ this.state = {
1106
+ inLink: false,
1107
+ inRawBlock: false,
1108
+ top: true
1109
+ };
1110
+ const rules = {
1111
+ other,
1112
+ block: block.normal,
1113
+ inline: inline.normal
1114
+ };
1115
+ if (this.options.pedantic) {
1116
+ rules.block = block.pedantic;
1117
+ rules.inline = inline.pedantic;
1118
+ } else if (this.options.gfm) {
1119
+ rules.block = block.gfm;
1120
+ if (this.options.breaks) {
1121
+ rules.inline = inline.breaks;
1122
+ } else {
1123
+ rules.inline = inline.gfm;
1124
+ }
1125
+ }
1126
+ this.tokenizer.rules = rules;
1127
+ }
1128
+ /**
1129
+ * Expose Rules
1130
+ */
1131
+ static get rules() {
1132
+ return {
1133
+ block,
1134
+ inline
1135
+ };
1136
+ }
1137
+ /**
1138
+ * Static Lex Method
1139
+ */
1140
+ static lex(src, options2) {
1141
+ const lexer2 = new __Lexer(options2);
1142
+ return lexer2.lex(src);
1143
+ }
1144
+ /**
1145
+ * Static Lex Inline Method
1146
+ */
1147
+ static lexInline(src, options2) {
1148
+ const lexer2 = new __Lexer(options2);
1149
+ return lexer2.inlineTokens(src);
1150
+ }
1151
+ /**
1152
+ * Preprocessing
1153
+ */
1154
+ lex(src) {
1155
+ src = src.replace(other.carriageReturn, "\n");
1156
+ this.blockTokens(src, this.tokens);
1157
+ for (let i = 0; i < this.inlineQueue.length; i++) {
1158
+ const next = this.inlineQueue[i];
1159
+ this.inlineTokens(next.src, next.tokens);
1160
+ }
1161
+ this.inlineQueue = [];
1162
+ return this.tokens;
1163
+ }
1164
+ blockTokens(src, tokens = [], lastParagraphClipped = false) {
1165
+ if (this.options.pedantic) {
1166
+ src = src.replace(other.tabCharGlobal, " ").replace(other.spaceLine, "");
1167
+ }
1168
+ while (src) {
1169
+ let token;
1170
+ if (this.options.extensions?.block?.some((extTokenizer) => {
1171
+ if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
1172
+ src = src.substring(token.raw.length);
1173
+ tokens.push(token);
1174
+ return true;
1175
+ }
1176
+ return false;
1177
+ })) {
1178
+ continue;
1179
+ }
1180
+ if (token = this.tokenizer.space(src)) {
1181
+ src = src.substring(token.raw.length);
1182
+ const lastToken = tokens.at(-1);
1183
+ if (token.raw.length === 1 && lastToken !== void 0) {
1184
+ lastToken.raw += "\n";
1185
+ } else {
1186
+ tokens.push(token);
1187
+ }
1188
+ continue;
1189
+ }
1190
+ if (token = this.tokenizer.code(src)) {
1191
+ src = src.substring(token.raw.length);
1192
+ const lastToken = tokens.at(-1);
1193
+ if (lastToken?.type === "paragraph" || lastToken?.type === "text") {
1194
+ lastToken.raw += "\n" + token.raw;
1195
+ lastToken.text += "\n" + token.text;
1196
+ this.inlineQueue.at(-1).src = lastToken.text;
1197
+ } else {
1198
+ tokens.push(token);
1199
+ }
1200
+ continue;
1201
+ }
1202
+ if (token = this.tokenizer.fences(src)) {
1203
+ src = src.substring(token.raw.length);
1204
+ tokens.push(token);
1205
+ continue;
1206
+ }
1207
+ if (token = this.tokenizer.heading(src)) {
1208
+ src = src.substring(token.raw.length);
1209
+ tokens.push(token);
1210
+ continue;
1211
+ }
1212
+ if (token = this.tokenizer.hr(src)) {
1213
+ src = src.substring(token.raw.length);
1214
+ tokens.push(token);
1215
+ continue;
1216
+ }
1217
+ if (token = this.tokenizer.blockquote(src)) {
1218
+ src = src.substring(token.raw.length);
1219
+ tokens.push(token);
1220
+ continue;
1221
+ }
1222
+ if (token = this.tokenizer.list(src)) {
1223
+ src = src.substring(token.raw.length);
1224
+ tokens.push(token);
1225
+ continue;
1226
+ }
1227
+ if (token = this.tokenizer.html(src)) {
1228
+ src = src.substring(token.raw.length);
1229
+ tokens.push(token);
1230
+ continue;
1231
+ }
1232
+ if (token = this.tokenizer.def(src)) {
1233
+ src = src.substring(token.raw.length);
1234
+ const lastToken = tokens.at(-1);
1235
+ if (lastToken?.type === "paragraph" || lastToken?.type === "text") {
1236
+ lastToken.raw += "\n" + token.raw;
1237
+ lastToken.text += "\n" + token.raw;
1238
+ this.inlineQueue.at(-1).src = lastToken.text;
1239
+ } else if (!this.tokens.links[token.tag]) {
1240
+ this.tokens.links[token.tag] = {
1241
+ href: token.href,
1242
+ title: token.title
1243
+ };
1244
+ }
1245
+ continue;
1246
+ }
1247
+ if (token = this.tokenizer.table(src)) {
1248
+ src = src.substring(token.raw.length);
1249
+ tokens.push(token);
1250
+ continue;
1251
+ }
1252
+ if (token = this.tokenizer.lheading(src)) {
1253
+ src = src.substring(token.raw.length);
1254
+ tokens.push(token);
1255
+ continue;
1256
+ }
1257
+ let cutSrc = src;
1258
+ if (this.options.extensions?.startBlock) {
1259
+ let startIndex = Infinity;
1260
+ const tempSrc = src.slice(1);
1261
+ let tempStart;
1262
+ this.options.extensions.startBlock.forEach((getStartIndex) => {
1263
+ tempStart = getStartIndex.call({ lexer: this }, tempSrc);
1264
+ if (typeof tempStart === "number" && tempStart >= 0) {
1265
+ startIndex = Math.min(startIndex, tempStart);
1266
+ }
1267
+ });
1268
+ if (startIndex < Infinity && startIndex >= 0) {
1269
+ cutSrc = src.substring(0, startIndex + 1);
1270
+ }
1271
+ }
1272
+ if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
1273
+ const lastToken = tokens.at(-1);
1274
+ if (lastParagraphClipped && lastToken?.type === "paragraph") {
1275
+ lastToken.raw += "\n" + token.raw;
1276
+ lastToken.text += "\n" + token.text;
1277
+ this.inlineQueue.pop();
1278
+ this.inlineQueue.at(-1).src = lastToken.text;
1279
+ } else {
1280
+ tokens.push(token);
1281
+ }
1282
+ lastParagraphClipped = cutSrc.length !== src.length;
1283
+ src = src.substring(token.raw.length);
1284
+ continue;
1285
+ }
1286
+ if (token = this.tokenizer.text(src)) {
1287
+ src = src.substring(token.raw.length);
1288
+ const lastToken = tokens.at(-1);
1289
+ if (lastToken?.type === "text") {
1290
+ lastToken.raw += "\n" + token.raw;
1291
+ lastToken.text += "\n" + token.text;
1292
+ this.inlineQueue.pop();
1293
+ this.inlineQueue.at(-1).src = lastToken.text;
1294
+ } else {
1295
+ tokens.push(token);
1296
+ }
1297
+ continue;
1298
+ }
1299
+ if (src) {
1300
+ const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
1301
+ if (this.options.silent) {
1302
+ console.error(errMsg);
1303
+ break;
1304
+ } else {
1305
+ throw new Error(errMsg);
1306
+ }
1307
+ }
1308
+ }
1309
+ this.state.top = true;
1310
+ return tokens;
1311
+ }
1312
+ inline(src, tokens = []) {
1313
+ this.inlineQueue.push({ src, tokens });
1314
+ return tokens;
1315
+ }
1316
+ /**
1317
+ * Lexing/Compiling
1318
+ */
1319
+ inlineTokens(src, tokens = []) {
1320
+ let maskedSrc = src;
1321
+ let match = null;
1322
+ if (this.tokens.links) {
1323
+ const links = Object.keys(this.tokens.links);
1324
+ if (links.length > 0) {
1325
+ while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
1326
+ if (links.includes(match[0].slice(match[0].lastIndexOf("[") + 1, -1))) {
1327
+ maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
1328
+ }
1329
+ }
1330
+ }
1331
+ }
1332
+ while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
1333
+ maskedSrc = maskedSrc.slice(0, match.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1334
+ }
1335
+ while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
1336
+ maskedSrc = maskedSrc.slice(0, match.index) + "[" + "a".repeat(match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1337
+ }
1338
+ let keepPrevChar = false;
1339
+ let prevChar = "";
1340
+ while (src) {
1341
+ if (!keepPrevChar) {
1342
+ prevChar = "";
1343
+ }
1344
+ keepPrevChar = false;
1345
+ let token;
1346
+ if (this.options.extensions?.inline?.some((extTokenizer) => {
1347
+ if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
1348
+ src = src.substring(token.raw.length);
1349
+ tokens.push(token);
1350
+ return true;
1351
+ }
1352
+ return false;
1353
+ })) {
1354
+ continue;
1355
+ }
1356
+ if (token = this.tokenizer.escape(src)) {
1357
+ src = src.substring(token.raw.length);
1358
+ tokens.push(token);
1359
+ continue;
1360
+ }
1361
+ if (token = this.tokenizer.tag(src)) {
1362
+ src = src.substring(token.raw.length);
1363
+ tokens.push(token);
1364
+ continue;
1365
+ }
1366
+ if (token = this.tokenizer.link(src)) {
1367
+ src = src.substring(token.raw.length);
1368
+ tokens.push(token);
1369
+ continue;
1370
+ }
1371
+ if (token = this.tokenizer.reflink(src, this.tokens.links)) {
1372
+ src = src.substring(token.raw.length);
1373
+ const lastToken = tokens.at(-1);
1374
+ if (token.type === "text" && lastToken?.type === "text") {
1375
+ lastToken.raw += token.raw;
1376
+ lastToken.text += token.text;
1377
+ } else {
1378
+ tokens.push(token);
1379
+ }
1380
+ continue;
1381
+ }
1382
+ if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {
1383
+ src = src.substring(token.raw.length);
1384
+ tokens.push(token);
1385
+ continue;
1386
+ }
1387
+ if (token = this.tokenizer.codespan(src)) {
1388
+ src = src.substring(token.raw.length);
1389
+ tokens.push(token);
1390
+ continue;
1391
+ }
1392
+ if (token = this.tokenizer.br(src)) {
1393
+ src = src.substring(token.raw.length);
1394
+ tokens.push(token);
1395
+ continue;
1396
+ }
1397
+ if (token = this.tokenizer.del(src)) {
1398
+ src = src.substring(token.raw.length);
1399
+ tokens.push(token);
1400
+ continue;
1401
+ }
1402
+ if (token = this.tokenizer.autolink(src)) {
1403
+ src = src.substring(token.raw.length);
1404
+ tokens.push(token);
1405
+ continue;
1406
+ }
1407
+ if (!this.state.inLink && (token = this.tokenizer.url(src))) {
1408
+ src = src.substring(token.raw.length);
1409
+ tokens.push(token);
1410
+ continue;
1411
+ }
1412
+ let cutSrc = src;
1413
+ if (this.options.extensions?.startInline) {
1414
+ let startIndex = Infinity;
1415
+ const tempSrc = src.slice(1);
1416
+ let tempStart;
1417
+ this.options.extensions.startInline.forEach((getStartIndex) => {
1418
+ tempStart = getStartIndex.call({ lexer: this }, tempSrc);
1419
+ if (typeof tempStart === "number" && tempStart >= 0) {
1420
+ startIndex = Math.min(startIndex, tempStart);
1421
+ }
1422
+ });
1423
+ if (startIndex < Infinity && startIndex >= 0) {
1424
+ cutSrc = src.substring(0, startIndex + 1);
1425
+ }
1426
+ }
1427
+ if (token = this.tokenizer.inlineText(cutSrc)) {
1428
+ src = src.substring(token.raw.length);
1429
+ if (token.raw.slice(-1) !== "_") {
1430
+ prevChar = token.raw.slice(-1);
1431
+ }
1432
+ keepPrevChar = true;
1433
+ const lastToken = tokens.at(-1);
1434
+ if (lastToken?.type === "text") {
1435
+ lastToken.raw += token.raw;
1436
+ lastToken.text += token.text;
1437
+ } else {
1438
+ tokens.push(token);
1439
+ }
1440
+ continue;
1441
+ }
1442
+ if (src) {
1443
+ const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
1444
+ if (this.options.silent) {
1445
+ console.error(errMsg);
1446
+ break;
1447
+ } else {
1448
+ throw new Error(errMsg);
1449
+ }
1450
+ }
1451
+ }
1452
+ return tokens;
1453
+ }
1454
+ };
1455
+
1456
+ // src/Renderer.ts
1457
+ var _Renderer = class {
1458
+ options;
1459
+ parser;
1460
+ // set by the parser
1461
+ constructor(options2) {
1462
+ this.options = options2 || _defaults;
1463
+ }
1464
+ space(token) {
1465
+ return "";
1466
+ }
1467
+ code({ text, lang, escaped }) {
1468
+ const langString = (lang || "").match(other.notSpaceStart)?.[0];
1469
+ const code = text.replace(other.endingNewline, "") + "\n";
1470
+ if (!langString) {
1471
+ return "<pre><code>" + (escaped ? code : escape2(code, true)) + "</code></pre>\n";
1472
+ }
1473
+ return '<pre><code class="language-' + escape2(langString) + '">' + (escaped ? code : escape2(code, true)) + "</code></pre>\n";
1474
+ }
1475
+ blockquote({ tokens }) {
1476
+ const body = this.parser.parse(tokens);
1477
+ return `<blockquote>
1478
+ ${body}</blockquote>
1479
+ `;
1480
+ }
1481
+ html({ text }) {
1482
+ return text;
1483
+ }
1484
+ heading({ tokens, depth }) {
1485
+ return `<h${depth}>${this.parser.parseInline(tokens)}</h${depth}>
1486
+ `;
1487
+ }
1488
+ hr(token) {
1489
+ return "<hr>\n";
1490
+ }
1491
+ list(token) {
1492
+ const ordered = token.ordered;
1493
+ const start = token.start;
1494
+ let body = "";
1495
+ for (let j = 0; j < token.items.length; j++) {
1496
+ const item = token.items[j];
1497
+ body += this.listitem(item);
1498
+ }
1499
+ const type = ordered ? "ol" : "ul";
1500
+ const startAttr = ordered && start !== 1 ? ' start="' + start + '"' : "";
1501
+ return "<" + type + startAttr + ">\n" + body + "</" + type + ">\n";
1502
+ }
1503
+ listitem(item) {
1504
+ let itemBody = "";
1505
+ if (item.task) {
1506
+ const checkbox = this.checkbox({ checked: !!item.checked });
1507
+ if (item.loose) {
1508
+ if (item.tokens[0]?.type === "paragraph") {
1509
+ item.tokens[0].text = checkbox + " " + item.tokens[0].text;
1510
+ if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
1511
+ item.tokens[0].tokens[0].text = checkbox + " " + escape2(item.tokens[0].tokens[0].text);
1512
+ item.tokens[0].tokens[0].escaped = true;
1513
+ }
1514
+ } else {
1515
+ item.tokens.unshift({
1516
+ type: "text",
1517
+ raw: checkbox + " ",
1518
+ text: checkbox + " ",
1519
+ escaped: true
1520
+ });
1521
+ }
1522
+ } else {
1523
+ itemBody += checkbox + " ";
1524
+ }
1525
+ }
1526
+ itemBody += this.parser.parse(item.tokens, !!item.loose);
1527
+ return `<li>${itemBody}</li>
1528
+ `;
1529
+ }
1530
+ checkbox({ checked }) {
1531
+ return "<input " + (checked ? 'checked="" ' : "") + 'disabled="" type="checkbox">';
1532
+ }
1533
+ paragraph({ tokens }) {
1534
+ return `<p>${this.parser.parseInline(tokens)}</p>
1535
+ `;
1536
+ }
1537
+ table(token) {
1538
+ let header = "";
1539
+ let cell = "";
1540
+ for (let j = 0; j < token.header.length; j++) {
1541
+ cell += this.tablecell(token.header[j]);
1542
+ }
1543
+ header += this.tablerow({ text: cell });
1544
+ let body = "";
1545
+ for (let j = 0; j < token.rows.length; j++) {
1546
+ const row = token.rows[j];
1547
+ cell = "";
1548
+ for (let k = 0; k < row.length; k++) {
1549
+ cell += this.tablecell(row[k]);
1550
+ }
1551
+ body += this.tablerow({ text: cell });
1552
+ }
1553
+ if (body) body = `<tbody>${body}</tbody>`;
1554
+ return "<table>\n<thead>\n" + header + "</thead>\n" + body + "</table>\n";
1555
+ }
1556
+ tablerow({ text }) {
1557
+ return `<tr>
1558
+ ${text}</tr>
1559
+ `;
1560
+ }
1561
+ tablecell(token) {
1562
+ const content = this.parser.parseInline(token.tokens);
1563
+ const type = token.header ? "th" : "td";
1564
+ const tag2 = token.align ? `<${type} align="${token.align}">` : `<${type}>`;
1565
+ return tag2 + content + `</${type}>
1566
+ `;
1567
+ }
1568
+ /**
1569
+ * span level renderer
1570
+ */
1571
+ strong({ tokens }) {
1572
+ return `<strong>${this.parser.parseInline(tokens)}</strong>`;
1573
+ }
1574
+ em({ tokens }) {
1575
+ return `<em>${this.parser.parseInline(tokens)}</em>`;
1576
+ }
1577
+ codespan({ text }) {
1578
+ return `<code>${escape2(text, true)}</code>`;
1579
+ }
1580
+ br(token) {
1581
+ return "<br>";
1582
+ }
1583
+ del({ tokens }) {
1584
+ return `<del>${this.parser.parseInline(tokens)}</del>`;
1585
+ }
1586
+ link({ href, title, tokens }) {
1587
+ const text = this.parser.parseInline(tokens);
1588
+ const cleanHref = cleanUrl(href);
1589
+ if (cleanHref === null) {
1590
+ return text;
1591
+ }
1592
+ href = cleanHref;
1593
+ let out = '<a href="' + href + '"';
1594
+ if (title) {
1595
+ out += ' title="' + escape2(title) + '"';
1596
+ }
1597
+ out += ">" + text + "</a>";
1598
+ return out;
1599
+ }
1600
+ image({ href, title, text, tokens }) {
1601
+ if (tokens) {
1602
+ text = this.parser.parseInline(tokens, this.parser.textRenderer);
1603
+ }
1604
+ const cleanHref = cleanUrl(href);
1605
+ if (cleanHref === null) {
1606
+ return escape2(text);
1607
+ }
1608
+ href = cleanHref;
1609
+ let out = `<img src="${href}" alt="${text}"`;
1610
+ if (title) {
1611
+ out += ` title="${escape2(title)}"`;
1612
+ }
1613
+ out += ">";
1614
+ return out;
1615
+ }
1616
+ text(token) {
1617
+ return "tokens" in token && token.tokens ? this.parser.parseInline(token.tokens) : "escaped" in token && token.escaped ? token.text : escape2(token.text);
1618
+ }
1619
+ };
1620
+
1621
+ // src/TextRenderer.ts
1622
+ var _TextRenderer = class {
1623
+ // no need for block level renderers
1624
+ strong({ text }) {
1625
+ return text;
1626
+ }
1627
+ em({ text }) {
1628
+ return text;
1629
+ }
1630
+ codespan({ text }) {
1631
+ return text;
1632
+ }
1633
+ del({ text }) {
1634
+ return text;
1635
+ }
1636
+ html({ text }) {
1637
+ return text;
1638
+ }
1639
+ text({ text }) {
1640
+ return text;
1641
+ }
1642
+ link({ text }) {
1643
+ return "" + text;
1644
+ }
1645
+ image({ text }) {
1646
+ return "" + text;
1647
+ }
1648
+ br() {
1649
+ return "";
1650
+ }
1651
+ };
1652
+
1653
+ // src/Parser.ts
1654
+ var _Parser = class __Parser {
1655
+ options;
1656
+ renderer;
1657
+ textRenderer;
1658
+ constructor(options2) {
1659
+ this.options = options2 || _defaults;
1660
+ this.options.renderer = this.options.renderer || new _Renderer();
1661
+ this.renderer = this.options.renderer;
1662
+ this.renderer.options = this.options;
1663
+ this.renderer.parser = this;
1664
+ this.textRenderer = new _TextRenderer();
1665
+ }
1666
+ /**
1667
+ * Static Parse Method
1668
+ */
1669
+ static parse(tokens, options2) {
1670
+ const parser2 = new __Parser(options2);
1671
+ return parser2.parse(tokens);
1672
+ }
1673
+ /**
1674
+ * Static Parse Inline Method
1675
+ */
1676
+ static parseInline(tokens, options2) {
1677
+ const parser2 = new __Parser(options2);
1678
+ return parser2.parseInline(tokens);
1679
+ }
1680
+ /**
1681
+ * Parse Loop
1682
+ */
1683
+ parse(tokens, top = true) {
1684
+ let out = "";
1685
+ for (let i = 0; i < tokens.length; i++) {
1686
+ const anyToken = tokens[i];
1687
+ if (this.options.extensions?.renderers?.[anyToken.type]) {
1688
+ const genericToken = anyToken;
1689
+ const ret = this.options.extensions.renderers[genericToken.type].call({ parser: this }, genericToken);
1690
+ if (ret !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(genericToken.type)) {
1691
+ out += ret || "";
1692
+ continue;
1693
+ }
1694
+ }
1695
+ const token = anyToken;
1696
+ switch (token.type) {
1697
+ case "space": {
1698
+ out += this.renderer.space(token);
1699
+ continue;
1700
+ }
1701
+ case "hr": {
1702
+ out += this.renderer.hr(token);
1703
+ continue;
1704
+ }
1705
+ case "heading": {
1706
+ out += this.renderer.heading(token);
1707
+ continue;
1708
+ }
1709
+ case "code": {
1710
+ out += this.renderer.code(token);
1711
+ continue;
1712
+ }
1713
+ case "table": {
1714
+ out += this.renderer.table(token);
1715
+ continue;
1716
+ }
1717
+ case "blockquote": {
1718
+ out += this.renderer.blockquote(token);
1719
+ continue;
1720
+ }
1721
+ case "list": {
1722
+ out += this.renderer.list(token);
1723
+ continue;
1724
+ }
1725
+ case "html": {
1726
+ out += this.renderer.html(token);
1727
+ continue;
1728
+ }
1729
+ case "paragraph": {
1730
+ out += this.renderer.paragraph(token);
1731
+ continue;
1732
+ }
1733
+ case "text": {
1734
+ let textToken = token;
1735
+ let body = this.renderer.text(textToken);
1736
+ while (i + 1 < tokens.length && tokens[i + 1].type === "text") {
1737
+ textToken = tokens[++i];
1738
+ body += "\n" + this.renderer.text(textToken);
1739
+ }
1740
+ if (top) {
1741
+ out += this.renderer.paragraph({
1742
+ type: "paragraph",
1743
+ raw: body,
1744
+ text: body,
1745
+ tokens: [{ type: "text", raw: body, text: body, escaped: true }]
1746
+ });
1747
+ } else {
1748
+ out += body;
1749
+ }
1750
+ continue;
1751
+ }
1752
+ default: {
1753
+ const errMsg = 'Token with "' + token.type + '" type was not found.';
1754
+ if (this.options.silent) {
1755
+ console.error(errMsg);
1756
+ return "";
1757
+ } else {
1758
+ throw new Error(errMsg);
1759
+ }
1760
+ }
1761
+ }
1762
+ }
1763
+ return out;
1764
+ }
1765
+ /**
1766
+ * Parse Inline Tokens
1767
+ */
1768
+ parseInline(tokens, renderer = this.renderer) {
1769
+ let out = "";
1770
+ for (let i = 0; i < tokens.length; i++) {
1771
+ const anyToken = tokens[i];
1772
+ if (this.options.extensions?.renderers?.[anyToken.type]) {
1773
+ const ret = this.options.extensions.renderers[anyToken.type].call({ parser: this }, anyToken);
1774
+ if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(anyToken.type)) {
1775
+ out += ret || "";
1776
+ continue;
1777
+ }
1778
+ }
1779
+ const token = anyToken;
1780
+ switch (token.type) {
1781
+ case "escape": {
1782
+ out += renderer.text(token);
1783
+ break;
1784
+ }
1785
+ case "html": {
1786
+ out += renderer.html(token);
1787
+ break;
1788
+ }
1789
+ case "link": {
1790
+ out += renderer.link(token);
1791
+ break;
1792
+ }
1793
+ case "image": {
1794
+ out += renderer.image(token);
1795
+ break;
1796
+ }
1797
+ case "strong": {
1798
+ out += renderer.strong(token);
1799
+ break;
1800
+ }
1801
+ case "em": {
1802
+ out += renderer.em(token);
1803
+ break;
1804
+ }
1805
+ case "codespan": {
1806
+ out += renderer.codespan(token);
1807
+ break;
1808
+ }
1809
+ case "br": {
1810
+ out += renderer.br(token);
1811
+ break;
1812
+ }
1813
+ case "del": {
1814
+ out += renderer.del(token);
1815
+ break;
1816
+ }
1817
+ case "text": {
1818
+ out += renderer.text(token);
1819
+ break;
1820
+ }
1821
+ default: {
1822
+ const errMsg = 'Token with "' + token.type + '" type was not found.';
1823
+ if (this.options.silent) {
1824
+ console.error(errMsg);
1825
+ return "";
1826
+ } else {
1827
+ throw new Error(errMsg);
1828
+ }
1829
+ }
1830
+ }
1831
+ }
1832
+ return out;
1833
+ }
1834
+ };
1835
+
1836
+ // src/Hooks.ts
1837
+ var _Hooks = class {
1838
+ options;
1839
+ block;
1840
+ constructor(options2) {
1841
+ this.options = options2 || _defaults;
1842
+ }
1843
+ static passThroughHooks = /* @__PURE__ */ new Set([
1844
+ "preprocess",
1845
+ "postprocess",
1846
+ "processAllTokens"
1847
+ ]);
1848
+ /**
1849
+ * Process markdown before marked
1850
+ */
1851
+ preprocess(markdown) {
1852
+ return markdown;
1853
+ }
1854
+ /**
1855
+ * Process HTML after marked is finished
1856
+ */
1857
+ postprocess(html2) {
1858
+ return html2;
1859
+ }
1860
+ /**
1861
+ * Process all tokens before walk tokens
1862
+ */
1863
+ processAllTokens(tokens) {
1864
+ return tokens;
1865
+ }
1866
+ /**
1867
+ * Provide function to tokenize markdown
1868
+ */
1869
+ provideLexer() {
1870
+ return this.block ? _Lexer.lex : _Lexer.lexInline;
1871
+ }
1872
+ /**
1873
+ * Provide function to parse tokens
1874
+ */
1875
+ provideParser() {
1876
+ return this.block ? _Parser.parse : _Parser.parseInline;
1877
+ }
1878
+ };
1879
+
1880
+ // src/Instance.ts
1881
+ var Marked = class {
1882
+ defaults = _getDefaults();
1883
+ options = this.setOptions;
1884
+ parse = this.parseMarkdown(true);
1885
+ parseInline = this.parseMarkdown(false);
1886
+ Parser = _Parser;
1887
+ Renderer = _Renderer;
1888
+ TextRenderer = _TextRenderer;
1889
+ Lexer = _Lexer;
1890
+ Tokenizer = _Tokenizer;
1891
+ Hooks = _Hooks;
1892
+ constructor(...args) {
1893
+ this.use(...args);
1894
+ }
1895
+ /**
1896
+ * Run callback for every token
1897
+ */
1898
+ walkTokens(tokens, callback) {
1899
+ let values = [];
1900
+ for (const token of tokens) {
1901
+ values = values.concat(callback.call(this, token));
1902
+ switch (token.type) {
1903
+ case "table": {
1904
+ const tableToken = token;
1905
+ for (const cell of tableToken.header) {
1906
+ values = values.concat(this.walkTokens(cell.tokens, callback));
1907
+ }
1908
+ for (const row of tableToken.rows) {
1909
+ for (const cell of row) {
1910
+ values = values.concat(this.walkTokens(cell.tokens, callback));
1911
+ }
1912
+ }
1913
+ break;
1914
+ }
1915
+ case "list": {
1916
+ const listToken = token;
1917
+ values = values.concat(this.walkTokens(listToken.items, callback));
1918
+ break;
1919
+ }
1920
+ default: {
1921
+ const genericToken = token;
1922
+ if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
1923
+ this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
1924
+ const tokens2 = genericToken[childTokens].flat(Infinity);
1925
+ values = values.concat(this.walkTokens(tokens2, callback));
1926
+ });
1927
+ } else if (genericToken.tokens) {
1928
+ values = values.concat(this.walkTokens(genericToken.tokens, callback));
1929
+ }
1930
+ }
1931
+ }
1932
+ }
1933
+ return values;
1934
+ }
1935
+ use(...args) {
1936
+ const extensions = this.defaults.extensions || { renderers: {}, childTokens: {} };
1937
+ args.forEach((pack) => {
1938
+ const opts = { ...pack };
1939
+ opts.async = this.defaults.async || opts.async || false;
1940
+ if (pack.extensions) {
1941
+ pack.extensions.forEach((ext) => {
1942
+ if (!ext.name) {
1943
+ throw new Error("extension name required");
1944
+ }
1945
+ if ("renderer" in ext) {
1946
+ const prevRenderer = extensions.renderers[ext.name];
1947
+ if (prevRenderer) {
1948
+ extensions.renderers[ext.name] = function(...args2) {
1949
+ let ret = ext.renderer.apply(this, args2);
1950
+ if (ret === false) {
1951
+ ret = prevRenderer.apply(this, args2);
1952
+ }
1953
+ return ret;
1954
+ };
1955
+ } else {
1956
+ extensions.renderers[ext.name] = ext.renderer;
1957
+ }
1958
+ }
1959
+ if ("tokenizer" in ext) {
1960
+ if (!ext.level || ext.level !== "block" && ext.level !== "inline") {
1961
+ throw new Error("extension level must be 'block' or 'inline'");
1962
+ }
1963
+ const extLevel = extensions[ext.level];
1964
+ if (extLevel) {
1965
+ extLevel.unshift(ext.tokenizer);
1966
+ } else {
1967
+ extensions[ext.level] = [ext.tokenizer];
1968
+ }
1969
+ if (ext.start) {
1970
+ if (ext.level === "block") {
1971
+ if (extensions.startBlock) {
1972
+ extensions.startBlock.push(ext.start);
1973
+ } else {
1974
+ extensions.startBlock = [ext.start];
1975
+ }
1976
+ } else if (ext.level === "inline") {
1977
+ if (extensions.startInline) {
1978
+ extensions.startInline.push(ext.start);
1979
+ } else {
1980
+ extensions.startInline = [ext.start];
1981
+ }
1982
+ }
1983
+ }
1984
+ }
1985
+ if ("childTokens" in ext && ext.childTokens) {
1986
+ extensions.childTokens[ext.name] = ext.childTokens;
1987
+ }
1988
+ });
1989
+ opts.extensions = extensions;
1990
+ }
1991
+ if (pack.renderer) {
1992
+ const renderer = this.defaults.renderer || new _Renderer(this.defaults);
1993
+ for (const prop in pack.renderer) {
1994
+ if (!(prop in renderer)) {
1995
+ throw new Error(`renderer '${prop}' does not exist`);
1996
+ }
1997
+ if (["options", "parser"].includes(prop)) {
1998
+ continue;
1999
+ }
2000
+ const rendererProp = prop;
2001
+ const rendererFunc = pack.renderer[rendererProp];
2002
+ const prevRenderer = renderer[rendererProp];
2003
+ renderer[rendererProp] = (...args2) => {
2004
+ let ret = rendererFunc.apply(renderer, args2);
2005
+ if (ret === false) {
2006
+ ret = prevRenderer.apply(renderer, args2);
2007
+ }
2008
+ return ret || "";
2009
+ };
2010
+ }
2011
+ opts.renderer = renderer;
2012
+ }
2013
+ if (pack.tokenizer) {
2014
+ const tokenizer = this.defaults.tokenizer || new _Tokenizer(this.defaults);
2015
+ for (const prop in pack.tokenizer) {
2016
+ if (!(prop in tokenizer)) {
2017
+ throw new Error(`tokenizer '${prop}' does not exist`);
2018
+ }
2019
+ if (["options", "rules", "lexer"].includes(prop)) {
2020
+ continue;
2021
+ }
2022
+ const tokenizerProp = prop;
2023
+ const tokenizerFunc = pack.tokenizer[tokenizerProp];
2024
+ const prevTokenizer = tokenizer[tokenizerProp];
2025
+ tokenizer[tokenizerProp] = (...args2) => {
2026
+ let ret = tokenizerFunc.apply(tokenizer, args2);
2027
+ if (ret === false) {
2028
+ ret = prevTokenizer.apply(tokenizer, args2);
2029
+ }
2030
+ return ret;
2031
+ };
2032
+ }
2033
+ opts.tokenizer = tokenizer;
2034
+ }
2035
+ if (pack.hooks) {
2036
+ const hooks = this.defaults.hooks || new _Hooks();
2037
+ for (const prop in pack.hooks) {
2038
+ if (!(prop in hooks)) {
2039
+ throw new Error(`hook '${prop}' does not exist`);
2040
+ }
2041
+ if (["options", "block"].includes(prop)) {
2042
+ continue;
2043
+ }
2044
+ const hooksProp = prop;
2045
+ const hooksFunc = pack.hooks[hooksProp];
2046
+ const prevHook = hooks[hooksProp];
2047
+ if (_Hooks.passThroughHooks.has(prop)) {
2048
+ hooks[hooksProp] = (arg) => {
2049
+ if (this.defaults.async) {
2050
+ return Promise.resolve(hooksFunc.call(hooks, arg)).then((ret2) => {
2051
+ return prevHook.call(hooks, ret2);
2052
+ });
2053
+ }
2054
+ const ret = hooksFunc.call(hooks, arg);
2055
+ return prevHook.call(hooks, ret);
2056
+ };
2057
+ } else {
2058
+ hooks[hooksProp] = (...args2) => {
2059
+ let ret = hooksFunc.apply(hooks, args2);
2060
+ if (ret === false) {
2061
+ ret = prevHook.apply(hooks, args2);
2062
+ }
2063
+ return ret;
2064
+ };
2065
+ }
2066
+ }
2067
+ opts.hooks = hooks;
2068
+ }
2069
+ if (pack.walkTokens) {
2070
+ const walkTokens2 = this.defaults.walkTokens;
2071
+ const packWalktokens = pack.walkTokens;
2072
+ opts.walkTokens = function(token) {
2073
+ let values = [];
2074
+ values.push(packWalktokens.call(this, token));
2075
+ if (walkTokens2) {
2076
+ values = values.concat(walkTokens2.call(this, token));
2077
+ }
2078
+ return values;
2079
+ };
2080
+ }
2081
+ this.defaults = { ...this.defaults, ...opts };
2082
+ });
2083
+ return this;
2084
+ }
2085
+ setOptions(opt) {
2086
+ this.defaults = { ...this.defaults, ...opt };
2087
+ return this;
2088
+ }
2089
+ lexer(src, options2) {
2090
+ return _Lexer.lex(src, options2 ?? this.defaults);
2091
+ }
2092
+ parser(tokens, options2) {
2093
+ return _Parser.parse(tokens, options2 ?? this.defaults);
2094
+ }
2095
+ parseMarkdown(blockType) {
2096
+ const parse2 = (src, options2) => {
2097
+ const origOpt = { ...options2 };
2098
+ const opt = { ...this.defaults, ...origOpt };
2099
+ const throwError = this.onError(!!opt.silent, !!opt.async);
2100
+ if (this.defaults.async === true && origOpt.async === false) {
2101
+ return throwError(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
2102
+ }
2103
+ if (typeof src === "undefined" || src === null) {
2104
+ return throwError(new Error("marked(): input parameter is undefined or null"));
2105
+ }
2106
+ if (typeof src !== "string") {
2107
+ return throwError(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(src) + ", string expected"));
2108
+ }
2109
+ if (opt.hooks) {
2110
+ opt.hooks.options = opt;
2111
+ opt.hooks.block = blockType;
2112
+ }
2113
+ const lexer2 = opt.hooks ? opt.hooks.provideLexer() : blockType ? _Lexer.lex : _Lexer.lexInline;
2114
+ const parser2 = opt.hooks ? opt.hooks.provideParser() : blockType ? _Parser.parse : _Parser.parseInline;
2115
+ if (opt.async) {
2116
+ return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then((src2) => lexer2(src2, opt)).then((tokens) => opt.hooks ? opt.hooks.processAllTokens(tokens) : tokens).then((tokens) => opt.walkTokens ? Promise.all(this.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then((tokens) => parser2(tokens, opt)).then((html2) => opt.hooks ? opt.hooks.postprocess(html2) : html2).catch(throwError);
2117
+ }
2118
+ try {
2119
+ if (opt.hooks) {
2120
+ src = opt.hooks.preprocess(src);
2121
+ }
2122
+ let tokens = lexer2(src, opt);
2123
+ if (opt.hooks) {
2124
+ tokens = opt.hooks.processAllTokens(tokens);
2125
+ }
2126
+ if (opt.walkTokens) {
2127
+ this.walkTokens(tokens, opt.walkTokens);
2128
+ }
2129
+ let html2 = parser2(tokens, opt);
2130
+ if (opt.hooks) {
2131
+ html2 = opt.hooks.postprocess(html2);
2132
+ }
2133
+ return html2;
2134
+ } catch (e) {
2135
+ return throwError(e);
2136
+ }
2137
+ };
2138
+ return parse2;
2139
+ }
2140
+ onError(silent, async) {
2141
+ return (e) => {
2142
+ e.message += "\nPlease report this to https://github.com/markedjs/marked.";
2143
+ if (silent) {
2144
+ const msg = "<p>An error occurred:</p><pre>" + escape2(e.message + "", true) + "</pre>";
2145
+ if (async) {
2146
+ return Promise.resolve(msg);
2147
+ }
2148
+ return msg;
2149
+ }
2150
+ if (async) {
2151
+ return Promise.reject(e);
2152
+ }
2153
+ throw e;
2154
+ };
2155
+ }
2156
+ };
2157
+
2158
+ // src/marked.ts
2159
+ var markedInstance = new Marked();
2160
+ function marked(src, opt) {
2161
+ return markedInstance.parse(src, opt);
2162
+ }
2163
+ marked.options = marked.setOptions = function(options2) {
2164
+ markedInstance.setOptions(options2);
2165
+ marked.defaults = markedInstance.defaults;
2166
+ changeDefaults(marked.defaults);
2167
+ return marked;
2168
+ };
2169
+ marked.getDefaults = _getDefaults;
2170
+ marked.defaults = _defaults;
2171
+ marked.use = function(...args) {
2172
+ markedInstance.use(...args);
2173
+ marked.defaults = markedInstance.defaults;
2174
+ changeDefaults(marked.defaults);
2175
+ return marked;
2176
+ };
2177
+ marked.walkTokens = function(tokens, callback) {
2178
+ return markedInstance.walkTokens(tokens, callback);
2179
+ };
2180
+ marked.parseInline = markedInstance.parseInline;
2181
+ marked.Parser = _Parser;
2182
+ marked.parser = _Parser.parse;
2183
+ marked.Renderer = _Renderer;
2184
+ marked.TextRenderer = _TextRenderer;
2185
+ marked.Lexer = _Lexer;
2186
+ marked.lexer = _Lexer.lex;
2187
+ marked.Tokenizer = _Tokenizer;
2188
+ marked.Hooks = _Hooks;
2189
+ marked.parse = marked;
2190
+ var options = marked.options;
2191
+ var setOptions = marked.setOptions;
2192
+ var use = marked.use;
2193
+ var walkTokens = marked.walkTokens;
2194
+ var parseInline = marked.parseInline;
2195
+ var parse = marked;
2196
+ var parser = _Parser.parse;
2197
+ var lexer = _Lexer.lex;
2198
+
2199
+ //# sourceMappingURL=marked.esm.js.map
2200
+
2201
+
2202
+ /***/ })
2203
+
2204
+ }])
2205
+ //# sourceMappingURL=vendors-node_modules_marked_lib_marked_esm_js.js.map