@clevertask/scribe 0.0.3 → 0.0.4

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.
@@ -1,11 +1,11 @@
1
- var ii = Object.defineProperty;
2
- var ri = (h, e, t) => e in h ? ii(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t;
3
- var S = (h, e, t) => ri(h, typeof e != "symbol" ? e + "" : e, t);
4
- var Ui = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
- function si(h) {
1
+ var ai = Object.defineProperty;
2
+ var ci = (h, e, t) => e in h ? ai(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t;
3
+ var y = (h, e, t) => ci(h, typeof e != "symbol" ? e + "" : e, t);
4
+ var Qi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
+ function ui(h) {
6
6
  return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
7
7
  }
8
- function ht() {
8
+ function gt() {
9
9
  return {
10
10
  async: !1,
11
11
  breaks: !1,
@@ -19,23 +19,23 @@ function ht() {
19
19
  walkTokens: null
20
20
  };
21
21
  }
22
- let ie = ht();
23
- function pn(h) {
24
- ie = h;
22
+ let re = gt();
23
+ function fn(h) {
24
+ re = h;
25
25
  }
26
26
  const Ee = { exec: () => null };
27
- function y(h, e = "") {
27
+ function E(h, e = "") {
28
28
  let t = typeof h == "string" ? h : h.source;
29
29
  const n = {
30
30
  replace: (o, r) => {
31
31
  let s = typeof r == "string" ? r : r.source;
32
- return s = s.replace(F.caret, "$1"), t = t.replace(o, s), n;
32
+ return s = s.replace(H.caret, "$1"), t = t.replace(o, s), n;
33
33
  },
34
34
  getRegex: () => new RegExp(t, e)
35
35
  };
36
36
  return n;
37
37
  }
38
- const F = {
38
+ const H = {
39
39
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
40
40
  outputLinkReplace: /\\([\[\]])/g,
41
41
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -92,110 +92,112 @@ const F = {
92
92
  fencesBeginRegex: (h) => new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:\`\`\`|~~~)`),
93
93
  headingBeginRegex: (h) => new RegExp(`^ {0,${Math.min(3, h - 1)}}#`),
94
94
  htmlBeginRegex: (h) => new RegExp(`^ {0,${Math.min(3, h - 1)}}<(?:[a-z].*>|!--)`, "i")
95
- }, oi = /^(?:[ \t]*(?:\n|$))+/, li = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ai = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Se = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ci = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, hn = /(?:[*+-]|\d{1,9}[.)])/, fn = y(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, hn).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/).getRegex(), ft = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ui = /^[^\n]+/, gt = /(?!\s*\])(?:\\.|[^\[\]\\])+/, pi = y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", gt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hi = y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, hn).getRegex(), He = "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", dt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, fi = y("^ {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|$))", "i").replace("comment", dt).replace("tag", He).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), gn = y(ft).replace("hr", Se).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", He).getRegex(), gi = y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", gn).getRegex(), mt = {
96
- blockquote: gi,
97
- code: li,
98
- def: pi,
99
- fences: ai,
100
- heading: ci,
101
- hr: Se,
102
- html: fi,
103
- lheading: fn,
104
- list: hi,
105
- newline: oi,
106
- paragraph: gn,
95
+ }, pi = /^(?:[ \t]*(?:\n|$))+/, hi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, fi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ye = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, gi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, dt = /(?:[*+-]|\d{1,9}[.)])/, gn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, dn = E(gn).replace(/bull/g, dt).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(), di = E(gn).replace(/bull/g, dt).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(), mt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, mi = /^[^\n]+/, kt = /(?!\s*\])(?:\\.|[^\[\]\\])+/, ki = E(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", kt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), bi = E(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, dt).getRegex(), Ge = "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", bt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xi = E("^ {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|$))", "i").replace("comment", bt).replace("tag", Ge).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), mn = E(mt).replace("hr", ye).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", Ge).getRegex(), Ti = E(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", mn).getRegex(), xt = {
96
+ blockquote: Ti,
97
+ code: hi,
98
+ def: ki,
99
+ fences: fi,
100
+ heading: gi,
101
+ hr: ye,
102
+ html: xi,
103
+ lheading: dn,
104
+ list: bi,
105
+ newline: pi,
106
+ paragraph: mn,
107
107
  table: Ee,
108
- text: ui
109
- }, nn = y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Se).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", He).getRegex(), di = {
110
- ...mt,
111
- table: nn,
112
- paragraph: y(ft).replace("hr", Se).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", nn).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", He).getRegex()
113
- }, mi = {
114
- ...mt,
115
- html: y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", dt).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(),
108
+ text: mi
109
+ }, sn = E("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ye).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", Ge).getRegex(), wi = {
110
+ ...xt,
111
+ lheading: di,
112
+ table: sn,
113
+ paragraph: E(mt).replace("hr", ye).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", sn).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", Ge).getRegex()
114
+ }, _i = {
115
+ ...xt,
116
+ html: E(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", bt).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(),
116
117
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
117
118
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
118
119
  fences: Ee,
119
120
  // fences not supported
120
121
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
121
- paragraph: y(ft).replace("hr", Se).replace("heading", ` *#{1,6} *[^
122
- ]`).replace("lheading", fn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
123
- }, dn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ki = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, mn = /^( {2,}|\\)\n(?!\s*$)/, bi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ge = /[\p{P}\p{S}]/u, kt = /[\s\p{P}\p{S}]/u, kn = /[^\s\p{P}\p{S}]/u, xi = y(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, kt).getRegex(), Ti = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, wi = y(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, "u").replace(/punct/g, Ge).getRegex(), _i = y("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, kt).replace(/punct/g, Ge).getRegex(), Ai = y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, kt).replace(/punct/g, Ge).getRegex(), Ei = y(/\\(punct)/, "gu").replace(/punct/g, Ge).getRegex(), yi = y(/^<(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(), Si = y(dt).replace("(?:-->|$)", "-->").getRegex(), Ri = y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Si).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ue = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Li = y(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Ue).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), bn = y(/^!?\[(label)\]\[(ref)\]/).replace("label", Ue).replace("ref", gt).getRegex(), xn = y(/^!?\[(ref)\](?:\[\])?/).replace("ref", gt).getRegex(), Ii = y("reflink|nolink(?!\\()", "g").replace("reflink", bn).replace("nolink", xn).getRegex(), bt = {
122
+ paragraph: E(mt).replace("hr", ye).replace("heading", ` *#{1,6} *[^
123
+ ]`).replace("lheading", dn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
124
+ }, Ai = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ei = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, kn = /^( {2,}|\\)\n(?!\s*$)/, Si = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qe = /[\p{P}\p{S}]/u, Tt = /[\s\p{P}\p{S}]/u, bn = /[^\s\p{P}\p{S}]/u, yi = E(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Tt).getRegex(), xn = /(?!~)[\p{P}\p{S}]/u, Ri = /(?!~)[\s\p{P}\p{S}]/u, Li = /(?:[^\s\p{P}\p{S}]|~)/u, Ii = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Tn = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ci = E(Tn, "u").replace(/punct/g, qe).getRegex(), Oi = E(Tn, "u").replace(/punct/g, xn).getRegex(), wn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Di = E(wn, "gu").replace(/notPunctSpace/g, bn).replace(/punctSpace/g, Tt).replace(/punct/g, qe).getRegex(), Ni = E(wn, "gu").replace(/notPunctSpace/g, Li).replace(/punctSpace/g, Ri).replace(/punct/g, xn).getRegex(), Pi = E("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, bn).replace(/punctSpace/g, Tt).replace(/punct/g, qe).getRegex(), Mi = E(/\\(punct)/, "gu").replace(/punct/g, qe).getRegex(), zi = E(/^<(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(), vi = E(bt).replace("(?:-->|$)", "-->").getRegex(), $i = E("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", vi).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Be = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ui = E(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Be).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), _n = E(/^!?\[(label)\]\[(ref)\]/).replace("label", Be).replace("ref", kt).getRegex(), An = E(/^!?\[(ref)\](?:\[\])?/).replace("ref", kt).getRegex(), Bi = E("reflink|nolink(?!\\()", "g").replace("reflink", _n).replace("nolink", An).getRegex(), wt = {
124
125
  _backpedal: Ee,
125
126
  // only used for GFM url
126
- anyPunctuation: Ei,
127
- autolink: yi,
128
- blockSkip: Ti,
129
- br: mn,
130
- code: ki,
127
+ anyPunctuation: Mi,
128
+ autolink: zi,
129
+ blockSkip: Ii,
130
+ br: kn,
131
+ code: Ei,
131
132
  del: Ee,
132
- emStrongLDelim: wi,
133
- emStrongRDelimAst: _i,
134
- emStrongRDelimUnd: Ai,
135
- escape: dn,
136
- link: Li,
137
- nolink: xn,
138
- punctuation: xi,
139
- reflink: bn,
140
- reflinkSearch: Ii,
141
- tag: Ri,
142
- text: bi,
133
+ emStrongLDelim: Ci,
134
+ emStrongRDelimAst: Di,
135
+ emStrongRDelimUnd: Pi,
136
+ escape: Ai,
137
+ link: Ui,
138
+ nolink: An,
139
+ punctuation: yi,
140
+ reflink: _n,
141
+ reflinkSearch: Bi,
142
+ tag: $i,
143
+ text: Si,
143
144
  url: Ee
144
- }, Ci = {
145
- ...bt,
146
- link: y(/^!?\[(label)\]\((.*?)\)/).replace("label", Ue).getRegex(),
147
- reflink: y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ue).getRegex()
148
- }, pt = {
149
- ...bt,
150
- escape: y(dn).replace("])", "~|])").getRegex(),
151
- url: y(/^((?: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(),
145
+ }, Fi = {
146
+ ...wt,
147
+ link: E(/^!?\[(label)\]\((.*?)\)/).replace("label", Be).getRegex(),
148
+ reflink: E(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Be).getRegex()
149
+ }, ft = {
150
+ ...wt,
151
+ emStrongRDelimAst: Ni,
152
+ emStrongLDelim: Oi,
153
+ url: E(/^((?: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(),
152
154
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
153
155
  del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
154
156
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
155
- }, Oi = {
156
- ...pt,
157
- br: y(mn).replace("{2,}", "*").getRegex(),
158
- text: y(pt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
159
- }, $e = {
160
- normal: mt,
161
- gfm: di,
162
- pedantic: mi
157
+ }, Hi = {
158
+ ...ft,
159
+ br: E(kn).replace("{2,}", "*").getRegex(),
160
+ text: E(ft.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
161
+ }, Ue = {
162
+ normal: xt,
163
+ gfm: wi,
164
+ pedantic: _i
163
165
  }, _e = {
164
- normal: bt,
165
- gfm: pt,
166
- breaks: Oi,
167
- pedantic: Ci
168
- }, Di = {
166
+ normal: wt,
167
+ gfm: ft,
168
+ breaks: Hi,
169
+ pedantic: Fi
170
+ }, Gi = {
169
171
  "&": "&amp;",
170
172
  "<": "&lt;",
171
173
  ">": "&gt;",
172
174
  '"': "&quot;",
173
175
  "'": "&#39;"
174
- }, rn = (h) => Di[h];
176
+ }, on = (h) => Gi[h];
175
177
  function X(h, e) {
176
178
  if (e) {
177
- if (F.escapeTest.test(h))
178
- return h.replace(F.escapeReplace, rn);
179
- } else if (F.escapeTestNoEncode.test(h))
180
- return h.replace(F.escapeReplaceNoEncode, rn);
179
+ if (H.escapeTest.test(h))
180
+ return h.replace(H.escapeReplace, on);
181
+ } else if (H.escapeTestNoEncode.test(h))
182
+ return h.replace(H.escapeReplaceNoEncode, on);
181
183
  return h;
182
184
  }
183
- function sn(h) {
185
+ function ln(h) {
184
186
  try {
185
- h = encodeURI(h).replace(F.percentDecode, "%");
187
+ h = encodeURI(h).replace(H.percentDecode, "%");
186
188
  } catch {
187
189
  return null;
188
190
  }
189
191
  return h;
190
192
  }
191
- function on(h, e) {
193
+ function an(h, e) {
192
194
  var r;
193
- const t = h.replace(F.findPipe, (s, l, u) => {
195
+ const t = h.replace(H.findPipe, (s, l, u) => {
194
196
  let a = !1, c = l;
195
197
  for (; --c >= 0 && u[c] === "\\"; )
196
198
  a = !a;
197
199
  return a ? "|" : " |";
198
- }), n = t.split(F.splitPipe);
200
+ }), n = t.split(H.splitPipe);
199
201
  let o = 0;
200
202
  if (n[0].trim() || n.shift(), n.length > 0 && !((r = n.at(-1)) != null && r.trim()) && n.pop(), e)
201
203
  if (n.length > e)
@@ -204,7 +206,7 @@ function on(h, e) {
204
206
  for (; n.length < e; )
205
207
  n.push("");
206
208
  for (; o < n.length; o++)
207
- n[o] = n[o].trim().replace(F.slashPipe, "|");
209
+ n[o] = n[o].trim().replace(H.slashPipe, "|");
208
210
  return n;
209
211
  }
210
212
  function Ae(h, e, t) {
@@ -212,18 +214,11 @@ function Ae(h, e, t) {
212
214
  if (n === 0)
213
215
  return "";
214
216
  let o = 0;
215
- for (; o < n; ) {
216
- const r = h.charAt(n - o - 1);
217
- if (r === e && !t)
218
- o++;
219
- else if (r !== e && t)
220
- o++;
221
- else
222
- break;
223
- }
217
+ for (; o < n && h.charAt(n - o - 1) === e; )
218
+ o++;
224
219
  return h.slice(0, n - o);
225
220
  }
226
- function Ni(h, e) {
221
+ function qi(h, e) {
227
222
  if (h.indexOf(e[1]) === -1)
228
223
  return -1;
229
224
  let t = 0;
@@ -234,31 +229,22 @@ function Ni(h, e) {
234
229
  t++;
235
230
  else if (h[n] === e[1] && (t--, t < 0))
236
231
  return n;
237
- return -1;
232
+ return t > 0 ? -2 : -1;
238
233
  }
239
- function ln(h, e, t, n, o) {
234
+ function cn(h, e, t, n, o) {
240
235
  const r = e.href, s = e.title || null, l = h[1].replace(o.other.outputLinkReplace, "$1");
241
- if (h[0].charAt(0) !== "!") {
242
- n.state.inLink = !0;
243
- const u = {
244
- type: "link",
245
- raw: t,
246
- href: r,
247
- title: s,
248
- text: l,
249
- tokens: n.inlineTokens(l)
250
- };
251
- return n.state.inLink = !1, u;
252
- }
253
- return {
254
- type: "image",
236
+ n.state.inLink = !0;
237
+ const u = {
238
+ type: h[0].charAt(0) === "!" ? "image" : "link",
255
239
  raw: t,
256
240
  href: r,
257
241
  title: s,
258
- text: l
242
+ text: l,
243
+ tokens: n.inlineTokens(l)
259
244
  };
245
+ return n.state.inLink = !1, u;
260
246
  }
261
- function Mi(h, e, t) {
247
+ function Wi(h, e, t) {
262
248
  const n = h.match(t.other.indentCodeCompensation);
263
249
  if (n === null)
264
250
  return e;
@@ -273,14 +259,14 @@ function Mi(h, e, t) {
273
259
  }).join(`
274
260
  `);
275
261
  }
276
- class Be {
262
+ class Fe {
277
263
  // set by the lexer
278
264
  constructor(e) {
279
- S(this, "options");
280
- S(this, "rules");
265
+ y(this, "options");
266
+ y(this, "rules");
281
267
  // set by the lexer
282
- S(this, "lexer");
283
- this.options = e || ie;
268
+ y(this, "lexer");
269
+ this.options = e || re;
284
270
  }
285
271
  space(e) {
286
272
  const t = this.rules.block.newline.exec(e);
@@ -306,7 +292,7 @@ class Be {
306
292
  fences(e) {
307
293
  const t = this.rules.block.fences.exec(e);
308
294
  if (t) {
309
- const n = t[0], o = Mi(n, t[3] || "", this.rules);
295
+ const n = t[0], o = Wi(n, t[3] || "", this.rules);
310
296
  return {
311
297
  type: "code",
312
298
  raw: n,
@@ -369,20 +355,20 @@ ${k}` : k;
369
355
  const m = this.lexer.state.top;
370
356
  if (this.lexer.state.top = !0, this.lexer.blockTokens(k, s, !0), this.lexer.state.top = m, n.length === 0)
371
357
  break;
372
- const x = s.at(-1);
373
- if ((x == null ? void 0 : x.type) === "code")
358
+ const b = s.at(-1);
359
+ if ((b == null ? void 0 : b.type) === "code")
374
360
  break;
375
- if ((x == null ? void 0 : x.type) === "blockquote") {
376
- const R = x, A = R.raw + `
361
+ if ((b == null ? void 0 : b.type) === "blockquote") {
362
+ const L = b, A = L.raw + `
377
363
  ` + n.join(`
378
- `), C = this.blockquote(A);
379
- s[s.length - 1] = C, o = o.substring(0, o.length - R.raw.length) + C.raw, r = r.substring(0, r.length - R.text.length) + C.text;
364
+ `), z = this.blockquote(A);
365
+ s[s.length - 1] = z, o = o.substring(0, o.length - L.raw.length) + z.raw, r = r.substring(0, r.length - L.text.length) + z.text;
380
366
  break;
381
- } else if ((x == null ? void 0 : x.type) === "list") {
382
- const R = x, A = R.raw + `
367
+ } else if ((b == null ? void 0 : b.type) === "list") {
368
+ const L = b, A = L.raw + `
383
369
  ` + n.join(`
384
- `), C = this.list(A);
385
- s[s.length - 1] = C, o = o.substring(0, o.length - x.raw.length) + C.raw, r = r.substring(0, r.length - R.raw.length) + C.raw, n = A.substring(s.at(-1).raw.length).split(`
370
+ `), z = this.list(A);
371
+ s[s.length - 1] = z, o = o.substring(0, o.length - b.raw.length) + z.raw, r = r.substring(0, r.length - L.raw.length) + z.raw, n = A.substring(s.at(-1).raw.length).split(`
386
372
  `);
387
373
  continue;
388
374
  }
@@ -416,44 +402,48 @@ ${k}` : k;
416
402
  break;
417
403
  c = t[0], e = e.substring(c.length);
418
404
  let m = t[2].split(`
419
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (pe) => " ".repeat(3 * pe.length)), x = e.split(`
420
- `, 1)[0], R = !m.trim(), A = 0;
421
- if (this.options.pedantic ? (A = 2, k = m.trimStart()) : R ? A = t[1].length + 1 : (A = t[2].search(this.rules.other.nonSpaceChar), A = A > 4 ? 1 : A, k = m.slice(A), A += t[1].length), R && this.rules.other.blankLine.test(x) && (c += x + `
422
- `, e = e.substring(x.length + 1), a = !0), !a) {
423
- const pe = this.rules.other.nextBulletRegex(A), H = this.rules.other.hrRegex(A), O = this.rules.other.fencesBeginRegex(A), J = this.rules.other.headingBeginRegex(A), $ = this.rules.other.htmlBeginRegex(A);
405
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (Q) => " ".repeat(3 * Q.length)), b = e.split(`
406
+ `, 1)[0], L = !m.trim(), A = 0;
407
+ if (this.options.pedantic ? (A = 2, k = m.trimStart()) : L ? A = t[1].length + 1 : (A = t[2].search(this.rules.other.nonSpaceChar), A = A > 4 ? 1 : A, k = m.slice(A), A += t[1].length), L && this.rules.other.blankLine.test(b) && (c += b + `
408
+ `, e = e.substring(b.length + 1), a = !0), !a) {
409
+ const Q = this.rules.other.nextBulletRegex(A), Re = this.rules.other.hrRegex(A), Le = this.rules.other.fencesBeginRegex(A), G = this.rules.other.headingBeginRegex(A), N = this.rules.other.htmlBeginRegex(A);
424
410
  for (; e; ) {
425
- const he = e.split(`
411
+ const V = e.split(`
426
412
  `, 1)[0];
427
- let b;
428
- if (x = he, this.options.pedantic ? (x = x.replace(this.rules.other.listReplaceNesting, " "), b = x) : b = x.replace(this.rules.other.tabCharGlobal, " "), O.test(x) || J.test(x) || $.test(x) || pe.test(x) || H.test(x))
413
+ let I;
414
+ if (b = V, this.options.pedantic ? (b = b.replace(this.rules.other.listReplaceNesting, " "), I = b) : I = b.replace(this.rules.other.tabCharGlobal, " "), Le.test(b) || G.test(b) || N.test(b) || Q.test(b) || Re.test(b))
429
415
  break;
430
- if (b.search(this.rules.other.nonSpaceChar) >= A || !x.trim())
416
+ if (I.search(this.rules.other.nonSpaceChar) >= A || !b.trim())
431
417
  k += `
432
- ` + b.slice(A);
418
+ ` + I.slice(A);
433
419
  else {
434
- if (R || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || O.test(m) || J.test(m) || H.test(m))
420
+ if (L || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Le.test(m) || G.test(m) || Re.test(m))
435
421
  break;
436
422
  k += `
437
- ` + x;
423
+ ` + b;
438
424
  }
439
- !R && !x.trim() && (R = !0), c += he + `
440
- `, e = e.substring(he.length + 1), m = b.slice(A);
425
+ !L && !b.trim() && (L = !0), c += V + `
426
+ `, e = e.substring(V.length + 1), m = I.slice(A);
441
427
  }
442
428
  }
443
429
  r.loose || (l ? r.loose = !0 : this.rules.other.doubleBlankLine.test(c) && (l = !0));
444
- let C = null, Re;
445
- this.options.gfm && (C = this.rules.other.listIsTask.exec(k), C && (Re = C[0] !== "[ ] ", k = k.replace(this.rules.other.listReplaceTask, ""))), r.items.push({
430
+ let z = null, he;
431
+ this.options.gfm && (z = this.rules.other.listIsTask.exec(k), z && (he = z[0] !== "[ ] ", k = k.replace(this.rules.other.listReplaceTask, ""))), r.items.push({
446
432
  type: "list_item",
447
433
  raw: c,
448
- task: !!C,
449
- checked: Re,
434
+ task: !!z,
435
+ checked: he,
450
436
  loose: !1,
451
437
  text: k,
452
438
  tokens: []
453
439
  }), r.raw += c;
454
440
  }
455
441
  const u = r.items.at(-1);
456
- u && (u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd()), r.raw = r.raw.trimEnd();
442
+ if (u)
443
+ u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
444
+ else
445
+ return;
446
+ r.raw = r.raw.trimEnd();
457
447
  for (let a = 0; a < r.items.length; a++)
458
448
  if (this.lexer.state.top = !1, r.items[a].tokens = this.lexer.blockTokens(r.items[a].text, []), !r.loose) {
459
449
  const c = r.items[a].tokens.filter((m) => m.type === "space"), k = c.length > 0 && c.some((m) => this.rules.other.anyLine.test(m.raw));
@@ -494,7 +484,7 @@ ${k}` : k;
494
484
  const t = this.rules.block.table.exec(e);
495
485
  if (!t || !this.rules.other.tableDelimiter.test(t[2]))
496
486
  return;
497
- const n = on(t[1]), o = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = (l = t[3]) != null && l.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
487
+ const n = an(t[1]), o = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = (l = t[3]) != null && l.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
498
488
  `) : [], s = {
499
489
  type: "table",
500
490
  raw: t[0],
@@ -513,7 +503,7 @@ ${k}` : k;
513
503
  align: s.align[u]
514
504
  });
515
505
  for (const u of r)
516
- s.rows.push(on(u, s.header.length).map((a, c) => ({
506
+ s.rows.push(an(u, s.header.length).map((a, c) => ({
517
507
  text: a,
518
508
  tokens: this.lexer.inline(a),
519
509
  header: !1,
@@ -588,7 +578,9 @@ ${k}` : k;
588
578
  if ((n.length - s.length) % 2 === 0)
589
579
  return;
590
580
  } else {
591
- const s = Ni(t[2], "()");
581
+ const s = qi(t[2], "()");
582
+ if (s === -2)
583
+ return;
592
584
  if (s > -1) {
593
585
  const u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
594
586
  t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, u).trim(), t[3] = "";
@@ -600,7 +592,7 @@ ${k}` : k;
600
592
  s && (o = s[1], r = s[3]);
601
593
  } else
602
594
  r = t[3] ? t[3].slice(1, -1) : "";
603
- return o = o.trim(), this.rules.other.startAngleBracket.test(o) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? o = o.slice(1) : o = o.slice(1, -1)), ln(t, {
595
+ return o = o.trim(), this.rules.other.startAngleBracket.test(o) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? o = o.slice(1) : o = o.slice(1, -1)), cn(t, {
604
596
  href: o && o.replace(this.rules.inline.anyPunctuation, "$1"),
605
597
  title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
606
598
  }, t[0], this.lexer, this.rules);
@@ -618,7 +610,7 @@ ${k}` : k;
618
610
  text: s
619
611
  };
620
612
  }
621
- return ln(n, r, n[0], this.lexer, this.rules);
613
+ return cn(n, r, n[0], this.lexer, this.rules);
622
614
  }
623
615
  }
624
616
  emStrong(e, t, n = "") {
@@ -642,22 +634,22 @@ ${k}` : k;
642
634
  if (a -= u, a > 0)
643
635
  continue;
644
636
  u = Math.min(u, u + a + c);
645
- const m = [...o[0]][0].length, x = e.slice(0, s + o.index + m + u);
637
+ const m = [...o[0]][0].length, b = e.slice(0, s + o.index + m + u);
646
638
  if (Math.min(s, u) % 2) {
647
- const A = x.slice(1, -1);
639
+ const A = b.slice(1, -1);
648
640
  return {
649
641
  type: "em",
650
- raw: x,
642
+ raw: b,
651
643
  text: A,
652
644
  tokens: this.lexer.inlineTokens(A)
653
645
  };
654
646
  }
655
- const R = x.slice(2, -2);
647
+ const L = b.slice(2, -2);
656
648
  return {
657
649
  type: "strong",
658
- raw: x,
659
- text: R,
660
- tokens: this.lexer.inlineTokens(R)
650
+ raw: b,
651
+ text: L,
652
+ tokens: this.lexer.inlineTokens(L)
661
653
  };
662
654
  }
663
655
  }
@@ -753,31 +745,31 @@ ${k}` : k;
753
745
  }
754
746
  }
755
747
  }
756
- class q {
748
+ class W {
757
749
  constructor(e) {
758
- S(this, "tokens");
759
- S(this, "options");
760
- S(this, "state");
761
- S(this, "tokenizer");
762
- S(this, "inlineQueue");
763
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ie, this.options.tokenizer = this.options.tokenizer || new Be(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
750
+ y(this, "tokens");
751
+ y(this, "options");
752
+ y(this, "state");
753
+ y(this, "tokenizer");
754
+ y(this, "inlineQueue");
755
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || re, this.options.tokenizer = this.options.tokenizer || new Fe(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
764
756
  inLink: !1,
765
757
  inRawBlock: !1,
766
758
  top: !0
767
759
  };
768
760
  const t = {
769
- other: F,
770
- block: $e.normal,
761
+ other: H,
762
+ block: Ue.normal,
771
763
  inline: _e.normal
772
764
  };
773
- this.options.pedantic ? (t.block = $e.pedantic, t.inline = _e.pedantic) : this.options.gfm && (t.block = $e.gfm, this.options.breaks ? t.inline = _e.breaks : t.inline = _e.gfm), this.tokenizer.rules = t;
765
+ this.options.pedantic ? (t.block = Ue.pedantic, t.inline = _e.pedantic) : this.options.gfm && (t.block = Ue.gfm, this.options.breaks ? t.inline = _e.breaks : t.inline = _e.gfm), this.tokenizer.rules = t;
774
766
  }
775
767
  /**
776
768
  * Expose Rules
777
769
  */
778
770
  static get rules() {
779
771
  return {
780
- block: $e,
772
+ block: Ue,
781
773
  inline: _e
782
774
  };
783
775
  }
@@ -785,19 +777,19 @@ class q {
785
777
  * Static Lex Method
786
778
  */
787
779
  static lex(e, t) {
788
- return new q(t).lex(e);
780
+ return new W(t).lex(e);
789
781
  }
790
782
  /**
791
783
  * Static Lex Inline Method
792
784
  */
793
785
  static lexInline(e, t) {
794
- return new q(t).inlineTokens(e);
786
+ return new W(t).inlineTokens(e);
795
787
  }
796
788
  /**
797
789
  * Preprocessing
798
790
  */
799
791
  lex(e) {
800
- e = e.replace(F.carriageReturn, `
792
+ e = e.replace(H.carriageReturn, `
801
793
  `), this.blockTokens(e, this.tokens);
802
794
  for (let t = 0; t < this.inlineQueue.length; t++) {
803
795
  const n = this.inlineQueue[t];
@@ -807,7 +799,7 @@ class q {
807
799
  }
808
800
  blockTokens(e, t = [], n = !1) {
809
801
  var o, r, s;
810
- for (this.options.pedantic && (e = e.replace(F.tabCharGlobal, " ").replace(F.spaceLine, "")); e; ) {
802
+ for (this.options.pedantic && (e = e.replace(H.tabCharGlobal, " ").replace(H.spaceLine, "")); e; ) {
811
803
  let l;
812
804
  if ((r = (o = this.options.extensions) == null ? void 0 : o.block) != null && r.some((a) => (l = a.call({ lexer: this }, e, t)) ? (e = e.substring(l.raw.length), t.push(l), !0) : !1))
813
805
  continue;
@@ -919,10 +911,10 @@ class q {
919
911
  for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; )
920
912
  c.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
921
913
  }
922
- for (; (o = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; )
923
- n = n.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
924
914
  for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; )
925
915
  n = n.slice(0, o.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
916
+ for (; (o = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; )
917
+ n = n.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
926
918
  let r = !1, s = "";
927
919
  for (; e; ) {
928
920
  r || (s = ""), r = !1;
@@ -974,10 +966,10 @@ class q {
974
966
  let k = e;
975
967
  if ((a = this.options.extensions) != null && a.startInline) {
976
968
  let m = 1 / 0;
977
- const x = e.slice(1);
978
- let R;
969
+ const b = e.slice(1);
970
+ let L;
979
971
  this.options.extensions.startInline.forEach((A) => {
980
- R = A.call({ lexer: this }, x), typeof R == "number" && R >= 0 && (m = Math.min(m, R));
972
+ L = A.call({ lexer: this }, b), typeof L == "number" && L >= 0 && (m = Math.min(m, L));
981
973
  }), m < 1 / 0 && m >= 0 && (k = e.substring(0, m + 1));
982
974
  }
983
975
  if (c = this.tokenizer.inlineText(k)) {
@@ -998,19 +990,19 @@ class q {
998
990
  return t;
999
991
  }
1000
992
  }
1001
- class Fe {
993
+ class He {
1002
994
  // set by the parser
1003
995
  constructor(e) {
1004
- S(this, "options");
1005
- S(this, "parser");
1006
- this.options = e || ie;
996
+ y(this, "options");
997
+ y(this, "parser");
998
+ this.options = e || re;
1007
999
  }
1008
1000
  space(e) {
1009
1001
  return "";
1010
1002
  }
1011
1003
  code({ text: e, lang: t, escaped: n }) {
1012
1004
  var s;
1013
- const o = (s = (t || "").match(F.notSpaceStart)) == null ? void 0 : s[0], r = e.replace(F.endingNewline, "") + `
1005
+ const o = (s = (t || "").match(H.notSpaceStart)) == null ? void 0 : s[0], r = e.replace(H.endingNewline, "") + `
1014
1006
  `;
1015
1007
  return o ? '<pre><code class="language-' + X(o) + '">' + (n ? r : X(r, !0)) + `</code></pre>
1016
1008
  ` : "<pre><code>" + (n ? r : X(r, !0)) + `</code></pre>
@@ -1114,26 +1106,27 @@ ${e}</tr>
1114
1106
  return `<del>${this.parser.parseInline(e)}</del>`;
1115
1107
  }
1116
1108
  link({ href: e, title: t, tokens: n }) {
1117
- const o = this.parser.parseInline(n), r = sn(e);
1109
+ const o = this.parser.parseInline(n), r = ln(e);
1118
1110
  if (r === null)
1119
1111
  return o;
1120
1112
  e = r;
1121
1113
  let s = '<a href="' + e + '"';
1122
1114
  return t && (s += ' title="' + X(t) + '"'), s += ">" + o + "</a>", s;
1123
1115
  }
1124
- image({ href: e, title: t, text: n }) {
1125
- const o = sn(e);
1126
- if (o === null)
1116
+ image({ href: e, title: t, text: n, tokens: o }) {
1117
+ o && (n = this.parser.parseInline(o, this.parser.textRenderer));
1118
+ const r = ln(e);
1119
+ if (r === null)
1127
1120
  return X(n);
1128
- e = o;
1129
- let r = `<img src="${e}" alt="${n}"`;
1130
- return t && (r += ` title="${X(t)}"`), r += ">", r;
1121
+ e = r;
1122
+ let s = `<img src="${e}" alt="${n}"`;
1123
+ return t && (s += ` title="${X(t)}"`), s += ">", s;
1131
1124
  }
1132
1125
  text(e) {
1133
1126
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : X(e.text);
1134
1127
  }
1135
1128
  }
1136
- class xt {
1129
+ class _t {
1137
1130
  // no need for block level renderers
1138
1131
  strong({ text: e }) {
1139
1132
  return e;
@@ -1165,10 +1158,10 @@ class xt {
1165
1158
  }
1166
1159
  class j {
1167
1160
  constructor(e) {
1168
- S(this, "options");
1169
- S(this, "renderer");
1170
- S(this, "textRenderer");
1171
- this.options = e || ie, this.options.renderer = this.options.renderer || new Fe(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new xt();
1161
+ y(this, "options");
1162
+ y(this, "renderer");
1163
+ y(this, "textRenderer");
1164
+ this.options = e || re, this.options.renderer = this.options.renderer || new He(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new _t();
1172
1165
  }
1173
1166
  /**
1174
1167
  * Static Parse Method
@@ -1326,11 +1319,11 @@ class j {
1326
1319
  return n;
1327
1320
  }
1328
1321
  }
1329
- class ye {
1322
+ class Se {
1330
1323
  constructor(e) {
1331
- S(this, "options");
1332
- S(this, "block");
1333
- this.options = e || ie;
1324
+ y(this, "options");
1325
+ y(this, "block");
1326
+ this.options = e || re;
1334
1327
  }
1335
1328
  /**
1336
1329
  * Process markdown before marked
@@ -1354,7 +1347,7 @@ class ye {
1354
1347
  * Provide function to tokenize markdown
1355
1348
  */
1356
1349
  provideLexer() {
1357
- return this.block ? q.lex : q.lexInline;
1350
+ return this.block ? W.lex : W.lexInline;
1358
1351
  }
1359
1352
  /**
1360
1353
  * Provide function to parse tokens
@@ -1363,23 +1356,23 @@ class ye {
1363
1356
  return this.block ? j.parse : j.parseInline;
1364
1357
  }
1365
1358
  }
1366
- S(ye, "passThroughHooks", /* @__PURE__ */ new Set([
1359
+ y(Se, "passThroughHooks", /* @__PURE__ */ new Set([
1367
1360
  "preprocess",
1368
1361
  "postprocess",
1369
1362
  "processAllTokens"
1370
1363
  ]));
1371
- class Pi {
1364
+ class ji {
1372
1365
  constructor(...e) {
1373
- S(this, "defaults", ht());
1374
- S(this, "options", this.setOptions);
1375
- S(this, "parse", this.parseMarkdown(!0));
1376
- S(this, "parseInline", this.parseMarkdown(!1));
1377
- S(this, "Parser", j);
1378
- S(this, "Renderer", Fe);
1379
- S(this, "TextRenderer", xt);
1380
- S(this, "Lexer", q);
1381
- S(this, "Tokenizer", Be);
1382
- S(this, "Hooks", ye);
1366
+ y(this, "defaults", gt());
1367
+ y(this, "options", this.setOptions);
1368
+ y(this, "parse", this.parseMarkdown(!0));
1369
+ y(this, "parseInline", this.parseMarkdown(!1));
1370
+ y(this, "Parser", j);
1371
+ y(this, "Renderer", He);
1372
+ y(this, "TextRenderer", _t);
1373
+ y(this, "Lexer", W);
1374
+ y(this, "Tokenizer", Fe);
1375
+ y(this, "Hooks", Se);
1383
1376
  this.use(...e);
1384
1377
  }
1385
1378
  /**
@@ -1436,7 +1429,7 @@ class Pi {
1436
1429
  }
1437
1430
  "childTokens" in r && r.childTokens && (t.childTokens[r.name] = r.childTokens);
1438
1431
  }), o.extensions = t), n.renderer) {
1439
- const r = this.defaults.renderer || new Fe(this.defaults);
1432
+ const r = this.defaults.renderer || new He(this.defaults);
1440
1433
  for (const s in n.renderer) {
1441
1434
  if (!(s in r))
1442
1435
  throw new Error(`renderer '${s}' does not exist`);
@@ -1451,7 +1444,7 @@ class Pi {
1451
1444
  o.renderer = r;
1452
1445
  }
1453
1446
  if (n.tokenizer) {
1454
- const r = this.defaults.tokenizer || new Be(this.defaults);
1447
+ const r = this.defaults.tokenizer || new Fe(this.defaults);
1455
1448
  for (const s in n.tokenizer) {
1456
1449
  if (!(s in r))
1457
1450
  throw new Error(`tokenizer '${s}' does not exist`);
@@ -1466,14 +1459,14 @@ class Pi {
1466
1459
  o.tokenizer = r;
1467
1460
  }
1468
1461
  if (n.hooks) {
1469
- const r = this.defaults.hooks || new ye();
1462
+ const r = this.defaults.hooks || new Se();
1470
1463
  for (const s in n.hooks) {
1471
1464
  if (!(s in r))
1472
1465
  throw new Error(`hook '${s}' does not exist`);
1473
1466
  if (["options", "block"].includes(s))
1474
1467
  continue;
1475
1468
  const l = s, u = n.hooks[l], a = r[l];
1476
- ye.passThroughHooks.has(s) ? r[l] = (c) => {
1469
+ Se.passThroughHooks.has(s) ? r[l] = (c) => {
1477
1470
  if (this.defaults.async)
1478
1471
  return Promise.resolve(u.call(r, c)).then((m) => a.call(r, m));
1479
1472
  const k = u.call(r, c);
@@ -1499,7 +1492,7 @@ class Pi {
1499
1492
  return this.defaults = { ...this.defaults, ...e }, this;
1500
1493
  }
1501
1494
  lexer(e, t) {
1502
- return q.lex(e, t ?? this.defaults);
1495
+ return W.lex(e, t ?? this.defaults);
1503
1496
  }
1504
1497
  parser(e, t) {
1505
1498
  return j.parse(e, t ?? this.defaults);
@@ -1514,7 +1507,7 @@ class Pi {
1514
1507
  if (typeof n != "string")
1515
1508
  return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
1516
1509
  s.hooks && (s.hooks.options = s, s.hooks.block = e);
1517
- const u = s.hooks ? s.hooks.provideLexer() : e ? q.lex : q.lexInline, a = s.hooks ? s.hooks.provideParser() : e ? j.parse : j.parseInline;
1510
+ const u = s.hooks ? s.hooks.provideLexer() : e ? W.lex : W.lexInline, a = s.hooks ? s.hooks.provideParser() : e ? j.parse : j.parseInline;
1518
1511
  if (s.async)
1519
1512
  return Promise.resolve(s.hooks ? s.hooks.preprocess(n) : n).then((c) => u(c, s)).then((c) => s.hooks ? s.hooks.processAllTokens(c) : c).then((c) => s.walkTokens ? Promise.all(this.walkTokens(c, s.walkTokens)).then(() => c) : c).then((c) => a(c, s)).then((c) => s.hooks ? s.hooks.postprocess(c) : c).catch(l);
1520
1513
  try {
@@ -1541,43 +1534,43 @@ Please report this to https://github.com/markedjs/marked.`, e) {
1541
1534
  };
1542
1535
  }
1543
1536
  }
1544
- const ne = new Pi();
1545
- function E(h, e) {
1546
- return ne.parse(h, e);
1537
+ const ie = new ji();
1538
+ function S(h, e) {
1539
+ return ie.parse(h, e);
1547
1540
  }
1548
- E.options = E.setOptions = function(h) {
1549
- return ne.setOptions(h), E.defaults = ne.defaults, pn(E.defaults), E;
1541
+ S.options = S.setOptions = function(h) {
1542
+ return ie.setOptions(h), S.defaults = ie.defaults, fn(S.defaults), S;
1550
1543
  };
1551
- E.getDefaults = ht;
1552
- E.defaults = ie;
1553
- E.use = function(...h) {
1554
- return ne.use(...h), E.defaults = ne.defaults, pn(E.defaults), E;
1544
+ S.getDefaults = gt;
1545
+ S.defaults = re;
1546
+ S.use = function(...h) {
1547
+ return ie.use(...h), S.defaults = ie.defaults, fn(S.defaults), S;
1555
1548
  };
1556
- E.walkTokens = function(h, e) {
1557
- return ne.walkTokens(h, e);
1549
+ S.walkTokens = function(h, e) {
1550
+ return ie.walkTokens(h, e);
1558
1551
  };
1559
- E.parseInline = ne.parseInline;
1560
- E.Parser = j;
1561
- E.parser = j.parse;
1562
- E.Renderer = Fe;
1563
- E.TextRenderer = xt;
1564
- E.Lexer = q;
1565
- E.lexer = q.lex;
1566
- E.Tokenizer = Be;
1567
- E.Hooks = ye;
1568
- E.parse = E;
1569
- E.options;
1570
- E.setOptions;
1571
- E.use;
1572
- E.walkTokens;
1573
- E.parseInline;
1552
+ S.parseInline = ie.parseInline;
1553
+ S.Parser = j;
1554
+ S.parser = j.parse;
1555
+ S.Renderer = He;
1556
+ S.TextRenderer = _t;
1557
+ S.Lexer = W;
1558
+ S.lexer = W.lex;
1559
+ S.Tokenizer = Fe;
1560
+ S.Hooks = Se;
1561
+ S.parse = S;
1562
+ S.options;
1563
+ S.setOptions;
1564
+ S.use;
1565
+ S.walkTokens;
1566
+ S.parseInline;
1574
1567
  j.parse;
1575
- q.lex;
1576
- /*! @license DOMPurify 3.2.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.2/LICENSE */
1577
- var ct, an;
1578
- function cn() {
1579
- if (an) return ct;
1580
- an = 1;
1568
+ W.lex;
1569
+ /*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */
1570
+ var pt, un;
1571
+ function pn() {
1572
+ if (un) return pt;
1573
+ un = 1;
1581
1574
  const {
1582
1575
  entries: h,
1583
1576
  setPrototypeOf: e,
@@ -1602,44 +1595,45 @@ function cn() {
1602
1595
  }), a || (a = function(g, _) {
1603
1596
  return new g(..._);
1604
1597
  });
1605
- const c = $(Array.prototype.forEach), k = $(Array.prototype.pop), m = $(Array.prototype.push), x = $(String.prototype.toLowerCase), R = $(String.prototype.toString), A = $(String.prototype.match), C = $(String.prototype.replace), Re = $(String.prototype.indexOf), pe = $(String.prototype.trim), H = $(Object.prototype.hasOwnProperty), O = $(RegExp.prototype.test), J = he(TypeError);
1606
- function $(T) {
1598
+ const c = I(Array.prototype.forEach), k = I(Array.prototype.lastIndexOf), m = I(Array.prototype.pop), b = I(Array.prototype.push), L = I(Array.prototype.splice), A = I(String.prototype.toLowerCase), z = I(String.prototype.toString), he = I(String.prototype.match), Q = I(String.prototype.replace), Re = I(String.prototype.indexOf), Le = I(String.prototype.trim), G = I(Object.prototype.hasOwnProperty), N = I(RegExp.prototype.test), V = En(TypeError);
1599
+ function I(T) {
1607
1600
  return function(g) {
1608
- for (var _ = arguments.length, w = new Array(_ > 1 ? _ - 1 : 0), z = 1; z < _; z++)
1609
- w[z - 1] = arguments[z];
1601
+ g instanceof RegExp && (g.lastIndex = 0);
1602
+ for (var _ = arguments.length, w = new Array(_ > 1 ? _ - 1 : 0), v = 1; v < _; v++)
1603
+ w[v - 1] = arguments[v];
1610
1604
  return u(T, g, w);
1611
1605
  };
1612
1606
  }
1613
- function he(T) {
1607
+ function En(T) {
1614
1608
  return function() {
1615
1609
  for (var g = arguments.length, _ = new Array(g), w = 0; w < g; w++)
1616
1610
  _[w] = arguments[w];
1617
1611
  return a(T, _);
1618
1612
  };
1619
1613
  }
1620
- function b(T, g) {
1621
- let _ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : x;
1614
+ function x(T, g) {
1615
+ let _ = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : A;
1622
1616
  e && e(T, null);
1623
1617
  let w = g.length;
1624
1618
  for (; w--; ) {
1625
- let z = g[w];
1626
- if (typeof z == "string") {
1627
- const Q = _(z);
1628
- Q !== z && (t(g) || (g[w] = Q), z = Q);
1619
+ let v = g[w];
1620
+ if (typeof v == "string") {
1621
+ const K = _(v);
1622
+ K !== v && (t(g) || (g[w] = K), v = K);
1629
1623
  }
1630
- T[z] = !0;
1624
+ T[v] = !0;
1631
1625
  }
1632
1626
  return T;
1633
1627
  }
1634
- function Tn(T) {
1628
+ function Sn(T) {
1635
1629
  for (let g = 0; g < T.length; g++)
1636
- H(T, g) || (T[g] = null);
1630
+ G(T, g) || (T[g] = null);
1637
1631
  return T;
1638
1632
  }
1639
- function ee(T) {
1633
+ function te(T) {
1640
1634
  const g = l(null);
1641
1635
  for (const [_, w] of h(T))
1642
- H(T, _) && (Array.isArray(w) ? g[_] = Tn(w) : w && typeof w == "object" && w.constructor === Object ? g[_] = ee(w) : g[_] = w);
1636
+ G(T, _) && (Array.isArray(w) ? g[_] = Sn(w) : w && typeof w == "object" && w.constructor === Object ? g[_] = te(w) : g[_] = w);
1643
1637
  return g;
1644
1638
  }
1645
1639
  function fe(T, g) {
@@ -1647,9 +1641,9 @@ function cn() {
1647
1641
  const w = o(T, g);
1648
1642
  if (w) {
1649
1643
  if (w.get)
1650
- return $(w.get);
1644
+ return I(w.get);
1651
1645
  if (typeof w.value == "function")
1652
- return $(w.value);
1646
+ return I(w.value);
1653
1647
  }
1654
1648
  T = n(T);
1655
1649
  }
@@ -1658,64 +1652,55 @@ function cn() {
1658
1652
  }
1659
1653
  return _;
1660
1654
  }
1661
- const Tt = r(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), We = r(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), qe = r(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), wn = r(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), je = r(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), _n = r(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), wt = r(["#text"]), _t = r(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ze = r(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), At = r(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Le = r(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), An = s(/\{\{[\w\W]*|[\w\W]*\}\}/gm), En = s(/<%[\w\W]*|[\w\W]*%>/gm), yn = s(/\${[\w\W]*}/gm), Sn = s(/^data-[\-\w.\u00B7-\uFFFF]/), Rn = s(/^aria-[\-\w]+$/), Et = s(
1655
+ const At = r(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), We = r(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), je = r(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), yn = r(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ze = r(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Rn = r(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Et = r(["#text"]), St = r(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ye = r(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), yt = r(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Ie = r(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ln = s(/\{\{[\w\W]*|[\w\W]*\}\}/gm), In = s(/<%[\w\W]*|[\w\W]*%>/gm), Cn = s(/\$\{[\w\W]*/gm), On = s(/^data-[\-\w.\u00B7-\uFFFF]+$/), Dn = s(/^aria-[\-\w]+$/), Rt = s(
1662
1656
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
1663
1657
  // eslint-disable-line no-useless-escape
1664
- ), Ln = s(/^(?:\w+script|data):/i), In = s(
1658
+ ), Nn = s(/^(?:\w+script|data):/i), Pn = s(
1665
1659
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
1666
1660
  // eslint-disable-line no-control-regex
1667
- ), yt = s(/^html$/i), Cn = s(/^[a-z][.\w]*(-[.\w]+)+$/i);
1668
- var St = /* @__PURE__ */ Object.freeze({
1661
+ ), Lt = s(/^html$/i), Mn = s(/^[a-z][.\w]*(-[.\w]+)+$/i);
1662
+ var It = /* @__PURE__ */ Object.freeze({
1669
1663
  __proto__: null,
1670
- ARIA_ATTR: Rn,
1671
- ATTR_WHITESPACE: In,
1672
- CUSTOM_ELEMENT: Cn,
1673
- DATA_ATTR: Sn,
1674
- DOCTYPE_NAME: yt,
1675
- ERB_EXPR: En,
1676
- IS_ALLOWED_URI: Et,
1677
- IS_SCRIPT_OR_DATA: Ln,
1678
- MUSTACHE_EXPR: An,
1679
- TMPLIT_EXPR: yn
1664
+ ARIA_ATTR: Dn,
1665
+ ATTR_WHITESPACE: Pn,
1666
+ CUSTOM_ELEMENT: Mn,
1667
+ DATA_ATTR: On,
1668
+ DOCTYPE_NAME: Lt,
1669
+ ERB_EXPR: In,
1670
+ IS_ALLOWED_URI: Rt,
1671
+ IS_SCRIPT_OR_DATA: Nn,
1672
+ MUSTACHE_EXPR: Ln,
1673
+ TMPLIT_EXPR: Cn
1680
1674
  });
1681
1675
  const ge = {
1682
1676
  element: 1,
1683
- attribute: 2,
1684
1677
  text: 3,
1685
- cdataSection: 4,
1686
- entityReference: 5,
1687
- // Deprecated
1688
- entityNode: 6,
1689
1678
  // Deprecated
1690
1679
  progressingInstruction: 7,
1691
1680
  comment: 8,
1692
- document: 9,
1693
- documentType: 10,
1694
- documentFragment: 11,
1695
- notation: 12
1696
- // Deprecated
1697
- }, On = function() {
1681
+ document: 9
1682
+ }, zn = function() {
1698
1683
  return typeof window > "u" ? null : window;
1699
- }, Dn = function(g, _) {
1684
+ }, vn = function(g, _) {
1700
1685
  if (typeof g != "object" || typeof g.createPolicy != "function")
1701
1686
  return null;
1702
1687
  let w = null;
1703
- const z = "data-tt-policy-suffix";
1704
- _ && _.hasAttribute(z) && (w = _.getAttribute(z));
1705
- const Q = "dompurify" + (w ? "#" + w : "");
1688
+ const v = "data-tt-policy-suffix";
1689
+ _ && _.hasAttribute(v) && (w = _.getAttribute(v));
1690
+ const K = "dompurify" + (w ? "#" + w : "");
1706
1691
  try {
1707
- return g.createPolicy(Q, {
1708
- createHTML(re) {
1709
- return re;
1692
+ return g.createPolicy(K, {
1693
+ createHTML(se) {
1694
+ return se;
1710
1695
  },
1711
- createScriptURL(re) {
1712
- return re;
1696
+ createScriptURL(se) {
1697
+ return se;
1713
1698
  }
1714
1699
  });
1715
1700
  } catch {
1716
- return console.warn("TrustedTypes policy " + Q + " could not be created."), null;
1701
+ return console.warn("TrustedTypes policy " + K + " could not be created."), null;
1717
1702
  }
1718
- }, Rt = function() {
1703
+ }, Ct = function() {
1719
1704
  return {
1720
1705
  afterSanitizeAttributes: [],
1721
1706
  afterSanitizeElements: [],
@@ -1728,57 +1713,57 @@ function cn() {
1728
1713
  uponSanitizeShadowNode: []
1729
1714
  };
1730
1715
  };
1731
- function Lt() {
1732
- let T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : On();
1733
- const g = (d) => Lt(d);
1734
- if (g.version = "3.2.2", g.removed = [], !T || !T.document || T.document.nodeType !== ge.document)
1716
+ function Ot() {
1717
+ let T = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : zn();
1718
+ const g = (d) => Ot(d);
1719
+ if (g.version = "3.2.5", g.removed = [], !T || !T.document || T.document.nodeType !== ge.document || !T.Element)
1735
1720
  return g.isSupported = !1, g;
1736
1721
  let {
1737
1722
  document: _
1738
1723
  } = T;
1739
- const w = _, z = w.currentScript, {
1740
- DocumentFragment: Q,
1741
- HTMLTemplateElement: re,
1742
- Node: Ye,
1743
- Element: It,
1724
+ const w = _, v = w.currentScript, {
1725
+ DocumentFragment: K,
1726
+ HTMLTemplateElement: se,
1727
+ Node: Xe,
1728
+ Element: Dt,
1744
1729
  NodeFilter: de,
1745
- NamedNodeMap: Mn = T.NamedNodeMap || T.MozNamedAttrMap,
1746
- HTMLFormElement: Pn,
1747
- DOMParser: zn,
1748
- trustedTypes: Ie
1749
- } = T, me = It.prototype, vn = fe(me, "cloneNode"), $n = fe(me, "remove"), Un = fe(me, "nextSibling"), Bn = fe(me, "childNodes"), Ce = fe(me, "parentNode");
1750
- if (typeof re == "function") {
1730
+ NamedNodeMap: Un = T.NamedNodeMap || T.MozNamedAttrMap,
1731
+ HTMLFormElement: Bn,
1732
+ DOMParser: Fn,
1733
+ trustedTypes: Ce
1734
+ } = T, me = Dt.prototype, Hn = fe(me, "cloneNode"), Gn = fe(me, "remove"), qn = fe(me, "nextSibling"), Wn = fe(me, "childNodes"), Oe = fe(me, "parentNode");
1735
+ if (typeof se == "function") {
1751
1736
  const d = _.createElement("template");
1752
1737
  d.content && d.content.ownerDocument && (_ = d.content.ownerDocument);
1753
1738
  }
1754
1739
  let U, ke = "";
1755
1740
  const {
1756
- implementation: Xe,
1757
- createNodeIterator: Fn,
1758
- createDocumentFragment: Hn,
1759
- getElementsByTagName: Gn
1741
+ implementation: Qe,
1742
+ createNodeIterator: jn,
1743
+ createDocumentFragment: Zn,
1744
+ getElementsByTagName: Yn
1760
1745
  } = _, {
1761
- importNode: Wn
1746
+ importNode: Xn
1762
1747
  } = w;
1763
- let W = Rt();
1764
- g.isSupported = typeof h == "function" && typeof Ce == "function" && Xe && Xe.createHTMLDocument !== void 0;
1748
+ let B = Ct();
1749
+ g.isSupported = typeof h == "function" && typeof Oe == "function" && Qe && Qe.createHTMLDocument !== void 0;
1765
1750
  const {
1766
- MUSTACHE_EXPR: Qe,
1767
- ERB_EXPR: Ve,
1768
- TMPLIT_EXPR: Ke,
1769
- DATA_ATTR: qn,
1770
- ARIA_ATTR: jn,
1771
- IS_SCRIPT_OR_DATA: Zn,
1772
- ATTR_WHITESPACE: Ct,
1773
- CUSTOM_ELEMENT: Yn
1774
- } = St;
1751
+ MUSTACHE_EXPR: Ve,
1752
+ ERB_EXPR: Ke,
1753
+ TMPLIT_EXPR: Je,
1754
+ DATA_ATTR: Qn,
1755
+ ARIA_ATTR: Vn,
1756
+ IS_SCRIPT_OR_DATA: Kn,
1757
+ ATTR_WHITESPACE: Nt,
1758
+ CUSTOM_ELEMENT: Jn
1759
+ } = It;
1775
1760
  let {
1776
- IS_ALLOWED_URI: Ot
1777
- } = St, D = null;
1778
- const Dt = b({}, [...Tt, ...We, ...qe, ...je, ...wt]);
1779
- let M = null;
1780
- const Nt = b({}, [..._t, ...Ze, ...At, ...Le]);
1781
- let I = Object.seal(l(null, {
1761
+ IS_ALLOWED_URI: Pt
1762
+ } = It, O = null;
1763
+ const Mt = x({}, [...At, ...We, ...je, ...Ze, ...Et]);
1764
+ let P = null;
1765
+ const zt = x({}, [...St, ...Ye, ...yt, ...Ie]);
1766
+ let C = Object.seal(l(null, {
1782
1767
  tagNameCheck: {
1783
1768
  writable: !0,
1784
1769
  configurable: !1,
@@ -1797,68 +1782,68 @@ function cn() {
1797
1782
  enumerable: !0,
1798
1783
  value: !1
1799
1784
  }
1800
- })), be = null, Je = null, Mt = !0, et = !0, Pt = !1, zt = !0, se = !1, tt = !0, te = !1, nt = !1, it = !1, oe = !1, Oe = !1, De = !1, vt = !0, $t = !1;
1801
- const Xn = "user-content-";
1802
- let rt = !0, xe = !1, le = {}, ae = null;
1803
- const Ut = b({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
1804
- let Bt = null;
1805
- const Ft = b({}, ["audio", "video", "img", "source", "image", "track"]);
1806
- let st = null;
1807
- const Ht = b({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ne = "http://www.w3.org/1998/Math/MathML", Me = "http://www.w3.org/2000/svg", V = "http://www.w3.org/1999/xhtml";
1808
- let ce = V, ot = !1, lt = null;
1809
- const Qn = b({}, [Ne, Me, V], R);
1810
- let Pe = b({}, ["mi", "mo", "mn", "ms", "mtext"]), ze = b({}, ["annotation-xml"]);
1811
- const Vn = b({}, ["title", "style", "font", "a", "script"]);
1785
+ })), be = null, et = null, vt = !0, tt = !0, $t = !1, Ut = !0, oe = !1, nt = !0, ne = !1, it = !1, rt = !1, le = !1, De = !1, Ne = !1, Bt = !0, Ft = !1;
1786
+ const ei = "user-content-";
1787
+ let st = !0, xe = !1, ae = {}, ce = null;
1788
+ const Ht = x({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
1789
+ let Gt = null;
1790
+ const qt = x({}, ["audio", "video", "img", "source", "image", "track"]);
1791
+ let ot = null;
1792
+ const Wt = x({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Pe = "http://www.w3.org/1998/Math/MathML", Me = "http://www.w3.org/2000/svg", J = "http://www.w3.org/1999/xhtml";
1793
+ let ue = J, lt = !1, at = null;
1794
+ const ti = x({}, [Pe, Me, J], z);
1795
+ let ze = x({}, ["mi", "mo", "mn", "ms", "mtext"]), ve = x({}, ["annotation-xml"]);
1796
+ const ni = x({}, ["title", "style", "font", "a", "script"]);
1812
1797
  let Te = null;
1813
- const Kn = ["application/xhtml+xml", "text/html"], Jn = "text/html";
1814
- let N = null, ue = null;
1815
- const ei = _.createElement("form"), Gt = function(i) {
1798
+ const ii = ["application/xhtml+xml", "text/html"], ri = "text/html";
1799
+ let D = null, pe = null;
1800
+ const si = _.createElement("form"), jt = function(i) {
1816
1801
  return i instanceof RegExp || i instanceof Function;
1817
- }, at = function() {
1802
+ }, ct = function() {
1818
1803
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1819
- if (!(ue && ue === i)) {
1820
- if ((!i || typeof i != "object") && (i = {}), i = ee(i), Te = // eslint-disable-next-line unicorn/prefer-includes
1821
- Kn.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Jn : i.PARSER_MEDIA_TYPE, N = Te === "application/xhtml+xml" ? R : x, D = H(i, "ALLOWED_TAGS") ? b({}, i.ALLOWED_TAGS, N) : Dt, M = H(i, "ALLOWED_ATTR") ? b({}, i.ALLOWED_ATTR, N) : Nt, lt = H(i, "ALLOWED_NAMESPACES") ? b({}, i.ALLOWED_NAMESPACES, R) : Qn, st = H(i, "ADD_URI_SAFE_ATTR") ? b(ee(Ht), i.ADD_URI_SAFE_ATTR, N) : Ht, Bt = H(i, "ADD_DATA_URI_TAGS") ? b(ee(Ft), i.ADD_DATA_URI_TAGS, N) : Ft, ae = H(i, "FORBID_CONTENTS") ? b({}, i.FORBID_CONTENTS, N) : Ut, be = H(i, "FORBID_TAGS") ? b({}, i.FORBID_TAGS, N) : {}, Je = H(i, "FORBID_ATTR") ? b({}, i.FORBID_ATTR, N) : {}, le = H(i, "USE_PROFILES") ? i.USE_PROFILES : !1, Mt = i.ALLOW_ARIA_ATTR !== !1, et = i.ALLOW_DATA_ATTR !== !1, Pt = i.ALLOW_UNKNOWN_PROTOCOLS || !1, zt = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, se = i.SAFE_FOR_TEMPLATES || !1, tt = i.SAFE_FOR_XML !== !1, te = i.WHOLE_DOCUMENT || !1, oe = i.RETURN_DOM || !1, Oe = i.RETURN_DOM_FRAGMENT || !1, De = i.RETURN_TRUSTED_TYPE || !1, it = i.FORCE_BODY || !1, vt = i.SANITIZE_DOM !== !1, $t = i.SANITIZE_NAMED_PROPS || !1, rt = i.KEEP_CONTENT !== !1, xe = i.IN_PLACE || !1, Ot = i.ALLOWED_URI_REGEXP || Et, ce = i.NAMESPACE || V, Pe = i.MATHML_TEXT_INTEGRATION_POINTS || Pe, ze = i.HTML_INTEGRATION_POINTS || ze, I = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && Gt(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (I.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && Gt(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (I.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (I.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), se && (et = !1), Oe && (oe = !0), le && (D = b({}, wt), M = [], le.html === !0 && (b(D, Tt), b(M, _t)), le.svg === !0 && (b(D, We), b(M, Ze), b(M, Le)), le.svgFilters === !0 && (b(D, qe), b(M, Ze), b(M, Le)), le.mathMl === !0 && (b(D, je), b(M, At), b(M, Le))), i.ADD_TAGS && (D === Dt && (D = ee(D)), b(D, i.ADD_TAGS, N)), i.ADD_ATTR && (M === Nt && (M = ee(M)), b(M, i.ADD_ATTR, N)), i.ADD_URI_SAFE_ATTR && b(st, i.ADD_URI_SAFE_ATTR, N), i.FORBID_CONTENTS && (ae === Ut && (ae = ee(ae)), b(ae, i.FORBID_CONTENTS, N)), rt && (D["#text"] = !0), te && b(D, ["html", "head", "body"]), D.table && (b(D, ["tbody"]), delete be.tbody), i.TRUSTED_TYPES_POLICY) {
1804
+ if (!(pe && pe === i)) {
1805
+ if ((!i || typeof i != "object") && (i = {}), i = te(i), Te = // eslint-disable-next-line unicorn/prefer-includes
1806
+ ii.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ri : i.PARSER_MEDIA_TYPE, D = Te === "application/xhtml+xml" ? z : A, O = G(i, "ALLOWED_TAGS") ? x({}, i.ALLOWED_TAGS, D) : Mt, P = G(i, "ALLOWED_ATTR") ? x({}, i.ALLOWED_ATTR, D) : zt, at = G(i, "ALLOWED_NAMESPACES") ? x({}, i.ALLOWED_NAMESPACES, z) : ti, ot = G(i, "ADD_URI_SAFE_ATTR") ? x(te(Wt), i.ADD_URI_SAFE_ATTR, D) : Wt, Gt = G(i, "ADD_DATA_URI_TAGS") ? x(te(qt), i.ADD_DATA_URI_TAGS, D) : qt, ce = G(i, "FORBID_CONTENTS") ? x({}, i.FORBID_CONTENTS, D) : Ht, be = G(i, "FORBID_TAGS") ? x({}, i.FORBID_TAGS, D) : {}, et = G(i, "FORBID_ATTR") ? x({}, i.FORBID_ATTR, D) : {}, ae = G(i, "USE_PROFILES") ? i.USE_PROFILES : !1, vt = i.ALLOW_ARIA_ATTR !== !1, tt = i.ALLOW_DATA_ATTR !== !1, $t = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Ut = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, oe = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, ne = i.WHOLE_DOCUMENT || !1, le = i.RETURN_DOM || !1, De = i.RETURN_DOM_FRAGMENT || !1, Ne = i.RETURN_TRUSTED_TYPE || !1, rt = i.FORCE_BODY || !1, Bt = i.SANITIZE_DOM !== !1, Ft = i.SANITIZE_NAMED_PROPS || !1, st = i.KEEP_CONTENT !== !1, xe = i.IN_PLACE || !1, Pt = i.ALLOWED_URI_REGEXP || Rt, ue = i.NAMESPACE || J, ze = i.MATHML_TEXT_INTEGRATION_POINTS || ze, ve = i.HTML_INTEGRATION_POINTS || ve, C = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && jt(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (C.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && jt(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (C.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (C.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), oe && (tt = !1), De && (le = !0), ae && (O = x({}, Et), P = [], ae.html === !0 && (x(O, At), x(P, St)), ae.svg === !0 && (x(O, We), x(P, Ye), x(P, Ie)), ae.svgFilters === !0 && (x(O, je), x(P, Ye), x(P, Ie)), ae.mathMl === !0 && (x(O, Ze), x(P, yt), x(P, Ie))), i.ADD_TAGS && (O === Mt && (O = te(O)), x(O, i.ADD_TAGS, D)), i.ADD_ATTR && (P === zt && (P = te(P)), x(P, i.ADD_ATTR, D)), i.ADD_URI_SAFE_ATTR && x(ot, i.ADD_URI_SAFE_ATTR, D), i.FORBID_CONTENTS && (ce === Ht && (ce = te(ce)), x(ce, i.FORBID_CONTENTS, D)), st && (O["#text"] = !0), ne && x(O, ["html", "head", "body"]), O.table && (x(O, ["tbody"]), delete be.tbody), i.TRUSTED_TYPES_POLICY) {
1822
1807
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
1823
- throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1808
+ throw V('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1824
1809
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1825
- throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1810
+ throw V('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1826
1811
  U = i.TRUSTED_TYPES_POLICY, ke = U.createHTML("");
1827
1812
  } else
1828
- U === void 0 && (U = Dn(Ie, z)), U !== null && typeof ke == "string" && (ke = U.createHTML(""));
1829
- r && r(i), ue = i;
1813
+ U === void 0 && (U = vn(Ce, v)), U !== null && typeof ke == "string" && (ke = U.createHTML(""));
1814
+ r && r(i), pe = i;
1830
1815
  }
1831
- }, Wt = b({}, [...We, ...qe, ...wn]), qt = b({}, [...je, ..._n]), ti = function(i) {
1832
- let p = Ce(i);
1816
+ }, Zt = x({}, [...We, ...je, ...yn]), Yt = x({}, [...Ze, ...Rn]), oi = function(i) {
1817
+ let p = Oe(i);
1833
1818
  (!p || !p.tagName) && (p = {
1834
- namespaceURI: ce,
1819
+ namespaceURI: ue,
1835
1820
  tagName: "template"
1836
1821
  });
1837
- const f = x(i.tagName), L = x(p.tagName);
1838
- return lt[i.namespaceURI] ? i.namespaceURI === Me ? p.namespaceURI === V ? f === "svg" : p.namespaceURI === Ne ? f === "svg" && (L === "annotation-xml" || Pe[L]) : !!Wt[f] : i.namespaceURI === Ne ? p.namespaceURI === V ? f === "math" : p.namespaceURI === Me ? f === "math" && ze[L] : !!qt[f] : i.namespaceURI === V ? p.namespaceURI === Me && !ze[L] || p.namespaceURI === Ne && !Pe[L] ? !1 : !qt[f] && (Vn[f] || !Wt[f]) : !!(Te === "application/xhtml+xml" && lt[i.namespaceURI]) : !1;
1822
+ const f = A(i.tagName), R = A(p.tagName);
1823
+ return at[i.namespaceURI] ? i.namespaceURI === Me ? p.namespaceURI === J ? f === "svg" : p.namespaceURI === Pe ? f === "svg" && (R === "annotation-xml" || ze[R]) : !!Zt[f] : i.namespaceURI === Pe ? p.namespaceURI === J ? f === "math" : p.namespaceURI === Me ? f === "math" && ve[R] : !!Yt[f] : i.namespaceURI === J ? p.namespaceURI === Me && !ve[R] || p.namespaceURI === Pe && !ze[R] ? !1 : !Yt[f] && (ni[f] || !Zt[f]) : !!(Te === "application/xhtml+xml" && at[i.namespaceURI]) : !1;
1839
1824
  }, Z = function(i) {
1840
- m(g.removed, {
1825
+ b(g.removed, {
1841
1826
  element: i
1842
1827
  });
1843
1828
  try {
1844
- Ce(i).removeChild(i);
1829
+ Oe(i).removeChild(i);
1845
1830
  } catch {
1846
- $n(i);
1831
+ Gn(i);
1847
1832
  }
1848
- }, ve = function(i, p) {
1833
+ }, $e = function(i, p) {
1849
1834
  try {
1850
- m(g.removed, {
1835
+ b(g.removed, {
1851
1836
  attribute: p.getAttributeNode(i),
1852
1837
  from: p
1853
1838
  });
1854
1839
  } catch {
1855
- m(g.removed, {
1840
+ b(g.removed, {
1856
1841
  attribute: null,
1857
1842
  from: p
1858
1843
  });
1859
1844
  }
1860
1845
  if (p.removeAttribute(i), i === "is")
1861
- if (oe || Oe)
1846
+ if (le || De)
1862
1847
  try {
1863
1848
  Z(p);
1864
1849
  } catch {
@@ -1868,96 +1853,96 @@ function cn() {
1868
1853
  p.setAttribute(i, "");
1869
1854
  } catch {
1870
1855
  }
1871
- }, jt = function(i) {
1856
+ }, Xt = function(i) {
1872
1857
  let p = null, f = null;
1873
- if (it)
1858
+ if (rt)
1874
1859
  i = "<remove></remove>" + i;
1875
1860
  else {
1876
- const P = A(i, /^[\r\n\t ]+/);
1877
- f = P && P[0];
1861
+ const M = he(i, /^[\r\n\t ]+/);
1862
+ f = M && M[0];
1878
1863
  }
1879
- Te === "application/xhtml+xml" && ce === V && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
1880
- const L = U ? U.createHTML(i) : i;
1881
- if (ce === V)
1864
+ Te === "application/xhtml+xml" && ue === J && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
1865
+ const R = U ? U.createHTML(i) : i;
1866
+ if (ue === J)
1882
1867
  try {
1883
- p = new zn().parseFromString(L, Te);
1868
+ p = new Fn().parseFromString(R, Te);
1884
1869
  } catch {
1885
1870
  }
1886
1871
  if (!p || !p.documentElement) {
1887
- p = Xe.createDocument(ce, "template", null);
1872
+ p = Qe.createDocument(ue, "template", null);
1888
1873
  try {
1889
- p.documentElement.innerHTML = ot ? ke : L;
1874
+ p.documentElement.innerHTML = lt ? ke : R;
1890
1875
  } catch {
1891
1876
  }
1892
1877
  }
1893
- const v = p.body || p.documentElement;
1894
- return i && f && v.insertBefore(_.createTextNode(f), v.childNodes[0] || null), ce === V ? Gn.call(p, te ? "html" : "body")[0] : te ? p.documentElement : v;
1895
- }, Zt = function(i) {
1896
- return Fn.call(
1878
+ const $ = p.body || p.documentElement;
1879
+ return i && f && $.insertBefore(_.createTextNode(f), $.childNodes[0] || null), ue === J ? Yn.call(p, ne ? "html" : "body")[0] : ne ? p.documentElement : $;
1880
+ }, Qt = function(i) {
1881
+ return jn.call(
1897
1882
  i.ownerDocument || i,
1898
1883
  i,
1899
1884
  // eslint-disable-next-line no-bitwise
1900
1885
  de.SHOW_ELEMENT | de.SHOW_COMMENT | de.SHOW_TEXT | de.SHOW_PROCESSING_INSTRUCTION | de.SHOW_CDATA_SECTION,
1901
1886
  null
1902
1887
  );
1903
- }, Yt = function(i) {
1904
- return i instanceof Pn && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof Mn) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
1905
- }, Xt = function(i) {
1906
- return typeof Ye == "function" && i instanceof Ye;
1888
+ }, ut = function(i) {
1889
+ return i instanceof Bn && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof Un) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
1890
+ }, Vt = function(i) {
1891
+ return typeof Xe == "function" && i instanceof Xe;
1907
1892
  };
1908
- function K(d, i, p) {
1893
+ function ee(d, i, p) {
1909
1894
  c(d, (f) => {
1910
- f.call(g, i, p, ue);
1895
+ f.call(g, i, p, pe);
1911
1896
  });
1912
1897
  }
1913
- const Qt = function(i) {
1898
+ const Kt = function(i) {
1914
1899
  let p = null;
1915
- if (K(W.beforeSanitizeElements, i, null), Yt(i))
1900
+ if (ee(B.beforeSanitizeElements, i, null), ut(i))
1916
1901
  return Z(i), !0;
1917
- const f = N(i.nodeName);
1918
- if (K(W.uponSanitizeElement, i, {
1902
+ const f = D(i.nodeName);
1903
+ if (ee(B.uponSanitizeElement, i, {
1919
1904
  tagName: f,
1920
- allowedTags: D
1921
- }), i.hasChildNodes() && !Xt(i.firstElementChild) && O(/<[/\w]/g, i.innerHTML) && O(/<[/\w]/g, i.textContent) || i.nodeType === ge.progressingInstruction || tt && i.nodeType === ge.comment && O(/<[/\w]/g, i.data))
1905
+ allowedTags: O
1906
+ }), i.hasChildNodes() && !Vt(i.firstElementChild) && N(/<[/\w!]/g, i.innerHTML) && N(/<[/\w!]/g, i.textContent) || i.nodeType === ge.progressingInstruction || nt && i.nodeType === ge.comment && N(/<[/\w]/g, i.data))
1922
1907
  return Z(i), !0;
1923
- if (!D[f] || be[f]) {
1924
- if (!be[f] && Kt(f) && (I.tagNameCheck instanceof RegExp && O(I.tagNameCheck, f) || I.tagNameCheck instanceof Function && I.tagNameCheck(f)))
1908
+ if (!O[f] || be[f]) {
1909
+ if (!be[f] && en(f) && (C.tagNameCheck instanceof RegExp && N(C.tagNameCheck, f) || C.tagNameCheck instanceof Function && C.tagNameCheck(f)))
1925
1910
  return !1;
1926
- if (rt && !ae[f]) {
1927
- const L = Ce(i) || i.parentNode, v = Bn(i) || i.childNodes;
1928
- if (v && L) {
1929
- const P = v.length;
1930
- for (let G = P - 1; G >= 0; --G) {
1931
- const Y = vn(v[G], !0);
1932
- Y.__removalCount = (i.__removalCount || 0) + 1, L.insertBefore(Y, Un(i));
1911
+ if (st && !ce[f]) {
1912
+ const R = Oe(i) || i.parentNode, $ = Wn(i) || i.childNodes;
1913
+ if ($ && R) {
1914
+ const M = $.length;
1915
+ for (let q = M - 1; q >= 0; --q) {
1916
+ const Y = Hn($[q], !0);
1917
+ Y.__removalCount = (i.__removalCount || 0) + 1, R.insertBefore(Y, qn(i));
1933
1918
  }
1934
1919
  }
1935
1920
  }
1936
1921
  return Z(i), !0;
1937
1922
  }
1938
- return i instanceof It && !ti(i) || (f === "noscript" || f === "noembed" || f === "noframes") && O(/<\/no(script|embed|frames)/i, i.innerHTML) ? (Z(i), !0) : (se && i.nodeType === ge.text && (p = i.textContent, c([Qe, Ve, Ke], (L) => {
1939
- p = C(p, L, " ");
1940
- }), i.textContent !== p && (m(g.removed, {
1923
+ return i instanceof Dt && !oi(i) || (f === "noscript" || f === "noembed" || f === "noframes") && N(/<\/no(script|embed|frames)/i, i.innerHTML) ? (Z(i), !0) : (oe && i.nodeType === ge.text && (p = i.textContent, c([Ve, Ke, Je], (R) => {
1924
+ p = Q(p, R, " ");
1925
+ }), i.textContent !== p && (b(g.removed, {
1941
1926
  element: i.cloneNode()
1942
- }), i.textContent = p)), K(W.afterSanitizeElements, i, null), !1);
1943
- }, Vt = function(i, p, f) {
1944
- if (vt && (p === "id" || p === "name") && (f in _ || f in ei))
1927
+ }), i.textContent = p)), ee(B.afterSanitizeElements, i, null), !1);
1928
+ }, Jt = function(i, p, f) {
1929
+ if (Bt && (p === "id" || p === "name") && (f in _ || f in si))
1945
1930
  return !1;
1946
- if (!(et && !Je[p] && O(qn, p))) {
1947
- if (!(Mt && O(jn, p))) {
1948
- if (!M[p] || Je[p]) {
1931
+ if (!(tt && !et[p] && N(Qn, p))) {
1932
+ if (!(vt && N(Vn, p))) {
1933
+ if (!P[p] || et[p]) {
1949
1934
  if (
1950
1935
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1951
1936
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1952
1937
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1953
- !(Kt(i) && (I.tagNameCheck instanceof RegExp && O(I.tagNameCheck, i) || I.tagNameCheck instanceof Function && I.tagNameCheck(i)) && (I.attributeNameCheck instanceof RegExp && O(I.attributeNameCheck, p) || I.attributeNameCheck instanceof Function && I.attributeNameCheck(p)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1938
+ !(en(i) && (C.tagNameCheck instanceof RegExp && N(C.tagNameCheck, i) || C.tagNameCheck instanceof Function && C.tagNameCheck(i)) && (C.attributeNameCheck instanceof RegExp && N(C.attributeNameCheck, p) || C.attributeNameCheck instanceof Function && C.attributeNameCheck(p)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1954
1939
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1955
- p === "is" && I.allowCustomizedBuiltInElements && (I.tagNameCheck instanceof RegExp && O(I.tagNameCheck, f) || I.tagNameCheck instanceof Function && I.tagNameCheck(f)))
1940
+ p === "is" && C.allowCustomizedBuiltInElements && (C.tagNameCheck instanceof RegExp && N(C.tagNameCheck, f) || C.tagNameCheck instanceof Function && C.tagNameCheck(f)))
1956
1941
  ) return !1;
1957
- } else if (!st[p]) {
1958
- if (!O(Ot, C(f, Ct, ""))) {
1959
- if (!((p === "src" || p === "xlink:href" || p === "href") && i !== "script" && Re(f, "data:") === 0 && Bt[i])) {
1960
- if (!(Pt && !O(Zn, C(f, Ct, "")))) {
1942
+ } else if (!ot[p]) {
1943
+ if (!N(Pt, Q(f, Nt, ""))) {
1944
+ if (!((p === "src" || p === "xlink:href" || p === "href") && i !== "script" && Re(f, "data:") === 0 && Gt[i])) {
1945
+ if (!($t && !N(Kn, Q(f, Nt, "")))) {
1961
1946
  if (f)
1962
1947
  return !1;
1963
1948
  }
@@ -1967,144 +1952,148 @@ function cn() {
1967
1952
  }
1968
1953
  }
1969
1954
  return !0;
1970
- }, Kt = function(i) {
1971
- return i !== "annotation-xml" && A(i, Yn);
1972
- }, Jt = function(i) {
1973
- K(W.beforeSanitizeAttributes, i, null);
1955
+ }, en = function(i) {
1956
+ return i !== "annotation-xml" && he(i, Jn);
1957
+ }, tn = function(i) {
1958
+ ee(B.beforeSanitizeAttributes, i, null);
1974
1959
  const {
1975
1960
  attributes: p
1976
1961
  } = i;
1977
- if (!p)
1962
+ if (!p || ut(i))
1978
1963
  return;
1979
1964
  const f = {
1980
1965
  attrName: "",
1981
1966
  attrValue: "",
1982
1967
  keepAttr: !0,
1983
- allowedAttributes: M,
1968
+ allowedAttributes: P,
1984
1969
  forceKeepAttr: void 0
1985
1970
  };
1986
- let L = p.length;
1987
- for (; L--; ) {
1988
- const v = p[L], {
1989
- name: P,
1990
- namespaceURI: G,
1971
+ let R = p.length;
1972
+ for (; R--; ) {
1973
+ const $ = p[R], {
1974
+ name: M,
1975
+ namespaceURI: q,
1991
1976
  value: Y
1992
- } = v, we = N(P);
1993
- let B = P === "value" ? Y : pe(Y);
1994
- if (f.attrName = we, f.attrValue = B, f.keepAttr = !0, f.forceKeepAttr = void 0, K(W.uponSanitizeAttribute, i, f), B = f.attrValue, $t && (we === "id" || we === "name") && (ve(P, i), B = Xn + B), tt && O(/((--!?|])>)|<\/(style|title)/i, B)) {
1995
- ve(P, i);
1977
+ } = $, we = D(M);
1978
+ let F = M === "value" ? Y : Le(Y);
1979
+ if (f.attrName = we, f.attrValue = F, f.keepAttr = !0, f.forceKeepAttr = void 0, ee(B.uponSanitizeAttribute, i, f), F = f.attrValue, Ft && (we === "id" || we === "name") && ($e(M, i), F = ei + F), nt && N(/((--!?|])>)|<\/(style|title)/i, F)) {
1980
+ $e(M, i);
1996
1981
  continue;
1997
1982
  }
1998
- if (f.forceKeepAttr || (ve(P, i), !f.keepAttr))
1983
+ if (f.forceKeepAttr || ($e(M, i), !f.keepAttr))
1999
1984
  continue;
2000
- if (!zt && O(/\/>/i, B)) {
2001
- ve(P, i);
1985
+ if (!Ut && N(/\/>/i, F)) {
1986
+ $e(M, i);
2002
1987
  continue;
2003
1988
  }
2004
- se && c([Qe, Ve, Ke], (tn) => {
2005
- B = C(B, tn, " ");
1989
+ oe && c([Ve, Ke, Je], (rn) => {
1990
+ F = Q(F, rn, " ");
2006
1991
  });
2007
- const en = N(i.nodeName);
2008
- if (Vt(en, we, B)) {
2009
- if (U && typeof Ie == "object" && typeof Ie.getAttributeType == "function" && !G)
2010
- switch (Ie.getAttributeType(en, we)) {
1992
+ const nn = D(i.nodeName);
1993
+ if (Jt(nn, we, F)) {
1994
+ if (U && typeof Ce == "object" && typeof Ce.getAttributeType == "function" && !q)
1995
+ switch (Ce.getAttributeType(nn, we)) {
2011
1996
  case "TrustedHTML": {
2012
- B = U.createHTML(B);
1997
+ F = U.createHTML(F);
2013
1998
  break;
2014
1999
  }
2015
2000
  case "TrustedScriptURL": {
2016
- B = U.createScriptURL(B);
2001
+ F = U.createScriptURL(F);
2017
2002
  break;
2018
2003
  }
2019
2004
  }
2020
2005
  try {
2021
- G ? i.setAttributeNS(G, P, B) : i.setAttribute(P, B), Yt(i) ? Z(i) : k(g.removed);
2006
+ q ? i.setAttributeNS(q, M, F) : i.setAttribute(M, F), ut(i) ? Z(i) : m(g.removed);
2022
2007
  } catch {
2023
2008
  }
2024
2009
  }
2025
2010
  }
2026
- K(W.afterSanitizeAttributes, i, null);
2027
- }, ni = function d(i) {
2011
+ ee(B.afterSanitizeAttributes, i, null);
2012
+ }, li = function d(i) {
2028
2013
  let p = null;
2029
- const f = Zt(i);
2030
- for (K(W.beforeSanitizeShadowDOM, i, null); p = f.nextNode(); )
2031
- K(W.uponSanitizeShadowNode, p, null), !Qt(p) && (p.content instanceof Q && d(p.content), Jt(p));
2032
- K(W.afterSanitizeShadowDOM, i, null);
2014
+ const f = Qt(i);
2015
+ for (ee(B.beforeSanitizeShadowDOM, i, null); p = f.nextNode(); )
2016
+ ee(B.uponSanitizeShadowNode, p, null), Kt(p), tn(p), p.content instanceof K && d(p.content);
2017
+ ee(B.afterSanitizeShadowDOM, i, null);
2033
2018
  };
2034
2019
  return g.sanitize = function(d) {
2035
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, p = null, f = null, L = null, v = null;
2036
- if (ot = !d, ot && (d = "<!-->"), typeof d != "string" && !Xt(d))
2020
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, p = null, f = null, R = null, $ = null;
2021
+ if (lt = !d, lt && (d = "<!-->"), typeof d != "string" && !Vt(d))
2037
2022
  if (typeof d.toString == "function") {
2038
2023
  if (d = d.toString(), typeof d != "string")
2039
- throw J("dirty is not a string, aborting");
2024
+ throw V("dirty is not a string, aborting");
2040
2025
  } else
2041
- throw J("toString is not a function");
2026
+ throw V("toString is not a function");
2042
2027
  if (!g.isSupported)
2043
2028
  return d;
2044
- if (nt || at(i), g.removed = [], typeof d == "string" && (xe = !1), xe) {
2029
+ if (it || ct(i), g.removed = [], typeof d == "string" && (xe = !1), xe) {
2045
2030
  if (d.nodeName) {
2046
- const Y = N(d.nodeName);
2047
- if (!D[Y] || be[Y])
2048
- throw J("root node is forbidden and cannot be sanitized in-place");
2031
+ const Y = D(d.nodeName);
2032
+ if (!O[Y] || be[Y])
2033
+ throw V("root node is forbidden and cannot be sanitized in-place");
2049
2034
  }
2050
- } else if (d instanceof Ye)
2051
- p = jt("<!---->"), f = p.ownerDocument.importNode(d, !0), f.nodeType === ge.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? p = f : p.appendChild(f);
2035
+ } else if (d instanceof Xe)
2036
+ p = Xt("<!---->"), f = p.ownerDocument.importNode(d, !0), f.nodeType === ge.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? p = f : p.appendChild(f);
2052
2037
  else {
2053
- if (!oe && !se && !te && // eslint-disable-next-line unicorn/prefer-includes
2038
+ if (!le && !oe && !ne && // eslint-disable-next-line unicorn/prefer-includes
2054
2039
  d.indexOf("<") === -1)
2055
- return U && De ? U.createHTML(d) : d;
2056
- if (p = jt(d), !p)
2057
- return oe ? null : De ? ke : "";
2040
+ return U && Ne ? U.createHTML(d) : d;
2041
+ if (p = Xt(d), !p)
2042
+ return le ? null : Ne ? ke : "";
2058
2043
  }
2059
- p && it && Z(p.firstChild);
2060
- const P = Zt(xe ? d : p);
2061
- for (; L = P.nextNode(); )
2062
- Qt(L) || (L.content instanceof Q && ni(L.content), Jt(L));
2044
+ p && rt && Z(p.firstChild);
2045
+ const M = Qt(xe ? d : p);
2046
+ for (; R = M.nextNode(); )
2047
+ Kt(R), tn(R), R.content instanceof K && li(R.content);
2063
2048
  if (xe)
2064
2049
  return d;
2065
- if (oe) {
2066
- if (Oe)
2067
- for (v = Hn.call(p.ownerDocument); p.firstChild; )
2068
- v.appendChild(p.firstChild);
2050
+ if (le) {
2051
+ if (De)
2052
+ for ($ = Zn.call(p.ownerDocument); p.firstChild; )
2053
+ $.appendChild(p.firstChild);
2069
2054
  else
2070
- v = p;
2071
- return (M.shadowroot || M.shadowrootmode) && (v = Wn.call(w, v, !0)), v;
2055
+ $ = p;
2056
+ return (P.shadowroot || P.shadowrootmode) && ($ = Xn.call(w, $, !0)), $;
2072
2057
  }
2073
- let G = te ? p.outerHTML : p.innerHTML;
2074
- return te && D["!doctype"] && p.ownerDocument && p.ownerDocument.doctype && p.ownerDocument.doctype.name && O(yt, p.ownerDocument.doctype.name) && (G = "<!DOCTYPE " + p.ownerDocument.doctype.name + `>
2075
- ` + G), se && c([Qe, Ve, Ke], (Y) => {
2076
- G = C(G, Y, " ");
2077
- }), U && De ? U.createHTML(G) : G;
2058
+ let q = ne ? p.outerHTML : p.innerHTML;
2059
+ return ne && O["!doctype"] && p.ownerDocument && p.ownerDocument.doctype && p.ownerDocument.doctype.name && N(Lt, p.ownerDocument.doctype.name) && (q = "<!DOCTYPE " + p.ownerDocument.doctype.name + `>
2060
+ ` + q), oe && c([Ve, Ke, Je], (Y) => {
2061
+ q = Q(q, Y, " ");
2062
+ }), U && Ne ? U.createHTML(q) : q;
2078
2063
  }, g.setConfig = function() {
2079
2064
  let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2080
- at(d), nt = !0;
2065
+ ct(d), it = !0;
2081
2066
  }, g.clearConfig = function() {
2082
- ue = null, nt = !1;
2067
+ pe = null, it = !1;
2083
2068
  }, g.isValidAttribute = function(d, i, p) {
2084
- ue || at({});
2085
- const f = N(d), L = N(i);
2086
- return Vt(f, L, p);
2069
+ pe || ct({});
2070
+ const f = D(d), R = D(i);
2071
+ return Jt(f, R, p);
2087
2072
  }, g.addHook = function(d, i) {
2088
- typeof i == "function" && m(W[d], i);
2089
- }, g.removeHook = function(d) {
2090
- return k(W[d]);
2073
+ typeof i == "function" && b(B[d], i);
2074
+ }, g.removeHook = function(d, i) {
2075
+ if (i !== void 0) {
2076
+ const p = k(B[d], i);
2077
+ return p === -1 ? void 0 : L(B[d], p, 1)[0];
2078
+ }
2079
+ return m(B[d]);
2091
2080
  }, g.removeHooks = function(d) {
2092
- W[d] = [];
2081
+ B[d] = [];
2093
2082
  }, g.removeAllHooks = function() {
2094
- W = Rt();
2083
+ B = Ct();
2095
2084
  }, g;
2096
2085
  }
2097
- var Nn = Lt();
2098
- return ct = Nn, ct;
2086
+ var $n = Ot();
2087
+ return pt = $n, pt;
2099
2088
  }
2100
- var ut, un;
2101
- function zi() {
2102
- return un || (un = 1, ut = window.DOMPurify || (window.DOMPurify = cn().default || cn())), ut;
2089
+ var ht, hn;
2090
+ function Zi() {
2091
+ return hn || (hn = 1, ht = window.DOMPurify || (window.DOMPurify = pn().default || pn())), ht;
2103
2092
  }
2104
- var vi = zi();
2105
- const Bi = /* @__PURE__ */ si(vi);
2093
+ var Yi = Zi();
2094
+ const Vi = /* @__PURE__ */ ui(Yi);
2106
2095
  export {
2107
- Bi as D,
2108
- Ui as c,
2109
- E as m
2096
+ Vi as D,
2097
+ Qi as c,
2098
+ S as m
2110
2099
  };