zudoku 0.48.1 → 0.48.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/config/loader.js +1 -1
  2. package/dist/config/loader.js.map +1 -1
  3. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +3 -2
  4. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  5. package/dist/lib/plugins/api-keys/index.js +23 -2
  6. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  7. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  8. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  9. package/dist/lib/ui/Alert.d.ts +5 -4
  10. package/dist/lib/ui/Alert.js +12 -10
  11. package/dist/lib/ui/Alert.js.map +1 -1
  12. package/dist/lib/ui/CodeBlock.d.ts +1 -2
  13. package/dist/lib/ui/CodeBlock.js +9 -9
  14. package/dist/lib/ui/CodeBlock.js.map +1 -1
  15. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
  16. package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
  17. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  18. package/dist/lib/ui/SyntaxHighlight.d.ts +3 -1
  19. package/dist/lib/ui/SyntaxHighlight.js +3 -2
  20. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  21. package/dist/lib/util/MdxComponents.d.ts +3 -1
  22. package/dist/vite/config.js +11 -2
  23. package/dist/vite/config.js.map +1 -1
  24. package/dist/vite/plugin-frontmatter.js +2 -0
  25. package/dist/vite/plugin-frontmatter.js.map +1 -1
  26. package/lib/{Markdown-DCAIYXF5.js → Markdown-BQ8YqLsz.js} +80 -88
  27. package/lib/{Markdown-DCAIYXF5.js.map → Markdown-BQ8YqLsz.js.map} +1 -1
  28. package/lib/{MdxPage-Cf9YXWoC.js → MdxPage-DJvKmI-r.js} +3 -3
  29. package/lib/{MdxPage-Cf9YXWoC.js.map → MdxPage-DJvKmI-r.js.map} +1 -1
  30. package/lib/{OasProvider-JMVTfG6_.js → OasProvider-BC0q5m3u.js} +2 -2
  31. package/lib/{OasProvider-JMVTfG6_.js.map → OasProvider-BC0q5m3u.js.map} +1 -1
  32. package/lib/{OperationList-m4tFCI4S.js → OperationList-Dpip6ozi.js} +6 -5
  33. package/lib/{OperationList-m4tFCI4S.js.map → OperationList-Dpip6ozi.js.map} +1 -1
  34. package/lib/{SchemaList-_wRy4aQ0.js → SchemaList-t4BIfh6Z.js} +5 -5
  35. package/lib/{SchemaList-_wRy4aQ0.js.map → SchemaList-t4BIfh6Z.js.map} +1 -1
  36. package/lib/{SchemaView-CRl_cQYH.js → SchemaView-CLxthVcA.js} +3 -3
  37. package/lib/{SchemaView-CRl_cQYH.js.map → SchemaView-CLxthVcA.js.map} +1 -1
  38. package/lib/{Slot-BkYrj_uC.js → Slot-CSEIvwwO.js} +57 -56
  39. package/lib/Slot-CSEIvwwO.js.map +1 -0
  40. package/lib/{SyntaxHighlight-CH9OUJre.js → SyntaxHighlight-C5ja40ix.js} +715 -714
  41. package/lib/{SyntaxHighlight-CH9OUJre.js.map → SyntaxHighlight-C5ja40ix.js.map} +1 -1
  42. package/lib/{Toc-DRxqEsFc.js → Toc-BS0f4GTe.js} +2 -2
  43. package/lib/{Toc-DRxqEsFc.js.map → Toc-BS0f4GTe.js.map} +1 -1
  44. package/lib/{circular-wJaV4vh_.js → circular-DfOaDE_x.js} +2 -2
  45. package/lib/{circular-wJaV4vh_.js.map → circular-DfOaDE_x.js.map} +1 -1
  46. package/lib/{createServer-DN5AJLcN.js → createServer-DjOMygls.js} +3 -3
  47. package/lib/{createServer-DN5AJLcN.js.map → createServer-DjOMygls.js.map} +1 -1
  48. package/lib/{index-DJVaRmzI.js → index-DW2qmCJa.js} +7 -7
  49. package/lib/{index-DJVaRmzI.js.map → index-DW2qmCJa.js.map} +1 -1
  50. package/lib/ui/Alert.js +54 -38
  51. package/lib/ui/Alert.js.map +1 -1
  52. package/lib/ui/CodeBlock.js +54 -62
  53. package/lib/ui/CodeBlock.js.map +1 -1
  54. package/lib/ui/EmbeddedCodeBlock.js +80 -0
  55. package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  56. package/lib/ui/SyntaxHighlight.js +3 -2
  57. package/lib/ui/SyntaxHighlight.js.map +1 -1
  58. package/lib/zudoku.components.js +2 -2
  59. package/lib/zudoku.plugin-api-catalog.js +1 -1
  60. package/lib/zudoku.plugin-api-keys.js +268 -200
  61. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  62. package/lib/zudoku.plugin-custom-pages.js +1 -1
  63. package/lib/zudoku.plugin-markdown.js +1 -1
  64. package/lib/zudoku.plugin-openapi.js +1 -1
  65. package/package.json +1 -1
  66. package/src/app/main.css +4 -1
  67. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +22 -3
  68. package/src/lib/plugins/api-keys/index.tsx +26 -4
  69. package/src/lib/plugins/openapi/Sidecar.tsx +1 -0
  70. package/src/lib/ui/Alert.tsx +44 -38
  71. package/src/lib/ui/CodeBlock.tsx +39 -53
  72. package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
  73. package/src/lib/ui/SyntaxHighlight.tsx +11 -3
  74. package/lib/Slot-BkYrj_uC.js.map +0 -1
@@ -1,14 +1,15 @@
1
- import { j as Ut } from "./jsx-runtime-C5mzlN2N.js";
1
+ import { j as at } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { Fragment as rs, memo as os } from "react";
3
3
  import { k as ss } from "./hook-CHXroBFt.js";
4
4
  import { c as as } from "./cn-wvCW-ho6.js";
5
5
  import { g as is, i as ls } from "./invariant-DAFpPywt.js";
6
6
  import { CodeBlock as us } from "./ui/CodeBlock.js";
7
- function Jc() {
7
+ import { EmbeddedCodeBlock as cs } from "./ui/EmbeddedCodeBlock.js";
8
+ function Qc() {
8
9
  }
9
- function Zc() {
10
+ function eh() {
10
11
  }
11
- function Qc(t) {
12
+ function th(t) {
12
13
  const e = [], n = String(t || "");
13
14
  let r = n.indexOf(","), o = 0, s = !1;
14
15
  for (; !s; ) {
@@ -24,16 +25,16 @@ function Ir(t, e) {
24
25
  (n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")
25
26
  ).trim();
26
27
  }
27
- const cs = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, hs = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ps = {};
28
+ const hs = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, ps = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, fs = {};
28
29
  function In(t, e) {
29
- return (ps.jsx ? hs : cs).test(t);
30
+ return (fs.jsx ? ps : hs).test(t);
30
31
  }
31
- const fs = /[ \t\n\f\r]/g;
32
- function wt(t) {
32
+ const ds = /[ \t\n\f\r]/g;
33
+ function Ct(t) {
33
34
  return typeof t == "object" ? t.type === "text" ? Nn(t.value) : !1 : Nn(t);
34
35
  }
35
36
  function Nn(t) {
36
- return t.replace(fs, "") === "";
37
+ return t.replace(ds, "") === "";
37
38
  }
38
39
  let Ve = class {
39
40
  /**
@@ -87,10 +88,10 @@ W.prototype.overloadedBoolean = !1;
87
88
  W.prototype.property = "";
88
89
  W.prototype.spaceSeparated = !1;
89
90
  W.prototype.space = void 0;
90
- let ds = 0;
91
+ let gs = 0;
91
92
  const x = ye(), $ = ye(), Pr = ye(), b = ye(), I = ye(), xe = ye(), V = ye();
92
93
  function ye() {
93
- return 2 ** ++ds;
94
+ return 2 ** ++gs;
94
95
  }
95
96
  const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
96
97
  __proto__: null,
@@ -101,7 +102,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
101
102
  number: b,
102
103
  overloadedBoolean: Pr,
103
104
  spaceSeparated: I
104
- }, Symbol.toStringTag, { value: "Module" })), Et = (
105
+ }, Symbol.toStringTag, { value: "Module" })), At = (
105
106
  /** @type {ReadonlyArray<keyof typeof types>} */
106
107
  Object.keys(Ht)
107
108
  );
@@ -122,9 +123,9 @@ let hn = class extends W {
122
123
  constructor(e, n, r, o) {
123
124
  let s = -1;
124
125
  if (super(e, n), Pn(this, "space", o), typeof r == "number")
125
- for (; ++s < Et.length; ) {
126
- const a = Et[s];
127
- Pn(this, Et[s], (r & Ht[a]) === Ht[a]);
126
+ for (; ++s < At.length; ) {
127
+ const a = At[s];
128
+ Pn(this, At[s], (r & Ht[a]) === Ht[a]);
128
129
  }
129
130
  }
130
131
  };
@@ -207,7 +208,7 @@ function $r(t, e) {
207
208
  function Tr(t, e) {
208
209
  return $r(t, e.toLowerCase());
209
210
  }
210
- const gs = Ie({
211
+ const ms = Ie({
211
212
  attributes: {
212
213
  acceptcharset: "accept-charset",
213
214
  classname: "class",
@@ -568,7 +569,7 @@ const gs = Ie({
568
569
  },
569
570
  space: "html",
570
571
  transform: Tr
571
- }), ms = Ie({
572
+ }), ys = Ie({
572
573
  attributes: {
573
574
  accentHeight: "accent-height",
574
575
  alignmentBaseline: "alignment-baseline",
@@ -1152,7 +1153,7 @@ const gs = Ie({
1152
1153
  transform(t, e) {
1153
1154
  return "xml:" + e.slice(3).toLowerCase();
1154
1155
  }
1155
- }), ys = {
1156
+ }), bs = {
1156
1157
  classId: "classID",
1157
1158
  dataType: "datatype",
1158
1159
  itemId: "itemID",
@@ -1170,20 +1171,20 @@ const gs = Ie({
1170
1171
  xLinkTitle: "xlinkTitle",
1171
1172
  xLinkType: "xlinkType",
1172
1173
  xmlnsXLink: "xmlnsXlink"
1173
- }, bs = /[A-Z]/g, Ln = /-[a-z]/g, ws = /^data[-\w.:]+$/i;
1174
- function Cs(t, e) {
1174
+ }, ws = /[A-Z]/g, Ln = /-[a-z]/g, Cs = /^data[-\w.:]+$/i;
1175
+ function _s(t, e) {
1175
1176
  const n = zt(e);
1176
1177
  let r = e, o = W;
1177
1178
  if (n in t.normal)
1178
1179
  return t.property[t.normal[n]];
1179
- if (n.length > 4 && n.slice(0, 4) === "data" && ws.test(e)) {
1180
+ if (n.length > 4 && n.slice(0, 4) === "data" && Cs.test(e)) {
1180
1181
  if (e.charAt(4) === "-") {
1181
- const s = e.slice(5).replace(Ln, Ss);
1182
+ const s = e.slice(5).replace(Ln, ks);
1182
1183
  r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
1183
1184
  } else {
1184
1185
  const s = e.slice(4);
1185
1186
  if (!Ln.test(s)) {
1186
- let a = s.replace(bs, _s);
1187
+ let a = s.replace(ws, Ss);
1187
1188
  a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
1188
1189
  }
1189
1190
  }
@@ -1191,27 +1192,27 @@ function Cs(t, e) {
1191
1192
  }
1192
1193
  return new o(r, e);
1193
1194
  }
1194
- function _s(t) {
1195
+ function Ss(t) {
1195
1196
  return "-" + t.toLowerCase();
1196
1197
  }
1197
- function Ss(t) {
1198
+ function ks(t) {
1198
1199
  return t.charAt(1).toUpperCase();
1199
1200
  }
1200
- const ks = Nr([Lr, gs, Mr, Or, Dr], "html"), pn = Nr([Lr, ms, Mr, Or, Dr], "svg");
1201
- function rh(t) {
1201
+ const vs = Nr([Lr, ms, Mr, Or, Dr], "html"), pn = Nr([Lr, ys, Mr, Or, Dr], "svg");
1202
+ function sh(t) {
1202
1203
  const e = String(t || "").trim();
1203
1204
  return e ? e.split(/[ \t\n\r\f]+/g) : [];
1204
1205
  }
1205
1206
  function Gr(t) {
1206
1207
  return t.join(" ").trim();
1207
1208
  }
1208
- var we = {}, At, $n;
1209
- function vs() {
1210
- if ($n) return At;
1209
+ var we = {}, Rt, $n;
1210
+ function xs() {
1211
+ if ($n) return Rt;
1211
1212
  $n = 1;
1212
1213
  var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, i = /^\s+|\s+$/g, l = `
1213
1214
  `, u = "/", c = "*", h = "", d = "comment", f = "declaration";
1214
- At = function(m, g) {
1215
+ Rt = function(m, g) {
1215
1216
  if (typeof m != "string")
1216
1217
  throw new TypeError("First argument must be a string");
1217
1218
  if (!m) return [];
@@ -1293,17 +1294,17 @@ function vs() {
1293
1294
  function p(m) {
1294
1295
  return m ? m.replace(i, h) : h;
1295
1296
  }
1296
- return At;
1297
+ return Rt;
1297
1298
  }
1298
1299
  var Tn;
1299
- function xs() {
1300
+ function Es() {
1300
1301
  if (Tn) return we;
1301
1302
  Tn = 1;
1302
1303
  var t = we && we.__importDefault || function(r) {
1303
1304
  return r && r.__esModule ? r : { default: r };
1304
1305
  };
1305
1306
  Object.defineProperty(we, "__esModule", { value: !0 }), we.default = n;
1306
- var e = t(vs());
1307
+ var e = t(xs());
1307
1308
  function n(r, o) {
1308
1309
  var s = null;
1309
1310
  if (!r || typeof r != "string")
@@ -1319,7 +1320,7 @@ function xs() {
1319
1320
  return we;
1320
1321
  }
1321
1322
  var Me = {}, Mn;
1322
- function Es() {
1323
+ function As() {
1323
1324
  if (Mn) return Me;
1324
1325
  Mn = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.camelCase = void 0;
1325
1326
  var t = /^--[a-zA-Z0-9_-]+$/, e = /-([a-z])/g, n = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, o = /^-(ms)-/, s = function(u) {
@@ -1334,12 +1335,12 @@ function Es() {
1334
1335
  return Me.camelCase = l, Me;
1335
1336
  }
1336
1337
  var Oe, On;
1337
- function As() {
1338
+ function Rs() {
1338
1339
  if (On) return Oe;
1339
1340
  On = 1;
1340
1341
  var t = Oe && Oe.__importDefault || function(o) {
1341
1342
  return o && o.__esModule ? o : { default: o };
1342
- }, e = t(xs()), n = Es();
1343
+ }, e = t(Es()), n = As();
1343
1344
  function r(o, s) {
1344
1345
  var a = {};
1345
1346
  return !o || typeof o != "string" || (0, e.default)(o, function(i, l) {
@@ -1348,8 +1349,8 @@ function As() {
1348
1349
  }
1349
1350
  return r.default = r, Oe = r, Oe;
1350
1351
  }
1351
- var Rs = As();
1352
- const Is = /* @__PURE__ */ is(Rs), Ns = Br("end"), Fr = Br("start");
1352
+ var Is = Rs();
1353
+ const Ns = /* @__PURE__ */ is(Is), Ps = Br("end"), Fr = Br("start");
1353
1354
  function Br(t) {
1354
1355
  return e;
1355
1356
  function e(n) {
@@ -1362,12 +1363,12 @@ function Br(t) {
1362
1363
  };
1363
1364
  }
1364
1365
  }
1365
- function oh(t) {
1366
- const e = Fr(t), n = Ns(t);
1366
+ function ah(t) {
1367
+ const e = Fr(t), n = Ps(t);
1367
1368
  if (e && n)
1368
1369
  return { start: e, end: n };
1369
1370
  }
1370
- function Ps(t) {
1371
+ function Ls(t) {
1371
1372
  return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Dn(t.position) : "start" in t || "end" in t ? Dn(t) : "line" in t || "column" in t ? Wt(t) : "";
1372
1373
  }
1373
1374
  function Wt(t) {
@@ -1450,7 +1451,7 @@ class H extends Error {
1450
1451
  l && (s.place = l.position);
1451
1452
  }
1452
1453
  const i = s.place && "start" in s.place ? s.place.start : s.place;
1453
- this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name = Ps(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = a && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual, this.expected, this.note, this.url;
1454
+ this.ancestors = s.ancestors || void 0, this.cause = s.cause || void 0, this.column = i ? i.column : void 0, this.fatal = void 0, this.file, this.message = o, this.line = i ? i.line : void 0, this.name = Ls(s.place) || "1:1", this.place = s.place || void 0, this.reason = this.message, this.ruleId = s.ruleId || void 0, this.source = s.source || void 0, this.stack = a && s.cause && typeof s.cause.stack == "string" ? s.cause.stack : "", this.actual, this.expected, this.note, this.url;
1454
1455
  }
1455
1456
  }
1456
1457
  H.prototype.file = "";
@@ -1466,8 +1467,8 @@ H.prototype.fatal = void 0;
1466
1467
  H.prototype.place = void 0;
1467
1468
  H.prototype.ruleId = void 0;
1468
1469
  H.prototype.source = void 0;
1469
- const fn = {}.hasOwnProperty, Ls = /* @__PURE__ */ new Map(), $s = /[A-Z]/g, Ts = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Ms = /* @__PURE__ */ new Set(["td", "th"]), jr = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
1470
- function Os(t, e) {
1470
+ const fn = {}.hasOwnProperty, $s = /* @__PURE__ */ new Map(), Ts = /[A-Z]/g, Ms = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Os = /* @__PURE__ */ new Set(["td", "th"]), jr = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
1471
+ function Ds(t, e) {
1471
1472
  if (!e || e.Fragment === void 0)
1472
1473
  throw new TypeError("Expected `Fragment` in options");
1473
1474
  const n = e.filePath || void 0;
@@ -1477,13 +1478,13 @@ function Os(t, e) {
1477
1478
  throw new TypeError(
1478
1479
  "Expected `jsxDEV` in options when `development: true`"
1479
1480
  );
1480
- r = Hs(n, e.jsxDEV);
1481
+ r = Ws(n, e.jsxDEV);
1481
1482
  } else {
1482
1483
  if (typeof e.jsx != "function")
1483
1484
  throw new TypeError("Expected `jsx` in production options");
1484
1485
  if (typeof e.jsxs != "function")
1485
1486
  throw new TypeError("Expected `jsxs` in production options");
1486
- r = zs(n, e.jsx, e.jsxs);
1487
+ r = Hs(n, e.jsx, e.jsxs);
1487
1488
  }
1488
1489
  const o = {
1489
1490
  Fragment: e.Fragment,
@@ -1496,7 +1497,7 @@ function Os(t, e) {
1496
1497
  ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
1497
1498
  passKeys: e.passKeys !== !1,
1498
1499
  passNode: e.passNode || !1,
1499
- schema: e.space === "svg" ? pn : ks,
1500
+ schema: e.space === "svg" ? pn : vs,
1500
1501
  stylePropertyNameCase: e.stylePropertyNameCase || "dom",
1501
1502
  tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
1502
1503
  }, s = Ur(o, t, void 0);
@@ -1509,29 +1510,29 @@ function Os(t, e) {
1509
1510
  }
1510
1511
  function Ur(t, e, n) {
1511
1512
  if (e.type === "element")
1512
- return Ds(t, e, n);
1513
+ return Gs(t, e, n);
1513
1514
  if (e.type === "mdxFlowExpression" || e.type === "mdxTextExpression")
1514
- return Gs(t, e);
1515
+ return Fs(t, e);
1515
1516
  if (e.type === "mdxJsxFlowElement" || e.type === "mdxJsxTextElement")
1516
- return Bs(t, e, n);
1517
+ return js(t, e, n);
1517
1518
  if (e.type === "mdxjsEsm")
1518
- return Fs(t, e);
1519
+ return Bs(t, e);
1519
1520
  if (e.type === "root")
1520
- return js(t, e, n);
1521
+ return Us(t, e, n);
1521
1522
  if (e.type === "text")
1522
- return Us(t, e);
1523
+ return zs(t, e);
1523
1524
  }
1524
- function Ds(t, e, n) {
1525
+ function Gs(t, e, n) {
1525
1526
  const r = t.schema;
1526
1527
  let o = r;
1527
1528
  e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
1528
- const s = Hr(t, e.tagName, !1), a = Ws(t, e);
1529
+ const s = Hr(t, e.tagName, !1), a = qs(t, e);
1529
1530
  let i = gn(t, e);
1530
- return Ts.has(e.tagName) && (i = i.filter(function(l) {
1531
- return typeof l == "string" ? !wt(l) : !0;
1531
+ return Ms.has(e.tagName) && (i = i.filter(function(l) {
1532
+ return typeof l == "string" ? !Ct(l) : !0;
1532
1533
  })), zr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
1533
1534
  }
1534
- function Gs(t, e) {
1535
+ function Fs(t, e) {
1535
1536
  if (e.data && e.data.estree && t.evaluater) {
1536
1537
  const r = e.data.estree.body[0];
1537
1538
  return r.type, /** @type {Child | undefined} */
@@ -1539,7 +1540,7 @@ function Gs(t, e) {
1539
1540
  }
1540
1541
  je(t, e.position);
1541
1542
  }
1542
- function Fs(t, e) {
1543
+ function Bs(t, e) {
1543
1544
  if (e.data && e.data.estree && t.evaluater)
1544
1545
  return (
1545
1546
  /** @type {Child | undefined} */
@@ -1547,18 +1548,18 @@ function Fs(t, e) {
1547
1548
  );
1548
1549
  je(t, e.position);
1549
1550
  }
1550
- function Bs(t, e, n) {
1551
+ function js(t, e, n) {
1551
1552
  const r = t.schema;
1552
1553
  let o = r;
1553
1554
  e.name === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
1554
- const s = e.name === null ? t.Fragment : Hr(t, e.name, !0), a = qs(t, e), i = gn(t, e);
1555
+ const s = e.name === null ? t.Fragment : Hr(t, e.name, !0), a = Vs(t, e), i = gn(t, e);
1555
1556
  return zr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
1556
1557
  }
1557
- function js(t, e, n) {
1558
+ function Us(t, e, n) {
1558
1559
  const r = {};
1559
1560
  return dn(r, gn(t, e)), t.create(e, t.Fragment, r, n);
1560
1561
  }
1561
- function Us(t, e) {
1562
+ function zs(t, e) {
1562
1563
  return e.value;
1563
1564
  }
1564
1565
  function zr(t, e, n, r) {
@@ -1570,14 +1571,14 @@ function dn(t, e) {
1570
1571
  n && (t.children = n);
1571
1572
  }
1572
1573
  }
1573
- function zs(t, e, n) {
1574
+ function Hs(t, e, n) {
1574
1575
  return r;
1575
1576
  function r(o, s, a, i) {
1576
1577
  const u = Array.isArray(a.children) ? n : e;
1577
1578
  return i ? u(s, a, i) : u(s, a);
1578
1579
  }
1579
1580
  }
1580
- function Hs(t, e) {
1581
+ function Ws(t, e) {
1581
1582
  return n;
1582
1583
  function n(r, o, s, a) {
1583
1584
  const i = Array.isArray(s.children), l = Fr(r);
@@ -1595,15 +1596,15 @@ function Hs(t, e) {
1595
1596
  );
1596
1597
  }
1597
1598
  }
1598
- function Ws(t, e) {
1599
+ function qs(t, e) {
1599
1600
  const n = {};
1600
1601
  let r, o;
1601
1602
  for (o in e.properties)
1602
1603
  if (o !== "children" && fn.call(e.properties, o)) {
1603
- const s = Vs(t, o, e.properties[o]);
1604
+ const s = Xs(t, o, e.properties[o]);
1604
1605
  if (s) {
1605
1606
  const [a, i] = s;
1606
- t.tableCellAlignToStyle && a === "align" && typeof i == "string" && Ms.has(e.tagName) ? r = i : n[a] = i;
1607
+ t.tableCellAlignToStyle && a === "align" && typeof i == "string" && Os.has(e.tagName) ? r = i : n[a] = i;
1607
1608
  }
1608
1609
  }
1609
1610
  if (r) {
@@ -1615,7 +1616,7 @@ function Ws(t, e) {
1615
1616
  }
1616
1617
  return n;
1617
1618
  }
1618
- function qs(t, e) {
1619
+ function Vs(t, e) {
1619
1620
  const n = {};
1620
1621
  for (const r of e.attributes)
1621
1622
  if (r.type === "mdxJsxExpressionAttribute")
@@ -1650,7 +1651,7 @@ function qs(t, e) {
1650
1651
  function gn(t, e) {
1651
1652
  const n = [];
1652
1653
  let r = -1;
1653
- const o = t.passKeys ? /* @__PURE__ */ new Map() : Ls;
1654
+ const o = t.passKeys ? /* @__PURE__ */ new Map() : $s;
1654
1655
  for (; ++r < e.children.length; ) {
1655
1656
  const s = e.children[r];
1656
1657
  let a;
@@ -1666,22 +1667,22 @@ function gn(t, e) {
1666
1667
  }
1667
1668
  return n;
1668
1669
  }
1669
- function Vs(t, e, n) {
1670
- const r = Cs(t.schema, e);
1670
+ function Xs(t, e, n) {
1671
+ const r = _s(t.schema, e);
1671
1672
  if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
1672
1673
  if (Array.isArray(n) && (n = r.commaSeparated ? Ir(n) : Gr(n)), r.property === "style") {
1673
- let o = typeof n == "object" ? n : Xs(t, String(n));
1674
- return t.stylePropertyNameCase === "css" && (o = Ks(o)), ["style", o];
1674
+ let o = typeof n == "object" ? n : Ks(t, String(n));
1675
+ return t.stylePropertyNameCase === "css" && (o = Ys(o)), ["style", o];
1675
1676
  }
1676
1677
  return [
1677
- t.elementAttributeNameCase === "react" && r.space ? ys[r.property] || r.property : r.attribute,
1678
+ t.elementAttributeNameCase === "react" && r.space ? bs[r.property] || r.property : r.attribute,
1678
1679
  n
1679
1680
  ];
1680
1681
  }
1681
1682
  }
1682
- function Xs(t, e) {
1683
+ function Ks(t, e) {
1683
1684
  try {
1684
- return Is(e, { reactCompat: !0 });
1685
+ return Ns(e, { reactCompat: !0 });
1685
1686
  } catch (n) {
1686
1687
  if (t.ignoreInvalidStyle)
1687
1688
  return {};
@@ -1740,18 +1741,18 @@ function je(t, e) {
1740
1741
  );
1741
1742
  throw n.file = t.filePath || void 0, n.url = jr + "#cannot-handle-mdx-estrees-without-createevaluater", n;
1742
1743
  }
1743
- function Ks(t) {
1744
+ function Ys(t) {
1744
1745
  const e = {};
1745
1746
  let n;
1746
1747
  for (n in t)
1747
- fn.call(t, n) && (e[Ys(n)] = t[n]);
1748
+ fn.call(t, n) && (e[Js(n)] = t[n]);
1748
1749
  return e;
1749
1750
  }
1750
- function Ys(t) {
1751
- let e = t.replace($s, Js);
1751
+ function Js(t) {
1752
+ let e = t.replace(Ts, Zs);
1752
1753
  return e.slice(0, 3) === "ms-" && (e = "-" + e), e;
1753
1754
  }
1754
- function Js(t) {
1755
+ function Zs(t) {
1755
1756
  return "-" + t.toLowerCase();
1756
1757
  }
1757
1758
  const Wr = (
@@ -1771,22 +1772,22 @@ const Wr = (
1771
1772
  */
1772
1773
  function(t) {
1773
1774
  if (t == null)
1774
- return ta;
1775
+ return na;
1775
1776
  if (typeof t == "function")
1776
- return Ct(t);
1777
+ return _t(t);
1777
1778
  if (typeof t == "object")
1778
- return Array.isArray(t) ? Zs(t) : Qs(t);
1779
+ return Array.isArray(t) ? Qs(t) : ea(t);
1779
1780
  if (typeof t == "string")
1780
- return ea(t);
1781
+ return ta(t);
1781
1782
  throw new Error("Expected function, string, or object as test");
1782
1783
  }
1783
1784
  );
1784
- function Zs(t) {
1785
+ function Qs(t) {
1785
1786
  const e = [];
1786
1787
  let n = -1;
1787
1788
  for (; ++n < t.length; )
1788
1789
  e[n] = Wr(t[n]);
1789
- return Ct(r);
1790
+ return _t(r);
1790
1791
  function r(...o) {
1791
1792
  let s = -1;
1792
1793
  for (; ++s < e.length; )
@@ -1794,12 +1795,12 @@ function Zs(t) {
1794
1795
  return !1;
1795
1796
  }
1796
1797
  }
1797
- function Qs(t) {
1798
+ function ea(t) {
1798
1799
  const e = (
1799
1800
  /** @type {Record<string, unknown>} */
1800
1801
  t
1801
1802
  );
1802
- return Ct(n);
1803
+ return _t(n);
1803
1804
  function n(r) {
1804
1805
  const o = (
1805
1806
  /** @type {Record<string, unknown>} */
@@ -1812,16 +1813,16 @@ function Qs(t) {
1812
1813
  return !0;
1813
1814
  }
1814
1815
  }
1815
- function ea(t) {
1816
- return Ct(e);
1816
+ function ta(t) {
1817
+ return _t(e);
1817
1818
  function e(n) {
1818
1819
  return n && n.type === t;
1819
1820
  }
1820
1821
  }
1821
- function Ct(t) {
1822
+ function _t(t) {
1822
1823
  return e;
1823
1824
  function e(n, r, o) {
1824
- return !!(na(n) && t.call(
1825
+ return !!(ra(n) && t.call(
1825
1826
  this,
1826
1827
  n,
1827
1828
  typeof r == "number" ? r : void 0,
@@ -1829,14 +1830,14 @@ function Ct(t) {
1829
1830
  ));
1830
1831
  }
1831
1832
  }
1832
- function ta() {
1833
+ function na() {
1833
1834
  return !0;
1834
1835
  }
1835
- function na(t) {
1836
+ function ra(t) {
1836
1837
  return t !== null && typeof t == "object" && "type" in t;
1837
1838
  }
1838
- const qr = [], ra = !0, Fn = !1, oa = "skip";
1839
- function sa(t, e, n, r) {
1839
+ const qr = [], oa = !0, Fn = !1, sa = "skip";
1840
+ function aa(t, e, n, r) {
1840
1841
  let o;
1841
1842
  typeof e == "function" && typeof n != "function" ? (r = n, n = e) : o = e;
1842
1843
  const s = Wr(o), a = r ? -1 : 1;
@@ -1861,14 +1862,14 @@ function sa(t, e, n, r) {
1861
1862
  return d;
1862
1863
  function d() {
1863
1864
  let f = qr, p, m, g;
1864
- if ((!e || s(l, u, c[c.length - 1] || void 0)) && (f = aa(n(l, c)), f[0] === Fn))
1865
+ if ((!e || s(l, u, c[c.length - 1] || void 0)) && (f = ia(n(l, c)), f[0] === Fn))
1865
1866
  return f;
1866
1867
  if ("children" in l && l.children) {
1867
1868
  const C = (
1868
1869
  /** @type {UnistParent} */
1869
1870
  l
1870
1871
  );
1871
- if (C.children && f[0] !== oa)
1872
+ if (C.children && f[0] !== sa)
1872
1873
  for (m = (r ? C.children.length : -1) + a, g = c.concat(C); m > -1 && m < C.children.length; ) {
1873
1874
  const y = C.children[m];
1874
1875
  if (p = i(y, m, g)(), p[0] === Fn)
@@ -1880,19 +1881,19 @@ function sa(t, e, n, r) {
1880
1881
  }
1881
1882
  }
1882
1883
  }
1883
- function aa(t) {
1884
- return Array.isArray(t) ? t : typeof t == "number" ? [ra, t] : t == null ? qr : [t];
1884
+ function ia(t) {
1885
+ return Array.isArray(t) ? t : typeof t == "number" ? [oa, t] : t == null ? qr : [t];
1885
1886
  }
1886
1887
  function Vr(t, e, n, r) {
1887
1888
  let o, s, a;
1888
- typeof e == "function" && typeof n != "function" ? (s = void 0, a = e, o = n) : (s = e, a = n, o = r), sa(t, s, i, o);
1889
+ typeof e == "function" && typeof n != "function" ? (s = void 0, a = e, o = n) : (s = e, a = n, o = r), aa(t, s, i, o);
1889
1890
  function i(l, u) {
1890
1891
  const c = u[u.length - 1], h = c ? c.children.indexOf(l) : void 0;
1891
1892
  return a(l, h, c);
1892
1893
  }
1893
1894
  }
1894
1895
  const Bn = {}.hasOwnProperty;
1895
- function ia(t, e) {
1896
+ function la(t, e) {
1896
1897
  const n = e || {};
1897
1898
  function r(o, ...s) {
1898
1899
  let a = r.invalid;
@@ -1906,7 +1907,7 @@ function ia(t, e) {
1906
1907
  }
1907
1908
  return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
1908
1909
  }
1909
- const la = [
1910
+ const ua = [
1910
1911
  "area",
1911
1912
  "base",
1912
1913
  "basefont",
@@ -1942,19 +1943,19 @@ let F = class extends Error {
1942
1943
  super(e), this.name = "ShikiError";
1943
1944
  }
1944
1945
  };
1945
- function ua(t) {
1946
+ function ca(t) {
1946
1947
  return mn(t);
1947
1948
  }
1948
1949
  function mn(t) {
1949
- return Array.isArray(t) ? ca(t) : t instanceof RegExp ? t : typeof t == "object" ? ha(t) : t;
1950
+ return Array.isArray(t) ? ha(t) : t instanceof RegExp ? t : typeof t == "object" ? pa(t) : t;
1950
1951
  }
1951
- function ca(t) {
1952
+ function ha(t) {
1952
1953
  let e = [];
1953
1954
  for (let n = 0, r = t.length; n < r; n++)
1954
1955
  e[n] = mn(t[n]);
1955
1956
  return e;
1956
1957
  }
1957
- function ha(t) {
1958
+ function pa(t) {
1958
1959
  let e = {};
1959
1960
  for (let n in t)
1960
1961
  e[n] = mn(t[n]);
@@ -1970,12 +1971,12 @@ function Kr(t) {
1970
1971
  const e = ~t.lastIndexOf("/") || ~t.lastIndexOf("\\");
1971
1972
  return e === 0 ? t : ~e === t.length - 1 ? Kr(t.substring(0, t.length - 1)) : t.substr(~e + 1);
1972
1973
  }
1973
- var Rt = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
1974
+ var It = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
1974
1975
  static hasCaptures(t) {
1975
- return t === null ? !1 : (Rt.lastIndex = 0, Rt.test(t));
1976
+ return t === null ? !1 : (It.lastIndex = 0, It.test(t));
1976
1977
  }
1977
1978
  static replaceCaptures(t, e, n) {
1978
- return t.replace(Rt, (r, o, s, a) => {
1979
+ return t.replace(It, (r, o, s, a) => {
1979
1980
  let i = n[parseInt(o || s, 10)];
1980
1981
  if (i) {
1981
1982
  let l = e.substring(i.start, i.end);
@@ -2032,15 +2033,15 @@ var Qr = class {
2032
2033
  const e = this.fn(t);
2033
2034
  return this.cache.set(t, e), e;
2034
2035
  }
2035
- }, at = class {
2036
+ }, it = class {
2036
2037
  constructor(t, e, n) {
2037
2038
  this._colorMap = t, this._defaults = e, this._root = n;
2038
2039
  }
2039
2040
  static createFromRawTheme(t, e) {
2040
- return this.createFromParsedTheme(da(t), e);
2041
+ return this.createFromParsedTheme(ga(t), e);
2041
2042
  }
2042
2043
  static createFromParsedTheme(t, e) {
2043
- return ma(t, e);
2044
+ return ya(t, e);
2044
2045
  }
2045
2046
  _cachedMatchRoot = new Qr(
2046
2047
  (t) => this._root.match(t)
@@ -2055,7 +2056,7 @@ var Qr = class {
2055
2056
  if (t === null)
2056
2057
  return this._defaults;
2057
2058
  const e = t.scopeName, r = this._cachedMatchRoot.get(e).find(
2058
- (o) => pa(t.parent, o.parentScopes)
2059
+ (o) => fa(t.parent, o.parentScopes)
2059
2060
  );
2060
2061
  return r ? new eo(
2061
2062
  r.fontStyle,
@@ -2063,7 +2064,7 @@ var Qr = class {
2063
2064
  r.background
2064
2065
  ) : null;
2065
2066
  }
2066
- }, It = class rt {
2067
+ }, Nt = class rt {
2067
2068
  constructor(e, n) {
2068
2069
  this.parent = e, this.scopeName = n;
2069
2070
  }
@@ -2102,7 +2103,7 @@ var Qr = class {
2102
2103
  return r === e ? n.reverse() : void 0;
2103
2104
  }
2104
2105
  };
2105
- function pa(t, e) {
2106
+ function fa(t, e) {
2106
2107
  if (e.length === 0)
2107
2108
  return !0;
2108
2109
  for (let n = 0; n < e.length; n++) {
@@ -2112,7 +2113,7 @@ function pa(t, e) {
2112
2113
  return !1;
2113
2114
  r = e[++n], o = !0;
2114
2115
  }
2115
- for (; t && !fa(t.scopeName, r); ) {
2116
+ for (; t && !da(t.scopeName, r); ) {
2116
2117
  if (o)
2117
2118
  return !1;
2118
2119
  t = t.parent;
@@ -2123,7 +2124,7 @@ function pa(t, e) {
2123
2124
  }
2124
2125
  return !0;
2125
2126
  }
2126
- function fa(t, e) {
2127
+ function da(t, e) {
2127
2128
  return e === t || t.startsWith(e) && t[e.length] === ".";
2128
2129
  }
2129
2130
  var eo = class {
@@ -2131,7 +2132,7 @@ var eo = class {
2131
2132
  this.fontStyle = t, this.foregroundId = e, this.backgroundId = n;
2132
2133
  }
2133
2134
  };
2134
- function da(t) {
2135
+ function ga(t) {
2135
2136
  if (!t)
2136
2137
  return [];
2137
2138
  if (!t.settings || !Array.isArray(t.settings))
@@ -2172,7 +2173,7 @@ function da(t) {
2172
2173
  typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
2173
2174
  for (let h = 0, d = i.length; h < d; h++) {
2174
2175
  let p = i[h].trim().split(" "), m = p[p.length - 1], g = null;
2175
- p.length > 1 && (g = p.slice(0, p.length - 1), g.reverse()), n[r++] = new ga(
2176
+ p.length > 1 && (g = p.slice(0, p.length - 1), g.reverse()), n[r++] = new ma(
2176
2177
  m,
2177
2178
  g,
2178
2179
  o,
@@ -2184,12 +2185,12 @@ function da(t) {
2184
2185
  }
2185
2186
  return n;
2186
2187
  }
2187
- var ga = class {
2188
+ var ma = class {
2188
2189
  constructor(t, e, n, r, o, s) {
2189
2190
  this.scope = t, this.parentScopes = e, this.index = n, this.fontStyle = r, this.foreground = o, this.background = s;
2190
2191
  }
2191
2192
  }, z = /* @__PURE__ */ ((t) => (t[t.NotSet = -1] = "NotSet", t[t.None = 0] = "None", t[t.Italic = 1] = "Italic", t[t.Bold = 2] = "Bold", t[t.Underline = 4] = "Underline", t[t.Strikethrough = 8] = "Strikethrough", t))(z || {});
2192
- function ma(t, e) {
2193
+ function ya(t, e) {
2193
2194
  t.sort((l, u) => {
2194
2195
  let c = Yr(l.scope, u.scope);
2195
2196
  return c !== 0 || (c = Jr(l.parentScopes, u.parentScopes), c !== 0) ? c : l.index - u.index;
@@ -2199,14 +2200,14 @@ function ma(t, e) {
2199
2200
  let l = t.shift();
2200
2201
  l.fontStyle !== -1 && (n = l.fontStyle), l.foreground !== null && (r = l.foreground), l.background !== null && (o = l.background);
2201
2202
  }
2202
- let s = new ya(e), a = new eo(n, s.getId(r), s.getId(o)), i = new wa(new qt(0, null, -1, 0, 0), []);
2203
+ let s = new ba(e), a = new eo(n, s.getId(r), s.getId(o)), i = new Ca(new qt(0, null, -1, 0, 0), []);
2203
2204
  for (let l = 0, u = t.length; l < u; l++) {
2204
2205
  let c = t[l];
2205
2206
  i.insert(0, c.scope, c.parentScopes, c.fontStyle, s.getId(c.foreground), s.getId(c.background));
2206
2207
  }
2207
- return new at(s, a, i);
2208
+ return new it(s, a, i);
2208
2209
  }
2209
- var ya = class {
2210
+ var ba = class {
2210
2211
  _isFrozen;
2211
2212
  _lastColorId;
2212
2213
  _id2color;
@@ -2233,14 +2234,14 @@ var ya = class {
2233
2234
  getColorMap() {
2234
2235
  return this._id2color.slice(0);
2235
2236
  }
2236
- }, ba = Object.freeze([]), qt = class to {
2237
+ }, wa = Object.freeze([]), qt = class to {
2237
2238
  scopeDepth;
2238
2239
  parentScopes;
2239
2240
  fontStyle;
2240
2241
  foreground;
2241
2242
  background;
2242
2243
  constructor(e, n, r, o, s) {
2243
- this.scopeDepth = e, this.parentScopes = n || ba, this.fontStyle = r, this.foreground = o, this.background = s;
2244
+ this.scopeDepth = e, this.parentScopes = n || wa, this.fontStyle = r, this.foreground = o, this.background = s;
2244
2245
  }
2245
2246
  clone() {
2246
2247
  return new to(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
@@ -2254,7 +2255,7 @@ var ya = class {
2254
2255
  acceptOverwrite(e, n, r, o) {
2255
2256
  this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), o !== 0 && (this.background = o);
2256
2257
  }
2257
- }, wa = class Vt {
2258
+ }, Ca = class Vt {
2258
2259
  constructor(e, n = [], r = {}) {
2259
2260
  this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
2260
2261
  }
@@ -2345,8 +2346,8 @@ var ya = class {
2345
2346
  return n !== 0 && (l = n), r !== 8 && (u = r), o !== null && (c = o ? 1 : 0), s !== -1 && (h = s), a !== 0 && (d = a), i !== 0 && (f = i), (l << 0 | u << 8 | c << 10 | h << 11 | d << 15 | f << 24) >>> 0;
2346
2347
  }
2347
2348
  };
2348
- function it(t, e) {
2349
- const n = [], r = Ca(t);
2349
+ function lt(t, e) {
2350
+ const n = [], r = _a(t);
2350
2351
  let o = r.next();
2351
2352
  for (; o !== null; ) {
2352
2353
  let l = 0;
@@ -2411,7 +2412,7 @@ function it(t, e) {
2411
2412
  function zn(t) {
2412
2413
  return !!t && !!t.match(/[\w\.:]+/);
2413
2414
  }
2414
- function Ca(t) {
2415
+ function _a(t) {
2415
2416
  let e = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = e.exec(t);
2416
2417
  return {
2417
2418
  next: () => {
@@ -2432,14 +2433,14 @@ var Ue = class {
2432
2433
  toKey() {
2433
2434
  return this.scopeName;
2434
2435
  }
2435
- }, _a = class {
2436
+ }, Sa = class {
2436
2437
  constructor(t, e) {
2437
2438
  this.scopeName = t, this.ruleName = e;
2438
2439
  }
2439
2440
  toKey() {
2440
2441
  return `${this.scopeName}#${this.ruleName}`;
2441
2442
  }
2442
- }, Sa = class {
2443
+ }, ka = class {
2443
2444
  _references = [];
2444
2445
  _seenReferenceKeys = /* @__PURE__ */ new Set();
2445
2446
  get references() {
@@ -2450,7 +2451,7 @@ var Ue = class {
2450
2451
  const e = t.toKey();
2451
2452
  this._seenReferenceKeys.has(e) || (this._seenReferenceKeys.add(e), this._references.push(t));
2452
2453
  }
2453
- }, ka = class {
2454
+ }, va = class {
2454
2455
  constructor(t, e) {
2455
2456
  this.repo = t, this.initialScopeName = e, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new Ue(this.initialScopeName)];
2456
2457
  }
@@ -2460,9 +2461,9 @@ var Ue = class {
2460
2461
  processQueue() {
2461
2462
  const t = this.Q;
2462
2463
  this.Q = [];
2463
- const e = new Sa();
2464
+ const e = new ka();
2464
2465
  for (const n of t)
2465
- va(n, this.initialScopeName, this.repo, e);
2466
+ xa(n, this.initialScopeName, this.repo, e);
2466
2467
  for (const n of e.references)
2467
2468
  if (n instanceof Ue) {
2468
2469
  if (this.seenFullScopeRequests.has(n.scopeName))
@@ -2475,7 +2476,7 @@ var Ue = class {
2475
2476
  }
2476
2477
  }
2477
2478
  };
2478
- function va(t, e, n, r) {
2479
+ function xa(t, e, n, r) {
2479
2480
  const o = n.lookup(t.scopeName);
2480
2481
  if (!o) {
2481
2482
  if (t.scopeName === e)
@@ -2496,27 +2497,27 @@ function va(t, e, n, r) {
2496
2497
  function Xt(t, e, n) {
2497
2498
  if (e.repository && e.repository[t]) {
2498
2499
  const r = e.repository[t];
2499
- lt([r], e, n);
2500
+ ut([r], e, n);
2500
2501
  }
2501
2502
  }
2502
2503
  function ot(t, e) {
2503
- t.selfGrammar.patterns && Array.isArray(t.selfGrammar.patterns) && lt(
2504
+ t.selfGrammar.patterns && Array.isArray(t.selfGrammar.patterns) && ut(
2504
2505
  t.selfGrammar.patterns,
2505
2506
  { ...t, repository: t.selfGrammar.repository },
2506
2507
  e
2507
- ), t.selfGrammar.injections && lt(
2508
+ ), t.selfGrammar.injections && ut(
2508
2509
  Object.values(t.selfGrammar.injections),
2509
2510
  { ...t, repository: t.selfGrammar.repository },
2510
2511
  e
2511
2512
  );
2512
2513
  }
2513
- function lt(t, e, n) {
2514
+ function ut(t, e, n) {
2514
2515
  for (const r of t) {
2515
2516
  if (n.visitedRule.has(r))
2516
2517
  continue;
2517
2518
  n.visitedRule.add(r);
2518
2519
  const o = r.repository ? Xr({}, e.repository, r.repository) : e.repository;
2519
- Array.isArray(r.patterns) && lt(r.patterns, { ...e, repository: o }, n);
2520
+ Array.isArray(r.patterns) && ut(r.patterns, { ...e, repository: o }, n);
2520
2521
  const s = r.include;
2521
2522
  if (!s)
2522
2523
  continue;
@@ -2538,26 +2539,26 @@ function lt(t, e, n) {
2538
2539
  const l = { baseGrammar: e.baseGrammar, selfGrammar: i, repository: o };
2539
2540
  a.kind === 4 ? Xt(a.ruleName, l, n) : ot(l, n);
2540
2541
  } else
2541
- a.kind === 4 ? n.add(new _a(a.scopeName, a.ruleName)) : n.add(new Ue(a.scopeName));
2542
+ a.kind === 4 ? n.add(new Sa(a.scopeName, a.ruleName)) : n.add(new Ue(a.scopeName));
2542
2543
  break;
2543
2544
  }
2544
2545
  }
2545
2546
  }
2546
- var xa = class {
2547
+ var Ea = class {
2547
2548
  kind = 0;
2548
- }, Ea = class {
2549
- kind = 1;
2550
2549
  }, Aa = class {
2550
+ kind = 1;
2551
+ }, Ra = class {
2551
2552
  constructor(t) {
2552
2553
  this.ruleName = t;
2553
2554
  }
2554
2555
  kind = 2;
2555
- }, Ra = class {
2556
+ }, Ia = class {
2556
2557
  constructor(t) {
2557
2558
  this.scopeName = t;
2558
2559
  }
2559
2560
  kind = 3;
2560
- }, Ia = class {
2561
+ }, Na = class {
2561
2562
  constructor(t, e) {
2562
2563
  this.scopeName = t, this.ruleName = e;
2563
2564
  }
@@ -2565,20 +2566,20 @@ var xa = class {
2565
2566
  };
2566
2567
  function ro(t) {
2567
2568
  if (t === "$base")
2568
- return new xa();
2569
- if (t === "$self")
2570
2569
  return new Ea();
2570
+ if (t === "$self")
2571
+ return new Aa();
2571
2572
  const e = t.indexOf("#");
2572
2573
  if (e === -1)
2573
- return new Ra(t);
2574
+ return new Ia(t);
2574
2575
  if (e === 0)
2575
- return new Aa(t.substring(1));
2576
+ return new Ra(t.substring(1));
2576
2577
  {
2577
2578
  const n = t.substring(0, e), r = t.substring(e + 1);
2578
- return new Ia(n, r);
2579
+ return new Na(n, r);
2579
2580
  }
2580
2581
  }
2581
- var Na = /\\(\d+)/, Hn = /\\(\d+)/g, Pa = -1, oo = -2;
2582
+ var Pa = /\\(\d+)/, Hn = /\\(\d+)/g, La = -1, oo = -2;
2582
2583
  var Xe = class {
2583
2584
  $location;
2584
2585
  id;
@@ -2599,7 +2600,7 @@ var Xe = class {
2599
2600
  getContentName(t, e) {
2600
2601
  return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : Je.replaceCaptures(this._contentName, t, e);
2601
2602
  }
2602
- }, La = class extends Xe {
2603
+ }, $a = class extends Xe {
2603
2604
  retokenizeCapturedWithRuleId;
2604
2605
  constructor(t, e, n, r, o) {
2605
2606
  super(t, e, n, r), this.retokenizeCapturedWithRuleId = o;
@@ -2615,7 +2616,7 @@ var Xe = class {
2615
2616
  compileAG(t, e, n, r) {
2616
2617
  throw new Error("Not supported!");
2617
2618
  }
2618
- }, $a = class extends Xe {
2619
+ }, Ta = class extends Xe {
2619
2620
  _match;
2620
2621
  captures;
2621
2622
  _cachedCompiledPatterns;
@@ -2706,7 +2707,7 @@ var Xe = class {
2706
2707
  }
2707
2708
  return this._end.hasBackReferences && (this.applyEndPatternLast ? this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, e) : this._cachedCompiledPatterns.setSource(0, e)), this._cachedCompiledPatterns;
2708
2709
  }
2709
- }, ut = class extends Xe {
2710
+ }, ct = class extends Xe {
2710
2711
  _begin;
2711
2712
  beginCaptures;
2712
2713
  whileCaptures;
@@ -2759,12 +2760,12 @@ var Xe = class {
2759
2760
  }
2760
2761
  }, so = class U {
2761
2762
  static createCaptureRule(e, n, r, o, s) {
2762
- return e.registerRule((a) => new La(n, a, r, o, s));
2763
+ return e.registerRule((a) => new $a(n, a, r, o, s));
2763
2764
  }
2764
2765
  static getCompiledRuleId(e, n, r) {
2765
2766
  return e.id || n.registerRule((o) => {
2766
2767
  if (e.id = o, e.match)
2767
- return new $a(
2768
+ return new Ta(
2768
2769
  e.$vscodeTextmateLocation,
2769
2770
  e.id,
2770
2771
  e.name,
@@ -2782,7 +2783,7 @@ var Xe = class {
2782
2783
  U._compilePatterns(s, n, r)
2783
2784
  );
2784
2785
  }
2785
- return e.while ? new ut(
2786
+ return e.while ? new ct(
2786
2787
  e.$vscodeTextmateLocation,
2787
2788
  e.id,
2788
2789
  e.name,
@@ -2861,7 +2862,7 @@ var Xe = class {
2861
2862
  if (l !== -1) {
2862
2863
  const u = n.getRule(l);
2863
2864
  let c = !1;
2864
- if ((u instanceof Wn || u instanceof Kt || u instanceof ut) && u.hasMissingPatterns && u.patterns.length === 0 && (c = !0), c)
2865
+ if ((u instanceof Wn || u instanceof Kt || u instanceof ct) && u.hasMissingPatterns && u.patterns.length === 0 && (c = !0), c)
2865
2866
  continue;
2866
2867
  o.push(l);
2867
2868
  }
@@ -2889,7 +2890,7 @@ var Xe = class {
2889
2890
  this.hasAnchor = a, o === 0 ? this.source = e : (s.push(e.substring(o, r)), this.source = s.join(""));
2890
2891
  } else
2891
2892
  this.hasAnchor = !1, this.source = e;
2892
- this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Na.test(this.source) : this.hasBackReferences = !1;
2893
+ this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = n, typeof this.source == "string" ? this.hasBackReferences = Pa.test(this.source) : this.hasBackReferences = !1;
2893
2894
  }
2894
2895
  clone() {
2895
2896
  return new ao(this.source, this.ruleId);
@@ -2986,19 +2987,19 @@ var Xe = class {
2986
2987
  captureIndices: r.captureIndices
2987
2988
  } : null;
2988
2989
  }
2989
- }, Nt = class {
2990
+ }, Pt = class {
2990
2991
  constructor(t, e) {
2991
2992
  this.languageId = t, this.tokenType = e;
2992
2993
  }
2993
- }, Ta = class Yt {
2994
+ }, Ma = class Yt {
2994
2995
  _defaultAttributes;
2995
2996
  _embeddedLanguagesMatcher;
2996
2997
  constructor(e, n) {
2997
- this._defaultAttributes = new Nt(
2998
+ this._defaultAttributes = new Pt(
2998
2999
  e,
2999
3000
  8
3000
3001
  /* NotSet */
3001
- ), this._embeddedLanguagesMatcher = new Ma(Object.entries(n || {}));
3002
+ ), this._embeddedLanguagesMatcher = new Oa(Object.entries(n || {}));
3002
3003
  }
3003
3004
  getDefaultAttributes() {
3004
3005
  return this._defaultAttributes;
@@ -3006,10 +3007,10 @@ var Xe = class {
3006
3007
  getBasicScopeAttributes(e) {
3007
3008
  return e === null ? Yt._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
3008
3009
  }
3009
- static _NULL_SCOPE_METADATA = new Nt(0, 0);
3010
+ static _NULL_SCOPE_METADATA = new Pt(0, 0);
3010
3011
  _getBasicScopeAttributes = new Qr((e) => {
3011
3012
  const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
3012
- return new Nt(n, r);
3013
+ return new Pt(n, r);
3013
3014
  });
3014
3015
  /**
3015
3016
  * Given a produced TM scope, return the language that token describes or null if unknown.
@@ -3035,7 +3036,7 @@ var Xe = class {
3035
3036
  throw new Error("Unexpected match for standard token type!");
3036
3037
  }
3037
3038
  static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
3038
- }, Ma = class {
3039
+ }, Oa = class {
3039
3040
  values;
3040
3041
  scopesRegExp;
3041
3042
  constructor(t) {
@@ -3070,7 +3071,7 @@ function io(t, e, n, r, o, s, a, i) {
3070
3071
  const l = e.content.length;
3071
3072
  let u = !1, c = -1;
3072
3073
  if (a) {
3073
- const f = Oa(
3074
+ const f = Da(
3074
3075
  t,
3075
3076
  e,
3076
3077
  n,
@@ -3088,7 +3089,7 @@ function io(t, e, n, r, o, s, a, i) {
3088
3089
  }
3089
3090
  return new Vn(o, !1);
3090
3091
  function d() {
3091
- const f = Da(
3092
+ const f = Ga(
3092
3093
  t,
3093
3094
  e,
3094
3095
  n,
@@ -3101,7 +3102,7 @@ function io(t, e, n, r, o, s, a, i) {
3101
3102
  return;
3102
3103
  }
3103
3104
  const p = f.captureIndices, m = f.matchedRuleId, g = p && p.length > 0 ? p[0].end > r : !1;
3104
- if (m === Pa) {
3105
+ if (m === La) {
3105
3106
  const C = o.getRule(t);
3106
3107
  s.produce(o, p[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
3107
3108
  t,
@@ -3159,7 +3160,7 @@ function io(t, e, n, r, o, s, a, i) {
3159
3160
  o = o.pop(), s.produce(o, l), u = !0;
3160
3161
  return;
3161
3162
  }
3162
- } else if (C instanceof ut) {
3163
+ } else if (C instanceof ct) {
3163
3164
  const A = C;
3164
3165
  Ge(
3165
3166
  t,
@@ -3202,18 +3203,18 @@ function io(t, e, n, r, o, s, a, i) {
3202
3203
  p[0].end > r && (r = p[0].end, n = !1);
3203
3204
  }
3204
3205
  }
3205
- function Oa(t, e, n, r, o, s) {
3206
+ function Da(t, e, n, r, o, s) {
3206
3207
  let a = o.beginRuleCapturedEOL ? 0 : -1;
3207
3208
  const i = [];
3208
3209
  for (let l = o; l; l = l.pop()) {
3209
3210
  const u = l.getRule(t);
3210
- u instanceof ut && i.push({
3211
+ u instanceof ct && i.push({
3211
3212
  rule: u,
3212
3213
  stack: l
3213
3214
  });
3214
3215
  }
3215
3216
  for (let l = i.pop(); l; l = i.pop()) {
3216
- const { ruleScanner: u, findOptions: c } = Ba(l.rule, t, l.stack.endRule, n, r === a), h = u.findNextMatchSync(e, r, c);
3217
+ const { ruleScanner: u, findOptions: c } = ja(l.rule, t, l.stack.endRule, n, r === a), h = u.findNextMatchSync(e, r, c);
3217
3218
  if (h) {
3218
3219
  if (h.ruleId !== oo) {
3219
3220
  o = l.stack.pop();
@@ -3227,11 +3228,11 @@ function Oa(t, e, n, r, o, s) {
3227
3228
  }
3228
3229
  return { stack: o, linePos: r, anchorPosition: a, isFirstLine: n };
3229
3230
  }
3230
- function Da(t, e, n, r, o, s) {
3231
- const a = Ga(t, e, n, r, o, s), i = t.getInjections();
3231
+ function Ga(t, e, n, r, o, s) {
3232
+ const a = Fa(t, e, n, r, o, s), i = t.getInjections();
3232
3233
  if (i.length === 0)
3233
3234
  return a;
3234
- const l = Fa(i, t, e, n, r, o, s);
3235
+ const l = Ba(i, t, e, n, r, o, s);
3235
3236
  if (!l)
3236
3237
  return a;
3237
3238
  if (!a)
@@ -3239,14 +3240,14 @@ function Da(t, e, n, r, o, s) {
3239
3240
  const u = a.captureIndices[0].start, c = l.captureIndices[0].start;
3240
3241
  return c < u || l.priorityMatch && c === u ? l : a;
3241
3242
  }
3242
- function Ga(t, e, n, r, o, s) {
3243
+ function Fa(t, e, n, r, o, s) {
3243
3244
  const a = o.getRule(t), { ruleScanner: i, findOptions: l } = lo(a, t, o.endRule, n, r === s), u = i.findNextMatchSync(e, r, l);
3244
3245
  return u ? {
3245
3246
  captureIndices: u.captureIndices,
3246
3247
  matchedRuleId: u.ruleId
3247
3248
  } : null;
3248
3249
  }
3249
- function Fa(t, e, n, r, o, s, a) {
3250
+ function Ba(t, e, n, r, o, s, a) {
3250
3251
  let i = Number.MAX_VALUE, l = null, u, c = 0;
3251
3252
  const h = s.contentNameScopesList.getScopeNames();
3252
3253
  for (let d = 0, f = t.length; d < f; d++) {
@@ -3273,7 +3274,7 @@ function lo(t, e, n, r, o) {
3273
3274
  /* None */
3274
3275
  };
3275
3276
  }
3276
- function Ba(t, e, n, r, o) {
3277
+ function ja(t, e, n, r, o) {
3277
3278
  return {
3278
3279
  ruleScanner: t.compileWhileAG(e, n, r, o),
3279
3280
  findOptions: 0
@@ -3313,21 +3314,21 @@ function Ge(t, e, n, r, o, s, a) {
3313
3314
  const p = d.getName(i, a);
3314
3315
  if (p !== null) {
3315
3316
  const g = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(p, t);
3316
- u.push(new ja(g, f.end));
3317
+ u.push(new Ua(g, f.end));
3317
3318
  }
3318
3319
  }
3319
3320
  for (; u.length > 0; )
3320
3321
  o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
3321
3322
  }
3322
- var ja = class {
3323
+ var Ua = class {
3323
3324
  scopes;
3324
3325
  endPos;
3325
3326
  constructor(t, e) {
3326
3327
  this.scopes = t, this.endPos = e;
3327
3328
  }
3328
3329
  };
3329
- function Ua(t, e, n, r, o, s, a, i) {
3330
- return new Ha(
3330
+ function za(t, e, n, r, o, s, a, i) {
3331
+ return new Wa(
3331
3332
  t,
3332
3333
  e,
3333
3334
  n,
@@ -3339,7 +3340,7 @@ function Ua(t, e, n, r, o, s, a, i) {
3339
3340
  );
3340
3341
  }
3341
3342
  function Xn(t, e, n, r, o) {
3342
- const s = it(e, ct), a = so.getCompiledRuleId(n, r, o.repository);
3343
+ const s = lt(e, ht), a = so.getCompiledRuleId(n, r, o.repository);
3343
3344
  for (const i of s)
3344
3345
  t.push({
3345
3346
  debugSelector: e,
@@ -3349,18 +3350,18 @@ function Xn(t, e, n, r, o) {
3349
3350
  priority: i.priority
3350
3351
  });
3351
3352
  }
3352
- function ct(t, e) {
3353
+ function ht(t, e) {
3353
3354
  if (e.length < t.length)
3354
3355
  return !1;
3355
3356
  let n = 0;
3356
3357
  return t.every((r) => {
3357
3358
  for (let o = n; o < e.length; o++)
3358
- if (za(e[o], r))
3359
+ if (Ha(e[o], r))
3359
3360
  return n = o + 1, !0;
3360
3361
  return !1;
3361
3362
  });
3362
3363
  }
3363
- function za(t, e) {
3364
+ function Ha(t, e) {
3364
3365
  if (!t)
3365
3366
  return !1;
3366
3367
  if (t === e)
@@ -3368,14 +3369,14 @@ function za(t, e) {
3368
3369
  const n = e.length;
3369
3370
  return t.length > n && t.substr(0, n) === e && t[n] === ".";
3370
3371
  }
3371
- var Ha = class {
3372
+ var Wa = class {
3372
3373
  constructor(t, e, n, r, o, s, a, i) {
3373
- if (this._rootScopeName = t, this.balancedBracketSelectors = s, this._onigLib = i, this._basicScopeAttributesProvider = new Ta(
3374
+ if (this._rootScopeName = t, this.balancedBracketSelectors = s, this._onigLib = i, this._basicScopeAttributesProvider = new Ma(
3374
3375
  n,
3375
3376
  r
3376
3377
  ), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = a, this._grammar = Kn(e, null), this._injections = null, this._tokenTypeMatchers = [], o)
3377
3378
  for (const l of Object.keys(o)) {
3378
- const u = it(l, ct);
3379
+ const u = lt(l, ht);
3379
3380
  for (const c of u)
3380
3381
  this._tokenTypeMatchers.push({
3381
3382
  matcher: c.matcher,
@@ -3522,7 +3523,7 @@ var Ha = class {
3522
3523
  o = !1, e.reset();
3523
3524
  t = t + `
3524
3525
  `;
3525
- const s = this.createOnigString(t), a = s.content.length, i = new qa(
3526
+ const s = this.createOnigString(t), a = s.content.length, i = new Va(
3526
3527
  n,
3527
3528
  t,
3528
3529
  this._tokenTypeMatchers,
@@ -3546,7 +3547,7 @@ var Ha = class {
3546
3547
  }
3547
3548
  };
3548
3549
  function Kn(t, e) {
3549
- return t = ua(t), t.repository = t.repository || {}, t.repository.$self = {
3550
+ return t = ca(t), t.repository = t.repository || {}, t.repository.$self = {
3550
3551
  $vscodeTextmateLocation: t.$vscodeTextmateLocation,
3551
3552
  patterns: t.patterns,
3552
3553
  name: t.scopeName
@@ -3567,14 +3568,14 @@ var Fe = class ne {
3567
3568
  static fromExtension(e, n) {
3568
3569
  let r = e, o = e?.scopePath ?? null;
3569
3570
  for (const s of n)
3570
- o = It.push(o, s.scopeNames), r = new ne(r, o, s.encodedTokenAttributes);
3571
+ o = Nt.push(o, s.scopeNames), r = new ne(r, o, s.encodedTokenAttributes);
3571
3572
  return r;
3572
3573
  }
3573
3574
  static createRoot(e, n) {
3574
- return new ne(null, new It(null, e), n);
3575
+ return new ne(null, new Nt(null, e), n);
3575
3576
  }
3576
3577
  static createRootAndLookUpScopeName(e, n, r) {
3577
- const o = r.getMetadataForScope(e), s = new It(null, e), a = r.themeProvider.themeMatch(s), i = ne.mergeAttributes(
3578
+ const o = r.getMetadataForScope(e), s = new Nt(null, e), a = r.themeProvider.themeMatch(s), i = ne.mergeAttributes(
3578
3579
  n,
3579
3580
  o,
3580
3581
  a
@@ -3803,15 +3804,15 @@ var Fe = class ne {
3803
3804
  Fe.fromExtension(r, n.contentNameScopesList)
3804
3805
  );
3805
3806
  }
3806
- }, Wa = class {
3807
+ }, qa = class {
3807
3808
  balancedBracketScopes;
3808
3809
  unbalancedBracketScopes;
3809
3810
  allowAny = !1;
3810
3811
  constructor(t, e) {
3811
3812
  this.balancedBracketScopes = t.flatMap(
3812
- (n) => n === "*" ? (this.allowAny = !0, []) : it(n, ct).map((r) => r.matcher)
3813
+ (n) => n === "*" ? (this.allowAny = !0, []) : lt(n, ht).map((r) => r.matcher)
3813
3814
  ), this.unbalancedBracketScopes = e.flatMap(
3814
- (n) => it(n, ct).map((r) => r.matcher)
3815
+ (n) => lt(n, ht).map((r) => r.matcher)
3815
3816
  );
3816
3817
  }
3817
3818
  get matchesAlways() {
@@ -3829,7 +3830,7 @@ var Fe = class ne {
3829
3830
  return !0;
3830
3831
  return this.allowAny;
3831
3832
  }
3832
- }, qa = class {
3833
+ }, Va = class {
3833
3834
  constructor(t, e, n, r) {
3834
3835
  this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
3835
3836
  }
@@ -3903,7 +3904,7 @@ var Fe = class ne {
3903
3904
  n[r] = this._binaryTokens[r];
3904
3905
  return n;
3905
3906
  }
3906
- }, Va = class {
3907
+ }, Xa = class {
3907
3908
  constructor(t, e) {
3908
3909
  this._onigLib = e, this._theme = t;
3909
3910
  }
@@ -3959,7 +3960,7 @@ var Fe = class ne {
3959
3960
  let s = this._rawGrammars.get(t);
3960
3961
  if (!s)
3961
3962
  return null;
3962
- this._grammars.set(t, Ua(
3963
+ this._grammars.set(t, za(
3963
3964
  t,
3964
3965
  s,
3965
3966
  e,
@@ -3972,13 +3973,13 @@ var Fe = class ne {
3972
3973
  }
3973
3974
  return this._grammars.get(t);
3974
3975
  }
3975
- }, Xa = class {
3976
+ }, Ka = class {
3976
3977
  _options;
3977
3978
  _syncRegistry;
3978
3979
  _ensureGrammarCache;
3979
3980
  constructor(e) {
3980
- this._options = e, this._syncRegistry = new Va(
3981
- at.createFromRawTheme(e.theme, e.colorMap),
3981
+ this._options = e, this._syncRegistry = new Xa(
3982
+ it.createFromRawTheme(e.theme, e.colorMap),
3982
3983
  e.onigLib
3983
3984
  ), this._ensureGrammarCache = /* @__PURE__ */ new Map();
3984
3985
  }
@@ -3989,7 +3990,7 @@ var Fe = class ne {
3989
3990
  * Change the theme. Once called, no previous `ruleStack` should be used anymore.
3990
3991
  */
3991
3992
  setTheme(e, n) {
3992
- this._syncRegistry.setTheme(at.createFromRawTheme(e, n));
3993
+ this._syncRegistry.setTheme(it.createFromRawTheme(e, n));
3993
3994
  }
3994
3995
  /**
3995
3996
  * Returns a lookup array for color ids.
@@ -4014,7 +4015,7 @@ var Fe = class ne {
4014
4015
  n,
4015
4016
  r.embeddedLanguages,
4016
4017
  r.tokenTypes,
4017
- new Wa(
4018
+ new qa(
4018
4019
  r.balancedBracketSelectors || [],
4019
4020
  r.unbalancedBracketSelectors || []
4020
4021
  )
@@ -4027,7 +4028,7 @@ var Fe = class ne {
4027
4028
  return this._loadGrammar(e, 0, null, null, null);
4028
4029
  }
4029
4030
  _loadGrammar(e, n, r, o, s) {
4030
- const a = new ka(this._syncRegistry, e);
4031
+ const a = new va(this._syncRegistry, e);
4031
4032
  for (; a.Q.length > 0; )
4032
4033
  a.Q.map((i) => this._loadSingleGrammar(i.scopeName)), a.processQueue();
4033
4034
  return this._grammarForScopeName(
@@ -4119,10 +4120,10 @@ q.prototype.overloadedBoolean = !1;
4119
4120
  q.prototype.property = "";
4120
4121
  q.prototype.spaceSeparated = !1;
4121
4122
  q.prototype.space = void 0;
4122
- let Ka = 0;
4123
+ let Ya = 0;
4123
4124
  const E = be(), T = be(), en = be(), w = be(), N = be(), Ee = be(), X = be();
4124
4125
  function be() {
4125
- return 2 ** ++Ka;
4126
+ return 2 ** ++Ya;
4126
4127
  }
4127
4128
  const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4128
4129
  __proto__: null,
@@ -4133,7 +4134,7 @@ const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4133
4134
  number: w,
4134
4135
  overloadedBoolean: en,
4135
4136
  spaceSeparated: N
4136
- }, Symbol.toStringTag, { value: "Module" })), Pt = (
4137
+ }, Symbol.toStringTag, { value: "Module" })), Lt = (
4137
4138
  /** @type {ReadonlyArray<keyof typeof types>} */
4138
4139
  Object.keys(tn)
4139
4140
  );
@@ -4154,9 +4155,9 @@ class yn extends q {
4154
4155
  constructor(e, n, r, o) {
4155
4156
  let s = -1;
4156
4157
  if (super(e, n), Yn(this, "space", o), typeof r == "number")
4157
- for (; ++s < Pt.length; ) {
4158
- const a = Pt[s];
4159
- Yn(this, Pt[s], (r & tn[a]) === tn[a]);
4158
+ for (; ++s < Lt.length; ) {
4159
+ const a = Lt[s];
4160
+ Yn(this, Lt[s], (r & tn[a]) === tn[a]);
4160
4161
  }
4161
4162
  }
4162
4163
  }
@@ -4239,7 +4240,7 @@ function ho(t, e) {
4239
4240
  function po(t, e) {
4240
4241
  return ho(t, e.toLowerCase());
4241
4242
  }
4242
- const Ya = Ne({
4243
+ const Ja = Ne({
4243
4244
  attributes: {
4244
4245
  acceptcharset: "accept-charset",
4245
4246
  classname: "class",
@@ -4600,7 +4601,7 @@ const Ya = Ne({
4600
4601
  },
4601
4602
  space: "html",
4602
4603
  transform: po
4603
- }), Ja = Ne({
4604
+ }), Za = Ne({
4604
4605
  attributes: {
4605
4606
  accentHeight: "accent-height",
4606
4607
  alignmentBaseline: "alignment-baseline",
@@ -5184,20 +5185,20 @@ const Ya = Ne({
5184
5185
  transform(t, e) {
5185
5186
  return "xml:" + e.slice(3).toLowerCase();
5186
5187
  }
5187
- }), Za = /[A-Z]/g, Jn = /-[a-z]/g, Qa = /^data[-\w.:]+$/i;
5188
- function ei(t, e) {
5188
+ }), Qa = /[A-Z]/g, Jn = /-[a-z]/g, ei = /^data[-\w.:]+$/i;
5189
+ function ti(t, e) {
5189
5190
  const n = Qt(e);
5190
5191
  let r = e, o = q;
5191
5192
  if (n in t.normal)
5192
5193
  return t.property[t.normal[n]];
5193
- if (n.length > 4 && n.slice(0, 4) === "data" && Qa.test(e)) {
5194
+ if (n.length > 4 && n.slice(0, 4) === "data" && ei.test(e)) {
5194
5195
  if (e.charAt(4) === "-") {
5195
- const s = e.slice(5).replace(Jn, ni);
5196
+ const s = e.slice(5).replace(Jn, ri);
5196
5197
  r = "data" + s.charAt(0).toUpperCase() + s.slice(1);
5197
5198
  } else {
5198
5199
  const s = e.slice(4);
5199
5200
  if (!Jn.test(s)) {
5200
- let a = s.replace(Za, ti);
5201
+ let a = s.replace(Qa, ni);
5201
5202
  a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
5202
5203
  }
5203
5204
  }
@@ -5205,23 +5206,23 @@ function ei(t, e) {
5205
5206
  }
5206
5207
  return new o(r, e);
5207
5208
  }
5208
- function ti(t) {
5209
+ function ni(t) {
5209
5210
  return "-" + t.toLowerCase();
5210
5211
  }
5211
- function ni(t) {
5212
+ function ri(t) {
5212
5213
  return t.charAt(1).toUpperCase();
5213
5214
  }
5214
- const ri = uo([co, Ya, fo, go, mo], "html"), yo = uo([co, Ja, fo, go, mo], "svg"), oi = /["&'<>`]/g, si = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, ai = (
5215
+ const oi = uo([co, Ja, fo, go, mo], "html"), yo = uo([co, Za, fo, go, mo], "svg"), si = /["&'<>`]/g, ai = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, ii = (
5215
5216
  // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
5216
5217
  /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
5217
- ), ii = /[|\\{}()[\]^$+*?.]/g, Zn = /* @__PURE__ */ new WeakMap();
5218
- function li(t, e) {
5218
+ ), li = /[|\\{}()[\]^$+*?.]/g, Zn = /* @__PURE__ */ new WeakMap();
5219
+ function ui(t, e) {
5219
5220
  if (t = t.replace(
5220
- e.subset ? ui(e.subset) : oi,
5221
+ e.subset ? ci(e.subset) : si,
5221
5222
  r
5222
5223
  ), e.subset || e.escapeOnly)
5223
5224
  return t;
5224
- return t.replace(si, n).replace(ai, r);
5225
+ return t.replace(ai, n).replace(ii, r);
5225
5226
  function n(o, s, a) {
5226
5227
  return e.format(
5227
5228
  (o.charCodeAt(0) - 55296) * 1024 + o.charCodeAt(1) - 56320 + 65536,
@@ -5237,28 +5238,28 @@ function li(t, e) {
5237
5238
  );
5238
5239
  }
5239
5240
  }
5240
- function ui(t) {
5241
+ function ci(t) {
5241
5242
  let e = Zn.get(t);
5242
- return e || (e = ci(t), Zn.set(t, e)), e;
5243
+ return e || (e = hi(t), Zn.set(t, e)), e;
5243
5244
  }
5244
- function ci(t) {
5245
+ function hi(t) {
5245
5246
  const e = [];
5246
5247
  let n = -1;
5247
5248
  for (; ++n < t.length; )
5248
- e.push(t[n].replace(ii, "\\$&"));
5249
+ e.push(t[n].replace(li, "\\$&"));
5249
5250
  return new RegExp("(?:" + e.join("|") + ")", "g");
5250
5251
  }
5251
- const hi = /[\dA-Fa-f]/;
5252
- function pi(t, e, n) {
5252
+ const pi = /[\dA-Fa-f]/;
5253
+ function fi(t, e, n) {
5253
5254
  const r = "&#x" + t.toString(16).toUpperCase();
5254
- return n && e && !hi.test(String.fromCharCode(e)) ? r : r + ";";
5255
+ return n && e && !pi.test(String.fromCharCode(e)) ? r : r + ";";
5255
5256
  }
5256
- const fi = /\d/;
5257
- function di(t, e, n) {
5257
+ const di = /\d/;
5258
+ function gi(t, e, n) {
5258
5259
  const r = "&#" + String(t);
5259
- return n && e && !fi.test(String.fromCharCode(e)) ? r : r + ";";
5260
+ return n && e && !di.test(String.fromCharCode(e)) ? r : r + ";";
5260
5261
  }
5261
- const gi = [
5262
+ const mi = [
5262
5263
  "AElig",
5263
5264
  "AMP",
5264
5265
  "Aacute",
@@ -5365,7 +5366,7 @@ const gi = [
5365
5366
  "yacute",
5366
5367
  "yen",
5367
5368
  "yuml"
5368
- ], Lt = {
5369
+ ], $t = {
5369
5370
  nbsp: " ",
5370
5371
  iexcl: "¡",
5371
5372
  cent: "¢",
@@ -5618,7 +5619,7 @@ const gi = [
5618
5619
  lsaquo: "‹",
5619
5620
  rsaquo: "›",
5620
5621
  euro: "€"
5621
- }, mi = [
5622
+ }, yi = [
5622
5623
  "cent",
5623
5624
  "copy",
5624
5625
  "divide",
@@ -5629,119 +5630,119 @@ const gi = [
5629
5630
  "times"
5630
5631
  ], bo = {}.hasOwnProperty, nn = {};
5631
5632
  let Ze;
5632
- for (Ze in Lt)
5633
- bo.call(Lt, Ze) && (nn[Lt[Ze]] = Ze);
5634
- const yi = /[^\dA-Za-z]/;
5635
- function bi(t, e, n, r) {
5633
+ for (Ze in $t)
5634
+ bo.call($t, Ze) && (nn[$t[Ze]] = Ze);
5635
+ const bi = /[^\dA-Za-z]/;
5636
+ function wi(t, e, n, r) {
5636
5637
  const o = String.fromCharCode(t);
5637
5638
  if (bo.call(nn, o)) {
5638
5639
  const s = nn[o], a = "&" + s;
5639
- return n && gi.includes(s) && !mi.includes(s) && (!r || e && e !== 61 && yi.test(String.fromCharCode(e))) ? a : a + ";";
5640
+ return n && mi.includes(s) && !yi.includes(s) && (!r || e && e !== 61 && bi.test(String.fromCharCode(e))) ? a : a + ";";
5640
5641
  }
5641
5642
  return "";
5642
5643
  }
5643
- function wi(t, e, n) {
5644
- let r = pi(t, e, n.omitOptionalSemicolons), o;
5645
- if ((n.useNamedReferences || n.useShortestReferences) && (o = bi(
5644
+ function Ci(t, e, n) {
5645
+ let r = fi(t, e, n.omitOptionalSemicolons), o;
5646
+ if ((n.useNamedReferences || n.useShortestReferences) && (o = wi(
5646
5647
  t,
5647
5648
  e,
5648
5649
  n.omitOptionalSemicolons,
5649
5650
  n.attribute
5650
5651
  )), (n.useShortestReferences || !o) && n.useShortestReferences) {
5651
- const s = di(t, e, n.omitOptionalSemicolons);
5652
+ const s = gi(t, e, n.omitOptionalSemicolons);
5652
5653
  s.length < r.length && (r = s);
5653
5654
  }
5654
5655
  return o && (!n.useShortestReferences || o.length < r.length) ? o : r;
5655
5656
  }
5656
5657
  function Ae(t, e) {
5657
- return li(t, Object.assign({ format: wi }, e));
5658
+ return ui(t, Object.assign({ format: Ci }, e));
5658
5659
  }
5659
- const Ci = /^>|^->|<!--|-->|--!>|<!-$/g, _i = [">"], Si = ["<", ">"];
5660
- function ki(t, e, n, r) {
5660
+ const _i = /^>|^->|<!--|-->|--!>|<!-$/g, Si = [">"], ki = ["<", ">"];
5661
+ function vi(t, e, n, r) {
5661
5662
  return r.settings.bogusComments ? "<?" + Ae(
5662
5663
  t.value,
5663
5664
  Object.assign({}, r.settings.characterReferences, {
5664
- subset: _i
5665
+ subset: Si
5665
5666
  })
5666
- ) + ">" : "<!--" + t.value.replace(Ci, o) + "-->";
5667
+ ) + ">" : "<!--" + t.value.replace(_i, o) + "-->";
5667
5668
  function o(s) {
5668
5669
  return Ae(
5669
5670
  s,
5670
5671
  Object.assign({}, r.settings.characterReferences, {
5671
- subset: Si
5672
+ subset: ki
5672
5673
  })
5673
5674
  );
5674
5675
  }
5675
5676
  }
5676
- function vi(t, e, n, r) {
5677
+ function xi(t, e, n, r) {
5677
5678
  return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
5678
5679
  }
5679
- const O = Co(1), wo = Co(-1), xi = [];
5680
+ const O = Co(1), wo = Co(-1), Ei = [];
5680
5681
  function Co(t) {
5681
5682
  return e;
5682
5683
  function e(n, r, o) {
5683
- const s = n ? n.children : xi;
5684
+ const s = n ? n.children : Ei;
5684
5685
  let a = (r || 0) + t, i = s[a];
5685
5686
  if (!o)
5686
- for (; i && wt(i); )
5687
+ for (; i && Ct(i); )
5687
5688
  a += t, i = s[a];
5688
5689
  return i;
5689
5690
  }
5690
5691
  }
5691
- const Ei = {}.hasOwnProperty;
5692
+ const Ai = {}.hasOwnProperty;
5692
5693
  function _o(t) {
5693
5694
  return e;
5694
5695
  function e(n, r, o) {
5695
- return Ei.call(t, n.tagName) && t[n.tagName](n, r, o);
5696
+ return Ai.call(t, n.tagName) && t[n.tagName](n, r, o);
5696
5697
  }
5697
5698
  }
5698
5699
  const bn = _o({
5699
- body: Ri,
5700
- caption: $t,
5701
- colgroup: $t,
5702
- dd: Li,
5703
- dt: Pi,
5704
- head: $t,
5705
- html: Ai,
5706
- li: Ni,
5707
- optgroup: $i,
5708
- option: Ti,
5709
- p: Ii,
5700
+ body: Ii,
5701
+ caption: Tt,
5702
+ colgroup: Tt,
5703
+ dd: $i,
5704
+ dt: Li,
5705
+ head: Tt,
5706
+ html: Ri,
5707
+ li: Pi,
5708
+ optgroup: Ti,
5709
+ option: Mi,
5710
+ p: Ni,
5710
5711
  rp: Qn,
5711
5712
  rt: Qn,
5712
- tbody: Oi,
5713
+ tbody: Di,
5713
5714
  td: er,
5714
- tfoot: Di,
5715
+ tfoot: Gi,
5715
5716
  th: er,
5716
- thead: Mi,
5717
- tr: Gi
5717
+ thead: Oi,
5718
+ tr: Fi
5718
5719
  });
5719
- function $t(t, e, n) {
5720
+ function Tt(t, e, n) {
5720
5721
  const r = O(n, e, !0);
5721
- return !r || r.type !== "comment" && !(r.type === "text" && wt(r.value.charAt(0)));
5722
+ return !r || r.type !== "comment" && !(r.type === "text" && Ct(r.value.charAt(0)));
5722
5723
  }
5723
- function Ai(t, e, n) {
5724
+ function Ri(t, e, n) {
5724
5725
  const r = O(n, e);
5725
5726
  return !r || r.type !== "comment";
5726
5727
  }
5727
- function Ri(t, e, n) {
5728
+ function Ii(t, e, n) {
5728
5729
  const r = O(n, e);
5729
5730
  return !r || r.type !== "comment";
5730
5731
  }
5731
- function Ii(t, e, n) {
5732
+ function Ni(t, e, n) {
5732
5733
  const r = O(n, e);
5733
5734
  return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
5734
5735
  !(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
5735
5736
  }
5736
- function Ni(t, e, n) {
5737
+ function Pi(t, e, n) {
5737
5738
  const r = O(n, e);
5738
5739
  return !r || r.type === "element" && r.tagName === "li";
5739
5740
  }
5740
- function Pi(t, e, n) {
5741
+ function Li(t, e, n) {
5741
5742
  const r = O(n, e);
5742
5743
  return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
5743
5744
  }
5744
- function Li(t, e, n) {
5745
+ function $i(t, e, n) {
5745
5746
  const r = O(n, e);
5746
5747
  return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
5747
5748
  }
@@ -5749,26 +5750,26 @@ function Qn(t, e, n) {
5749
5750
  const r = O(n, e);
5750
5751
  return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
5751
5752
  }
5752
- function $i(t, e, n) {
5753
+ function Ti(t, e, n) {
5753
5754
  const r = O(n, e);
5754
5755
  return !r || r.type === "element" && r.tagName === "optgroup";
5755
5756
  }
5756
- function Ti(t, e, n) {
5757
+ function Mi(t, e, n) {
5757
5758
  const r = O(n, e);
5758
5759
  return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
5759
5760
  }
5760
- function Mi(t, e, n) {
5761
+ function Oi(t, e, n) {
5761
5762
  const r = O(n, e);
5762
5763
  return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
5763
5764
  }
5764
- function Oi(t, e, n) {
5765
+ function Di(t, e, n) {
5765
5766
  const r = O(n, e);
5766
5767
  return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
5767
5768
  }
5768
- function Di(t, e, n) {
5769
+ function Gi(t, e, n) {
5769
5770
  return !O(n, e);
5770
5771
  }
5771
- function Gi(t, e, n) {
5772
+ function Fi(t, e, n) {
5772
5773
  const r = O(n, e);
5773
5774
  return !r || r.type === "element" && r.tagName === "tr";
5774
5775
  }
@@ -5776,18 +5777,18 @@ function er(t, e, n) {
5776
5777
  const r = O(n, e);
5777
5778
  return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
5778
5779
  }
5779
- const Fi = _o({
5780
- body: Ui,
5781
- colgroup: zi,
5782
- head: ji,
5783
- html: Bi,
5784
- tbody: Hi
5780
+ const Bi = _o({
5781
+ body: zi,
5782
+ colgroup: Hi,
5783
+ head: Ui,
5784
+ html: ji,
5785
+ tbody: Wi
5785
5786
  });
5786
- function Bi(t) {
5787
+ function ji(t) {
5787
5788
  const e = O(t, -1);
5788
5789
  return !e || e.type !== "comment";
5789
5790
  }
5790
- function ji(t) {
5791
+ function Ui(t) {
5791
5792
  const e = /* @__PURE__ */ new Set();
5792
5793
  for (const r of t.children)
5793
5794
  if (r.type === "element" && (r.tagName === "base" || r.tagName === "title")) {
@@ -5797,15 +5798,15 @@ function ji(t) {
5797
5798
  const n = t.children[0];
5798
5799
  return !n || n.type === "element";
5799
5800
  }
5800
- function Ui(t) {
5801
+ function zi(t) {
5801
5802
  const e = O(t, -1, !0);
5802
- return !e || e.type !== "comment" && !(e.type === "text" && wt(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
5803
+ return !e || e.type !== "comment" && !(e.type === "text" && Ct(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
5803
5804
  }
5804
- function zi(t, e, n) {
5805
+ function Hi(t, e, n) {
5805
5806
  const r = wo(n, e), o = O(t, -1, !0);
5806
5807
  return n && r && r.type === "element" && r.tagName === "colgroup" && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
5807
5808
  }
5808
- function Hi(t, e, n) {
5809
+ function Wi(t, e, n) {
5809
5810
  const r = wo(n, e), o = O(t, -1);
5810
5811
  return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && bn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
5811
5812
  }
@@ -5839,24 +5840,24 @@ const Qe = {
5839
5840
  ['\0"&'.split(""), "\0\"&'`".split("")]
5840
5841
  ]
5841
5842
  };
5842
- function Wi(t, e, n, r) {
5843
+ function qi(t, e, n, r) {
5843
5844
  const o = r.schema, s = o.space === "svg" ? !1 : r.settings.omitOptionalTags;
5844
5845
  let a = o.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
5845
5846
  const i = [];
5846
5847
  let l;
5847
5848
  o.space === "html" && t.tagName === "svg" && (r.schema = yo);
5848
- const u = qi(r, t.properties), c = r.all(
5849
+ const u = Vi(r, t.properties), c = r.all(
5849
5850
  o.space === "html" && t.tagName === "template" ? t.content : t
5850
5851
  );
5851
- return r.schema = o, c && (a = !1), (u || !s || !Fi(t, e, n)) && (i.push("<", t.tagName, u ? " " + u : ""), a && (o.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && i.push(" "), i.push("/")), i.push(">")), i.push(c), !a && (!s || !bn(t, e, n)) && i.push("</" + t.tagName + ">"), i.join("");
5852
+ return r.schema = o, c && (a = !1), (u || !s || !Bi(t, e, n)) && (i.push("<", t.tagName, u ? " " + u : ""), a && (o.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && i.push(" "), i.push("/")), i.push(">")), i.push(c), !a && (!s || !bn(t, e, n)) && i.push("</" + t.tagName + ">"), i.join("");
5852
5853
  }
5853
- function qi(t, e) {
5854
+ function Vi(t, e) {
5854
5855
  const n = [];
5855
5856
  let r = -1, o;
5856
5857
  if (e) {
5857
5858
  for (o in e)
5858
5859
  if (e[o] !== null && e[o] !== void 0) {
5859
- const s = Vi(t, o, e[o]);
5860
+ const s = Xi(t, o, e[o]);
5860
5861
  s && n.push(s);
5861
5862
  }
5862
5863
  }
@@ -5866,8 +5867,8 @@ function qi(t, e) {
5866
5867
  }
5867
5868
  return n.join("");
5868
5869
  }
5869
- function Vi(t, e, n) {
5870
- const r = ei(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, s = t.settings.allowDangerousCharacters ? 0 : 1;
5870
+ function Xi(t, e, n) {
5871
+ const r = ti(t.schema, e), o = t.settings.allowParseErrors && t.schema.space === "html" ? 0 : 1, s = t.settings.allowDangerousCharacters ? 0 : 1;
5871
5872
  let a = t.quote, i;
5872
5873
  if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n))
5873
5874
  return "";
@@ -5895,44 +5896,44 @@ function Vi(t, e, n) {
5895
5896
  })
5896
5897
  ) + a), l + (i && "=" + i));
5897
5898
  }
5898
- const Xi = ["<", "&"];
5899
+ const Ki = ["<", "&"];
5899
5900
  function So(t, e, n, r) {
5900
5901
  return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? t.value : Ae(
5901
5902
  t.value,
5902
5903
  Object.assign({}, r.settings.characterReferences, {
5903
- subset: Xi
5904
+ subset: Ki
5904
5905
  })
5905
5906
  );
5906
5907
  }
5907
- function Ki(t, e, n, r) {
5908
+ function Yi(t, e, n, r) {
5908
5909
  return r.settings.allowDangerousHtml ? t.value : So(t, e, n, r);
5909
5910
  }
5910
- function Yi(t, e, n, r) {
5911
+ function Ji(t, e, n, r) {
5911
5912
  return r.all(t);
5912
5913
  }
5913
- const Ji = ia("type", {
5914
- invalid: Zi,
5915
- unknown: Qi,
5916
- handlers: { comment: ki, doctype: vi, element: Wi, raw: Ki, root: Yi, text: So }
5914
+ const Zi = la("type", {
5915
+ invalid: Qi,
5916
+ unknown: el,
5917
+ handlers: { comment: vi, doctype: xi, element: qi, raw: Yi, root: Ji, text: So }
5917
5918
  });
5918
- function Zi(t) {
5919
+ function Qi(t) {
5919
5920
  throw new Error("Expected node, not `" + t + "`");
5920
5921
  }
5921
- function Qi(t) {
5922
+ function el(t) {
5922
5923
  const e = (
5923
5924
  /** @type {Nodes} */
5924
5925
  t
5925
5926
  );
5926
5927
  throw new Error("Cannot compile unknown node `" + e.type + "`");
5927
5928
  }
5928
- const el = {}, tl = {}, nl = [];
5929
- function rl(t, e) {
5930
- const n = e || el, r = n.quote || '"', o = r === '"' ? "'" : '"';
5929
+ const tl = {}, nl = {}, rl = [];
5930
+ function ol(t, e) {
5931
+ const n = e || tl, r = n.quote || '"', o = r === '"' ? "'" : '"';
5931
5932
  if (r !== '"' && r !== "'")
5932
5933
  throw new Error("Invalid quote `" + r + "`, expected `'` or `\"`");
5933
5934
  return {
5934
- one: ol,
5935
- all: sl,
5935
+ one: sl,
5936
+ all: al,
5936
5937
  settings: {
5937
5938
  omitOptionalTags: n.omitOptionalTags || !1,
5938
5939
  allowParseErrors: n.allowParseErrors || !1,
@@ -5947,12 +5948,12 @@ function rl(t, e) {
5947
5948
  tightSelfClosing: n.tightSelfClosing || !1,
5948
5949
  collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
5949
5950
  allowDangerousHtml: n.allowDangerousHtml || !1,
5950
- voids: n.voids || la,
5951
- characterReferences: n.characterReferences || tl,
5951
+ voids: n.voids || ua,
5952
+ characterReferences: n.characterReferences || nl,
5952
5953
  closeSelfClosing: n.closeSelfClosing || !1,
5953
5954
  closeEmptyElements: n.closeEmptyElements || !1
5954
5955
  },
5955
- schema: n.space === "svg" ? yo : ri,
5956
+ schema: n.space === "svg" ? yo : oi,
5956
5957
  quote: r,
5957
5958
  alternative: o
5958
5959
  }.one(
@@ -5961,17 +5962,17 @@ function rl(t, e) {
5961
5962
  void 0
5962
5963
  );
5963
5964
  }
5964
- function ol(t, e, n) {
5965
- return Ji(t, e, n, this);
5965
+ function sl(t, e, n) {
5966
+ return Zi(t, e, n, this);
5966
5967
  }
5967
- function sl(t) {
5968
- const e = [], n = t && t.children || nl;
5968
+ function al(t) {
5969
+ const e = [], n = t && t.children || rl;
5969
5970
  let r = -1;
5970
5971
  for (; ++r < n.length; )
5971
5972
  e[r] = this.one(n[r], r, t);
5972
5973
  return e.join("");
5973
5974
  }
5974
- function ht(t, e) {
5975
+ function pt(t, e) {
5975
5976
  const n = typeof t == "string" ? {} : { ...t.colorReplacements }, r = typeof t == "string" ? t : t.name;
5976
5977
  for (const [o, s] of Object.entries(e?.colorReplacements || {}))
5977
5978
  typeof s == "string" ? n[o] = s : o === r && Object.assign(n, s);
@@ -5980,7 +5981,7 @@ function ht(t, e) {
5980
5981
  function ue(t, e) {
5981
5982
  return t && (e?.[t?.toLowerCase()] || t);
5982
5983
  }
5983
- function al(t) {
5984
+ function il(t) {
5984
5985
  return Array.isArray(t) ? t : [t];
5985
5986
  }
5986
5987
  async function ko(t) {
@@ -5995,7 +5996,7 @@ function vo(t) {
5995
5996
  function Cn(t) {
5996
5997
  return t === "none";
5997
5998
  }
5998
- function il(t) {
5999
+ function ll(t) {
5999
6000
  return Cn(t);
6000
6001
  }
6001
6002
  function xo(t, e) {
@@ -6007,7 +6008,7 @@ function xo(t, e) {
6007
6008
  r && !t.properties.class.includes(r) && t.properties.class.push(r);
6008
6009
  return t;
6009
6010
  }
6010
- function _t(t, e = !1) {
6011
+ function St(t, e = !1) {
6011
6012
  const n = t.split(/(\r?\n)/g);
6012
6013
  let r = 0;
6013
6014
  const o = [];
@@ -6017,8 +6018,8 @@ function _t(t, e = !1) {
6017
6018
  }
6018
6019
  return o;
6019
6020
  }
6020
- function ll(t) {
6021
- const e = _t(t, !0).map(([o]) => o);
6021
+ function ul(t) {
6022
+ const e = St(t, !0).map(([o]) => o);
6022
6023
  function n(o) {
6023
6024
  if (o === t.length)
6024
6025
  return {
@@ -6046,7 +6047,7 @@ function ll(t) {
6046
6047
  };
6047
6048
  }
6048
6049
  const _n = "light-dark()";
6049
- function ul(t, e) {
6050
+ function cl(t, e) {
6050
6051
  let n = 0;
6051
6052
  const r = [];
6052
6053
  for (const o of e)
@@ -6061,19 +6062,19 @@ function ul(t, e) {
6061
6062
  offset: t.offset + n
6062
6063
  }), r;
6063
6064
  }
6064
- function cl(t, e) {
6065
+ function hl(t, e) {
6065
6066
  const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
6066
6067
  return n.length ? t.map((r) => r.flatMap((o) => {
6067
6068
  const s = n.filter((a) => o.offset < a && a < o.offset + o.content.length).map((a) => a - o.offset).sort((a, i) => a - i);
6068
- return s.length ? ul(o, s) : o;
6069
+ return s.length ? cl(o, s) : o;
6069
6070
  })) : t;
6070
6071
  }
6071
- function hl(t, e, n, r) {
6072
+ function pl(t, e, n, r) {
6072
6073
  const o = {
6073
6074
  content: t.content,
6074
6075
  explanation: t.explanation,
6075
6076
  offset: t.offset
6076
- }, s = e.map((l) => pt(t.variants[l])), a = new Set(s.flatMap((l) => Object.keys(l))), i = {};
6077
+ }, s = e.map((l) => ft(t.variants[l])), a = new Set(s.flatMap((l) => Object.keys(l))), i = {};
6077
6078
  return s.forEach((l, u) => {
6078
6079
  for (const c of a) {
6079
6080
  const h = l[c] || "inherit";
@@ -6095,7 +6096,7 @@ function hl(t, e, n, r) {
6095
6096
  }
6096
6097
  }), o.htmlStyle = i, o;
6097
6098
  }
6098
- function pt(t) {
6099
+ function ft(t) {
6099
6100
  const e = {};
6100
6101
  if (t.color && (e.color = t.color), t.bgColor && (e["background-color"] = t.bgColor), t.fontStyle) {
6101
6102
  t.fontStyle & z.Italic && (e["font-style"] = "italic"), t.fontStyle & z.Bold && (e["font-weight"] = "bold");
@@ -6108,7 +6109,7 @@ function rn(t) {
6108
6109
  return typeof t == "string" ? t : Object.entries(t).map(([e, n]) => `${e}:${n}`).join(";");
6109
6110
  }
6110
6111
  const Eo = /* @__PURE__ */ new WeakMap();
6111
- function St(t, e) {
6112
+ function kt(t, e) {
6112
6113
  Eo.set(t, e);
6113
6114
  }
6114
6115
  function We(t) {
@@ -6134,7 +6135,7 @@ class Pe {
6134
6135
  */
6135
6136
  static initial(e, n) {
6136
6137
  return new Pe(
6137
- Object.fromEntries(al(n).map((r) => [r, Zt])),
6138
+ Object.fromEntries(il(n).map((r) => [r, Zt])),
6138
6139
  e
6139
6140
  );
6140
6141
  }
@@ -6155,7 +6156,7 @@ class Pe {
6155
6156
  return this._stacks[e];
6156
6157
  }
6157
6158
  getScopes(e = this.theme) {
6158
- return pl(this._stacks[e]);
6159
+ return fl(this._stacks[e]);
6159
6160
  }
6160
6161
  toJSON() {
6161
6162
  return {
@@ -6166,7 +6167,7 @@ class Pe {
6166
6167
  };
6167
6168
  }
6168
6169
  }
6169
- function pl(t) {
6170
+ function fl(t) {
6170
6171
  const e = [], n = /* @__PURE__ */ new Set();
6171
6172
  function r(o) {
6172
6173
  if (n.has(o))
@@ -6177,12 +6178,12 @@ function pl(t) {
6177
6178
  }
6178
6179
  return r(t), e;
6179
6180
  }
6180
- function fl(t, e) {
6181
+ function dl(t, e) {
6181
6182
  if (!(t instanceof Pe))
6182
6183
  throw new F("Invalid grammar state");
6183
6184
  return t.getInternalStack(e);
6184
6185
  }
6185
- function dl() {
6186
+ function gl() {
6186
6187
  const t = /* @__PURE__ */ new WeakMap();
6187
6188
  function e(n) {
6188
6189
  if (!t.has(n.meta)) {
@@ -6206,12 +6207,12 @@ function dl() {
6206
6207
  };
6207
6208
  }
6208
6209
  };
6209
- const o = ll(n.source), s = (n.options.decorations || []).map((a) => ({
6210
+ const o = ul(n.source), s = (n.options.decorations || []).map((a) => ({
6210
6211
  ...a,
6211
6212
  start: r(a.start),
6212
6213
  end: r(a.end)
6213
6214
  }));
6214
- gl(s), t.set(n.meta, {
6215
+ ml(s), t.set(n.meta, {
6215
6216
  decorations: s,
6216
6217
  converter: o,
6217
6218
  source: n.source
@@ -6225,7 +6226,7 @@ function dl() {
6225
6226
  if (!this.options.decorations?.length)
6226
6227
  return;
6227
6228
  const o = e(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]);
6228
- return cl(n, o);
6229
+ return hl(n, o);
6229
6230
  },
6230
6231
  code(n) {
6231
6232
  if (!this.options.decorations?.length)
@@ -6285,7 +6286,7 @@ function dl() {
6285
6286
  }
6286
6287
  };
6287
6288
  }
6288
- function gl(t) {
6289
+ function ml(t) {
6289
6290
  for (let e = 0; e < t.length; e++) {
6290
6291
  const n = t[e];
6291
6292
  if (n.start.offset > n.end.offset)
@@ -6303,13 +6304,13 @@ function gl(t) {
6303
6304
  function Ao(t) {
6304
6305
  return t.type === "text" ? t.value : t.type === "element" ? t.children.map(Ao).join("") : "";
6305
6306
  }
6306
- const ml = [
6307
- /* @__PURE__ */ dl()
6307
+ const yl = [
6308
+ /* @__PURE__ */ gl()
6308
6309
  ];
6309
- function ft(t) {
6310
+ function dt(t) {
6310
6311
  return [
6311
6312
  ...t.transformers || [],
6312
- ...ml
6313
+ ...yl
6313
6314
  ];
6314
6315
  }
6315
6316
  var de = [
@@ -6329,7 +6330,7 @@ var de = [
6329
6330
  "brightMagenta",
6330
6331
  "brightCyan",
6331
6332
  "brightWhite"
6332
- ], Tt = {
6333
+ ], Mt = {
6333
6334
  1: "bold",
6334
6335
  2: "dim",
6335
6336
  3: "italic",
@@ -6338,7 +6339,7 @@ var de = [
6338
6339
  8: "hidden",
6339
6340
  9: "strikethrough"
6340
6341
  };
6341
- function yl(t, e) {
6342
+ function bl(t, e) {
6342
6343
  const n = t.indexOf("\x1B", e);
6343
6344
  if (n !== -1 && t[n + 1] === "[") {
6344
6345
  const r = t.indexOf("m", n);
@@ -6367,7 +6368,7 @@ function tr(t) {
6367
6368
  return { type: "table", index: Number(n) };
6368
6369
  }
6369
6370
  }
6370
- function bl(t) {
6371
+ function wl(t) {
6371
6372
  const e = [];
6372
6373
  for (; t.length > 0; ) {
6373
6374
  const n = t.shift();
@@ -6378,12 +6379,12 @@ function bl(t) {
6378
6379
  if (r === 0)
6379
6380
  e.push({ type: "resetAll" });
6380
6381
  else if (r <= 9)
6381
- Tt[r] && e.push({
6382
+ Mt[r] && e.push({
6382
6383
  type: "setDecoration",
6383
- value: Tt[r]
6384
+ value: Mt[r]
6384
6385
  });
6385
6386
  else if (r <= 29) {
6386
- const o = Tt[r - 20];
6387
+ const o = Mt[r - 20];
6387
6388
  o && (e.push({
6388
6389
  type: "resetDecoration",
6389
6390
  value: o
@@ -6435,21 +6436,21 @@ function bl(t) {
6435
6436
  }
6436
6437
  return e;
6437
6438
  }
6438
- function wl() {
6439
+ function Cl() {
6439
6440
  let t = null, e = null, n = /* @__PURE__ */ new Set();
6440
6441
  return {
6441
6442
  parse(r) {
6442
6443
  const o = [];
6443
6444
  let s = 0;
6444
6445
  do {
6445
- const a = yl(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
6446
+ const a = bl(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
6446
6447
  if (i.length > 0 && o.push({
6447
6448
  value: i,
6448
6449
  foreground: t,
6449
6450
  background: e,
6450
6451
  decorations: new Set(n)
6451
6452
  }), a.sequence) {
6452
- const l = bl(a.sequence);
6453
+ const l = wl(a.sequence);
6453
6454
  for (const u of l)
6454
6455
  u.type === "resetAll" ? (t = null, e = null, n.clear()) : u.type === "resetForegroundColor" ? t = null : u.type === "resetBackgroundColor" ? e = null : u.type === "resetDecoration" && n.delete(u.value);
6455
6456
  for (const u of l)
@@ -6461,7 +6462,7 @@ function wl() {
6461
6462
  }
6462
6463
  };
6463
6464
  }
6464
- var Cl = {
6465
+ var _l = {
6465
6466
  black: "#000000",
6466
6467
  red: "#bb0000",
6467
6468
  green: "#00bb00",
@@ -6479,7 +6480,7 @@ var Cl = {
6479
6480
  brightCyan: "#55ffff",
6480
6481
  brightWhite: "#ffffff"
6481
6482
  };
6482
- function _l(t = Cl) {
6483
+ function Sl(t = _l) {
6483
6484
  function e(i) {
6484
6485
  return t[i];
6485
6486
  }
@@ -6520,19 +6521,19 @@ function _l(t = Cl) {
6520
6521
  value: a
6521
6522
  };
6522
6523
  }
6523
- function Sl(t, e, n) {
6524
- const r = ht(t, n), o = _t(e), s = _l(
6524
+ function kl(t, e, n) {
6525
+ const r = pt(t, n), o = St(e), s = Sl(
6525
6526
  Object.fromEntries(
6526
6527
  de.map((i) => [
6527
6528
  i,
6528
6529
  t.colors?.[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]
6529
6530
  ])
6530
6531
  )
6531
- ), a = wl();
6532
+ ), a = Cl();
6532
6533
  return o.map(
6533
6534
  (i) => a.parse(i[0]).map((l) => {
6534
6535
  let u, c;
6535
- l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u = kl(u));
6536
+ l.decorations.has("reverse") ? (u = l.background ? s.value(l.background) : t.bg, c = l.foreground ? s.value(l.foreground) : t.fg) : (u = l.foreground ? s.value(l.foreground) : t.fg, c = l.background ? s.value(l.background) : void 0), u = ue(u, r), c = ue(c, r), l.decorations.has("dim") && (u = vl(u));
6536
6537
  let h = z.None;
6537
6538
  return l.decorations.has("bold") && (h |= z.Bold), l.decorations.has("italic") && (h |= z.Italic), l.decorations.has("underline") && (h |= z.Underline), l.decorations.has("strikethrough") && (h |= z.Strikethrough), {
6538
6539
  content: l.value,
@@ -6545,7 +6546,7 @@ function Sl(t, e, n) {
6545
6546
  })
6546
6547
  );
6547
6548
  }
6548
- function kl(t) {
6549
+ function vl(t) {
6549
6550
  const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);
6550
6551
  if (e)
6551
6552
  if (e[3]) {
@@ -6561,10 +6562,10 @@ function Sn(t, e, n = {}) {
6561
6562
  theme: o = t.getLoadedThemes()[0]
6562
6563
  } = n;
6563
6564
  if (wn(r) || Cn(o))
6564
- return _t(e).map((l) => [{ content: l[0], offset: l[1] }]);
6565
+ return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
6565
6566
  const { theme: s, colorMap: a } = t.setTheme(o);
6566
6567
  if (r === "ansi")
6567
- return Sl(s, e, n);
6568
+ return kl(s, e, n);
6568
6569
  const i = t.getLanguage(r);
6569
6570
  if (n.grammarState) {
6570
6571
  if (n.grammarState.lang !== i.name)
@@ -6572,9 +6573,9 @@ function Sn(t, e, n = {}) {
6572
6573
  if (!n.grammarState.themes.includes(s.name))
6573
6574
  throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
6574
6575
  }
6575
- return xl(e, i, s, a, n);
6576
+ return El(e, i, s, a, n);
6576
6577
  }
6577
- function vl(...t) {
6578
+ function xl(...t) {
6578
6579
  if (t.length === 2)
6579
6580
  return We(t[1]);
6580
6581
  const [e, n, r = {}] = t, {
@@ -6587,25 +6588,25 @@ function vl(...t) {
6587
6588
  throw new F("ANSI language does not have grammar state");
6588
6589
  const { theme: a, colorMap: i } = e.setTheme(s), l = e.getLanguage(o);
6589
6590
  return new Pe(
6590
- dt(n, l, a, i, r).stateStack,
6591
+ gt(n, l, a, i, r).stateStack,
6591
6592
  l.name,
6592
6593
  a.name
6593
6594
  );
6594
6595
  }
6595
- function xl(t, e, n, r, o) {
6596
- const s = dt(t, e, n, r, o), a = new Pe(
6597
- dt(t, e, n, r, o).stateStack,
6596
+ function El(t, e, n, r, o) {
6597
+ const s = gt(t, e, n, r, o), a = new Pe(
6598
+ gt(t, e, n, r, o).stateStack,
6598
6599
  e.name,
6599
6600
  n.name
6600
6601
  );
6601
- return St(s.tokens, a), s.tokens;
6602
+ return kt(s.tokens, a), s.tokens;
6602
6603
  }
6603
- function dt(t, e, n, r, o) {
6604
- const s = ht(n, o), {
6604
+ function gt(t, e, n, r, o) {
6605
+ const s = pt(n, o), {
6605
6606
  tokenizeMaxLineLength: a = 0,
6606
6607
  tokenizeTimeLimit: i = 500
6607
- } = o, l = _t(t);
6608
- let u = o.grammarState ? fl(o.grammarState, n.name) ?? Zt : o.grammarContextCode != null ? dt(
6608
+ } = o, l = St(t);
6609
+ let u = o.grammarState ? dl(o.grammarState, n.name) ?? Zt : o.grammarContextCode != null ? gt(
6609
6610
  o.grammarContextCode,
6610
6611
  e,
6611
6612
  n,
@@ -6677,9 +6678,9 @@ function dt(t, e, n, r, o) {
6677
6678
  );
6678
6679
  R += G.length, ce.explanation.push({
6679
6680
  content: G,
6680
- scopes: o.includeExplanation === "scopeName" ? El(
6681
+ scopes: o.includeExplanation === "scopeName" ? Al(
6681
6682
  k.scopes
6682
- ) : Al(
6683
+ ) : Rl(
6683
6684
  te,
6684
6685
  k.scopes
6685
6686
  )
@@ -6695,16 +6696,16 @@ function dt(t, e, n, r, o) {
6695
6696
  stateStack: u
6696
6697
  };
6697
6698
  }
6698
- function El(t) {
6699
+ function Al(t) {
6699
6700
  return t.map((e) => ({ scopeName: e }));
6700
6701
  }
6701
- function Al(t, e) {
6702
+ function Rl(t, e) {
6702
6703
  const n = [];
6703
6704
  for (let r = 0, o = e.length; r < o; r++) {
6704
6705
  const s = e[r];
6705
6706
  n[r] = {
6706
6707
  scopeName: s,
6707
- themeMatches: Il(t, s, e.slice(0, r))
6708
+ themeMatches: Nl(t, s, e.slice(0, r))
6708
6709
  };
6709
6710
  }
6710
6711
  return n;
@@ -6712,7 +6713,7 @@ function Al(t, e) {
6712
6713
  function nr(t, e) {
6713
6714
  return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
6714
6715
  }
6715
- function Rl(t, e, n) {
6716
+ function Il(t, e, n) {
6716
6717
  if (!nr(t[t.length - 1], e))
6717
6718
  return !1;
6718
6719
  let r = t.length - 2, o = n.length - 1;
@@ -6720,11 +6721,11 @@ function Rl(t, e, n) {
6720
6721
  nr(t[r], n[o]) && (r -= 1), o -= 1;
6721
6722
  return r === -1;
6722
6723
  }
6723
- function Il(t, e, n) {
6724
+ function Nl(t, e, n) {
6724
6725
  const r = [];
6725
6726
  for (const { selectors: o, settings: s } of t)
6726
6727
  for (const a of o)
6727
- if (Rl(a, e, n)) {
6728
+ if (Il(a, e, n)) {
6728
6729
  r.push(s);
6729
6730
  break;
6730
6731
  }
@@ -6741,7 +6742,7 @@ function Ro(t, e, n) {
6741
6742
  state: c,
6742
6743
  theme: h
6743
6744
  };
6744
- }), s = Nl(
6745
+ }), s = Pl(
6745
6746
  ...o.map((l) => l.tokens)
6746
6747
  ), a = s[0].map(
6747
6748
  (l, u) => l.map((c, h) => {
@@ -6764,9 +6765,9 @@ function Ro(t, e, n) {
6764
6765
  Object.fromEntries(o.map((l) => [l.theme, l.state?.getInternalStack(l.theme)])),
6765
6766
  o[0].state.lang
6766
6767
  ) : void 0;
6767
- return i && St(a, i), a;
6768
+ return i && kt(a, i), a;
6768
6769
  }
6769
- function Nl(...t) {
6770
+ function Pl(...t) {
6770
6771
  const e = t.map(() => []), n = t.length;
6771
6772
  for (let r = 0; r < t[0].length; r++) {
6772
6773
  const o = t.map((l) => l[r]), s = e.map(() => []);
@@ -6789,7 +6790,7 @@ function Nl(...t) {
6789
6790
  }
6790
6791
  return e;
6791
6792
  }
6792
- function gt(t, e, n) {
6793
+ function mt(t, e, n) {
6793
6794
  let r, o, s, a, i, l;
6794
6795
  if ("themes" in n) {
6795
6796
  const {
@@ -6806,11 +6807,11 @@ function gt(t, e, n) {
6806
6807
  if (l = We(d), u && _n !== u && !h.find((g) => g.color === u))
6807
6808
  throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
6808
6809
  const f = h.map((g) => t.getTheme(g.theme)), p = h.map((g) => g.color);
6809
- s = d.map((g) => g.map((C) => hl(C, p, c, u))), l && St(s, l);
6810
- const m = h.map((g) => ht(g.theme, n));
6810
+ s = d.map((g) => g.map((C) => pl(C, p, c, u))), l && kt(s, l);
6811
+ const m = h.map((g) => pt(g.theme, n));
6811
6812
  o = rr(h, f, m, c, u, "fg"), r = rr(h, f, m, c, u, "bg"), a = `shiki-themes ${f.map((g) => g.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
6812
6813
  } else if ("theme" in n) {
6813
- const u = ht(n.theme, n);
6814
+ const u = pt(n.theme, n);
6814
6815
  s = Sn(
6815
6816
  t,
6816
6817
  e,
@@ -6845,14 +6846,14 @@ function rr(t, e, n, r, o, s) {
6845
6846
  return u;
6846
6847
  }).join(";");
6847
6848
  }
6848
- function mt(t, e, n, r = {
6849
+ function yt(t, e, n, r = {
6849
6850
  meta: {},
6850
6851
  options: n,
6851
- codeToHast: (o, s) => mt(t, o, s),
6852
- codeToTokens: (o, s) => gt(t, o, s)
6852
+ codeToHast: (o, s) => yt(t, o, s),
6853
+ codeToTokens: (o, s) => mt(t, o, s)
6853
6854
  }) {
6854
6855
  let o = e;
6855
- for (const p of ft(n))
6856
+ for (const p of dt(n))
6856
6857
  o = p.preprocess?.call(r, o, n) || o;
6857
6858
  let {
6858
6859
  tokens: s,
@@ -6861,21 +6862,21 @@ function mt(t, e, n, r = {
6861
6862
  themeName: l,
6862
6863
  rootStyle: u,
6863
6864
  grammarState: c
6864
- } = gt(t, o, n);
6865
+ } = mt(t, o, n);
6865
6866
  const {
6866
6867
  mergeWhitespaces: h = !0,
6867
6868
  mergeSameStyleTokens: d = !1
6868
6869
  } = n;
6869
- h === !0 ? s = Ll(s) : h === "never" && (s = $l(s)), d && (s = Tl(s));
6870
+ h === !0 ? s = $l(s) : h === "never" && (s = Tl(s)), d && (s = Ml(s));
6870
6871
  const f = {
6871
6872
  ...r,
6872
6873
  get source() {
6873
6874
  return o;
6874
6875
  }
6875
6876
  };
6876
- for (const p of ft(n))
6877
+ for (const p of dt(n))
6877
6878
  s = p.tokens?.call(f, s) || s;
6878
- return Pl(
6879
+ return Ll(
6879
6880
  s,
6880
6881
  {
6881
6882
  ...n,
@@ -6888,8 +6889,8 @@ function mt(t, e, n, r = {
6888
6889
  c
6889
6890
  );
6890
6891
  }
6891
- function Pl(t, e, n, r = We(t)) {
6892
- const o = ft(e), s = [], a = {
6892
+ function Ll(t, e, n, r = We(t)) {
6893
+ const o = dt(e), s = [], a = {
6893
6894
  type: "root",
6894
6895
  children: []
6895
6896
  }, {
@@ -6962,7 +6963,7 @@ function Pl(t, e, n, r = We(t)) {
6962
6963
  },
6963
6964
  children: [{ type: "text", value: y.content }]
6964
6965
  };
6965
- const S = rn(y.htmlStyle || pt(y));
6966
+ const S = rn(y.htmlStyle || ft(y));
6966
6967
  S && (_.properties.style = S);
6967
6968
  for (const A of o)
6968
6969
  _ = A?.span?.call(d, _, m + 1, C, g, y) || _;
@@ -6984,9 +6985,9 @@ function Pl(t, e, n, r = We(t)) {
6984
6985
  let f = a;
6985
6986
  for (const p of o)
6986
6987
  f = p?.root?.call(d, f) || f;
6987
- return r && St(f, r), f;
6988
+ return r && kt(f, r), f;
6988
6989
  }
6989
- function Ll(t) {
6990
+ function $l(t) {
6990
6991
  return t.map((e) => {
6991
6992
  const n = [];
6992
6993
  let r = "", o = 0;
@@ -7006,7 +7007,7 @@ function Ll(t) {
7006
7007
  }), n;
7007
7008
  });
7008
7009
  }
7009
- function $l(t) {
7010
+ function Tl(t) {
7010
7011
  return t.map((e) => e.flatMap((n) => {
7011
7012
  if (n.content.match(/^\s+$/))
7012
7013
  return n;
@@ -7030,7 +7031,7 @@ function $l(t) {
7030
7031
  }), i;
7031
7032
  }));
7032
7033
  }
7033
- function Tl(t) {
7034
+ function Ml(t) {
7034
7035
  return t.map((e) => {
7035
7036
  const n = [];
7036
7037
  for (const r of e) {
@@ -7038,22 +7039,22 @@ function Tl(t) {
7038
7039
  n.push({ ...r });
7039
7040
  continue;
7040
7041
  }
7041
- const o = n[n.length - 1], s = rn(o.htmlStyle || pt(o)), a = rn(r.htmlStyle || pt(r)), i = o.fontStyle && (o.fontStyle & z.Underline || o.fontStyle & z.Strikethrough), l = r.fontStyle && (r.fontStyle & z.Underline || r.fontStyle & z.Strikethrough);
7042
+ const o = n[n.length - 1], s = rn(o.htmlStyle || ft(o)), a = rn(r.htmlStyle || ft(r)), i = o.fontStyle && (o.fontStyle & z.Underline || o.fontStyle & z.Strikethrough), l = r.fontStyle && (r.fontStyle & z.Underline || r.fontStyle & z.Strikethrough);
7042
7043
  !i && !l && s === a ? o.content += r.content : n.push({ ...r });
7043
7044
  }
7044
7045
  return n;
7045
7046
  });
7046
7047
  }
7047
- const Ml = rl;
7048
- function Ol(t, e, n) {
7048
+ const Ol = ol;
7049
+ function Dl(t, e, n) {
7049
7050
  const r = {
7050
7051
  meta: {},
7051
7052
  options: n,
7052
- codeToHast: (s, a) => mt(t, s, a),
7053
- codeToTokens: (s, a) => gt(t, s, a)
7053
+ codeToHast: (s, a) => yt(t, s, a),
7054
+ codeToTokens: (s, a) => mt(t, s, a)
7054
7055
  };
7055
- let o = Ml(mt(t, e, n, r));
7056
- for (const s of ft(n))
7056
+ let o = Ol(yt(t, e, n, r));
7057
+ for (const s of dt(n))
7057
7058
  o = s.postprocess?.call(r, o, n) || o;
7058
7059
  return o;
7059
7060
  }
@@ -7124,20 +7125,20 @@ async function Io(t) {
7124
7125
  async function No(t) {
7125
7126
  return (await Promise.all(
7126
7127
  t.map(
7127
- async (n) => il(n) ? null : kn(await ko(n))
7128
+ async (n) => ll(n) ? null : kn(await ko(n))
7128
7129
  )
7129
7130
  )).filter((n) => !!n);
7130
7131
  }
7131
- let Dl = 3;
7132
- function Gl(t, e = 3) {
7133
- e > Dl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
7132
+ let Gl = 3;
7133
+ function Fl(t, e = 3) {
7134
+ e > Gl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
7134
7135
  }
7135
7136
  class ve extends Error {
7136
7137
  constructor(e) {
7137
7138
  super(e), this.name = "ShikiError";
7138
7139
  }
7139
7140
  }
7140
- class Fl extends Xa {
7141
+ class Bl extends Ka {
7141
7142
  constructor(e, n, r, o = {}) {
7142
7143
  super(e), this._resolver = e, this._themes = n, this._langs = r, this._alias = o, this._themes.map((s) => this.loadTheme(s)), this.loadLanguages(this._langs);
7143
7144
  }
@@ -7165,7 +7166,7 @@ class Fl extends Xa {
7165
7166
  // we omit here so it's easier to cache the themes.
7166
7167
  setTheme(e) {
7167
7168
  let n = this._textmateThemeCache.get(e);
7168
- n || (n = at.createFromRawTheme(e), this._textmateThemeCache.set(e, n)), this._syncRegistry.setTheme(n);
7169
+ n || (n = it.createFromRawTheme(e), this._textmateThemeCache.set(e, n)), this._syncRegistry.setTheme(n);
7169
7170
  }
7170
7171
  getGrammar(e) {
7171
7172
  if (this._alias[e]) {
@@ -7224,7 +7225,7 @@ class Fl extends Xa {
7224
7225
  this._langGraph.set(n, this._langMap.get(n));
7225
7226
  }
7226
7227
  }
7227
- class Bl {
7228
+ class jl {
7228
7229
  _langs = /* @__PURE__ */ new Map();
7229
7230
  _scopeToLang = /* @__PURE__ */ new Map();
7230
7231
  _injections = /* @__PURE__ */ new Map();
@@ -7262,12 +7263,12 @@ class Bl {
7262
7263
  }
7263
7264
  }
7264
7265
  let De = 0;
7265
- function jl(t) {
7266
+ function Ul(t) {
7266
7267
  De += 1, t.warnings !== !1 && De >= 10 && De % 10 === 0 && console.warn(`[Shiki] ${De} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);
7267
7268
  let e = !1;
7268
7269
  if (!t.engine)
7269
7270
  throw new ve("`engine` option is required for synchronous mode");
7270
- const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new Bl(t.engine, n), s = new Fl(o, r, n, t.langAlias);
7271
+ const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new jl(t.engine, n), s = new Bl(o, r, n, t.langAlias);
7271
7272
  let a;
7272
7273
  function i(y) {
7273
7274
  g();
@@ -7336,8 +7337,8 @@ function jl(t) {
7336
7337
  [Symbol.dispose]: C
7337
7338
  };
7338
7339
  }
7339
- async function Ul(t) {
7340
- t.engine || Gl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
7340
+ async function zl(t) {
7341
+ t.engine || Fl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
7341
7342
  const [
7342
7343
  e,
7343
7344
  n,
@@ -7347,22 +7348,22 @@ async function Ul(t) {
7347
7348
  Io(t.langs || []),
7348
7349
  t.engine
7349
7350
  ]);
7350
- return jl({
7351
+ return Ul({
7351
7352
  ...t,
7352
7353
  themes: e,
7353
7354
  langs: n,
7354
7355
  engine: r
7355
7356
  });
7356
7357
  }
7357
- async function zl(t) {
7358
- const e = await Ul(t);
7358
+ async function Hl(t) {
7359
+ const e = await zl(t);
7359
7360
  return {
7360
- getLastGrammarState: (...n) => vl(e, ...n),
7361
+ getLastGrammarState: (...n) => xl(e, ...n),
7361
7362
  codeToTokensBase: (n, r) => Sn(e, n, r),
7362
7363
  codeToTokensWithThemes: (n, r) => Ro(e, n, r),
7363
- codeToTokens: (n, r) => gt(e, n, r),
7364
- codeToHast: (n, r) => mt(e, n, r),
7365
- codeToHtml: (n, r) => Ol(e, n, r),
7364
+ codeToTokens: (n, r) => mt(e, n, r),
7365
+ codeToHast: (n, r) => yt(e, n, r),
7366
+ codeToHtml: (n, r) => Dl(e, n, r),
7366
7367
  getBundledLanguages: () => ({}),
7367
7368
  getBundledThemes: () => ({}),
7368
7369
  ...e,
@@ -7372,17 +7373,17 @@ async function zl(t) {
7372
7373
  function Po(t) {
7373
7374
  return "children" in t ? Lo(t) : "value" in t ? t.value : "";
7374
7375
  }
7375
- function Hl(t) {
7376
+ function Wl(t) {
7376
7377
  return t.type === "text" ? t.value : "children" in t ? Lo(t) : "";
7377
7378
  }
7378
7379
  function Lo(t) {
7379
7380
  let e = -1;
7380
7381
  const n = [];
7381
7382
  for (; ++e < t.children.length; )
7382
- n[e] = Hl(t.children[e]);
7383
+ n[e] = Wl(t.children[e]);
7383
7384
  return n.join("");
7384
7385
  }
7385
- const Wl = {
7386
+ const ql = {
7386
7387
  "tailing-curly-colon": (t, e) => {
7387
7388
  const n = Po(e), r = n.match(/(.+)\{:([\w-]+)\}$/);
7388
7389
  if (r)
@@ -7392,7 +7393,7 @@ const Wl = {
7392
7393
  lang: r.at(2)
7393
7394
  };
7394
7395
  }
7395
- }, ir = "language-", ql = (t, e) => {
7396
+ }, ir = "language-", Vl = (t, e) => {
7396
7397
  const n = e.children[0];
7397
7398
  if (!n || n.type !== "element" || n.tagName !== "code" || !n.properties)
7398
7399
  return;
@@ -7405,8 +7406,8 @@ const Wl = {
7405
7406
  code: Po(n),
7406
7407
  meta: n.data?.meta ?? n.properties.metastring?.toString() ?? ""
7407
7408
  };
7408
- }, Vl = "language-";
7409
- function Xl(t, e) {
7409
+ }, Xl = "language-";
7410
+ function Kl(t, e) {
7410
7411
  const {
7411
7412
  addLanguageClass: n = !1,
7412
7413
  parseMetaString: r,
@@ -7437,7 +7438,7 @@ function Xl(t, e) {
7437
7438
  {
7438
7439
  name: "rehype-shiki:code-language-class",
7439
7440
  code(S) {
7440
- return this.addClassToHast(S, `${Vl}${f}`), S;
7441
+ return this.addClassToHast(S, `${Xl}${f}`), S;
7441
7442
  }
7442
7443
  }
7443
7444
  ]), l && p.endsWith(`
@@ -7459,9 +7460,9 @@ function Xl(t, e) {
7459
7460
  if (!C || g == null)
7460
7461
  return;
7461
7462
  if (m.tagName === "pre")
7462
- y = ql;
7463
+ y = Vl;
7463
7464
  else if (m.tagName === "code" && u)
7464
- y = Wl[u];
7465
+ y = ql[u];
7465
7466
  else
7466
7467
  return;
7467
7468
  const _ = y(f, m);
@@ -7501,7 +7502,7 @@ function Xl(t, e) {
7501
7502
  }
7502
7503
  };
7503
7504
  }
7504
- function Kl(t) {
7505
+ function Yl(t) {
7505
7506
  if (!t)
7506
7507
  return null;
7507
7508
  const e = t.match(/\{([\d,-]+)\}/);
@@ -7511,7 +7512,7 @@ function Kl(t) {
7511
7512
  }) : null;
7512
7513
  }
7513
7514
  const lr = Symbol("highlighted-lines");
7514
- function Yl(t = {}) {
7515
+ function Jl(t = {}) {
7515
7516
  const {
7516
7517
  className: e = "highlighted"
7517
7518
  } = t;
@@ -7521,14 +7522,14 @@ function Yl(t = {}) {
7521
7522
  if (!this.options.meta?.__raw)
7522
7523
  return;
7523
7524
  const o = this.meta;
7524
- return o[lr] ??= Kl(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
7525
+ return o[lr] ??= Yl(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
7525
7526
  }
7526
7527
  };
7527
7528
  }
7528
- function Jl(t) {
7529
+ function Zl(t) {
7529
7530
  return t ? Array.from(t.matchAll(/\/((?:\\.|[^/])+)\//g)).map((n) => n[1].replace(/\\(.)/g, "$1")) : [];
7530
7531
  }
7531
- function Zl(t = {}) {
7532
+ function Ql(t = {}) {
7532
7533
  const {
7533
7534
  className: e = "highlighted-word"
7534
7535
  } = t;
@@ -7537,10 +7538,10 @@ function Zl(t = {}) {
7537
7538
  preprocess(n, r) {
7538
7539
  if (!this.options.meta?.__raw)
7539
7540
  return;
7540
- const o = Jl(this.options.meta.__raw);
7541
+ const o = Zl(this.options.meta.__raw);
7541
7542
  r.decorations ||= [];
7542
7543
  for (const s of o) {
7543
- const a = Ql(n, s);
7544
+ const a = eu(n, s);
7544
7545
  for (const i of a)
7545
7546
  r.decorations.push({
7546
7547
  start: i,
@@ -7553,7 +7554,7 @@ function Zl(t = {}) {
7553
7554
  }
7554
7555
  };
7555
7556
  }
7556
- function Ql(t, e) {
7557
+ function eu(t, e) {
7557
7558
  const n = [];
7558
7559
  let r = 0;
7559
7560
  for (; ; ) {
@@ -7568,7 +7569,7 @@ function Le(t) {
7568
7569
  if ([...t].length !== 1) throw new Error(`Expected "${t}" to be a single code point`);
7569
7570
  return t.codePointAt(0);
7570
7571
  }
7571
- function eu(t, e, n) {
7572
+ function tu(t, e, n) {
7572
7573
  return t.has(e) || t.set(e, n), t.get(e);
7573
7574
  }
7574
7575
  const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), B = String.raw;
@@ -7598,7 +7599,7 @@ const $o = B`\[\^?`, To = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
7598
7599
  | (?:${xn.source})+
7599
7600
  | ${$o}
7600
7601
  | .
7601
- `.replace(/\s+/g, ""), "gsu"), Mt = new RegExp(B`
7602
+ `.replace(/\s+/g, ""), "gsu"), Ot = new RegExp(B`
7602
7603
  \\ (?:
7603
7604
  ${To}
7604
7605
  | .
@@ -7608,10 +7609,10 @@ const $o = B`\[\^?`, To = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
7608
7609
  | &&
7609
7610
  | .
7610
7611
  `.replace(/\s+/g, ""), "gsu");
7611
- function tu(t, e = {}) {
7612
+ function nu(t, e = {}) {
7612
7613
  const n = { flags: "", ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } };
7613
7614
  if (typeof t != "string") throw new Error("String expected as pattern");
7614
- const r = Cu(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
7615
+ const r = _u(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
7615
7616
  return o.at(-1);
7616
7617
  }, numOpenGroups: 0, popModX() {
7617
7618
  o.pop();
@@ -7622,7 +7623,7 @@ function tu(t, e = {}) {
7622
7623
  }, singleline: n.rules.singleline };
7623
7624
  let a = [], i;
7624
7625
  for (et.lastIndex = 0; i = et.exec(t); ) {
7625
- const h = nu(s, t, i[0], et.lastIndex);
7626
+ const h = ru(s, t, i[0], et.lastIndex);
7626
7627
  h.tokens ? a.push(...h.tokens) : h.token && a.push(h.token), h.lastIndex !== void 0 && (et.lastIndex = h.lastIndex);
7627
7628
  }
7628
7629
  const l = [];
@@ -7633,19 +7634,19 @@ function tu(t, e = {}) {
7633
7634
  h.kind = "capturing", h.number = d + 1;
7634
7635
  });
7635
7636
  const c = u || l.length;
7636
- return { tokens: a.map((h) => h.type === "EscapedNumber" ? Su(h, c) : h).flat(), flags: r };
7637
+ return { tokens: a.map((h) => h.type === "EscapedNumber" ? ku(h, c) : h).flat(), flags: r };
7637
7638
  }
7638
- function nu(t, e, n, r) {
7639
+ function ru(t, e, n, r) {
7639
7640
  const [o, s] = n;
7640
7641
  if (n === "[" || n === "[^") {
7641
- const a = ru(e, n, r);
7642
+ const a = ou(e, n, r);
7642
7643
  return { tokens: a.tokens, lastIndex: a.lastIndex };
7643
7644
  }
7644
7645
  if (o === "\\") {
7645
7646
  if ("AbBGyYzZ".includes(s)) return { token: ur(n, n) };
7646
7647
  if (/^\\g[<']/.test(n)) {
7647
7648
  if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
7648
- return { token: fu(n) };
7649
+ return { token: du(n) };
7649
7650
  }
7650
7651
  if (/^\\k[<']/.test(n)) {
7651
7652
  if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
@@ -7659,13 +7660,13 @@ function nu(t, e, n, r) {
7659
7660
  return Array.isArray(a) ? { tokens: a } : { token: a };
7660
7661
  }
7661
7662
  if (o === "(") {
7662
- if (s === "*") return { token: yu(n) };
7663
+ if (s === "*") return { token: bu(n) };
7663
7664
  if (n === "(?{") throw new Error(`Unsupported callout "${n}"`);
7664
7665
  if (n.startsWith("(?#")) {
7665
7666
  if (e[r] !== ")") throw new Error('Unclosed comment group "(?#"');
7666
7667
  return { lastIndex: r + 1 };
7667
7668
  }
7668
- if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: mu(n, t) };
7669
+ if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: yu(n, t) };
7669
7670
  if (t.pushModX(t.getCurrentModX()), t.numOpenGroups++, n === "(" && !t.captureGroup || n === "(?:") return { token: Se("group", n) };
7670
7671
  if (n === "(?>") return { token: Se("atomic", n) };
7671
7672
  if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: Se(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
@@ -7678,7 +7679,7 @@ function nu(t, e, n, r) {
7678
7679
  }
7679
7680
  if (n === ")") {
7680
7681
  if (t.popModX(), t.numOpenGroups--, t.numOpenGroups < 0) throw new Error('Unmatched ")"');
7681
- return { token: cu(n) };
7682
+ return { token: hu(n) };
7682
7683
  }
7683
7684
  if (t.getCurrentModX()) {
7684
7685
  if (n === "#") {
@@ -7696,41 +7697,41 @@ function nu(t, e, n, r) {
7696
7697
  const a = t.singleline ? { "^": B`\A`, $: B`\Z` }[n] : n;
7697
7698
  return { token: ur(a, n) };
7698
7699
  }
7699
- return n === "|" ? { token: su(n) } : xn.test(n) ? { tokens: ku(n) } : { token: se(Le(n), n) };
7700
+ return n === "|" ? { token: au(n) } : xn.test(n) ? { tokens: vu(n) } : { token: se(Le(n), n) };
7700
7701
  }
7701
- function ru(t, e, n) {
7702
+ function ou(t, e, n) {
7702
7703
  const r = [cr(e[1] === "^", e)];
7703
7704
  let o = 1, s;
7704
- for (Mt.lastIndex = n; s = Mt.exec(t); ) {
7705
+ for (Ot.lastIndex = n; s = Ot.exec(t); ) {
7705
7706
  const a = s[0];
7706
7707
  if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
7707
7708
  else if (a === "]") {
7708
7709
  if (r.at(-1).type === "CharacterClassOpen") r.push(se(93, a));
7709
- else if (o--, r.push(au(a)), !o) break;
7710
+ else if (o--, r.push(iu(a)), !o) break;
7710
7711
  } else {
7711
- const i = ou(a);
7712
+ const i = su(a);
7712
7713
  Array.isArray(i) ? r.push(...i) : r.push(i);
7713
7714
  }
7714
7715
  }
7715
- return { tokens: r, lastIndex: Mt.lastIndex || t.length };
7716
+ return { tokens: r, lastIndex: Ot.lastIndex || t.length };
7716
7717
  }
7717
- function ou(t) {
7718
+ function su(t) {
7718
7719
  if (t[0] === "\\") return Mo(t, { inCharClass: !0 });
7719
7720
  if (t[0] === "[") {
7720
7721
  const e = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);
7721
7722
  if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
7722
7723
  return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
7723
7724
  }
7724
- return t === "-" ? iu(t) : t === "&&" ? lu(t) : se(Le(t), t);
7725
+ return t === "-" ? lu(t) : t === "&&" ? uu(t) : se(Le(t), t);
7725
7726
  }
7726
7727
  function Mo(t, { inCharClass: e }) {
7727
7728
  const n = t[1];
7728
- if (n === "c" || n === "C") return gu(t);
7729
- if ("dDhHsSwW".includes(n)) return bu(t);
7729
+ if (n === "c" || n === "C") return mu(t);
7730
+ if ("dDhHsSwW".includes(n)) return wu(t);
7730
7731
  if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
7731
7732
  if (/^\\[pP]\{/.test(t)) {
7732
7733
  if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
7733
- return wu(t);
7734
+ return Cu(t);
7734
7735
  }
7735
7736
  if (/^\\x[89A-Fa-f]\p{AHex}/u.test(t)) try {
7736
7737
  const r = t.split(/\\x/).slice(1).map((a) => parseInt(a, 16)), o = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }).decode(new Uint8Array(r)), s = new TextEncoder();
@@ -7741,15 +7742,15 @@ function Mo(t, { inCharClass: e }) {
7741
7742
  } catch {
7742
7743
  throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`);
7743
7744
  }
7744
- if (n === "u" || n === "x") return se(_u(t), t);
7745
+ if (n === "u" || n === "x") return se(Su(t), t);
7745
7746
  if (hr.has(n)) return se(hr.get(n), t);
7746
- if (/\d/.test(n)) return uu(e, t);
7747
+ if (/\d/.test(n)) return cu(e, t);
7747
7748
  if (t === "\\") throw new Error(B`Incomplete escape "\"`);
7748
7749
  if (n === "M") throw new Error(`Unsupported meta "${t}"`);
7749
7750
  if ([...t].length === 2) return se(t.codePointAt(1), t);
7750
7751
  throw new Error(`Unexpected escape "${t}"`);
7751
7752
  }
7752
- function su(t) {
7753
+ function au(t) {
7753
7754
  return { type: "Alternator", raw: t };
7754
7755
  }
7755
7756
  function ur(t, e) {
@@ -7761,13 +7762,13 @@ function Oo(t) {
7761
7762
  function se(t, e) {
7762
7763
  return { type: "Character", value: t, raw: e };
7763
7764
  }
7764
- function au(t) {
7765
+ function iu(t) {
7765
7766
  return { type: "CharacterClassClose", raw: t };
7766
7767
  }
7767
- function iu(t) {
7768
+ function lu(t) {
7768
7769
  return { type: "CharacterClassHyphen", raw: t };
7769
7770
  }
7770
- function lu(t) {
7771
+ function uu(t) {
7771
7772
  return { type: "CharacterClassIntersector", raw: t };
7772
7773
  }
7773
7774
  function cr(t, e) {
@@ -7779,31 +7780,31 @@ function ge(t, e, n = {}) {
7779
7780
  function Do(t, e, n = {}) {
7780
7781
  return t === "keep" ? { type: "Directive", kind: t, raw: e } : { type: "Directive", kind: t, flags: $e(n.flags), raw: e };
7781
7782
  }
7782
- function uu(t, e) {
7783
+ function cu(t, e) {
7783
7784
  return { type: "EscapedNumber", inCharClass: t, raw: e };
7784
7785
  }
7785
- function cu(t) {
7786
+ function hu(t) {
7786
7787
  return { type: "GroupClose", raw: t };
7787
7788
  }
7788
7789
  function Se(t, e, n = {}) {
7789
7790
  return { type: "GroupOpen", kind: t, ...n, raw: e };
7790
7791
  }
7791
- function hu(t, e, n, r) {
7792
+ function pu(t, e, n, r) {
7792
7793
  return { type: "NamedCallout", kind: t, tag: e, arguments: n, raw: r };
7793
7794
  }
7794
- function pu(t, e, n, r) {
7795
+ function fu(t, e, n, r) {
7795
7796
  return { type: "Quantifier", kind: t, min: e, max: n, raw: r };
7796
7797
  }
7797
- function fu(t) {
7798
+ function du(t) {
7798
7799
  return { type: "Subroutine", raw: t };
7799
7800
  }
7800
- const du = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]), hr = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
7801
- function gu(t) {
7801
+ const gu = /* @__PURE__ */ new Set(["COUNT", "CMP", "ERROR", "FAIL", "MAX", "MISMATCH", "SKIP", "TOTAL_COUNT"]), hr = /* @__PURE__ */ new Map([["a", 7], ["b", 8], ["e", 27], ["f", 12], ["n", 10], ["r", 13], ["t", 9], ["v", 11]]);
7802
+ function mu(t) {
7802
7803
  const e = t[1] === "c" ? t[2] : t[3];
7803
7804
  if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
7804
7805
  return se(Le(e.toUpperCase()) - 64, t);
7805
7806
  }
7806
- function mu(t, e) {
7807
+ function yu(t, e) {
7807
7808
  let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
7808
7809
  r ??= "";
7809
7810
  const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = fr(n), a = fr(r), i = {};
@@ -7811,13 +7812,13 @@ function mu(t, e) {
7811
7812
  if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
7812
7813
  throw new Error(`Unexpected flag modifier "${t}"`);
7813
7814
  }
7814
- function yu(t) {
7815
+ function bu(t) {
7815
7816
  const e = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);
7816
7817
  if (!e) throw new Error(`Incomplete or invalid named callout "${t}"`);
7817
7818
  const { name: n, tag: r, args: o } = e.groups;
7818
7819
  if (!n) throw new Error(`Invalid named callout "${t}"`);
7819
7820
  if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
7820
- const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = du.has(n) ? n.toLowerCase() : "custom";
7821
+ const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = gu.has(n) ? n.toLowerCase() : "custom";
7821
7822
  switch (u) {
7822
7823
  case "fail":
7823
7824
  case "mismatch":
@@ -7849,7 +7850,7 @@ function yu(t) {
7849
7850
  default:
7850
7851
  throw new Error(`Unexpected named callout kind "${u}"`);
7851
7852
  }
7852
- return hu(u, r ?? null, o?.split(",") ?? null, t);
7853
+ return pu(u, r ?? null, o?.split(",") ?? null, t);
7853
7854
  }
7854
7855
  function pr(t) {
7855
7856
  let e = null, n, r;
@@ -7861,13 +7862,13 @@ function pr(t) {
7861
7862
  e = "lazy";
7862
7863
  } else e || (e = "greedy");
7863
7864
  } else n = t[0] === "+" ? 1 : 0, r = t[0] === "?" ? 1 : 1 / 0, e = t[1] === "+" ? "possessive" : t[1] === "?" ? "lazy" : "greedy";
7864
- return pu(e, n, r, t);
7865
+ return fu(e, n, r, t);
7865
7866
  }
7866
- function bu(t) {
7867
+ function wu(t) {
7867
7868
  const e = t[1].toLowerCase();
7868
7869
  return ge({ d: "digit", h: "hex", s: "space", w: "word" }[e], t, { negate: t[1] !== e });
7869
7870
  }
7870
- function wu(t) {
7871
+ function Cu(t) {
7871
7872
  const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
7872
7873
  return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
7873
7874
  }
@@ -7875,7 +7876,7 @@ function fr(t) {
7875
7876
  const e = {};
7876
7877
  return t.includes("i") && (e.ignoreCase = !0), t.includes("m") && (e.dotAll = !0), t.includes("x") && (e.extended = !0), Object.keys(e).length ? e : null;
7877
7878
  }
7878
- function Cu(t) {
7879
+ function _u(t) {
7879
7880
  const e = { ignoreCase: !1, dotAll: !1, extended: !1, digitIsAscii: !1, posixIsAscii: !1, spaceIsAscii: !1, wordIsAscii: !1, textSegmentMode: null };
7880
7881
  for (let n = 0; n < t.length; n++) {
7881
7882
  const r = t[n];
@@ -7889,12 +7890,12 @@ function Cu(t) {
7889
7890
  }
7890
7891
  return e;
7891
7892
  }
7892
- function _u(t) {
7893
+ function Su(t) {
7893
7894
  if (/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(t)) throw new Error(`Incomplete or invalid escape "${t}"`);
7894
7895
  const e = t[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex : t.slice(2);
7895
7896
  return parseInt(e, 16);
7896
7897
  }
7897
- function Su(t, e) {
7898
+ function ku(t, e) {
7898
7899
  const { raw: n, inCharClass: r } = t, o = n.slice(1);
7899
7900
  if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [Oo(n)];
7900
7901
  const s = [], a = o.match(/^[0-7]+|\d/g);
@@ -7908,7 +7909,7 @@ function Su(t, e) {
7908
7909
  }
7909
7910
  return s;
7910
7911
  }
7911
- function ku(t) {
7912
+ function vu(t) {
7912
7913
  const e = [], n = new RegExp(xn, "gy");
7913
7914
  let r;
7914
7915
  for (; r = n.exec(t); ) {
@@ -7933,42 +7934,42 @@ function Go(t, e) {
7933
7934
  const n = t.body[0];
7934
7935
  return !e || Object.keys(e).every((r) => e[r] === n[r]);
7935
7936
  }
7936
- function vu(t) {
7937
- return xu.has(t.type);
7937
+ function xu(t) {
7938
+ return Eu.has(t.type);
7938
7939
  }
7939
- const xu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
7940
+ const Eu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
7940
7941
  function Fo(t, e = {}) {
7941
- const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = tu(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (d, f) => {
7942
+ const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = nu(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (d, f) => {
7942
7943
  const p = r.tokens[s.nextIndex];
7943
7944
  switch (s.parent = d, s.nextIndex++, p.type) {
7944
7945
  case "Alternator":
7945
7946
  return me();
7946
7947
  case "Assertion":
7947
- return Eu(p);
7948
+ return Au(p);
7948
7949
  case "Backreference":
7949
- return Au(p, s);
7950
+ return Ru(p, s);
7950
7951
  case "Character":
7951
- return kt(p.value, { useLastValid: !!f.isCheckingRangeEnd });
7952
+ return vt(p.value, { useLastValid: !!f.isCheckingRangeEnd });
7952
7953
  case "CharacterClassHyphen":
7953
- return Ru(p, s, f);
7954
- case "CharacterClassOpen":
7955
7954
  return Iu(p, s, f);
7955
+ case "CharacterClassOpen":
7956
+ return Nu(p, s, f);
7956
7957
  case "CharacterSet":
7957
- return Nu(p, s);
7958
+ return Pu(p, s);
7958
7959
  case "Directive":
7959
- return Ou(p.kind, { flags: p.flags });
7960
+ return Du(p.kind, { flags: p.flags });
7960
7961
  case "GroupOpen":
7961
- return Pu(p, s, f);
7962
+ return Lu(p, s, f);
7962
7963
  case "NamedCallout":
7963
- return Gu(p.kind, p.tag, p.arguments);
7964
+ return Fu(p.kind, p.tag, p.arguments);
7964
7965
  case "Quantifier":
7965
- return Lu(p, s);
7966
- case "Subroutine":
7967
7966
  return $u(p, s);
7967
+ case "Subroutine":
7968
+ return Tu(p, s);
7968
7969
  default:
7969
7970
  throw new Error(`Unexpected token type "${p.type}"`);
7970
7971
  }
7971
- }, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a = Bu(Du(r.flags));
7972
+ }, s = { capturingGroups: [], hasNumberedRef: !1, namedGroupsByName: /* @__PURE__ */ new Map(), nextIndex: 0, normalizeUnknownPropertyNames: n.normalizeUnknownPropertyNames, parent: null, skipBackrefValidation: n.skipBackrefValidation, skipLookbehindValidation: n.skipLookbehindValidation, skipPropertyNameValidation: n.skipPropertyNameValidation, subroutines: [], tokens: r.tokens, unicodePropertyMap: n.unicodePropertyMap, walk: o }, a = ju(Gu(r.flags));
7972
7973
  let i = a.body[0];
7973
7974
  for (; s.nextIndex < r.tokens.length; ) {
7974
7975
  const d = o(i, {});
@@ -7985,10 +7986,10 @@ function Fo(t, e = {}) {
7985
7986
  } else throw new Error(B`Subroutine uses a group name that's not defined "\g<${d}>"`);
7986
7987
  return a;
7987
7988
  }
7988
- function Eu({ kind: t }) {
7989
+ function Au({ kind: t }) {
7989
7990
  return on($e({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[t], `Unexpected assertion kind "${t}"`), { negate: t === B`\B` || t === B`\Y` });
7990
7991
  }
7991
- function Au({ raw: t }, e) {
7992
+ function Ru({ raw: t }, e) {
7992
7993
  const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
7993
7994
  const i = e.capturingGroups.length;
7994
7995
  let l = !1;
@@ -8005,16 +8006,16 @@ function Au({ raw: t }, e) {
8005
8006
  }
8006
8007
  return o(+r);
8007
8008
  }
8008
- function Ru(t, e, n) {
8009
+ function Iu(t, e, n) {
8009
8010
  const { tokens: r, walk: o } = e, s = e.parent, a = s.body.at(-1), i = r[e.nextIndex];
8010
8011
  if (!n.isCheckingRangeEnd && a && a.type !== "CharacterClass" && a.type !== "CharacterClassRange" && i && i.type !== "CharacterClassOpen" && i.type !== "CharacterClassClose" && i.type !== "CharacterClassIntersector") {
8011
8012
  const l = o(s, { ...n, isCheckingRangeEnd: !0 });
8012
- if (a.type === "Character" && l.type === "Character") return s.body.pop(), Mu(a, l);
8013
+ if (a.type === "Character" && l.type === "Character") return s.body.pop(), Ou(a, l);
8013
8014
  throw new Error("Invalid character class range");
8014
8015
  }
8015
- return kt(Le("-"));
8016
+ return vt(Le("-"));
8016
8017
  }
8017
- function Iu({ negate: t }, e, n) {
8018
+ function Nu({ negate: t }, e, n) {
8018
8019
  const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
8019
8020
  let i = mr(s);
8020
8021
  for (; i.type !== "CharacterClassClose"; ) {
@@ -8028,18 +8029,18 @@ function Iu({ negate: t }, e, n) {
8028
8029
  const l = st({ negate: t });
8029
8030
  return a.length === 1 ? l.body = a[0].body : (l.kind = "intersection", l.body = a.map((u) => u.body.length === 1 ? u.body[0] : u)), e.nextIndex++, l;
8030
8031
  }
8031
- function Nu({ kind: t, negate: e, value: n }, r) {
8032
+ function Pu({ kind: t, negate: e, value: n }, r) {
8032
8033
  const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
8033
8034
  if (t === "property") {
8034
- const i = vt(n);
8035
+ const i = xt(n);
8035
8036
  if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
8036
8037
  else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
8037
8038
  }
8038
- return t === "posix" ? Fu(n, { negate: e }) : an(t, { negate: e });
8039
+ return t === "posix" ? Bu(n, { negate: e }) : an(t, { negate: e });
8039
8040
  }
8040
- function Pu(t, e, n) {
8041
- const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = ju(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
8042
- if (l.type === "CapturingGroup" && (o.push(l), l.name && eu(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
8041
+ function Lu(t, e, n) {
8042
+ const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = Uu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
8043
+ if (l.type === "CapturingGroup" && (o.push(l), l.name && tu(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
8043
8044
  let d = yr(r[e.nextIndex]);
8044
8045
  for (; d.type !== "GroupClose"; ) {
8045
8046
  if (d.type === "Alternator") l.body.push(me()), e.nextIndex++;
@@ -8056,13 +8057,13 @@ function Pu(t, e, n) {
8056
8057
  }
8057
8058
  return e.nextIndex++, l;
8058
8059
  }
8059
- function Lu({ kind: t, min: e, max: n }, r) {
8060
+ function $u({ kind: t, min: e, max: n }, r) {
8060
8061
  const o = r.parent, s = o.body.at(-1);
8061
- if (!s || !vu(s)) throw new Error("Quantifier requires a repeatable token");
8062
+ if (!s || !xu(s)) throw new Error("Quantifier requires a repeatable token");
8062
8063
  const a = jo(t, e, n, s);
8063
8064
  return o.body.pop(), a;
8064
8065
  }
8065
- function $u({ raw: t }, e) {
8066
+ function Tu({ raw: t }, e) {
8066
8067
  const { capturingGroups: n, subroutines: r } = e;
8067
8068
  let o = t.slice(3, -1);
8068
8069
  const s = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);
@@ -8073,7 +8074,7 @@ function $u({ raw: t }, e) {
8073
8074
  const a = Uo(o);
8074
8075
  return r.push(a), a;
8075
8076
  }
8076
- function Tu(t, e) {
8077
+ function Mu(t, e) {
8077
8078
  return { type: "AbsenceFunction", kind: t, body: Ye(e?.body) };
8078
8079
  }
8079
8080
  function me(t) {
@@ -8089,10 +8090,10 @@ function sn(t, e) {
8089
8090
  }
8090
8091
  function Bo(t, e) {
8091
8092
  const n = { name: void 0, isSubroutined: !1, ...e };
8092
- if (n.name !== void 0 && !Uu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
8093
+ if (n.name !== void 0 && !zu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
8093
8094
  return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
8094
8095
  }
8095
- function kt(t, e) {
8096
+ function vt(t, e) {
8096
8097
  const n = { useLastValid: !1, ...e };
8097
8098
  if (t > 1114111) {
8098
8099
  const r = t.toString(16);
@@ -8105,7 +8106,7 @@ function st(t) {
8105
8106
  const e = { kind: "union", negate: !1, ...t };
8106
8107
  return { type: "CharacterClass", kind: e.kind, negate: e.negate, body: zo(t?.body) };
8107
8108
  }
8108
- function Mu(t, e) {
8109
+ function Ou(t, e) {
8109
8110
  if (e.value < t.value) throw new Error("Character class range out of order");
8110
8111
  return { type: "CharacterClassRange", min: t, max: e };
8111
8112
  }
@@ -8113,12 +8114,12 @@ function an(t, e) {
8113
8114
  const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
8114
8115
  return (t === "digit" || t === "hex" || t === "newline" || t === "space" || t === "word") && (r.negate = n), (t === "text_segment" || t === "newline" && !n) && (r.variableLength = !0), r;
8115
8116
  }
8116
- function Ou(t, e = {}) {
8117
+ function Du(t, e = {}) {
8117
8118
  if (t === "keep") return { type: "Directive", kind: t };
8118
8119
  if (t === "flags") return { type: "Directive", kind: t, flags: $e(e.flags) };
8119
8120
  throw new Error(`Unexpected directive kind "${t}"`);
8120
8121
  }
8121
- function Du(t) {
8122
+ function Gu(t) {
8122
8123
  return { type: "Flags", ...t };
8123
8124
  }
8124
8125
  function Q(t) {
@@ -8130,10 +8131,10 @@ function fe(t) {
8130
8131
  const e = { behind: !1, negate: !1, ...t };
8131
8132
  return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
8132
8133
  }
8133
- function Gu(t, e, n) {
8134
+ function Fu(t, e, n) {
8134
8135
  return { type: "NamedCallout", kind: t, tag: e, arguments: n };
8135
8136
  }
8136
- function Fu(t, e) {
8137
+ function Bu(t, e) {
8137
8138
  const n = !!e?.negate;
8138
8139
  if (!vn.has(t)) throw new Error(`Invalid POSIX class "${t}"`);
8139
8140
  return { type: "CharacterSet", kind: "posix", value: t, negate: n };
@@ -8142,7 +8143,7 @@ function jo(t, e, n, r) {
8142
8143
  if (e > n) throw new Error("Invalid reversed quantifier range");
8143
8144
  return { type: "Quantifier", kind: t, min: e, max: n, body: r };
8144
8145
  }
8145
- function Bu(t, e) {
8146
+ function ju(t, e) {
8146
8147
  return { type: "Regex", body: Ye(e?.body), flags: t };
8147
8148
  }
8148
8149
  function Uo(t) {
@@ -8150,17 +8151,17 @@ function Uo(t) {
8150
8151
  }
8151
8152
  function ke(t, e) {
8152
8153
  const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
8153
- let r = n.unicodePropertyMap?.get(vt(t));
8154
+ let r = n.unicodePropertyMap?.get(xt(t));
8154
8155
  if (!r) {
8155
- if (n.normalizeUnknownPropertyNames) r = zu(t);
8156
+ if (n.normalizeUnknownPropertyNames) r = Hu(t);
8156
8157
  else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(B`Invalid Unicode property "\p{${t}}"`);
8157
8158
  }
8158
8159
  return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
8159
8160
  }
8160
- function ju({ flags: t, kind: e, name: n, negate: r, number: o }) {
8161
+ function Uu({ flags: t, kind: e, name: n, negate: r, number: o }) {
8161
8162
  switch (e) {
8162
8163
  case "absence_repeater":
8163
- return Tu("repeater");
8164
+ return Mu("repeater");
8164
8165
  case "atomic":
8165
8166
  return Q({ atomic: !0 });
8166
8167
  case "capturing":
@@ -8190,13 +8191,13 @@ function dr(t) {
8190
8191
  function gr(t) {
8191
8192
  return t.type === "LookaroundAssertion" && t.kind === "lookbehind";
8192
8193
  }
8193
- function Uu(t) {
8194
+ function zu(t) {
8194
8195
  return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(t);
8195
8196
  }
8196
- function zu(t) {
8197
+ function Hu(t) {
8197
8198
  return t.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
8198
8199
  }
8199
- function vt(t) {
8200
+ function xt(t) {
8200
8201
  return t.replace(/[- _]+/g, "").toLowerCase();
8201
8202
  }
8202
8203
  function mr(t, e) {
@@ -8280,12 +8281,12 @@ function Ce(t) {
8280
8281
  if (typeof t != "number") throw new Error("Numeric key expected");
8281
8282
  return t;
8282
8283
  }
8283
- const Hu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
8284
- function Wu(t, e) {
8284
+ const Wu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
8285
+ function qu(t, e) {
8285
8286
  for (let n = 0; n < t.length; n++)
8286
8287
  t[n] >= e && t[n]++;
8287
8288
  }
8288
- function qu(t, e, n, r) {
8289
+ function Vu(t, e, n, r) {
8289
8290
  return t.slice(0, e) + r + t.slice(e + n.length);
8290
8291
  }
8291
8292
  const J = Object.freeze({
@@ -8311,7 +8312,7 @@ function En(t, e, n, r) {
8311
8312
  function Ho(t, e, n, r) {
8312
8313
  En(t, e, n, r);
8313
8314
  }
8314
- function Vu(t, e, n = 0, r) {
8315
+ function Xu(t, e, n = 0, r) {
8315
8316
  if (!new RegExp(e, "su").test(t))
8316
8317
  return null;
8317
8318
  const o = new RegExp(`${e}|(?<$skip>\\\\?.)`, "gsu");
@@ -8326,9 +8327,9 @@ function Vu(t, e, n = 0, r) {
8326
8327
  return null;
8327
8328
  }
8328
8329
  function nt(t, e, n) {
8329
- return !!Vu(t, e, 0, n);
8330
+ return !!Xu(t, e, 0, n);
8330
8331
  }
8331
- function Xu(t, e) {
8332
+ function Ku(t, e) {
8332
8333
  const n = /\\?./gsu;
8333
8334
  n.lastIndex = e;
8334
8335
  let r = t.length, o = 0, s = 1, a;
@@ -8347,8 +8348,8 @@ function Xu(t, e) {
8347
8348
  }
8348
8349
  return t.slice(e, r);
8349
8350
  }
8350
- const br = new RegExp(String.raw`(?<noncapturingStart>${Hu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
8351
- function Ku(t, e) {
8351
+ const br = new RegExp(String.raw`(?<noncapturingStart>${Wu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
8352
+ function Yu(t, e) {
8352
8353
  const n = e?.hiddenCaptures ?? [];
8353
8354
  let r = e?.captureTransfers ?? /* @__PURE__ */ new Map();
8354
8355
  if (!/\(\?>/.test(t))
@@ -8378,7 +8379,7 @@ function Ku(t, e) {
8378
8379
  if (!f) {
8379
8380
  u++;
8380
8381
  const S = l + u;
8381
- if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, C)}))<$$${S}>)${t.slice(C + 1)}`, h = !0, i.push(S), Wu(n, S), r.size) {
8382
+ if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, C)}))<$$${S}>)${t.slice(C + 1)}`, h = !0, i.push(S), qu(n, S), r.size) {
8382
8383
  const A = /* @__PURE__ */ new Map();
8383
8384
  r.forEach((D, P) => {
8384
8385
  A.set(
@@ -8412,7 +8413,7 @@ function Ku(t, e) {
8412
8413
  hiddenCaptures: n
8413
8414
  };
8414
8415
  }
8415
- const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Ot = new RegExp(String.raw`
8416
+ const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
8416
8417
  \\(?: \d+
8417
8418
  | c[A-Za-z]
8418
8419
  | [gk]<[^>]+>
@@ -8428,14 +8429,14 @@ const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Ot = new RegExp(String.raw`
8428
8429
  | (?<qBase>${Wo})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
8429
8430
  | \\?.
8430
8431
  `.replace(/\s+/g, ""), "gsu");
8431
- function Yu(t) {
8432
+ function Ju(t) {
8432
8433
  if (!new RegExp(`${Wo}\\+`).test(t))
8433
8434
  return {
8434
8435
  pattern: t
8435
8436
  };
8436
8437
  const e = [];
8437
8438
  let n = null, r = null, o = "", s = 0, a;
8438
- for (Ot.lastIndex = 0; a = Ot.exec(t); ) {
8439
+ for (Dt.lastIndex = 0; a = Dt.exec(t); ) {
8439
8440
  const { 0: i, index: l, groups: { qBase: u, qMod: c, invalidQ: h } } = a;
8440
8441
  if (i === "[")
8441
8442
  s || (r = l), s++;
@@ -8447,7 +8448,7 @@ function Yu(t) {
8447
8448
  throw new Error(`Invalid quantifier "${i}"`);
8448
8449
  let d = -1;
8449
8450
  if (/^\{\d+\}$/.test(u))
8450
- t = qu(t, l + u.length, c, "");
8451
+ t = Vu(t, l + u.length, c, "");
8451
8452
  else {
8452
8453
  if (o === ")" || o === "]") {
8453
8454
  const f = o === ")" ? n : r;
@@ -8458,7 +8459,7 @@ function Yu(t) {
8458
8459
  t = `${t.slice(0, l - o.length)}(?>${o}${u})${t.slice(l + i.length)}`;
8459
8460
  d += 4;
8460
8461
  }
8461
- Ot.lastIndex += d;
8462
+ Dt.lastIndex += d;
8462
8463
  } else i[0] === "(" ? e.push(l) : i === ")" && (n = e.length ? e.pop() : null);
8463
8464
  o = i;
8464
8465
  }
@@ -8466,8 +8467,8 @@ function Yu(t) {
8466
8467
  pattern: t
8467
8468
  };
8468
8469
  }
8469
- const Y = String.raw, Ju = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${Ju}`, xt = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, qo = Y`${xt}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${xt}|${ln}|\(\?|\\?.`, "gsu"), Dt = "Cannot use multiple overlapping recursions";
8470
- function Zu(t, e) {
8470
+ const Y = String.raw, Zu = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${Zu}`, Et = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, qo = Y`${Et}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${Et}|${ln}|\(\?|\\?.`, "gsu"), Gt = "Cannot use multiple overlapping recursions";
8471
+ function Qu(t, e) {
8471
8472
  const { hiddenCaptures: n, mode: r } = {
8472
8473
  hiddenCaptures: [],
8473
8474
  mode: "plugin",
@@ -8492,7 +8493,7 @@ function Zu(t, e) {
8492
8493
  f === "]" && c--;
8493
8494
  else if (m) {
8494
8495
  if (wr(m), u)
8495
- throw new Error(Dt);
8496
+ throw new Error(Gt);
8496
8497
  if (a)
8497
8498
  throw new Error(
8498
8499
  // When used in `external` mode by transpilers other than Regex+, backrefs might have
@@ -8501,7 +8502,7 @@ function Zu(t, e) {
8501
8502
  );
8502
8503
  const y = t.slice(0, d.index), _ = t.slice(he.lastIndex);
8503
8504
  if (nt(_, ln, J.DEFAULT))
8504
- throw new Error(Dt);
8505
+ throw new Error(Gt);
8505
8506
  const S = +m - 1;
8506
8507
  t = Cr(
8507
8508
  y,
@@ -8526,13 +8527,13 @@ function Zu(t, e) {
8526
8527
  for (const te of l)
8527
8528
  if (te.name === g || te.num === +g) {
8528
8529
  if (y = !0, te.hasRecursedWithin)
8529
- throw new Error(Dt);
8530
+ throw new Error(Gt);
8530
8531
  break;
8531
8532
  }
8532
8533
  if (!y)
8533
8534
  throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? g : Y`\g<${g}&R=${C}>`}"`);
8534
- const _ = i.get(g), S = Xu(t, _);
8535
- if (a && nt(S, Y`${xt}|\((?!\?)`, J.DEFAULT))
8535
+ const _ = i.get(g), S = Ku(t, _);
8536
+ if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
8536
8537
  throw new Error(
8537
8538
  // When used in `external` mode by transpilers other than Regex+, backrefs might have
8538
8539
  // gone through conversion from named to numbered, so avoid a misleading error
@@ -8582,7 +8583,7 @@ function wr(t) {
8582
8583
  }
8583
8584
  function Cr(t, e, n, r, o, s, a) {
8584
8585
  const i = /* @__PURE__ */ new Set();
8585
- r && Ho(t + e, xt, ({ groups: { captureName: u } }) => {
8586
+ r && Ho(t + e, Et, ({ groups: { captureName: u } }) => {
8586
8587
  i.add(u);
8587
8588
  }, J.DEFAULT);
8588
8589
  const l = [
@@ -8608,7 +8609,7 @@ function _r(t, e, n, r, o, s, a) {
8608
8609
  const g = `_$${h}`;
8609
8610
  if (p || f) {
8610
8611
  const C = a + s.length + 1;
8611
- return s.push(C), Qu(o, C), p ? d : `(?<${f}${g}>`;
8612
+ return s.push(C), ec(o, C), p ? d : `(?<${f}${g}>`;
8612
8613
  }
8613
8614
  return Y`\k<${m}${g}>`;
8614
8615
  },
@@ -8617,7 +8618,7 @@ function _r(t, e, n, r, o, s, a) {
8617
8618
  }
8618
8619
  return u;
8619
8620
  }
8620
- function Qu(t, e) {
8621
+ function ec(t, e) {
8621
8622
  for (let n = 0; n < t.length; n++)
8622
8623
  t[n] >= e && t[n]++;
8623
8624
  }
@@ -8671,7 +8672,7 @@ ae.bugFlagVLiteralHyphenIsRange = ae.unicodeSets ? (() => {
8671
8672
  return !1;
8672
8673
  })() : !1;
8673
8674
  ae.bugNestedClassIgnoresNegation = ae.unicodeSets && new RegExp("[[^a]]", "v").test("a");
8674
- function yt(t, { enable: e, disable: n }) {
8675
+ function bt(t, { enable: e, disable: n }) {
8675
8676
  return {
8676
8677
  dotAll: !n?.dotAll && !!(e?.dotAll || t.dotAll),
8677
8678
  ignoreCase: !n?.ignoreCase && !!(e?.ignoreCase || t.ignoreCase)
@@ -8683,7 +8684,7 @@ function qe(t, e, n) {
8683
8684
  function un(t, e) {
8684
8685
  return kr[t] >= kr[e];
8685
8686
  }
8686
- function ec(t, e) {
8687
+ function tc(t, e) {
8687
8688
  if (t == null)
8688
8689
  throw new Error(e ?? "Value expected");
8689
8690
  return t;
@@ -8692,7 +8693,7 @@ var kr = {
8692
8693
  ES2025: 2025,
8693
8694
  ES2024: 2024,
8694
8695
  ES2018: 2018
8695
- }, tc = (
8696
+ }, nc = (
8696
8697
  /** @type {const} */
8697
8698
  {
8698
8699
  auto: "auto",
@@ -8704,7 +8705,7 @@ var kr = {
8704
8705
  function Vo(t = {}) {
8705
8706
  if ({}.toString.call(t) !== "[object Object]")
8706
8707
  throw new Error("Unexpected options");
8707
- if (t.target !== void 0 && !tc[t.target])
8708
+ if (t.target !== void 0 && !nc[t.target])
8708
8709
  throw new Error(`Unexpected target "${t.target}"`);
8709
8710
  const e = {
8710
8711
  // Sets the level of emulation rigor/strictness.
@@ -8748,16 +8749,16 @@ function Vo(t = {}) {
8748
8749
  };
8749
8750
  return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
8750
8751
  }
8751
- var nc = "[ -\r ]", rc = /* @__PURE__ */ new Set([
8752
+ var rc = "[ -\r ]", oc = /* @__PURE__ */ new Set([
8752
8753
  M(304),
8753
8754
  // İ
8754
8755
  M(305)
8755
8756
  // ı
8756
8757
  ]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
8757
8758
  function Xo(t) {
8758
- if (rc.has(t))
8759
+ if (oc.has(t))
8759
8760
  return [t];
8760
- const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = ac.get(n), s = oc.get(n), a = sc.get(n);
8761
+ const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = ic.get(n), s = sc.get(n), a = ac.get(n);
8761
8762
  return [...r].length === 1 && e.add(r), a && e.add(a), o && e.add(o), e.add(n), s && e.add(s), [...e];
8762
8763
  }
8763
8764
  var An = /* @__PURE__ */ new Map(
@@ -8851,13 +8852,13 @@ Uppercase Upper
8851
8852
  Variation_Selector VS
8852
8853
  White_Space space
8853
8854
  XID_Continue XIDC
8854
- XID_Start XIDS`.split(/\s/).map((t) => [vt(t), t])
8855
- ), oc = /* @__PURE__ */ new Map([
8855
+ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
8856
+ ), sc = /* @__PURE__ */ new Map([
8856
8857
  ["s", M(383)],
8857
8858
  // s, ſ
8858
8859
  [M(383), "s"]
8859
8860
  // ſ, s
8860
- ]), sc = /* @__PURE__ */ new Map([
8861
+ ]), ac = /* @__PURE__ */ new Map([
8861
8862
  [M(223), M(7838)],
8862
8863
  // ß, ẞ
8863
8864
  [M(107), M(8490)],
@@ -8866,18 +8867,18 @@ XID_Start XIDS`.split(/\s/).map((t) => [vt(t), t])
8866
8867
  // å, Å (Angstrom)
8867
8868
  [M(969), M(8486)]
8868
8869
  // ω, Ω (Ohm)
8869
- ]), ac = new Map([
8870
+ ]), ic = new Map([
8870
8871
  ie(453),
8871
8872
  ie(456),
8872
8873
  ie(459),
8873
8874
  ie(498),
8874
- ...Gt(8072, 8079),
8875
- ...Gt(8088, 8095),
8876
- ...Gt(8104, 8111),
8875
+ ...Ft(8072, 8079),
8876
+ ...Ft(8088, 8095),
8877
+ ...Ft(8104, 8111),
8877
8878
  ie(8124),
8878
8879
  ie(8140),
8879
8880
  ie(8188)
8880
- ]), ic = /* @__PURE__ */ new Map([
8881
+ ]), lc = /* @__PURE__ */ new Map([
8881
8882
  ["alnum", v`[\p{Alpha}\p{Nd}]`],
8882
8883
  ["alpha", v`\p{Alpha}`],
8883
8884
  ["ascii", v`\p{ASCII}`],
@@ -8894,7 +8895,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [vt(t), t])
8894
8895
  ["word", v`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
8895
8896
  ["xdigit", v`\p{AHex}`]
8896
8897
  ]);
8897
- function lc(t, e) {
8898
+ function uc(t, e) {
8898
8899
  const n = [];
8899
8900
  for (let r = t; r <= e; r++)
8900
8901
  n.push(r);
@@ -8904,8 +8905,8 @@ function ie(t) {
8904
8905
  const e = M(t);
8905
8906
  return [e.toLowerCase(), e];
8906
8907
  }
8907
- function Gt(t, e) {
8908
- return lc(t, e).map((n) => ie(n));
8908
+ function Ft(t, e) {
8909
+ return uc(t, e).map((n) => ie(n));
8909
8910
  }
8910
8911
  var Ko = /* @__PURE__ */ new Set([
8911
8912
  "Lower",
@@ -8923,7 +8924,7 @@ var Ko = /* @__PURE__ */ new Set([
8923
8924
  // generally extreme edge cases and using such properties case insensitively generally produces
8924
8925
  // undesired behavior anyway
8925
8926
  ]);
8926
- function uc(t, e) {
8927
+ function cc(t, e) {
8927
8928
  const n = {
8928
8929
  // A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
8929
8930
  // - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
@@ -8954,7 +8955,7 @@ function uc(t, e) {
8954
8955
  spaceIsAscii: t.flags.spaceIsAscii,
8955
8956
  wordIsAscii: t.flags.wordIsAscii
8956
8957
  };
8957
- Be(t, cc, r);
8958
+ Be(t, hc, r);
8958
8959
  const o = {
8959
8960
  dotAll: t.flags.dotAll,
8960
8961
  ignoreCase: t.flags.ignoreCase
@@ -8969,16 +8970,16 @@ function uc(t, e) {
8969
8970
  reffedNodesByReferencer: /* @__PURE__ */ new Map(),
8970
8971
  subroutineRefMap: r.subroutineRefMap
8971
8972
  };
8972
- Be(t, hc, s);
8973
+ Be(t, pc, s);
8973
8974
  const a = {
8974
8975
  groupsByName: s.groupsByName,
8975
8976
  highestOrphanBackref: 0,
8976
8977
  numCapturesToLeft: 0,
8977
8978
  reffedNodesByReferencer: s.reffedNodesByReferencer
8978
8979
  };
8979
- return Be(t, pc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
8980
+ return Be(t, fc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
8980
8981
  }
8981
- var cc = {
8982
+ var hc = {
8982
8983
  AbsenceFunction({ node: t, parent: e, replaceWith: n }) {
8983
8984
  const { body: r, kind: o } = t;
8984
8985
  if (o === "repeater") {
@@ -9020,7 +9021,7 @@ var cc = {
9020
9021
  if (l === "line_end")
9021
9022
  a(L(fe({ body: [
9022
9023
  me({ body: [on("string_end")] }),
9023
- me({ body: [kt(10)] })
9024
+ me({ body: [vt(10)] })
9024
9025
  // `\n`
9025
9026
  ] }), e));
9026
9027
  else if (l === "line_start")
@@ -9030,7 +9031,7 @@ var cc = {
9030
9031
  o.flags.sticky = !0, s();
9031
9032
  else {
9032
9033
  const p = r[n - 1];
9033
- if (p && bc(p))
9034
+ if (p && wc(p))
9034
9035
  a(L(fe({ negate: !0 }), e));
9035
9036
  else {
9036
9037
  if (h)
@@ -9050,11 +9051,11 @@ var cc = {
9050
9051
  },
9051
9052
  Backreference({ node: t }, { jsGroupNameMap: e }) {
9052
9053
  let { ref: n } = t;
9053
- typeof n == "string" && !Bt(n) && (n = Ft(n, e), t.ref = n);
9054
+ typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
9054
9055
  },
9055
9056
  CapturingGroup({ node: t }, { jsGroupNameMap: e, subroutineRefMap: n }) {
9056
9057
  let { name: r } = t;
9057
- r && !Bt(r) && (r = Ft(r, e), t.name = r), n.set(t.number, t), r && n.set(r, t);
9058
+ r && !jt(r) && (r = Bt(r, e), t.name = r), n.set(t.number, t), r && n.set(r, t);
9058
9059
  },
9059
9060
  CharacterClassRange({ node: t, parent: e, replaceWith: n }) {
9060
9061
  if (e.kind === "intersection") {
@@ -9069,7 +9070,7 @@ var cc = {
9069
9070
  return;
9070
9071
  }
9071
9072
  if (a && (l === "space" || c === "space")) {
9072
- n(L(jt(oe(nc), u), e));
9073
+ n(L(Ut(oe(rc), u), e));
9073
9074
  return;
9074
9075
  }
9075
9076
  if (i && (l === "word" || c === "word")) {
@@ -9107,13 +9108,13 @@ var cc = {
9107
9108
  }[c];
9108
9109
  u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-􏿿`), n(L(oe(`[${h}]`), e));
9109
9110
  } else
9110
- n(L(jt(oe(ic.get(c)), u), e));
9111
+ n(L(Ut(oe(lc.get(c)), u), e));
9111
9112
  else if (l === "property")
9112
- An.has(vt(c)) || (t.key = "sc");
9113
+ An.has(xt(c)) || (t.key = "sc");
9113
9114
  else if (l === "space")
9114
9115
  n(le(ke("space", { negate: u }), e));
9115
9116
  else if (l === "word")
9116
- n(L(jt(oe(re), u), e));
9117
+ n(L(Ut(oe(re), u), e));
9117
9118
  else
9118
9119
  throw new Error(`Unexpected character set kind "${l}"`);
9119
9120
  },
@@ -9227,9 +9228,9 @@ var cc = {
9227
9228
  },
9228
9229
  Subroutine({ node: t }, { jsGroupNameMap: e }) {
9229
9230
  let { ref: n } = t;
9230
- typeof n == "string" && !Bt(n) && (n = Ft(n, e), t.ref = n);
9231
+ typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
9231
9232
  }
9232
- }, hc = {
9233
+ }, pc = {
9233
9234
  Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
9234
9235
  const { orphan: r, ref: o } = t;
9235
9236
  r || n.set(t, [...e.get(o).map(({ node: s }) => s)]);
@@ -9288,7 +9289,7 @@ var cc = {
9288
9289
  },
9289
9290
  Group: {
9290
9291
  enter({ node: t }, e) {
9291
- e.prevFlags = e.currentFlags, t.flags && (e.currentFlags = yt(e.currentFlags, t.flags));
9292
+ e.prevFlags = e.currentFlags, t.flags && (e.currentFlags = bt(e.currentFlags, t.flags));
9292
9293
  },
9293
9294
  exit(t, e) {
9294
9295
  e.currentFlags = e.prevFlags;
@@ -9309,23 +9310,23 @@ var cc = {
9309
9310
  );
9310
9311
  let u = l;
9311
9312
  if (!i) {
9312
- const c = Zo(gc(
9313
+ const c = Zo(mc(
9313
9314
  a,
9314
9315
  (d) => d.type === "Group" && !!d.flags
9315
- )), h = c ? yt(r.globalFlags, c) : r.globalFlags;
9316
- fc(h, r.currentFlags) || (u = Q({
9317
- flags: mc(h)
9316
+ )), h = c ? bt(r.globalFlags, c) : r.globalFlags;
9317
+ dc(h, r.currentFlags) || (u = Q({
9318
+ flags: yc(h)
9318
9319
  }), u.body[0].body.push(l));
9319
9320
  }
9320
9321
  n(L(u, e), { traverse: !i });
9321
9322
  }
9322
- }, pc = {
9323
+ }, fc = {
9323
9324
  Backreference({ node: t, parent: e, replaceWith: n }, r) {
9324
9325
  if (t.orphan) {
9325
9326
  r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
9326
9327
  return;
9327
9328
  }
9328
- const s = r.reffedNodesByReferencer.get(t).filter((a) => dc(a, t));
9329
+ const s = r.reffedNodesByReferencer.get(t).filter((a) => gc(a, t));
9329
9330
  if (!s.length)
9330
9331
  n(L(fe({ negate: !0 }), e));
9331
9332
  else if (s.length > 1) {
@@ -9362,10 +9363,10 @@ function Yo(t) {
9362
9363
  }
9363
9364
  });
9364
9365
  }
9365
- function fc(t, e) {
9366
+ function dc(t, e) {
9366
9367
  return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
9367
9368
  }
9368
- function dc(t, e) {
9369
+ function gc(t, e) {
9369
9370
  let n = e;
9370
9371
  do {
9371
9372
  if (n.type === "Regex")
@@ -9394,13 +9395,13 @@ function vr(t) {
9394
9395
  const e = Uo(t);
9395
9396
  return e.isRecursive = !0, e;
9396
9397
  }
9397
- function gc(t, e) {
9398
+ function mc(t, e) {
9398
9399
  const n = [];
9399
9400
  for (; t = t.parent; )
9400
9401
  (!e || e(t)) && n.push(t);
9401
9402
  return n;
9402
9403
  }
9403
- function Ft(t, e) {
9404
+ function Bt(t, e) {
9404
9405
  if (e.has(t))
9405
9406
  return e.get(t);
9406
9407
  const n = `$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug, "_")}`;
@@ -9414,7 +9415,7 @@ function Zo(t) {
9414
9415
  });
9415
9416
  }), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
9416
9417
  }
9417
- function mc({ dotAll: t, ignoreCase: e }) {
9418
+ function yc({ dotAll: t, ignoreCase: e }) {
9418
9419
  const n = {};
9419
9420
  return (t || e) && (n.enable = {}, t && (n.enable.dotAll = !0), e && (n.enable.ignoreCase = !0)), (!t || !e) && (n.disable = {}, !t && (n.disable.dotAll = !0), !e && (n.disable.ignoreCase = !0)), n;
9420
9421
  }
@@ -9425,7 +9426,7 @@ function Qo(t) {
9425
9426
  return Array.isArray(e) ? e : e ? [e] : null;
9426
9427
  }
9427
9428
  function es(t) {
9428
- const e = t.find((n) => n.kind === "search_start" || wc(n, { negate: !1 }) || !yc(n));
9429
+ const e = t.find((n) => n.kind === "search_start" || Cc(n, { negate: !1 }) || !bc(n));
9429
9430
  if (!e)
9430
9431
  return null;
9431
9432
  if (e.kind === "search_start")
@@ -9451,10 +9452,10 @@ function ts(t, e) {
9451
9452
  return !0;
9452
9453
  return !1;
9453
9454
  }
9454
- function yc({ type: t }) {
9455
+ function bc({ type: t }) {
9455
9456
  return t === "Assertion" || t === "Directive" || t === "LookaroundAssertion";
9456
9457
  }
9457
- function bc(t) {
9458
+ function wc(t) {
9458
9459
  const e = [
9459
9460
  "Character",
9460
9461
  "CharacterClass",
@@ -9462,7 +9463,7 @@ function bc(t) {
9462
9463
  ];
9463
9464
  return e.includes(t.type) || t.type === "Quantifier" && t.min && e.includes(t.body.type);
9464
9465
  }
9465
- function wc(t, e) {
9466
+ function Cc(t, e) {
9466
9467
  const n = {
9467
9468
  negate: null,
9468
9469
  ...e
@@ -9472,7 +9473,7 @@ function wc(t, e) {
9472
9473
  kind: "search_start"
9473
9474
  });
9474
9475
  }
9475
- function Bt(t) {
9476
+ function jt(t) {
9476
9477
  return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t);
9477
9478
  }
9478
9479
  function oe(t, e) {
@@ -9484,7 +9485,7 @@ function oe(t, e) {
9484
9485
  }).body;
9485
9486
  return r.length > 1 || r[0].body.length > 1 ? Q({ body: r }) : r[0].body[0];
9486
9487
  }
9487
- function jt(t, e) {
9488
+ function Ut(t, e) {
9488
9489
  return t.negate = e, t;
9489
9490
  }
9490
9491
  function le(t, e) {
@@ -9493,14 +9494,14 @@ function le(t, e) {
9493
9494
  function L(t, e) {
9494
9495
  return Yo(t), t.parent = e, t;
9495
9496
  }
9496
- function Cc(t, e) {
9497
+ function _c(t, e) {
9497
9498
  const n = Vo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
9498
9499
  if (!Number.isInteger(s) || s < 2 || s > 20)
9499
9500
  throw new Error("Invalid recursionLimit; use 2-20");
9500
9501
  let a = null, i = null;
9501
9502
  if (!o) {
9502
9503
  const f = [t.flags.ignoreCase];
9503
- Be(t, _c, {
9504
+ Be(t, Sc, {
9504
9505
  getCurrentModI: () => f.at(-1),
9505
9506
  popModI() {
9506
9507
  f.pop();
@@ -9540,7 +9541,7 @@ function Cc(t, e) {
9540
9541
  verbose: n.verbose
9541
9542
  };
9542
9543
  function h(f) {
9543
- return c.lastNode = u, u = f, ec(Sc[f.type], `Unexpected node type "${f.type}"`)(f, c, h);
9544
+ return c.lastNode = u, u = f, tc(kc[f.type], `Unexpected node type "${f.type}"`)(f, c, h);
9544
9545
  }
9545
9546
  const d = {
9546
9547
  pattern: t.body.map(h).join("|"),
@@ -9552,13 +9553,13 @@ function Cc(t, e) {
9552
9553
  f.hidden && d._hiddenCaptures.push(p), f.transferTo && qe(d._captureTransfers, f.transferTo, []).push(p);
9553
9554
  }), d;
9554
9555
  }
9555
- var _c = {
9556
+ var Sc = {
9556
9557
  "*": {
9557
9558
  enter({ node: t }, e) {
9558
9559
  if (Er(t)) {
9559
9560
  const n = e.getCurrentModI();
9560
9561
  e.pushModI(
9561
- t.flags ? yt({ ignoreCase: n }, t.flags).ignoreCase : n
9562
+ t.flags ? bt({ ignoreCase: n }, t.flags).ignoreCase : n
9562
9563
  );
9563
9564
  }
9564
9565
  },
@@ -9578,7 +9579,7 @@ var _c = {
9578
9579
  CharacterSet({ node: t }, e) {
9579
9580
  t.kind === "property" && Ko.has(t.value) && e.setHasCasedChar();
9580
9581
  }
9581
- }, Sc = {
9582
+ }, kc = {
9582
9583
  /**
9583
9584
  @param {AlternativeNode} node
9584
9585
  */
@@ -9639,7 +9640,7 @@ var _c = {
9639
9640
  let { body: a } = t;
9640
9641
  if (r === "intersection" && !e.useFlagV)
9641
9642
  throw new Error("Use of class intersection requires min target ES2024");
9642
- ae.bugFlagVLiteralHyphenIsRange && e.useFlagV && a.some(Ar) && (a = [kt(45), ...a.filter((u) => !Ar(u))]);
9643
+ ae.bugFlagVLiteralHyphenIsRange && e.useFlagV && a.some(Ar) && (a = [vt(45), ...a.filter((u) => !Ar(u))]);
9643
9644
  const i = () => `[${o ? "^" : ""}${a.map(n).join(r === "intersection" ? "&&" : "")}]`;
9644
9645
  if (!e.inCharClass) {
9645
9646
  if (
@@ -9684,7 +9685,7 @@ var _c = {
9684
9685
  }, s = _e(n, o), a = _e(r, o), i = /* @__PURE__ */ new Set();
9685
9686
  if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase) {
9686
9687
  const l = ns(t);
9687
- Ac(l).forEach((c) => {
9688
+ Rc(l).forEach((c) => {
9688
9689
  i.add(
9689
9690
  Array.isArray(c) ? `${_e(c[0], o)}-${_e(c[1], o)}` : _e(c, o)
9690
9691
  );
@@ -9730,9 +9731,9 @@ var _c = {
9730
9731
  */
9731
9732
  Group({ atomic: t, body: e, flags: n, parent: r }, o, s) {
9732
9733
  const a = o.currentFlags;
9733
- n && (o.currentFlags = yt(a, n));
9734
+ n && (o.currentFlags = bt(a, n));
9734
9735
  const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
9735
- r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Rc(t, n, o.useFlagMods)}${i})`;
9736
+ r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Ic(t, n, o.useFlagMods)}${i})`;
9736
9737
  return o.currentFlags = a, l;
9737
9738
  },
9738
9739
  /**
@@ -9745,7 +9746,7 @@ var _c = {
9745
9746
  @param {QuantifierNode} node
9746
9747
  */
9747
9748
  Quantifier(t, e, n) {
9748
- return n(t.body) + Ic(t);
9749
+ return n(t.body) + Nc(t);
9749
9750
  },
9750
9751
  /**
9751
9752
  @param {SubroutineNode & {isRecursive: true}} node
@@ -9756,7 +9757,7 @@ var _c = {
9756
9757
  const r = n.recursionLimit;
9757
9758
  return e === 0 ? `(?R=${r})` : v`\g<${e}&R=${r}>`;
9758
9759
  }
9759
- }, kc = /* @__PURE__ */ new Set([
9760
+ }, vc = /* @__PURE__ */ new Set([
9760
9761
  "$",
9761
9762
  "(",
9762
9763
  ")",
@@ -9771,7 +9772,7 @@ var _c = {
9771
9772
  "{",
9772
9773
  "|",
9773
9774
  "}"
9774
- ]), vc = /* @__PURE__ */ new Set([
9775
+ ]), xc = /* @__PURE__ */ new Set([
9775
9776
  "-",
9776
9777
  "\\",
9777
9778
  "]",
@@ -9779,7 +9780,7 @@ var _c = {
9779
9780
  // Literal `[` doesn't require escaping with flag u, but this can help work around regex source
9780
9781
  // linters and regex syntax processors that expect unescaped `[` to create a nested class
9781
9782
  "["
9782
- ]), xc = /* @__PURE__ */ new Set([
9783
+ ]), Ec = /* @__PURE__ */ new Set([
9783
9784
  "(",
9784
9785
  ")",
9785
9786
  "-",
@@ -9827,9 +9828,9 @@ var _c = {
9827
9828
  // paragraph separator
9828
9829
  [65279, v`\uFEFF`]
9829
9830
  // ZWNBSP/BOM
9830
- ]), Ec = /^\p{Cased}$/u;
9831
+ ]), Ac = /^\p{Cased}$/u;
9831
9832
  function Rn(t) {
9832
- return Ec.test(t);
9833
+ return Ac.test(t);
9833
9834
  }
9834
9835
  function ns(t, e) {
9835
9836
  const n = !!e?.firstOnly, r = t.min.value, o = t.max.value, s = [];
@@ -9855,20 +9856,20 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
9855
9856
  // Control chars, etc.; condition modeled on the Chrome developer console's display for strings
9856
9857
  t < 32 || t > 126 && t < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
9857
9858
  t > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
9858
- e && Nc(t)
9859
+ e && Pc(t)
9859
9860
  )
9860
9861
  return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
9861
- const o = n ? r ? xc : vc : kc, s = M(t);
9862
+ const o = n ? r ? Ec : xc : vc, s = M(t);
9862
9863
  return (o.has(s) ? "\\" : "") + s;
9863
9864
  }
9864
- function Ac(t) {
9865
+ function Rc(t) {
9865
9866
  const e = t.map((o) => o.codePointAt(0)).sort((o, s) => o - s), n = [];
9866
9867
  let r = null;
9867
9868
  for (let o = 0; o < e.length; o++)
9868
9869
  e[o + 1] === e[o] + 1 ? r ??= e[o] : r === null ? n.push(e[o]) : (n.push([r, e[o]]), r = null);
9869
9870
  return n;
9870
9871
  }
9871
- function Rc(t, e, n) {
9872
+ function Ic(t, e, n) {
9872
9873
  if (t)
9873
9874
  return ">";
9874
9875
  let r = "";
@@ -9878,7 +9879,7 @@ function Rc(t, e, n) {
9878
9879
  }
9879
9880
  return `${r}:`;
9880
9881
  }
9881
- function Ic({ kind: t, max: e, min: n }) {
9882
+ function Nc({ kind: t, max: e, min: n }) {
9882
9883
  let r;
9883
9884
  return !n && e === 1 ? r = "?" : !n && e === 1 / 0 ? r = "*" : n === 1 && e === 1 / 0 ? r = "+" : n === e ? r = `{${n}}` : r = `{${n},${e === 1 / 0 ? "" : e}}`, r + {
9884
9885
  greedy: "",
@@ -9889,13 +9890,13 @@ function Ic({ kind: t, max: e, min: n }) {
9889
9890
  function Er({ type: t }) {
9890
9891
  return t === "CapturingGroup" || t === "Group" || t === "LookaroundAssertion";
9891
9892
  }
9892
- function Nc(t) {
9893
+ function Pc(t) {
9893
9894
  return t > 47 && t < 58;
9894
9895
  }
9895
9896
  function Ar({ type: t, value: e }) {
9896
9897
  return t === "Character" && e === 45;
9897
9898
  }
9898
- var Pc = class cn extends RegExp {
9899
+ var Lc = class cn extends RegExp {
9899
9900
  /**
9900
9901
  @type {Map<number, {
9901
9902
  hidden?: true;
@@ -9953,7 +9954,7 @@ var Pc = class cn extends RegExp {
9953
9954
  transfers: [],
9954
9955
  ...r
9955
9956
  };
9956
- super(o ? "" : e, n), this.#r = e, this.#t = $c(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
9957
+ super(o ? "" : e, n), this.#r = e, this.#t = Tc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
9957
9958
  }
9958
9959
  o || (this.#e = this);
9959
9960
  }
@@ -9972,7 +9973,7 @@ var Pc = class cn extends RegExp {
9972
9973
  if (this.#o === "clip_search" && n && r) {
9973
9974
  this.lastIndex = 0;
9974
9975
  const o = this.#s(e.slice(r));
9975
- return o && (Lc(o, r, e, this.hasIndices), this.lastIndex += r), o;
9976
+ return o && ($c(o, r, e, this.hasIndices), this.lastIndex += r), o;
9976
9977
  }
9977
9978
  return this.#s(e);
9978
9979
  }
@@ -9998,7 +9999,7 @@ var Pc = class cn extends RegExp {
9998
9999
  if (!u)
9999
10000
  throw new Error(`Invalid capture transfer to "${u}"`);
10000
10001
  if (n[u] = r[a], this.hasIndices && (n.indices[u] = o[a]), n.groups) {
10001
- this.#n || (this.#n = Tc(this.source));
10002
+ this.#n || (this.#n = Mc(this.source));
10002
10003
  const c = this.#n.get(l);
10003
10004
  c && (n.groups[c] = r[a], this.hasIndices && (n.indices.groups[c] = o[a]));
10004
10005
  }
@@ -10007,7 +10008,7 @@ var Pc = class cn extends RegExp {
10007
10008
  return n;
10008
10009
  }
10009
10010
  };
10010
- function Lc(t, e, n, r) {
10011
+ function $c(t, e, n, r) {
10011
10012
  if (t.index += e, t.input = n, r) {
10012
10013
  const o = t.indices;
10013
10014
  for (let a = 0; a < o.length; a++) {
@@ -10021,7 +10022,7 @@ function Lc(t, e, n, r) {
10021
10022
  });
10022
10023
  }
10023
10024
  }
10024
- function $c(t, e) {
10025
+ function Tc(t, e) {
10025
10026
  const n = /* @__PURE__ */ new Map();
10026
10027
  for (const r of t)
10027
10028
  n.set(r, {
@@ -10032,7 +10033,7 @@ function $c(t, e) {
10032
10033
  qe(n, s, {}).transferTo = r;
10033
10034
  return n;
10034
10035
  }
10035
- function Tc(t) {
10036
+ function Mc(t) {
10036
10037
  const e = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map();
10037
10038
  let r = 0, o = 0, s;
10038
10039
  for (; s = e.exec(t); ) {
@@ -10041,11 +10042,11 @@ function Tc(t) {
10041
10042
  }
10042
10043
  return n;
10043
10044
  }
10044
- function Mc(t, e) {
10045
- const n = Oc(t, e);
10046
- return n.options ? new Pc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
10047
- }
10048
10045
  function Oc(t, e) {
10046
+ const n = Dc(t, e);
10047
+ return n.options ? new Lc(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
10048
+ }
10049
+ function Dc(t, e) {
10049
10050
  const n = Vo(e), r = Fo(t, {
10050
10051
  flags: n.flags,
10051
10052
  normalizeUnknownPropertyNames: !0,
@@ -10055,16 +10056,16 @@ function Oc(t, e) {
10055
10056
  },
10056
10057
  skipBackrefValidation: n.rules.allowOrphanBackrefs,
10057
10058
  unicodePropertyMap: An
10058
- }), o = uc(r, {
10059
+ }), o = cc(r, {
10059
10060
  accuracy: n.accuracy,
10060
10061
  asciiWordBoundaries: n.rules.asciiWordBoundaries,
10061
10062
  avoidSubclass: n.avoidSubclass,
10062
10063
  bestEffortTarget: n.target
10063
- }), s = Cc(o, n), a = Zu(s.pattern, {
10064
+ }), s = _c(o, n), a = Qu(s.pattern, {
10064
10065
  captureTransfers: s._captureTransfers,
10065
10066
  hiddenCaptures: s._hiddenCaptures,
10066
10067
  mode: "external"
10067
- }), i = Yu(a.pattern), l = Ku(i.pattern, {
10068
+ }), i = Ju(a.pattern), l = Yu(i.pattern, {
10068
10069
  captureTransfers: a.captureTransfers,
10069
10070
  hiddenCaptures: a.hiddenCaptures
10070
10071
  }), u = {
@@ -10086,7 +10087,7 @@ function Oc(t, e) {
10086
10087
  return u;
10087
10088
  }
10088
10089
  const Rr = 4294967295;
10089
- class Dc {
10090
+ class Gc {
10090
10091
  constructor(e, n = {}) {
10091
10092
  this.patterns = e, this.options = n;
10092
10093
  const {
@@ -10160,8 +10161,8 @@ class Dc {
10160
10161
  return null;
10161
10162
  }
10162
10163
  }
10163
- function Gc(t, e) {
10164
- return Mc(
10164
+ function Fc(t, e) {
10165
+ return Oc(
10165
10166
  t,
10166
10167
  {
10167
10168
  global: !0,
@@ -10187,7 +10188,7 @@ function Gc(t, e) {
10187
10188
  }
10188
10189
  );
10189
10190
  }
10190
- function Fc(t = {}) {
10191
+ function Bc(t = {}) {
10191
10192
  const e = Object.assign(
10192
10193
  {
10193
10194
  target: "auto",
@@ -10195,9 +10196,9 @@ function Fc(t = {}) {
10195
10196
  },
10196
10197
  t
10197
10198
  );
10198
- return e.regexConstructor ||= (n) => Gc(n, { target: e.target }), {
10199
+ return e.regexConstructor ||= (n) => Fc(n, { target: e.target }), {
10199
10200
  createScanner(n) {
10200
- return new Dc(n, e);
10201
+ return new Gc(n, e);
10201
10202
  },
10202
10203
  createString(n) {
10203
10204
  return {
@@ -10206,8 +10207,8 @@ function Fc(t = {}) {
10206
10207
  }
10207
10208
  };
10208
10209
  }
10209
- const Bc = Fc({ forgiving: !0 }), jc = await zl({
10210
- engine: Bc,
10210
+ const jc = Bc({ forgiving: !0 }), Uc = await Hl({
10211
+ engine: jc,
10211
10212
  langAlias: {
10212
10213
  markup: "html",
10213
10214
  svg: "xml",
@@ -10217,7 +10218,7 @@ const Bc = Fc({ forgiving: !0 }), jc = await zl({
10217
10218
  rss: "xml",
10218
10219
  webmanifest: "json"
10219
10220
  }
10220
- }), bt = {
10221
+ }), wt = {
10221
10222
  themes: {
10222
10223
  light: "github-light",
10223
10224
  dark: "github-dark"
@@ -10225,7 +10226,7 @@ const Bc = Fc({ forgiving: !0 }), jc = await zl({
10225
10226
  defaultColor: !1,
10226
10227
  inline: "tailing-curly-colon",
10227
10228
  addLanguageClass: !0,
10228
- transformers: [Yl(), Zl()],
10229
+ transformers: [Jl(), Ql()],
10229
10230
  parseMetaString: (t) => {
10230
10231
  const e = t.matchAll(
10231
10232
  /([a-z0-9]+)(?:=(["'])(.*?)\2|=(.*?)(?:\s|$)|(?:\s|$))/gi
@@ -10237,7 +10238,7 @@ const Bc = Fc({ forgiving: !0 }), jc = await zl({
10237
10238
  })
10238
10239
  );
10239
10240
  }
10240
- }, Uc = () => (t) => {
10241
+ }, zc = () => (t) => {
10241
10242
  Vr(t, "element", (e, n, r) => {
10242
10243
  if (e.tagName !== "code") return;
10243
10244
  const o = r?.type === "element" && r.tagName === "pre";
@@ -10247,59 +10248,59 @@ const Bc = Fc({ forgiving: !0 }), jc = await zl({
10247
10248
  class: as(e.properties.class, r.properties.class)
10248
10249
  }, r.properties = {});
10249
10250
  });
10250
- }, ih = (t) => [
10251
+ }, uh = (t) => [
10251
10252
  [
10252
- Xl,
10253
- jc,
10253
+ Kl,
10254
+ Uc,
10254
10255
  {
10255
- ...bt,
10256
- themes: t ?? bt.themes
10256
+ ...wt,
10257
+ themes: t ?? wt.themes
10257
10258
  }
10258
10259
  ],
10259
- Uc
10260
- ], zc = (t, e, n = "text", r = bt.themes) => {
10260
+ zc
10261
+ ], Hc = (t, e, n = "text", r = wt.themes) => {
10261
10262
  const o = t.codeToHast(e, {
10262
10263
  lang: n,
10263
- ...bt,
10264
+ ...wt,
10264
10265
  themes: r
10265
10266
  });
10266
- return Os(o, { Fragment: rs, jsx: Ut.jsx, jsxs: Ut.jsxs });
10267
- }, Hc = os(
10268
- ({ code: t, children: e, ...n }) => {
10269
- const { syntaxHighlighting: r } = ss().options;
10270
- ls(r?.highlighter, "Highlighter not found");
10271
- const o = zc(
10272
- r.highlighter,
10267
+ return Ds(o, { Fragment: rs, jsx: at.jsx, jsxs: at.jsxs });
10268
+ }, Wc = os(
10269
+ ({ code: t, children: e, embedded: n, ...r }) => {
10270
+ const { syntaxHighlighting: o } = ss().options;
10271
+ ls(o?.highlighter, "Highlighter not found");
10272
+ const s = Hc(
10273
+ o.highlighter,
10273
10274
  t ?? e,
10274
- n.language,
10275
- r.themes
10275
+ r.language,
10276
+ o.themes
10276
10277
  );
10277
- return /* @__PURE__ */ Ut.jsx(us, { ...n, children: o });
10278
+ return n ? /* @__PURE__ */ at.jsx(cs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(us, { ...r, children: s });
10278
10279
  }
10279
10280
  );
10280
- Hc.displayName = "SyntaxHighlight";
10281
+ Wc.displayName = "SyntaxHighlight";
10281
10282
  export {
10282
10283
  Fn as E,
10283
- Hc as S,
10284
+ Wc as S,
10284
10285
  H as V,
10285
- Ns as a,
10286
- oh as b,
10287
- rh as c,
10288
- Qc as d,
10286
+ Ps as a,
10287
+ ah as b,
10288
+ sh as c,
10289
+ th as d,
10289
10290
  Ir as e,
10290
10291
  Gr as f,
10291
- la as g,
10292
- zc as h,
10292
+ ua as g,
10293
+ Hc as h,
10293
10294
  Wr as i,
10294
- sa as j,
10295
+ aa as j,
10295
10296
  jn as k,
10296
- ih as l,
10297
- Jc as o,
10297
+ uh as l,
10298
+ Qc as o,
10298
10299
  Fr as p,
10299
- Ps as s,
10300
- Os as t,
10301
- Zc as u,
10300
+ Ls as s,
10301
+ Ds as t,
10302
+ eh as u,
10302
10303
  Vr as v,
10303
- ia as z
10304
+ la as z
10304
10305
  };
10305
- //# sourceMappingURL=SyntaxHighlight-CH9OUJre.js.map
10306
+ //# sourceMappingURL=SyntaxHighlight-C5ja40ix.js.map