mark-deco-cli 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  /*!
3
3
  * name: mark-deco-cli
4
- * version: 0.8.0
4
+ * version: 0.9.0
5
5
  * description: Command-line interface for mark-deco Markdown to HTML conversion processor
6
6
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
7
7
  * license: MIT
8
8
  * repository.url: https://github.com/kekyo/mark-deco.git
9
- * git.commit.hash: cc985acbf6dd451ba9668a6c148f9e041c1032c5
9
+ * git.commit.hash: d0e45da82482af0e17292db548313487c588061b
10
10
  */
11
11
  "use strict";
12
12
  const commander = require("commander");
@@ -4338,7 +4338,7 @@ function requireJs() {
4338
4338
  return js$1.exports;
4339
4339
  }
4340
4340
  var jsExports = requireJs();
4341
- const Y$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsExports);
4341
+ const tt$1 = /* @__PURE__ */ getDefaultExportFromCjs(jsExports);
4342
4342
  const htmlVoidElements = [
4343
4343
  "area",
4344
4344
  "base",
@@ -21417,12 +21417,12 @@ var load = loader.load;
21417
21417
  var dump = dumper.dump;
21418
21418
  /*!
21419
21419
  * name: mark-deco
21420
- * version: 0.8.0
21420
+ * version: 0.9.0
21421
21421
  * description: Flexible Markdown to HTML conversion library
21422
21422
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
21423
21423
  * license: MIT
21424
21424
  * repository.url: https://github.com/kekyo/mark-deco.git
21425
- * git.commit.hash: cc985acbf6dd451ba9668a6c148f9e041c1032c5
21425
+ * git.commit.hash: d0e45da82482af0e17292db548313487c588061b
21426
21426
  */
21427
21427
  const qd = (e) => {
21428
21428
  try {
@@ -21587,8 +21587,8 @@ const qd = (e) => {
21587
21587
  if (h) {
21588
21588
  const m = h[0].match(/href=['"]([^'"]+)['"]/i);
21589
21589
  if (m && m[1]) {
21590
- const f = m[1], T = $s(f), A2 = new URL(T, e).toString();
21591
- return u.info("getOEmbedUrl: Discovered oEmbed endpoint:", A2), A2;
21590
+ const f = m[1], T = $s(f), A = new URL(T, e).toString();
21591
+ return u.info("getOEmbedUrl: Discovered oEmbed endpoint:", A), A;
21592
21592
  }
21593
21593
  }
21594
21594
  } catch (c) {
@@ -21613,9 +21613,9 @@ const qd = (e) => {
21613
21613
  m.signal = i ? Tr(i, f) : f;
21614
21614
  const T = await fetch(n, m);
21615
21615
  if (T.status >= 300 && T.status < 400) {
21616
- const A2 = T.headers.get("location");
21617
- if (A2) {
21618
- n = new URL(A2, n).toString(), c++;
21616
+ const A = T.headers.get("location");
21617
+ if (A) {
21618
+ n = new URL(A, n).toString(), c++;
21619
21619
  continue;
21620
21620
  }
21621
21621
  }
@@ -21773,8 +21773,8 @@ const Gd = async (e, t, u, r, a) => {
21773
21773
  </div>`
21774
21774
  });
21775
21775
  }
21776
- const A2 = T.sort((M2, ee) => M2.order - ee.order), w = [], v = [];
21777
- A2.forEach((M2) => {
21776
+ const A = T.sort((M2, ee) => M2.order - ee.order), w = [], v = [];
21777
+ A.forEach((M2) => {
21778
21778
  M2.html.includes("oembed-title") || M2.html.includes("oembed-author") || M2.html.includes("oembed-provider") || M2.html.includes("oembed-description") ? w.push(M2.html) : v.push(M2.html);
21779
21779
  });
21780
21780
  let S = "";
@@ -21821,15 +21821,15 @@ const Gd = async (e, t, u, r, a) => {
21821
21821
  </div>`
21822
21822
  });
21823
21823
  }
21824
- const f = m.sort((S, U2) => S.order - U2.order), T = [], A2 = [];
21824
+ const f = m.sort((S, U2) => S.order - U2.order), T = [], A = [];
21825
21825
  f.forEach((S) => {
21826
- S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) : A2.push(S.html);
21826
+ S.html.includes("oembed-title") || S.html.includes("oembed-author") || S.html.includes("oembed-provider") || S.html.includes("oembed-description") ? T.push(S.html) : A.push(S.html);
21827
21827
  });
21828
21828
  let w = "";
21829
21829
  T.length > 0 && (w = `<div class="oembed-header">${T.join("")}</div>`);
21830
21830
  let v = "";
21831
- return A2.length > 0 && (v = `<div class="oembed-content">
21832
- ${A2.join("")}
21831
+ return A.length > 0 && (v = `<div class="oembed-content">
21832
+ ${A.join("")}
21833
21833
  </div>`), `<div class="oembed-container oembed-video">
21834
21834
  ${w}
21835
21835
  ${v}
@@ -21871,11 +21871,11 @@ const Gd = async (e, t, u, r, a) => {
21871
21871
  m.forEach((v) => {
21872
21872
  v.html.includes("oembed-title") || v.html.includes("oembed-author") || v.html.includes("oembed-provider") || v.html.includes("oembed-description") ? f.push(v.html) : T.push(v.html);
21873
21873
  });
21874
- let A2 = "";
21875
- f.length > 0 && (A2 = `<div class="oembed-header">${f.join("")}</div>`);
21874
+ let A = "";
21875
+ f.length > 0 && (A = `<div class="oembed-header">${f.join("")}</div>`);
21876
21876
  let w = "";
21877
21877
  return T.length > 0 && (w = `<div class="oembed-content">${T.join("")}</div>`), `<div class="oembed-container oembed-link">
21878
- ${A2}
21878
+ ${A}
21879
21879
  ${w}
21880
21880
  </div>`;
21881
21881
  }, ta = (e, t) => {
@@ -21910,14 +21910,14 @@ const Gd = async (e, t, u, r, a) => {
21910
21910
  } else
21911
21911
  return `<div class="oembed-responsive-content">${e}</div>`;
21912
21912
  };
21913
- var L;
21913
+ var L$1;
21914
21914
  (function(e) {
21915
21915
  e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
21916
- })(L || (L = {}));
21916
+ })(L$1 || (L$1 = {}));
21917
21917
  function aa(e) {
21918
- return e.type === L.Tag || e.type === L.Script || e.type === L.Style;
21918
+ return e.type === L$1.Tag || e.type === L$1.Script || e.type === L$1.Style;
21919
21919
  }
21920
- const cu = L.Root, gr = L.Text, ia = L.Directive, Ar = L.Comment, na = L.Script, oa = L.Style, zt = L.Tag, ca = L.CDATA, da = L.Doctype;
21920
+ const cu = L$1.Root, gr = L$1.Text, ia = L$1.Directive, Ar = L$1.Comment, na = L$1.Script, oa = L$1.Style, zt = L$1.Tag, ca = L$1.CDATA, da = L$1.Doctype;
21921
21921
  class vr {
21922
21922
  constructor() {
21923
21923
  this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
@@ -21983,7 +21983,7 @@ class du extends vr {
21983
21983
  }
21984
21984
  class We extends du {
21985
21985
  constructor() {
21986
- super(...arguments), this.type = L.Text;
21986
+ super(...arguments), this.type = L$1.Text;
21987
21987
  }
21988
21988
  get nodeType() {
21989
21989
  return 3;
@@ -21991,7 +21991,7 @@ class We extends du {
21991
21991
  }
21992
21992
  class hu extends du {
21993
21993
  constructor() {
21994
- super(...arguments), this.type = L.Comment;
21994
+ super(...arguments), this.type = L$1.Comment;
21995
21995
  }
21996
21996
  get nodeType() {
21997
21997
  return 8;
@@ -21999,7 +21999,7 @@ class hu extends du {
21999
21999
  }
22000
22000
  class lu extends du {
22001
22001
  constructor(t, u) {
22002
- super(u), this.name = t, this.type = L.Directive;
22002
+ super(u), this.name = t, this.type = L$1.Directive;
22003
22003
  }
22004
22004
  get nodeType() {
22005
22005
  return 1;
@@ -22035,7 +22035,7 @@ class mu extends vr {
22035
22035
  }
22036
22036
  class wr extends mu {
22037
22037
  constructor() {
22038
- super(...arguments), this.type = L.CDATA;
22038
+ super(...arguments), this.type = L$1.CDATA;
22039
22039
  }
22040
22040
  get nodeType() {
22041
22041
  return 4;
@@ -22043,7 +22043,7 @@ class wr extends mu {
22043
22043
  }
22044
22044
  class Ne extends mu {
22045
22045
  constructor() {
22046
- super(...arguments), this.type = L.Root;
22046
+ super(...arguments), this.type = L$1.Root;
22047
22047
  }
22048
22048
  get nodeType() {
22049
22049
  return 9;
@@ -22055,7 +22055,7 @@ class pu extends mu {
22055
22055
  * @param attribs Object mapping attribute names to attribute values.
22056
22056
  * @param children Children of the node.
22057
22057
  */
22058
- constructor(t, u, r = [], a = t === "script" ? L.Script : t === "style" ? L.Style : L.Tag) {
22058
+ constructor(t, u, r = [], a = t === "script" ? L$1.Script : t === "style" ? L$1.Style : L$1.Tag) {
22059
22059
  super(r), this.name = t, this.attribs = u, this.type = a;
22060
22060
  }
22061
22061
  get nodeType() {
@@ -22088,21 +22088,21 @@ function I(e) {
22088
22088
  return aa(e);
22089
22089
  }
22090
22090
  function wt$1(e) {
22091
- return e.type === L.CDATA;
22091
+ return e.type === L$1.CDATA;
22092
22092
  }
22093
22093
  function se(e) {
22094
- return e.type === L.Text;
22094
+ return e.type === L$1.Text;
22095
22095
  }
22096
22096
  function Nt$1(e) {
22097
- return e.type === L.Comment;
22097
+ return e.type === L$1.Comment;
22098
22098
  }
22099
22099
  function Qt$1(e) {
22100
- return e.type === L.Directive;
22100
+ return e.type === L$1.Directive;
22101
22101
  }
22102
22102
  function Te(e) {
22103
- return e.type === L.Root;
22103
+ return e.type === L$1.Root;
22104
22104
  }
22105
- function B$1(e) {
22105
+ function B(e) {
22106
22106
  return Object.prototype.hasOwnProperty.call(e, "children");
22107
22107
  }
22108
22108
  function ze(e, t = false) {
@@ -22167,12 +22167,12 @@ class ha {
22167
22167
  this.options.withEndIndices && (t.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(t);
22168
22168
  }
22169
22169
  onopentag(t, u) {
22170
- const r = this.options.xmlMode ? L.Tag : void 0, a = new pu(t, u, void 0, r);
22170
+ const r = this.options.xmlMode ? L$1.Tag : void 0, a = new pu(t, u, void 0, r);
22171
22171
  this.addNode(a), this.tagStack.push(a);
22172
22172
  }
22173
22173
  ontext(t) {
22174
22174
  const { lastNode: u } = this;
22175
- if (u && u.type === L.Text)
22175
+ if (u && u.type === L$1.Text)
22176
22176
  u.data += t, this.options.withEndIndices && (u.endIndex = this.parser.endIndex);
22177
22177
  else {
22178
22178
  const r = new We(t);
@@ -22180,7 +22180,7 @@ class ha {
22180
22180
  }
22181
22181
  }
22182
22182
  oncomment(t) {
22183
- if (this.lastNode && this.lastNode.type === L.Comment) {
22183
+ if (this.lastNode && this.lastNode.type === L$1.Comment) {
22184
22184
  this.lastNode.data += t;
22185
22185
  return;
22186
22186
  }
@@ -22462,20 +22462,20 @@ function Ir(e, t) {
22462
22462
  return xt$1(e, t);
22463
22463
  }
22464
22464
  function ya(e, t) {
22465
- return B$1(e) ? e.children.map((u) => Ir(u, t)).join("") : "";
22465
+ return B(e) ? e.children.map((u) => Ir(u, t)).join("") : "";
22466
22466
  }
22467
22467
  function ot(e) {
22468
22468
  return Array.isArray(e) ? e.map(ot).join("") : I(e) ? e.name === "br" ? `
22469
22469
  ` : ot(e.children) : wt$1(e) ? ot(e.children) : se(e) ? e.data : "";
22470
22470
  }
22471
22471
  function Le(e) {
22472
- return Array.isArray(e) ? e.map(Le).join("") : B$1(e) && !Nt$1(e) ? Le(e.children) : se(e) ? e.data : "";
22472
+ return Array.isArray(e) ? e.map(Le).join("") : B(e) && !Nt$1(e) ? Le(e.children) : se(e) ? e.data : "";
22473
22473
  }
22474
22474
  function dt(e) {
22475
- return Array.isArray(e) ? e.map(dt).join("") : B$1(e) && (e.type === L.Tag || wt$1(e)) ? dt(e.children) : se(e) ? e.data : "";
22475
+ return Array.isArray(e) ? e.map(dt).join("") : B(e) && (e.type === L$1.Tag || wt$1(e)) ? dt(e.children) : se(e) ? e.data : "";
22476
22476
  }
22477
22477
  function It$1(e) {
22478
- return B$1(e) ? e.children : [];
22478
+ return B(e) ? e.children : [];
22479
22479
  }
22480
22480
  function Sr(e) {
22481
22481
  return e.parent || null;
@@ -22580,7 +22580,7 @@ function Eu(e, t, u, r) {
22580
22580
  const c = i[0][n[0]++];
22581
22581
  if (e(c) && (a.push(c), --r <= 0))
22582
22582
  return a;
22583
- u && B$1(c) && c.children.length > 0 && (n.unshift(0), i.unshift(c.children));
22583
+ u && B(c) && c.children.length > 0 && (n.unshift(0), i.unshift(c.children));
22584
22584
  }
22585
22585
  }
22586
22586
  function Ua(e, t) {
@@ -22592,7 +22592,7 @@ function Tu(e, t, u = true) {
22592
22592
  const i = r[a];
22593
22593
  if (I(i) && e(i))
22594
22594
  return i;
22595
- if (u && B$1(i) && i.children.length > 0) {
22595
+ if (u && B(i) && i.children.length > 0) {
22596
22596
  const n = Tu(e, i.children, true);
22597
22597
  if (n)
22598
22598
  return n;
@@ -22601,7 +22601,7 @@ function Tu(e, t, u = true) {
22601
22601
  return null;
22602
22602
  }
22603
22603
  function yr(e, t) {
22604
- return (Array.isArray(t) ? t : [t]).some((u) => I(u) && e(u) || B$1(u) && yr(e, u.children));
22604
+ return (Array.isArray(t) ? t : [t]).some((u) => I(u) && e(u) || B(u) && yr(e, u.children));
22605
22605
  }
22606
22606
  function Fa(e, t) {
22607
22607
  const u = [], r = [Array.isArray(t) ? t : [t]], a = [0];
@@ -22613,7 +22613,7 @@ function Fa(e, t) {
22613
22613
  continue;
22614
22614
  }
22615
22615
  const i = r[0][a[0]++];
22616
- I(i) && e(i) && u.push(i), B$1(i) && i.children.length > 0 && (a.unshift(0), r.unshift(i.children));
22616
+ I(i) && e(i) && u.push(i), B(i) && i.children.length > 0 && (a.unshift(0), r.unshift(i.children));
22617
22617
  }
22618
22618
  }
22619
22619
  const ht = {
@@ -22676,32 +22676,32 @@ function Ga(e) {
22676
22676
  }
22677
22677
  return e;
22678
22678
  }
22679
- var Z;
22679
+ var Z$1;
22680
22680
  (function(e) {
22681
22681
  e[e.DISCONNECTED = 1] = "DISCONNECTED", e[e.PRECEDING = 2] = "PRECEDING", e[e.FOLLOWING = 4] = "FOLLOWING", e[e.CONTAINS = 8] = "CONTAINS", e[e.CONTAINED_BY = 16] = "CONTAINED_BY";
22682
- })(Z || (Z = {}));
22682
+ })(Z$1 || (Z$1 = {}));
22683
22683
  function Lr(e, t) {
22684
22684
  const u = [], r = [];
22685
22685
  if (e === t)
22686
22686
  return 0;
22687
- let a = B$1(e) ? e : e.parent;
22687
+ let a = B(e) ? e : e.parent;
22688
22688
  for (; a; )
22689
22689
  u.unshift(a), a = a.parent;
22690
- for (a = B$1(t) ? t : t.parent; a; )
22690
+ for (a = B(t) ? t : t.parent; a; )
22691
22691
  r.unshift(a), a = a.parent;
22692
22692
  const i = Math.min(u.length, r.length);
22693
22693
  let n = 0;
22694
22694
  for (; n < i && u[n] === r[n]; )
22695
22695
  n++;
22696
22696
  if (n === 0)
22697
- return Z.DISCONNECTED;
22697
+ return Z$1.DISCONNECTED;
22698
22698
  const c = u[n - 1], h = c.children, m = u[n], f = r[n];
22699
- return h.indexOf(m) > h.indexOf(f) ? c === t ? Z.FOLLOWING | Z.CONTAINED_BY : Z.FOLLOWING : c === e ? Z.PRECEDING | Z.CONTAINS : Z.PRECEDING;
22699
+ return h.indexOf(m) > h.indexOf(f) ? c === t ? Z$1.FOLLOWING | Z$1.CONTAINED_BY : Z$1.FOLLOWING : c === e ? Z$1.PRECEDING | Z$1.CONTAINS : Z$1.PRECEDING;
22700
22700
  }
22701
22701
  function ke(e) {
22702
22702
  return e = e.filter((t, u, r) => !r.includes(t, u + 1)), e.sort((t, u) => {
22703
22703
  const r = Lr(t, u);
22704
- return r & Z.PRECEDING ? -1 : r & Z.FOLLOWING ? 1 : 0;
22704
+ return r & Z$1.PRECEDING ? -1 : r & Z$1.FOLLOWING ? 1 : 0;
22705
22705
  }), e;
22706
22706
  }
22707
22707
  function Wa(e) {
@@ -22715,20 +22715,20 @@ function za(e) {
22715
22715
  items: De("entry", u).map((n) => {
22716
22716
  var c;
22717
22717
  const { children: h } = n, m = { media: Rr(h) };
22718
- Q(m, "id", "id", h), Q(m, "title", "title", h);
22718
+ Q$1(m, "id", "id", h), Q$1(m, "title", "title", h);
22719
22719
  const f = (c = lt("link", h)) === null || c === void 0 ? void 0 : c.attribs.href;
22720
22720
  f && (m.link = f);
22721
22721
  const T = fe("summary", h) || fe("content", h);
22722
22722
  T && (m.description = T);
22723
- const A2 = fe("updated", h);
22724
- return A2 && (m.pubDate = new Date(A2)), m;
22723
+ const A = fe("updated", h);
22724
+ return A && (m.pubDate = new Date(A)), m;
22725
22725
  })
22726
22726
  };
22727
- Q(r, "id", "id", u), Q(r, "title", "title", u);
22727
+ Q$1(r, "id", "id", u), Q$1(r, "title", "title", u);
22728
22728
  const a = (t = lt("link", u)) === null || t === void 0 ? void 0 : t.attribs.href;
22729
- a && (r.link = a), Q(r, "description", "subtitle", u);
22729
+ a && (r.link = a), Q$1(r, "description", "subtitle", u);
22730
22730
  const i = fe("updated", u);
22731
- return i && (r.updated = new Date(i)), Q(r, "author", "email", u, true), r;
22731
+ return i && (r.updated = new Date(i)), Q$1(r, "author", "email", u, true), r;
22732
22732
  }
22733
22733
  function Qa(e) {
22734
22734
  var t, u;
@@ -22737,14 +22737,14 @@ function Qa(e) {
22737
22737
  id: "",
22738
22738
  items: De("item", e.children).map((n) => {
22739
22739
  const { children: c } = n, h = { media: Rr(c) };
22740
- Q(h, "id", "guid", c), Q(h, "title", "title", c), Q(h, "link", "link", c), Q(h, "description", "description", c);
22740
+ Q$1(h, "id", "guid", c), Q$1(h, "title", "title", c), Q$1(h, "link", "link", c), Q$1(h, "description", "description", c);
22741
22741
  const m = fe("pubDate", c) || fe("dc:date", c);
22742
22742
  return m && (h.pubDate = new Date(m)), h;
22743
22743
  })
22744
22744
  };
22745
- Q(a, "title", "title", r), Q(a, "link", "link", r), Q(a, "description", "description", r);
22745
+ Q$1(a, "title", "title", r), Q$1(a, "link", "link", r), Q$1(a, "description", "description", r);
22746
22746
  const i = fe("lastBuildDate", r);
22747
- return i && (a.updated = new Date(i)), Q(a, "author", "managingEditor", r, true), a;
22747
+ return i && (a.updated = new Date(i)), Q$1(a, "author", "managingEditor", r, true), a;
22748
22748
  }
22749
22749
  const Ka = ["url", "type", "lang"], Xa = [
22750
22750
  "fileSize",
@@ -22775,7 +22775,7 @@ function lt(e, t) {
22775
22775
  function fe(e, t, u = false) {
22776
22776
  return Le(De(e, t, u, 1)).trim();
22777
22777
  }
22778
- function Q(e, t, u, r, a = false) {
22778
+ function Q$1(e, t, u, r, a = false) {
22779
22779
  const i = fe(u, r, a);
22780
22780
  i && (e[t] = i);
22781
22781
  }
@@ -22785,7 +22785,7 @@ function Za(e) {
22785
22785
  const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22786
22786
  __proto__: null,
22787
22787
  get DocumentPosition() {
22788
- return Z;
22788
+ return Z$1;
22789
22789
  },
22790
22790
  append: Pa,
22791
22791
  appendChild: ka,
@@ -22811,7 +22811,7 @@ const St$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
22811
22811
  getSiblings: Cr,
22812
22812
  getText: ot,
22813
22813
  hasAttrib: La,
22814
- hasChildren: B$1,
22814
+ hasChildren: B,
22815
22815
  innerText: dt,
22816
22816
  isCDATA: wt$1,
22817
22817
  isComment: Nt$1,
@@ -22926,7 +22926,7 @@ function oi(e) {
22926
22926
  function ci(e) {
22927
22927
  return e.replace(/[A-Z]/g, "-$&").toLowerCase();
22928
22928
  }
22929
- function P$1(e, t) {
22929
+ function P(e, t) {
22930
22930
  const u = e.length;
22931
22931
  for (let r = 0; r < u; r++)
22932
22932
  t(e[r], r);
@@ -22992,26 +22992,26 @@ function mi(e) {
22992
22992
  var t;
22993
22993
  return e >= 55296 && e <= 57343 || e > 1114111 ? 65533 : (t = li.get(e)) !== null && t !== void 0 ? t : e;
22994
22994
  }
22995
- var V;
22995
+ var V$1;
22996
22996
  (function(e) {
22997
22997
  e[e.NUM = 35] = "NUM", e[e.SEMI = 59] = "SEMI", e[e.EQUALS = 61] = "EQUALS", e[e.ZERO = 48] = "ZERO", e[e.NINE = 57] = "NINE", e[e.LOWER_A = 97] = "LOWER_A", e[e.LOWER_F = 102] = "LOWER_F", e[e.LOWER_X = 120] = "LOWER_X", e[e.LOWER_Z = 122] = "LOWER_Z", e[e.UPPER_A = 65] = "UPPER_A", e[e.UPPER_F = 70] = "UPPER_F", e[e.UPPER_Z = 90] = "UPPER_Z";
22998
- })(V || (V = {}));
22998
+ })(V$1 || (V$1 = {}));
22999
22999
  const pi = 32;
23000
23000
  var be;
23001
23001
  (function(e) {
23002
23002
  e[e.VALUE_LENGTH = 49152] = "VALUE_LENGTH", e[e.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", e[e.JUMP_TABLE = 127] = "JUMP_TABLE";
23003
23003
  })(be || (be = {}));
23004
23004
  function Zt(e) {
23005
- return e >= V.ZERO && e <= V.NINE;
23005
+ return e >= V$1.ZERO && e <= V$1.NINE;
23006
23006
  }
23007
23007
  function fi(e) {
23008
- return e >= V.UPPER_A && e <= V.UPPER_F || e >= V.LOWER_A && e <= V.LOWER_F;
23008
+ return e >= V$1.UPPER_A && e <= V$1.UPPER_F || e >= V$1.LOWER_A && e <= V$1.LOWER_F;
23009
23009
  }
23010
23010
  function bi(e) {
23011
- return e >= V.UPPER_A && e <= V.UPPER_Z || e >= V.LOWER_A && e <= V.LOWER_Z || Zt(e);
23011
+ return e >= V$1.UPPER_A && e <= V$1.UPPER_Z || e >= V$1.LOWER_A && e <= V$1.LOWER_Z || Zt(e);
23012
23012
  }
23013
23013
  function Ei(e) {
23014
- return e === V.EQUALS || bi(e);
23014
+ return e === V$1.EQUALS || bi(e);
23015
23015
  }
23016
23016
  var q$1;
23017
23017
  (function(e) {
@@ -23043,7 +23043,7 @@ let Ti = class {
23043
23043
  write(t, u) {
23044
23044
  switch (this.state) {
23045
23045
  case q$1.EntityStart:
23046
- return t.charCodeAt(u) === V.NUM ? (this.state = q$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q$1.NamedEntity, this.stateNamedEntity(t, u));
23046
+ return t.charCodeAt(u) === V$1.NUM ? (this.state = q$1.NumericStart, this.consumed += 1, this.stateNumericStart(t, u + 1)) : (this.state = q$1.NamedEntity, this.stateNamedEntity(t, u));
23047
23047
  case q$1.NumericStart:
23048
23048
  return this.stateNumericStart(t, u);
23049
23049
  case q$1.NumericDecimal:
@@ -23064,7 +23064,7 @@ let Ti = class {
23064
23064
  * @returns The number of characters that were consumed, or -1 if the entity is incomplete.
23065
23065
  */
23066
23066
  stateNumericStart(t, u) {
23067
- return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V.LOWER_X ? (this.state = q$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q$1.NumericDecimal, this.stateNumericDecimal(t, u));
23067
+ return u >= t.length ? -1 : (t.charCodeAt(u) | pi) === V$1.LOWER_X ? (this.state = q$1.NumericHex, this.consumed += 1, this.stateNumericHex(t, u + 1)) : (this.state = q$1.NumericDecimal, this.stateNumericDecimal(t, u));
23068
23068
  }
23069
23069
  addToNumericResult(t, u, r, a) {
23070
23070
  if (u !== r) {
@@ -23129,11 +23129,11 @@ let Ti = class {
23129
23129
  var r;
23130
23130
  if (this.consumed <= u)
23131
23131
  return (r = this.errors) === null || r === void 0 || r.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
23132
- if (t === V.SEMI)
23132
+ if (t === V$1.SEMI)
23133
23133
  this.consumed += 1;
23134
23134
  else if (this.decodeMode === ue.Strict)
23135
23135
  return 0;
23136
- return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
23136
+ return this.emitCodePoint(mi(this.result), this.consumed), this.errors && (t !== V$1.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
23137
23137
  }
23138
23138
  /**
23139
23139
  * Parses a named entity.
@@ -23155,7 +23155,7 @@ let Ti = class {
23155
23155
  (i === 0 || // And there should be no invalid characters.
23156
23156
  Ei(n)) ? 0 : this.emitNotTerminatedNamedEntity();
23157
23157
  if (a = r[this.treeIndex], i = (a & be.VALUE_LENGTH) >> 14, i !== 0) {
23158
- if (n === V.SEMI)
23158
+ if (n === V$1.SEMI)
23159
23159
  return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
23160
23160
  this.decodeMode !== ue.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
23161
23161
  }
@@ -23233,10 +23233,10 @@ var x;
23233
23233
  (function(e) {
23234
23234
  e[e.Tab = 9] = "Tab", e[e.NewLine = 10] = "NewLine", e[e.FormFeed = 12] = "FormFeed", e[e.CarriageReturn = 13] = "CarriageReturn", e[e.Space = 32] = "Space", e[e.ExclamationMark = 33] = "ExclamationMark", e[e.Number = 35] = "Number", e[e.Amp = 38] = "Amp", e[e.SingleQuote = 39] = "SingleQuote", e[e.DoubleQuote = 34] = "DoubleQuote", e[e.Dash = 45] = "Dash", e[e.Slash = 47] = "Slash", e[e.Zero = 48] = "Zero", e[e.Nine = 57] = "Nine", e[e.Semi = 59] = "Semi", e[e.Lt = 60] = "Lt", e[e.Eq = 61] = "Eq", e[e.Gt = 62] = "Gt", e[e.Questionmark = 63] = "Questionmark", e[e.UpperA = 65] = "UpperA", e[e.LowerA = 97] = "LowerA", e[e.UpperF = 70] = "UpperF", e[e.LowerF = 102] = "LowerF", e[e.UpperZ = 90] = "UpperZ", e[e.LowerZ = 122] = "LowerZ", e[e.LowerX = 120] = "LowerX", e[e.OpeningSquareBracket = 91] = "OpeningSquareBracket";
23235
23235
  })(x || (x = {}));
23236
- var _;
23236
+ var _$1;
23237
23237
  (function(e) {
23238
23238
  e[e.Text = 1] = "Text", e[e.BeforeTagName = 2] = "BeforeTagName", e[e.InTagName = 3] = "InTagName", e[e.InSelfClosingTag = 4] = "InSelfClosingTag", e[e.BeforeClosingTagName = 5] = "BeforeClosingTagName", e[e.InClosingTagName = 6] = "InClosingTagName", e[e.AfterClosingTagName = 7] = "AfterClosingTagName", e[e.BeforeAttributeName = 8] = "BeforeAttributeName", e[e.InAttributeName = 9] = "InAttributeName", e[e.AfterAttributeName = 10] = "AfterAttributeName", e[e.BeforeAttributeValue = 11] = "BeforeAttributeValue", e[e.InAttributeValueDq = 12] = "InAttributeValueDq", e[e.InAttributeValueSq = 13] = "InAttributeValueSq", e[e.InAttributeValueNq = 14] = "InAttributeValueNq", e[e.BeforeDeclaration = 15] = "BeforeDeclaration", e[e.InDeclaration = 16] = "InDeclaration", e[e.InProcessingInstruction = 17] = "InProcessingInstruction", e[e.BeforeComment = 18] = "BeforeComment", e[e.CDATASequence = 19] = "CDATASequence", e[e.InSpecialComment = 20] = "InSpecialComment", e[e.InCommentLike = 21] = "InCommentLike", e[e.BeforeSpecialS = 22] = "BeforeSpecialS", e[e.BeforeSpecialT = 23] = "BeforeSpecialT", e[e.SpecialStartSequence = 24] = "SpecialStartSequence", e[e.InSpecialTag = 25] = "InSpecialTag", e[e.InEntity = 26] = "InEntity";
23239
- })(_ || (_ = {}));
23239
+ })(_$1 || (_$1 = {}));
23240
23240
  function ne(e) {
23241
23241
  return e === x.Space || e === x.NewLine || e === x.Tab || e === x.FormFeed || e === x.CarriageReturn;
23242
23242
  }
@@ -23250,7 +23250,7 @@ var re;
23250
23250
  (function(e) {
23251
23251
  e[e.NoValue = 0] = "NoValue", e[e.Unquoted = 1] = "Unquoted", e[e.Single = 2] = "Single", e[e.Double = 3] = "Double";
23252
23252
  })(re || (re = {}));
23253
- const F$1 = {
23253
+ const F = {
23254
23254
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
23255
23255
  // CDATA[
23256
23256
  CdataEnd: new Uint8Array([93, 93, 62]),
@@ -23281,10 +23281,10 @@ const F$1 = {
23281
23281
  };
23282
23282
  let Ai = class {
23283
23283
  constructor({ xmlMode: t = false, decodeEntities: u = true }, r) {
23284
- this.cbs = r, this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
23284
+ this.cbs = r, this.state = _$1.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = _$1.Text, this.isSpecial = false, this.running = true, this.offset = 0, this.currentSequence = void 0, this.sequenceIndex = 0, this.xmlMode = t, this.decodeEntities = u, this.entityDecoder = new Ti(t ? hi : di, (a, i) => this.emitCodePoint(a, i));
23285
23285
  }
23286
23286
  reset() {
23287
- this.state = _.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
23287
+ this.state = _$1.Text, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = _$1.Text, this.currentSequence = void 0, this.running = true, this.offset = 0;
23288
23288
  }
23289
23289
  write(t) {
23290
23290
  this.offset += this.buffer.length, this.buffer = t, this.parse();
@@ -23299,7 +23299,7 @@ let Ai = class {
23299
23299
  this.running = true, this.index < this.buffer.length + this.offset && this.parse();
23300
23300
  }
23301
23301
  stateText(t) {
23302
- t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
23302
+ t === x.Lt || !this.decodeEntities && this.fastForwardTo(x.Lt) ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = _$1.BeforeTagName, this.sectionStart = this.index) : this.decodeEntities && t === x.Amp && this.startEntity();
23303
23303
  }
23304
23304
  stateSpecialStartSequence(t) {
23305
23305
  const u = this.sequenceIndex === this.currentSequence.length;
@@ -23315,7 +23315,7 @@ let Ai = class {
23315
23315
  this.sequenceIndex++;
23316
23316
  return;
23317
23317
  }
23318
- this.sequenceIndex = 0, this.state = _.InTagName, this.stateInTagName(t);
23318
+ this.sequenceIndex = 0, this.state = _$1.InTagName, this.stateInTagName(t);
23319
23319
  }
23320
23320
  /** Look for an end tag. For <title> tags, also decode entities. */
23321
23321
  stateInSpecialTag(t) {
@@ -23331,10 +23331,10 @@ let Ai = class {
23331
23331
  }
23332
23332
  this.sequenceIndex = 0;
23333
23333
  }
23334
- (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F$1.TitleEnd ? this.decodeEntities && t === x.Amp && this.startEntity() : this.fastForwardTo(x.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === x.Lt);
23334
+ (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === F.TitleEnd ? this.decodeEntities && t === x.Amp && this.startEntity() : this.fastForwardTo(x.Lt) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === x.Lt);
23335
23335
  }
23336
23336
  stateCDATASequence(t) {
23337
- t === F$1.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F$1.Cdata.length && (this.state = _.InCommentLike, this.currentSequence = F$1.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = _.InDeclaration, this.stateInDeclaration(t));
23337
+ t === F.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === F.Cdata.length && (this.state = _$1.InCommentLike, this.currentSequence = F.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = _$1.InDeclaration, this.stateInDeclaration(t));
23338
23338
  }
23339
23339
  /**
23340
23340
  * When we wait for one specific character, we can speed things up
@@ -23357,7 +23357,7 @@ let Ai = class {
23357
23357
  * - All characters but the start character of the sequence can be skipped.
23358
23358
  */
23359
23359
  stateInCommentLike(t) {
23360
- t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F$1.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
23360
+ t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index, 2) : this.cbs.oncomment(this.sectionStart, this.index, 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = _$1.Text) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
23361
23361
  }
23362
23362
  /**
23363
23363
  * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
@@ -23369,47 +23369,47 @@ let Ai = class {
23369
23369
  return this.xmlMode ? !st(t) : gi(t);
23370
23370
  }
23371
23371
  startSpecial(t, u) {
23372
- this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _.SpecialStartSequence;
23372
+ this.isSpecial = true, this.currentSequence = t, this.sequenceIndex = u, this.state = _$1.SpecialStartSequence;
23373
23373
  }
23374
23374
  stateBeforeTagName(t) {
23375
23375
  if (t === x.ExclamationMark)
23376
- this.state = _.BeforeDeclaration, this.sectionStart = this.index + 1;
23376
+ this.state = _$1.BeforeDeclaration, this.sectionStart = this.index + 1;
23377
23377
  else if (t === x.Questionmark)
23378
- this.state = _.InProcessingInstruction, this.sectionStart = this.index + 1;
23378
+ this.state = _$1.InProcessingInstruction, this.sectionStart = this.index + 1;
23379
23379
  else if (this.isTagStartChar(t)) {
23380
23380
  const u = t | 32;
23381
- this.sectionStart = this.index, this.xmlMode ? this.state = _.InTagName : u === F$1.ScriptEnd[2] ? this.state = _.BeforeSpecialS : u === F$1.TitleEnd[2] || u === F$1.XmpEnd[2] ? this.state = _.BeforeSpecialT : this.state = _.InTagName;
23382
- } else t === x.Slash ? this.state = _.BeforeClosingTagName : (this.state = _.Text, this.stateText(t));
23381
+ this.sectionStart = this.index, this.xmlMode ? this.state = _$1.InTagName : u === F.ScriptEnd[2] ? this.state = _$1.BeforeSpecialS : u === F.TitleEnd[2] || u === F.XmpEnd[2] ? this.state = _$1.BeforeSpecialT : this.state = _$1.InTagName;
23382
+ } else t === x.Slash ? this.state = _$1.BeforeClosingTagName : (this.state = _$1.Text, this.stateText(t));
23383
23383
  }
23384
23384
  stateInTagName(t) {
23385
- st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
23385
+ st(t) && (this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t));
23386
23386
  }
23387
23387
  stateBeforeClosingTagName(t) {
23388
- ne(t) || (t === x.Gt ? this.state = _.Text : (this.state = this.isTagStartChar(t) ? _.InClosingTagName : _.InSpecialComment, this.sectionStart = this.index));
23388
+ ne(t) || (t === x.Gt ? this.state = _$1.Text : (this.state = this.isTagStartChar(t) ? _$1.InClosingTagName : _$1.InSpecialComment, this.sectionStart = this.index));
23389
23389
  }
23390
23390
  stateInClosingTagName(t) {
23391
- (t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _.AfterClosingTagName, this.stateAfterClosingTagName(t));
23391
+ (t === x.Gt || ne(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = _$1.AfterClosingTagName, this.stateAfterClosingTagName(t));
23392
23392
  }
23393
23393
  stateAfterClosingTagName(t) {
23394
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _.Text, this.sectionStart = this.index + 1);
23394
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.state = _$1.Text, this.sectionStart = this.index + 1);
23395
23395
  }
23396
23396
  stateBeforeAttributeName(t) {
23397
- t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _.InSpecialTag, this.sequenceIndex = 0) : this.state = _.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _.InSelfClosingTag : ne(t) || (this.state = _.InAttributeName, this.sectionStart = this.index);
23397
+ t === x.Gt ? (this.cbs.onopentagend(this.index), this.isSpecial ? (this.state = _$1.InSpecialTag, this.sequenceIndex = 0) : this.state = _$1.Text, this.sectionStart = this.index + 1) : t === x.Slash ? this.state = _$1.InSelfClosingTag : ne(t) || (this.state = _$1.InAttributeName, this.sectionStart = this.index);
23398
23398
  }
23399
23399
  stateInSelfClosingTag(t) {
23400
- t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne(t) || (this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t));
23400
+ t === x.Gt ? (this.cbs.onselfclosingtag(this.index), this.state = _$1.Text, this.sectionStart = this.index + 1, this.isSpecial = false) : ne(t) || (this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t));
23401
23401
  }
23402
23402
  stateInAttributeName(t) {
23403
- (t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _.AfterAttributeName, this.stateAfterAttributeName(t));
23403
+ (t === x.Eq || st(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.sectionStart = this.index, this.state = _$1.AfterAttributeName, this.stateAfterAttributeName(t));
23404
23404
  }
23405
23405
  stateAfterAttributeName(t) {
23406
- t === x.Eq ? this.state = _.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne(t) || (this.cbs.onattribend(re.NoValue, this.sectionStart), this.state = _.InAttributeName, this.sectionStart = this.index);
23406
+ t === x.Eq ? this.state = _$1.BeforeAttributeValue : t === x.Slash || t === x.Gt ? (this.cbs.onattribend(re.NoValue, this.sectionStart), this.sectionStart = -1, this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t)) : ne(t) || (this.cbs.onattribend(re.NoValue, this.sectionStart), this.state = _$1.InAttributeName, this.sectionStart = this.index);
23407
23407
  }
23408
23408
  stateBeforeAttributeValue(t) {
23409
- t === x.DoubleQuote ? (this.state = _.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _.InAttributeValueSq, this.sectionStart = this.index + 1) : ne(t) || (this.sectionStart = this.index, this.state = _.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
23409
+ t === x.DoubleQuote ? (this.state = _$1.InAttributeValueDq, this.sectionStart = this.index + 1) : t === x.SingleQuote ? (this.state = _$1.InAttributeValueSq, this.sectionStart = this.index + 1) : ne(t) || (this.sectionStart = this.index, this.state = _$1.InAttributeValueNq, this.stateInAttributeValueNoQuotes(t));
23410
23410
  }
23411
23411
  handleInAttributeValue(t, u) {
23412
- t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re.Double : re.Single, this.index + 1), this.state = _.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
23412
+ t === u || !this.decodeEntities && this.fastForwardTo(u) ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(u === x.DoubleQuote ? re.Double : re.Single, this.index + 1), this.state = _$1.BeforeAttributeName) : this.decodeEntities && t === x.Amp && this.startEntity();
23413
23413
  }
23414
23414
  stateInAttributeValueDoubleQuotes(t) {
23415
23415
  this.handleInAttributeValue(t, x.DoubleQuote);
@@ -23418,47 +23418,47 @@ let Ai = class {
23418
23418
  this.handleInAttributeValue(t, x.SingleQuote);
23419
23419
  }
23420
23420
  stateInAttributeValueNoQuotes(t) {
23421
- ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re.Unquoted, this.index), this.state = _.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
23421
+ ne(t) || t === x.Gt ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(re.Unquoted, this.index), this.state = _$1.BeforeAttributeName, this.stateBeforeAttributeName(t)) : this.decodeEntities && t === x.Amp && this.startEntity();
23422
23422
  }
23423
23423
  stateBeforeDeclaration(t) {
23424
- t === x.OpeningSquareBracket ? (this.state = _.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _.BeforeComment : _.InDeclaration;
23424
+ t === x.OpeningSquareBracket ? (this.state = _$1.CDATASequence, this.sequenceIndex = 0) : this.state = t === x.Dash ? _$1.BeforeComment : _$1.InDeclaration;
23425
23425
  }
23426
23426
  stateInDeclaration(t) {
23427
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
23427
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.ondeclaration(this.sectionStart, this.index), this.state = _$1.Text, this.sectionStart = this.index + 1);
23428
23428
  }
23429
23429
  stateInProcessingInstruction(t) {
23430
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _.Text, this.sectionStart = this.index + 1);
23430
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = _$1.Text, this.sectionStart = this.index + 1);
23431
23431
  }
23432
23432
  stateBeforeComment(t) {
23433
- t === x.Dash ? (this.state = _.InCommentLike, this.currentSequence = F$1.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = _.InDeclaration;
23433
+ t === x.Dash ? (this.state = _$1.InCommentLike, this.currentSequence = F.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = _$1.InDeclaration;
23434
23434
  }
23435
23435
  stateInSpecialComment(t) {
23436
- (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _.Text, this.sectionStart = this.index + 1);
23436
+ (t === x.Gt || this.fastForwardTo(x.Gt)) && (this.cbs.oncomment(this.sectionStart, this.index, 0), this.state = _$1.Text, this.sectionStart = this.index + 1);
23437
23437
  }
23438
23438
  stateBeforeSpecialS(t) {
23439
23439
  const u = t | 32;
23440
- u === F$1.ScriptEnd[3] ? this.startSpecial(F$1.ScriptEnd, 4) : u === F$1.StyleEnd[3] ? this.startSpecial(F$1.StyleEnd, 4) : (this.state = _.InTagName, this.stateInTagName(t));
23440
+ u === F.ScriptEnd[3] ? this.startSpecial(F.ScriptEnd, 4) : u === F.StyleEnd[3] ? this.startSpecial(F.StyleEnd, 4) : (this.state = _$1.InTagName, this.stateInTagName(t));
23441
23441
  }
23442
23442
  stateBeforeSpecialT(t) {
23443
23443
  switch (t | 32) {
23444
- case F$1.TitleEnd[3]: {
23445
- this.startSpecial(F$1.TitleEnd, 4);
23444
+ case F.TitleEnd[3]: {
23445
+ this.startSpecial(F.TitleEnd, 4);
23446
23446
  break;
23447
23447
  }
23448
- case F$1.TextareaEnd[3]: {
23449
- this.startSpecial(F$1.TextareaEnd, 4);
23448
+ case F.TextareaEnd[3]: {
23449
+ this.startSpecial(F.TextareaEnd, 4);
23450
23450
  break;
23451
23451
  }
23452
- case F$1.XmpEnd[3]: {
23453
- this.startSpecial(F$1.XmpEnd, 4);
23452
+ case F.XmpEnd[3]: {
23453
+ this.startSpecial(F.XmpEnd, 4);
23454
23454
  break;
23455
23455
  }
23456
23456
  default:
23457
- this.state = _.InTagName, this.stateInTagName(t);
23457
+ this.state = _$1.InTagName, this.stateInTagName(t);
23458
23458
  }
23459
23459
  }
23460
23460
  startEntity() {
23461
- this.baseState = this.state, this.state = _.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _.Text || this.baseState === _.InSpecialTag ? ue.Legacy : ue.Attribute);
23461
+ this.baseState = this.state, this.state = _$1.InEntity, this.entityStart = this.index, this.entityDecoder.startEntity(this.xmlMode ? ue.Strict : this.baseState === _$1.Text || this.baseState === _$1.InSpecialTag ? ue.Legacy : ue.Attribute);
23462
23462
  }
23463
23463
  stateInEntity() {
23464
23464
  const t = this.entityDecoder.write(this.buffer, this.index - this.offset);
@@ -23468,7 +23468,7 @@ let Ai = class {
23468
23468
  * Remove data that has already been consumed from the buffer.
23469
23469
  */
23470
23470
  cleanup() {
23471
- this.running && this.sectionStart !== this.index && (this.state === _.Text || this.state === _.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _.InAttributeValueDq || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
23471
+ this.running && this.sectionStart !== this.index && (this.state === _$1.Text || this.state === _$1.InSpecialTag && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === _$1.InAttributeValueDq || this.state === _$1.InAttributeValueSq || this.state === _$1.InAttributeValueNq) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
23472
23472
  }
23473
23473
  shouldContinue() {
23474
23474
  return this.index < this.buffer.length + this.offset && this.running;
@@ -23482,107 +23482,107 @@ let Ai = class {
23482
23482
  for (; this.shouldContinue(); ) {
23483
23483
  const t = this.buffer.charCodeAt(this.index - this.offset);
23484
23484
  switch (this.state) {
23485
- case _.Text: {
23485
+ case _$1.Text: {
23486
23486
  this.stateText(t);
23487
23487
  break;
23488
23488
  }
23489
- case _.SpecialStartSequence: {
23489
+ case _$1.SpecialStartSequence: {
23490
23490
  this.stateSpecialStartSequence(t);
23491
23491
  break;
23492
23492
  }
23493
- case _.InSpecialTag: {
23493
+ case _$1.InSpecialTag: {
23494
23494
  this.stateInSpecialTag(t);
23495
23495
  break;
23496
23496
  }
23497
- case _.CDATASequence: {
23497
+ case _$1.CDATASequence: {
23498
23498
  this.stateCDATASequence(t);
23499
23499
  break;
23500
23500
  }
23501
- case _.InAttributeValueDq: {
23501
+ case _$1.InAttributeValueDq: {
23502
23502
  this.stateInAttributeValueDoubleQuotes(t);
23503
23503
  break;
23504
23504
  }
23505
- case _.InAttributeName: {
23505
+ case _$1.InAttributeName: {
23506
23506
  this.stateInAttributeName(t);
23507
23507
  break;
23508
23508
  }
23509
- case _.InCommentLike: {
23509
+ case _$1.InCommentLike: {
23510
23510
  this.stateInCommentLike(t);
23511
23511
  break;
23512
23512
  }
23513
- case _.InSpecialComment: {
23513
+ case _$1.InSpecialComment: {
23514
23514
  this.stateInSpecialComment(t);
23515
23515
  break;
23516
23516
  }
23517
- case _.BeforeAttributeName: {
23517
+ case _$1.BeforeAttributeName: {
23518
23518
  this.stateBeforeAttributeName(t);
23519
23519
  break;
23520
23520
  }
23521
- case _.InTagName: {
23521
+ case _$1.InTagName: {
23522
23522
  this.stateInTagName(t);
23523
23523
  break;
23524
23524
  }
23525
- case _.InClosingTagName: {
23525
+ case _$1.InClosingTagName: {
23526
23526
  this.stateInClosingTagName(t);
23527
23527
  break;
23528
23528
  }
23529
- case _.BeforeTagName: {
23529
+ case _$1.BeforeTagName: {
23530
23530
  this.stateBeforeTagName(t);
23531
23531
  break;
23532
23532
  }
23533
- case _.AfterAttributeName: {
23533
+ case _$1.AfterAttributeName: {
23534
23534
  this.stateAfterAttributeName(t);
23535
23535
  break;
23536
23536
  }
23537
- case _.InAttributeValueSq: {
23537
+ case _$1.InAttributeValueSq: {
23538
23538
  this.stateInAttributeValueSingleQuotes(t);
23539
23539
  break;
23540
23540
  }
23541
- case _.BeforeAttributeValue: {
23541
+ case _$1.BeforeAttributeValue: {
23542
23542
  this.stateBeforeAttributeValue(t);
23543
23543
  break;
23544
23544
  }
23545
- case _.BeforeClosingTagName: {
23545
+ case _$1.BeforeClosingTagName: {
23546
23546
  this.stateBeforeClosingTagName(t);
23547
23547
  break;
23548
23548
  }
23549
- case _.AfterClosingTagName: {
23549
+ case _$1.AfterClosingTagName: {
23550
23550
  this.stateAfterClosingTagName(t);
23551
23551
  break;
23552
23552
  }
23553
- case _.BeforeSpecialS: {
23553
+ case _$1.BeforeSpecialS: {
23554
23554
  this.stateBeforeSpecialS(t);
23555
23555
  break;
23556
23556
  }
23557
- case _.BeforeSpecialT: {
23557
+ case _$1.BeforeSpecialT: {
23558
23558
  this.stateBeforeSpecialT(t);
23559
23559
  break;
23560
23560
  }
23561
- case _.InAttributeValueNq: {
23561
+ case _$1.InAttributeValueNq: {
23562
23562
  this.stateInAttributeValueNoQuotes(t);
23563
23563
  break;
23564
23564
  }
23565
- case _.InSelfClosingTag: {
23565
+ case _$1.InSelfClosingTag: {
23566
23566
  this.stateInSelfClosingTag(t);
23567
23567
  break;
23568
23568
  }
23569
- case _.InDeclaration: {
23569
+ case _$1.InDeclaration: {
23570
23570
  this.stateInDeclaration(t);
23571
23571
  break;
23572
23572
  }
23573
- case _.BeforeDeclaration: {
23573
+ case _$1.BeforeDeclaration: {
23574
23574
  this.stateBeforeDeclaration(t);
23575
23575
  break;
23576
23576
  }
23577
- case _.BeforeComment: {
23577
+ case _$1.BeforeComment: {
23578
23578
  this.stateBeforeComment(t);
23579
23579
  break;
23580
23580
  }
23581
- case _.InProcessingInstruction: {
23581
+ case _$1.InProcessingInstruction: {
23582
23582
  this.stateInProcessingInstruction(t);
23583
23583
  break;
23584
23584
  }
23585
- case _.InEntity: {
23585
+ case _$1.InEntity: {
23586
23586
  this.stateInEntity();
23587
23587
  break;
23588
23588
  }
@@ -23592,15 +23592,15 @@ let Ai = class {
23592
23592
  this.cleanup();
23593
23593
  }
23594
23594
  finish() {
23595
- this.state === _.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
23595
+ this.state === _$1.InEntity && (this.entityDecoder.end(), this.state = this.baseState), this.handleTrailingData(), this.cbs.onend();
23596
23596
  }
23597
23597
  /** Handle any trailing data. */
23598
23598
  handleTrailingData() {
23599
23599
  const t = this.buffer.length + this.offset;
23600
- this.sectionStart >= t || (this.state === _.InCommentLike ? this.currentSequence === F$1.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === _.InTagName || this.state === _.BeforeAttributeName || this.state === _.BeforeAttributeValue || this.state === _.AfterAttributeName || this.state === _.InAttributeName || this.state === _.InAttributeValueSq || this.state === _.InAttributeValueDq || this.state === _.InAttributeValueNq || this.state === _.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
23600
+ this.sectionStart >= t || (this.state === _$1.InCommentLike ? this.currentSequence === F.CdataEnd ? this.cbs.oncdata(this.sectionStart, t, 0) : this.cbs.oncomment(this.sectionStart, t, 0) : this.state === _$1.InTagName || this.state === _$1.BeforeAttributeName || this.state === _$1.BeforeAttributeValue || this.state === _$1.AfterAttributeName || this.state === _$1.InAttributeName || this.state === _$1.InAttributeValueSq || this.state === _$1.InAttributeValueDq || this.state === _$1.InAttributeValueNq || this.state === _$1.InClosingTagName || this.cbs.ontext(this.sectionStart, t));
23601
23601
  }
23602
23602
  emitCodePoint(t, u) {
23603
- this.baseState !== _.Text && this.baseState !== _.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
23603
+ this.baseState !== _$1.Text && this.baseState !== _$1.InSpecialTag ? (this.sectionStart < this.entityStart && this.cbs.onattribdata(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.onattribentity(t)) : (this.sectionStart < this.entityStart && this.cbs.ontext(this.sectionStart, this.entityStart), this.sectionStart = this.entityStart + u, this.index = this.sectionStart - 1, this.cbs.ontextentity(t, this.sectionStart));
23604
23604
  }
23605
23605
  };
23606
23606
  const ye = /* @__PURE__ */ new Set([
@@ -23747,11 +23747,11 @@ let xi = class {
23747
23747
  if (this.lowerCaseTagNames && (T = T.toLowerCase()), this.htmlMode && (ju.has(T) || Vu.has(T)) && this.foreignContext.shift(), this.isVoidElement(T))
23748
23748
  this.htmlMode && T === "br" && ((n = (i = this.cbs).onopentagname) === null || n === void 0 || n.call(i, "br"), (h = (c = this.cbs).onopentag) === null || h === void 0 || h.call(c, "br", {}, true), (f = (m = this.cbs).onclosetag) === null || f === void 0 || f.call(m, "br", false));
23749
23749
  else {
23750
- const A2 = this.stack.indexOf(T);
23751
- if (A2 !== -1)
23752
- for (let w = 0; w <= A2; w++) {
23750
+ const A = this.stack.indexOf(T);
23751
+ if (A !== -1)
23752
+ for (let w = 0; w <= A; w++) {
23753
23753
  const v = this.stack.shift();
23754
- (a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !== A2);
23754
+ (a = (r = this.cbs).onclosetag) === null || a === void 0 || a.call(r, v, w !== A);
23755
23755
  }
23756
23756
  else this.htmlMode && T === "p" && (this.emitOpenTag("p"), this.closeCurrentTag(true));
23757
23757
  }
@@ -23817,10 +23817,10 @@ let xi = class {
23817
23817
  }
23818
23818
  /** @internal */
23819
23819
  oncdata(t, u, r) {
23820
- var a, i, n, c, h, m, f, T, A2, w;
23820
+ var a, i, n, c, h, m, f, T, A, w;
23821
23821
  this.endIndex = u;
23822
23822
  const v = this.getSlice(t, u - r);
23823
- !this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (A2 = this.cbs).oncommentend) === null || w === void 0 || w.call(A2)), this.startIndex = u + 1;
23823
+ !this.htmlMode || this.options.recognizeCDATA ? ((i = (a = this.cbs).oncdatastart) === null || i === void 0 || i.call(a), (c = (n = this.cbs).ontext) === null || c === void 0 || c.call(n, v), (m = (h = this.cbs).oncdataend) === null || m === void 0 || m.call(h)) : ((T = (f = this.cbs).oncomment) === null || T === void 0 || T.call(f, `[CDATA[${v}]]`), (w = (A = this.cbs).oncommentend) === null || w === void 0 || w.call(A)), this.startIndex = u + 1;
23824
23824
  }
23825
23825
  /** @internal */
23826
23826
  onend() {
@@ -23948,11 +23948,11 @@ function Ci(e, t) {
23948
23948
  if (typeof t == "function") {
23949
23949
  if (typeof e != "string")
23950
23950
  throw new Error("Bad combination of arguments.");
23951
- return P$1(this, (u, r) => {
23951
+ return P(this, (u, r) => {
23952
23952
  I(u) && Oe(u, e, t.call(u, r, u.attribs[e]));
23953
23953
  });
23954
23954
  }
23955
- return P$1(this, (u) => {
23955
+ return P(this, (u) => {
23956
23956
  if (I(u))
23957
23957
  if (typeof e == "object")
23958
23958
  for (const r of Object.keys(e)) {
@@ -24013,11 +24013,11 @@ function yi(e, t) {
24013
24013
  if (typeof t == "function") {
24014
24014
  if (typeof e == "object")
24015
24015
  throw new TypeError("Bad combination of arguments.");
24016
- return P$1(this, (r, a) => {
24016
+ return P(this, (r, a) => {
24017
24017
  I(r) && Ft$1(r, e, t.call(r, a, $u(r, e, this.options.xmlMode)), this.options.xmlMode);
24018
24018
  });
24019
24019
  }
24020
- return P$1(this, (r) => {
24020
+ return P(this, (r) => {
24021
24021
  if (I(r))
24022
24022
  if (typeof e == "object")
24023
24023
  for (const a of Object.keys(e)) {
@@ -24072,7 +24072,7 @@ function Ri(e, t) {
24072
24072
  if (!r || !I(r))
24073
24073
  return;
24074
24074
  const a = r;
24075
- return (u = a.data) !== null && u !== void 0 || (a.data = {}), e == null ? Oi(a) : typeof e == "object" || t !== void 0 ? (P$1(this, (i) => {
24075
+ return (u = a.data) !== null && u !== void 0 || (a.data = {}), e == null ? Oi(a) : typeof e == "object" || t !== void 0 ? (P(this, (i) => {
24076
24076
  I(i) && (typeof e == "object" ? Gu(i, e) : Gu(i, e, t));
24077
24077
  }), this) : Li(a, e);
24078
24078
  }
@@ -24110,7 +24110,7 @@ function pt(e) {
24110
24110
  function ki(e) {
24111
24111
  const t = pt(e);
24112
24112
  for (const u of t)
24113
- P$1(this, (r) => {
24113
+ P(this, (r) => {
24114
24114
  I(r) && Mr(r, u);
24115
24115
  });
24116
24116
  return this;
@@ -24130,7 +24130,7 @@ function Pi(e) {
24130
24130
  }
24131
24131
  function Br(e) {
24132
24132
  if (typeof e == "function")
24133
- return P$1(this, (r, a) => {
24133
+ return P(this, (r, a) => {
24134
24134
  if (I(r)) {
24135
24135
  const i = r.attribs.class || "";
24136
24136
  Br.call([r], e.call(r, a, i));
@@ -24158,11 +24158,11 @@ function Br(e) {
24158
24158
  }
24159
24159
  function Ur(e) {
24160
24160
  if (typeof e == "function")
24161
- return P$1(this, (a, i) => {
24161
+ return P(this, (a, i) => {
24162
24162
  I(a) && Ur.call([a], e.call(a, i, a.attribs.class || ""));
24163
24163
  });
24164
24164
  const t = pt(e), u = t.length, r = arguments.length === 0;
24165
- return P$1(this, (a) => {
24165
+ return P(this, (a) => {
24166
24166
  if (I(a))
24167
24167
  if (r)
24168
24168
  a.attribs.class = "";
@@ -24179,7 +24179,7 @@ function Ur(e) {
24179
24179
  }
24180
24180
  function Fr(e, t) {
24181
24181
  if (typeof e == "function")
24182
- return P$1(this, (n, c) => {
24182
+ return P(this, (n, c) => {
24183
24183
  I(n) && Fr.call([n], e.call(n, c, n.attribs.class || "", t), t);
24184
24184
  });
24185
24185
  if (!e || typeof e != "string")
@@ -24275,30 +24275,30 @@ function Ct$1(e) {
24275
24275
  }
24276
24276
  function Hr(e, t, u) {
24277
24277
  let r = [];
24278
- function a(A2) {
24279
- const w = t.slice(u + A2).match(Wu);
24278
+ function a(A) {
24279
+ const w = t.slice(u + A).match(Wu);
24280
24280
  if (!w)
24281
24281
  throw new Error(`Expected name, found ${t.slice(u)}`);
24282
24282
  const [v] = w;
24283
- return u += A2 + v.length, Be(v);
24283
+ return u += A + v.length, Be(v);
24284
24284
  }
24285
- function i(A2) {
24286
- for (u += A2; u < t.length && zu(t.charCodeAt(u)); )
24285
+ function i(A) {
24286
+ for (u += A; u < t.length && zu(t.charCodeAt(u)); )
24287
24287
  u++;
24288
24288
  }
24289
24289
  function n() {
24290
24290
  u += 1;
24291
- const A2 = u;
24291
+ const A = u;
24292
24292
  let w = 1;
24293
24293
  for (; w > 0 && u < t.length; u++)
24294
24294
  t.charCodeAt(u) === 40 && !c(u) ? w++ : t.charCodeAt(u) === 41 && !c(u) && w--;
24295
24295
  if (w)
24296
24296
  throw new Error("Parenthesis not matched");
24297
- return Be(t.slice(A2, u - 1));
24297
+ return Be(t.slice(A, u - 1));
24298
24298
  }
24299
- function c(A2) {
24299
+ function c(A) {
24300
24300
  let w = 0;
24301
- for (; t.charCodeAt(--A2) === 92; )
24301
+ for (; t.charCodeAt(--A) === 92; )
24302
24302
  w++;
24303
24303
  return (w & 1) === 1;
24304
24304
  }
@@ -24306,17 +24306,17 @@ function Hr(e, t, u) {
24306
24306
  if (r.length > 0 && qe(r[r.length - 1]))
24307
24307
  throw new Error("Did not expect successive traversals.");
24308
24308
  }
24309
- function m(A2) {
24309
+ function m(A) {
24310
24310
  if (r.length > 0 && r[r.length - 1].type === N.Descendant) {
24311
- r[r.length - 1].type = A2;
24311
+ r[r.length - 1].type = A;
24312
24312
  return;
24313
24313
  }
24314
- h(), r.push({ type: A2 });
24314
+ h(), r.push({ type: A });
24315
24315
  }
24316
- function f(A2, w) {
24316
+ function f(A, w) {
24317
24317
  r.push({
24318
24318
  type: N.Attribute,
24319
- name: A2,
24319
+ name: A,
24320
24320
  action: w,
24321
24321
  value: a(1),
24322
24322
  namespace: null,
@@ -24331,8 +24331,8 @@ function Hr(e, t, u) {
24331
24331
  if (i(0), t.length === u)
24332
24332
  return u;
24333
24333
  e: for (; u < t.length; ) {
24334
- const A2 = t.charCodeAt(u);
24335
- switch (A2) {
24334
+ const A = t.charCodeAt(u);
24335
+ switch (A) {
24336
24336
  // Whitespace
24337
24337
  case 32:
24338
24338
  case 9:
@@ -24454,9 +24454,9 @@ function Hr(e, t, u) {
24454
24454
  break;
24455
24455
  }
24456
24456
  let w = null, v;
24457
- if (A2 === 42)
24457
+ if (A === 42)
24458
24458
  u += 1, v = "*";
24459
- else if (A2 === 124) {
24459
+ else if (A === 124) {
24460
24460
  if (v = "", t.charCodeAt(u + 1) === 124) {
24461
24461
  m(N.ColumnCombinator), i(2);
24462
24462
  break;
@@ -24930,7 +24930,7 @@ const jt = (e, t, u, r, a) => {
24930
24930
  if (!e(T))
24931
24931
  return false;
24932
24932
  c[0] = T;
24933
- const A2 = i.getChildren(T), w = f ? [...A2, ...Vr(T, i)] : A2;
24933
+ const A = i.getChildren(T), w = f ? [...A, ...Vr(T, i)] : A;
24934
24934
  return i.existsOne(m, w);
24935
24935
  };
24936
24936
  }
@@ -25049,10 +25049,10 @@ function un(e, t, u, r, a) {
25049
25049
  const m = i.getSiblings(h);
25050
25050
  let f;
25051
25051
  for (let T = 0; T < m.length; T++) {
25052
- const A2 = m[T];
25053
- if (n(h, A2))
25052
+ const A = m[T];
25053
+ if (n(h, A))
25054
25054
  break;
25055
- i.isTag(A2) && (f = A2);
25055
+ i.isTag(A) && (f = A);
25056
25056
  }
25057
25057
  return !!f && e(f);
25058
25058
  };
@@ -25277,14 +25277,14 @@ function Et$1(e, t, u, r, a) {
25277
25277
  if (m === 0)
25278
25278
  return [];
25279
25279
  const T = (n.length === 0 && !Array.isArray(e) ? It$1(e).filter(I) : n.length === 0 ? (Array.isArray(e) ? e : [e]).filter(I) : r || n.some(qe) ? uu(e, [n], u, m) : ru(e, [n], u)).slice(0, m);
25280
- let A2 = _n(c.name, T, c.data, u);
25281
- if (A2.length === 0 || t.length === i + 1)
25282
- return A2;
25280
+ let A = _n(c.name, T, c.data, u);
25281
+ if (A.length === 0 || t.length === i + 1)
25282
+ return A;
25283
25283
  const w = t.slice(i + 1), v = w.some(qe);
25284
25284
  if (v) {
25285
25285
  if (qe(w[0])) {
25286
25286
  const { type: S } = w[0];
25287
- (S === N.Sibling || S === N.Adjacent) && (A2 = zr(A2, St$1, true)), w.unshift(En);
25287
+ (S === N.Sibling || S === N.Adjacent) && (A = zr(A, St$1, true)), w.unshift(En);
25288
25288
  }
25289
25289
  u = {
25290
25290
  ...u,
@@ -25294,15 +25294,15 @@ function Et$1(e, t, u, r, a) {
25294
25294
  * Add a custom root func, to make sure traversals don't match elements
25295
25295
  * that aren't a part of the considered tree.
25296
25296
  */
25297
- rootFunc: (S) => A2.includes(S)
25297
+ rootFunc: (S) => A.includes(S)
25298
25298
  };
25299
25299
  } else u.rootFunc && u.rootFunc !== ft.trueFunc && (u = { ...u, rootFunc: ft.trueFunc });
25300
- return w.some(bt$1) ? Et$1(A2, w, u, false, a) : v ? (
25300
+ return w.some(bt$1) ? Et$1(A, w, u, false, a) : v ? (
25301
25301
  // Query existing elements to resolve traversal.
25302
- uu(A2, [w], u, a)
25302
+ uu(A, [w], u, a)
25303
25303
  ) : (
25304
25304
  // If we don't have any more traversals, simply filter elements.
25305
- ru(A2, [w], u)
25305
+ ru(A, [w], u)
25306
25306
  );
25307
25307
  }
25308
25308
  function uu(e, t, u, r) {
@@ -25375,7 +25375,7 @@ function Iu(e, ...t) {
25375
25375
  let u = null;
25376
25376
  const r = Nu((a, i) => {
25377
25377
  const n = [];
25378
- return P$1(i, (c) => {
25378
+ return P(i, (c) => {
25379
25379
  for (let h; (h = a(c)) && !u?.(h, n.length); c = h)
25380
25380
  n.push(h);
25381
25381
  }), n;
@@ -25404,7 +25404,7 @@ function Sn(e) {
25404
25404
  xmlMode: this.options.xmlMode,
25405
25405
  root: (t = this._root) === null || t === void 0 ? void 0 : t[0]
25406
25406
  }, a = typeof e == "string" ? (i) => Qr(i, e, r) : tt(e);
25407
- return P$1(this, (i) => {
25407
+ return P(this, (i) => {
25408
25408
  for (i && !Te(i) && !I(i) && (i = i.parent); i && I(i); ) {
25409
25409
  if (a(i, 0)) {
25410
25410
  u.includes(i) || u.push(i);
@@ -25426,7 +25426,7 @@ const Cn = xu((e) => fu(e)), yn = et((e) => {
25426
25426
  return t;
25427
25427
  }, Pe), Dn = Iu((e) => bu(e), Pe), kn = et((e) => Cr(e).filter((t) => I(t) && t !== e), ke), Pn = et((e) => It$1(e).filter(I), Pe);
25428
25428
  function Mn() {
25429
- const e = this.toArray().reduce((t, u) => B$1(u) ? t.concat(u.children) : t, []);
25429
+ const e = this.toArray().reduce((t, u) => B(u) ? t.concat(u.children) : t, []);
25430
25430
  return this._make(e);
25431
25431
  }
25432
25432
  function Bn(e) {
@@ -25594,8 +25594,8 @@ function to(e, t) {
25594
25594
  function ts(e) {
25595
25595
  return function(...t) {
25596
25596
  const u = this.length - 1;
25597
- return P$1(this, (r, a) => {
25598
- if (!B$1(r))
25597
+ return P(this, (r, a) => {
25598
+ if (!B(r))
25599
25599
  return;
25600
25600
  const i = typeof t[0] == "function" ? t[0].call(r, a, this._render(r.children)) : t, n = this._makeDomArray(i, a < u);
25601
25601
  e(n, r.children, r);
@@ -25610,10 +25610,10 @@ function _e(e, t, u, r, a) {
25610
25610
  ...r
25611
25611
  ], h = t === 0 ? null : e[t - 1], m = t + u >= e.length ? null : e[t + u];
25612
25612
  for (let f = 0; f < r.length; ++f) {
25613
- const T = r[f], A2 = T.parent;
25614
- if (A2) {
25615
- const v = A2.children.indexOf(T);
25616
- v !== -1 && (A2.children.splice(v, 1), a === A2 && t > v && c[0]--);
25613
+ const T = r[f], A = T.parent;
25614
+ if (A) {
25615
+ const v = A.children.indexOf(T);
25616
+ v !== -1 && (A.children.splice(v, 1), a === A && t > v && c[0]--);
25617
25617
  }
25618
25618
  T.parent = a, T.prev && (T.prev.next = (i = T.next) !== null && i !== void 0 ? i : null), T.next && (T.next.prev = (n = T.prev) !== null && n !== void 0 ? n : null), T.prev = f === 0 ? h : r[f - 1], T.next = f === r.length - 1 ? m : r[f + 1];
25619
25619
  }
@@ -25635,7 +25635,7 @@ function us(e) {
25635
25635
  const u = this.length - 1, r = this.parents().last();
25636
25636
  for (let a = 0; a < this.length; a++) {
25637
25637
  const i = this[a], n = typeof t == "function" ? t.call(i, a, i) : typeof t == "string" && !Xt(t) ? r.find(t).clone() : t, [c] = this._makeDomArray(n, a < u);
25638
- if (!c || !B$1(c))
25638
+ if (!c || !B(c))
25639
25639
  continue;
25640
25640
  let h = c, m = 0;
25641
25641
  for (; m < h.children.length; ) {
@@ -25654,7 +25654,7 @@ const io = us((e, t, u) => {
25654
25654
  const a = r.children, i = a.indexOf(e);
25655
25655
  xe([e], t), _e(a, i, 0, u, r);
25656
25656
  }), no = us((e, t, u) => {
25657
- B$1(e) && (xe(e.children, t), xe(u, e));
25657
+ B(e) && (xe(e.children, t), xe(u, e));
25658
25658
  });
25659
25659
  function oo(e) {
25660
25660
  return this.parent(e).not("body").each((t, u) => {
@@ -25679,8 +25679,8 @@ function co(e) {
25679
25679
  }
25680
25680
  function ho(...e) {
25681
25681
  const t = this.length - 1;
25682
- return P$1(this, (u, r) => {
25683
- if (!B$1(u) || !u.parent)
25682
+ return P(this, (u, r) => {
25683
+ if (!B(u) || !u.parent)
25684
25684
  return;
25685
25685
  const a = u.parent.children, i = a.indexOf(u);
25686
25686
  if (i === -1)
@@ -25703,8 +25703,8 @@ function lo(e) {
25703
25703
  }
25704
25704
  function mo(...e) {
25705
25705
  const t = this.length - 1;
25706
- return P$1(this, (u, r) => {
25707
- if (!B$1(u) || !u.parent)
25706
+ return P(this, (u, r) => {
25707
+ if (!B(u) || !u.parent)
25708
25708
  return;
25709
25709
  const a = u.parent.children, i = a.indexOf(u);
25710
25710
  if (i === -1)
@@ -25717,7 +25717,7 @@ function po(e) {
25717
25717
  const t = this._make(e);
25718
25718
  this.remove();
25719
25719
  const u = [];
25720
- return P$1(t, (r) => {
25720
+ return P(t, (r) => {
25721
25721
  const a = this.clone().toArray(), { parent: i } = r;
25722
25722
  if (!i)
25723
25723
  return;
@@ -25727,12 +25727,12 @@ function po(e) {
25727
25727
  }
25728
25728
  function fo(e) {
25729
25729
  const t = e ? this.filter(e) : this;
25730
- return P$1(t, (u) => {
25730
+ return P(t, (u) => {
25731
25731
  Ie(u), u.prev = u.next = u.parent = null;
25732
25732
  }), this;
25733
25733
  }
25734
25734
  function bo(e) {
25735
- return P$1(this, (t, u) => {
25735
+ return P(this, (t, u) => {
25736
25736
  const { parent: r } = t;
25737
25737
  if (!r)
25738
25738
  return;
@@ -25743,8 +25743,8 @@ function bo(e) {
25743
25743
  });
25744
25744
  }
25745
25745
  function Eo() {
25746
- return P$1(this, (e) => {
25747
- if (B$1(e)) {
25746
+ return P(this, (e) => {
25747
+ if (B(e)) {
25748
25748
  for (const t of e.children)
25749
25749
  t.next = t.prev = t.parent = null;
25750
25750
  e.children.length = 0;
@@ -25754,10 +25754,10 @@ function Eo() {
25754
25754
  function To(e) {
25755
25755
  if (e === void 0) {
25756
25756
  const t = this[0];
25757
- return !t || !B$1(t) ? null : this._render(t.children);
25757
+ return !t || !B(t) ? null : this._render(t.children);
25758
25758
  }
25759
- return P$1(this, (t) => {
25760
- if (!B$1(t))
25759
+ return P(this, (t) => {
25760
+ if (!B(t))
25761
25761
  return;
25762
25762
  for (const r of t.children)
25763
25763
  r.next = r.prev = r.parent = null;
@@ -25769,8 +25769,8 @@ function _o() {
25769
25769
  return this._render(this);
25770
25770
  }
25771
25771
  function go(e) {
25772
- return e === void 0 ? Qe(this) : typeof e == "function" ? P$1(this, (t, u) => this._make(t).text(e.call(t, u, Qe([t])))) : P$1(this, (t) => {
25773
- if (!B$1(t))
25772
+ return e === void 0 ? Qe(this) : typeof e == "function" ? P(this, (t, u) => this._make(t).text(e.call(t, u, Qe([t])))) : P(this, (t) => {
25773
+ if (!B(t))
25774
25774
  return;
25775
25775
  for (const r of t.children)
25776
25776
  r.next = r.prev = r.parent = null;
@@ -25810,7 +25810,7 @@ const vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25810
25810
  function wo(e, t) {
25811
25811
  if (e != null && t != null || // When `prop` is a "plain" object
25812
25812
  typeof e == "object" && !Array.isArray(e))
25813
- return P$1(this, (u, r) => {
25813
+ return P(this, (u, r) => {
25814
25814
  I(u) && rs(u, e, t, r);
25815
25815
  });
25816
25816
  if (this.length !== 0)
@@ -25945,21 +25945,21 @@ function ko(e, t) {
25945
25945
  throw new Error("cheerio.load() expects a string");
25946
25946
  const n = Kt$1(a), c = e(r, n, i, null);
25947
25947
  class h extends ut {
25948
- _make(T, A2) {
25949
- const w = m(T, A2);
25948
+ _make(T, A) {
25949
+ const w = m(T, A);
25950
25950
  return w.prevObject = this, w;
25951
25951
  }
25952
- _parse(T, A2, w, v) {
25953
- return e(T, A2, w, v);
25952
+ _parse(T, A, w, v) {
25953
+ return e(T, A, w, v);
25954
25954
  }
25955
25955
  _render(T) {
25956
25956
  return t(T, this.options);
25957
25957
  }
25958
25958
  }
25959
- function m(f, T, A2 = c, w) {
25959
+ function m(f, T, A = c, w) {
25960
25960
  if (f && de(f))
25961
25961
  return f;
25962
- const v = Kt$1(w, n), S = typeof A2 == "string" ? [e(A2, v, false, null)] : "length" in A2 ? A2 : [A2], U2 = de(S) ? S : new h(S, null, v);
25962
+ const v = Kt$1(w, n), S = typeof A == "string" ? [e(A, v, false, null)] : "length" in A ? A : [A], U2 = de(S) ? S : new h(S, null, v);
25963
25963
  if (U2._root = U2, !f)
25964
25964
  return new h(void 0, U2, v);
25965
25965
  const M2 = typeof f == "string" && Xt(f) ? (
@@ -26056,7 +26056,7 @@ var o;
26056
26056
  (function(e) {
26057
26057
  e[e.EOF = -1] = "EOF", e[e.NULL = 0] = "NULL", e[e.TABULATION = 9] = "TABULATION", e[e.CARRIAGE_RETURN = 13] = "CARRIAGE_RETURN", e[e.LINE_FEED = 10] = "LINE_FEED", e[e.FORM_FEED = 12] = "FORM_FEED", e[e.SPACE = 32] = "SPACE", e[e.EXCLAMATION_MARK = 33] = "EXCLAMATION_MARK", e[e.QUOTATION_MARK = 34] = "QUOTATION_MARK", e[e.AMPERSAND = 38] = "AMPERSAND", e[e.APOSTROPHE = 39] = "APOSTROPHE", e[e.HYPHEN_MINUS = 45] = "HYPHEN_MINUS", e[e.SOLIDUS = 47] = "SOLIDUS", e[e.DIGIT_0 = 48] = "DIGIT_0", e[e.DIGIT_9 = 57] = "DIGIT_9", e[e.SEMICOLON = 59] = "SEMICOLON", e[e.LESS_THAN_SIGN = 60] = "LESS_THAN_SIGN", e[e.EQUALS_SIGN = 61] = "EQUALS_SIGN", e[e.GREATER_THAN_SIGN = 62] = "GREATER_THAN_SIGN", e[e.QUESTION_MARK = 63] = "QUESTION_MARK", e[e.LATIN_CAPITAL_A = 65] = "LATIN_CAPITAL_A", e[e.LATIN_CAPITAL_Z = 90] = "LATIN_CAPITAL_Z", e[e.RIGHT_SQUARE_BRACKET = 93] = "RIGHT_SQUARE_BRACKET", e[e.GRAVE_ACCENT = 96] = "GRAVE_ACCENT", e[e.LATIN_SMALL_A = 97] = "LATIN_SMALL_A", e[e.LATIN_SMALL_Z = 122] = "LATIN_SMALL_Z";
26058
26058
  })(o || (o = {}));
26059
- const z = {
26059
+ const z$1 = {
26060
26060
  DASH_DASH: "--",
26061
26061
  CDATA_START: "[CDATA[",
26062
26062
  DOCTYPE: "doctype",
@@ -26705,7 +26705,7 @@ var d;
26705
26705
  (function(e) {
26706
26706
  e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
26707
26707
  })(d || (d = {}));
26708
- const K$1 = {
26708
+ const K = {
26709
26709
  DATA: d.DATA,
26710
26710
  RCDATA: d.RCDATA,
26711
26711
  RAWTEXT: d.RAWTEXT,
@@ -27617,9 +27617,9 @@ class rc {
27617
27617
  // Script data double escape start state
27618
27618
  //------------------------------------------------------------------
27619
27619
  _stateScriptDataDoubleEscapeStart(t) {
27620
- if (this.preprocessor.startsWith(z.SCRIPT, false) && rr(this.preprocessor.peek(z.SCRIPT.length))) {
27620
+ if (this.preprocessor.startsWith(z$1.SCRIPT, false) && rr(this.preprocessor.peek(z$1.SCRIPT.length))) {
27621
27621
  this._emitCodePoint(t);
27622
- for (let u = 0; u < z.SCRIPT.length; u++)
27622
+ for (let u = 0; u < z$1.SCRIPT.length; u++)
27623
27623
  this._emitCodePoint(this._consume());
27624
27624
  this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED;
27625
27625
  } else this._ensureHibernation() || (this.state = d.SCRIPT_DATA_ESCAPED, this._stateScriptDataEscaped(t));
@@ -27708,9 +27708,9 @@ class rc {
27708
27708
  // Script data double escape end state
27709
27709
  //------------------------------------------------------------------
27710
27710
  _stateScriptDataDoubleEscapeEnd(t) {
27711
- if (this.preprocessor.startsWith(z.SCRIPT, false) && rr(this.preprocessor.peek(z.SCRIPT.length))) {
27711
+ if (this.preprocessor.startsWith(z$1.SCRIPT, false) && rr(this.preprocessor.peek(z$1.SCRIPT.length))) {
27712
27712
  this._emitCodePoint(t);
27713
- for (let u = 0; u < z.SCRIPT.length; u++)
27713
+ for (let u = 0; u < z$1.SCRIPT.length; u++)
27714
27714
  this._emitCodePoint(this._consume());
27715
27715
  this.state = d.SCRIPT_DATA_ESCAPED;
27716
27716
  } else this._ensureHibernation() || (this.state = d.SCRIPT_DATA_DOUBLE_ESCAPED, this._stateScriptDataDoubleEscaped(t));
@@ -27979,7 +27979,7 @@ class rc {
27979
27979
  // Markup declaration open state
27980
27980
  //------------------------------------------------------------------
27981
27981
  _stateMarkupDeclarationOpen(t) {
27982
- this._consumeSequenceIfMatch(z.DASH_DASH, true) ? (this._createCommentToken(z.DASH_DASH.length + 1), this.state = d.COMMENT_START) : this._consumeSequenceIfMatch(z.DOCTYPE, false) ? (this.currentLocation = this.getCurrentLocation(z.DOCTYPE.length + 1), this.state = d.DOCTYPE) : this._consumeSequenceIfMatch(z.CDATA_START, true) ? this.inForeignNode ? this.state = d.CDATA_SECTION : (this._err(b.cdataInHtmlContent), this._createCommentToken(z.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = d.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(b.incorrectlyOpenedComment), this._createCommentToken(2), this.state = d.BOGUS_COMMENT, this._stateBogusComment(t));
27982
+ this._consumeSequenceIfMatch(z$1.DASH_DASH, true) ? (this._createCommentToken(z$1.DASH_DASH.length + 1), this.state = d.COMMENT_START) : this._consumeSequenceIfMatch(z$1.DOCTYPE, false) ? (this.currentLocation = this.getCurrentLocation(z$1.DOCTYPE.length + 1), this.state = d.DOCTYPE) : this._consumeSequenceIfMatch(z$1.CDATA_START, true) ? this.inForeignNode ? this.state = d.CDATA_SECTION : (this._err(b.cdataInHtmlContent), this._createCommentToken(z$1.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = d.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(b.incorrectlyOpenedComment), this._createCommentToken(2), this.state = d.BOGUS_COMMENT, this._stateBogusComment(t));
27983
27983
  }
27984
27984
  // Comment start state
27985
27985
  //------------------------------------------------------------------
@@ -28244,7 +28244,7 @@ class rc {
28244
28244
  break;
28245
28245
  }
28246
28246
  default:
28247
- this._consumeSequenceIfMatch(z.PUBLIC, false) ? this.state = d.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(z.SYSTEM, false) ? this.state = d.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(b.invalidCharacterSequenceAfterDoctypeName), u.forceQuirks = true, this.state = d.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
28247
+ this._consumeSequenceIfMatch(z$1.PUBLIC, false) ? this.state = d.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(z$1.SYSTEM, false) ? this.state = d.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(b.invalidCharacterSequenceAfterDoctypeName), u.forceQuirks = true, this.state = d.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
28248
28248
  }
28249
28249
  }
28250
28250
  // After DOCTYPE public keyword state
@@ -29480,7 +29480,7 @@ class Es {
29480
29480
  this._insertElement(t, E.HTML), this.tokenizer.state = u, this.originalInsertionMode = this.insertionMode, this.insertionMode = l.TEXT;
29481
29481
  }
29482
29482
  switchToPlaintextParsing() {
29483
- this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K$1.PLAINTEXT;
29483
+ this.insertionMode = l.TEXT, this.originalInsertionMode = l.IN_BODY, this.tokenizer.state = K.PLAINTEXT;
29484
29484
  }
29485
29485
  //Fragment parsing
29486
29486
  /** @protected */
@@ -29503,7 +29503,7 @@ class Es {
29503
29503
  switch (this.fragmentContextID) {
29504
29504
  case s.TITLE:
29505
29505
  case s.TEXTAREA: {
29506
- this.tokenizer.state = K$1.RCDATA;
29506
+ this.tokenizer.state = K.RCDATA;
29507
29507
  break;
29508
29508
  }
29509
29509
  case s.STYLE:
@@ -29512,15 +29512,15 @@ class Es {
29512
29512
  case s.NOEMBED:
29513
29513
  case s.NOFRAMES:
29514
29514
  case s.NOSCRIPT: {
29515
- this.tokenizer.state = K$1.RAWTEXT;
29515
+ this.tokenizer.state = K.RAWTEXT;
29516
29516
  break;
29517
29517
  }
29518
29518
  case s.SCRIPT: {
29519
- this.tokenizer.state = K$1.SCRIPT_DATA;
29519
+ this.tokenizer.state = K.SCRIPT_DATA;
29520
29520
  break;
29521
29521
  }
29522
29522
  case s.PLAINTEXT: {
29523
- this.tokenizer.state = K$1.PLAINTEXT;
29523
+ this.tokenizer.state = K.PLAINTEXT;
29524
29524
  break;
29525
29525
  }
29526
29526
  }
@@ -29872,7 +29872,7 @@ class Es {
29872
29872
  break;
29873
29873
  }
29874
29874
  case l.AFTER_BODY: {
29875
- gt$1(this, t);
29875
+ gt(this, t);
29876
29876
  break;
29877
29877
  }
29878
29878
  case l.AFTER_AFTER_BODY: {
@@ -29927,7 +29927,7 @@ class Es {
29927
29927
  break;
29928
29928
  }
29929
29929
  case l.AFTER_BODY: {
29930
- gt$1(this, t);
29930
+ gt(this, t);
29931
29931
  break;
29932
29932
  }
29933
29933
  case l.AFTER_AFTER_BODY: {
@@ -30445,20 +30445,20 @@ function J(e, t) {
30445
30445
  break;
30446
30446
  }
30447
30447
  case s.TITLE: {
30448
- e._switchToTextParsing(t, K$1.RCDATA);
30448
+ e._switchToTextParsing(t, K.RCDATA);
30449
30449
  break;
30450
30450
  }
30451
30451
  case s.NOSCRIPT: {
30452
- e.options.scriptingEnabled ? e._switchToTextParsing(t, K$1.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
30452
+ e.options.scriptingEnabled ? e._switchToTextParsing(t, K.RAWTEXT) : (e._insertElement(t, E.HTML), e.insertionMode = l.IN_HEAD_NO_SCRIPT);
30453
30453
  break;
30454
30454
  }
30455
30455
  case s.NOFRAMES:
30456
30456
  case s.STYLE: {
30457
- e._switchToTextParsing(t, K$1.RAWTEXT);
30457
+ e._switchToTextParsing(t, K.RAWTEXT);
30458
30458
  break;
30459
30459
  }
30460
30460
  case s.SCRIPT: {
30461
- e._switchToTextParsing(t, K$1.SCRIPT_DATA);
30461
+ e._switchToTextParsing(t, K.SCRIPT_DATA);
30462
30462
  break;
30463
30463
  }
30464
30464
  case s.TEMPLATE: {
@@ -30668,7 +30668,7 @@ function a0(e, t) {
30668
30668
  e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML);
30669
30669
  }
30670
30670
  function i0(e, t) {
30671
- e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K$1.PLAINTEXT;
30671
+ e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, E.HTML), e.tokenizer.state = K.PLAINTEXT;
30672
30672
  }
30673
30673
  function n0(e, t) {
30674
30674
  e.openElements.hasInScope(s.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false;
@@ -30709,16 +30709,16 @@ function b0(e, t) {
30709
30709
  t.tagName = p.IMG, t.tagID = s.IMG, gs(e, t);
30710
30710
  }
30711
30711
  function E0(e, t) {
30712
- e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K$1.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
30712
+ e._insertElement(t, E.HTML), e.skipNextNewLine = true, e.tokenizer.state = K.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = false, e.insertionMode = l.TEXT;
30713
30713
  }
30714
30714
  function T0(e, t) {
30715
- e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K$1.RAWTEXT);
30715
+ e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
30716
30716
  }
30717
30717
  function _0(e, t) {
30718
- e.framesetOk = false, e._switchToTextParsing(t, K$1.RAWTEXT);
30718
+ e.framesetOk = false, e._switchToTextParsing(t, K.RAWTEXT);
30719
30719
  }
30720
30720
  function hr(e, t) {
30721
- e._switchToTextParsing(t, K$1.RAWTEXT);
30721
+ e._switchToTextParsing(t, K.RAWTEXT);
30722
30722
  }
30723
30723
  function g0(e, t) {
30724
30724
  e._reconstructActiveFormattingElements(), e._insertElement(t, E.HTML), e.framesetOk = false, e.insertionMode = e.insertionMode === l.IN_TABLE || e.insertionMode === l.IN_CAPTION || e.insertionMode === l.IN_TABLE_BODY || e.insertionMode === l.IN_ROW || e.insertionMode === l.IN_CELL ? l.IN_SELECT_IN_TABLE : l.IN_SELECT;
@@ -31547,7 +31547,7 @@ function Os(e, t) {
31547
31547
  e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(s.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : Ou(e, t);
31548
31548
  }
31549
31549
  function td(e, t) {
31550
- t.tagID === s.HTML ? G$1(e, t) : gt$1(e, t);
31550
+ t.tagID === s.HTML ? G$1(e, t) : gt(e, t);
31551
31551
  }
31552
31552
  function Ls(e, t) {
31553
31553
  var u;
@@ -31558,9 +31558,9 @@ function Ls(e, t) {
31558
31558
  r && !(!((u = e.treeAdapter.getNodeSourceCodeLocation(r)) === null || u === void 0) && u.endTag) && e._setEndLocation(r, t);
31559
31559
  }
31560
31560
  } else
31561
- gt$1(e, t);
31561
+ gt(e, t);
31562
31562
  }
31563
- function gt$1(e, t) {
31563
+ function gt(e, t) {
31564
31564
  e.insertionMode = l.IN_BODY, Ot$1(e, t);
31565
31565
  }
31566
31566
  function ud(e, t) {
@@ -32435,13 +32435,13 @@ const Ld = (e) => {
32435
32435
  }, a = u.displayFields || r, i = (y) => {
32436
32436
  const W2 = e[y];
32437
32437
  return typeof W2 == "string" ? W2 : void 0;
32438
- }, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f), A2 = pr(n, 80), w = pr(fr(c), 160), v = [];
32438
+ }, n = fr(i("title") || "Untitled"), c = i("description") || "", h = i("image") || "", m = i("favicon"), f = u.useMetadataUrlLink && i("url") || t, T = i("siteName") || Bs(f), A = pr(n, 80), w = pr(fr(c), 160), v = [];
32439
32439
  h && a.image !== void 0 && v.push({
32440
32440
  order: a.image,
32441
32441
  section: "image",
32442
32442
  html: At(
32443
32443
  j$1(h),
32444
- j$1(A2),
32444
+ j$1(A),
32445
32445
  "card-image",
32446
32446
  void 0,
32447
32447
  'loading="lazy"'
@@ -32459,7 +32459,7 @@ const Ld = (e) => {
32459
32459
  order: a.title,
32460
32460
  section: "header",
32461
32461
  isHeader: true,
32462
- html: `<div class="card-title">${j$1(A2)}</div>`
32462
+ html: `<div class="card-title">${j$1(A)}</div>`
32463
32463
  }), a.siteName !== void 0 && U2.push({
32464
32464
  order: a.siteName,
32465
32465
  section: "header",
@@ -32563,14 +32563,14 @@ const Ld = (e) => {
32563
32563
  };
32564
32564
  /*!
32565
32565
  * name: mark-deco
32566
- * version: 0.8.0
32566
+ * version: 0.9.0
32567
32567
  * description: Flexible Markdown to HTML conversion library
32568
32568
  * author: Kouji Matsui (@kekyo@mi.kekyo.net)
32569
32569
  * license: MIT
32570
32570
  * repository.url: https://github.com/kekyo/mark-deco.git
32571
- * git.commit.hash: cc985acbf6dd451ba9668a6c148f9e041c1032c5
32571
+ * git.commit.hash: d0e45da82482af0e17292db548313487c588061b
32572
32572
  */
32573
- function B(e) {
32573
+ function W(e) {
32574
32574
  const t = /^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/, n = e.match(t);
32575
32575
  if (!n)
32576
32576
  return {
@@ -32585,11 +32585,11 @@ function B(e) {
32585
32585
  content: r
32586
32586
  };
32587
32587
  } catch (s2) {
32588
- const h = s2 instanceof Error ? s2.message : "Unknown YAML parsing error";
32589
- throw new Error(`Failed to parse frontmatter YAML: ${h}`);
32588
+ const f = s2 instanceof Error ? s2.message : "Unknown YAML parsing error";
32589
+ throw new Error(`Failed to parse frontmatter YAML: ${f}`);
32590
32590
  }
32591
32591
  }
32592
- function gt(e) {
32592
+ function wt(e) {
32593
32593
  if (!e || Object.keys(e).length === 0)
32594
32594
  return "";
32595
32595
  const t = dump(e, { lineWidth: 0 });
@@ -32597,18 +32597,18 @@ function gt(e) {
32597
32597
  `) ? t : `${t}
32598
32598
  `;
32599
32599
  }
32600
- function wt(e, t) {
32600
+ function G(e, t) {
32601
32601
  const n = t ?? "";
32602
32602
  return `${`---
32603
- ${gt(e)}---
32603
+ ${wt(e)}---
32604
32604
  `}${n}`;
32605
32605
  }
32606
- const P = () => {
32606
+ const _ = () => {
32607
32607
  }, vt = {
32608
- debug: P,
32609
- info: P,
32610
- warn: P,
32611
- error: P
32608
+ debug: _,
32609
+ info: _,
32610
+ warn: _,
32611
+ error: _
32612
32612
  }, Et = {
32613
32613
  debug: console.debug,
32614
32614
  info: console.info,
@@ -32617,22 +32617,22 @@ const P = () => {
32617
32617
  }, kt = () => vt, Kt = () => Et, H = (e) => {
32618
32618
  const t = {}, n = e.slice(1, -1).trim(), o2 = n.match(/\.([a-zA-Z0-9_-]+)/g);
32619
32619
  if (o2) {
32620
- const h = o2.map((m) => m.slice(1));
32621
- t.class = h.join(" ");
32620
+ const f = o2.map((m) => m.slice(1));
32621
+ t.class = f.join(" ");
32622
32622
  }
32623
32623
  const r = n.match(/#([a-zA-Z0-9_-]+)/);
32624
32624
  r && r[1] && (t.id = r[1]);
32625
32625
  const s2 = n.match(/([a-zA-Z0-9_-]+)=["']?([^"'\s]*)["']?/g);
32626
32626
  if (s2)
32627
- for (const h of s2) {
32628
- const [m, d2] = h.split("=");
32627
+ for (const f of s2) {
32628
+ const [m, d2] = f.split("=");
32629
32629
  m && d2 && m !== "class" && m !== "id" && (t[m] = d2.replace(/["']/g, ""));
32630
32630
  }
32631
32631
  return t;
32632
32632
  }, bt = (e) => {
32633
32633
  const t = e.lang ? ` class="language-${e.lang}"` : "", n = e.value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
32634
32634
  return `<pre><code${t}>${n}</code></pre>`;
32635
- }, F = (e, t) => {
32635
+ }, L = (e, t) => {
32636
32636
  e.data || (e.data = {}), e.data.hProperties || (e.data.hProperties = {}), Object.entries(t).forEach(([n, o2]) => {
32637
32637
  if (n === "class") {
32638
32638
  const r = e.data.hProperties.class;
@@ -32647,8 +32647,8 @@ const P = () => {
32647
32647
  if (r?.type === "text" && r.value) {
32648
32648
  const s2 = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32649
32649
  if (s2) {
32650
- const h = s2[1].trim(), m = s2[2], d2 = H(m);
32651
- r.value = h, F(t, d2);
32650
+ const f = s2[1].trim(), m = s2[2], d2 = H(m);
32651
+ r.value = f, L(t, d2);
32652
32652
  }
32653
32653
  }
32654
32654
  }
@@ -32657,8 +32657,8 @@ const P = () => {
32657
32657
  if (r?.type === "text" && r.value) {
32658
32658
  const s2 = r.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32659
32659
  if (s2) {
32660
- const h = s2[1].trim(), m = s2[2], d2 = H(m);
32661
- r.value = h, F(t, d2);
32660
+ const f = s2[1].trim(), m = s2[2], d2 = H(m);
32661
+ r.value = f, L(t, d2);
32662
32662
  }
32663
32663
  }
32664
32664
  }
@@ -32667,8 +32667,8 @@ const P = () => {
32667
32667
  if (r?.type === "text" && r.value) {
32668
32668
  const s2 = r.value.match(/^\s*(\{[^}]+\})/);
32669
32669
  if (s2) {
32670
- const h = s2[1], m = H(h);
32671
- F(t, m), r.value = r.value.replace(s2[0], "");
32670
+ const f = s2[1], m = H(f);
32671
+ L(t, m), r.value = r.value.replace(s2[0], "");
32672
32672
  }
32673
32673
  }
32674
32674
  }
@@ -32677,8 +32677,8 @@ const P = () => {
32677
32677
  if (r?.type === "text" && r.value) {
32678
32678
  const s2 = r.value.match(/^\s*(\{[^}]+\})/);
32679
32679
  if (s2) {
32680
- const h = s2[1], m = H(h);
32681
- F(t, m), r.value = r.value.replace(s2[0], "");
32680
+ const f = s2[1], m = H(f);
32681
+ L(t, m), r.value = r.value.replace(s2[0], "");
32682
32682
  }
32683
32683
  }
32684
32684
  }
@@ -32687,10 +32687,10 @@ const P = () => {
32687
32687
  if (r?.type === "paragraph" && r.children?.length > 0) {
32688
32688
  const s2 = r.children[r.children.length - 1];
32689
32689
  if (s2?.type === "text" && s2.value) {
32690
- const h = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32691
- if (h) {
32692
- const m = h[1].trim(), d2 = h[2], c = H(d2);
32693
- s2.value = m, F(t, c);
32690
+ const f = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32691
+ if (f) {
32692
+ const m = f[1].trim(), d2 = f[2], c = H(d2);
32693
+ s2.value = m, L(t, c);
32694
32694
  }
32695
32695
  }
32696
32696
  }
@@ -32700,10 +32700,10 @@ const P = () => {
32700
32700
  if (r?.type === "paragraph" && r.children?.length === 1) {
32701
32701
  const s2 = r.children[0];
32702
32702
  if (s2?.type === "text" && s2.value) {
32703
- const h = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32704
- if (h) {
32705
- const m = h[1], d2 = H(m);
32706
- F(t, d2), o2.children.splice(n + 1, 1);
32703
+ const f = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32704
+ if (f) {
32705
+ const m = f[1], d2 = H(m);
32706
+ L(t, d2), o2.children.splice(n + 1, 1);
32707
32707
  }
32708
32708
  }
32709
32709
  }
@@ -32713,10 +32713,10 @@ const P = () => {
32713
32713
  if (r?.type === "paragraph" && r.children?.length > 0) {
32714
32714
  const s2 = r.children[r.children.length - 1];
32715
32715
  if (s2?.type === "text" && s2.value) {
32716
- const h = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32717
- if (h) {
32718
- const m = h[1].trim(), d2 = h[2], c = H(d2);
32719
- s2.value = m, F(t, c);
32716
+ const f = s2.value.match(/^(.*?)\s*(\{[^}]+\})\s*$/);
32717
+ if (f) {
32718
+ const m = f[1].trim(), d2 = f[2], c = H(d2);
32719
+ s2.value = m, L(t, c);
32720
32720
  }
32721
32721
  }
32722
32722
  }
@@ -32726,10 +32726,10 @@ const P = () => {
32726
32726
  if (r?.type === "paragraph" && r.children?.length === 1) {
32727
32727
  const s2 = r.children[0];
32728
32728
  if (s2?.type === "text" && s2.value) {
32729
- const h = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32730
- if (h) {
32731
- const m = h[1], d2 = H(m);
32732
- F(t, d2), o2.children.splice(n + 1, 1);
32729
+ const f = s2.value.match(/^\s*(\{[^}]+\})\s*$/);
32730
+ if (f) {
32731
+ const m = f[1], d2 = H(m);
32732
+ L(t, d2), o2.children.splice(n + 1, 1);
32733
32733
  }
32734
32734
  }
32735
32735
  }
@@ -32739,18 +32739,18 @@ const P = () => {
32739
32739
  if (r?.type === "text" && r.value) {
32740
32740
  const s2 = r.value.match(/^\s*(\{[^}]+\})/);
32741
32741
  if (s2) {
32742
- const h = s2[1], m = H(h);
32743
- F(t, m), r.value = r.value.replace(s2[0], "");
32742
+ const f = s2[1], m = H(f);
32743
+ L(t, m), r.value = r.value.replace(s2[0], "");
32744
32744
  }
32745
32745
  }
32746
32746
  }
32747
32747
  if (t.type === "code" && t.meta) {
32748
32748
  const r = t.meta.match(/\{([^}]+)\}/);
32749
32749
  if (r) {
32750
- const s2 = `{${r[1]}}`, h = H(s2), m = {
32750
+ const s2 = `{${r[1]}}`, f = H(s2), m = {
32751
32751
  type: "html",
32752
- value: `<div class="${h.class || ""}" ${Object.entries(
32753
- h
32752
+ value: `<div class="${f.class || ""}" ${Object.entries(
32753
+ f
32754
32754
  ).filter(([d2]) => d2 !== "class").map(([d2, c]) => `${d2}="${c}"`).join(" ")}>${bt(t)}</div>`
32755
32755
  };
32756
32756
  o2 && typeof n == "number" && (o2.children[n] = m), t.meta = t.meta.replace(r[0], "").trim() || null;
@@ -32766,7 +32766,7 @@ const P = () => {
32766
32766
  t.properties.style = r;
32767
32767
  }
32768
32768
  });
32769
- }, { html: xt } = Y$1, Ht = {
32769
+ }, { html: xt } = tt$1, Ct = {
32770
32770
  indent_size: 2,
32771
32771
  indent_char: " ",
32772
32772
  max_preserve_newlines: 2,
@@ -32778,19 +32778,19 @@ const P = () => {
32778
32778
  unformatted: ["code", "pre", "textarea"],
32779
32779
  content_unformatted: ["pre", "code", "textarea"],
32780
32780
  extra_liners: []
32781
- }, M = (e) => {
32781
+ }, q = (e) => {
32782
32782
  if (e instanceof Date)
32783
32783
  return e.toISOString();
32784
32784
  if (Array.isArray(e))
32785
- return e.map(M);
32785
+ return e.map(q);
32786
32786
  if (e && typeof e == "object") {
32787
32787
  const t = Object.entries(e).filter(([, o2]) => o2 !== void 0).sort(([o2], [r]) => o2 < r ? -1 : o2 > r ? 1 : 0), n = {};
32788
32788
  for (const [o2, r] of t)
32789
- n[o2] = M(r);
32789
+ n[o2] = q(r);
32790
32790
  return n;
32791
32791
  }
32792
32792
  return e;
32793
- }, A = (e) => JSON.stringify(M(e ?? {})), U = (e) => e.type === "text" || e.type === "inlineCode" ? e.value || "" : e.children && Array.isArray(e.children) ? e.children.map(U).join("") : "", Ft = (e, t) => `${e}-${t.join("-")}`, Ct = (e) => {
32793
+ }, j = (e) => JSON.stringify(q(e ?? {})), D = (e) => e.type === "text" || e.type === "inlineCode" ? e.value || "" : e.children && Array.isArray(e.children) ? e.children.map(D).join("") : "", Ht = (e, t) => `${e}-${t.join("-")}`, Ft = (e) => {
32794
32794
  const t = [], n = [];
32795
32795
  for (const o2 of e) {
32796
32796
  const r = o2.level;
@@ -32800,15 +32800,15 @@ const P = () => {
32800
32800
  n.push(0);
32801
32801
  const s2 = r - 1;
32802
32802
  n[s2] = (n[s2] || 0) + 1;
32803
- const h = n.slice(0, r);
32803
+ const f = n.slice(0, r);
32804
32804
  t.push({
32805
32805
  level: o2.level,
32806
32806
  text: o2.text,
32807
- numbers: h
32807
+ numbers: f
32808
32808
  });
32809
32809
  }
32810
32810
  return t;
32811
- }, K = (e, t, n) => {
32811
+ }, Q = (e, t, n) => {
32812
32812
  const o2 = jd(t);
32813
32813
  return o2 !== void 0 ? `${e}-${o2}` : n();
32814
32814
  }, It = (e) => {
@@ -32845,13 +32845,13 @@ const P = () => {
32845
32845
  );
32846
32846
  r.set(a.name, a);
32847
32847
  }
32848
- const s2 = async (a, f, u) => {
32848
+ const s2 = async (a, h, u) => {
32849
32849
  const p2 = r.get(a);
32850
- return p2 ? await p2.processBlock(f, u) : `<pre><code class="language-${a}">${R(f)}</code></pre>`;
32851
- }, h = (a, f, u) => {
32850
+ return p2 ? await p2.processBlock(h, u) : `<pre><code class="language-${a}">${R(h)}</code></pre>`;
32851
+ }, f = (a, h, u) => {
32852
32852
  const p2 = {
32853
32853
  logger: n,
32854
- signal: f,
32854
+ signal: h,
32855
32855
  frontmatter: a,
32856
32856
  getUniqueId: u,
32857
32857
  fetcher: o2
@@ -32861,10 +32861,10 @@ const P = () => {
32861
32861
  visit(
32862
32862
  y,
32863
32863
  "code",
32864
- (w, E2, k2) => {
32864
+ (w, E2, C2) => {
32865
32865
  if (!w.lang || !r.has(w.lang))
32866
32866
  return;
32867
- const b2 = (async () => {
32867
+ const $2 = (async () => {
32868
32868
  const v = {
32869
32869
  type: "html",
32870
32870
  value: await s2(
@@ -32873,118 +32873,119 @@ const P = () => {
32873
32873
  p2
32874
32874
  )
32875
32875
  };
32876
- k2 && typeof E2 == "number" && (k2.children[E2] = v);
32876
+ C2 && typeof E2 == "number" && (C2.children[E2] = v);
32877
32877
  })();
32878
- g2.push(b2);
32878
+ g2.push($2);
32879
32879
  }
32880
32880
  ), await Promise.all(g2);
32881
32881
  };
32882
- }, m = (a, f, u = false, p2 = false, y = "") => () => (g2) => {
32882
+ }, m = (a, h, u = false, p2 = false, y = "") => () => (g2) => {
32883
32883
  const w = [], E2 = [];
32884
32884
  visit(g2, "heading", (v) => {
32885
32885
  v.depth >= 1 && v.depth <= 6 && E2.push(v);
32886
32886
  });
32887
- let k2 = [];
32887
+ let C2 = [];
32888
32888
  if (u) {
32889
- const v = E2.map((L2) => ({
32890
- level: L2.depth,
32891
- text: U(L2)
32889
+ const v = E2.map((I2) => ({
32890
+ level: I2.depth,
32891
+ text: D(I2)
32892
32892
  }));
32893
- k2 = Ct(v);
32893
+ C2 = Ft(v);
32894
32894
  }
32895
- const b2 = [];
32896
- E2.forEach((v, L2) => {
32897
- const C2 = U(v), N2 = v.data?.hProperties?.id;
32898
- let S;
32895
+ const $2 = [];
32896
+ E2.forEach((v, I2) => {
32897
+ const O2 = D(v), N2 = v.data?.hProperties?.id;
32898
+ let k2;
32899
32899
  if (N2)
32900
- S = N2;
32900
+ k2 = N2;
32901
32901
  else if (u && p2) {
32902
- const I2 = K(
32902
+ const b2 = Q(
32903
32903
  y,
32904
- C2,
32905
- () => f(C2)
32904
+ O2,
32905
+ () => h(O2)
32906
32906
  ).replace(`${y}-`, "");
32907
- for (; b2.length > 0; ) {
32908
- const x2 = b2[b2.length - 1];
32909
- if (x2 && x2.level >= v.depth)
32910
- b2.pop();
32907
+ for (; $2.length > 0; ) {
32908
+ const S = $2[$2.length - 1];
32909
+ if (S && S.level >= v.depth)
32910
+ $2.pop();
32911
32911
  else
32912
32912
  break;
32913
32913
  }
32914
- const T = b2.map((x2) => x2.contentId);
32915
- S = T.length > 0 ? `${y}-${T.join("-")}-${I2}` : `${y}-${I2}`, b2.push({
32914
+ const P2 = $2.map((S) => S.contentId);
32915
+ k2 = P2.length > 0 ? `${y}-${P2.join("-")}-${b2}` : `${y}-${b2}`, $2.push({
32916
32916
  level: v.depth,
32917
- contentId: I2
32917
+ contentId: b2
32918
32918
  });
32919
- } else if (u && L2 < k2.length) {
32920
- const I2 = k2[L2];
32921
- I2 ? S = Ft(
32919
+ } else if (u && I2 < C2.length) {
32920
+ const b2 = C2[I2];
32921
+ b2 ? k2 = Ht(
32922
32922
  y,
32923
- I2.numbers
32924
- ) : S = f(C2);
32923
+ b2.numbers
32924
+ ) : k2 = h(O2);
32925
32925
  } else
32926
- S = f(C2);
32927
- v.data || (v.data = {}), v.data.hProperties || (v.data.hProperties = {}), N2 || (v.data.hProperties.id = S), w.push({
32926
+ k2 = h(O2);
32927
+ v.data || (v.data = {}), v.data.hProperties || (v.data.hProperties = {}), N2 || (v.data.hProperties.id = k2), w.push({
32928
32928
  level: v.depth,
32929
- text: C2,
32930
- id: S
32929
+ text: O2,
32930
+ id: k2
32931
32931
  });
32932
32932
  });
32933
- const O2 = It(w);
32934
- a.push(...O2);
32933
+ const F2 = It(w);
32934
+ a.push(...F2);
32935
32935
  }, d2 = (a) => {
32936
32936
  throw n.error(
32937
32937
  `Failed to process markdown: ${a instanceof Error ? a.message : "Unknown error"}`
32938
32938
  ), new Error(
32939
32939
  `Failed to process markdown: ${a instanceof Error ? a.message : "Unknown error"}`
32940
32940
  );
32941
- }, c = async (a, f, u, p2, y, g2) => {
32941
+ }, c = async (a, h, u, p2, y, g2) => {
32942
32942
  const {
32943
32943
  signal: w,
32944
32944
  useContentStringHeaderId: E2 = false,
32945
- useHierarchicalHeadingId: k2 = true,
32946
- advancedOptions: b2
32945
+ useHierarchicalHeadingId: C2 = true,
32946
+ advancedOptions: $2
32947
32947
  } = u ?? {}, {
32948
- allowDangerousHtml: O2 = true,
32949
- htmlOptions: v = Ht,
32950
- gfmOptions: L2 = {},
32951
- remarkPlugins: C2 = [],
32948
+ allowDangerousHtml: F2 = true,
32949
+ htmlOptions: v = Ct,
32950
+ gfmOptions: I2 = {},
32951
+ remarkPlugins: O2 = [],
32952
32952
  rehypePlugins: N2 = []
32953
- } = b2 || {}, S = [];
32954
- let I2 = 0;
32955
- const T = () => `${f}-${++I2}`;
32956
- let _2 = unified().use(remarkParse);
32957
- if (C2)
32958
- for (const $2 of C2)
32959
- Array.isArray($2) ? _2 = _2.use($2[0], $2[1]) : _2 = _2.use($2);
32960
- let x2 = _2.use(remarkGfm, L2).use($t).use(
32953
+ } = $2 || {}, k2 = [];
32954
+ let b2 = 0;
32955
+ const P2 = () => `${h}-${++b2}`;
32956
+ let T = unified().use(remarkParse);
32957
+ if (O2)
32958
+ for (const x2 of O2)
32959
+ Array.isArray(x2) ? T = T.use(x2[0], x2[1]) : T = T.use(x2);
32960
+ let S = T.use(remarkGfm, I2).use($t).use(
32961
32961
  m(
32962
- S,
32963
- E2 ? ($2) => K(f, $2, T) : T,
32964
32962
  k2,
32963
+ E2 ? (x2) => Q(h, x2, P2) : P2,
32964
+ C2,
32965
32965
  E2,
32966
- f
32966
+ h
32967
32967
  )
32968
- ).use(h(p2, w, T)).use(remarkRehype, { allowDangerousHtml: O2 }).use(St).use(rehypeStringify, { allowDangerousHtml: O2 });
32968
+ ).use(f(p2, w, P2)).use(remarkRehype, { allowDangerousHtml: F2 }).use(St).use(rehypeStringify, { allowDangerousHtml: F2 });
32969
32969
  if (N2)
32970
- for (const $2 of N2)
32971
- Array.isArray($2) ? x2 = x2.use($2[0], $2[1]) : x2 = x2.use($2);
32972
- const Z2 = await x2.process(y), X2 = String(Z2);
32970
+ for (const x2 of N2)
32971
+ Array.isArray(x2) ? S = S.use(x2[0], x2[1]) : S = S.use(x2);
32972
+ const A = await S.process(y), J2 = String(A);
32973
32973
  return {
32974
- html: xt(X2, v),
32974
+ html: xt(J2, v),
32975
32975
  frontmatter: p2,
32976
32976
  changed: g2,
32977
- headingTree: S,
32978
- composeMarkdown: () => g2 ? wt(p2, y) : a
32977
+ headingTree: k2,
32978
+ composeMarkdown: () => g2 ? G(p2, y) : a,
32979
+ uniqueIdPrefix: h
32979
32980
  };
32980
32981
  };
32981
32982
  return {
32982
- process: async (a, f, u = {}) => {
32983
+ process: async (a, h, u = {}) => {
32983
32984
  try {
32984
- const { data: p2, content: y } = B(a);
32985
+ const { data: p2, content: y } = W(a);
32985
32986
  return await c(
32986
32987
  a,
32987
- f,
32988
+ h,
32988
32989
  u,
32989
32990
  p2,
32990
32991
  y,
@@ -32994,25 +32995,42 @@ const P = () => {
32994
32995
  return d2(p2);
32995
32996
  }
32996
32997
  },
32997
- processWithFrontmatterTransform: async (a, f, u, p2 = {}) => {
32998
+ processWithFrontmatterTransform: async (a, h, u, p2, y = {}) => {
32998
32999
  try {
32999
- const { data: y, content: g2 } = B(a), w = A(y), k2 = u({
33000
- originalFrontmatter: y,
33001
- markdownContent: g2
33000
+ const { data: g2, content: w } = W(a), E2 = j(g2), $2 = u({
33001
+ originalFrontmatter: g2,
33002
+ markdownContent: w,
33003
+ uniqueIdPrefix: h
33002
33004
  });
33003
- if (k2 === void 0)
33005
+ if ($2 === void 0)
33004
33006
  return;
33005
- const b2 = k2, O2 = A(k2 === y ? y : k2) !== w;
33006
- return await c(
33007
+ const { frontmatter: F2, uniqueIdPrefix: v } = $2, I2 = v ?? h, N2 = (F2 === g2 ? E2 : j(F2)) !== E2, k2 = await c(
33007
33008
  a,
33008
- f,
33009
- p2,
33010
- b2,
33011
- g2,
33012
- O2
33009
+ I2,
33010
+ y,
33011
+ F2,
33012
+ w,
33013
+ N2
33013
33014
  );
33014
- } catch (y) {
33015
- return d2(y);
33015
+ let b2 = k2.frontmatter;
33016
+ if (p2) {
33017
+ const A = {
33018
+ frontmatter: b2,
33019
+ headingTree: k2.headingTree
33020
+ };
33021
+ b2 = p2(A);
33022
+ }
33023
+ const T = j(b2) !== E2, S = () => T ? G(b2, w) : a;
33024
+ return {
33025
+ html: k2.html,
33026
+ frontmatter: b2,
33027
+ changed: T,
33028
+ headingTree: k2.headingTree,
33029
+ composeMarkdown: S,
33030
+ uniqueIdPrefix: k2.uniqueIdPrefix
33031
+ };
33032
+ } catch (g2) {
33033
+ return d2(g2);
33016
33034
  }
33017
33035
  }
33018
33036
  };
@@ -33020,7 +33038,7 @@ const P = () => {
33020
33038
  const { maxRedirects: n = 5, timeoutEachRedirect: o2 = 1e4 } = t;
33021
33039
  return {
33022
33040
  name: "oembed",
33023
- processBlock: async (s2, h) => {
33041
+ processBlock: async (s2, f) => {
33024
33042
  const m = s2.trim();
33025
33043
  if (!qd(m))
33026
33044
  throw new Error(`Invalid URL: ${m}`);
@@ -33029,12 +33047,12 @@ const P = () => {
33029
33047
  m,
33030
33048
  n,
33031
33049
  o2,
33032
- h,
33050
+ f,
33033
33051
  e
33034
33052
  );
33035
33053
  return Wd(d2, m, t);
33036
33054
  } catch (d2) {
33037
- h.logger.warn("oEmbed fetch failed for URL:", m, d2);
33055
+ f.logger.warn("oEmbed fetch failed for URL:", m, d2);
33038
33056
  const c = Vd(d2);
33039
33057
  return typeof window < "u" ? Xs(m, c) : Xs(m, c);
33040
33058
  }
@@ -33051,8 +33069,8 @@ const P = () => {
33051
33069
  return th(s2, r, e);
33052
33070
  } catch (s2) {
33053
33071
  o2.logger.warn("Card plugin fetch failed for URL:", r, s2);
33054
- const h = Vd(s2);
33055
- return typeof window < "u" ? eh(r, h) : eh(r, h);
33072
+ const f = Vd(s2);
33073
+ return typeof window < "u" ? eh(r, f) : eh(r, f);
33056
33074
  }
33057
33075
  }
33058
33076
  }), Vt = (e = {}) => {
@@ -33060,8 +33078,8 @@ const P = () => {
33060
33078
  return {
33061
33079
  name: "mermaid",
33062
33080
  processBlock: async (r, s2) => {
33063
- const h = r.trim();
33064
- if (!h) {
33081
+ const f = r.trim();
33082
+ if (!f) {
33065
33083
  s2.logger.warn("Mermaid plugin received empty content");
33066
33084
  const l2 = n ? ` id="${s2.getUniqueId()}"` : "";
33067
33085
  return `<div class="${t}-wrapper">
@@ -33075,7 +33093,7 @@ const P = () => {
33075
33093
  <div class="${t}"${l2}><!-- Empty mermaid content --></div>
33076
33094
  </div>`;
33077
33095
  }
33078
- const m = n ? ` id="${s2.getUniqueId()}"` : "", d2 = h.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), c = `<div class="${t}-wrapper">
33096
+ const m = n ? ` id="${s2.getUniqueId()}"` : "", d2 = f.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), c = `<div class="${t}-wrapper">
33079
33097
  <style>
33080
33098
  .${t}-wrapper .${t} > svg {
33081
33099
  width: auto !important;
@@ -33086,7 +33104,7 @@ const P = () => {
33086
33104
  <div class="${t}"${m}>${d2}</div>
33087
33105
  </div>`;
33088
33106
  return s2.logger.debug("Mermaid plugin processed content:", {
33089
- contentLength: h.length,
33107
+ contentLength: f.length,
33090
33108
  className: t,
33091
33109
  includeId: n
33092
33110
  }), c;
@@ -33102,20 +33120,20 @@ const P = () => {
33102
33120
  * repository.url: https://github.com/kekyo/async-primitives.git
33103
33121
  * git.commit.hash: 3b7bffeaa8ae47aea6e8b0ef0f70e265a6d9ab08
33104
33122
  */
33105
- const W = () => {
33106
- }, G = {
33107
- release: W,
33108
- [Symbol.dispose]: W
33123
+ const V = () => {
33124
+ }, Z = {
33125
+ release: V,
33126
+ [Symbol.dispose]: V
33109
33127
  }, Ot = (e, t) => {
33110
33128
  if (!e)
33111
- return G;
33129
+ return Z;
33112
33130
  if (e.aborted) {
33113
33131
  try {
33114
33132
  t();
33115
33133
  } catch (s2) {
33116
33134
  console.warn("AbortHook callback error: ", s2);
33117
33135
  }
33118
- return G;
33136
+ return Z;
33119
33137
  }
33120
33138
  let n;
33121
33139
  n = () => {
@@ -33135,9 +33153,9 @@ const W = () => {
33135
33153
  release: o2,
33136
33154
  [Symbol.dispose]: o2
33137
33155
  };
33138
- }, Lt = (e) => {
33156
+ }, Tt = (e) => {
33139
33157
  typeof setImmediate == "function" ? setImmediate(e) : setTimeout(e, 0);
33140
- }, j = () => new Error("Lock acquisition was aborted"), Nt = (e) => {
33158
+ }, U = () => new Error("Lock acquisition was aborted"), Lt = (e) => {
33141
33159
  let t = true;
33142
33160
  const n = () => {
33143
33161
  t && (t = false, e());
@@ -33149,7 +33167,7 @@ const W = () => {
33149
33167
  release: n,
33150
33168
  [Symbol.dispose]: n
33151
33169
  };
33152
- }, q = (e = 20) => {
33170
+ }, z = (e = 20) => {
33153
33171
  let t = false;
33154
33172
  const n = [];
33155
33173
  let o2 = 0;
@@ -33159,15 +33177,15 @@ const W = () => {
33159
33177
  return;
33160
33178
  const i = n.shift();
33161
33179
  if ((l2 = i.signal) != null && l2.aborted) {
33162
- i.reject(j()), s2();
33180
+ i.reject(U()), s2();
33163
33181
  return;
33164
33182
  }
33165
33183
  t = true;
33166
- const a = Nt(h);
33184
+ const a = Lt(f);
33167
33185
  i.resolve(a);
33168
33186
  }, s2 = () => {
33169
- o2++, o2 >= e ? (o2 = 0, Lt(r)) : r();
33170
- }, h = () => {
33187
+ o2++, o2 >= e ? (o2 = 0, Tt(r)) : r();
33188
+ }, f = () => {
33171
33189
  t && (t = false, s2());
33172
33190
  }, m = (l2) => {
33173
33191
  const i = n.indexOf(l2);
@@ -33175,20 +33193,20 @@ const W = () => {
33175
33193
  }, d2 = async (l2) => {
33176
33194
  if (l2) {
33177
33195
  if (l2.aborted)
33178
- throw j();
33196
+ throw U();
33179
33197
  return new Promise((i, a) => {
33180
- const f = {
33198
+ const h = {
33181
33199
  resolve: void 0,
33182
33200
  reject: void 0,
33183
33201
  signal: l2
33184
33202
  }, u = Ot(l2, () => {
33185
- m(f), a(j());
33203
+ m(h), a(U());
33186
33204
  });
33187
- f.resolve = (p2) => {
33205
+ h.resolve = (p2) => {
33188
33206
  u.release(), i(p2);
33189
- }, f.reject = (p2) => {
33207
+ }, h.reject = (p2) => {
33190
33208
  u.release(), a(p2);
33191
- }, n.push(f), r();
33209
+ }, n.push(h), r();
33192
33210
  });
33193
33211
  } else
33194
33212
  return new Promise((i, a) => {
@@ -33210,8 +33228,8 @@ const W = () => {
33210
33228
  return n.length;
33211
33229
  }
33212
33230
  };
33213
- }, Tt = () => {
33214
- const e = /* @__PURE__ */ new Map(), t = q(), n = (d2 = Date.now()) => {
33231
+ }, Nt = () => {
33232
+ const e = /* @__PURE__ */ new Map(), t = z(), n = (d2 = Date.now()) => {
33215
33233
  const c = [];
33216
33234
  for (const [l2, i] of e.entries())
33217
33235
  i.ttl !== void 0 && (i.ttl === 0 || d2 > i.timestamp + i.ttl) && c.push(l2);
@@ -33229,8 +33247,8 @@ const W = () => {
33229
33247
  try {
33230
33248
  const a = e.get(d2);
33231
33249
  if (a && a.ttl !== void 0) {
33232
- const f = Date.now();
33233
- (a.ttl === 0 || f > a.timestamp + a.ttl) && e.delete(d2);
33250
+ const h = Date.now();
33251
+ (a.ttl === 0 || h > a.timestamp + a.ttl) && e.delete(d2);
33234
33252
  }
33235
33253
  return null;
33236
33254
  } finally {
@@ -33280,7 +33298,7 @@ const W = () => {
33280
33298
  }
33281
33299
  };
33282
33300
  };
33283
- function D(e, t, n) {
33301
+ function M(e, t, n) {
33284
33302
  return `fetch:${e}:${t}:${n}`;
33285
33303
  }
33286
33304
  const Yt = (e, t = 6e4, n, o2) => {
@@ -33288,19 +33306,19 @@ const Yt = (e, t = 6e4, n, o2) => {
33288
33306
  cache: r = true,
33289
33307
  cacheTTL: s2 = 3600 * 1e3,
33290
33308
  // 1 hour default
33291
- cacheFailures: h = true,
33309
+ cacheFailures: f = true,
33292
33310
  failureCacheTTL: m = 300 * 1e3
33293
33311
  // 5 minutes default for failures
33294
- } = {}, d2 = r ? n || Tt() : void 0;
33312
+ } = {}, d2 = r ? n || Nt() : void 0;
33295
33313
  return {
33296
- rawFetcher: async (l2, i, a, f) => {
33314
+ rawFetcher: async (l2, i, a, h) => {
33297
33315
  if (r && d2) {
33298
- const y = D(l2, i, e), g2 = await d2.get(y);
33316
+ const y = M(l2, i, e), g2 = await d2.get(y);
33299
33317
  if (g2)
33300
33318
  try {
33301
33319
  const w = JSON.parse(g2);
33302
33320
  if (w.type === "success")
33303
- return f?.info(`Cache HIT (success) for URL: ${l2}`), new Response(w.data, {
33321
+ return h?.info(`Cache HIT (success) for URL: ${l2}`), new Response(w.data, {
33304
33322
  status: 200,
33305
33323
  statusText: "OK",
33306
33324
  headers: {
@@ -33308,22 +33326,22 @@ const Yt = (e, t = 6e4, n, o2) => {
33308
33326
  "X-Cache": "HIT"
33309
33327
  }
33310
33328
  });
33311
- if (w.type === "error" && h)
33312
- throw f?.info(`Cache HIT (error) for URL: ${l2}`), new Error("Cached error");
33313
- f?.debug(
33314
- `Cache entry type ${w.type} not eligible for use, cacheFailures: ${h}`
33329
+ if (w.type === "error" && f)
33330
+ throw h?.info(`Cache HIT (error) for URL: ${l2}`), new Error("Cached error");
33331
+ h?.debug(
33332
+ `Cache entry type ${w.type} not eligible for use, cacheFailures: ${f}`
33315
33333
  );
33316
33334
  } catch (w) {
33317
- if (f?.warn(
33335
+ if (h?.warn(
33318
33336
  `Failed to parse cached entry for URL ${l2}:`,
33319
33337
  w
33320
33338
  ), w instanceof SyntaxError)
33321
- f?.debug("JSON parse error, continuing to network fetch");
33339
+ h?.debug("JSON parse error, continuing to network fetch");
33322
33340
  else
33323
33341
  throw w;
33324
33342
  }
33325
33343
  else
33326
- f?.info(`Cache MISS for URL: ${l2}`);
33344
+ h?.info(`Cache MISS for URL: ${l2}`);
33327
33345
  }
33328
33346
  let u, p2 = null;
33329
33347
  try {
@@ -33333,12 +33351,12 @@ const Yt = (e, t = 6e4, n, o2) => {
33333
33351
  e,
33334
33352
  t,
33335
33353
  a,
33336
- f
33354
+ h
33337
33355
  );
33338
33356
  } catch (y) {
33339
- if (p2 = y, r && d2 && h)
33357
+ if (p2 = y, r && d2 && f)
33340
33358
  try {
33341
- const g2 = D(l2, i, e), w = {
33359
+ const g2 = M(l2, i, e), w = {
33342
33360
  type: "error",
33343
33361
  data: "",
33344
33362
  error: {
@@ -33355,15 +33373,15 @@ const Yt = (e, t = 6e4, n, o2) => {
33355
33373
  g2,
33356
33374
  JSON.stringify(w),
33357
33375
  m
33358
- ), f?.debug(`Cached error for URL: ${l2}`);
33376
+ ), h?.debug(`Cached error for URL: ${l2}`);
33359
33377
  } catch (g2) {
33360
- f?.warn(`Failed to cache error for URL ${l2}:`, g2), console.warn("Failed to cache error:", g2);
33378
+ h?.warn(`Failed to cache error for URL ${l2}:`, g2), console.warn("Failed to cache error:", g2);
33361
33379
  }
33362
33380
  throw p2;
33363
33381
  }
33364
33382
  if (r && d2 && u.ok)
33365
33383
  try {
33366
- const y = await u.clone().text(), g2 = D(l2, i, e), w = {
33384
+ const y = await u.clone().text(), g2 = M(l2, i, e), w = {
33367
33385
  type: "success",
33368
33386
  data: y,
33369
33387
  timestamp: Date.now()
@@ -33372,9 +33390,9 @@ const Yt = (e, t = 6e4, n, o2) => {
33372
33390
  g2,
33373
33391
  JSON.stringify(w),
33374
33392
  s2
33375
- ), f?.debug(`Cached successful response for URL: ${l2}`);
33393
+ ), h?.debug(`Cached successful response for URL: ${l2}`);
33376
33394
  } catch (y) {
33377
- f?.warn(`Failed to cache response for URL ${l2}:`, y), console.warn("Failed to cache response:", y);
33395
+ h?.warn(`Failed to cache response for URL ${l2}:`, y), console.warn("Failed to cache response:", y);
33378
33396
  }
33379
33397
  return u;
33380
33398
  },
@@ -33387,7 +33405,7 @@ function setupProcessor(config) {
33387
33405
  const fetcher = Yt(
33388
33406
  "mark-deco-cli/0.0.1",
33389
33407
  5e3,
33390
- Tt()
33408
+ Nt()
33391
33409
  );
33392
33410
  const enabledPlugins = config.noPlugins ? [] : Array.isArray(config.plugins) ? config.plugins : ["oembed", "card", "mermaid"];
33393
33411
  if (enabledPlugins.includes("oembed") && config.oembed?.enabled !== false) {