zudoku 0.53.2 → 0.53.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/app/main.js +3 -9
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/lib/components/Banner.js +1 -1
  4. package/dist/lib/components/Banner.js.map +1 -1
  5. package/dist/lib/components/CategoryHeading.js +1 -1
  6. package/dist/lib/components/CategoryHeading.js.map +1 -1
  7. package/dist/lib/components/Header.js +1 -1
  8. package/dist/lib/components/Header.js.map +1 -1
  9. package/dist/lib/components/Pagination.js +1 -1
  10. package/dist/lib/components/Pagination.js.map +1 -1
  11. package/dist/lib/components/StatusPage.js +4 -0
  12. package/dist/lib/components/StatusPage.js.map +1 -1
  13. package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
  14. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
  15. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  16. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  17. package/dist/lib/plugins/openapi/OperationList.js +2 -1
  18. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  19. package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
  20. package/dist/lib/plugins/search-inkeep/index.js +35 -29
  21. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  22. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
  23. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  24. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  25. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
  26. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  27. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  28. package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
  29. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  30. package/dist/lib/ui/Alert.d.ts +1 -1
  31. package/dist/vite/build.js +7 -1
  32. package/dist/vite/build.js.map +1 -1
  33. package/dist/vite/plugin-mdx.js +2 -3
  34. package/dist/vite/plugin-mdx.js.map +1 -1
  35. package/lib/{Alert-CT_ViLrJ.js → Alert-SijAp9LN.js} +3 -3
  36. package/lib/Alert-SijAp9LN.js.map +1 -0
  37. package/lib/{MdxPage-8UuEK446.js → MdxPage-BFKqQsmK.js} +19 -19
  38. package/lib/{MdxPage-8UuEK446.js.map → MdxPage-BFKqQsmK.js.map} +1 -1
  39. package/lib/{OasProvider-BsWpguVO.js → OasProvider-Bdyvd6Ic.js} +2 -2
  40. package/lib/{OasProvider-BsWpguVO.js.map → OasProvider-Bdyvd6Ic.js.map} +1 -1
  41. package/lib/{OperationList-PnZbf3b2.js → OperationList-YZ7k-Rkt.js} +172 -172
  42. package/lib/{OperationList-PnZbf3b2.js.map → OperationList-YZ7k-Rkt.js.map} +1 -1
  43. package/lib/{Pagination-DY7gCrm4.js → Pagination-EViy7EHt.js} +9 -8
  44. package/lib/Pagination-EViy7EHt.js.map +1 -0
  45. package/lib/{RouteGuard-CbKd7_9h.js → RouteGuard-CX6A77iy.js} +2 -2
  46. package/lib/{RouteGuard-CbKd7_9h.js.map → RouteGuard-CX6A77iy.js.map} +1 -1
  47. package/lib/{SchemaList-D6k4DKWH.js → SchemaList--_f8Azv0.js} +8 -8
  48. package/lib/{SchemaList-D6k4DKWH.js.map → SchemaList--_f8Azv0.js.map} +1 -1
  49. package/lib/{SchemaView-BhgJ9WB8.js → SchemaView-7XWvSrbX.js} +4 -4
  50. package/lib/{SchemaView-BhgJ9WB8.js.map → SchemaView-7XWvSrbX.js.map} +1 -1
  51. package/lib/{SignUp-CpUD6DUM.js → SignUp-CXCezG-m.js} +3 -3
  52. package/lib/{SignUp-CpUD6DUM.js.map → SignUp-CXCezG-m.js.map} +1 -1
  53. package/lib/{Slot-DwZlQ-vX.js → Slot-tFjhrd8V.js} +14 -6
  54. package/lib/Slot-tFjhrd8V.js.map +1 -0
  55. package/lib/{SyntaxHighlight-CrjhGEwT.js → SyntaxHighlight-Bp_UsIXG.js} +754 -754
  56. package/lib/SyntaxHighlight-Bp_UsIXG.js.map +1 -0
  57. package/lib/{Toc-WCmwFkX-.js → Toc-Ck0YQtmd.js} +2 -2
  58. package/lib/{Toc-WCmwFkX-.js.map → Toc-Ck0YQtmd.js.map} +1 -1
  59. package/lib/{circular-BUMjK3JF.js → circular-BtKlhs07.js} +2 -2
  60. package/lib/{circular-BUMjK3JF.js.map → circular-BtKlhs07.js.map} +1 -1
  61. package/lib/{createServer-BPz8ZCrd.js → createServer-Di2U1Dg0.js} +4 -4
  62. package/lib/{createServer-BPz8ZCrd.js.map → createServer-Di2U1Dg0.js.map} +1 -1
  63. package/lib/{errors-DY-qOx9n.js → errors-Dv_yAK6M.js} +4 -4
  64. package/lib/{errors-DY-qOx9n.js.map → errors-Dv_yAK6M.js.map} +1 -1
  65. package/lib/{hook-Bd0yS8M0.js → hook-CZjW2buS.js} +420 -413
  66. package/lib/hook-CZjW2buS.js.map +1 -0
  67. package/lib/{index-dVBKCNMa.js → index-BTqwnlI5.js} +13 -13
  68. package/lib/{index-dVBKCNMa.js.map → index-BTqwnlI5.js.map} +1 -1
  69. package/lib/index-Bm35Tkgf.js +107 -0
  70. package/lib/index-Bm35Tkgf.js.map +1 -0
  71. package/lib/{index-CcV90rin.js → index-CeQqiMIG.js} +2 -2
  72. package/lib/{index-CcV90rin.js.map → index-CeQqiMIG.js.map} +1 -1
  73. package/lib/{index-C_xVKbf9.js → index-DKCEJ4Kd.js} +1056 -1040
  74. package/lib/index-DKCEJ4Kd.js.map +1 -0
  75. package/lib/ui/Alert.js.map +1 -1
  76. package/lib/ui/SyntaxHighlight.js +2 -2
  77. package/lib/zudoku.auth-auth0.js +1 -1
  78. package/lib/zudoku.auth-azureb2c.js +1553 -1556
  79. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  80. package/lib/zudoku.auth-clerk.js +2 -2
  81. package/lib/zudoku.auth-openid.js +2 -2
  82. package/lib/zudoku.components.js +5 -5
  83. package/lib/zudoku.hooks.js +3 -3
  84. package/lib/zudoku.plugin-api-catalog.js +5 -5
  85. package/lib/zudoku.plugin-api-keys.js +3 -3
  86. package/lib/zudoku.plugin-custom-pages.js +1 -1
  87. package/lib/zudoku.plugin-markdown.js +1 -1
  88. package/lib/zudoku.plugin-openapi.js +2 -2
  89. package/lib/zudoku.plugin-search-inkeep.js +54 -57
  90. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  91. package/lib/zudoku.plugin-search-pagefind.js +107 -103
  92. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  93. package/package.json +13 -12
  94. package/src/app/main.tsx +6 -14
  95. package/src/lib/components/Banner.tsx +0 -1
  96. package/src/lib/components/CategoryHeading.tsx +4 -1
  97. package/src/lib/components/Header.tsx +4 -1
  98. package/src/lib/components/Pagination.tsx +1 -0
  99. package/src/lib/components/StatusPage.tsx +5 -0
  100. package/src/lib/components/navigation/NavigationWrapper.tsx +4 -1
  101. package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
  102. package/src/lib/plugins/openapi/OperationList.tsx +3 -1
  103. package/src/lib/plugins/search-inkeep/index.tsx +54 -58
  104. package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
  105. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
  106. package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
  107. package/src/lib/ui/Alert.tsx +1 -1
  108. package/lib/Alert-CT_ViLrJ.js.map +0 -1
  109. package/lib/Pagination-DY7gCrm4.js.map +0 -1
  110. package/lib/Slot-DwZlQ-vX.js.map +0 -1
  111. package/lib/SyntaxHighlight-CrjhGEwT.js.map +0 -1
  112. package/lib/hook-Bd0yS8M0.js.map +0 -1
  113. package/lib/index-C_xVKbf9.js.map +0 -1
  114. package/lib/index-ClhS5TxS.js +0 -107
  115. package/lib/index-ClhS5TxS.js.map +0 -1
@@ -1,15 +1,15 @@
1
1
  import { j as at } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { Fragment as rs, memo as os } from "react";
3
- import { d as ss } from "./hook-Bd0yS8M0.js";
3
+ import { d as ss } from "./hook-CZjW2buS.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 { C as us } from "./CodeBlock-DAKxs_Tu.js";
7
7
  import { EmbeddedCodeBlock as cs } from "./ui/EmbeddedCodeBlock.js";
8
- function Qc() {
9
- }
10
8
  function eh() {
11
9
  }
12
- function th(t) {
10
+ function th() {
11
+ }
12
+ function nh(t) {
13
13
  const e = [], n = String(t || "");
14
14
  let r = n.indexOf(","), o = 0, s = !1;
15
15
  for (; !s; ) {
@@ -36,7 +36,7 @@ function Ct(t) {
36
36
  function Nn(t) {
37
37
  return t.replace(ds, "") === "";
38
38
  }
39
- let Ve = class {
39
+ let qe = class {
40
40
  /**
41
41
  * @param {SchemaType['property']} property
42
42
  * Property.
@@ -51,14 +51,14 @@ let Ve = class {
51
51
  this.normal = n, this.property = e, r && (this.space = r);
52
52
  }
53
53
  };
54
- Ve.prototype.normal = {};
55
- Ve.prototype.property = {};
56
- Ve.prototype.space = void 0;
54
+ qe.prototype.normal = {};
55
+ qe.prototype.property = {};
56
+ qe.prototype.space = void 0;
57
57
  function Nr(t, e) {
58
58
  const n = {}, r = {};
59
59
  for (const o of t)
60
60
  Object.assign(n, o.property), Object.assign(r, o.normal);
61
- return new Ve(n, r, e);
61
+ return new qe(n, r, e);
62
62
  }
63
63
  function zt(t) {
64
64
  return t.toLowerCase();
@@ -89,7 +89,7 @@ W.prototype.property = "";
89
89
  W.prototype.spaceSeparated = !1;
90
90
  W.prototype.space = void 0;
91
91
  let gs = 0;
92
- const x = ye(), $ = ye(), Pr = ye(), b = ye(), I = ye(), xe = ye(), V = ye();
92
+ const x = ye(), $ = ye(), Pr = ye(), b = ye(), I = ye(), xe = ye(), q = ye();
93
93
  function ye() {
94
94
  return 2 ** ++gs;
95
95
  }
@@ -97,7 +97,7 @@ const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
97
97
  __proto__: null,
98
98
  boolean: x,
99
99
  booleanish: $,
100
- commaOrSpaceSeparated: V,
100
+ commaOrSpaceSeparated: q,
101
101
  commaSeparated: xe,
102
102
  number: b,
103
103
  overloadedBoolean: Pr,
@@ -144,7 +144,7 @@ function Ie(t) {
144
144
  );
145
145
  t.mustUseProperty && t.mustUseProperty.includes(r) && (s.mustUseProperty = !0), e[r] = s, n[zt(r)] = r, n[zt(s.attribute)] = r;
146
146
  }
147
- return new Ve(e, n, t.space);
147
+ return new qe(e, n, t.space);
148
148
  }
149
149
  const Lr = Ie({
150
150
  properties: {
@@ -746,7 +746,7 @@ const ms = Ie({
746
746
  timelineBegin: "timelinebegin"
747
747
  },
748
748
  properties: {
749
- about: V,
749
+ about: q,
750
750
  accentHeight: b,
751
751
  accumulate: null,
752
752
  additive: null,
@@ -858,7 +858,7 @@ const ms = Ie({
858
858
  k2: b,
859
859
  k3: b,
860
860
  k4: b,
861
- kernelMatrix: V,
861
+ kernelMatrix: q,
862
862
  kernelUnitLength: null,
863
863
  keyPoints: null,
864
864
  // SEMI_COLON_SEPARATED
@@ -1015,21 +1015,21 @@ const ms = Ie({
1015
1015
  preserveAspectRatio: null,
1016
1016
  primitiveUnits: null,
1017
1017
  propagate: null,
1018
- property: V,
1018
+ property: q,
1019
1019
  r: null,
1020
1020
  radius: null,
1021
1021
  referrerPolicy: null,
1022
1022
  refX: null,
1023
1023
  refY: null,
1024
- rel: V,
1025
- rev: V,
1024
+ rel: q,
1025
+ rev: q,
1026
1026
  renderingIntent: null,
1027
1027
  repeatCount: null,
1028
1028
  repeatDur: null,
1029
- requiredExtensions: V,
1030
- requiredFeatures: V,
1031
- requiredFonts: V,
1032
- requiredFormats: V,
1029
+ requiredExtensions: q,
1030
+ requiredFeatures: q,
1031
+ requiredFonts: q,
1032
+ requiredFormats: q,
1033
1033
  resource: null,
1034
1034
  restart: null,
1035
1035
  result: null,
@@ -1057,7 +1057,7 @@ const ms = Ie({
1057
1057
  strikethroughThickness: b,
1058
1058
  string: null,
1059
1059
  stroke: null,
1060
- strokeDashArray: V,
1060
+ strokeDashArray: q,
1061
1061
  strokeDashOffset: null,
1062
1062
  strokeLineCap: null,
1063
1063
  strokeLineJoin: null,
@@ -1071,7 +1071,7 @@ const ms = Ie({
1071
1071
  syncMaster: null,
1072
1072
  syncTolerance: null,
1073
1073
  syncToleranceDefault: null,
1074
- systemLanguage: V,
1074
+ systemLanguage: q,
1075
1075
  tabIndex: b,
1076
1076
  tableValues: null,
1077
1077
  target: null,
@@ -1085,7 +1085,7 @@ const ms = Ie({
1085
1085
  title: null,
1086
1086
  transformBehavior: null,
1087
1087
  type: null,
1088
- typeOf: V,
1088
+ typeOf: q,
1089
1089
  to: null,
1090
1090
  transform: null,
1091
1091
  transformOrigin: null,
@@ -1199,7 +1199,7 @@ function ks(t) {
1199
1199
  return t.charAt(1).toUpperCase();
1200
1200
  }
1201
1201
  const vs = Nr([Lr, ms, Mr, Or, Dr], "html"), pn = Nr([Lr, ys, Mr, Or, Dr], "svg");
1202
- function sh(t) {
1202
+ function ah(t) {
1203
1203
  const e = String(t || "").trim();
1204
1204
  return e ? e.split(/[ \t\n\r\f]+/g) : [];
1205
1205
  }
@@ -1211,40 +1211,40 @@ function xs() {
1211
1211
  if ($n) return Rt;
1212
1212
  $n = 1;
1213
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 = `
1214
- `, u = "/", c = "*", h = "", d = "comment", f = "declaration";
1215
- Rt = function(m, g) {
1216
- if (typeof m != "string")
1214
+ `, u = "/", c = "*", h = "", f = "comment", d = "declaration";
1215
+ Rt = function(g, C) {
1216
+ if (typeof g != "string")
1217
1217
  throw new TypeError("First argument must be a string");
1218
- if (!m) return [];
1219
- g = g || {};
1220
- var C = 1, y = 1;
1218
+ if (!g) return [];
1219
+ C = C || {};
1220
+ var y = 1, m = 1;
1221
1221
  function _(R) {
1222
1222
  var k = R.match(e);
1223
- k && (C += k.length);
1223
+ k && (y += k.length);
1224
1224
  var G = R.lastIndexOf(l);
1225
- y = ~G ? R.length - G : y + R.length;
1225
+ m = ~G ? R.length - G : m + R.length;
1226
1226
  }
1227
1227
  function S() {
1228
- var R = { line: C, column: y };
1228
+ var R = { line: y, column: m };
1229
1229
  return function(k) {
1230
1230
  return k.position = new A(R), j(), k;
1231
1231
  };
1232
1232
  }
1233
1233
  function A(R) {
1234
- this.start = R, this.end = { line: C, column: y }, this.source = g.source;
1234
+ this.start = R, this.end = { line: y, column: m }, this.source = C.source;
1235
1235
  }
1236
- A.prototype.content = m;
1236
+ A.prototype.content = g;
1237
1237
  function D(R) {
1238
1238
  var k = new Error(
1239
- g.source + ":" + C + ":" + y + ": " + R
1239
+ C.source + ":" + y + ":" + m + ": " + R
1240
1240
  );
1241
- if (k.reason = R, k.filename = g.source, k.line = C, k.column = y, k.source = m, !g.silent) throw k;
1241
+ if (k.reason = R, k.filename = C.source, k.line = y, k.column = m, k.source = g, !C.silent) throw k;
1242
1242
  }
1243
1243
  function P(R) {
1244
- var k = R.exec(m);
1244
+ var k = R.exec(g);
1245
1245
  if (k) {
1246
1246
  var G = k[0];
1247
- return _(G), m = m.slice(G.length), k;
1247
+ return _(G), g = g.slice(G.length), k;
1248
1248
  }
1249
1249
  }
1250
1250
  function j() {
@@ -1258,14 +1258,14 @@ function xs() {
1258
1258
  }
1259
1259
  function ee() {
1260
1260
  var R = S();
1261
- if (!(u != m.charAt(0) || c != m.charAt(1))) {
1262
- for (var k = 2; h != m.charAt(k) && (c != m.charAt(k) || u != m.charAt(k + 1)); )
1261
+ if (!(u != g.charAt(0) || c != g.charAt(1))) {
1262
+ for (var k = 2; h != g.charAt(k) && (c != g.charAt(k) || u != g.charAt(k + 1)); )
1263
1263
  ++k;
1264
- if (k += 2, h === m.charAt(k - 1))
1264
+ if (k += 2, h === g.charAt(k - 1))
1265
1265
  return D("End of comment missing");
1266
- var G = m.slice(2, k - 2);
1267
- return y += 2, _(G), m = m.slice(k), y += 2, R({
1268
- type: d,
1266
+ var G = g.slice(2, k - 2);
1267
+ return m += 2, _(G), g = g.slice(k), m += 2, R({
1268
+ type: f,
1269
1269
  comment: G
1270
1270
  });
1271
1271
  }
@@ -1275,7 +1275,7 @@ function xs() {
1275
1275
  if (k) {
1276
1276
  if (ee(), !P(o)) return D("property missing ':'");
1277
1277
  var G = P(s), Te = R({
1278
- type: f,
1278
+ type: d,
1279
1279
  property: p(k[0].replace(t, h)),
1280
1280
  value: G ? p(G[0].replace(t, h)) : h
1281
1281
  });
@@ -1291,8 +1291,8 @@ function xs() {
1291
1291
  }
1292
1292
  return j(), te();
1293
1293
  };
1294
- function p(m) {
1295
- return m ? m.replace(i, h) : h;
1294
+ function p(g) {
1295
+ return g ? g.replace(i, h) : h;
1296
1296
  }
1297
1297
  return Rt;
1298
1298
  }
@@ -1363,7 +1363,7 @@ function Br(t) {
1363
1363
  };
1364
1364
  }
1365
1365
  }
1366
- function ah(t) {
1366
+ function ih(t) {
1367
1367
  const e = Fr(t), n = Ps(t);
1368
1368
  if (e && n)
1369
1369
  return { start: e, end: n };
@@ -1526,7 +1526,7 @@ function Gs(t, e, n) {
1526
1526
  const r = t.schema;
1527
1527
  let o = r;
1528
1528
  e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
1529
- const s = Hr(t, e.tagName, !1), a = qs(t, e);
1529
+ const s = Hr(t, e.tagName, !1), a = Vs(t, e);
1530
1530
  let i = gn(t, e);
1531
1531
  return Ms.has(e.tagName) && (i = i.filter(function(l) {
1532
1532
  return typeof l == "string" ? !Ct(l) : !0;
@@ -1552,7 +1552,7 @@ function js(t, e, n) {
1552
1552
  const r = t.schema;
1553
1553
  let o = r;
1554
1554
  e.name === "svg" && r.space === "html" && (o = pn, t.schema = o), t.ancestors.push(e);
1555
- const s = e.name === null ? t.Fragment : Hr(t, e.name, !0), a = Vs(t, e), i = gn(t, e);
1555
+ const s = e.name === null ? t.Fragment : Hr(t, e.name, !0), a = qs(t, e), i = gn(t, e);
1556
1556
  return zr(t, a, s, e), dn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
1557
1557
  }
1558
1558
  function Us(t, e, n) {
@@ -1596,7 +1596,7 @@ function Ws(t, e) {
1596
1596
  );
1597
1597
  }
1598
1598
  }
1599
- function qs(t, e) {
1599
+ function Vs(t, e) {
1600
1600
  const n = {};
1601
1601
  let r, o;
1602
1602
  for (o in e.properties)
@@ -1616,7 +1616,7 @@ function qs(t, e) {
1616
1616
  }
1617
1617
  return n;
1618
1618
  }
1619
- function Vs(t, e) {
1619
+ function qs(t, e) {
1620
1620
  const n = {};
1621
1621
  for (const r of e.attributes)
1622
1622
  if (r.type === "mdxJsxExpressionAttribute")
@@ -1836,7 +1836,7 @@ function na() {
1836
1836
  function ra(t) {
1837
1837
  return t !== null && typeof t == "object" && "type" in t;
1838
1838
  }
1839
- const qr = [], oa = !0, Fn = !1, sa = "skip";
1839
+ const Vr = [], oa = !0, Fn = !1, sa = "skip";
1840
1840
  function aa(t, e, n, r) {
1841
1841
  let o;
1842
1842
  typeof e == "function" && typeof n != "function" ? (r = n, n = e) : o = e;
@@ -1848,43 +1848,43 @@ function aa(t, e, n, r) {
1848
1848
  l && typeof l == "object" ? l : {}
1849
1849
  );
1850
1850
  if (typeof h.type == "string") {
1851
- const f = (
1851
+ const d = (
1852
1852
  // `hast`
1853
1853
  typeof h.tagName == "string" ? h.tagName : (
1854
1854
  // `xast`
1855
1855
  typeof h.name == "string" ? h.name : void 0
1856
1856
  )
1857
1857
  );
1858
- Object.defineProperty(d, "name", {
1859
- value: "node (" + (l.type + (f ? "<" + f + ">" : "")) + ")"
1858
+ Object.defineProperty(f, "name", {
1859
+ value: "node (" + (l.type + (d ? "<" + d + ">" : "")) + ")"
1860
1860
  });
1861
1861
  }
1862
- return d;
1863
- function d() {
1864
- let f = qr, p, m, g;
1865
- if ((!e || s(l, u, c[c.length - 1] || void 0)) && (f = ia(n(l, c)), f[0] === Fn))
1866
- return f;
1862
+ return f;
1863
+ function f() {
1864
+ let d = Vr, p, g, C;
1865
+ if ((!e || s(l, u, c[c.length - 1] || void 0)) && (d = ia(n(l, c)), d[0] === Fn))
1866
+ return d;
1867
1867
  if ("children" in l && l.children) {
1868
- const C = (
1868
+ const y = (
1869
1869
  /** @type {UnistParent} */
1870
1870
  l
1871
1871
  );
1872
- if (C.children && f[0] !== sa)
1873
- for (m = (r ? C.children.length : -1) + a, g = c.concat(C); m > -1 && m < C.children.length; ) {
1874
- const y = C.children[m];
1875
- if (p = i(y, m, g)(), p[0] === Fn)
1872
+ if (y.children && d[0] !== sa)
1873
+ for (g = (r ? y.children.length : -1) + a, C = c.concat(y); g > -1 && g < y.children.length; ) {
1874
+ const m = y.children[g];
1875
+ if (p = i(m, g, C)(), p[0] === Fn)
1876
1876
  return p;
1877
- m = typeof p[1] == "number" ? p[1] : m + a;
1877
+ g = typeof p[1] == "number" ? p[1] : g + a;
1878
1878
  }
1879
1879
  }
1880
- return f;
1880
+ return d;
1881
1881
  }
1882
1882
  }
1883
1883
  }
1884
1884
  function ia(t) {
1885
- return Array.isArray(t) ? t : typeof t == "number" ? [oa, t] : t == null ? qr : [t];
1885
+ return Array.isArray(t) ? t : typeof t == "number" ? [oa, t] : t == null ? Vr : [t];
1886
1886
  }
1887
- function Vr(t, e, n, r) {
1887
+ function qr(t, e, n, r) {
1888
1888
  let o, s, a;
1889
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);
1890
1890
  function i(l, u) {
@@ -2151,8 +2151,8 @@ function ga(t) {
2151
2151
  if (typeof a.settings.fontStyle == "string") {
2152
2152
  l = 0;
2153
2153
  let h = a.settings.fontStyle.split(" ");
2154
- for (let d = 0, f = h.length; d < f; d++)
2155
- switch (h[d]) {
2154
+ for (let f = 0, d = h.length; f < d; f++)
2155
+ switch (h[f]) {
2156
2156
  case "italic":
2157
2157
  l = l | 1;
2158
2158
  break;
@@ -2171,11 +2171,11 @@ function ga(t) {
2171
2171
  typeof a.settings.foreground == "string" && Un(a.settings.foreground) && (u = a.settings.foreground);
2172
2172
  let c = null;
2173
2173
  typeof a.settings.background == "string" && Un(a.settings.background) && (c = a.settings.background);
2174
- for (let h = 0, d = i.length; h < d; h++) {
2175
- let p = i[h].trim().split(" "), m = p[p.length - 1], g = null;
2176
- p.length > 1 && (g = p.slice(0, p.length - 1), g.reverse()), n[r++] = new ma(
2177
- m,
2174
+ for (let h = 0, f = i.length; h < f; h++) {
2175
+ let p = i[h].trim().split(" "), g = p[p.length - 1], C = null;
2176
+ p.length > 1 && (C = p.slice(0, p.length - 1), C.reverse()), n[r++] = new ma(
2178
2177
  g,
2178
+ C,
2179
2179
  o,
2180
2180
  l,
2181
2181
  u,
@@ -2200,7 +2200,7 @@ function ya(t, e) {
2200
2200
  let l = t.shift();
2201
2201
  l.fontStyle !== -1 && (n = l.fontStyle), l.foreground !== null && (r = l.foreground), l.background !== null && (o = l.background);
2202
2202
  }
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
+ let s = new ba(e), a = new eo(n, s.getId(r), s.getId(o)), i = new Ca(new Vt(0, null, -1, 0, 0), []);
2204
2204
  for (let l = 0, u = t.length; l < u; l++) {
2205
2205
  let c = t[l];
2206
2206
  i.insert(0, c.scope, c.parentScopes, c.fontStyle, s.getId(c.foreground), s.getId(c.background));
@@ -2234,7 +2234,7 @@ var ba = class {
2234
2234
  getColorMap() {
2235
2235
  return this._id2color.slice(0);
2236
2236
  }
2237
- }, wa = Object.freeze([]), qt = class to {
2237
+ }, wa = Object.freeze([]), Vt = class to {
2238
2238
  scopeDepth;
2239
2239
  parentScopes;
2240
2240
  fontStyle;
@@ -2255,7 +2255,7 @@ var ba = class {
2255
2255
  acceptOverwrite(e, n, r, o) {
2256
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);
2257
2257
  }
2258
- }, Ca = class Vt {
2258
+ }, Ca = class qt {
2259
2259
  constructor(e, n = [], r = {}) {
2260
2260
  this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
2261
2261
  }
@@ -2279,7 +2279,7 @@ var ba = class {
2279
2279
  return this._children[o].match(s);
2280
2280
  }
2281
2281
  const n = this._rulesWithParentScopes.concat(this._mainRule);
2282
- return n.sort(Vt._cmpBySpecificity), n;
2282
+ return n.sort(qt._cmpBySpecificity), n;
2283
2283
  }
2284
2284
  insert(e, n, r, o, s, a) {
2285
2285
  if (n === "") {
@@ -2289,7 +2289,7 @@ var ba = class {
2289
2289
  let i = n.indexOf("."), l, u;
2290
2290
  i === -1 ? (l = n, u = "") : (l = n.substring(0, i), u = n.substring(i + 1));
2291
2291
  let c;
2292
- this._children.hasOwnProperty(l) ? c = this._children[l] : (c = new Vt(this._mainRule.clone(), qt.cloneArr(this._rulesWithParentScopes)), this._children[l] = c), c.insert(e + 1, u, r, o, s, a);
2292
+ this._children.hasOwnProperty(l) ? c = this._children[l] : (c = new qt(this._mainRule.clone(), Vt.cloneArr(this._rulesWithParentScopes)), this._children[l] = c), c.insert(e + 1, u, r, o, s, a);
2293
2293
  }
2294
2294
  _doInsertHere(e, n, r, o, s) {
2295
2295
  if (n === null) {
@@ -2303,7 +2303,7 @@ var ba = class {
2303
2303
  return;
2304
2304
  }
2305
2305
  }
2306
- r === -1 && (r = this._mainRule.fontStyle), o === 0 && (o = this._mainRule.foreground), s === 0 && (s = this._mainRule.background), this._rulesWithParentScopes.push(new qt(e, n, r, o, s));
2306
+ r === -1 && (r = this._mainRule.fontStyle), o === 0 && (o = this._mainRule.foreground), s === 0 && (s = this._mainRule.background), this._rulesWithParentScopes.push(new Vt(e, n, r, o, s));
2307
2307
  }
2308
2308
  }, Re = class K {
2309
2309
  static toBinaryStr(e) {
@@ -2342,8 +2342,8 @@ var ba = class {
2342
2342
  * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
2343
2343
  */
2344
2344
  static set(e, n, r, o, s, a, i) {
2345
- let l = K.getLanguageId(e), u = K.getTokenType(e), c = K.containsBalancedBrackets(e) ? 1 : 0, h = K.getFontStyle(e), d = K.getForeground(e), f = K.getBackground(e);
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;
2345
+ let l = K.getLanguageId(e), u = K.getTokenType(e), c = K.containsBalancedBrackets(e) ? 1 : 0, h = K.getFontStyle(e), f = K.getForeground(e), d = K.getBackground(e);
2346
+ return n !== 0 && (l = n), r !== 8 && (u = r), o !== null && (c = o ? 1 : 0), s !== -1 && (h = s), a !== 0 && (f = a), i !== 0 && (d = i), (l << 0 | u << 8 | c << 10 | h << 11 | f << 15 | d << 24) >>> 0;
2347
2347
  }
2348
2348
  };
2349
2349
  function lt(t, e) {
@@ -2848,13 +2848,13 @@ var Xe = class {
2848
2848
  break;
2849
2849
  case 3:
2850
2850
  case 4:
2851
- const h = u.scopeName, d = u.kind === 4 ? u.ruleName : null, f = n.getExternalGrammar(h, r);
2852
- if (f)
2853
- if (d) {
2854
- let p = f.repository[d];
2855
- p && (l = U.getCompiledRuleId(p, n, f.repository));
2851
+ const h = u.scopeName, f = u.kind === 4 ? u.ruleName : null, d = n.getExternalGrammar(h, r);
2852
+ if (d)
2853
+ if (f) {
2854
+ let p = d.repository[f];
2855
+ p && (l = U.getCompiledRuleId(p, n, d.repository));
2856
2856
  } else
2857
- l = U.getCompiledRuleId(f.repository.$self, n, f.repository);
2857
+ l = U.getCompiledRuleId(d.repository.$self, n, d.repository);
2858
2858
  break;
2859
2859
  }
2860
2860
  } else
@@ -2954,7 +2954,7 @@ var Xe = class {
2954
2954
  compile(t) {
2955
2955
  if (!this._cached) {
2956
2956
  let e = this._items.map((n) => n.source);
2957
- this._cached = new qn(t, e, this._items.map((n) => n.ruleId));
2957
+ this._cached = new Vn(t, e, this._items.map((n) => n.ruleId));
2958
2958
  }
2959
2959
  return this._cached;
2960
2960
  }
@@ -2963,9 +2963,9 @@ var Xe = class {
2963
2963
  }
2964
2964
  _resolveAnchors(t, e, n) {
2965
2965
  let r = this._items.map((o) => o.resolveAnchors(e, n));
2966
- return new qn(t, r, this._items.map((o) => o.ruleId));
2966
+ return new Vn(t, r, this._items.map((o) => o.ruleId));
2967
2967
  }
2968
- }, qn = class {
2968
+ }, Vn = class {
2969
2969
  constructor(t, e, n) {
2970
2970
  this.regExps = e, this.rules = n, this.scanner = t.createOnigScanner(e);
2971
2971
  }
@@ -3062,7 +3062,7 @@ var Xe = class {
3062
3062
  }
3063
3063
  };
3064
3064
  typeof process < "u" && process.env.VSCODE_TEXTMATE_DEBUG;
3065
- var Vn = class {
3065
+ var qn = class {
3066
3066
  constructor(t, e) {
3067
3067
  this.stack = t, this.stoppedEarly = e;
3068
3068
  }
@@ -3071,7 +3071,7 @@ function io(t, e, n, r, o, s, a, i) {
3071
3071
  const l = e.content.length;
3072
3072
  let u = !1, c = -1;
3073
3073
  if (a) {
3074
- const f = Da(
3074
+ const d = Da(
3075
3075
  t,
3076
3076
  e,
3077
3077
  n,
@@ -3079,17 +3079,17 @@ function io(t, e, n, r, o, s, a, i) {
3079
3079
  o,
3080
3080
  s
3081
3081
  );
3082
- o = f.stack, r = f.linePos, n = f.isFirstLine, c = f.anchorPosition;
3082
+ o = d.stack, r = d.linePos, n = d.isFirstLine, c = d.anchorPosition;
3083
3083
  }
3084
3084
  const h = Date.now();
3085
3085
  for (; !u; ) {
3086
3086
  if (i !== 0 && Date.now() - h > i)
3087
- return new Vn(o, !0);
3088
- d();
3087
+ return new qn(o, !0);
3088
+ f();
3089
3089
  }
3090
- return new Vn(o, !1);
3091
- function d() {
3092
- const f = Ga(
3090
+ return new qn(o, !1);
3091
+ function f() {
3092
+ const d = Ga(
3093
3093
  t,
3094
3094
  e,
3095
3095
  n,
@@ -3097,44 +3097,44 @@ function io(t, e, n, r, o, s, a, i) {
3097
3097
  o,
3098
3098
  c
3099
3099
  );
3100
- if (!f) {
3100
+ if (!d) {
3101
3101
  s.produce(o, l), u = !0;
3102
3102
  return;
3103
3103
  }
3104
- const p = f.captureIndices, m = f.matchedRuleId, g = p && p.length > 0 ? p[0].end > r : !1;
3105
- if (m === La) {
3106
- const C = o.getRule(t);
3104
+ const p = d.captureIndices, g = d.matchedRuleId, C = p && p.length > 0 ? p[0].end > r : !1;
3105
+ if (g === La) {
3106
+ const y = o.getRule(t);
3107
3107
  s.produce(o, p[0].start), o = o.withContentNameScopesList(o.nameScopesList), Ge(
3108
3108
  t,
3109
3109
  e,
3110
3110
  n,
3111
3111
  o,
3112
3112
  s,
3113
- C.endCaptures,
3113
+ y.endCaptures,
3114
3114
  p
3115
3115
  ), s.produce(o, p[0].end);
3116
- const y = o;
3117
- if (o = o.parent, c = y.getAnchorPos(), !g && y.getEnterPos() === r) {
3118
- o = y, s.produce(o, l), u = !0;
3116
+ const m = o;
3117
+ if (o = o.parent, c = m.getAnchorPos(), !C && m.getEnterPos() === r) {
3118
+ o = m, s.produce(o, l), u = !0;
3119
3119
  return;
3120
3120
  }
3121
3121
  } else {
3122
- const C = t.getRule(m);
3122
+ const y = t.getRule(g);
3123
3123
  s.produce(o, p[0].start);
3124
- const y = o, _ = C.getName(e.content, p), S = o.contentNameScopesList.pushAttributed(
3124
+ const m = o, _ = y.getName(e.content, p), S = o.contentNameScopesList.pushAttributed(
3125
3125
  _,
3126
3126
  t
3127
3127
  );
3128
3128
  if (o = o.push(
3129
- m,
3129
+ g,
3130
3130
  r,
3131
3131
  c,
3132
3132
  p[0].end === l,
3133
3133
  null,
3134
3134
  S,
3135
3135
  S
3136
- ), C instanceof Kt) {
3137
- const A = C;
3136
+ ), y instanceof Kt) {
3137
+ const A = y;
3138
3138
  Ge(
3139
3139
  t,
3140
3140
  e,
@@ -3156,12 +3156,12 @@ function io(t, e, n, r, o, s, a, i) {
3156
3156
  e.content,
3157
3157
  p
3158
3158
  )
3159
- )), !g && y.hasSameRuleAs(o)) {
3159
+ )), !C && m.hasSameRuleAs(o)) {
3160
3160
  o = o.pop(), s.produce(o, l), u = !0;
3161
3161
  return;
3162
3162
  }
3163
- } else if (C instanceof ct) {
3164
- const A = C;
3163
+ } else if (y instanceof ct) {
3164
+ const A = y;
3165
3165
  Ge(
3166
3166
  t,
3167
3167
  e,
@@ -3183,7 +3183,7 @@ function io(t, e, n, r, o, s, a, i) {
3183
3183
  e.content,
3184
3184
  p
3185
3185
  )
3186
- )), !g && y.hasSameRuleAs(o)) {
3186
+ )), !C && m.hasSameRuleAs(o)) {
3187
3187
  o = o.pop(), s.produce(o, l), u = !0;
3188
3188
  return;
3189
3189
  }
@@ -3193,9 +3193,9 @@ function io(t, e, n, r, o, s, a, i) {
3193
3193
  n,
3194
3194
  o,
3195
3195
  s,
3196
- C.captures,
3196
+ y.captures,
3197
3197
  p
3198
- ), s.produce(o, p[0].end), o = o.pop(), !g) {
3198
+ ), s.produce(o, p[0].end), o = o.pop(), !C) {
3199
3199
  o = o.safePop(), s.produce(o, l), u = !0;
3200
3200
  return;
3201
3201
  }
@@ -3250,15 +3250,15 @@ function Fa(t, e, n, r, o, s) {
3250
3250
  function Ba(t, e, n, r, o, s, a) {
3251
3251
  let i = Number.MAX_VALUE, l = null, u, c = 0;
3252
3252
  const h = s.contentNameScopesList.getScopeNames();
3253
- for (let d = 0, f = t.length; d < f; d++) {
3254
- const p = t[d];
3253
+ for (let f = 0, d = t.length; f < d; f++) {
3254
+ const p = t[f];
3255
3255
  if (!p.matcher(h))
3256
3256
  continue;
3257
- const m = e.getRule(p.ruleId), { ruleScanner: g, findOptions: C } = lo(m, e, null, r, o === a), y = g.findNextMatchSync(n, o, C);
3258
- if (!y)
3257
+ const g = e.getRule(p.ruleId), { ruleScanner: C, findOptions: y } = lo(g, e, null, r, o === a), m = C.findNextMatchSync(n, o, y);
3258
+ if (!m)
3259
3259
  continue;
3260
- const _ = y.captureIndices[0].start;
3261
- if (!(_ >= i) && (i = _, l = y.captureIndices, u = y.ruleId, c = p.priority, i === o))
3260
+ const _ = m.captureIndices[0].start;
3261
+ if (!(_ >= i) && (i = _, l = m.captureIndices, u = m.ruleId, c = p.priority, i === o))
3262
3262
  break;
3263
3263
  }
3264
3264
  return l ? {
@@ -3286,23 +3286,23 @@ function Ge(t, e, n, r, o, s, a) {
3286
3286
  return;
3287
3287
  const i = e.content, l = Math.min(s.length, a.length), u = [], c = a[0].end;
3288
3288
  for (let h = 0; h < l; h++) {
3289
- const d = s[h];
3290
- if (d === null)
3289
+ const f = s[h];
3290
+ if (f === null)
3291
3291
  continue;
3292
- const f = a[h];
3293
- if (f.length === 0)
3292
+ const d = a[h];
3293
+ if (d.length === 0)
3294
3294
  continue;
3295
- if (f.start > c)
3295
+ if (d.start > c)
3296
3296
  break;
3297
- for (; u.length > 0 && u[u.length - 1].endPos <= f.start; )
3297
+ for (; u.length > 0 && u[u.length - 1].endPos <= d.start; )
3298
3298
  o.produceFromScopes(u[u.length - 1].scopes, u[u.length - 1].endPos), u.pop();
3299
- if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, f.start) : o.produce(r, f.start), d.retokenizeCapturedWithRuleId) {
3300
- const m = d.getName(i, a), g = r.contentNameScopesList.pushAttributed(m, t), C = d.getContentName(i, a), y = g.pushAttributed(C, t), _ = r.push(d.retokenizeCapturedWithRuleId, f.start, -1, !1, null, g, y), S = t.createOnigString(i.substring(0, f.end));
3299
+ if (u.length > 0 ? o.produceFromScopes(u[u.length - 1].scopes, d.start) : o.produce(r, d.start), f.retokenizeCapturedWithRuleId) {
3300
+ const g = f.getName(i, a), C = r.contentNameScopesList.pushAttributed(g, t), y = f.getContentName(i, a), m = C.pushAttributed(y, t), _ = r.push(f.retokenizeCapturedWithRuleId, d.start, -1, !1, null, C, m), S = t.createOnigString(i.substring(0, d.end));
3301
3301
  io(
3302
3302
  t,
3303
3303
  S,
3304
- n && f.start === 0,
3305
- f.start,
3304
+ n && d.start === 0,
3305
+ d.start,
3306
3306
  _,
3307
3307
  o,
3308
3308
  !1,
@@ -3311,10 +3311,10 @@ function Ge(t, e, n, r, o, s, a) {
3311
3311
  ), no(S);
3312
3312
  continue;
3313
3313
  }
3314
- const p = d.getName(i, a);
3314
+ const p = f.getName(i, a);
3315
3315
  if (p !== null) {
3316
- const g = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(p, t);
3317
- u.push(new Ua(g, f.end));
3316
+ const C = (u.length > 0 ? u[u.length - 1].scopes : r.contentNameScopesList).pushAttributed(p, t);
3317
+ u.push(new Ua(C, d.end));
3318
3318
  }
3319
3319
  }
3320
3320
  for (; u.length > 0; )
@@ -3497,16 +3497,16 @@ var Wa = class {
3497
3497
  c.fontStyle,
3498
3498
  c.foregroundId,
3499
3499
  c.backgroundId
3500
- ), d = this.getRule(this._rootId).getName(
3500
+ ), f = this.getRule(this._rootId).getName(
3501
3501
  null,
3502
3502
  null
3503
3503
  );
3504
- let f;
3505
- d ? f = Fe.createRootAndLookUpScopeName(
3506
- d,
3504
+ let d;
3505
+ f ? d = Fe.createRootAndLookUpScopeName(
3506
+ f,
3507
3507
  h,
3508
3508
  this
3509
- ) : f = Fe.createRoot(
3509
+ ) : d = Fe.createRoot(
3510
3510
  "unknown",
3511
3511
  h
3512
3512
  ), e = new Jt(
@@ -3516,14 +3516,14 @@ var Wa = class {
3516
3516
  -1,
3517
3517
  !1,
3518
3518
  null,
3519
- f,
3520
- f
3519
+ d,
3520
+ d
3521
3521
  );
3522
3522
  } else
3523
3523
  o = !1, e.reset();
3524
3524
  t = t + `
3525
3525
  `;
3526
- const s = this.createOnigString(t), a = s.content.length, i = new Va(
3526
+ const s = this.createOnigString(t), a = s.content.length, i = new qa(
3527
3527
  n,
3528
3528
  t,
3529
3529
  this._tokenTypeMatchers,
@@ -3804,7 +3804,7 @@ var Fe = class ne {
3804
3804
  Fe.fromExtension(r, n.contentNameScopesList)
3805
3805
  );
3806
3806
  }
3807
- }, qa = class {
3807
+ }, Va = class {
3808
3808
  balancedBracketScopes;
3809
3809
  unbalancedBracketScopes;
3810
3810
  allowAny = !1;
@@ -3830,7 +3830,7 @@ var Fe = class ne {
3830
3830
  return !0;
3831
3831
  return this.allowAny;
3832
3832
  }
3833
- }, Va = class {
3833
+ }, qa = class {
3834
3834
  constructor(t, e, n, r) {
3835
3835
  this.balancedBracketSelectors = r, this._emitBinaryTokens = t, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
3836
3836
  }
@@ -4015,7 +4015,7 @@ var Fe = class ne {
4015
4015
  n,
4016
4016
  r.embeddedLanguages,
4017
4017
  r.tokenTypes,
4018
- new qa(
4018
+ new Va(
4019
4019
  r.balancedBracketSelectors || [],
4020
4020
  r.unbalancedBracketSelectors || []
4021
4021
  )
@@ -4095,7 +4095,7 @@ function uo(t, e) {
4095
4095
  function Qt(t) {
4096
4096
  return t.toLowerCase();
4097
4097
  }
4098
- class q {
4098
+ class V {
4099
4099
  /**
4100
4100
  * @param {string} property
4101
4101
  * Property.
@@ -4108,18 +4108,18 @@ class q {
4108
4108
  this.attribute = n, this.property = e;
4109
4109
  }
4110
4110
  }
4111
- q.prototype.attribute = "";
4112
- q.prototype.booleanish = !1;
4113
- q.prototype.boolean = !1;
4114
- q.prototype.commaOrSpaceSeparated = !1;
4115
- q.prototype.commaSeparated = !1;
4116
- q.prototype.defined = !1;
4117
- q.prototype.mustUseProperty = !1;
4118
- q.prototype.number = !1;
4119
- q.prototype.overloadedBoolean = !1;
4120
- q.prototype.property = "";
4121
- q.prototype.spaceSeparated = !1;
4122
- q.prototype.space = void 0;
4111
+ V.prototype.attribute = "";
4112
+ V.prototype.booleanish = !1;
4113
+ V.prototype.boolean = !1;
4114
+ V.prototype.commaOrSpaceSeparated = !1;
4115
+ V.prototype.commaSeparated = !1;
4116
+ V.prototype.defined = !1;
4117
+ V.prototype.mustUseProperty = !1;
4118
+ V.prototype.number = !1;
4119
+ V.prototype.overloadedBoolean = !1;
4120
+ V.prototype.property = "";
4121
+ V.prototype.spaceSeparated = !1;
4122
+ V.prototype.space = void 0;
4123
4123
  let Ya = 0;
4124
4124
  const E = be(), T = be(), en = be(), w = be(), N = be(), Ee = be(), X = be();
4125
4125
  function be() {
@@ -4138,7 +4138,7 @@ const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4138
4138
  /** @type {ReadonlyArray<keyof typeof types>} */
4139
4139
  Object.keys(tn)
4140
4140
  );
4141
- class yn extends q {
4141
+ class yn extends V {
4142
4142
  /**
4143
4143
  * @constructor
4144
4144
  * @param {string} property
@@ -5188,7 +5188,7 @@ const Ja = Ne({
5188
5188
  }), Qa = /[A-Z]/g, Jn = /-[a-z]/g, ei = /^data[-\w.:]+$/i;
5189
5189
  function ti(t, e) {
5190
5190
  const n = Qt(e);
5191
- let r = e, o = q;
5191
+ let r = e, o = V;
5192
5192
  if (n in t.normal)
5193
5193
  return t.property[t.normal[n]];
5194
5194
  if (n.length > 4 && n.slice(0, 4) === "data" && ei.test(e)) {
@@ -5840,18 +5840,18 @@ const Qe = {
5840
5840
  ['\0"&'.split(""), "\0\"&'`".split("")]
5841
5841
  ]
5842
5842
  };
5843
- function qi(t, e, n, r) {
5843
+ function Vi(t, e, n, r) {
5844
5844
  const o = r.schema, s = o.space === "svg" ? !1 : r.settings.omitOptionalTags;
5845
5845
  let a = o.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(t.tagName.toLowerCase());
5846
5846
  const i = [];
5847
5847
  let l;
5848
5848
  o.space === "html" && t.tagName === "svg" && (r.schema = yo);
5849
- const u = Vi(r, t.properties), c = r.all(
5849
+ const u = qi(r, t.properties), c = r.all(
5850
5850
  o.space === "html" && t.tagName === "template" ? t.content : t
5851
5851
  );
5852
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("");
5853
5853
  }
5854
- function Vi(t, e) {
5854
+ function qi(t, e) {
5855
5855
  const n = [];
5856
5856
  let r = -1, o;
5857
5857
  if (e) {
@@ -5914,7 +5914,7 @@ function Ji(t, e, n, r) {
5914
5914
  const Zi = la("type", {
5915
5915
  invalid: Qi,
5916
5916
  unknown: el,
5917
- handlers: { comment: vi, doctype: xi, element: qi, raw: Yi, root: Ji, text: So }
5917
+ handlers: { comment: vi, doctype: xi, element: Vi, raw: Yi, root: Ji, text: So }
5918
5918
  });
5919
5919
  function Qi(t) {
5920
5920
  throw new Error("Expected node, not `" + t + "`");
@@ -6046,8 +6046,8 @@ function ul(t) {
6046
6046
  posToIndex: r
6047
6047
  };
6048
6048
  }
6049
- const _n = "light-dark()";
6050
- function cl(t, e) {
6049
+ const _n = "light-dark()", cl = ["color", "background-color"];
6050
+ function hl(t, e) {
6051
6051
  let n = 0;
6052
6052
  const r = [];
6053
6053
  for (const o of e)
@@ -6062,39 +6062,38 @@ function cl(t, e) {
6062
6062
  offset: t.offset + n
6063
6063
  }), r;
6064
6064
  }
6065
- function hl(t, e) {
6065
+ function pl(t, e) {
6066
6066
  const n = Array.from(e instanceof Set ? e : new Set(e)).sort((r, o) => r - o);
6067
6067
  return n.length ? t.map((r) => r.flatMap((o) => {
6068
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);
6069
- return s.length ? cl(o, s) : o;
6069
+ return s.length ? hl(o, s) : o;
6070
6070
  })) : t;
6071
6071
  }
6072
- function pl(t, e, n, r) {
6073
- const o = {
6072
+ function fl(t, e, n, r, o = "css-vars") {
6073
+ const s = {
6074
6074
  content: t.content,
6075
6075
  explanation: t.explanation,
6076
6076
  offset: t.offset
6077
- }, s = e.map((l) => ft(t.variants[l])), a = new Set(s.flatMap((l) => Object.keys(l))), i = {};
6078
- return s.forEach((l, u) => {
6079
- for (const c of a) {
6080
- const h = l[c] || "inherit";
6081
- if (u === 0 && r)
6082
- if (r === _n && s.length > 1) {
6083
- const d = e.findIndex((y) => y === "light"), f = e.findIndex((y) => y === "dark");
6084
- if (d === -1 || f === -1)
6077
+ }, a = e.map((c) => ft(t.variants[c])), i = new Set(a.flatMap((c) => Object.keys(c))), l = {}, u = (c, h) => {
6078
+ const f = h === "color" ? "" : h === "background-color" ? "-bg" : `-${h}`;
6079
+ return n + e[c] + (h === "color" ? "" : f);
6080
+ };
6081
+ return a.forEach((c, h) => {
6082
+ for (const f of i) {
6083
+ const d = c[f] || "inherit";
6084
+ if (h === 0 && r && cl.includes(f))
6085
+ if (r === _n && a.length > 1) {
6086
+ const p = e.findIndex((m) => m === "light"), g = e.findIndex((m) => m === "dark");
6087
+ if (p === -1 || g === -1)
6085
6088
  throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
6086
- const p = s[d][c] || "inherit", m = s[f][c] || "inherit";
6087
- i[c] = `light-dark(${p}, ${m})`;
6088
- const g = c === "color" ? "" : c === "background-color" ? "-bg" : `-${c}`, C = n + e[u] + (c === "color" ? "" : g);
6089
- i[C] = h;
6089
+ const C = a[p][f] || "inherit", y = a[g][f] || "inherit";
6090
+ l[f] = `light-dark(${C}, ${y})`, o === "css-vars" && (l[u(h, f)] = d);
6090
6091
  } else
6091
- i[c] = h;
6092
- else {
6093
- const d = c === "color" ? "" : c === "background-color" ? "-bg" : `-${c}`, f = n + e[u] + (c === "color" ? "" : d);
6094
- i[f] = h;
6095
- }
6092
+ l[f] = d;
6093
+ else
6094
+ o === "css-vars" && (l[u(h, f)] = d);
6096
6095
  }
6097
- }), o.htmlStyle = i, o;
6096
+ }), s.htmlStyle = l, s;
6098
6097
  }
6099
6098
  function ft(t) {
6100
6099
  const e = {};
@@ -6156,7 +6155,7 @@ class Pe {
6156
6155
  return this._stacks[e];
6157
6156
  }
6158
6157
  getScopes(e = this.theme) {
6159
- return fl(this._stacks[e]);
6158
+ return dl(this._stacks[e]);
6160
6159
  }
6161
6160
  toJSON() {
6162
6161
  return {
@@ -6167,7 +6166,7 @@ class Pe {
6167
6166
  };
6168
6167
  }
6169
6168
  }
6170
- function fl(t) {
6169
+ function dl(t) {
6171
6170
  const e = [], n = /* @__PURE__ */ new Set();
6172
6171
  function r(o) {
6173
6172
  if (n.has(o))
@@ -6178,12 +6177,12 @@ function fl(t) {
6178
6177
  }
6179
6178
  return r(t), e;
6180
6179
  }
6181
- function dl(t, e) {
6180
+ function gl(t, e) {
6182
6181
  if (!(t instanceof Pe))
6183
6182
  throw new F("Invalid grammar state");
6184
6183
  return t.getInternalStack(e);
6185
6184
  }
6186
- function gl() {
6185
+ function ml() {
6187
6186
  const t = /* @__PURE__ */ new WeakMap();
6188
6187
  function e(n) {
6189
6188
  if (!t.has(n.meta)) {
@@ -6212,7 +6211,7 @@ function gl() {
6212
6211
  start: r(a.start),
6213
6212
  end: r(a.end)
6214
6213
  }));
6215
- ml(s), t.set(n.meta, {
6214
+ yl(s), t.set(n.meta, {
6216
6215
  decorations: s,
6217
6216
  converter: o,
6218
6217
  source: n.source
@@ -6226,7 +6225,7 @@ function gl() {
6226
6225
  if (!this.options.decorations?.length)
6227
6226
  return;
6228
6227
  const o = e(this).decorations.flatMap((a) => [a.start.offset, a.end.offset]);
6229
- return hl(n, o);
6228
+ return pl(n, o);
6230
6229
  },
6231
6230
  code(n) {
6232
6231
  if (!this.options.decorations?.length)
@@ -6234,59 +6233,59 @@ function gl() {
6234
6233
  const r = e(this), o = Array.from(n.children).filter((c) => c.type === "element" && c.tagName === "span");
6235
6234
  if (o.length !== r.converter.lines.length)
6236
6235
  throw new F(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
6237
- function s(c, h, d, f) {
6236
+ function s(c, h, f, d) {
6238
6237
  const p = o[c];
6239
- let m = "", g = -1, C = -1;
6240
- if (h === 0 && (g = 0), d === 0 && (C = 0), d === Number.POSITIVE_INFINITY && (C = p.children.length), g === -1 || C === -1)
6238
+ let g = "", C = -1, y = -1;
6239
+ if (h === 0 && (C = 0), f === 0 && (y = 0), f === Number.POSITIVE_INFINITY && (y = p.children.length), C === -1 || y === -1)
6241
6240
  for (let _ = 0; _ < p.children.length; _++)
6242
- m += Ao(p.children[_]), g === -1 && m.length === h && (g = _ + 1), C === -1 && m.length === d && (C = _ + 1);
6243
- if (g === -1)
6244
- throw new F(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);
6241
+ g += Ao(p.children[_]), C === -1 && g.length === h && (C = _ + 1), y === -1 && g.length === f && (y = _ + 1);
6245
6242
  if (C === -1)
6246
- throw new F(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);
6247
- const y = p.children.slice(g, C);
6248
- if (!f.alwaysWrap && y.length === p.children.length)
6249
- i(p, f, "line");
6250
- else if (!f.alwaysWrap && y.length === 1 && y[0].type === "element")
6251
- i(y[0], f, "token");
6243
+ throw new F(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
6244
+ if (y === -1)
6245
+ throw new F(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);
6246
+ const m = p.children.slice(C, y);
6247
+ if (!d.alwaysWrap && m.length === p.children.length)
6248
+ i(p, d, "line");
6249
+ else if (!d.alwaysWrap && m.length === 1 && m[0].type === "element")
6250
+ i(m[0], d, "token");
6252
6251
  else {
6253
6252
  const _ = {
6254
6253
  type: "element",
6255
6254
  tagName: "span",
6256
6255
  properties: {},
6257
- children: y
6256
+ children: m
6258
6257
  };
6259
- i(_, f, "wrapper"), p.children.splice(g, y.length, _);
6258
+ i(_, d, "wrapper"), p.children.splice(C, m.length, _);
6260
6259
  }
6261
6260
  }
6262
6261
  function a(c, h) {
6263
6262
  o[c] = i(o[c], h, "line");
6264
6263
  }
6265
- function i(c, h, d) {
6266
- const f = h.properties || {}, p = h.transform || ((m) => m);
6264
+ function i(c, h, f) {
6265
+ const d = h.properties || {}, p = h.transform || ((g) => g);
6267
6266
  return c.tagName = h.tagName || "span", c.properties = {
6268
6267
  ...c.properties,
6269
- ...f,
6268
+ ...d,
6270
6269
  class: c.properties.class
6271
- }, h.properties?.class && xo(c, h.properties.class), c = p(c, d) || c, c;
6270
+ }, h.properties?.class && xo(c, h.properties.class), c = p(c, f) || c, c;
6272
6271
  }
6273
6272
  const l = [], u = r.decorations.sort((c, h) => h.start.offset - c.start.offset || c.end.offset - h.end.offset);
6274
6273
  for (const c of u) {
6275
- const { start: h, end: d } = c;
6276
- if (h.line === d.line)
6277
- s(h.line, h.character, d.character, c);
6278
- else if (h.line < d.line) {
6274
+ const { start: h, end: f } = c;
6275
+ if (h.line === f.line)
6276
+ s(h.line, h.character, f.character, c);
6277
+ else if (h.line < f.line) {
6279
6278
  s(h.line, h.character, Number.POSITIVE_INFINITY, c);
6280
- for (let f = h.line + 1; f < d.line; f++)
6281
- l.unshift(() => a(f, c));
6282
- s(d.line, 0, d.character, c);
6279
+ for (let d = h.line + 1; d < f.line; d++)
6280
+ l.unshift(() => a(d, c));
6281
+ s(f.line, 0, f.character, c);
6283
6282
  }
6284
6283
  }
6285
6284
  l.forEach((c) => c());
6286
6285
  }
6287
6286
  };
6288
6287
  }
6289
- function ml(t) {
6288
+ function yl(t) {
6290
6289
  for (let e = 0; e < t.length; e++) {
6291
6290
  const n = t[e];
6292
6291
  if (n.start.offset > n.end.offset)
@@ -6304,13 +6303,13 @@ function ml(t) {
6304
6303
  function Ao(t) {
6305
6304
  return t.type === "text" ? t.value : t.type === "element" ? t.children.map(Ao).join("") : "";
6306
6305
  }
6307
- const yl = [
6308
- /* @__PURE__ */ gl()
6306
+ const bl = [
6307
+ /* @__PURE__ */ ml()
6309
6308
  ];
6310
6309
  function dt(t) {
6311
6310
  return [
6312
6311
  ...t.transformers || [],
6313
- ...yl
6312
+ ...bl
6314
6313
  ];
6315
6314
  }
6316
6315
  var de = [
@@ -6339,7 +6338,7 @@ var de = [
6339
6338
  8: "hidden",
6340
6339
  9: "strikethrough"
6341
6340
  };
6342
- function bl(t, e) {
6341
+ function wl(t, e) {
6343
6342
  const n = t.indexOf("\x1B", e);
6344
6343
  if (n !== -1 && t[n + 1] === "[") {
6345
6344
  const r = t.indexOf("m", n);
@@ -6368,7 +6367,7 @@ function tr(t) {
6368
6367
  return { type: "table", index: Number(n) };
6369
6368
  }
6370
6369
  }
6371
- function wl(t) {
6370
+ function Cl(t) {
6372
6371
  const e = [];
6373
6372
  for (; t.length > 0; ) {
6374
6373
  const n = t.shift();
@@ -6436,21 +6435,21 @@ function wl(t) {
6436
6435
  }
6437
6436
  return e;
6438
6437
  }
6439
- function Cl() {
6438
+ function _l() {
6440
6439
  let t = null, e = null, n = /* @__PURE__ */ new Set();
6441
6440
  return {
6442
6441
  parse(r) {
6443
6442
  const o = [];
6444
6443
  let s = 0;
6445
6444
  do {
6446
- const a = bl(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
6445
+ const a = wl(r, s), i = a.sequence ? r.substring(s, a.startPosition) : r.substring(s);
6447
6446
  if (i.length > 0 && o.push({
6448
6447
  value: i,
6449
6448
  foreground: t,
6450
6449
  background: e,
6451
6450
  decorations: new Set(n)
6452
6451
  }), a.sequence) {
6453
- const l = wl(a.sequence);
6452
+ const l = Cl(a.sequence);
6454
6453
  for (const u of l)
6455
6454
  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);
6456
6455
  for (const u of l)
@@ -6462,7 +6461,7 @@ function Cl() {
6462
6461
  }
6463
6462
  };
6464
6463
  }
6465
- var _l = {
6464
+ var Sl = {
6466
6465
  black: "#000000",
6467
6466
  red: "#bb0000",
6468
6467
  green: "#00bb00",
@@ -6480,7 +6479,7 @@ var _l = {
6480
6479
  brightCyan: "#55ffff",
6481
6480
  brightWhite: "#ffffff"
6482
6481
  };
6483
- function Sl(t = _l) {
6482
+ function kl(t = Sl) {
6484
6483
  function e(i) {
6485
6484
  return t[i];
6486
6485
  }
@@ -6521,19 +6520,19 @@ function Sl(t = _l) {
6521
6520
  value: a
6522
6521
  };
6523
6522
  }
6524
- function kl(t, e, n) {
6525
- const r = pt(t, n), o = St(e), s = Sl(
6523
+ function vl(t, e, n) {
6524
+ const r = pt(t, n), o = St(e), s = kl(
6526
6525
  Object.fromEntries(
6527
6526
  de.map((i) => [
6528
6527
  i,
6529
6528
  t.colors?.[`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`]
6530
6529
  ])
6531
6530
  )
6532
- ), a = Cl();
6531
+ ), a = _l();
6533
6532
  return o.map(
6534
6533
  (i) => a.parse(i[0]).map((l) => {
6535
6534
  let u, c;
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));
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 = xl(u));
6537
6536
  let h = z.None;
6538
6537
  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), {
6539
6538
  content: l.value,
@@ -6546,7 +6545,7 @@ function kl(t, e, n) {
6546
6545
  })
6547
6546
  );
6548
6547
  }
6549
- function vl(t) {
6548
+ function xl(t) {
6550
6549
  const e = t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);
6551
6550
  if (e)
6552
6551
  if (e[3]) {
@@ -6565,7 +6564,7 @@ function Sn(t, e, n = {}) {
6565
6564
  return St(e).map((l) => [{ content: l[0], offset: l[1] }]);
6566
6565
  const { theme: s, colorMap: a } = t.setTheme(o);
6567
6566
  if (r === "ansi")
6568
- return kl(s, e, n);
6567
+ return vl(s, e, n);
6569
6568
  const i = t.getLanguage(r);
6570
6569
  if (n.grammarState) {
6571
6570
  if (n.grammarState.lang !== i.name)
@@ -6573,9 +6572,9 @@ function Sn(t, e, n = {}) {
6573
6572
  if (!n.grammarState.themes.includes(s.name))
6574
6573
  throw new F(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
6575
6574
  }
6576
- return El(e, i, s, a, n);
6575
+ return Al(e, i, s, a, n);
6577
6576
  }
6578
- function xl(...t) {
6577
+ function El(...t) {
6579
6578
  if (t.length === 2)
6580
6579
  return We(t[1]);
6581
6580
  const [e, n, r = {}] = t, {
@@ -6593,7 +6592,7 @@ function xl(...t) {
6593
6592
  a.name
6594
6593
  );
6595
6594
  }
6596
- function El(t, e, n, r, o) {
6595
+ function Al(t, e, n, r, o) {
6597
6596
  const s = gt(t, e, n, r, o), a = new Pe(
6598
6597
  gt(t, e, n, r, o).stateStack,
6599
6598
  e.name,
@@ -6606,7 +6605,7 @@ function gt(t, e, n, r, o) {
6606
6605
  tokenizeMaxLineLength: a = 0,
6607
6606
  tokenizeTimeLimit: i = 500
6608
6607
  } = o, l = St(t);
6609
- let u = o.grammarState ? dl(o.grammarState, n.name) ?? Zt : o.grammarContextCode != null ? gt(
6608
+ let u = o.grammarState ? gl(o.grammarState, n.name) ?? Zt : o.grammarContextCode != null ? gt(
6610
6609
  o.grammarContextCode,
6611
6610
  e,
6612
6611
  n,
@@ -6618,8 +6617,8 @@ function gt(t, e, n, r, o) {
6618
6617
  }
6619
6618
  ).stateStack : Zt, c = [];
6620
6619
  const h = [];
6621
- for (let d = 0, f = l.length; d < f; d++) {
6622
- const [p, m] = l[d];
6620
+ for (let f = 0, d = l.length; f < d; f++) {
6621
+ const [p, g] = l[f];
6623
6622
  if (p === "") {
6624
6623
  c = [], h.push([]);
6625
6624
  continue;
@@ -6627,14 +6626,14 @@ function gt(t, e, n, r, o) {
6627
6626
  if (a > 0 && p.length >= a) {
6628
6627
  c = [], h.push([{
6629
6628
  content: p,
6630
- offset: m,
6629
+ offset: g,
6631
6630
  color: "",
6632
6631
  fontStyle: 0
6633
6632
  }]);
6634
6633
  continue;
6635
6634
  }
6636
- let g, C, y;
6637
- o.includeExplanation && (g = e.tokenizeLine(p, u, i), C = g.tokens, y = 0);
6635
+ let C, y, m;
6636
+ o.includeExplanation && (C = e.tokenizeLine(p, u, i), y = C.tokens, m = 0);
6638
6637
  const _ = e.tokenizeLine2(p, u, i), S = _.tokens.length / 2;
6639
6638
  for (let A = 0; A < S; A++) {
6640
6639
  const D = _.tokens[2 * A], P = A + 1 < S ? _.tokens[2 * A + 2] : p.length;
@@ -6645,7 +6644,7 @@ function gt(t, e, n, r, o) {
6645
6644
  s
6646
6645
  ), ee = Re.getFontStyle(j), ce = {
6647
6646
  content: p.substring(D, P),
6648
- offset: m + D,
6647
+ offset: g + D,
6649
6648
  color: Z,
6650
6649
  fontStyle: ee
6651
6650
  };
@@ -6672,19 +6671,19 @@ function gt(t, e, n, r, o) {
6672
6671
  ce.explanation = [];
6673
6672
  let R = 0;
6674
6673
  for (; D + R < P; ) {
6675
- const k = C[y], G = p.substring(
6674
+ const k = y[m], G = p.substring(
6676
6675
  k.startIndex,
6677
6676
  k.endIndex
6678
6677
  );
6679
6678
  R += G.length, ce.explanation.push({
6680
6679
  content: G,
6681
- scopes: o.includeExplanation === "scopeName" ? Al(
6680
+ scopes: o.includeExplanation === "scopeName" ? Rl(
6682
6681
  k.scopes
6683
- ) : Rl(
6682
+ ) : Il(
6684
6683
  te,
6685
6684
  k.scopes
6686
6685
  )
6687
- }), y += 1;
6686
+ }), m += 1;
6688
6687
  }
6689
6688
  }
6690
6689
  c.push(ce);
@@ -6696,16 +6695,16 @@ function gt(t, e, n, r, o) {
6696
6695
  stateStack: u
6697
6696
  };
6698
6697
  }
6699
- function Al(t) {
6698
+ function Rl(t) {
6700
6699
  return t.map((e) => ({ scopeName: e }));
6701
6700
  }
6702
- function Rl(t, e) {
6701
+ function Il(t, e) {
6703
6702
  const n = [];
6704
6703
  for (let r = 0, o = e.length; r < o; r++) {
6705
6704
  const s = e[r];
6706
6705
  n[r] = {
6707
6706
  scopeName: s,
6708
- themeMatches: Nl(t, s, e.slice(0, r))
6707
+ themeMatches: Pl(t, s, e.slice(0, r))
6709
6708
  };
6710
6709
  }
6711
6710
  return n;
@@ -6713,7 +6712,7 @@ function Rl(t, e) {
6713
6712
  function nr(t, e) {
6714
6713
  return t === e || e.substring(0, t.length) === t && e[t.length] === ".";
6715
6714
  }
6716
- function Il(t, e, n) {
6715
+ function Nl(t, e, n) {
6717
6716
  if (!nr(t[t.length - 1], e))
6718
6717
  return !1;
6719
6718
  let r = t.length - 2, o = n.length - 1;
@@ -6721,11 +6720,11 @@ function Il(t, e, n) {
6721
6720
  nr(t[r], n[o]) && (r -= 1), o -= 1;
6722
6721
  return r === -1;
6723
6722
  }
6724
- function Nl(t, e, n) {
6723
+ function Pl(t, e, n) {
6725
6724
  const r = [];
6726
6725
  for (const { selectors: o, settings: s } of t)
6727
6726
  for (const a of o)
6728
- if (Il(a, e, n)) {
6727
+ if (Nl(a, e, n)) {
6729
6728
  r.push(s);
6730
6729
  break;
6731
6730
  }
@@ -6742,24 +6741,24 @@ function Ro(t, e, n) {
6742
6741
  state: c,
6743
6742
  theme: h
6744
6743
  };
6745
- }), s = Pl(
6744
+ }), s = Ll(
6746
6745
  ...o.map((l) => l.tokens)
6747
6746
  ), a = s[0].map(
6748
6747
  (l, u) => l.map((c, h) => {
6749
- const d = {
6748
+ const f = {
6750
6749
  content: c.content,
6751
6750
  variants: {},
6752
6751
  offset: c.offset
6753
6752
  };
6754
- return "includeExplanation" in n && n.includeExplanation && (d.explanation = c.explanation), s.forEach((f, p) => {
6753
+ return "includeExplanation" in n && n.includeExplanation && (f.explanation = c.explanation), s.forEach((d, p) => {
6755
6754
  const {
6756
- content: m,
6757
- explanation: g,
6758
- offset: C,
6759
- ...y
6760
- } = f[u][h];
6761
- d.variants[r[p].color] = y;
6762
- }), d;
6755
+ content: g,
6756
+ explanation: C,
6757
+ offset: y,
6758
+ ...m
6759
+ } = d[u][h];
6760
+ f.variants[r[p].color] = m;
6761
+ }), f;
6763
6762
  })
6764
6763
  ), i = o[0].state ? new Pe(
6765
6764
  Object.fromEntries(o.map((l) => [l.theme, l.state?.getInternalStack(l.theme)])),
@@ -6767,7 +6766,7 @@ function Ro(t, e, n) {
6767
6766
  ) : void 0;
6768
6767
  return i && kt(a, i), a;
6769
6768
  }
6770
- function Pl(...t) {
6769
+ function Ll(...t) {
6771
6770
  const e = t.map(() => []), n = t.length;
6772
6771
  for (let r = 0; r < t[0].length; r++) {
6773
6772
  const o = t.map((l) => l[r]), s = e.map(() => []);
@@ -6795,21 +6794,22 @@ function mt(t, e, n) {
6795
6794
  if ("themes" in n) {
6796
6795
  const {
6797
6796
  defaultColor: u = "light",
6798
- cssVariablePrefix: c = "--shiki-"
6799
- } = n, h = Object.entries(n.themes).filter((g) => g[1]).map((g) => ({ color: g[0], theme: g[1] })).sort((g, C) => g.color === u ? -1 : C.color === u ? 1 : 0);
6800
- if (h.length === 0)
6797
+ cssVariablePrefix: c = "--shiki-",
6798
+ colorsRendering: h = "css-vars"
6799
+ } = n, f = Object.entries(n.themes).filter((y) => y[1]).map((y) => ({ color: y[0], theme: y[1] })).sort((y, m) => y.color === u ? -1 : m.color === u ? 1 : 0);
6800
+ if (f.length === 0)
6801
6801
  throw new F("`themes` option must not be empty");
6802
6802
  const d = Ro(
6803
6803
  t,
6804
6804
  e,
6805
6805
  n
6806
6806
  );
6807
- if (l = We(d), u && _n !== u && !h.find((g) => g.color === u))
6807
+ if (l = We(d), u && _n !== u && !f.find((y) => y.color === u))
6808
6808
  throw new F(`\`themes\` option must contain the defaultColor key \`${u}\``);
6809
- const f = h.map((g) => t.getTheme(g.theme)), p = h.map((g) => g.color);
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));
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(";");
6809
+ const p = f.map((y) => t.getTheme(y.theme)), g = f.map((y) => y.color);
6810
+ s = d.map((y) => y.map((m) => fl(m, g, c, u, h))), l && kt(s, l);
6811
+ const C = f.map((y) => pt(y.theme, n));
6812
+ o = rr(f, p, C, c, u, "fg", h), r = rr(f, p, C, c, u, "bg", h), a = `shiki-themes ${p.map((y) => y.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
6813
6813
  } else if ("theme" in n) {
6814
6814
  const u = pt(n.theme, n);
6815
6815
  s = Sn(
@@ -6830,21 +6830,21 @@ function mt(t, e, n) {
6830
6830
  grammarState: l
6831
6831
  };
6832
6832
  }
6833
- function rr(t, e, n, r, o, s) {
6834
- return t.map((a, i) => {
6835
- const l = ue(e[i][s], n[i]) || "inherit", u = `${r + a.color}${s === "bg" ? "-bg" : ""}:${l}`;
6836
- if (i === 0 && o) {
6833
+ function rr(t, e, n, r, o, s, a) {
6834
+ return t.map((i, l) => {
6835
+ const u = ue(e[l][s], n[l]) || "inherit", c = `${r + i.color}${s === "bg" ? "-bg" : ""}:${u}`;
6836
+ if (l === 0 && o) {
6837
6837
  if (o === _n && t.length > 1) {
6838
- const c = t.findIndex((p) => p.color === "light"), h = t.findIndex((p) => p.color === "dark");
6839
- if (c === -1 || h === -1)
6838
+ const h = t.findIndex((g) => g.color === "light"), f = t.findIndex((g) => g.color === "dark");
6839
+ if (h === -1 || f === -1)
6840
6840
  throw new F('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
6841
- const d = ue(e[c][s], n[c]) || "inherit", f = ue(e[h][s], n[h]) || "inherit";
6842
- return `light-dark(${d}, ${f});${u}`;
6841
+ const d = ue(e[h][s], n[h]) || "inherit", p = ue(e[f][s], n[f]) || "inherit";
6842
+ return `light-dark(${d}, ${p});${c}`;
6843
6843
  }
6844
- return l;
6844
+ return u;
6845
6845
  }
6846
- return u;
6847
- }).join(";");
6846
+ return a === "css-vars" ? c : null;
6847
+ }).filter((i) => !!i).join(";");
6848
6848
  }
6849
6849
  function yt(t, e, n, r = {
6850
6850
  meta: {},
@@ -6865,18 +6865,18 @@ function yt(t, e, n, r = {
6865
6865
  } = mt(t, o, n);
6866
6866
  const {
6867
6867
  mergeWhitespaces: h = !0,
6868
- mergeSameStyleTokens: d = !1
6868
+ mergeSameStyleTokens: f = !1
6869
6869
  } = n;
6870
- h === !0 ? s = $l(s) : h === "never" && (s = Tl(s)), d && (s = Ml(s));
6871
- const f = {
6870
+ h === !0 ? s = Tl(s) : h === "never" && (s = Ml(s)), f && (s = Ol(s));
6871
+ const d = {
6872
6872
  ...r,
6873
6873
  get source() {
6874
6874
  return o;
6875
6875
  }
6876
6876
  };
6877
6877
  for (const p of dt(n))
6878
- s = p.tokens?.call(f, s) || s;
6879
- return Ll(
6878
+ s = p.tokens?.call(d, s) || s;
6879
+ return $l(
6880
6880
  s,
6881
6881
  {
6882
6882
  ...n,
@@ -6885,11 +6885,11 @@ function yt(t, e, n, r = {
6885
6885
  themeName: l,
6886
6886
  rootStyle: u
6887
6887
  },
6888
- f,
6888
+ d,
6889
6889
  c
6890
6890
  );
6891
6891
  }
6892
- function Ll(t, e, n, r = We(t)) {
6892
+ function $l(t, e, n, r = We(t)) {
6893
6893
  const o = dt(e), s = [], a = {
6894
6894
  type: "root",
6895
6895
  children: []
@@ -6919,7 +6919,7 @@ function Ll(t, e, n, r = We(t)) {
6919
6919
  properties: {},
6920
6920
  children: s
6921
6921
  };
6922
- const h = [], d = {
6922
+ const h = [], f = {
6923
6923
  ...n,
6924
6924
  structure: i,
6925
6925
  addClassToHast: xo,
@@ -6945,49 +6945,49 @@ function Ll(t, e, n, r = We(t)) {
6945
6945
  return h;
6946
6946
  }
6947
6947
  };
6948
- if (t.forEach((p, m) => {
6949
- m && (i === "inline" ? a.children.push({ type: "element", tagName: "br", properties: {}, children: [] }) : i === "classic" && s.push({ type: "text", value: `
6948
+ if (t.forEach((p, g) => {
6949
+ g && (i === "inline" ? a.children.push({ type: "element", tagName: "br", properties: {}, children: [] }) : i === "classic" && s.push({ type: "text", value: `
6950
6950
  ` }));
6951
- let g = {
6951
+ let C = {
6952
6952
  type: "element",
6953
6953
  tagName: "span",
6954
6954
  properties: { class: "line" },
6955
6955
  children: []
6956
- }, C = 0;
6957
- for (const y of p) {
6956
+ }, y = 0;
6957
+ for (const m of p) {
6958
6958
  let _ = {
6959
6959
  type: "element",
6960
6960
  tagName: "span",
6961
6961
  properties: {
6962
- ...y.htmlAttrs
6962
+ ...m.htmlAttrs
6963
6963
  },
6964
- children: [{ type: "text", value: y.content }]
6964
+ children: [{ type: "text", value: m.content }]
6965
6965
  };
6966
- const S = rn(y.htmlStyle || ft(y));
6966
+ const S = rn(m.htmlStyle || ft(m));
6967
6967
  S && (_.properties.style = S);
6968
6968
  for (const A of o)
6969
- _ = A?.span?.call(d, _, m + 1, C, g, y) || _;
6970
- i === "inline" ? a.children.push(_) : i === "classic" && g.children.push(_), C += y.content.length;
6969
+ _ = A?.span?.call(f, _, g + 1, y, C, m) || _;
6970
+ i === "inline" ? a.children.push(_) : i === "classic" && C.children.push(_), y += m.content.length;
6971
6971
  }
6972
6972
  if (i === "classic") {
6973
- for (const y of o)
6974
- g = y?.line?.call(d, g, m + 1) || g;
6975
- h.push(g), s.push(g);
6973
+ for (const m of o)
6974
+ C = m?.line?.call(f, C, g + 1) || C;
6975
+ h.push(C), s.push(C);
6976
6976
  }
6977
6977
  }), i === "classic") {
6978
6978
  for (const p of o)
6979
- c = p?.code?.call(d, c) || c;
6979
+ c = p?.code?.call(f, c) || c;
6980
6980
  u.children.push(c);
6981
6981
  for (const p of o)
6982
- u = p?.pre?.call(d, u) || u;
6982
+ u = p?.pre?.call(f, u) || u;
6983
6983
  a.children.push(u);
6984
6984
  }
6985
- let f = a;
6985
+ let d = a;
6986
6986
  for (const p of o)
6987
- f = p?.root?.call(d, f) || f;
6988
- return r && kt(f, r), f;
6987
+ d = p?.root?.call(f, d) || d;
6988
+ return r && kt(d, r), d;
6989
6989
  }
6990
- function $l(t) {
6990
+ function Tl(t) {
6991
6991
  return t.map((e) => {
6992
6992
  const n = [];
6993
6993
  let r = "", o = 0;
@@ -7007,7 +7007,7 @@ function $l(t) {
7007
7007
  }), n;
7008
7008
  });
7009
7009
  }
7010
- function Tl(t) {
7010
+ function Ml(t) {
7011
7011
  return t.map((e) => e.flatMap((n) => {
7012
7012
  if (n.content.match(/^\s+$/))
7013
7013
  return n;
@@ -7031,7 +7031,7 @@ function Tl(t) {
7031
7031
  }), i;
7032
7032
  }));
7033
7033
  }
7034
- function Ml(t) {
7034
+ function Ol(t) {
7035
7035
  return t.map((e) => {
7036
7036
  const n = [];
7037
7037
  for (const r of e) {
@@ -7045,15 +7045,15 @@ function Ml(t) {
7045
7045
  return n;
7046
7046
  });
7047
7047
  }
7048
- const Ol = ol;
7049
- function Dl(t, e, n) {
7048
+ const Dl = ol;
7049
+ function Gl(t, e, n) {
7050
7050
  const r = {
7051
7051
  meta: {},
7052
7052
  options: n,
7053
7053
  codeToHast: (s, a) => yt(t, s, a),
7054
7054
  codeToTokens: (s, a) => mt(t, s, a)
7055
7055
  };
7056
- let o = Ol(yt(t, e, n, r));
7056
+ let o = Dl(yt(t, e, n, r));
7057
7057
  for (const s of dt(n))
7058
7058
  o = s.postprocess?.call(r, o, n) || o;
7059
7059
  return o;
@@ -7129,16 +7129,16 @@ async function No(t) {
7129
7129
  )
7130
7130
  )).filter((n) => !!n);
7131
7131
  }
7132
- let Gl = 3;
7133
- function Fl(t, e = 3) {
7134
- e > Gl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
7132
+ let Fl = 3;
7133
+ function Bl(t, e = 3) {
7134
+ e > Fl || console.trace(`[SHIKI DEPRECATE]: ${t}`);
7135
7135
  }
7136
7136
  class ve extends Error {
7137
7137
  constructor(e) {
7138
7138
  super(e), this.name = "ShikiError";
7139
7139
  }
7140
7140
  }
7141
- class Bl extends Ka {
7141
+ class jl extends Ka {
7142
7142
  constructor(e, n, r, o = {}) {
7143
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);
7144
7144
  }
@@ -7225,7 +7225,7 @@ class Bl extends Ka {
7225
7225
  this._langGraph.set(n, this._langMap.get(n));
7226
7226
  }
7227
7227
  }
7228
- class jl {
7228
+ class Ul {
7229
7229
  _langs = /* @__PURE__ */ new Map();
7230
7230
  _scopeToLang = /* @__PURE__ */ new Map();
7231
7231
  _injections = /* @__PURE__ */ new Map();
@@ -7263,33 +7263,33 @@ class jl {
7263
7263
  }
7264
7264
  }
7265
7265
  let De = 0;
7266
- function Ul(t) {
7266
+ function zl(t) {
7267
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.`);
7268
7268
  let e = !1;
7269
7269
  if (!t.engine)
7270
7270
  throw new ve("`engine` option is required for synchronous mode");
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
+ const n = (t.langs || []).flat(1), r = (t.themes || []).flat(1).map(kn), o = new Ul(t.engine, n), s = new jl(o, r, n, t.langAlias);
7272
7272
  let a;
7273
- function i(y) {
7274
- g();
7275
- const _ = s.getGrammar(typeof y == "string" ? y : y.name);
7273
+ function i(m) {
7274
+ C();
7275
+ const _ = s.getGrammar(typeof m == "string" ? m : m.name);
7276
7276
  if (!_)
7277
- throw new ve(`Language \`${y}\` not found, you may need to load it first`);
7277
+ throw new ve(`Language \`${m}\` not found, you may need to load it first`);
7278
7278
  return _;
7279
7279
  }
7280
- function l(y) {
7281
- if (y === "none")
7280
+ function l(m) {
7281
+ if (m === "none")
7282
7282
  return { bg: "", fg: "", name: "none", settings: [], type: "dark" };
7283
- g();
7284
- const _ = s.getTheme(y);
7283
+ C();
7284
+ const _ = s.getTheme(m);
7285
7285
  if (!_)
7286
- throw new ve(`Theme \`${y}\` not found, you may need to load it first`);
7286
+ throw new ve(`Theme \`${m}\` not found, you may need to load it first`);
7287
7287
  return _;
7288
7288
  }
7289
- function u(y) {
7290
- g();
7291
- const _ = l(y);
7292
- a !== y && (s.setTheme(_), a = y);
7289
+ function u(m) {
7290
+ C();
7291
+ const _ = l(m);
7292
+ a !== m && (s.setTheme(_), a = m);
7293
7293
  const S = s.getColorMap();
7294
7294
  return {
7295
7295
  theme: _,
@@ -7297,30 +7297,30 @@ function Ul(t) {
7297
7297
  };
7298
7298
  }
7299
7299
  function c() {
7300
- return g(), s.getLoadedThemes();
7300
+ return C(), s.getLoadedThemes();
7301
7301
  }
7302
7302
  function h() {
7303
- return g(), s.getLoadedLanguages();
7303
+ return C(), s.getLoadedLanguages();
7304
7304
  }
7305
- function d(...y) {
7306
- g(), s.loadLanguages(y.flat(1));
7305
+ function f(...m) {
7306
+ C(), s.loadLanguages(m.flat(1));
7307
7307
  }
7308
- async function f(...y) {
7309
- return d(await Io(y));
7308
+ async function d(...m) {
7309
+ return f(await Io(m));
7310
7310
  }
7311
- function p(...y) {
7312
- g();
7313
- for (const _ of y.flat(1))
7311
+ function p(...m) {
7312
+ C();
7313
+ for (const _ of m.flat(1))
7314
7314
  s.loadTheme(_);
7315
7315
  }
7316
- async function m(...y) {
7317
- return g(), p(await No(y));
7316
+ async function g(...m) {
7317
+ return C(), p(await No(m));
7318
7318
  }
7319
- function g() {
7319
+ function C() {
7320
7320
  if (e)
7321
7321
  throw new ve("Shiki instance has been disposed");
7322
7322
  }
7323
- function C() {
7323
+ function y() {
7324
7324
  e || (e = !0, s.dispose(), De -= 1);
7325
7325
  }
7326
7326
  return {
@@ -7329,16 +7329,16 @@ function Ul(t) {
7329
7329
  getLanguage: i,
7330
7330
  getLoadedThemes: c,
7331
7331
  getLoadedLanguages: h,
7332
- loadLanguage: f,
7333
- loadLanguageSync: d,
7334
- loadTheme: m,
7332
+ loadLanguage: d,
7333
+ loadLanguageSync: f,
7334
+ loadTheme: g,
7335
7335
  loadThemeSync: p,
7336
- dispose: C,
7337
- [Symbol.dispose]: C
7336
+ dispose: y,
7337
+ [Symbol.dispose]: y
7338
7338
  };
7339
7339
  }
7340
- async function zl(t) {
7341
- t.engine || Fl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
7340
+ async function Hl(t) {
7341
+ t.engine || Bl("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
7342
7342
  const [
7343
7343
  e,
7344
7344
  n,
@@ -7348,22 +7348,22 @@ async function zl(t) {
7348
7348
  Io(t.langs || []),
7349
7349
  t.engine
7350
7350
  ]);
7351
- return Ul({
7351
+ return zl({
7352
7352
  ...t,
7353
7353
  themes: e,
7354
7354
  langs: n,
7355
7355
  engine: r
7356
7356
  });
7357
7357
  }
7358
- async function Hl(t) {
7359
- const e = await zl(t);
7358
+ async function Wl(t) {
7359
+ const e = await Hl(t);
7360
7360
  return {
7361
- getLastGrammarState: (...n) => xl(e, ...n),
7361
+ getLastGrammarState: (...n) => El(e, ...n),
7362
7362
  codeToTokensBase: (n, r) => Sn(e, n, r),
7363
7363
  codeToTokensWithThemes: (n, r) => Ro(e, n, r),
7364
7364
  codeToTokens: (n, r) => mt(e, n, r),
7365
7365
  codeToHast: (n, r) => yt(e, n, r),
7366
- codeToHtml: (n, r) => Dl(e, n, r),
7366
+ codeToHtml: (n, r) => Gl(e, n, r),
7367
7367
  getBundledLanguages: () => ({}),
7368
7368
  getBundledThemes: () => ({}),
7369
7369
  ...e,
@@ -7373,14 +7373,14 @@ async function Hl(t) {
7373
7373
  function Po(t) {
7374
7374
  return "children" in t ? Lo(t) : "value" in t ? t.value : "";
7375
7375
  }
7376
- function Wl(t) {
7376
+ function Vl(t) {
7377
7377
  return t.type === "text" ? t.value : "children" in t ? Lo(t) : "";
7378
7378
  }
7379
7379
  function Lo(t) {
7380
7380
  let e = -1;
7381
7381
  const n = [];
7382
7382
  for (; ++e < t.children.length; )
7383
- n[e] = Wl(t.children[e]);
7383
+ n[e] = Vl(t.children[e]);
7384
7384
  return n.join("");
7385
7385
  }
7386
7386
  const ql = {
@@ -7393,7 +7393,7 @@ const ql = {
7393
7393
  lang: r.at(2)
7394
7394
  };
7395
7395
  }
7396
- }, ir = "language-", Vl = (t, e) => {
7396
+ }, ir = "language-", Xl = (t, e) => {
7397
7397
  const n = e.children[0];
7398
7398
  if (!n || n.type !== "element" || n.tagName !== "code" || !n.properties)
7399
7399
  return;
@@ -7406,8 +7406,8 @@ const ql = {
7406
7406
  code: Po(n),
7407
7407
  meta: n.data?.meta ?? n.properties.metastring?.toString() ?? ""
7408
7408
  };
7409
- }, Xl = "language-";
7410
- function Kl(t, e) {
7409
+ }, Kl = "language-";
7410
+ function Yl(t, e) {
7411
7411
  const {
7412
7412
  addLanguageClass: n = !1,
7413
7413
  parseMetaString: r,
@@ -7420,17 +7420,17 @@ function Kl(t, e) {
7420
7420
  lazy: c = !1,
7421
7421
  ...h
7422
7422
  } = e;
7423
- function d(f, p, m = "", g = {}) {
7424
- const C = `${f}:${m}:${p}`, y = o?.get(C);
7425
- if (y)
7426
- return y;
7423
+ function f(d, p, g = "", C = {}) {
7424
+ const y = `${d}:${g}:${p}`, m = o?.get(y);
7425
+ if (m)
7426
+ return m;
7427
7427
  const _ = {
7428
7428
  ...h,
7429
- lang: f,
7429
+ lang: d,
7430
7430
  meta: {
7431
7431
  ...h.meta,
7432
- ...g,
7433
- __raw: m
7432
+ ...C,
7433
+ __raw: g
7434
7434
  }
7435
7435
  };
7436
7436
  n && (_.transformers = [
@@ -7438,14 +7438,14 @@ function Kl(t, e) {
7438
7438
  {
7439
7439
  name: "rehype-shiki:code-language-class",
7440
7440
  code(S) {
7441
- return this.addClassToHast(S, `${Xl}${f}`), S;
7441
+ return this.addClassToHast(S, `${Kl}${d}`), S;
7442
7442
  }
7443
7443
  }
7444
7444
  ]), l && p.endsWith(`
7445
7445
  `) && (p = p.slice(0, -1));
7446
7446
  try {
7447
7447
  const S = t.codeToHast(p, _);
7448
- return o?.set(C, S), S;
7448
+ return o?.set(y, S), S;
7449
7449
  } catch (S) {
7450
7450
  if (i)
7451
7451
  i(S);
@@ -7453,32 +7453,32 @@ function Kl(t, e) {
7453
7453
  throw S;
7454
7454
  }
7455
7455
  }
7456
- return (f) => {
7456
+ return (d) => {
7457
7457
  const p = [];
7458
- if (Vr(f, "element", (m, g, C) => {
7459
- let y;
7460
- if (!C || g == null)
7458
+ if (qr(d, "element", (g, C, y) => {
7459
+ let m;
7460
+ if (!y || C == null)
7461
7461
  return;
7462
- if (m.tagName === "pre")
7463
- y = Vl;
7464
- else if (m.tagName === "code" && u)
7465
- y = ql[u];
7462
+ if (g.tagName === "pre")
7463
+ m = Xl;
7464
+ else if (g.tagName === "code" && u)
7465
+ m = ql[u];
7466
7466
  else
7467
7467
  return;
7468
- const _ = y(f, m);
7468
+ const _ = m(d, g);
7469
7469
  if (!_)
7470
7470
  return;
7471
7471
  let S, A = !1;
7472
7472
  if (_.lang ? t.getLoadedLanguages().includes(_.lang) || vo(_.lang) ? S = _.lang : c ? (A = !0, S = _.lang) : a && (S = a) : S = s, !S)
7473
7473
  return;
7474
- const D = _.meta ? r?.(_.meta, m, f) : void 0, P = (j) => {
7475
- const Z = d(j, _.code, _.meta, D ?? {});
7474
+ const D = _.meta ? r?.(_.meta, g, d) : void 0, P = (j) => {
7475
+ const Z = f(j, _.code, _.meta, D ?? {});
7476
7476
  if (Z) {
7477
7477
  if (_.type === "inline") {
7478
7478
  const ee = Z.children[0];
7479
7479
  ee.type === "element" && ee.tagName === "pre" && (ee.tagName = "span");
7480
7480
  }
7481
- C.children[g] = Z;
7481
+ y.children[C] = Z;
7482
7482
  }
7483
7483
  };
7484
7484
  if (A)
@@ -7495,14 +7495,14 @@ function Kl(t, e) {
7495
7495
  P(S);
7496
7496
  return "skip";
7497
7497
  }), p.length > 0) {
7498
- async function m() {
7498
+ async function g() {
7499
7499
  await Promise.all(p);
7500
7500
  }
7501
- return m();
7501
+ return g();
7502
7502
  }
7503
7503
  };
7504
7504
  }
7505
- function Yl(t) {
7505
+ function Jl(t) {
7506
7506
  if (!t)
7507
7507
  return null;
7508
7508
  const e = t.match(/\{([\d,-]+)\}/);
@@ -7512,7 +7512,7 @@ function Yl(t) {
7512
7512
  }) : null;
7513
7513
  }
7514
7514
  const lr = Symbol("highlighted-lines");
7515
- function Jl(t = {}) {
7515
+ function Zl(t = {}) {
7516
7516
  const {
7517
7517
  className: e = "highlighted"
7518
7518
  } = t;
@@ -7522,14 +7522,14 @@ function Jl(t = {}) {
7522
7522
  if (!this.options.meta?.__raw)
7523
7523
  return;
7524
7524
  const o = this.meta;
7525
- return o[lr] ??= Yl(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
7525
+ return o[lr] ??= Jl(this.options.meta.__raw), (o[lr] ?? []).includes(r) && this.addClassToHast(n, e), n;
7526
7526
  }
7527
7527
  };
7528
7528
  }
7529
- function Zl(t) {
7529
+ function Ql(t) {
7530
7530
  return t ? Array.from(t.matchAll(/\/((?:\\.|[^/])+)\//g)).map((n) => n[1].replace(/\\(.)/g, "$1")) : [];
7531
7531
  }
7532
- function Ql(t = {}) {
7532
+ function eu(t = {}) {
7533
7533
  const {
7534
7534
  className: e = "highlighted-word"
7535
7535
  } = t;
@@ -7538,10 +7538,10 @@ function Ql(t = {}) {
7538
7538
  preprocess(n, r) {
7539
7539
  if (!this.options.meta?.__raw)
7540
7540
  return;
7541
- const o = Zl(this.options.meta.__raw);
7541
+ const o = Ql(this.options.meta.__raw);
7542
7542
  r.decorations ||= [];
7543
7543
  for (const s of o) {
7544
- const a = eu(n, s);
7544
+ const a = tu(n, s);
7545
7545
  for (const i of a)
7546
7546
  r.decorations.push({
7547
7547
  start: i,
@@ -7554,7 +7554,7 @@ function Ql(t = {}) {
7554
7554
  }
7555
7555
  };
7556
7556
  }
7557
- function eu(t, e) {
7557
+ function tu(t, e) {
7558
7558
  const n = [];
7559
7559
  let r = 0;
7560
7560
  for (; ; ) {
@@ -7569,7 +7569,7 @@ function Le(t) {
7569
7569
  if ([...t].length !== 1) throw new Error(`Expected "${t}" to be a single code point`);
7570
7570
  return t.codePointAt(0);
7571
7571
  }
7572
- function tu(t, e, n) {
7572
+ function nu(t, e, n) {
7573
7573
  return t.has(e) || t.set(e, n), t.get(e);
7574
7574
  }
7575
7575
  const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), B = String.raw;
@@ -7609,10 +7609,10 @@ const $o = B`\[\^?`, To = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
7609
7609
  | &&
7610
7610
  | .
7611
7611
  `.replace(/\s+/g, ""), "gsu");
7612
- function nu(t, e = {}) {
7612
+ function ru(t, e = {}) {
7613
7613
  const n = { flags: "", ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } };
7614
7614
  if (typeof t != "string") throw new Error("String expected as pattern");
7615
- const r = _u(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
7615
+ const r = Su(n.flags), o = [r.extended], s = { captureGroup: n.rules.captureGroup, getCurrentModX() {
7616
7616
  return o.at(-1);
7617
7617
  }, numOpenGroups: 0, popModX() {
7618
7618
  o.pop();
@@ -7623,30 +7623,30 @@ function nu(t, e = {}) {
7623
7623
  }, singleline: n.rules.singleline };
7624
7624
  let a = [], i;
7625
7625
  for (et.lastIndex = 0; i = et.exec(t); ) {
7626
- const h = ru(s, t, i[0], et.lastIndex);
7626
+ const h = ou(s, t, i[0], et.lastIndex);
7627
7627
  h.tokens ? a.push(...h.tokens) : h.token && a.push(h.token), h.lastIndex !== void 0 && (et.lastIndex = h.lastIndex);
7628
7628
  }
7629
7629
  const l = [];
7630
7630
  let u = 0;
7631
7631
  a.filter((h) => h.type === "GroupOpen").forEach((h) => {
7632
7632
  h.kind === "capturing" ? h.number = ++u : h.raw === "(" && l.push(h);
7633
- }), u || l.forEach((h, d) => {
7634
- h.kind = "capturing", h.number = d + 1;
7633
+ }), u || l.forEach((h, f) => {
7634
+ h.kind = "capturing", h.number = f + 1;
7635
7635
  });
7636
7636
  const c = u || l.length;
7637
- return { tokens: a.map((h) => h.type === "EscapedNumber" ? ku(h, c) : h).flat(), flags: r };
7637
+ return { tokens: a.map((h) => h.type === "EscapedNumber" ? vu(h, c) : h).flat(), flags: r };
7638
7638
  }
7639
- function ru(t, e, n, r) {
7639
+ function ou(t, e, n, r) {
7640
7640
  const [o, s] = n;
7641
7641
  if (n === "[" || n === "[^") {
7642
- const a = ou(e, n, r);
7642
+ const a = su(e, n, r);
7643
7643
  return { tokens: a.tokens, lastIndex: a.lastIndex };
7644
7644
  }
7645
7645
  if (o === "\\") {
7646
7646
  if ("AbBGyYzZ".includes(s)) return { token: ur(n, n) };
7647
7647
  if (/^\\g[<']/.test(n)) {
7648
7648
  if (!/^\\g(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
7649
- return { token: du(n) };
7649
+ return { token: gu(n) };
7650
7650
  }
7651
7651
  if (/^\\k[<']/.test(n)) {
7652
7652
  if (!/^\\k(?:<[^>]+>|'[^']+')$/.test(n)) throw new Error(`Invalid group name "${n}"`);
@@ -7660,13 +7660,13 @@ function ru(t, e, n, r) {
7660
7660
  return Array.isArray(a) ? { tokens: a } : { token: a };
7661
7661
  }
7662
7662
  if (o === "(") {
7663
- if (s === "*") return { token: bu(n) };
7663
+ if (s === "*") return { token: wu(n) };
7664
7664
  if (n === "(?{") throw new Error(`Unsupported callout "${n}"`);
7665
7665
  if (n.startsWith("(?#")) {
7666
7666
  if (e[r] !== ")") throw new Error('Unclosed comment group "(?#"');
7667
7667
  return { lastIndex: r + 1 };
7668
7668
  }
7669
- if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: yu(n, t) };
7669
+ if (/^\(\?[-imx]+[:)]$/.test(n)) return { token: bu(n, t) };
7670
7670
  if (t.pushModX(t.getCurrentModX()), t.numOpenGroups++, n === "(" && !t.captureGroup || n === "(?:") return { token: Se("group", n) };
7671
7671
  if (n === "(?>") return { token: Se("atomic", n) };
7672
7672
  if (n === "(?=" || n === "(?!" || n === "(?<=" || n === "(?<!") return { token: Se(n[2] === "<" ? "lookbehind" : "lookahead", n, { negate: n.endsWith("!") }) };
@@ -7679,7 +7679,7 @@ function ru(t, e, n, r) {
7679
7679
  }
7680
7680
  if (n === ")") {
7681
7681
  if (t.popModX(), t.numOpenGroups--, t.numOpenGroups < 0) throw new Error('Unmatched ")"');
7682
- return { token: hu(n) };
7682
+ return { token: pu(n) };
7683
7683
  }
7684
7684
  if (t.getCurrentModX()) {
7685
7685
  if (n === "#") {
@@ -7697,9 +7697,9 @@ function ru(t, e, n, r) {
7697
7697
  const a = t.singleline ? { "^": B`\A`, $: B`\Z` }[n] : n;
7698
7698
  return { token: ur(a, n) };
7699
7699
  }
7700
- return n === "|" ? { token: au(n) } : xn.test(n) ? { tokens: vu(n) } : { token: se(Le(n), n) };
7700
+ return n === "|" ? { token: iu(n) } : xn.test(n) ? { tokens: xu(n) } : { token: se(Le(n), n) };
7701
7701
  }
7702
- function ou(t, e, n) {
7702
+ function su(t, e, n) {
7703
7703
  const r = [cr(e[1] === "^", e)];
7704
7704
  let o = 1, s;
7705
7705
  for (Ot.lastIndex = n; s = Ot.exec(t); ) {
@@ -7707,31 +7707,31 @@ function ou(t, e, n) {
7707
7707
  if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
7708
7708
  else if (a === "]") {
7709
7709
  if (r.at(-1).type === "CharacterClassOpen") r.push(se(93, a));
7710
- else if (o--, r.push(iu(a)), !o) break;
7710
+ else if (o--, r.push(lu(a)), !o) break;
7711
7711
  } else {
7712
- const i = su(a);
7712
+ const i = au(a);
7713
7713
  Array.isArray(i) ? r.push(...i) : r.push(i);
7714
7714
  }
7715
7715
  }
7716
7716
  return { tokens: r, lastIndex: Ot.lastIndex || t.length };
7717
7717
  }
7718
- function su(t) {
7718
+ function au(t) {
7719
7719
  if (t[0] === "\\") return Mo(t, { inCharClass: !0 });
7720
7720
  if (t[0] === "[") {
7721
7721
  const e = /\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);
7722
7722
  if (!e || !vn.has(e.groups.name)) throw new Error(`Invalid POSIX class "${t}"`);
7723
7723
  return ge("posix", t, { value: e.groups.name, negate: !!e.groups.negate });
7724
7724
  }
7725
- return t === "-" ? lu(t) : t === "&&" ? uu(t) : se(Le(t), t);
7725
+ return t === "-" ? uu(t) : t === "&&" ? cu(t) : se(Le(t), t);
7726
7726
  }
7727
7727
  function Mo(t, { inCharClass: e }) {
7728
7728
  const n = t[1];
7729
- if (n === "c" || n === "C") return mu(t);
7730
- if ("dDhHsSwW".includes(n)) return wu(t);
7729
+ if (n === "c" || n === "C") return yu(t);
7730
+ if ("dDhHsSwW".includes(n)) return Cu(t);
7731
7731
  if (t.startsWith(B`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
7732
7732
  if (/^\\[pP]\{/.test(t)) {
7733
7733
  if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
7734
- return Cu(t);
7734
+ return _u(t);
7735
7735
  }
7736
7736
  if (/^\\x[89A-Fa-f]\p{AHex}/u.test(t)) try {
7737
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();
@@ -7742,15 +7742,15 @@ function Mo(t, { inCharClass: e }) {
7742
7742
  } catch {
7743
7743
  throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`);
7744
7744
  }
7745
- if (n === "u" || n === "x") return se(Su(t), t);
7745
+ if (n === "u" || n === "x") return se(ku(t), t);
7746
7746
  if (hr.has(n)) return se(hr.get(n), t);
7747
- if (/\d/.test(n)) return cu(e, t);
7747
+ if (/\d/.test(n)) return hu(e, t);
7748
7748
  if (t === "\\") throw new Error(B`Incomplete escape "\"`);
7749
7749
  if (n === "M") throw new Error(`Unsupported meta "${t}"`);
7750
7750
  if ([...t].length === 2) return se(t.codePointAt(1), t);
7751
7751
  throw new Error(`Unexpected escape "${t}"`);
7752
7752
  }
7753
- function au(t) {
7753
+ function iu(t) {
7754
7754
  return { type: "Alternator", raw: t };
7755
7755
  }
7756
7756
  function ur(t, e) {
@@ -7762,13 +7762,13 @@ function Oo(t) {
7762
7762
  function se(t, e) {
7763
7763
  return { type: "Character", value: t, raw: e };
7764
7764
  }
7765
- function iu(t) {
7765
+ function lu(t) {
7766
7766
  return { type: "CharacterClassClose", raw: t };
7767
7767
  }
7768
- function lu(t) {
7768
+ function uu(t) {
7769
7769
  return { type: "CharacterClassHyphen", raw: t };
7770
7770
  }
7771
- function uu(t) {
7771
+ function cu(t) {
7772
7772
  return { type: "CharacterClassIntersector", raw: t };
7773
7773
  }
7774
7774
  function cr(t, e) {
@@ -7780,31 +7780,31 @@ function ge(t, e, n = {}) {
7780
7780
  function Do(t, e, n = {}) {
7781
7781
  return t === "keep" ? { type: "Directive", kind: t, raw: e } : { type: "Directive", kind: t, flags: $e(n.flags), raw: e };
7782
7782
  }
7783
- function cu(t, e) {
7783
+ function hu(t, e) {
7784
7784
  return { type: "EscapedNumber", inCharClass: t, raw: e };
7785
7785
  }
7786
- function hu(t) {
7786
+ function pu(t) {
7787
7787
  return { type: "GroupClose", raw: t };
7788
7788
  }
7789
7789
  function Se(t, e, n = {}) {
7790
7790
  return { type: "GroupOpen", kind: t, ...n, raw: e };
7791
7791
  }
7792
- function pu(t, e, n, r) {
7792
+ function fu(t, e, n, r) {
7793
7793
  return { type: "NamedCallout", kind: t, tag: e, arguments: n, raw: r };
7794
7794
  }
7795
- function fu(t, e, n, r) {
7795
+ function du(t, e, n, r) {
7796
7796
  return { type: "Quantifier", kind: t, min: e, max: n, raw: r };
7797
7797
  }
7798
- function du(t) {
7798
+ function gu(t) {
7799
7799
  return { type: "Subroutine", raw: t };
7800
7800
  }
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) {
7801
+ const mu = /* @__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 yu(t) {
7803
7803
  const e = t[1] === "c" ? t[2] : t[3];
7804
7804
  if (!e || !/[A-Za-z]/.test(e)) throw new Error(`Unsupported control character "${t}"`);
7805
7805
  return se(Le(e.toUpperCase()) - 64, t);
7806
7806
  }
7807
- function yu(t, e) {
7807
+ function bu(t, e) {
7808
7808
  let { on: n, off: r } = /^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;
7809
7809
  r ??= "";
7810
7810
  const o = (e.getCurrentModX() || n.includes("x")) && !r.includes("x"), s = fr(n), a = fr(r), i = {};
@@ -7812,13 +7812,13 @@ function yu(t, e) {
7812
7812
  if (t.endsWith(":")) return e.pushModX(o), e.numOpenGroups++, Se("group", t, { ...(s || a) && { flags: i } });
7813
7813
  throw new Error(`Unexpected flag modifier "${t}"`);
7814
7814
  }
7815
- function bu(t) {
7815
+ function wu(t) {
7816
7816
  const e = /\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);
7817
7817
  if (!e) throw new Error(`Incomplete or invalid named callout "${t}"`);
7818
7818
  const { name: n, tag: r, args: o } = e.groups;
7819
7819
  if (!n) throw new Error(`Invalid named callout "${t}"`);
7820
7820
  if (r === "") throw new Error(`Named callout tag with empty value not allowed "${t}"`);
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
+ const s = o ? o.split(",").filter((c) => c !== "").map((c) => /^[+-]?\d+$/.test(c) ? +c : c) : [], [a, i, l] = s, u = mu.has(n) ? n.toLowerCase() : "custom";
7822
7822
  switch (u) {
7823
7823
  case "fail":
7824
7824
  case "mismatch":
@@ -7850,7 +7850,7 @@ function bu(t) {
7850
7850
  default:
7851
7851
  throw new Error(`Unexpected named callout kind "${u}"`);
7852
7852
  }
7853
- return pu(u, r ?? null, o?.split(",") ?? null, t);
7853
+ return fu(u, r ?? null, o?.split(",") ?? null, t);
7854
7854
  }
7855
7855
  function pr(t) {
7856
7856
  let e = null, n, r;
@@ -7862,13 +7862,13 @@ function pr(t) {
7862
7862
  e = "lazy";
7863
7863
  } else e || (e = "greedy");
7864
7864
  } else n = t[0] === "+" ? 1 : 0, r = t[0] === "?" ? 1 : 1 / 0, e = t[1] === "+" ? "possessive" : t[1] === "?" ? "lazy" : "greedy";
7865
- return fu(e, n, r, t);
7865
+ return du(e, n, r, t);
7866
7866
  }
7867
- function wu(t) {
7867
+ function Cu(t) {
7868
7868
  const e = t[1].toLowerCase();
7869
7869
  return ge({ d: "digit", h: "hex", s: "space", w: "word" }[e], t, { negate: t[1] !== e });
7870
7870
  }
7871
- function Cu(t) {
7871
+ function _u(t) {
7872
7872
  const { p: e, neg: n, value: r } = /^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;
7873
7873
  return ge("property", t, { value: r, negate: e === "P" && !n || e === "p" && !!n });
7874
7874
  }
@@ -7876,7 +7876,7 @@ function fr(t) {
7876
7876
  const e = {};
7877
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;
7878
7878
  }
7879
- function _u(t) {
7879
+ function Su(t) {
7880
7880
  const e = { ignoreCase: !1, dotAll: !1, extended: !1, digitIsAscii: !1, posixIsAscii: !1, spaceIsAscii: !1, wordIsAscii: !1, textSegmentMode: null };
7881
7881
  for (let n = 0; n < t.length; n++) {
7882
7882
  const r = t[n];
@@ -7890,12 +7890,12 @@ function _u(t) {
7890
7890
  }
7891
7891
  return e;
7892
7892
  }
7893
- function Su(t) {
7893
+ function ku(t) {
7894
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}"`);
7895
7895
  const e = t[2] === "{" ? /^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(t).groups.hex : t.slice(2);
7896
7896
  return parseInt(e, 16);
7897
7897
  }
7898
- function ku(t, e) {
7898
+ function vu(t, e) {
7899
7899
  const { raw: n, inCharClass: r } = t, o = n.slice(1);
7900
7900
  if (!r && (o !== "0" && o.length === 1 || o[0] !== "0" && +o <= e)) return [Oo(n)];
7901
7901
  const s = [], a = o.match(/^[0-7]+|\d/g);
@@ -7909,7 +7909,7 @@ function ku(t, e) {
7909
7909
  }
7910
7910
  return s;
7911
7911
  }
7912
- function vu(t) {
7912
+ function xu(t) {
7913
7913
  const e = [], n = new RegExp(xn, "gy");
7914
7914
  let r;
7915
7915
  for (; r = n.exec(t); ) {
@@ -7934,62 +7934,62 @@ function Go(t, e) {
7934
7934
  const n = t.body[0];
7935
7935
  return !e || Object.keys(e).every((r) => e[r] === n[r]);
7936
7936
  }
7937
- function xu(t) {
7938
- return Eu.has(t.type);
7937
+ function Eu(t) {
7938
+ return Au.has(t.type);
7939
7939
  }
7940
- const Eu = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
7940
+ const Au = /* @__PURE__ */ new Set(["AbsenceFunction", "Backreference", "CapturingGroup", "Character", "CharacterClass", "CharacterSet", "Group", "Quantifier", "Subroutine"]);
7941
7941
  function Fo(t, e = {}) {
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
+ const n = { flags: "", normalizeUnknownPropertyNames: !1, skipBackrefValidation: !1, skipLookbehindValidation: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e, rules: { captureGroup: !1, singleline: !1, ...e.rules } }, r = ru(t, { flags: n.flags, rules: { captureGroup: n.rules.captureGroup, singleline: n.rules.singleline } }), o = (f, d) => {
7943
7943
  const p = r.tokens[s.nextIndex];
7944
- switch (s.parent = d, s.nextIndex++, p.type) {
7944
+ switch (s.parent = f, s.nextIndex++, p.type) {
7945
7945
  case "Alternator":
7946
7946
  return me();
7947
7947
  case "Assertion":
7948
- return Au(p);
7948
+ return Ru(p);
7949
7949
  case "Backreference":
7950
- return Ru(p, s);
7950
+ return Iu(p, s);
7951
7951
  case "Character":
7952
- return vt(p.value, { useLastValid: !!f.isCheckingRangeEnd });
7952
+ return vt(p.value, { useLastValid: !!d.isCheckingRangeEnd });
7953
7953
  case "CharacterClassHyphen":
7954
- return Iu(p, s, f);
7954
+ return Nu(p, s, d);
7955
7955
  case "CharacterClassOpen":
7956
- return Nu(p, s, f);
7956
+ return Pu(p, s, d);
7957
7957
  case "CharacterSet":
7958
- return Pu(p, s);
7958
+ return Lu(p, s);
7959
7959
  case "Directive":
7960
- return Du(p.kind, { flags: p.flags });
7960
+ return Gu(p.kind, { flags: p.flags });
7961
7961
  case "GroupOpen":
7962
- return Lu(p, s, f);
7962
+ return $u(p, s, d);
7963
7963
  case "NamedCallout":
7964
- return Fu(p.kind, p.tag, p.arguments);
7964
+ return Bu(p.kind, p.tag, p.arguments);
7965
7965
  case "Quantifier":
7966
- return $u(p, s);
7967
- case "Subroutine":
7968
7966
  return Tu(p, s);
7967
+ case "Subroutine":
7968
+ return Mu(p, s);
7969
7969
  default:
7970
7970
  throw new Error(`Unexpected token type "${p.type}"`);
7971
7971
  }
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
+ }, 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 = Uu(Fu(r.flags));
7973
7973
  let i = a.body[0];
7974
7974
  for (; s.nextIndex < r.tokens.length; ) {
7975
- const d = o(i, {});
7976
- d.type === "Alternative" ? (a.body.push(d), i = d) : i.body.push(d);
7975
+ const f = o(i, {});
7976
+ f.type === "Alternative" ? (a.body.push(f), i = f) : i.body.push(f);
7977
7977
  }
7978
7978
  const { capturingGroups: l, hasNumberedRef: u, namedGroupsByName: c, subroutines: h } = s;
7979
7979
  if (u && c.size && !n.rules.captureGroup) throw new Error("Numbered backref/subroutine not allowed when using named capture");
7980
- for (const { ref: d } of h) if (typeof d == "number") {
7981
- if (d > l.length) throw new Error("Subroutine uses a group number that's not defined");
7982
- d && (l[d - 1].isSubroutined = !0);
7983
- } else if (c.has(d)) {
7984
- if (c.get(d).length > 1) throw new Error(B`Subroutine uses a duplicate group name "\g<${d}>"`);
7985
- c.get(d)[0].isSubroutined = !0;
7986
- } else throw new Error(B`Subroutine uses a group name that's not defined "\g<${d}>"`);
7980
+ for (const { ref: f } of h) if (typeof f == "number") {
7981
+ if (f > l.length) throw new Error("Subroutine uses a group number that's not defined");
7982
+ f && (l[f - 1].isSubroutined = !0);
7983
+ } else if (c.has(f)) {
7984
+ if (c.get(f).length > 1) throw new Error(B`Subroutine uses a duplicate group name "\g<${f}>"`);
7985
+ c.get(f)[0].isSubroutined = !0;
7986
+ } else throw new Error(B`Subroutine uses a group name that's not defined "\g<${f}>"`);
7987
7987
  return a;
7988
7988
  }
7989
- function Au({ kind: t }) {
7989
+ function Ru({ kind: t }) {
7990
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` });
7991
7991
  }
7992
- function Ru({ raw: t }, e) {
7992
+ function Iu({ raw: t }, e) {
7993
7993
  const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
7994
7994
  const i = e.capturingGroups.length;
7995
7995
  let l = !1;
@@ -8006,16 +8006,16 @@ function Ru({ raw: t }, e) {
8006
8006
  }
8007
8007
  return o(+r);
8008
8008
  }
8009
- function Iu(t, e, n) {
8009
+ function Nu(t, e, n) {
8010
8010
  const { tokens: r, walk: o } = e, s = e.parent, a = s.body.at(-1), i = r[e.nextIndex];
8011
8011
  if (!n.isCheckingRangeEnd && a && a.type !== "CharacterClass" && a.type !== "CharacterClassRange" && i && i.type !== "CharacterClassOpen" && i.type !== "CharacterClassClose" && i.type !== "CharacterClassIntersector") {
8012
8012
  const l = o(s, { ...n, isCheckingRangeEnd: !0 });
8013
- if (a.type === "Character" && l.type === "Character") return s.body.pop(), Ou(a, l);
8013
+ if (a.type === "Character" && l.type === "Character") return s.body.pop(), Du(a, l);
8014
8014
  throw new Error("Invalid character class range");
8015
8015
  }
8016
8016
  return vt(Le("-"));
8017
8017
  }
8018
- function Nu({ negate: t }, e, n) {
8018
+ function Pu({ negate: t }, e, n) {
8019
8019
  const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
8020
8020
  let i = mr(s);
8021
8021
  for (; i.type !== "CharacterClassClose"; ) {
@@ -8029,41 +8029,41 @@ function Nu({ negate: t }, e, n) {
8029
8029
  const l = st({ negate: t });
8030
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;
8031
8031
  }
8032
- function Pu({ kind: t, negate: e, value: n }, r) {
8032
+ function Lu({ kind: t, negate: e, value: n }, r) {
8033
8033
  const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
8034
8034
  if (t === "property") {
8035
8035
  const i = xt(n);
8036
8036
  if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
8037
8037
  else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
8038
8038
  }
8039
- return t === "posix" ? Bu(n, { negate: e }) : an(t, { negate: e });
8039
+ return t === "posix" ? ju(n, { negate: e }) : an(t, { negate: e });
8040
8040
  }
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");
8044
- let d = yr(r[e.nextIndex]);
8045
- for (; d.type !== "GroupClose"; ) {
8046
- if (d.type === "Alternator") l.body.push(me()), e.nextIndex++;
8041
+ function $u(t, e, n) {
8042
+ const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = zu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
8043
+ if (l.type === "CapturingGroup" && (o.push(l), l.name && nu(s, l.name, []).push(l)), u && n.isInAbsenceFunction) throw new Error("Nested absence function not supported by Oniguruma");
8044
+ let f = yr(r[e.nextIndex]);
8045
+ for (; f.type !== "GroupClose"; ) {
8046
+ if (f.type === "Alternator") l.body.push(me()), e.nextIndex++;
8047
8047
  else {
8048
- const f = l.body.at(-1), p = i(f, { ...n, isInAbsenceFunction: n.isInAbsenceFunction || u, isInLookbehind: n.isInLookbehind || c, isInNegLookbehind: n.isInNegLookbehind || h });
8049
- if (f.body.push(p), (c || n.isInLookbehind) && !a) {
8050
- const m = "Lookbehind includes a pattern not allowed by Oniguruma";
8048
+ const d = l.body.at(-1), p = i(d, { ...n, isInAbsenceFunction: n.isInAbsenceFunction || u, isInLookbehind: n.isInLookbehind || c, isInNegLookbehind: n.isInNegLookbehind || h });
8049
+ if (d.body.push(p), (c || n.isInLookbehind) && !a) {
8050
+ const g = "Lookbehind includes a pattern not allowed by Oniguruma";
8051
8051
  if (h || n.isInNegLookbehind) {
8052
- if (dr(p) || p.type === "CapturingGroup") throw new Error(m);
8053
- } else if (dr(p) || gr(p) && p.negate) throw new Error(m);
8052
+ if (dr(p) || p.type === "CapturingGroup") throw new Error(g);
8053
+ } else if (dr(p) || gr(p) && p.negate) throw new Error(g);
8054
8054
  }
8055
8055
  }
8056
- d = yr(r[e.nextIndex]);
8056
+ f = yr(r[e.nextIndex]);
8057
8057
  }
8058
8058
  return e.nextIndex++, l;
8059
8059
  }
8060
- function $u({ kind: t, min: e, max: n }, r) {
8060
+ function Tu({ kind: t, min: e, max: n }, r) {
8061
8061
  const o = r.parent, s = o.body.at(-1);
8062
- if (!s || !xu(s)) throw new Error("Quantifier requires a repeatable token");
8062
+ if (!s || !Eu(s)) throw new Error("Quantifier requires a repeatable token");
8063
8063
  const a = jo(t, e, n, s);
8064
8064
  return o.body.pop(), a;
8065
8065
  }
8066
- function Tu({ raw: t }, e) {
8066
+ function Mu({ raw: t }, e) {
8067
8067
  const { capturingGroups: n, subroutines: r } = e;
8068
8068
  let o = t.slice(3, -1);
8069
8069
  const s = /^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);
@@ -8074,7 +8074,7 @@ function Tu({ raw: t }, e) {
8074
8074
  const a = Uo(o);
8075
8075
  return r.push(a), a;
8076
8076
  }
8077
- function Mu(t, e) {
8077
+ function Ou(t, e) {
8078
8078
  return { type: "AbsenceFunction", kind: t, body: Ye(e?.body) };
8079
8079
  }
8080
8080
  function me(t) {
@@ -8090,7 +8090,7 @@ function sn(t, e) {
8090
8090
  }
8091
8091
  function Bo(t, e) {
8092
8092
  const n = { name: void 0, isSubroutined: !1, ...e };
8093
- if (n.name !== void 0 && !zu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
8093
+ if (n.name !== void 0 && !Hu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
8094
8094
  return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
8095
8095
  }
8096
8096
  function vt(t, e) {
@@ -8106,7 +8106,7 @@ function st(t) {
8106
8106
  const e = { kind: "union", negate: !1, ...t };
8107
8107
  return { type: "CharacterClass", kind: e.kind, negate: e.negate, body: zo(t?.body) };
8108
8108
  }
8109
- function Ou(t, e) {
8109
+ function Du(t, e) {
8110
8110
  if (e.value < t.value) throw new Error("Character class range out of order");
8111
8111
  return { type: "CharacterClassRange", min: t, max: e };
8112
8112
  }
@@ -8114,12 +8114,12 @@ function an(t, e) {
8114
8114
  const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
8115
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;
8116
8116
  }
8117
- function Du(t, e = {}) {
8117
+ function Gu(t, e = {}) {
8118
8118
  if (t === "keep") return { type: "Directive", kind: t };
8119
8119
  if (t === "flags") return { type: "Directive", kind: t, flags: $e(e.flags) };
8120
8120
  throw new Error(`Unexpected directive kind "${t}"`);
8121
8121
  }
8122
- function Gu(t) {
8122
+ function Fu(t) {
8123
8123
  return { type: "Flags", ...t };
8124
8124
  }
8125
8125
  function Q(t) {
@@ -8131,10 +8131,10 @@ function fe(t) {
8131
8131
  const e = { behind: !1, negate: !1, ...t };
8132
8132
  return { type: "LookaroundAssertion", kind: e.behind ? "lookbehind" : "lookahead", negate: e.negate, body: Ye(t?.body) };
8133
8133
  }
8134
- function Fu(t, e, n) {
8134
+ function Bu(t, e, n) {
8135
8135
  return { type: "NamedCallout", kind: t, tag: e, arguments: n };
8136
8136
  }
8137
- function Bu(t, e) {
8137
+ function ju(t, e) {
8138
8138
  const n = !!e?.negate;
8139
8139
  if (!vn.has(t)) throw new Error(`Invalid POSIX class "${t}"`);
8140
8140
  return { type: "CharacterSet", kind: "posix", value: t, negate: n };
@@ -8143,7 +8143,7 @@ function jo(t, e, n, r) {
8143
8143
  if (e > n) throw new Error("Invalid reversed quantifier range");
8144
8144
  return { type: "Quantifier", kind: t, min: e, max: n, body: r };
8145
8145
  }
8146
- function ju(t, e) {
8146
+ function Uu(t, e) {
8147
8147
  return { type: "Regex", body: Ye(e?.body), flags: t };
8148
8148
  }
8149
8149
  function Uo(t) {
@@ -8153,15 +8153,15 @@ function ke(t, e) {
8153
8153
  const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
8154
8154
  let r = n.unicodePropertyMap?.get(xt(t));
8155
8155
  if (!r) {
8156
- if (n.normalizeUnknownPropertyNames) r = Hu(t);
8156
+ if (n.normalizeUnknownPropertyNames) r = Wu(t);
8157
8157
  else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(B`Invalid Unicode property "\p{${t}}"`);
8158
8158
  }
8159
8159
  return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
8160
8160
  }
8161
- function Uu({ flags: t, kind: e, name: n, negate: r, number: o }) {
8161
+ function zu({ flags: t, kind: e, name: n, negate: r, number: o }) {
8162
8162
  switch (e) {
8163
8163
  case "absence_repeater":
8164
- return Mu("repeater");
8164
+ return Ou("repeater");
8165
8165
  case "atomic":
8166
8166
  return Q({ atomic: !0 });
8167
8167
  case "capturing":
@@ -8191,10 +8191,10 @@ function dr(t) {
8191
8191
  function gr(t) {
8192
8192
  return t.type === "LookaroundAssertion" && t.kind === "lookbehind";
8193
8193
  }
8194
- function zu(t) {
8194
+ function Hu(t) {
8195
8195
  return /^[\p{Alpha}\p{Pc}][^)]*$/u.test(t);
8196
8196
  }
8197
- function Hu(t) {
8197
+ function Wu(t) {
8198
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());
8199
8199
  }
8200
8200
  function xt(t) {
@@ -8220,22 +8220,22 @@ function Be(t, e, n = null) {
8220
8220
  }, removeAllNextSiblings() {
8221
8221
  return tt(l).splice(Ce(i) + 1);
8222
8222
  }, removeAllPrevSiblings() {
8223
- const C = Ce(i) + u;
8224
- return u -= C, tt(l).splice(0, Math.max(0, C));
8225
- }, replaceWith(C, y = {}) {
8226
- const _ = !!y.traverse;
8227
- l ? l[Math.max(0, Ce(i) + u)] = C : $e(a, "Can't replace root node")[i] = C, _ && o(C, a, i, l), c = !0;
8228
- }, replaceWithMultiple(C, y = {}) {
8229
- const _ = !!y.traverse;
8230
- if (tt(l).splice(Math.max(0, Ce(i) + u), 1, ...C), u += C.length - 1, _) {
8223
+ const y = Ce(i) + u;
8224
+ return u -= y, tt(l).splice(0, Math.max(0, y));
8225
+ }, replaceWith(y, m = {}) {
8226
+ const _ = !!m.traverse;
8227
+ l ? l[Math.max(0, Ce(i) + u)] = y : $e(a, "Can't replace root node")[i] = y, _ && o(y, a, i, l), c = !0;
8228
+ }, replaceWithMultiple(y, m = {}) {
8229
+ const _ = !!m.traverse;
8230
+ if (tt(l).splice(Math.max(0, Ce(i) + u), 1, ...y), u += y.length - 1, _) {
8231
8231
  let S = 0;
8232
- for (let A = 0; A < C.length; A++) S += o(C[A], a, Ce(i) + A + S, l);
8232
+ for (let A = 0; A < y.length; A++) S += o(y[A], a, Ce(i) + A + S, l);
8233
8233
  }
8234
8234
  c = !0;
8235
8235
  }, skip() {
8236
8236
  c = !0;
8237
- } }, { type: d } = s, f = e["*"], p = e[d], m = typeof f == "function" ? f : f?.enter, g = typeof p == "function" ? p : p?.enter;
8238
- if (m?.(h, n), g?.(h, n), !c) switch (d) {
8237
+ } }, { type: f } = s, d = e["*"], p = e[f], g = typeof d == "function" ? d : d?.enter, C = typeof p == "function" ? p : p?.enter;
8238
+ if (g?.(h, n), C?.(h, n), !c) switch (f) {
8239
8239
  case "AbsenceFunction":
8240
8240
  case "CapturingGroup":
8241
8241
  case "Group":
@@ -8267,9 +8267,9 @@ function Be(t, e, n = null) {
8267
8267
  r(s.body, s), o(s.flags, s, "flags");
8268
8268
  break;
8269
8269
  default:
8270
- throw new Error(`Unexpected node type "${d}"`);
8270
+ throw new Error(`Unexpected node type "${f}"`);
8271
8271
  }
8272
- return p?.exit?.(h, n), f?.exit?.(h, n), u;
8272
+ return p?.exit?.(h, n), d?.exit?.(h, n), u;
8273
8273
  }
8274
8274
  return o(t), t;
8275
8275
  }
@@ -8281,12 +8281,12 @@ function Ce(t) {
8281
8281
  if (typeof t != "number") throw new Error("Numeric key expected");
8282
8282
  return t;
8283
8283
  }
8284
- const Wu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
8284
+ const Vu = String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;
8285
8285
  function qu(t, e) {
8286
8286
  for (let n = 0; n < t.length; n++)
8287
8287
  t[n] >= e && t[n]++;
8288
8288
  }
8289
- function Vu(t, e, n, r) {
8289
+ function Xu(t, e, n, r) {
8290
8290
  return t.slice(0, e) + r + t.slice(e + n.length);
8291
8291
  }
8292
8292
  const J = Object.freeze({
@@ -8312,7 +8312,7 @@ function En(t, e, n, r) {
8312
8312
  function Ho(t, e, n, r) {
8313
8313
  En(t, e, n, r);
8314
8314
  }
8315
- function Xu(t, e, n = 0, r) {
8315
+ function Ku(t, e, n = 0, r) {
8316
8316
  if (!new RegExp(e, "su").test(t))
8317
8317
  return null;
8318
8318
  const o = new RegExp(`${e}|(?<$skip>\\\\?.)`, "gsu");
@@ -8327,9 +8327,9 @@ function Xu(t, e, n = 0, r) {
8327
8327
  return null;
8328
8328
  }
8329
8329
  function nt(t, e, n) {
8330
- return !!Xu(t, e, 0, n);
8330
+ return !!Ku(t, e, 0, n);
8331
8331
  }
8332
- function Ku(t, e) {
8332
+ function Yu(t, e) {
8333
8333
  const n = /\\?./gsu;
8334
8334
  n.lastIndex = e;
8335
8335
  let r = t.length, o = 0, s = 1, a;
@@ -8348,8 +8348,8 @@ function Ku(t, e) {
8348
8348
  }
8349
8349
  return t.slice(e, r);
8350
8350
  }
8351
- const br = new RegExp(String.raw`(?<noncapturingStart>${Wu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
8352
- function Yu(t, e) {
8351
+ const br = new RegExp(String.raw`(?<noncapturingStart>${Vu})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`, "gsu");
8352
+ function Ju(t, e) {
8353
8353
  const n = e?.hiddenCaptures ?? [];
8354
8354
  let r = e?.captureTransfers ?? /* @__PURE__ */ new Map();
8355
8355
  if (!/\(\?>/.test(t))
@@ -8362,24 +8362,24 @@ function Yu(t, e) {
8362
8362
  let l = 0, u = 0, c = NaN, h;
8363
8363
  do {
8364
8364
  h = !1;
8365
- let d = 0, f = 0, p = !1, m;
8366
- for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length; m = br.exec(t); ) {
8367
- const { 0: g, index: C, groups: { capturingStart: y, noncapturingStart: _ } } = m;
8368
- if (g === "[")
8369
- d++;
8370
- else if (d)
8371
- g === "]" && d--;
8372
- else if (g === o && !p)
8373
- c = C, p = !0;
8374
- else if (p && _)
8365
+ let f = 0, d = 0, p = !1, g;
8366
+ for (br.lastIndex = Number.isNaN(c) ? 0 : c + s.length; g = br.exec(t); ) {
8367
+ const { 0: C, index: y, groups: { capturingStart: m, noncapturingStart: _ } } = g;
8368
+ if (C === "[")
8375
8369
  f++;
8376
- else if (y)
8377
- p ? f++ : (l++, a.push(l + u));
8378
- else if (g === ")" && p) {
8379
- if (!f) {
8370
+ else if (f)
8371
+ C === "]" && f--;
8372
+ else if (C === o && !p)
8373
+ c = y, p = !0;
8374
+ else if (p && _)
8375
+ d++;
8376
+ else if (m)
8377
+ p ? d++ : (l++, a.push(l + u));
8378
+ else if (C === ")" && p) {
8379
+ if (!d) {
8380
8380
  u++;
8381
8381
  const S = l + u;
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
+ if (t = `${t.slice(0, c)}${s}${t.slice(c + o.length, y)}))<$$${S}>)${t.slice(y + 1)}`, h = !0, i.push(S), qu(n, S), r.size) {
8383
8383
  const A = /* @__PURE__ */ new Map();
8384
8384
  r.forEach((D, P) => {
8385
8385
  A.set(
@@ -8390,19 +8390,19 @@ function Yu(t, e) {
8390
8390
  }
8391
8391
  break;
8392
8392
  }
8393
- f--;
8393
+ d--;
8394
8394
  }
8395
8395
  }
8396
8396
  } while (h);
8397
8397
  return n.push(...i), t = En(
8398
8398
  t,
8399
8399
  String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,
8400
- ({ 0: d, groups: { backrefNum: f, wrappedBackrefNum: p } }) => {
8401
- if (f) {
8402
- const m = +f;
8403
- if (m > a.length - 1)
8404
- throw new Error(`Backref "${d}" greater than number of captures`);
8405
- return `\\${a[m]}`;
8400
+ ({ 0: f, groups: { backrefNum: d, wrappedBackrefNum: p } }) => {
8401
+ if (d) {
8402
+ const g = +d;
8403
+ if (g > a.length - 1)
8404
+ throw new Error(`Backref "${f}" greater than number of captures`);
8405
+ return `\\${a[g]}`;
8406
8406
  }
8407
8407
  return `\\${p}`;
8408
8408
  },
@@ -8429,7 +8429,7 @@ const Wo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Dt = new RegExp(String.raw`
8429
8429
  | (?<qBase>${Wo})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
8430
8430
  | \\?.
8431
8431
  `.replace(/\s+/g, ""), "gsu");
8432
- function Ju(t) {
8432
+ function Zu(t) {
8433
8433
  if (!new RegExp(`${Wo}\\+`).test(t))
8434
8434
  return {
8435
8435
  pattern: t
@@ -8446,20 +8446,20 @@ function Ju(t) {
8446
8446
  if (c === "+" && o && !o.startsWith("(")) {
8447
8447
  if (h)
8448
8448
  throw new Error(`Invalid quantifier "${i}"`);
8449
- let d = -1;
8449
+ let f = -1;
8450
8450
  if (/^\{\d+\}$/.test(u))
8451
- t = Vu(t, l + u.length, c, "");
8451
+ t = Xu(t, l + u.length, c, "");
8452
8452
  else {
8453
8453
  if (o === ")" || o === "]") {
8454
- const f = o === ")" ? n : r;
8455
- if (f === null)
8454
+ const d = o === ")" ? n : r;
8455
+ if (d === null)
8456
8456
  throw new Error(`Invalid unmatched "${o}"`);
8457
- t = `${t.slice(0, f)}(?>${t.slice(f, l)}${u})${t.slice(l + i.length)}`;
8457
+ t = `${t.slice(0, d)}(?>${t.slice(d, l)}${u})${t.slice(l + i.length)}`;
8458
8458
  } else
8459
8459
  t = `${t.slice(0, l - o.length)}(?>${o}${u})${t.slice(l + i.length)}`;
8460
- d += 4;
8460
+ f += 4;
8461
8461
  }
8462
- Dt.lastIndex += d;
8462
+ Dt.lastIndex += f;
8463
8463
  } else i[0] === "(" ? e.push(l) : i === ")" && (n = e.length ? e.pop() : null);
8464
8464
  o = i;
8465
8465
  }
@@ -8467,8 +8467,8 @@ function Ju(t) {
8467
8467
  pattern: t
8468
8468
  };
8469
8469
  }
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) {
8470
+ const Y = String.raw, Qu = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, ln = Y`\(\?R=(?<rDepth>[^\)]+)\)|${Qu}`, Et = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, Vo = Y`${Et}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${Et}|${ln}|\(\?|\\?.`, "gsu"), Gt = "Cannot use multiple overlapping recursions";
8471
+ function ec(t, e) {
8472
8472
  const { hiddenCaptures: n, mode: r } = {
8473
8473
  hiddenCaptures: [],
8474
8474
  mode: "plugin",
@@ -8484,15 +8484,15 @@ function Qu(t, e) {
8484
8484
  if (r === "plugin" && nt(t, Y`\(\?\(DEFINE\)`, J.DEFAULT))
8485
8485
  throw new Error("DEFINE groups cannot be used with recursion");
8486
8486
  const s = [], a = nt(t, Y`\\[1-9]`, J.DEFAULT), i = /* @__PURE__ */ new Map(), l = [];
8487
- let u = !1, c = 0, h = 0, d;
8488
- for (he.lastIndex = 0; d = he.exec(t); ) {
8489
- const { 0: f, groups: { captureName: p, rDepth: m, gRNameOrNum: g, gRDepth: C } } = d;
8490
- if (f === "[")
8487
+ let u = !1, c = 0, h = 0, f;
8488
+ for (he.lastIndex = 0; f = he.exec(t); ) {
8489
+ const { 0: d, groups: { captureName: p, rDepth: g, gRNameOrNum: C, gRDepth: y } } = f;
8490
+ if (d === "[")
8491
8491
  c++;
8492
8492
  else if (c)
8493
- f === "]" && c--;
8494
- else if (m) {
8495
- if (wr(m), u)
8493
+ d === "]" && c--;
8494
+ else if (g) {
8495
+ if (wr(g), u)
8496
8496
  throw new Error(Gt);
8497
8497
  if (a)
8498
8498
  throw new Error(
@@ -8500,12 +8500,12 @@ function Qu(t, e) {
8500
8500
  // gone through conversion from named to numbered, so avoid a misleading error
8501
8501
  `${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`
8502
8502
  );
8503
- const y = t.slice(0, d.index), _ = t.slice(he.lastIndex);
8503
+ const m = t.slice(0, f.index), _ = t.slice(he.lastIndex);
8504
8504
  if (nt(_, ln, J.DEFAULT))
8505
8505
  throw new Error(Gt);
8506
- const S = +m - 1;
8506
+ const S = +g - 1;
8507
8507
  t = Cr(
8508
- y,
8508
+ m,
8509
8509
  _,
8510
8510
  S,
8511
8511
  !1,
@@ -8514,32 +8514,32 @@ function Qu(t, e) {
8514
8514
  h
8515
8515
  ), o = Sr(
8516
8516
  o,
8517
- y,
8517
+ m,
8518
8518
  S,
8519
8519
  s.length,
8520
8520
  0,
8521
8521
  h
8522
8522
  );
8523
8523
  break;
8524
- } else if (g) {
8525
- wr(C);
8526
- let y = !1;
8524
+ } else if (C) {
8525
+ wr(y);
8526
+ let m = !1;
8527
8527
  for (const te of l)
8528
- if (te.name === g || te.num === +g) {
8529
- if (y = !0, te.hasRecursedWithin)
8528
+ if (te.name === C || te.num === +C) {
8529
+ if (m = !0, te.hasRecursedWithin)
8530
8530
  throw new Error(Gt);
8531
8531
  break;
8532
8532
  }
8533
- if (!y)
8534
- throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? g : Y`\g<${g}&R=${C}>`}"`);
8535
- const _ = i.get(g), S = Ku(t, _);
8533
+ if (!m)
8534
+ throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? C : Y`\g<${C}&R=${y}>`}"`);
8535
+ const _ = i.get(C), S = Yu(t, _);
8536
8536
  if (a && nt(S, Y`${Et}|\((?!\?)`, J.DEFAULT))
8537
8537
  throw new Error(
8538
8538
  // When used in `external` mode by transpilers other than Regex+, backrefs might have
8539
8539
  // gone through conversion from named to numbered, so avoid a misleading error
8540
8540
  `${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`
8541
8541
  );
8542
- const A = t.slice(_, d.index), D = S.slice(A.length + f.length), P = s.length, j = +C - 1, Z = Cr(
8542
+ const A = t.slice(_, f.index), D = S.slice(A.length + d.length), P = s.length, j = +y - 1, Z = Cr(
8543
8543
  A,
8544
8544
  D,
8545
8545
  j,
@@ -8557,16 +8557,16 @@ function Qu(t, e) {
8557
8557
  h
8558
8558
  );
8559
8559
  const ee = t.slice(0, _), ce = t.slice(_ + S.length);
8560
- t = `${ee}${Z}${ce}`, he.lastIndex += Z.length - f.length - A.length - D.length, l.forEach((te) => te.hasRecursedWithin = !0), u = !0;
8560
+ t = `${ee}${Z}${ce}`, he.lastIndex += Z.length - d.length - A.length - D.length, l.forEach((te) => te.hasRecursedWithin = !0), u = !0;
8561
8561
  } else if (p)
8562
8562
  h++, i.set(String(h), he.lastIndex), i.set(p, he.lastIndex), l.push({
8563
8563
  num: h,
8564
8564
  name: p
8565
8565
  });
8566
- else if (f[0] === "(") {
8567
- const y = f === "(";
8568
- y && (h++, i.set(String(h), he.lastIndex)), l.push(y ? { num: h } : {});
8569
- } else f === ")" && l.pop();
8566
+ else if (d[0] === "(") {
8567
+ const m = d === "(";
8568
+ m && (h++, i.set(String(h), he.lastIndex)), l.push(m ? { num: h } : {});
8569
+ } else d === ")" && l.pop();
8570
8570
  }
8571
8571
  return n.push(...s), {
8572
8572
  pattern: t,
@@ -8602,45 +8602,45 @@ function _r(t, e, n, r, o, s, a) {
8602
8602
  const h = l(c);
8603
8603
  u += En(
8604
8604
  t,
8605
- Y`${qo}|\\k<(?<backref>[^>]+)>`,
8606
- ({ 0: d, groups: { captureName: f, unnamed: p, backref: m } }) => {
8607
- if (m && r && !r.has(m))
8608
- return d;
8609
- const g = `_$${h}`;
8610
- if (p || f) {
8611
- const C = a + s.length + 1;
8612
- return s.push(C), ec(o, C), p ? d : `(?<${f}${g}>`;
8605
+ Y`${Vo}|\\k<(?<backref>[^>]+)>`,
8606
+ ({ 0: f, groups: { captureName: d, unnamed: p, backref: g } }) => {
8607
+ if (g && r && !r.has(g))
8608
+ return f;
8609
+ const C = `_$${h}`;
8610
+ if (p || d) {
8611
+ const y = a + s.length + 1;
8612
+ return s.push(y), tc(o, y), p ? f : `(?<${d}${C}>`;
8613
8613
  }
8614
- return Y`\k<${m}${g}>`;
8614
+ return Y`\k<${g}${C}>`;
8615
8615
  },
8616
8616
  J.DEFAULT
8617
8617
  );
8618
8618
  }
8619
8619
  return u;
8620
8620
  }
8621
- function ec(t, e) {
8621
+ function tc(t, e) {
8622
8622
  for (let n = 0; n < t.length; n++)
8623
8623
  t[n] >= e && t[n]++;
8624
8624
  }
8625
8625
  function Sr(t, e, n, r, o, s) {
8626
8626
  if (t.size && r) {
8627
8627
  let a = 0;
8628
- Ho(e, qo, () => a++, J.DEFAULT);
8628
+ Ho(e, Vo, () => a++, J.DEFAULT);
8629
8629
  const i = s - a + o, l = /* @__PURE__ */ new Map();
8630
8630
  return t.forEach((u, c) => {
8631
- const h = (r - a * n) / n, d = a * n, f = c > i + a ? c + r : c, p = [];
8632
- for (const m of u)
8633
- if (m <= i)
8634
- p.push(m);
8635
- else if (m > i + a + h)
8636
- p.push(m + r);
8637
- else if (m <= i + a)
8638
- for (let g = 0; g <= n; g++)
8639
- p.push(m + a * g);
8631
+ const h = (r - a * n) / n, f = a * n, d = c > i + a ? c + r : c, p = [];
8632
+ for (const g of u)
8633
+ if (g <= i)
8634
+ p.push(g);
8635
+ else if (g > i + a + h)
8636
+ p.push(g + r);
8637
+ else if (g <= i + a)
8638
+ for (let C = 0; C <= n; C++)
8639
+ p.push(g + a * C);
8640
8640
  else
8641
- for (let g = 0; g <= n; g++)
8642
- p.push(m + d + h * g);
8643
- l.set(f, p);
8641
+ for (let C = 0; C <= n; C++)
8642
+ p.push(g + f + h * C);
8643
+ l.set(d, p);
8644
8644
  }), l;
8645
8645
  }
8646
8646
  return t;
@@ -8678,13 +8678,13 @@ function bt(t, { enable: e, disable: n }) {
8678
8678
  ignoreCase: !n?.ignoreCase && !!(e?.ignoreCase || t.ignoreCase)
8679
8679
  };
8680
8680
  }
8681
- function qe(t, e, n) {
8681
+ function Ve(t, e, n) {
8682
8682
  return t.has(e) || t.set(e, n), t.get(e);
8683
8683
  }
8684
8684
  function un(t, e) {
8685
8685
  return kr[t] >= kr[e];
8686
8686
  }
8687
- function tc(t, e) {
8687
+ function nc(t, e) {
8688
8688
  if (t == null)
8689
8689
  throw new Error(e ?? "Value expected");
8690
8690
  return t;
@@ -8693,7 +8693,7 @@ var kr = {
8693
8693
  ES2025: 2025,
8694
8694
  ES2024: 2024,
8695
8695
  ES2018: 2018
8696
- }, nc = (
8696
+ }, rc = (
8697
8697
  /** @type {const} */
8698
8698
  {
8699
8699
  auto: "auto",
@@ -8702,10 +8702,10 @@ var kr = {
8702
8702
  ES2018: "ES2018"
8703
8703
  }
8704
8704
  );
8705
- function Vo(t = {}) {
8705
+ function qo(t = {}) {
8706
8706
  if ({}.toString.call(t) !== "[object Object]")
8707
8707
  throw new Error("Unexpected options");
8708
- if (t.target !== void 0 && !nc[t.target])
8708
+ if (t.target !== void 0 && !rc[t.target])
8709
8709
  throw new Error(`Unexpected target "${t.target}"`);
8710
8710
  const e = {
8711
8711
  // Sets the level of emulation rigor/strictness.
@@ -8749,16 +8749,16 @@ function Vo(t = {}) {
8749
8749
  };
8750
8750
  return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
8751
8751
  }
8752
- var rc = "[ -\r ]", oc = /* @__PURE__ */ new Set([
8752
+ var oc = "[ -\r ]", sc = /* @__PURE__ */ new Set([
8753
8753
  M(304),
8754
8754
  // İ
8755
8755
  M(305)
8756
8756
  // ı
8757
8757
  ]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
8758
8758
  function Xo(t) {
8759
- if (oc.has(t))
8759
+ if (sc.has(t))
8760
8760
  return [t];
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
+ const e = /* @__PURE__ */ new Set(), n = t.toLowerCase(), r = n.toUpperCase(), o = lc.get(n), s = ac.get(n), a = ic.get(n);
8762
8762
  return [...r].length === 1 && e.add(r), a && e.add(a), o && e.add(o), e.add(n), s && e.add(s), [...e];
8763
8763
  }
8764
8764
  var An = /* @__PURE__ */ new Map(
@@ -8853,12 +8853,12 @@ Variation_Selector VS
8853
8853
  White_Space space
8854
8854
  XID_Continue XIDC
8855
8855
  XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
8856
- ), sc = /* @__PURE__ */ new Map([
8856
+ ), ac = /* @__PURE__ */ new Map([
8857
8857
  ["s", M(383)],
8858
8858
  // s, ſ
8859
8859
  [M(383), "s"]
8860
8860
  // ſ, s
8861
- ]), ac = /* @__PURE__ */ new Map([
8861
+ ]), ic = /* @__PURE__ */ new Map([
8862
8862
  [M(223), M(7838)],
8863
8863
  // ß, ẞ
8864
8864
  [M(107), M(8490)],
@@ -8867,7 +8867,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
8867
8867
  // å, Å (Angstrom)
8868
8868
  [M(969), M(8486)]
8869
8869
  // ω, Ω (Ohm)
8870
- ]), ic = new Map([
8870
+ ]), lc = new Map([
8871
8871
  ie(453),
8872
8872
  ie(456),
8873
8873
  ie(459),
@@ -8878,7 +8878,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
8878
8878
  ie(8124),
8879
8879
  ie(8140),
8880
8880
  ie(8188)
8881
- ]), lc = /* @__PURE__ */ new Map([
8881
+ ]), uc = /* @__PURE__ */ new Map([
8882
8882
  ["alnum", v`[\p{Alpha}\p{Nd}]`],
8883
8883
  ["alpha", v`\p{Alpha}`],
8884
8884
  ["ascii", v`\p{ASCII}`],
@@ -8895,7 +8895,7 @@ XID_Start XIDS`.split(/\s/).map((t) => [xt(t), t])
8895
8895
  ["word", v`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],
8896
8896
  ["xdigit", v`\p{AHex}`]
8897
8897
  ]);
8898
- function uc(t, e) {
8898
+ function cc(t, e) {
8899
8899
  const n = [];
8900
8900
  for (let r = t; r <= e; r++)
8901
8901
  n.push(r);
@@ -8906,7 +8906,7 @@ function ie(t) {
8906
8906
  return [e.toLowerCase(), e];
8907
8907
  }
8908
8908
  function Ft(t, e) {
8909
- return uc(t, e).map((n) => ie(n));
8909
+ return cc(t, e).map((n) => ie(n));
8910
8910
  }
8911
8911
  var Ko = /* @__PURE__ */ new Set([
8912
8912
  "Lower",
@@ -8924,7 +8924,7 @@ var Ko = /* @__PURE__ */ new Set([
8924
8924
  // generally extreme edge cases and using such properties case insensitively generally produces
8925
8925
  // undesired behavior anyway
8926
8926
  ]);
8927
- function cc(t, e) {
8927
+ function hc(t, e) {
8928
8928
  const n = {
8929
8929
  // A couple edge cases exist where options `accuracy` and `bestEffortTarget` are used:
8930
8930
  // - `CharacterSet` kind `text_segment` (`\X`): An exact representation would require heavy
@@ -8955,7 +8955,7 @@ function cc(t, e) {
8955
8955
  spaceIsAscii: t.flags.spaceIsAscii,
8956
8956
  wordIsAscii: t.flags.wordIsAscii
8957
8957
  };
8958
- Be(t, hc, r);
8958
+ Be(t, pc, r);
8959
8959
  const o = {
8960
8960
  dotAll: t.flags.dotAll,
8961
8961
  ignoreCase: t.flags.ignoreCase
@@ -8970,16 +8970,16 @@ function cc(t, e) {
8970
8970
  reffedNodesByReferencer: /* @__PURE__ */ new Map(),
8971
8971
  subroutineRefMap: r.subroutineRefMap
8972
8972
  };
8973
- Be(t, pc, s);
8973
+ Be(t, fc, s);
8974
8974
  const a = {
8975
8975
  groupsByName: s.groupsByName,
8976
8976
  highestOrphanBackref: 0,
8977
8977
  numCapturesToLeft: 0,
8978
8978
  reffedNodesByReferencer: s.reffedNodesByReferencer
8979
8979
  };
8980
- return Be(t, fc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
8980
+ return Be(t, dc, a), t._originMap = s.groupOriginByCopy, t._strategy = r.strategy, t;
8981
8981
  }
8982
- var hc = {
8982
+ var pc = {
8983
8983
  AbsenceFunction({ node: t, parent: e, replaceWith: n }) {
8984
8984
  const { body: r, kind: o } = t;
8985
8985
  if (o === "repeater") {
@@ -9001,7 +9001,7 @@ var hc = {
9001
9001
  const o = t.body.filter((s) => s.kind === "flags");
9002
9002
  for (let s = n + 1; s < e.body.length; s++) {
9003
9003
  const a = e.body[s];
9004
- qe(r, a, []).push(...o);
9004
+ Ve(r, a, []).push(...o);
9005
9005
  }
9006
9006
  },
9007
9007
  exit({ node: t }, { flagDirectivesByAlt: e }) {
@@ -9015,7 +9015,7 @@ var hc = {
9015
9015
  }
9016
9016
  },
9017
9017
  Assertion({ node: t, parent: e, key: n, container: r, root: o, remove: s, replaceWith: a }, i) {
9018
- const { kind: l, negate: u } = t, { asciiWordBoundaries: c, avoidSubclass: h, supportedGNodes: d, wordIsAscii: f } = i;
9018
+ const { kind: l, negate: u } = t, { asciiWordBoundaries: c, avoidSubclass: h, supportedGNodes: f, wordIsAscii: d } = i;
9019
9019
  if (l === "text_segment_boundary")
9020
9020
  throw new Error(`Unsupported text segment boundary "\\${u ? "Y" : "y"}"`);
9021
9021
  if (l === "line_end")
@@ -9027,11 +9027,11 @@ var hc = {
9027
9027
  else if (l === "line_start")
9028
9028
  a(L(oe(v`(?<=\A|\n(?!\z))`, { skipLookbehindValidation: !0 }), e));
9029
9029
  else if (l === "search_start")
9030
- if (d.has(t))
9030
+ if (f.has(t))
9031
9031
  o.flags.sticky = !0, s();
9032
9032
  else {
9033
9033
  const p = r[n - 1];
9034
- if (p && wc(p))
9034
+ if (p && Cc(p))
9035
9035
  a(L(fe({ negate: !0 }), e));
9036
9036
  else {
9037
9037
  if (h)
@@ -9042,9 +9042,9 @@ var hc = {
9042
9042
  else if (!(l === "string_end" || l === "string_start")) if (l === "string_end_newline")
9043
9043
  a(L(oe(v`(?=\n?\z)`), e));
9044
9044
  else if (l === "word_boundary") {
9045
- if (!f && !c) {
9046
- const p = `(?:(?<=${re})(?!${re})|(?<!${re})(?=${re}))`, m = `(?:(?<=${re})(?=${re})|(?<!${re})(?!${re}))`;
9047
- a(L(oe(u ? m : p), e));
9045
+ if (!d && !c) {
9046
+ const p = `(?:(?<=${re})(?!${re})|(?<!${re})(?=${re}))`, g = `(?:(?<=${re})(?=${re})|(?<!${re})(?!${re}))`;
9047
+ a(L(oe(u ? g : p), e));
9048
9048
  }
9049
9049
  } else
9050
9050
  throw new Error(`Unexpected assertion kind "${l}"`);
@@ -9070,7 +9070,7 @@ var hc = {
9070
9070
  return;
9071
9071
  }
9072
9072
  if (a && (l === "space" || c === "space")) {
9073
- n(L(Ut(oe(rc), u), e));
9073
+ n(L(Ut(oe(oc), u), e));
9074
9074
  return;
9075
9075
  }
9076
9076
  if (i && (l === "word" || c === "word")) {
@@ -9084,10 +9084,10 @@ var hc = {
9084
9084
  else if (l !== "dot") if (l === "text_segment") {
9085
9085
  if (r === "strict")
9086
9086
  throw new Error(v`Use of "\X" requires non-strict accuracy`);
9087
- const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?", d = v`\p{RI}{2}|${h}(?:\u200D${h})*`;
9087
+ const h = "\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?", f = v`\p{RI}{2}|${h}(?:\u200D${h})*`;
9088
9088
  n(L(oe(
9089
9089
  // Close approximation of an extended grapheme cluster; see: <unicode.org/reports/tr29/>
9090
- v`(?>\r\n|${o ? v`\p{RGI_Emoji}` : d}|\P{M}\p{M}*)`,
9090
+ v`(?>\r\n|${o ? v`\p{RGI_Emoji}` : f}|\P{M}\p{M}*)`,
9091
9091
  // Allow JS property `RGI_Emoji` through
9092
9092
  { skipPropertyNameValidation: !0 }
9093
9093
  ), e));
@@ -9108,7 +9108,7 @@ var hc = {
9108
9108
  }[c];
9109
9109
  u && (h = `\0-${M(h.codePointAt(0) - 1)}${M(h.codePointAt(2) + 1)}-􏿿`), n(L(oe(`[${h}]`), e));
9110
9110
  } else
9111
- n(L(Ut(oe(lc.get(c)), u), e));
9111
+ n(L(Ut(oe(uc.get(c)), u), e));
9112
9112
  else if (l === "property")
9113
9113
  An.has(xt(c)) || (t.key = "sc");
9114
9114
  else if (l === "space")
@@ -9132,8 +9132,8 @@ var hc = {
9132
9132
  Go(u, { type: "Group" }) && u.body[0].body.length === 1 ? u.body[0] : n;
9133
9133
  if (e.parent !== h || h.body.length > 1)
9134
9134
  throw new Error(v`Uses "\K" in a way that's unsupported`);
9135
- const d = fe({ behind: !0 });
9136
- d.body[0].body = s(), o(L(d, e));
9135
+ const f = fe({ behind: !0 });
9136
+ f.body[0].body = s(), o(L(f, e));
9137
9137
  } else
9138
9138
  throw new Error(`Unexpected directive kind "${i}"`);
9139
9139
  },
@@ -9230,7 +9230,7 @@ var hc = {
9230
9230
  let { ref: n } = t;
9231
9231
  typeof n == "string" && !jt(n) && (n = Bt(n, e), t.ref = n);
9232
9232
  }
9233
- }, pc = {
9233
+ }, fc = {
9234
9234
  Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
9235
9235
  const { orphan: r, ref: o } = t;
9236
9236
  r || n.set(t, [...e.get(o).map(({ node: s }) => s)]);
@@ -9254,33 +9254,33 @@ var hc = {
9254
9254
  l.set(h, i.get(t.number)), n(h);
9255
9255
  return;
9256
9256
  }
9257
- i.set(t.number, t), a.set(t.number, []), t.name && qe(a, t.name, []);
9257
+ i.set(t.number, t), a.set(t.number, []), t.name && Ve(a, t.name, []);
9258
9258
  const c = a.get(t.name ?? t.number);
9259
9259
  for (let h = 0; h < c.length; h++) {
9260
- const d = c[h];
9260
+ const f = c[h];
9261
9261
  if (
9262
9262
  // This group is from subroutine expansion, and there's a multiplex value from either the
9263
9263
  // origin node or a prior subroutine expansion group with the same origin
9264
- u === d.node || u && u === d.origin || // This group is not from subroutine expansion, and it comes after a subroutine expansion
9264
+ u === f.node || u && u === f.origin || // This group is not from subroutine expansion, and it comes after a subroutine expansion
9265
9265
  // group that refers to this group
9266
- t === d.origin
9266
+ t === f.origin
9267
9267
  ) {
9268
9268
  c.splice(h, 1);
9269
9269
  break;
9270
9270
  }
9271
9271
  }
9272
9272
  if (a.get(t.number).push({ node: t, origin: u }), t.name && a.get(t.name).push({ node: t, origin: u }), t.name) {
9273
- const h = qe(s, t.name, /* @__PURE__ */ new Map());
9274
- let d = !1;
9273
+ const h = Ve(s, t.name, /* @__PURE__ */ new Map());
9274
+ let f = !1;
9275
9275
  if (u)
9276
- d = !0;
9276
+ f = !0;
9277
9277
  else
9278
- for (const f of h.values())
9279
- if (!f.hasDuplicateNameToRemove) {
9280
- d = !0;
9278
+ for (const d of h.values())
9279
+ if (!d.hasDuplicateNameToRemove) {
9280
+ f = !0;
9281
9281
  break;
9282
9282
  }
9283
- s.get(t.name).set(t, { node: t, hasDuplicateNameToRemove: d });
9283
+ s.get(t.name).set(t, { node: t, hasDuplicateNameToRemove: f });
9284
9284
  }
9285
9285
  },
9286
9286
  exit({ node: t }, { openRefs: e }) {
@@ -9310,23 +9310,23 @@ var hc = {
9310
9310
  );
9311
9311
  let u = l;
9312
9312
  if (!i) {
9313
- const c = Zo(mc(
9313
+ const c = Zo(yc(
9314
9314
  a,
9315
- (d) => d.type === "Group" && !!d.flags
9315
+ (f) => f.type === "Group" && !!f.flags
9316
9316
  )), h = c ? bt(r.globalFlags, c) : r.globalFlags;
9317
- dc(h, r.currentFlags) || (u = Q({
9318
- flags: yc(h)
9317
+ gc(h, r.currentFlags) || (u = Q({
9318
+ flags: bc(h)
9319
9319
  }), u.body[0].body.push(l));
9320
9320
  }
9321
9321
  n(L(u, e), { traverse: !i });
9322
9322
  }
9323
- }, fc = {
9323
+ }, dc = {
9324
9324
  Backreference({ node: t, parent: e, replaceWith: n }, r) {
9325
9325
  if (t.orphan) {
9326
9326
  r.highestOrphanBackref = Math.max(r.highestOrphanBackref, t.ref);
9327
9327
  return;
9328
9328
  }
9329
- const s = r.reffedNodesByReferencer.get(t).filter((a) => gc(a, t));
9329
+ const s = r.reffedNodesByReferencer.get(t).filter((a) => mc(a, t));
9330
9330
  if (!s.length)
9331
9331
  n(L(fe({ negate: !0 }), e));
9332
9332
  else if (s.length > 1) {
@@ -9363,10 +9363,10 @@ function Yo(t) {
9363
9363
  }
9364
9364
  });
9365
9365
  }
9366
- function dc(t, e) {
9366
+ function gc(t, e) {
9367
9367
  return t.dotAll === e.dotAll && t.ignoreCase === e.ignoreCase;
9368
9368
  }
9369
- function gc(t, e) {
9369
+ function mc(t, e) {
9370
9370
  let n = e;
9371
9371
  do {
9372
9372
  if (n.type === "Regex")
@@ -9395,7 +9395,7 @@ function vr(t) {
9395
9395
  const e = Uo(t);
9396
9396
  return e.isRecursive = !0, e;
9397
9397
  }
9398
- function mc(t, e) {
9398
+ function yc(t, e) {
9399
9399
  const n = [];
9400
9400
  for (; t = t.parent; )
9401
9401
  (!e || e(t)) && n.push(t);
@@ -9415,7 +9415,7 @@ function Zo(t) {
9415
9415
  });
9416
9416
  }), Object.keys(n.enable).length || delete n.enable, Object.keys(n.disable).length || delete n.disable, n.enable || n.disable ? n : null;
9417
9417
  }
9418
- function yc({ dotAll: t, ignoreCase: e }) {
9418
+ function bc({ dotAll: t, ignoreCase: e }) {
9419
9419
  const n = {};
9420
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;
9421
9421
  }
@@ -9426,7 +9426,7 @@ function Qo(t) {
9426
9426
  return Array.isArray(e) ? e : e ? [e] : null;
9427
9427
  }
9428
9428
  function es(t) {
9429
- const e = t.find((n) => n.kind === "search_start" || Cc(n, { negate: !1 }) || !bc(n));
9429
+ const e = t.find((n) => n.kind === "search_start" || _c(n, { negate: !1 }) || !wc(n));
9430
9430
  if (!e)
9431
9431
  return null;
9432
9432
  if (e.kind === "search_start")
@@ -9452,10 +9452,10 @@ function ts(t, e) {
9452
9452
  return !0;
9453
9453
  return !1;
9454
9454
  }
9455
- function bc({ type: t }) {
9455
+ function wc({ type: t }) {
9456
9456
  return t === "Assertion" || t === "Directive" || t === "LookaroundAssertion";
9457
9457
  }
9458
- function wc(t) {
9458
+ function Cc(t) {
9459
9459
  const e = [
9460
9460
  "Character",
9461
9461
  "CharacterClass",
@@ -9463,7 +9463,7 @@ function wc(t) {
9463
9463
  ];
9464
9464
  return e.includes(t.type) || t.type === "Quantifier" && t.min && e.includes(t.body.type);
9465
9465
  }
9466
- function Cc(t, e) {
9466
+ function _c(t, e) {
9467
9467
  const n = {
9468
9468
  negate: null,
9469
9469
  ...e
@@ -9494,23 +9494,23 @@ function le(t, e) {
9494
9494
  function L(t, e) {
9495
9495
  return Yo(t), t.parent = e, t;
9496
9496
  }
9497
- function _c(t, e) {
9498
- const n = Vo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
9497
+ function Sc(t, e) {
9498
+ const n = qo(e), r = un(n.target, "ES2024"), o = un(n.target, "ES2025"), s = n.rules.recursionLimit;
9499
9499
  if (!Number.isInteger(s) || s < 2 || s > 20)
9500
9500
  throw new Error("Invalid recursionLimit; use 2-20");
9501
9501
  let a = null, i = null;
9502
9502
  if (!o) {
9503
- const f = [t.flags.ignoreCase];
9504
- Be(t, Sc, {
9505
- getCurrentModI: () => f.at(-1),
9503
+ const d = [t.flags.ignoreCase];
9504
+ Be(t, kc, {
9505
+ getCurrentModI: () => d.at(-1),
9506
9506
  popModI() {
9507
- f.pop();
9507
+ d.pop();
9508
9508
  },
9509
9509
  pushModI(p) {
9510
- f.push(p);
9510
+ d.push(p);
9511
9511
  },
9512
9512
  setHasCasedChar() {
9513
- f.at(-1) ? a = !0 : i = !0;
9513
+ d.at(-1) ? a = !0 : i = !0;
9514
9514
  }
9515
9515
  });
9516
9516
  }
@@ -9540,20 +9540,20 @@ function _c(t, e) {
9540
9540
  useFlagV: r,
9541
9541
  verbose: n.verbose
9542
9542
  };
9543
- function h(f) {
9544
- return c.lastNode = u, u = f, tc(kc[f.type], `Unexpected node type "${f.type}"`)(f, c, h);
9543
+ function h(d) {
9544
+ return c.lastNode = u, u = d, nc(vc[d.type], `Unexpected node type "${d.type}"`)(d, c, h);
9545
9545
  }
9546
- const d = {
9546
+ const f = {
9547
9547
  pattern: t.body.map(h).join("|"),
9548
9548
  // Could reset `lastNode` at this point via `lastNode = ast`, but it isn't needed by flags
9549
9549
  flags: h(t.flags),
9550
9550
  options: { ...t.options }
9551
9551
  };
9552
- return r || (delete d.options.force.v, d.options.disable.v = !0, d.options.unicodeSetsPlugin = null), d._captureTransfers = /* @__PURE__ */ new Map(), d._hiddenCaptures = [], c.captureMap.forEach((f, p) => {
9553
- f.hidden && d._hiddenCaptures.push(p), f.transferTo && qe(d._captureTransfers, f.transferTo, []).push(p);
9554
- }), d;
9552
+ return r || (delete f.options.force.v, f.options.disable.v = !0, f.options.unicodeSetsPlugin = null), f._captureTransfers = /* @__PURE__ */ new Map(), f._hiddenCaptures = [], c.captureMap.forEach((d, p) => {
9553
+ d.hidden && f._hiddenCaptures.push(p), d.transferTo && Ve(f._captureTransfers, d.transferTo, []).push(p);
9554
+ }), f;
9555
9555
  }
9556
- var Sc = {
9556
+ var kc = {
9557
9557
  "*": {
9558
9558
  enter({ node: t }, e) {
9559
9559
  if (Er(t)) {
@@ -9579,7 +9579,7 @@ var Sc = {
9579
9579
  CharacterSet({ node: t }, e) {
9580
9580
  t.kind === "property" && Ko.has(t.value) && e.setHasCasedChar();
9581
9581
  }
9582
- }, kc = {
9582
+ }, vc = {
9583
9583
  /**
9584
9584
  @param {AlternativeNode} node
9585
9585
  */
@@ -9651,10 +9651,10 @@ var Sc = {
9651
9651
  (h) => h.type === "CharacterClass" && h.kind === "union" && h.negate
9652
9652
  );
9653
9653
  if (c.length) {
9654
- const h = Q(), d = h.body[0];
9655
- return h.parent = s, d.parent = h, a = a.filter((f) => !c.includes(f)), t.body = a, a.length ? (t.parent = d, d.body.push(t)) : h.body.pop(), c.forEach((f) => {
9656
- const p = me({ body: [f] });
9657
- f.parent = p, p.parent = h, h.body.push(p);
9654
+ const h = Q(), f = h.body[0];
9655
+ return h.parent = s, f.parent = h, a = a.filter((d) => !c.includes(d)), t.body = a, a.length ? (t.parent = f, f.body.push(t)) : h.body.pop(), c.forEach((d) => {
9656
+ const p = me({ body: [d] });
9657
+ d.parent = p, p.parent = h, h.body.push(p);
9658
9658
  }), n(h);
9659
9659
  }
9660
9660
  }
@@ -9685,7 +9685,7 @@ var Sc = {
9685
9685
  }, s = _e(n, o), a = _e(r, o), i = /* @__PURE__ */ new Set();
9686
9686
  if (e.useAppliedIgnoreCase && e.currentFlags.ignoreCase) {
9687
9687
  const l = ns(t);
9688
- Rc(l).forEach((c) => {
9688
+ Ic(l).forEach((c) => {
9689
9689
  i.add(
9690
9690
  Array.isArray(c) ? `${_e(c[0], o)}-${_e(c[1], o)}` : _e(c, o)
9691
9691
  );
@@ -9733,7 +9733,7 @@ var Sc = {
9733
9733
  const a = o.currentFlags;
9734
9734
  n && (o.currentFlags = bt(a, n));
9735
9735
  const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
9736
- r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Ic(t, n, o.useFlagMods)}${i})`;
9736
+ r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Nc(t, n, o.useFlagMods)}${i})`;
9737
9737
  return o.currentFlags = a, l;
9738
9738
  },
9739
9739
  /**
@@ -9746,7 +9746,7 @@ var Sc = {
9746
9746
  @param {QuantifierNode} node
9747
9747
  */
9748
9748
  Quantifier(t, e, n) {
9749
- return n(t.body) + Nc(t);
9749
+ return n(t.body) + Pc(t);
9750
9750
  },
9751
9751
  /**
9752
9752
  @param {SubroutineNode & {isRecursive: true}} node
@@ -9757,7 +9757,7 @@ var Sc = {
9757
9757
  const r = n.recursionLimit;
9758
9758
  return e === 0 ? `(?R=${r})` : v`\g<${e}&R=${r}>`;
9759
9759
  }
9760
- }, vc = /* @__PURE__ */ new Set([
9760
+ }, xc = /* @__PURE__ */ new Set([
9761
9761
  "$",
9762
9762
  "(",
9763
9763
  ")",
@@ -9772,7 +9772,7 @@ var Sc = {
9772
9772
  "{",
9773
9773
  "|",
9774
9774
  "}"
9775
- ]), xc = /* @__PURE__ */ new Set([
9775
+ ]), Ec = /* @__PURE__ */ new Set([
9776
9776
  "-",
9777
9777
  "\\",
9778
9778
  "]",
@@ -9780,7 +9780,7 @@ var Sc = {
9780
9780
  // Literal `[` doesn't require escaping with flag u, but this can help work around regex source
9781
9781
  // linters and regex syntax processors that expect unescaped `[` to create a nested class
9782
9782
  "["
9783
- ]), Ec = /* @__PURE__ */ new Set([
9783
+ ]), Ac = /* @__PURE__ */ new Set([
9784
9784
  "(",
9785
9785
  ")",
9786
9786
  "-",
@@ -9828,9 +9828,9 @@ var Sc = {
9828
9828
  // paragraph separator
9829
9829
  [65279, v`\uFEFF`]
9830
9830
  // ZWNBSP/BOM
9831
- ]), Ac = /^\p{Cased}$/u;
9831
+ ]), Rc = /^\p{Cased}$/u;
9832
9832
  function Rn(t) {
9833
- return Ac.test(t);
9833
+ return Rc.test(t);
9834
9834
  }
9835
9835
  function ns(t, e) {
9836
9836
  const n = !!e?.firstOnly, r = t.min.value, o = t.max.value, s = [];
@@ -9856,20 +9856,20 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
9856
9856
  // Control chars, etc.; condition modeled on the Chrome developer console's display for strings
9857
9857
  t < 32 || t > 126 && t < 160 || // Unicode planes 4-16; unassigned, special purpose, and private use area
9858
9858
  t > 262143 || // Avoid corrupting a preceding backref by immediately following it with a literal digit
9859
- e && Pc(t)
9859
+ e && Lc(t)
9860
9860
  )
9861
9861
  return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
9862
- const o = n ? r ? Ec : xc : vc, s = M(t);
9862
+ const o = n ? r ? Ac : Ec : xc, s = M(t);
9863
9863
  return (o.has(s) ? "\\" : "") + s;
9864
9864
  }
9865
- function Rc(t) {
9865
+ function Ic(t) {
9866
9866
  const e = t.map((o) => o.codePointAt(0)).sort((o, s) => o - s), n = [];
9867
9867
  let r = null;
9868
9868
  for (let o = 0; o < e.length; o++)
9869
9869
  e[o + 1] === e[o] + 1 ? r ??= e[o] : r === null ? n.push(e[o]) : (n.push([r, e[o]]), r = null);
9870
9870
  return n;
9871
9871
  }
9872
- function Ic(t, e, n) {
9872
+ function Nc(t, e, n) {
9873
9873
  if (t)
9874
9874
  return ">";
9875
9875
  let r = "";
@@ -9879,7 +9879,7 @@ function Ic(t, e, n) {
9879
9879
  }
9880
9880
  return `${r}:`;
9881
9881
  }
9882
- function Nc({ kind: t, max: e, min: n }) {
9882
+ function Pc({ kind: t, max: e, min: n }) {
9883
9883
  let r;
9884
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 + {
9885
9885
  greedy: "",
@@ -9890,13 +9890,13 @@ function Nc({ kind: t, max: e, min: n }) {
9890
9890
  function Er({ type: t }) {
9891
9891
  return t === "CapturingGroup" || t === "Group" || t === "LookaroundAssertion";
9892
9892
  }
9893
- function Pc(t) {
9893
+ function Lc(t) {
9894
9894
  return t > 47 && t < 58;
9895
9895
  }
9896
9896
  function Ar({ type: t, value: e }) {
9897
9897
  return t === "Character" && e === 45;
9898
9898
  }
9899
- var Lc = class cn extends RegExp {
9899
+ var $c = class cn extends RegExp {
9900
9900
  /**
9901
9901
  @type {Map<number, {
9902
9902
  hidden?: true;
@@ -9954,7 +9954,7 @@ var Lc = class cn extends RegExp {
9954
9954
  transfers: [],
9955
9955
  ...r
9956
9956
  };
9957
- super(o ? "" : e, n), this.#r = e, this.#t = Tc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
9957
+ super(o ? "" : e, n), this.#r = e, this.#t = Mc(s.hiddenCaptures, s.transfers), this.#o = s.strategy, this.rawOptions = r ?? {};
9958
9958
  }
9959
9959
  o || (this.#e = this);
9960
9960
  }
@@ -9973,7 +9973,7 @@ var Lc = class cn extends RegExp {
9973
9973
  if (this.#o === "clip_search" && n && r) {
9974
9974
  this.lastIndex = 0;
9975
9975
  const o = this.#s(e.slice(r));
9976
- return o && ($c(o, r, e, this.hasIndices), this.lastIndex += r), o;
9976
+ return o && (Tc(o, r, e, this.hasIndices), this.lastIndex += r), o;
9977
9977
  }
9978
9978
  return this.#s(e);
9979
9979
  }
@@ -9999,7 +9999,7 @@ var Lc = class cn extends RegExp {
9999
9999
  if (!u)
10000
10000
  throw new Error(`Invalid capture transfer to "${u}"`);
10001
10001
  if (n[u] = r[a], this.hasIndices && (n.indices[u] = o[a]), n.groups) {
10002
- this.#n || (this.#n = Mc(this.source));
10002
+ this.#n || (this.#n = Oc(this.source));
10003
10003
  const c = this.#n.get(l);
10004
10004
  c && (n.groups[c] = r[a], this.hasIndices && (n.indices.groups[c] = o[a]));
10005
10005
  }
@@ -10008,7 +10008,7 @@ var Lc = class cn extends RegExp {
10008
10008
  return n;
10009
10009
  }
10010
10010
  };
10011
- function $c(t, e, n, r) {
10011
+ function Tc(t, e, n, r) {
10012
10012
  if (t.index += e, t.input = n, r) {
10013
10013
  const o = t.indices;
10014
10014
  for (let a = 0; a < o.length; a++) {
@@ -10022,7 +10022,7 @@ function $c(t, e, n, r) {
10022
10022
  });
10023
10023
  }
10024
10024
  }
10025
- function Tc(t, e) {
10025
+ function Mc(t, e) {
10026
10026
  const n = /* @__PURE__ */ new Map();
10027
10027
  for (const r of t)
10028
10028
  n.set(r, {
@@ -10030,10 +10030,10 @@ function Tc(t, e) {
10030
10030
  });
10031
10031
  for (const [r, o] of e)
10032
10032
  for (const s of o)
10033
- qe(n, s, {}).transferTo = r;
10033
+ Ve(n, s, {}).transferTo = r;
10034
10034
  return n;
10035
10035
  }
10036
- function Mc(t) {
10036
+ function Oc(t) {
10037
10037
  const e = /(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu, n = /* @__PURE__ */ new Map();
10038
10038
  let r = 0, o = 0, s;
10039
10039
  for (; s = e.exec(t); ) {
@@ -10042,12 +10042,12 @@ function Mc(t) {
10042
10042
  }
10043
10043
  return n;
10044
10044
  }
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
10045
  function Dc(t, e) {
10050
- const n = Vo(e), r = Fo(t, {
10046
+ const n = Gc(t, e);
10047
+ return n.options ? new $c(n.pattern, n.flags, n.options) : new RegExp(n.pattern, n.flags);
10048
+ }
10049
+ function Gc(t, e) {
10050
+ const n = qo(e), r = Fo(t, {
10051
10051
  flags: n.flags,
10052
10052
  normalizeUnknownPropertyNames: !0,
10053
10053
  rules: {
@@ -10056,16 +10056,16 @@ function Dc(t, e) {
10056
10056
  },
10057
10057
  skipBackrefValidation: n.rules.allowOrphanBackrefs,
10058
10058
  unicodePropertyMap: An
10059
- }), o = cc(r, {
10059
+ }), o = hc(r, {
10060
10060
  accuracy: n.accuracy,
10061
10061
  asciiWordBoundaries: n.rules.asciiWordBoundaries,
10062
10062
  avoidSubclass: n.avoidSubclass,
10063
10063
  bestEffortTarget: n.target
10064
- }), s = _c(o, n), a = Qu(s.pattern, {
10064
+ }), s = Sc(o, n), a = ec(s.pattern, {
10065
10065
  captureTransfers: s._captureTransfers,
10066
10066
  hiddenCaptures: s._hiddenCaptures,
10067
10067
  mode: "external"
10068
- }), i = Ju(a.pattern), l = Yu(i.pattern, {
10068
+ }), i = Zu(a.pattern), l = Ju(i.pattern, {
10069
10069
  captureTransfers: a.captureTransfers,
10070
10070
  hiddenCaptures: a.hiddenCaptures
10071
10071
  }), u = {
@@ -10076,18 +10076,18 @@ function Dc(t, e) {
10076
10076
  if (n.lazyCompileLength !== 1 / 0)
10077
10077
  throw new Error("Lazy compilation requires subclass");
10078
10078
  } else {
10079
- const c = l.hiddenCaptures.sort((p, m) => p - m), h = Array.from(l.captureTransfers), d = o._strategy, f = u.pattern.length >= n.lazyCompileLength;
10080
- (c.length || h.length || d || f) && (u.options = {
10079
+ const c = l.hiddenCaptures.sort((p, g) => p - g), h = Array.from(l.captureTransfers), f = o._strategy, d = u.pattern.length >= n.lazyCompileLength;
10080
+ (c.length || h.length || f || d) && (u.options = {
10081
10081
  ...c.length && { hiddenCaptures: c },
10082
10082
  ...h.length && { transfers: h },
10083
- ...d && { strategy: d },
10084
- ...f && { lazyCompile: f }
10083
+ ...f && { strategy: f },
10084
+ ...d && { lazyCompile: d }
10085
10085
  });
10086
10086
  }
10087
10087
  return u;
10088
10088
  }
10089
10089
  const Rr = 4294967295;
10090
- class Gc {
10090
+ class Fc {
10091
10091
  constructor(e, n = {}) {
10092
10092
  this.patterns = e, this.options = n;
10093
10093
  const {
@@ -10161,8 +10161,8 @@ class Gc {
10161
10161
  return null;
10162
10162
  }
10163
10163
  }
10164
- function Fc(t, e) {
10165
- return Oc(
10164
+ function Bc(t, e) {
10165
+ return Dc(
10166
10166
  t,
10167
10167
  {
10168
10168
  global: !0,
@@ -10188,7 +10188,7 @@ function Fc(t, e) {
10188
10188
  }
10189
10189
  );
10190
10190
  }
10191
- function Bc(t = {}) {
10191
+ function jc(t = {}) {
10192
10192
  const e = Object.assign(
10193
10193
  {
10194
10194
  target: "auto",
@@ -10196,9 +10196,9 @@ function Bc(t = {}) {
10196
10196
  },
10197
10197
  t
10198
10198
  );
10199
- return e.regexConstructor ||= (n) => Fc(n, { target: e.target }), {
10199
+ return e.regexConstructor ||= (n) => Bc(n, { target: e.target }), {
10200
10200
  createScanner(n) {
10201
- return new Gc(n, e);
10201
+ return new Fc(n, e);
10202
10202
  },
10203
10203
  createString(n) {
10204
10204
  return {
@@ -10207,8 +10207,8 @@ function Bc(t = {}) {
10207
10207
  }
10208
10208
  };
10209
10209
  }
10210
- const jc = Bc({ forgiving: !0 }), Uc = await Hl({
10211
- engine: jc,
10210
+ const Uc = jc({ forgiving: !0 }), zc = await Wl({
10211
+ engine: Uc,
10212
10212
  langAlias: {
10213
10213
  markup: "html",
10214
10214
  svg: "xml",
@@ -10226,7 +10226,7 @@ const jc = Bc({ forgiving: !0 }), Uc = await Hl({
10226
10226
  defaultColor: !1,
10227
10227
  inline: "tailing-curly-colon",
10228
10228
  addLanguageClass: !0,
10229
- transformers: [Jl(), Ql()],
10229
+ transformers: [Zl(), eu()],
10230
10230
  parseMetaString: (t) => {
10231
10231
  const e = t.matchAll(
10232
10232
  /([a-z0-9]+)(?:=(["'])(.*?)\2|=(.*?)(?:\s|$)|(?:\s|$))/gi
@@ -10238,8 +10238,8 @@ const jc = Bc({ forgiving: !0 }), Uc = await Hl({
10238
10238
  })
10239
10239
  );
10240
10240
  }
10241
- }, zc = () => (t) => {
10242
- Vr(t, "element", (e, n, r) => {
10241
+ }, Hc = () => (t) => {
10242
+ qr(t, "element", (e, n, r) => {
10243
10243
  if (e.tagName !== "code") return;
10244
10244
  const o = r?.type === "element" && r.tagName === "pre";
10245
10245
  e.properties.inline = JSON.stringify(!o), o && (e.properties = {
@@ -10248,28 +10248,28 @@ const jc = Bc({ forgiving: !0 }), Uc = await Hl({
10248
10248
  class: as(e.properties.class, r.properties.class)
10249
10249
  }, r.properties = {});
10250
10250
  });
10251
- }, uh = (t) => [
10251
+ }, ch = (t) => [
10252
10252
  [
10253
- Kl,
10254
- Uc,
10253
+ Yl,
10254
+ zc,
10255
10255
  {
10256
10256
  ...wt,
10257
10257
  themes: t ?? wt.themes
10258
10258
  }
10259
10259
  ],
10260
- zc
10261
- ], Hc = (t, e, n = "text", r = wt.themes) => {
10260
+ Hc
10261
+ ], Wc = (t, e, n = "text", r = wt.themes) => {
10262
10262
  const o = t.codeToHast(e, {
10263
10263
  lang: n,
10264
10264
  ...wt,
10265
10265
  themes: r
10266
10266
  });
10267
10267
  return Ds(o, { Fragment: rs, jsx: at.jsx, jsxs: at.jsxs });
10268
- }, Wc = os(
10268
+ }, Vc = os(
10269
10269
  ({ code: t, children: e, embedded: n, ...r }) => {
10270
10270
  const { syntaxHighlighting: o } = ss().options;
10271
10271
  ls(o?.highlighter, "Highlighter not found");
10272
- const s = Hc(
10272
+ const s = Wc(
10273
10273
  o.highlighter,
10274
10274
  t ?? e,
10275
10275
  r.language,
@@ -10278,29 +10278,29 @@ const jc = Bc({ forgiving: !0 }), Uc = await Hl({
10278
10278
  return n ? /* @__PURE__ */ at.jsx(cs, { ...r, children: s }) : /* @__PURE__ */ at.jsx(us, { ...r, children: s });
10279
10279
  }
10280
10280
  );
10281
- Wc.displayName = "SyntaxHighlight";
10281
+ Vc.displayName = "SyntaxHighlight";
10282
10282
  export {
10283
10283
  Fn as E,
10284
- Wc as S,
10284
+ Vc as S,
10285
10285
  H as V,
10286
10286
  Ps as a,
10287
- ah as b,
10288
- sh as c,
10289
- th as d,
10287
+ ih as b,
10288
+ ah as c,
10289
+ nh as d,
10290
10290
  Ir as e,
10291
10291
  Gr as f,
10292
10292
  ua as g,
10293
- Hc as h,
10293
+ Wc as h,
10294
10294
  Wr as i,
10295
10295
  aa as j,
10296
10296
  jn as k,
10297
- uh as l,
10298
- Qc as o,
10297
+ ch as l,
10298
+ eh as o,
10299
10299
  Fr as p,
10300
10300
  Ls as s,
10301
10301
  Ds as t,
10302
- eh as u,
10303
- Vr as v,
10302
+ th as u,
10303
+ qr as v,
10304
10304
  la as z
10305
10305
  };
10306
- //# sourceMappingURL=SyntaxHighlight-CrjhGEwT.js.map
10306
+ //# sourceMappingURL=SyntaxHighlight-Bp_UsIXG.js.map