@pubinfo/core 2.1.10 → 2.1.12

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 (92) hide show
  1. package/dist/AppSetting-BBCop_0D.js +107 -0
  2. package/dist/{HButton-Dt6qGhhR.js → HButton-pEqyd918.js} +13 -11
  3. package/dist/HCheckList-cef4jGrw.js +35 -0
  4. package/dist/HDivider-BSj2DiEY.js +13 -0
  5. package/dist/HInput-DfpH43DV.js +36 -0
  6. package/dist/HSlideover-B6gEDfA5.js +3223 -0
  7. package/dist/HToggle-BTft_PNT.js +32 -0
  8. package/dist/HTooltip-B8aoK5uN.js +19 -0
  9. package/dist/PreferencesContent-CuNffqV_.js +703 -0
  10. package/dist/SettingBreadcrumb-CMn0gojs.js +47 -0
  11. package/dist/SettingCopyright-DKwdXYr3.js +47 -0
  12. package/dist/SettingEnableTransition-Bn37z29E.js +70 -0
  13. package/dist/SettingHome-HttuaN-N.js +33 -0
  14. package/dist/SettingMenu-CEvBV2Wj.js +113 -0
  15. package/dist/SettingMode-DpAUEZUv.js +62 -0
  16. package/dist/SettingNavSearch-Cem0LL54.js +33 -0
  17. package/dist/SettingOther-DcrlPnMd.js +50 -0
  18. package/dist/SettingPage-UhL5e6_m.js +24 -0
  19. package/dist/SettingTabbar-Ct3S8jS2.js +144 -0
  20. package/dist/SettingThemes-DaRKZ2Q3.js +123 -0
  21. package/dist/SettingToolbar-Cx_Mz_EP.js +52 -0
  22. package/dist/SettingTopbar-Ckg-OGSj.js +51 -0
  23. package/dist/SettingWidthMode-CZ2i-kzC.js +58 -0
  24. package/dist/_plugin-vue_export-helper-CsLplWgU.js +8 -0
  25. package/dist/auth-BVTDpkDr.js +4635 -0
  26. package/dist/built-in/layout-component/composables/useContext.d.ts +1 -0
  27. package/dist/{change-organization-hsqeSzDu.js → change-organization-EdR25ifs.js} +51 -48
  28. package/dist/{change-password-EtccCDRX.js → change-password-D-ZqBAmY.js} +85 -81
  29. package/dist/chunk-BdsCSvBP.js +20 -0
  30. package/dist/{components-DFNyaAb9.js → components-CKVAXENc.js} +681 -674
  31. package/dist/{core-DJIGzMMM.js → core-Dg8YES9i.js} +1003 -938
  32. package/dist/dist-HLiWAOC7.js +472 -0
  33. package/dist/{engine-oniguruma-CaNXwGSv.js → engine-oniguruma-DCGL4yXX.js} +58 -56
  34. package/dist/form-CGzMvzKZ.js +2968 -0
  35. package/dist/index.js +5001 -4872
  36. package/dist/json-BFBcpML_.js +3 -0
  37. package/dist/{modal-Bl5xHbxa.js → modal-ybprgEqf.js} +12543 -9070
  38. package/dist/not-found-CuHR6H_g.js +44 -0
  39. package/dist/not-permission-BcQAkzxI.js +41 -0
  40. package/dist/profile-Bsc6FIbI.js +19533 -0
  41. package/dist/{question-line-BG__Ycfv.js → question-line-BzrfPWnG.js} +9 -7
  42. package/dist/reload-BClJy4MY.js +15 -0
  43. package/dist/{right-BxBlFUwj.js → right-CCqcGubr.js} +15 -13
  44. package/dist/style.css +1 -1
  45. package/dist/{tree-select-B8cTcGLa.js → tree-select-gPCwtMia.js} +2906 -2659
  46. package/dist/useContext-Dlqfap_7.js +11 -0
  47. package/dist/vitesse-dark-DrB9-RFK.js +4 -0
  48. package/dist/vitesse-light-CmcnEl2T.js +4 -0
  49. package/dist/wasm-C92aTsEJ.js +4 -0
  50. package/dist/watchDiff-DJP3s9bb.js +883 -0
  51. package/package.json +8 -8
  52. package/src/built-in/layout-component/components/Menu/item.vue +2 -2
  53. package/src/built-in/layout-component/components/Menu/sub.vue +20 -1
  54. package/src/built-in/layout-component/composables/useContext.ts +1 -0
  55. package/src/built-in/layout-component/provider.ts +5 -0
  56. package/dist/AppSetting-7jlhUzze.js +0 -105
  57. package/dist/HCheckList-cPBgATmv.js +0 -33
  58. package/dist/HDivider-BwvBr5OE.js +0 -11
  59. package/dist/HInput-KJ5nFBpF.js +0 -34
  60. package/dist/HSlideover-DVQDc9q6.js +0 -3151
  61. package/dist/HToggle-Ce_2-yhZ.js +0 -30
  62. package/dist/HTooltip-DjAU-Evn.js +0 -16
  63. package/dist/PreferencesContent-BAIH81yS.js +0 -701
  64. package/dist/SettingBreadcrumb-O9-PhAFT.js +0 -45
  65. package/dist/SettingCopyright-DIKsWTuf.js +0 -45
  66. package/dist/SettingEnableTransition-61O7W00b.js +0 -68
  67. package/dist/SettingHome-Sv65TPH8.js +0 -31
  68. package/dist/SettingMenu-BvwJOUZV.js +0 -111
  69. package/dist/SettingMode-B8H_eQc8.js +0 -60
  70. package/dist/SettingNavSearch-BHsmYBA7.js +0 -31
  71. package/dist/SettingOther-CyyNnaDX.js +0 -48
  72. package/dist/SettingPage-B82lW41P.js +0 -22
  73. package/dist/SettingTabbar-Bky2xvH-.js +0 -142
  74. package/dist/SettingThemes-CkdzS1xt.js +0 -121
  75. package/dist/SettingToolbar-CD4qns1J.js +0 -50
  76. package/dist/SettingTopbar-1shjoe3s.js +0 -49
  77. package/dist/SettingWidthMode-DlG6lXjA.js +0 -56
  78. package/dist/_plugin-vue_export-helper-sUTDUeGO.js +0 -6
  79. package/dist/auth-BLGKOyc5.js +0 -4432
  80. package/dist/chunk-CD4vhpVs.js +0 -18
  81. package/dist/dist-7OjQvlya.js +0 -468
  82. package/dist/form-C3VHofnN.js +0 -2768
  83. package/dist/json-Bu_Zprin.js +0 -2
  84. package/dist/not-found-BCjngLzt.js +0 -42
  85. package/dist/not-permission-C26vTMvf.js +0 -39
  86. package/dist/profile-BVXIFuBG.js +0 -19269
  87. package/dist/reload-DHx5Vwus.js +0 -12
  88. package/dist/useContext-DLtu9F7E.js +0 -9
  89. package/dist/vitesse-dark-CTe40QT_.js +0 -2
  90. package/dist/vitesse-light-BWXC_WeB.js +0 -2
  91. package/dist/wasm-2zDVqo-C.js +0 -2
  92. package/dist/watchDiff-CPZFtaOC.js +0 -655
@@ -1,40 +1,43 @@
1
- import { n as __exportAll } from "./chunk-CD4vhpVs.js";
2
- var ShikiError = class extends Error {
1
+ import { n as e } from "./chunk-BdsCSvBP.js";
2
+ //#region ../../node_modules/.pnpm/@shikijs+types@3.22.0/node_modules/@shikijs/types/dist/index.mjs
3
+ var t = class extends Error {
3
4
  constructor(e) {
4
5
  super(e), this.name = "ShikiError";
5
6
  }
6
7
  };
7
- function clone(e) {
8
- return doClone(e);
8
+ //#endregion
9
+ //#region ../../node_modules/.pnpm/@shikijs+vscode-textmate@10.0.2/node_modules/@shikijs/vscode-textmate/dist/index.js
10
+ function n(e) {
11
+ return r(e);
9
12
  }
10
- function doClone(e) {
11
- return Array.isArray(e) ? cloneArray(e) : e instanceof RegExp ? e : typeof e == "object" ? cloneObj(e) : e;
13
+ function r(e) {
14
+ return Array.isArray(e) ? i(e) : e instanceof RegExp ? e : typeof e == "object" ? a(e) : e;
12
15
  }
13
- function cloneArray(e) {
16
+ function i(e) {
14
17
  let t = [];
15
- for (let n = 0, i = e.length; n < i; n++) t[n] = doClone(e[n]);
18
+ for (let n = 0, i = e.length; n < i; n++) t[n] = r(e[n]);
16
19
  return t;
17
20
  }
18
- function cloneObj(e) {
21
+ function a(e) {
19
22
  let t = {};
20
- for (let n in e) t[n] = doClone(e[n]);
23
+ for (let n in e) t[n] = r(e[n]);
21
24
  return t;
22
25
  }
23
- function mergeObjects(e, ...t) {
26
+ function o(e, ...t) {
24
27
  return t.forEach((t) => {
25
28
  for (let n in t) e[n] = t[n];
26
29
  }), e;
27
30
  }
28
- function basename(e) {
31
+ function s(e) {
29
32
  let t = ~e.lastIndexOf("/") || ~e.lastIndexOf("\\");
30
- return t === 0 ? e : ~t === e.length - 1 ? basename(e.substring(0, e.length - 1)) : e.substr(~t + 1);
33
+ return t === 0 ? e : ~t === e.length - 1 ? s(e.substring(0, e.length - 1)) : e.substr(~t + 1);
31
34
  }
32
- var CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, RegexSource = class {
35
+ var c = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, l = class {
33
36
  static hasCaptures(e) {
34
- return e === null ? !1 : (CAPTURING_REGEX_SOURCE.lastIndex = 0, CAPTURING_REGEX_SOURCE.test(e));
37
+ return e === null ? !1 : (c.lastIndex = 0, c.test(e));
35
38
  }
36
39
  static replaceCaptures(e, t, n) {
37
- return e.replace(CAPTURING_REGEX_SOURCE, (e, r, i, a) => {
40
+ return e.replace(c, (e, r, i, a) => {
38
41
  let o = n[parseInt(r || i, 10)];
39
42
  if (o) {
40
43
  let e = t.substring(o.start, o.end);
@@ -48,30 +51,30 @@ var CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, RegexSour
48
51
  });
49
52
  }
50
53
  };
51
- function strcmp(e, t) {
54
+ function u(e, t) {
52
55
  return e < t ? -1 : e > t ? 1 : 0;
53
56
  }
54
- function strArrCmp(e, t) {
57
+ function d(e, t) {
55
58
  if (e === null && t === null) return 0;
56
59
  if (!e) return -1;
57
60
  if (!t) return 1;
58
61
  let n = e.length, r = t.length;
59
62
  if (n === r) {
60
63
  for (let r = 0; r < n; r++) {
61
- let n = strcmp(e[r], t[r]);
64
+ let n = u(e[r], t[r]);
62
65
  if (n !== 0) return n;
63
66
  }
64
67
  return 0;
65
68
  }
66
69
  return n - r;
67
70
  }
68
- function isValidHexColor(e) {
71
+ function f(e) {
69
72
  return !!(/^#[0-9a-f]{6}$/i.test(e) || /^#[0-9a-f]{8}$/i.test(e) || /^#[0-9a-f]{3}$/i.test(e) || /^#[0-9a-f]{4}$/i.test(e));
70
73
  }
71
- function escapeRegExpCharacters(e) {
74
+ function p(e) {
72
75
  return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
73
76
  }
74
- var CachedFn = class {
77
+ var m = class {
75
78
  constructor(e) {
76
79
  this.fn = e;
77
80
  }
@@ -81,17 +84,17 @@ var CachedFn = class {
81
84
  let t = this.fn(e);
82
85
  return this.cache.set(e, t), t;
83
86
  }
84
- }, Theme = class {
87
+ }, h = class {
85
88
  constructor(e, t, n) {
86
89
  this._colorMap = e, this._defaults = t, this._root = n;
87
90
  }
88
91
  static createFromRawTheme(e, t) {
89
- return this.createFromParsedTheme(parseTheme(e), t);
92
+ return this.createFromParsedTheme(ne(e), t);
90
93
  }
91
94
  static createFromParsedTheme(e, t) {
92
- return resolveParsedThemeRules(e, t);
95
+ return ie(e, t);
93
96
  }
94
- _cachedMatchRoot = new CachedFn((e) => this._root.match(e));
97
+ _cachedMatchRoot = new m((e) => this._root.match(e));
95
98
  getColorMap() {
96
99
  return this._colorMap.getColorMap();
97
100
  }
@@ -100,10 +103,10 @@ var CachedFn = class {
100
103
  }
101
104
  match(e) {
102
105
  if (e === null) return this._defaults;
103
- let t = e.scopeName, n = this._cachedMatchRoot.get(t).find((t) => _scopePathMatchesParentScopes(e.parent, t.parentScopes));
104
- return n ? new StyleAttributes(n.fontStyle, n.foreground, n.background) : null;
106
+ let t = e.scopeName, n = this._cachedMatchRoot.get(t).find((t) => _(e.parent, t.parentScopes));
107
+ return n ? new te(n.fontStyle, n.foreground, n.background) : null;
105
108
  }
106
- }, ScopeStack = class e {
109
+ }, g = class e {
107
110
  constructor(e, t) {
108
111
  this.parent = e, this.scopeName = t;
109
112
  }
@@ -136,7 +139,7 @@ var CachedFn = class {
136
139
  return n === e ? t.reverse() : void 0;
137
140
  }
138
141
  };
139
- function _scopePathMatchesParentScopes(e, t) {
142
+ function _(e, t) {
140
143
  if (t.length === 0) return !0;
141
144
  for (let n = 0; n < t.length; n++) {
142
145
  let r = t[n], i = !1;
@@ -144,7 +147,7 @@ function _scopePathMatchesParentScopes(e, t) {
144
147
  if (n === t.length - 1) return !1;
145
148
  r = t[++n], i = !0;
146
149
  }
147
- for (; e && !_matchesScope(e.scopeName, r);) {
150
+ for (; e && !ee(e.scopeName, r);) {
148
151
  if (i) return !1;
149
152
  e = e.parent;
150
153
  }
@@ -153,15 +156,15 @@ function _scopePathMatchesParentScopes(e, t) {
153
156
  }
154
157
  return !0;
155
158
  }
156
- function _matchesScope(e, t) {
159
+ function ee(e, t) {
157
160
  return t === e || e.startsWith(t) && e[t.length] === ".";
158
161
  }
159
- var StyleAttributes = class {
162
+ var te = class {
160
163
  constructor(e, t, n) {
161
164
  this.fontStyle = e, this.foregroundId = t, this.backgroundId = n;
162
165
  }
163
166
  };
164
- function parseTheme(e) {
167
+ function ne(e) {
165
168
  if (!e || !e.settings || !Array.isArray(e.settings)) return [];
166
169
  let t = e.settings, n = [], r = 0;
167
170
  for (let e = 0, i = t.length; e < i; e++) {
@@ -192,39 +195,39 @@ function parseTheme(e) {
192
195
  }
193
196
  }
194
197
  let s = null;
195
- typeof i.settings.foreground == "string" && isValidHexColor(i.settings.foreground) && (s = i.settings.foreground);
198
+ typeof i.settings.foreground == "string" && f(i.settings.foreground) && (s = i.settings.foreground);
196
199
  let c = null;
197
- typeof i.settings.background == "string" && isValidHexColor(i.settings.background) && (c = i.settings.background);
200
+ typeof i.settings.background == "string" && f(i.settings.background) && (c = i.settings.background);
198
201
  for (let t = 0, i = a.length; t < i; t++) {
199
202
  let i = a[t].trim().split(" "), l = i[i.length - 1], u = null;
200
- i.length > 1 && (u = i.slice(0, i.length - 1), u.reverse()), n[r++] = new ParsedThemeRule(l, u, e, o, s, c);
203
+ i.length > 1 && (u = i.slice(0, i.length - 1), u.reverse()), n[r++] = new re(l, u, e, o, s, c);
201
204
  }
202
205
  }
203
206
  return n;
204
207
  }
205
- var ParsedThemeRule = class {
208
+ var re = class {
206
209
  constructor(e, t, n, r, i, a) {
207
210
  this.scope = e, this.parentScopes = t, this.index = n, this.fontStyle = r, this.foreground = i, this.background = a;
208
211
  }
209
- }, FontStyle = /* @__PURE__ */ ((e) => (e[e.NotSet = -1] = "NotSet", e[e.None = 0] = "None", e[e.Italic = 1] = "Italic", e[e.Bold = 2] = "Bold", e[e.Underline = 4] = "Underline", e[e.Strikethrough = 8] = "Strikethrough", e))(FontStyle || {});
210
- function resolveParsedThemeRules(e, t) {
212
+ }, v = /* @__PURE__ */ ((e) => (e[e.NotSet = -1] = "NotSet", e[e.None = 0] = "None", e[e.Italic = 1] = "Italic", e[e.Bold = 2] = "Bold", e[e.Underline = 4] = "Underline", e[e.Strikethrough = 8] = "Strikethrough", e))(v || {});
213
+ function ie(e, t) {
211
214
  e.sort((e, t) => {
212
- let n = strcmp(e.scope, t.scope);
213
- return n !== 0 || (n = strArrCmp(e.parentScopes, t.parentScopes), n !== 0) ? n : e.index - t.index;
215
+ let n = u(e.scope, t.scope);
216
+ return n !== 0 || (n = d(e.parentScopes, t.parentScopes), n !== 0) ? n : e.index - t.index;
214
217
  });
215
218
  let n = 0, r = "#000000", i = "#ffffff";
216
219
  for (; e.length >= 1 && e[0].scope === "";) {
217
220
  let t = e.shift();
218
221
  t.fontStyle !== -1 && (n = t.fontStyle), t.foreground !== null && (r = t.foreground), t.background !== null && (i = t.background);
219
222
  }
220
- let a = new ColorMap(t), o = new StyleAttributes(n, a.getId(r), a.getId(i)), s = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1, 0, 0), []);
223
+ let a = new ae(t), o = new te(n, a.getId(r), a.getId(i)), s = new ce(new se(0, null, -1, 0, 0), []);
221
224
  for (let t = 0, n = e.length; t < n; t++) {
222
225
  let n = e[t];
223
226
  s.insert(0, n.scope, n.parentScopes, n.fontStyle, a.getId(n.foreground), a.getId(n.background));
224
227
  }
225
- return new Theme(a, o, s);
228
+ return new h(a, o, s);
226
229
  }
227
- var ColorMap = class {
230
+ var ae = class {
228
231
  _isFrozen;
229
232
  _lastColorId;
230
233
  _id2color;
@@ -246,14 +249,14 @@ var ColorMap = class {
246
249
  getColorMap() {
247
250
  return this._id2color.slice(0);
248
251
  }
249
- }, emptyParentScopes = Object.freeze([]), ThemeTrieElementRule = class e {
252
+ }, oe = Object.freeze([]), se = class e {
250
253
  scopeDepth;
251
254
  parentScopes;
252
255
  fontStyle;
253
256
  foreground;
254
257
  background;
255
258
  constructor(e, t, n, r, i) {
256
- this.scopeDepth = e, this.parentScopes = t || emptyParentScopes, this.fontStyle = n, this.foreground = r, this.background = i;
259
+ this.scopeDepth = e, this.parentScopes = t || oe, this.fontStyle = n, this.foreground = r, this.background = i;
257
260
  }
258
261
  clone() {
259
262
  return new e(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
@@ -266,7 +269,7 @@ var ColorMap = class {
266
269
  acceptOverwrite(e, t, n, r) {
267
270
  this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, t !== -1 && (this.fontStyle = t), n !== 0 && (this.foreground = n), r !== 0 && (this.background = r);
268
271
  }
269
- }, ThemeTrieElement = class e {
272
+ }, ce = class e {
270
273
  constructor(e, t = [], n = {}) {
271
274
  this._mainRule = e, this._children = n, this._rulesWithParentScopes = t;
272
275
  }
@@ -297,7 +300,7 @@ var ColorMap = class {
297
300
  let s = n.indexOf("."), c, l;
298
301
  s === -1 ? (c = n, l = "") : (c = n.substring(0, s), l = n.substring(s + 1));
299
302
  let u;
300
- this._children.hasOwnProperty(c) ? u = this._children[c] : (u = new e(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes)), this._children[c] = u), u.insert(t + 1, l, r, i, a, o);
303
+ this._children.hasOwnProperty(c) ? u = this._children[c] : (u = new e(this._mainRule.clone(), se.cloneArr(this._rulesWithParentScopes)), this._children[c] = u), u.insert(t + 1, l, r, i, a, o);
301
304
  }
302
305
  _doInsertHere(e, t, n, r, i) {
303
306
  if (t === null) {
@@ -306,14 +309,14 @@ var ColorMap = class {
306
309
  }
307
310
  for (let a = 0, o = this._rulesWithParentScopes.length; a < o; a++) {
308
311
  let o = this._rulesWithParentScopes[a];
309
- if (strArrCmp(o.parentScopes, t) === 0) {
312
+ if (d(o.parentScopes, t) === 0) {
310
313
  o.acceptOverwrite(e, n, r, i);
311
314
  return;
312
315
  }
313
316
  }
314
- n === -1 && (n = this._mainRule.fontStyle), r === 0 && (r = this._mainRule.foreground), i === 0 && (i = this._mainRule.background), this._rulesWithParentScopes.push(new ThemeTrieElementRule(e, t, n, r, i));
317
+ n === -1 && (n = this._mainRule.fontStyle), r === 0 && (r = this._mainRule.foreground), i === 0 && (i = this._mainRule.background), this._rulesWithParentScopes.push(new se(e, t, n, r, i));
315
318
  }
316
- }, EncodedTokenMetadata = class e {
319
+ }, y = class e {
317
320
  static toBinaryStr(e) {
318
321
  return e.toString(2).padStart(32, "0");
319
322
  }
@@ -346,18 +349,18 @@ var ColorMap = class {
346
349
  return (e & 4278190080) >>> 24;
347
350
  }
348
351
  static set(t, n, r, i, a, o, s) {
349
- let c = e.getLanguageId(t), l = e.getTokenType(t), u = e.containsBalancedBrackets(t) ? 1 : 0, d = e.getFontStyle(t), f = e.getForeground(t), m = e.getBackground(t);
350
- return n !== 0 && (c = n), r !== 8 && (l = fromOptionalTokenType(r)), i !== null && (u = i ? 1 : 0), a !== -1 && (d = a), o !== 0 && (f = o), s !== 0 && (m = s), (c << 0 | l << 8 | u << 10 | d << 11 | f << 15 | m << 24) >>> 0;
352
+ let c = e.getLanguageId(t), l = e.getTokenType(t), u = e.containsBalancedBrackets(t) ? 1 : 0, d = e.getFontStyle(t), f = e.getForeground(t), p = e.getBackground(t);
353
+ return n !== 0 && (c = n), r !== 8 && (l = ue(r)), i !== null && (u = i ? 1 : 0), a !== -1 && (d = a), o !== 0 && (f = o), s !== 0 && (p = s), (c << 0 | l << 8 | u << 10 | d << 11 | f << 15 | p << 24) >>> 0;
351
354
  }
352
355
  };
353
- function toOptionalTokenType(e) {
356
+ function le(e) {
354
357
  return e;
355
358
  }
356
- function fromOptionalTokenType(e) {
359
+ function ue(e) {
357
360
  return e;
358
361
  }
359
- function createMatchers(e, t) {
360
- let n = [], r = newTokenizer(e), i = r.next();
362
+ function de(e, t) {
363
+ let n = [], r = pe(e), i = r.next();
361
364
  for (; i !== null;) {
362
365
  let e = 0;
363
366
  if (i.length === 2 && i.charAt(1) === ":") {
@@ -391,11 +394,11 @@ function createMatchers(e, t) {
391
394
  let e = s();
392
395
  return i === ")" && (i = r.next()), e;
393
396
  }
394
- if (isIdentifier(i)) {
397
+ if (fe(i)) {
395
398
  let e = [];
396
399
  do
397
400
  e.push(i), i = r.next();
398
- while (isIdentifier(i));
401
+ while (fe(i));
399
402
  return (n) => t(e, n);
400
403
  }
401
404
  return null;
@@ -416,10 +419,10 @@ function createMatchers(e, t) {
416
419
  return (t) => e.some((e) => e(t));
417
420
  }
418
421
  }
419
- function isIdentifier(e) {
422
+ function fe(e) {
420
423
  return !!e && !!e.match(/[\w\.:]+/);
421
424
  }
422
- function newTokenizer(e) {
425
+ function pe(e) {
423
426
  let t = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g, n = t.exec(e);
424
427
  return { next: () => {
425
428
  if (!n) return null;
@@ -427,24 +430,24 @@ function newTokenizer(e) {
427
430
  return n = t.exec(e), r;
428
431
  } };
429
432
  }
430
- function disposeOnigString(e) {
433
+ function me(e) {
431
434
  typeof e.dispose == "function" && e.dispose();
432
435
  }
433
- var TopLevelRuleReference = class {
436
+ var b = class {
434
437
  constructor(e) {
435
438
  this.scopeName = e;
436
439
  }
437
440
  toKey() {
438
441
  return this.scopeName;
439
442
  }
440
- }, TopLevelRepositoryRuleReference = class {
443
+ }, he = class {
441
444
  constructor(e, t) {
442
445
  this.scopeName = e, this.ruleName = t;
443
446
  }
444
447
  toKey() {
445
448
  return `${this.scopeName}#${this.ruleName}`;
446
449
  }
447
- }, ExternalReferenceCollector = class {
450
+ }, ge = class {
448
451
  _references = [];
449
452
  _seenReferenceKeys = /* @__PURE__ */ new Set();
450
453
  get references() {
@@ -455,9 +458,9 @@ var TopLevelRuleReference = class {
455
458
  let t = e.toKey();
456
459
  this._seenReferenceKeys.has(t) || (this._seenReferenceKeys.add(t), this._references.push(e));
457
460
  }
458
- }, ScopeDependencyProcessor = class {
461
+ }, _e = class {
459
462
  constructor(e, t) {
460
- this.repo = e, this.initialScopeName = t, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new TopLevelRuleReference(this.initialScopeName)];
463
+ this.repo = e, this.initialScopeName = t, this.seenFullScopeRequests.add(this.initialScopeName), this.Q = [new b(this.initialScopeName)];
461
464
  }
462
465
  seenFullScopeRequests = /* @__PURE__ */ new Set();
463
466
  seenPartialScopeRequests = /* @__PURE__ */ new Set();
@@ -465,9 +468,9 @@ var TopLevelRuleReference = class {
465
468
  processQueue() {
466
469
  let e = this.Q;
467
470
  this.Q = [];
468
- let t = new ExternalReferenceCollector();
469
- for (let n of e) collectReferencesOfReference(n, this.initialScopeName, this.repo, t);
470
- for (let e of t.references) if (e instanceof TopLevelRuleReference) {
471
+ let t = new ge();
472
+ for (let n of e) ve(n, this.initialScopeName, this.repo, t);
473
+ for (let e of t.references) if (e instanceof b) {
471
474
  if (this.seenFullScopeRequests.has(e.scopeName)) continue;
472
475
  this.seenFullScopeRequests.add(e.scopeName), this.Q.push(e);
473
476
  } else {
@@ -476,63 +479,63 @@ var TopLevelRuleReference = class {
476
479
  }
477
480
  }
478
481
  };
479
- function collectReferencesOfReference(e, t, n, r) {
482
+ function ve(e, t, n, r) {
480
483
  let i = n.lookup(e.scopeName);
481
484
  if (!i) {
482
485
  if (e.scopeName === t) throw Error(`No grammar provided for <${t}>`);
483
486
  return;
484
487
  }
485
488
  let a = n.lookup(t);
486
- e instanceof TopLevelRuleReference ? collectExternalReferencesInTopLevelRule({
489
+ e instanceof b ? be({
487
490
  baseGrammar: a,
488
491
  selfGrammar: i
489
- }, r) : collectExternalReferencesInTopLevelRepositoryRule(e.ruleName, {
492
+ }, r) : ye(e.ruleName, {
490
493
  baseGrammar: a,
491
494
  selfGrammar: i,
492
495
  repository: i.repository
493
496
  }, r);
494
497
  let o = n.injections(e.scopeName);
495
- if (o) for (let e of o) r.add(new TopLevelRuleReference(e));
498
+ if (o) for (let e of o) r.add(new b(e));
496
499
  }
497
- function collectExternalReferencesInTopLevelRepositoryRule(e, t, n) {
500
+ function ye(e, t, n) {
498
501
  if (t.repository && t.repository[e]) {
499
502
  let r = t.repository[e];
500
- collectExternalReferencesInRules([r], t, n);
503
+ xe([r], t, n);
501
504
  }
502
505
  }
503
- function collectExternalReferencesInTopLevelRule(e, t) {
504
- e.selfGrammar.patterns && Array.isArray(e.selfGrammar.patterns) && collectExternalReferencesInRules(e.selfGrammar.patterns, {
506
+ function be(e, t) {
507
+ e.selfGrammar.patterns && Array.isArray(e.selfGrammar.patterns) && xe(e.selfGrammar.patterns, {
505
508
  ...e,
506
509
  repository: e.selfGrammar.repository
507
- }, t), e.selfGrammar.injections && collectExternalReferencesInRules(Object.values(e.selfGrammar.injections), {
510
+ }, t), e.selfGrammar.injections && xe(Object.values(e.selfGrammar.injections), {
508
511
  ...e,
509
512
  repository: e.selfGrammar.repository
510
513
  }, t);
511
514
  }
512
- function collectExternalReferencesInRules(e, t, n) {
515
+ function xe(e, t, n) {
513
516
  for (let r of e) {
514
517
  if (n.visitedRule.has(r)) continue;
515
518
  n.visitedRule.add(r);
516
- let e = r.repository ? mergeObjects({}, t.repository, r.repository) : t.repository;
517
- Array.isArray(r.patterns) && collectExternalReferencesInRules(r.patterns, {
519
+ let e = r.repository ? o({}, t.repository, r.repository) : t.repository;
520
+ Array.isArray(r.patterns) && xe(r.patterns, {
518
521
  ...t,
519
522
  repository: e
520
523
  }, n);
521
524
  let i = r.include;
522
525
  if (!i) continue;
523
- let a = parseInclude(i);
526
+ let a = De(i);
524
527
  switch (a.kind) {
525
528
  case 0:
526
- collectExternalReferencesInTopLevelRule({
529
+ be({
527
530
  ...t,
528
531
  selfGrammar: t.baseGrammar
529
532
  }, n);
530
533
  break;
531
534
  case 1:
532
- collectExternalReferencesInTopLevelRule(t, n);
535
+ be(t, n);
533
536
  break;
534
537
  case 2:
535
- collectExternalReferencesInTopLevelRepositoryRule(a.ruleName, {
538
+ ye(a.ruleName, {
536
539
  ...t,
537
540
  repository: e
538
541
  }, n);
@@ -546,46 +549,46 @@ function collectExternalReferencesInRules(e, t, n) {
546
549
  selfGrammar: r,
547
550
  repository: e
548
551
  };
549
- a.kind === 4 ? collectExternalReferencesInTopLevelRepositoryRule(a.ruleName, i, n) : collectExternalReferencesInTopLevelRule(i, n);
550
- } else a.kind === 4 ? n.add(new TopLevelRepositoryRuleReference(a.scopeName, a.ruleName)) : n.add(new TopLevelRuleReference(a.scopeName));
552
+ a.kind === 4 ? ye(a.ruleName, i, n) : be(i, n);
553
+ } else a.kind === 4 ? n.add(new he(a.scopeName, a.ruleName)) : n.add(new b(a.scopeName));
551
554
  break;
552
555
  }
553
556
  }
554
557
  }
555
- var BaseReference = class {
558
+ var Se = class {
556
559
  kind = 0;
557
- }, SelfReference = class {
560
+ }, Ce = class {
558
561
  kind = 1;
559
- }, RelativeReference = class {
562
+ }, we = class {
560
563
  constructor(e) {
561
564
  this.ruleName = e;
562
565
  }
563
566
  kind = 2;
564
- }, TopLevelReference = class {
567
+ }, Te = class {
565
568
  constructor(e) {
566
569
  this.scopeName = e;
567
570
  }
568
571
  kind = 3;
569
- }, TopLevelRepositoryReference = class {
572
+ }, Ee = class {
570
573
  constructor(e, t) {
571
574
  this.scopeName = e, this.ruleName = t;
572
575
  }
573
576
  kind = 4;
574
577
  };
575
- function parseInclude(e) {
576
- if (e === "$base") return new BaseReference();
577
- if (e === "$self") return new SelfReference();
578
+ function De(e) {
579
+ if (e === "$base") return new Se();
580
+ if (e === "$self") return new Ce();
578
581
  let t = e.indexOf("#");
579
- return t === -1 ? new TopLevelReference(e) : t === 0 ? new RelativeReference(e.substring(1)) : new TopLevelRepositoryReference(e.substring(0, t), e.substring(t + 1));
582
+ return t === -1 ? new Te(e) : t === 0 ? new we(e.substring(1)) : new Ee(e.substring(0, t), e.substring(t + 1));
580
583
  }
581
- var HAS_BACK_REFERENCES = /\\(\d+)/, BACK_REFERENCING_END = /\\(\d+)/g, endRuleId = -1, whileRuleId = -2;
582
- function ruleIdFromNumber(e) {
584
+ var Oe = /\\(\d+)/, ke = /\\(\d+)/g, Ae = -1, je = -2;
585
+ function Me(e) {
583
586
  return e;
584
587
  }
585
- function ruleIdToNumber(e) {
588
+ function Ne(e) {
586
589
  return e;
587
590
  }
588
- var Rule = class {
591
+ var x = class {
589
592
  $location;
590
593
  id;
591
594
  _nameIsCapturing;
@@ -593,19 +596,19 @@ var Rule = class {
593
596
  _contentNameIsCapturing;
594
597
  _contentName;
595
598
  constructor(e, t, n, r) {
596
- this.$location = e, this.id = t, this._name = n || null, this._nameIsCapturing = RegexSource.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);
599
+ this.$location = e, this.id = t, this._name = n || null, this._nameIsCapturing = l.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = l.hasCaptures(this._contentName);
597
600
  }
598
601
  get debugName() {
599
- let e = this.$location ? `${basename(this.$location.filename)}:${this.$location.line}` : "unknown";
602
+ let e = this.$location ? `${s(this.$location.filename)}:${this.$location.line}` : "unknown";
600
603
  return `${this.constructor.name}#${this.id} @ ${e}`;
601
604
  }
602
605
  getName(e, t) {
603
- return !this._nameIsCapturing || this._name === null || e === null || t === null ? this._name : RegexSource.replaceCaptures(this._name, e, t);
606
+ return !this._nameIsCapturing || this._name === null || e === null || t === null ? this._name : l.replaceCaptures(this._name, e, t);
604
607
  }
605
608
  getContentName(e, t) {
606
- return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : RegexSource.replaceCaptures(this._contentName, e, t);
609
+ return !this._contentNameIsCapturing || this._contentName === null ? this._contentName : l.replaceCaptures(this._contentName, e, t);
607
610
  }
608
- }, CaptureRule = class extends Rule {
611
+ }, Pe = class extends x {
609
612
  retokenizeCapturedWithRuleId;
610
613
  constructor(e, t, n, r, i) {
611
614
  super(e, t, n, r), this.retokenizeCapturedWithRuleId = i;
@@ -620,12 +623,12 @@ var Rule = class {
620
623
  compileAG(e, t, n, r) {
621
624
  throw Error("Not supported!");
622
625
  }
623
- }, MatchRule = class extends Rule {
626
+ }, Fe = class extends x {
624
627
  _match;
625
628
  captures;
626
629
  _cachedCompiledPatterns;
627
630
  constructor(e, t, n, r, i) {
628
- super(e, t, n, null), this._match = new RegExpSource(r, this.id), this.captures = i, this._cachedCompiledPatterns = null;
631
+ super(e, t, n, null), this._match = new C(r, this.id), this.captures = i, this._cachedCompiledPatterns = null;
629
632
  }
630
633
  dispose() {
631
634
  this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null);
@@ -643,9 +646,9 @@ var Rule = class {
643
646
  return this._getCachedCompiledPatterns(e).compileAG(e, n, r);
644
647
  }
645
648
  _getCachedCompiledPatterns(e) {
646
- return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new RegExpSourceList(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
649
+ return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new w(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
647
650
  }
648
- }, IncludeOnlyRule = class extends Rule {
651
+ }, Ie = class extends x {
649
652
  hasMissingPatterns;
650
653
  patterns;
651
654
  _cachedCompiledPatterns;
@@ -665,9 +668,9 @@ var Rule = class {
665
668
  return this._getCachedCompiledPatterns(e).compileAG(e, n, r);
666
669
  }
667
670
  _getCachedCompiledPatterns(e) {
668
- return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new RegExpSourceList(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
671
+ return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new w(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
669
672
  }
670
- }, BeginEndRule = class extends Rule {
673
+ }, Le = class extends x {
671
674
  _begin;
672
675
  beginCaptures;
673
676
  _end;
@@ -678,7 +681,7 @@ var Rule = class {
678
681
  patterns;
679
682
  _cachedCompiledPatterns;
680
683
  constructor(e, t, n, r, i, a, o, s, c, l) {
681
- super(e, t, n, r), this._begin = new RegExpSource(i, this.id), this.beginCaptures = a, this._end = new RegExpSource(o || "￿", -1), this.endHasBackReferences = this._end.hasBackReferences, this.endCaptures = s, this.applyEndPatternLast = c || !1, this.patterns = l.patterns, this.hasMissingPatterns = l.hasMissingPatterns, this._cachedCompiledPatterns = null;
684
+ super(e, t, n, r), this._begin = new C(i, this.id), this.beginCaptures = a, this._end = new C(o || "￿", -1), this.endHasBackReferences = this._end.hasBackReferences, this.endCaptures = s, this.applyEndPatternLast = c || !1, this.patterns = l.patterns, this.hasMissingPatterns = l.hasMissingPatterns, this._cachedCompiledPatterns = null;
682
685
  }
683
686
  dispose() {
684
687
  this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null);
@@ -703,13 +706,13 @@ var Rule = class {
703
706
  }
704
707
  _getCachedCompiledPatterns(e, t) {
705
708
  if (!this._cachedCompiledPatterns) {
706
- this._cachedCompiledPatterns = new RegExpSourceList();
709
+ this._cachedCompiledPatterns = new w();
707
710
  for (let t of this.patterns) e.getRule(t).collectPatterns(e, this._cachedCompiledPatterns);
708
711
  this.applyEndPatternLast ? this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end) : this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);
709
712
  }
710
713
  return this._end.hasBackReferences && (this.applyEndPatternLast ? this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, t) : this._cachedCompiledPatterns.setSource(0, t)), this._cachedCompiledPatterns;
711
714
  }
712
- }, BeginWhileRule = class extends Rule {
715
+ }, S = class extends x {
713
716
  _begin;
714
717
  beginCaptures;
715
718
  whileCaptures;
@@ -720,7 +723,7 @@ var Rule = class {
720
723
  _cachedCompiledPatterns;
721
724
  _cachedCompiledWhilePatterns;
722
725
  constructor(e, t, n, r, i, a, o, s, c) {
723
- super(e, t, n, r), this._begin = new RegExpSource(i, this.id), this.beginCaptures = a, this.whileCaptures = s, this._while = new RegExpSource(o, whileRuleId), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = c.patterns, this.hasMissingPatterns = c.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
726
+ super(e, t, n, r), this._begin = new C(i, this.id), this.beginCaptures = a, this.whileCaptures = s, this._while = new C(o, je), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = c.patterns, this.hasMissingPatterns = c.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
724
727
  }
725
728
  dispose() {
726
729
  this._cachedCompiledPatterns &&= (this._cachedCompiledPatterns.dispose(), null), this._cachedCompiledWhilePatterns &&= (this._cachedCompiledWhilePatterns.dispose(), null);
@@ -745,7 +748,7 @@ var Rule = class {
745
748
  }
746
749
  _getCachedCompiledPatterns(e) {
747
750
  if (!this._cachedCompiledPatterns) {
748
- this._cachedCompiledPatterns = new RegExpSourceList();
751
+ this._cachedCompiledPatterns = new w();
749
752
  for (let t of this.patterns) e.getRule(t).collectPatterns(e, this._cachedCompiledPatterns);
750
753
  }
751
754
  return this._cachedCompiledPatterns;
@@ -757,21 +760,21 @@ var Rule = class {
757
760
  return this._getCachedCompiledWhilePatterns(e, t).compileAG(e, n, r);
758
761
  }
759
762
  _getCachedCompiledWhilePatterns(e, t) {
760
- return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new RegExpSourceList(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, t || "￿"), this._cachedCompiledWhilePatterns;
763
+ return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new w(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, t || "￿"), this._cachedCompiledWhilePatterns;
761
764
  }
762
- }, RuleFactory = class e {
765
+ }, Re = class e {
763
766
  static createCaptureRule(e, t, n, r, i) {
764
- return e.registerRule((e) => new CaptureRule(t, e, n, r, i));
767
+ return e.registerRule((e) => new Pe(t, e, n, r, i));
765
768
  }
766
769
  static getCompiledRuleId(t, n, r) {
767
770
  return t.id || n.registerRule((i) => {
768
- if (t.id = i, t.match) return new MatchRule(t.$vscodeTextmateLocation, t.id, t.name, t.match, e._compileCaptures(t.captures, n, r));
771
+ if (t.id = i, t.match) return new Fe(t.$vscodeTextmateLocation, t.id, t.name, t.match, e._compileCaptures(t.captures, n, r));
769
772
  if (t.begin === void 0) {
770
- t.repository && (r = mergeObjects({}, r, t.repository));
773
+ t.repository && (r = o({}, r, t.repository));
771
774
  let i = t.patterns;
772
- return i === void 0 && t.include && (i = [{ include: t.include }]), new IncludeOnlyRule(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, e._compilePatterns(i, n, r));
775
+ return i === void 0 && t.include && (i = [{ include: t.include }]), new Ie(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, e._compilePatterns(i, n, r));
773
776
  }
774
- return t.while ? new BeginWhileRule(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, t.begin, e._compileCaptures(t.beginCaptures || t.captures, n, r), t.while, e._compileCaptures(t.whileCaptures || t.captures, n, r), e._compilePatterns(t.patterns, n, r)) : new BeginEndRule(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, t.begin, e._compileCaptures(t.beginCaptures || t.captures, n, r), t.end, e._compileCaptures(t.endCaptures || t.captures, n, r), t.applyEndPatternLast, e._compilePatterns(t.patterns, n, r));
777
+ return t.while ? new S(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, t.begin, e._compileCaptures(t.beginCaptures || t.captures, n, r), t.while, e._compileCaptures(t.whileCaptures || t.captures, n, r), e._compilePatterns(t.patterns, n, r)) : new Le(t.$vscodeTextmateLocation, t.id, t.name, t.contentName, t.begin, e._compileCaptures(t.beginCaptures || t.captures, n, r), t.end, e._compileCaptures(t.endCaptures || t.captures, n, r), t.applyEndPatternLast, e._compilePatterns(t.patterns, n, r));
775
778
  }), t.id;
776
779
  }
777
780
  static _compileCaptures(t, n, r) {
@@ -797,7 +800,7 @@ var Rule = class {
797
800
  if (t) for (let a = 0, o = t.length; a < o; a++) {
798
801
  let o = t[a], s = -1;
799
802
  if (o.include) {
800
- let t = parseInclude(o.include);
803
+ let t = De(o.include);
801
804
  switch (t.kind) {
802
805
  case 0:
803
806
  case 1:
@@ -819,7 +822,7 @@ var Rule = class {
819
822
  } else s = e.getCompiledRuleId(o, n, r);
820
823
  if (s !== -1) {
821
824
  let e = n.getRule(s), t = !1;
822
- if ((e instanceof IncludeOnlyRule || e instanceof BeginEndRule || e instanceof BeginWhileRule) && e.hasMissingPatterns && e.patterns.length === 0 && (t = !0), t) continue;
825
+ if ((e instanceof Ie || e instanceof Le || e instanceof S) && e.hasMissingPatterns && e.patterns.length === 0 && (t = !0), t) continue;
823
826
  i.push(s);
824
827
  }
825
828
  }
@@ -828,7 +831,7 @@ var Rule = class {
828
831
  hasMissingPatterns: (t ? t.length : 0) !== i.length
829
832
  };
830
833
  }
831
- }, RegExpSource = class e {
834
+ }, C = class e {
832
835
  source;
833
836
  ruleId;
834
837
  hasAnchor;
@@ -843,7 +846,7 @@ var Rule = class {
843
846
  }
844
847
  this.hasAnchor = i, n === 0 ? this.source = e : (r.push(e.substring(n, t)), this.source = r.join(""));
845
848
  } else this.hasAnchor = !1, this.source = e;
846
- this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = t, typeof this.source == "string" ? this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source) : this.hasBackReferences = !1;
849
+ this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = t, typeof this.source == "string" ? this.hasBackReferences = Oe.test(this.source) : this.hasBackReferences = !1;
847
850
  }
848
851
  clone() {
849
852
  return new e(this.source, this.ruleId);
@@ -854,7 +857,7 @@ var Rule = class {
854
857
  resolveBackReferences(e, t) {
855
858
  if (typeof this.source != "string") throw Error("This method should only be called if the source is a string");
856
859
  let n = t.map((t) => e.substring(t.start, t.end));
857
- return BACK_REFERENCING_END.lastIndex = 0, this.source.replace(BACK_REFERENCING_END, (e, t) => escapeRegExpCharacters(n[parseInt(t, 10)] || ""));
860
+ return ke.lastIndex = 0, this.source.replace(ke, (e, t) => p(n[parseInt(t, 10)] || ""));
858
861
  }
859
862
  _buildAnchorCache() {
860
863
  if (typeof this.source != "string") throw Error("This method should only be called if the source is a string");
@@ -870,7 +873,7 @@ var Rule = class {
870
873
  resolveAnchors(e, t) {
871
874
  return !this.hasAnchor || !this._anchorCache || typeof this.source != "string" ? this.source : e ? t ? this._anchorCache.A1_G1 : this._anchorCache.A1_G0 : t ? this._anchorCache.A0_G1 : this._anchorCache.A0_G0;
872
875
  }
873
- }, RegExpSourceList = class {
876
+ }, w = class {
874
877
  _items;
875
878
  _hasAnchors;
876
879
  _cached;
@@ -902,15 +905,15 @@ var Rule = class {
902
905
  this._items[e].source !== t && (this._disposeCaches(), this._items[e].setSource(t));
903
906
  }
904
907
  compile(e) {
905
- return this._cached ||= new CompiledRule(e, this._items.map((e) => e.source), this._items.map((e) => e.ruleId)), this._cached;
908
+ return this._cached ||= new ze(e, this._items.map((e) => e.source), this._items.map((e) => e.ruleId)), this._cached;
906
909
  }
907
910
  compileAG(e, t, n) {
908
911
  return this._hasAnchors ? t ? n ? (this._anchorCache.A1_G1 || (this._anchorCache.A1_G1 = this._resolveAnchors(e, t, n)), this._anchorCache.A1_G1) : (this._anchorCache.A1_G0 || (this._anchorCache.A1_G0 = this._resolveAnchors(e, t, n)), this._anchorCache.A1_G0) : n ? (this._anchorCache.A0_G1 || (this._anchorCache.A0_G1 = this._resolveAnchors(e, t, n)), this._anchorCache.A0_G1) : (this._anchorCache.A0_G0 || (this._anchorCache.A0_G0 = this._resolveAnchors(e, t, n)), this._anchorCache.A0_G0) : this.compile(e);
909
912
  }
910
913
  _resolveAnchors(e, t, n) {
911
- return new CompiledRule(e, this._items.map((e) => e.resolveAnchors(t, n)), this._items.map((e) => e.ruleId));
914
+ return new ze(e, this._items.map((e) => e.resolveAnchors(t, n)), this._items.map((e) => e.ruleId));
912
915
  }
913
- }, CompiledRule = class {
916
+ }, ze = class {
914
917
  constructor(e, t, n) {
915
918
  this.regExps = t, this.rules = n, this.scanner = e.createOnigScanner(t);
916
919
  }
@@ -930,15 +933,15 @@ var Rule = class {
930
933
  captureIndices: r.captureIndices
931
934
  } : null;
932
935
  }
933
- }, BasicScopeAttributes = class {
936
+ }, Be = class {
934
937
  constructor(e, t) {
935
938
  this.languageId = e, this.tokenType = t;
936
939
  }
937
- }, BasicScopeAttributesProvider = class e {
940
+ }, Ve = class e {
938
941
  _defaultAttributes;
939
942
  _embeddedLanguagesMatcher;
940
943
  constructor(e, t) {
941
- this._defaultAttributes = new BasicScopeAttributes(e, 8), this._embeddedLanguagesMatcher = new ScopeMatcher(Object.entries(t || {}));
944
+ this._defaultAttributes = new Be(e, 8), this._embeddedLanguagesMatcher = new He(Object.entries(t || {}));
942
945
  }
943
946
  getDefaultAttributes() {
944
947
  return this._defaultAttributes;
@@ -946,8 +949,8 @@ var Rule = class {
946
949
  getBasicScopeAttributes(t) {
947
950
  return t === null ? e._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(t);
948
951
  }
949
- static _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);
950
- _getBasicScopeAttributes = new CachedFn((e) => new BasicScopeAttributes(this._scopeToLanguage(e), this._toStandardTokenType(e)));
952
+ static _NULL_SCOPE_METADATA = new Be(0, 0);
953
+ _getBasicScopeAttributes = new m((e) => new Be(this._scopeToLanguage(e), this._toStandardTokenType(e)));
951
954
  _scopeToLanguage(e) {
952
955
  return this._embeddedLanguagesMatcher.match(e) || 0;
953
956
  }
@@ -963,14 +966,14 @@ var Rule = class {
963
966
  throw Error("Unexpected match for standard token type!");
964
967
  }
965
968
  static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
966
- }, ScopeMatcher = class {
969
+ }, He = class {
967
970
  values;
968
971
  scopesRegExp;
969
972
  constructor(e) {
970
973
  if (e.length === 0) this.values = null, this.scopesRegExp = null;
971
974
  else {
972
975
  this.values = new Map(e);
973
- let t = e.map(([e, t]) => escapeRegExpCharacters(e));
976
+ let t = e.map(([e, t]) => p(e));
974
977
  t.sort(), t.reverse(), this.scopesRegExp = RegExp(`^((${t.join(")|(")}))($|\\.)`, "");
975
978
  }
976
979
  }
@@ -981,33 +984,33 @@ var Rule = class {
981
984
  }
982
985
  };
983
986
  typeof process < "u" && process.env.VSCODE_TEXTMATE_DEBUG;
984
- var UseOnigurumaFindOptions = !1, TokenizeStringResult = class {
987
+ var Ue = !1, We = class {
985
988
  constructor(e, t) {
986
989
  this.stack = e, this.stoppedEarly = t;
987
990
  }
988
991
  };
989
- function _tokenizeString(e, t, n, r, i, a, o, s) {
992
+ function Ge(e, t, n, r, i, a, o, s) {
990
993
  let c = t.content.length, l = !1, u = -1;
991
994
  if (o) {
992
- let o = _checkWhileConditions(e, t, n, r, i, a);
995
+ let o = Ke(e, t, n, r, i, a);
993
996
  i = o.stack, r = o.linePos, n = o.isFirstLine, u = o.anchorPosition;
994
997
  }
995
998
  let d = Date.now();
996
999
  for (; !l;) {
997
- if (s !== 0 && Date.now() - d > s) return new TokenizeStringResult(i, !0);
1000
+ if (s !== 0 && Date.now() - d > s) return new We(i, !0);
998
1001
  f();
999
1002
  }
1000
- return new TokenizeStringResult(i, !1);
1003
+ return new We(i, !1);
1001
1004
  function f() {
1002
- let o = matchRuleOrInjections(e, t, n, r, i, u);
1005
+ let o = qe(e, t, n, r, i, u);
1003
1006
  if (!o) {
1004
1007
  a.produce(i, c), l = !0;
1005
1008
  return;
1006
1009
  }
1007
1010
  let s = o.captureIndices, d = o.matchedRuleId, f = s && s.length > 0 ? s[0].end > r : !1;
1008
- if (d === endRuleId) {
1011
+ if (d === Ae) {
1009
1012
  let o = i.getRule(e);
1010
- a.produce(i, s[0].start), i = i.withContentNameScopesList(i.nameScopesList), handleCaptures(e, t, n, i, a, o.endCaptures, s), a.produce(i, s[0].end);
1013
+ a.produce(i, s[0].start), i = i.withContentNameScopesList(i.nameScopesList), T(e, t, n, i, a, o.endCaptures, s), a.produce(i, s[0].end);
1011
1014
  let d = i;
1012
1015
  if (i = i.parent, u = d.getAnchorPos(), !f && d.getEnterPos() === r) {
1013
1016
  i = d, a.produce(i, c), l = !0;
@@ -1016,24 +1019,24 @@ function _tokenizeString(e, t, n, r, i, a, o, s) {
1016
1019
  } else {
1017
1020
  let o = e.getRule(d);
1018
1021
  a.produce(i, s[0].start);
1019
- let m = i, h = o.getName(t.content, s), g = i.contentNameScopesList.pushAttributed(h, e);
1020
- if (i = i.push(d, r, u, s[0].end === c, null, g, g), o instanceof BeginEndRule) {
1022
+ let p = i, m = o.getName(t.content, s), h = i.contentNameScopesList.pushAttributed(m, e);
1023
+ if (i = i.push(d, r, u, s[0].end === c, null, h, h), o instanceof Le) {
1021
1024
  let r = o;
1022
- handleCaptures(e, t, n, i, a, r.beginCaptures, s), a.produce(i, s[0].end), u = s[0].end;
1023
- let d = r.getContentName(t.content, s), h = g.pushAttributed(d, e);
1024
- if (i = i.withContentNameScopesList(h), r.endHasBackReferences && (i = i.withEndRule(r.getEndWithResolvedBackReferences(t.content, s))), !f && m.hasSameRuleAs(i)) {
1025
+ T(e, t, n, i, a, r.beginCaptures, s), a.produce(i, s[0].end), u = s[0].end;
1026
+ let d = r.getContentName(t.content, s), m = h.pushAttributed(d, e);
1027
+ if (i = i.withContentNameScopesList(m), r.endHasBackReferences && (i = i.withEndRule(r.getEndWithResolvedBackReferences(t.content, s))), !f && p.hasSameRuleAs(i)) {
1025
1028
  i = i.pop(), a.produce(i, c), l = !0;
1026
1029
  return;
1027
1030
  }
1028
- } else if (o instanceof BeginWhileRule) {
1031
+ } else if (o instanceof S) {
1029
1032
  let r = o;
1030
- handleCaptures(e, t, n, i, a, r.beginCaptures, s), a.produce(i, s[0].end), u = s[0].end;
1031
- let d = r.getContentName(t.content, s), h = g.pushAttributed(d, e);
1032
- if (i = i.withContentNameScopesList(h), r.whileHasBackReferences && (i = i.withEndRule(r.getWhileWithResolvedBackReferences(t.content, s))), !f && m.hasSameRuleAs(i)) {
1033
+ T(e, t, n, i, a, r.beginCaptures, s), a.produce(i, s[0].end), u = s[0].end;
1034
+ let d = r.getContentName(t.content, s), m = h.pushAttributed(d, e);
1035
+ if (i = i.withContentNameScopesList(m), r.whileHasBackReferences && (i = i.withEndRule(r.getWhileWithResolvedBackReferences(t.content, s))), !f && p.hasSameRuleAs(i)) {
1033
1036
  i = i.pop(), a.produce(i, c), l = !0;
1034
1037
  return;
1035
1038
  }
1036
- } else if (handleCaptures(e, t, n, i, a, o.captures, s), a.produce(i, s[0].end), i = i.pop(), !f) {
1039
+ } else if (T(e, t, n, i, a, o.captures, s), a.produce(i, s[0].end), i = i.pop(), !f) {
1037
1040
  i = i.safePop(), a.produce(i, c), l = !0;
1038
1041
  return;
1039
1042
  }
@@ -1041,23 +1044,23 @@ function _tokenizeString(e, t, n, r, i, a, o, s) {
1041
1044
  s[0].end > r && (r = s[0].end, n = !1);
1042
1045
  }
1043
1046
  }
1044
- function _checkWhileConditions(e, t, n, r, i, a) {
1047
+ function Ke(e, t, n, r, i, a) {
1045
1048
  let o = i.beginRuleCapturedEOL ? 0 : -1, s = [];
1046
1049
  for (let t = i; t; t = t.pop()) {
1047
1050
  let n = t.getRule(e);
1048
- n instanceof BeginWhileRule && s.push({
1051
+ n instanceof S && s.push({
1049
1052
  rule: n,
1050
1053
  stack: t
1051
1054
  });
1052
1055
  }
1053
1056
  for (let c = s.pop(); c; c = s.pop()) {
1054
- let { ruleScanner: s, findOptions: l } = prepareRuleWhileSearch(c.rule, e, c.stack.endRule, n, r === o), u = s.findNextMatchSync(t, r, l);
1057
+ let { ruleScanner: s, findOptions: l } = Ze(c.rule, e, c.stack.endRule, n, r === o), u = s.findNextMatchSync(t, r, l);
1055
1058
  if (u) {
1056
- if (u.ruleId !== whileRuleId) {
1059
+ if (u.ruleId !== je) {
1057
1060
  i = c.stack.pop();
1058
1061
  break;
1059
1062
  }
1060
- u.captureIndices && u.captureIndices.length && (a.produce(c.stack, u.captureIndices[0].start), handleCaptures(e, t, n, c.stack, a, c.rule.whileCaptures, u.captureIndices), a.produce(c.stack, u.captureIndices[0].end), o = u.captureIndices[0].end, u.captureIndices[0].end > r && (r = u.captureIndices[0].end, n = !1));
1063
+ u.captureIndices && u.captureIndices.length && (a.produce(c.stack, u.captureIndices[0].start), T(e, t, n, c.stack, a, c.rule.whileCaptures, u.captureIndices), a.produce(c.stack, u.captureIndices[0].end), o = u.captureIndices[0].end, u.captureIndices[0].end > r && (r = u.captureIndices[0].end, n = !1));
1061
1064
  } else {
1062
1065
  i = c.stack.pop();
1063
1066
  break;
@@ -1070,31 +1073,31 @@ function _checkWhileConditions(e, t, n, r, i, a) {
1070
1073
  isFirstLine: n
1071
1074
  };
1072
1075
  }
1073
- function matchRuleOrInjections(e, t, n, r, i, a) {
1074
- let o = matchRule(e, t, n, r, i, a), s = e.getInjections();
1076
+ function qe(e, t, n, r, i, a) {
1077
+ let o = Je(e, t, n, r, i, a), s = e.getInjections();
1075
1078
  if (s.length === 0) return o;
1076
- let c = matchInjections(s, e, t, n, r, i, a);
1079
+ let c = Ye(s, e, t, n, r, i, a);
1077
1080
  if (!c) return o;
1078
1081
  if (!o) return c;
1079
1082
  let l = o.captureIndices[0].start, u = c.captureIndices[0].start;
1080
1083
  return u < l || c.priorityMatch && u === l ? c : o;
1081
1084
  }
1082
- function matchRule(e, t, n, r, i, a) {
1083
- let { ruleScanner: o, findOptions: s } = prepareRuleSearch(i.getRule(e), e, i.endRule, n, r === a), c = o.findNextMatchSync(t, r, s);
1085
+ function Je(e, t, n, r, i, a) {
1086
+ let { ruleScanner: o, findOptions: s } = Xe(i.getRule(e), e, i.endRule, n, r === a), c = o.findNextMatchSync(t, r, s);
1084
1087
  return c ? {
1085
1088
  captureIndices: c.captureIndices,
1086
1089
  matchedRuleId: c.ruleId
1087
1090
  } : null;
1088
1091
  }
1089
- function matchInjections(e, t, n, r, i, a, o) {
1092
+ function Ye(e, t, n, r, i, a, o) {
1090
1093
  let s = Number.MAX_VALUE, c = null, l, u = 0, d = a.contentNameScopesList.getScopeNames();
1091
1094
  for (let a = 0, f = e.length; a < f; a++) {
1092
1095
  let f = e[a];
1093
1096
  if (!f.matcher(d)) continue;
1094
- let { ruleScanner: m, findOptions: h } = prepareRuleSearch(t.getRule(f.ruleId), t, null, r, i === o), g = m.findNextMatchSync(n, i, h);
1095
- if (!g) continue;
1096
- let _ = g.captureIndices[0].start;
1097
- if (!(_ >= s) && (s = _, c = g.captureIndices, l = g.ruleId, u = f.priority, s === i)) break;
1097
+ let { ruleScanner: p, findOptions: m } = Xe(t.getRule(f.ruleId), t, null, r, i === o), h = p.findNextMatchSync(n, i, m);
1098
+ if (!h) continue;
1099
+ let g = h.captureIndices[0].start;
1100
+ if (!(g >= s) && (s = g, c = h.captureIndices, l = h.ruleId, u = f.priority, s === i)) break;
1098
1101
  }
1099
1102
  return c ? {
1100
1103
  priorityMatch: u === -1,
@@ -1102,29 +1105,29 @@ function matchInjections(e, t, n, r, i, a, o) {
1102
1105
  matchedRuleId: l
1103
1106
  } : null;
1104
1107
  }
1105
- function prepareRuleSearch(e, t, n, r, i) {
1106
- return UseOnigurumaFindOptions ? {
1108
+ function Xe(e, t, n, r, i) {
1109
+ return Ue ? {
1107
1110
  ruleScanner: e.compile(t, n),
1108
- findOptions: getFindOptions(r, i)
1111
+ findOptions: Qe(r, i)
1109
1112
  } : {
1110
1113
  ruleScanner: e.compileAG(t, n, r, i),
1111
1114
  findOptions: 0
1112
1115
  };
1113
1116
  }
1114
- function prepareRuleWhileSearch(e, t, n, r, i) {
1115
- return UseOnigurumaFindOptions ? {
1117
+ function Ze(e, t, n, r, i) {
1118
+ return Ue ? {
1116
1119
  ruleScanner: e.compileWhile(t, n),
1117
- findOptions: getFindOptions(r, i)
1120
+ findOptions: Qe(r, i)
1118
1121
  } : {
1119
1122
  ruleScanner: e.compileWhileAG(t, n, r, i),
1120
1123
  findOptions: 0
1121
1124
  };
1122
1125
  }
1123
- function getFindOptions(e, t) {
1126
+ function Qe(e, t) {
1124
1127
  let n = 0;
1125
1128
  return e || (n |= 1), t || (n |= 4), n;
1126
1129
  }
1127
- function handleCaptures(e, t, n, r, i, a, o) {
1130
+ function T(e, t, n, r, i, a, o) {
1128
1131
  if (a.length === 0) return;
1129
1132
  let s = t.content, c = Math.min(a.length, o.length), l = [], u = o[0].end;
1130
1133
  for (let t = 0; t < c; t++) {
@@ -1135,30 +1138,30 @@ function handleCaptures(e, t, n, r, i, a, o) {
1135
1138
  if (d.start > u) break;
1136
1139
  for (; l.length > 0 && l[l.length - 1].endPos <= d.start;) i.produceFromScopes(l[l.length - 1].scopes, l[l.length - 1].endPos), l.pop();
1137
1140
  if (l.length > 0 ? i.produceFromScopes(l[l.length - 1].scopes, d.start) : i.produce(r, d.start), c.retokenizeCapturedWithRuleId) {
1138
- let t = c.getName(s, o), a = r.contentNameScopesList.pushAttributed(t, e), l = c.getContentName(s, o), u = a.pushAttributed(l, e), f = r.push(c.retokenizeCapturedWithRuleId, d.start, -1, !1, null, a, u), m = e.createOnigString(s.substring(0, d.end));
1139
- _tokenizeString(e, m, n && d.start === 0, d.start, f, i, !1, 0), disposeOnigString(m);
1141
+ let t = c.getName(s, o), a = r.contentNameScopesList.pushAttributed(t, e), l = c.getContentName(s, o), u = a.pushAttributed(l, e), f = r.push(c.retokenizeCapturedWithRuleId, d.start, -1, !1, null, a, u), p = e.createOnigString(s.substring(0, d.end));
1142
+ Ge(e, p, n && d.start === 0, d.start, f, i, !1, 0), me(p);
1140
1143
  continue;
1141
1144
  }
1142
1145
  let f = c.getName(s, o);
1143
1146
  if (f !== null) {
1144
1147
  let t = (l.length > 0 ? l[l.length - 1].scopes : r.contentNameScopesList).pushAttributed(f, e);
1145
- l.push(new LocalStackElement(t, d.end));
1148
+ l.push(new $e(t, d.end));
1146
1149
  }
1147
1150
  }
1148
1151
  for (; l.length > 0;) i.produceFromScopes(l[l.length - 1].scopes, l[l.length - 1].endPos), l.pop();
1149
1152
  }
1150
- var LocalStackElement = class {
1153
+ var $e = class {
1151
1154
  scopes;
1152
1155
  endPos;
1153
1156
  constructor(e, t) {
1154
1157
  this.scopes = e, this.endPos = t;
1155
1158
  }
1156
1159
  };
1157
- function createGrammar(e, t, n, r, i, a, o, s) {
1158
- return new Grammar(e, t, n, r, i, a, o, s);
1160
+ function et(e, t, n, r, i, a, o, s) {
1161
+ return new it(e, t, n, r, i, a, o, s);
1159
1162
  }
1160
- function collectInjections(e, t, n, r, i) {
1161
- let a = createMatchers(t, nameMatcher), o = RuleFactory.getCompiledRuleId(n, r, i.repository);
1163
+ function tt(e, t, n, r, i) {
1164
+ let a = de(t, nt), o = Re.getCompiledRuleId(n, r, i.repository);
1162
1165
  for (let n of a) e.push({
1163
1166
  debugSelector: t,
1164
1167
  matcher: n.matcher,
@@ -1167,24 +1170,24 @@ function collectInjections(e, t, n, r, i) {
1167
1170
  priority: n.priority
1168
1171
  });
1169
1172
  }
1170
- function nameMatcher(e, t) {
1173
+ function nt(e, t) {
1171
1174
  if (t.length < e.length) return !1;
1172
1175
  let n = 0;
1173
1176
  return e.every((e) => {
1174
- for (let r = n; r < t.length; r++) if (scopesAreMatching(t[r], e)) return n = r + 1, !0;
1177
+ for (let r = n; r < t.length; r++) if (rt(t[r], e)) return n = r + 1, !0;
1175
1178
  return !1;
1176
1179
  });
1177
1180
  }
1178
- function scopesAreMatching(e, t) {
1181
+ function rt(e, t) {
1179
1182
  if (!e) return !1;
1180
1183
  if (e === t) return !0;
1181
1184
  let n = t.length;
1182
1185
  return e.length > n && e.substr(0, n) === t && e[n] === ".";
1183
1186
  }
1184
- var Grammar = class {
1187
+ var it = class {
1185
1188
  constructor(e, t, n, r, i, a, o, s) {
1186
- if (this._rootScopeName = e, this.balancedBracketSelectors = a, this._onigLib = s, this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(n, r), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = o, this._grammar = initGrammar(t, null), this._injections = null, this._tokenTypeMatchers = [], i) for (let e of Object.keys(i)) {
1187
- let t = createMatchers(e, nameMatcher);
1189
+ if (this._rootScopeName = e, this.balancedBracketSelectors = a, this._onigLib = s, this._basicScopeAttributesProvider = new Ve(n, r), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = o, this._grammar = at(t, null), this._injections = null, this._tokenTypeMatchers = [], i) for (let e of Object.keys(i)) {
1190
+ let t = de(e, nt);
1188
1191
  for (let n of t) this._tokenTypeMatchers.push({
1189
1192
  matcher: n.matcher,
1190
1193
  type: i[e]
@@ -1222,13 +1225,13 @@ var Grammar = class {
1222
1225
  }, t = [], n = this._rootScopeName, r = e.lookup(n);
1223
1226
  if (r) {
1224
1227
  let e = r.injections;
1225
- if (e) for (let n in e) collectInjections(t, n, e[n], this, r);
1228
+ if (e) for (let n in e) tt(t, n, e[n], this, r);
1226
1229
  let i = this._grammarRepository.injections(n);
1227
1230
  i && i.forEach((e) => {
1228
1231
  let n = this.getExternalGrammar(e);
1229
1232
  if (n) {
1230
1233
  let e = n.injectionSelector;
1231
- e && collectInjections(t, e, n, this, n);
1234
+ e && tt(t, e, n, this, n);
1232
1235
  }
1233
1236
  });
1234
1237
  }
@@ -1238,17 +1241,17 @@ var Grammar = class {
1238
1241
  return this._injections === null && (this._injections = this._collectInjections()), this._injections;
1239
1242
  }
1240
1243
  registerRule(e) {
1241
- let t = ++this._lastRuleId, n = e(ruleIdFromNumber(t));
1244
+ let t = ++this._lastRuleId, n = e(Me(t));
1242
1245
  return this._ruleId2desc[t] = n, n;
1243
1246
  }
1244
1247
  getRule(e) {
1245
- return this._ruleId2desc[ruleIdToNumber(e)];
1248
+ return this._ruleId2desc[Ne(e)];
1246
1249
  }
1247
1250
  getExternalGrammar(e, t) {
1248
1251
  if (this._includedGrammars[e]) return this._includedGrammars[e];
1249
1252
  if (this._grammarRepository) {
1250
1253
  let n = this._grammarRepository.lookup(e);
1251
- if (n) return this._includedGrammars[e] = initGrammar(n, t && t.$base), this._includedGrammars[e];
1254
+ if (n) return this._includedGrammars[e] = at(n, t && t.$base), this._includedGrammars[e];
1252
1255
  }
1253
1256
  }
1254
1257
  tokenizeLine(e, t, n = 0) {
@@ -1268,16 +1271,16 @@ var Grammar = class {
1268
1271
  };
1269
1272
  }
1270
1273
  _tokenize(e, t, n, r) {
1271
- this._rootId === -1 && (this._rootId = RuleFactory.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository), this.getInjections());
1274
+ this._rootId === -1 && (this._rootId = Re.getCompiledRuleId(this._grammar.repository.$self, this, this._grammar.repository), this.getInjections());
1272
1275
  let i;
1273
- if (!t || t === StateStackImpl.NULL) {
1276
+ if (!t || t === ot.NULL) {
1274
1277
  i = !0;
1275
- let e = this._basicScopeAttributesProvider.getDefaultAttributes(), n = this.themeProvider.getDefaults(), r = EncodedTokenMetadata.set(0, e.languageId, e.tokenType, null, n.fontStyle, n.foregroundId, n.backgroundId), a = this.getRule(this._rootId).getName(null, null), o;
1276
- o = a ? AttributedScopeStack.createRootAndLookUpScopeName(a, r, this) : AttributedScopeStack.createRoot("unknown", r), t = new StateStackImpl(null, this._rootId, -1, -1, !1, null, o, o);
1278
+ let e = this._basicScopeAttributesProvider.getDefaultAttributes(), n = this.themeProvider.getDefaults(), r = y.set(0, e.languageId, e.tokenType, null, n.fontStyle, n.foregroundId, n.backgroundId), a = this.getRule(this._rootId).getName(null, null), o;
1279
+ o = a ? E.createRootAndLookUpScopeName(a, r, this) : E.createRoot("unknown", r), t = new ot(null, this._rootId, -1, -1, !1, null, o, o);
1277
1280
  } else i = !1, t.reset();
1278
1281
  e += "\n";
1279
- let a = this.createOnigString(e), o = a.content.length, s = new LineTokens(n, e, this._tokenTypeMatchers, this.balancedBracketSelectors), c = _tokenizeString(this, a, i, 0, t, s, !0, r);
1280
- return disposeOnigString(a), {
1282
+ let a = this.createOnigString(e), o = a.content.length, s = new ct(n, e, this._tokenTypeMatchers, this.balancedBracketSelectors), c = Ge(this, a, i, 0, t, s, !0, r);
1283
+ return me(a), {
1281
1284
  lineLength: o,
1282
1285
  lineTokens: s,
1283
1286
  ruleStack: c.stack,
@@ -1285,27 +1288,27 @@ var Grammar = class {
1285
1288
  };
1286
1289
  }
1287
1290
  };
1288
- function initGrammar(e, t) {
1289
- return e = clone(e), e.repository = e.repository || {}, e.repository.$self = {
1291
+ function at(e, t) {
1292
+ return e = n(e), e.repository = e.repository || {}, e.repository.$self = {
1290
1293
  $vscodeTextmateLocation: e.$vscodeTextmateLocation,
1291
1294
  patterns: e.patterns,
1292
1295
  name: e.scopeName
1293
1296
  }, e.repository.$base = t || e.repository.$self, e;
1294
1297
  }
1295
- var AttributedScopeStack = class e {
1298
+ var E = class e {
1296
1299
  constructor(e, t, n) {
1297
1300
  this.parent = e, this.scopePath = t, this.tokenAttributes = n;
1298
1301
  }
1299
1302
  static fromExtension(t, n) {
1300
1303
  let r = t, i = t?.scopePath ?? null;
1301
- for (let t of n) i = ScopeStack.push(i, t.scopeNames), r = new e(r, i, t.encodedTokenAttributes);
1304
+ for (let t of n) i = g.push(i, t.scopeNames), r = new e(r, i, t.encodedTokenAttributes);
1302
1305
  return r;
1303
1306
  }
1304
1307
  static createRoot(t, n) {
1305
- return new e(null, new ScopeStack(null, t), n);
1308
+ return new e(null, new g(null, t), n);
1306
1309
  }
1307
1310
  static createRootAndLookUpScopeName(t, n, r) {
1308
- let i = r.getMetadataForScope(t), a = new ScopeStack(null, t), o = r.themeProvider.themeMatch(a);
1311
+ let i = r.getMetadataForScope(t), a = new g(null, t), o = r.themeProvider.themeMatch(a);
1309
1312
  return new e(null, a, e.mergeAttributes(n, i, o));
1310
1313
  }
1311
1314
  get scopeName() {
@@ -1326,7 +1329,7 @@ var AttributedScopeStack = class e {
1326
1329
  }
1327
1330
  static mergeAttributes(e, t, n) {
1328
1331
  let r = -1, i = 0, a = 0;
1329
- return n !== null && (r = n.fontStyle, i = n.foregroundId, a = n.backgroundId), EncodedTokenMetadata.set(e, t.languageId, t.tokenType, null, r, i, a);
1332
+ return n !== null && (r = n.fontStyle, i = n.foregroundId, a = n.backgroundId), y.set(e, t.languageId, t.tokenType, null, r, i, a);
1330
1333
  }
1331
1334
  pushAttributed(t, n) {
1332
1335
  if (t === null) return this;
@@ -1350,7 +1353,7 @@ var AttributedScopeStack = class e {
1350
1353
  }), n = n.parent;
1351
1354
  return n === e ? t.reverse() : void 0;
1352
1355
  }
1353
- }, StateStackImpl = class e {
1356
+ }, ot = class e {
1354
1357
  constructor(e, t, n, r, i, a, o, s) {
1355
1358
  this.parent = e, this.ruleId = t, this.beginRuleCapturedEOL = i, this.endRule = a, this.nameScopesList = o, this.contentNameScopesList = s, this.depth = this.parent ? this.parent.depth + 1 : 1, this._enterPos = n, this._anchorPos = r;
1356
1359
  }
@@ -1363,7 +1366,7 @@ var AttributedScopeStack = class e {
1363
1366
  return t === null ? !1 : e._equals(this, t);
1364
1367
  }
1365
1368
  static _equals(e, t) {
1366
- return e === t ? !0 : this._structuralEquals(e, t) ? AttributedScopeStack.equals(e.contentNameScopesList, t.contentNameScopesList) : !1;
1369
+ return e === t ? !0 : this._structuralEquals(e, t) ? E.equals(e.contentNameScopesList, t.contentNameScopesList) : !1;
1367
1370
  }
1368
1371
  static _structuralEquals(e, t) {
1369
1372
  do {
@@ -1422,7 +1425,7 @@ var AttributedScopeStack = class e {
1422
1425
  }
1423
1426
  toStateStackFrame() {
1424
1427
  return {
1425
- ruleId: ruleIdToNumber(this.ruleId),
1428
+ ruleId: Ne(this.ruleId),
1426
1429
  beginRuleCapturedEOL: this.beginRuleCapturedEOL,
1427
1430
  endRule: this.endRule,
1428
1431
  nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],
@@ -1430,15 +1433,15 @@ var AttributedScopeStack = class e {
1430
1433
  };
1431
1434
  }
1432
1435
  static pushFrame(t, n) {
1433
- let r = AttributedScopeStack.fromExtension(t?.nameScopesList ?? null, n.nameScopesList);
1434
- return new e(t, ruleIdFromNumber(n.ruleId), n.enterPos ?? -1, n.anchorPos ?? -1, n.beginRuleCapturedEOL, n.endRule, r, AttributedScopeStack.fromExtension(r, n.contentNameScopesList));
1436
+ let r = E.fromExtension(t?.nameScopesList ?? null, n.nameScopesList);
1437
+ return new e(t, Me(n.ruleId), n.enterPos ?? -1, n.anchorPos ?? -1, n.beginRuleCapturedEOL, n.endRule, r, E.fromExtension(r, n.contentNameScopesList));
1435
1438
  }
1436
- }, BalancedBracketSelectors = class {
1439
+ }, st = class {
1437
1440
  balancedBracketScopes;
1438
1441
  unbalancedBracketScopes;
1439
1442
  allowAny = !1;
1440
1443
  constructor(e, t) {
1441
- this.balancedBracketScopes = e.flatMap((e) => e === "*" ? (this.allowAny = !0, []) : createMatchers(e, nameMatcher).map((e) => e.matcher)), this.unbalancedBracketScopes = t.flatMap((e) => createMatchers(e, nameMatcher).map((e) => e.matcher));
1444
+ this.balancedBracketScopes = e.flatMap((e) => e === "*" ? (this.allowAny = !0, []) : de(e, nt).map((e) => e.matcher)), this.unbalancedBracketScopes = t.flatMap((e) => de(e, nt).map((e) => e.matcher));
1442
1445
  }
1443
1446
  get matchesAlways() {
1444
1447
  return this.allowAny && this.unbalancedBracketScopes.length === 0;
@@ -1451,7 +1454,7 @@ var AttributedScopeStack = class e {
1451
1454
  for (let t of this.balancedBracketScopes) if (t(e)) return !0;
1452
1455
  return this.allowAny;
1453
1456
  }
1454
- }, LineTokens = class {
1457
+ }, ct = class {
1455
1458
  constructor(e, t, n, r) {
1456
1459
  this.balancedBracketSelectors = r, this._emitBinaryTokens = e, this._tokenTypeOverrides = n, this._lineText = null, this._tokens = [], this._binaryTokens = [], this._lastTokenEndIndex = 0;
1457
1460
  }
@@ -1470,10 +1473,10 @@ var AttributedScopeStack = class e {
1470
1473
  let n = e?.tokenAttributes ?? 0, r = !1;
1471
1474
  if (this.balancedBracketSelectors?.matchesAlways && (r = !0), this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {
1472
1475
  let t = e?.getScopeNames() ?? [];
1473
- for (let e of this._tokenTypeOverrides) e.matcher(t) && (n = EncodedTokenMetadata.set(n, 0, toOptionalTokenType(e.type), null, -1, 0, 0));
1476
+ for (let e of this._tokenTypeOverrides) e.matcher(t) && (n = y.set(n, 0, le(e.type), null, -1, 0, 0));
1474
1477
  this.balancedBracketSelectors && (r = this.balancedBracketSelectors.match(t));
1475
1478
  }
1476
- if (r && (n = EncodedTokenMetadata.set(n, 0, 8, r, -1, 0, 0)), this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === n) {
1479
+ if (r && (n = y.set(n, 0, 8, r, -1, 0, 0)), this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === n) {
1477
1480
  this._lastTokenEndIndex = t;
1478
1481
  return;
1479
1482
  }
@@ -1496,7 +1499,7 @@ var AttributedScopeStack = class e {
1496
1499
  for (let e = 0, t = this._binaryTokens.length; e < t; e++) n[e] = this._binaryTokens[e];
1497
1500
  return n;
1498
1501
  }
1499
- }, SyncRegistry = class {
1502
+ }, lt = class {
1500
1503
  constructor(e, t) {
1501
1504
  this._onigLib = t, this._theme = e;
1502
1505
  }
@@ -1532,22 +1535,22 @@ var AttributedScopeStack = class e {
1532
1535
  if (!this._grammars.has(e)) {
1533
1536
  let a = this._rawGrammars.get(e);
1534
1537
  if (!a) return null;
1535
- this._grammars.set(e, createGrammar(e, a, t, n, r, i, this, this._onigLib));
1538
+ this._grammars.set(e, et(e, a, t, n, r, i, this, this._onigLib));
1536
1539
  }
1537
1540
  return this._grammars.get(e);
1538
1541
  }
1539
- }, Registry$1 = class {
1542
+ }, ut = class {
1540
1543
  _options;
1541
1544
  _syncRegistry;
1542
1545
  _ensureGrammarCache;
1543
1546
  constructor(e) {
1544
- this._options = e, this._syncRegistry = new SyncRegistry(Theme.createFromRawTheme(e.theme, e.colorMap), e.onigLib), this._ensureGrammarCache = /* @__PURE__ */ new Map();
1547
+ this._options = e, this._syncRegistry = new lt(h.createFromRawTheme(e.theme, e.colorMap), e.onigLib), this._ensureGrammarCache = /* @__PURE__ */ new Map();
1545
1548
  }
1546
1549
  dispose() {
1547
1550
  this._syncRegistry.dispose();
1548
1551
  }
1549
1552
  setTheme(e, t) {
1550
- this._syncRegistry.setTheme(Theme.createFromRawTheme(e, t));
1553
+ this._syncRegistry.setTheme(h.createFromRawTheme(e, t));
1551
1554
  }
1552
1555
  getColorMap() {
1553
1556
  return this._syncRegistry.getColorMap();
@@ -1556,13 +1559,13 @@ var AttributedScopeStack = class e {
1556
1559
  return this.loadGrammarWithConfiguration(e, t, { embeddedLanguages: n });
1557
1560
  }
1558
1561
  loadGrammarWithConfiguration(e, t, n) {
1559
- return this._loadGrammar(e, t, n.embeddedLanguages, n.tokenTypes, new BalancedBracketSelectors(n.balancedBracketSelectors || [], n.unbalancedBracketSelectors || []));
1562
+ return this._loadGrammar(e, t, n.embeddedLanguages, n.tokenTypes, new st(n.balancedBracketSelectors || [], n.unbalancedBracketSelectors || []));
1560
1563
  }
1561
1564
  loadGrammar(e) {
1562
1565
  return this._loadGrammar(e, 0, null, null, null);
1563
1566
  }
1564
1567
  _loadGrammar(e, t, n, r, i) {
1565
- let a = new ScopeDependencyProcessor(this._syncRegistry, e);
1568
+ let a = new _e(this._syncRegistry, e);
1566
1569
  for (; a.Q.length > 0;) a.Q.map((e) => this._loadSingleGrammar(e.scopeName)), a.processQueue();
1567
1570
  return this._grammarForScopeName(e, t, n, r, i);
1568
1571
  }
@@ -1582,8 +1585,7 @@ var AttributedScopeStack = class e {
1582
1585
  _grammarForScopeName(e, t = 0, n = null, r = null, i = null) {
1583
1586
  return this._syncRegistry.grammarForScopeName(e, t, n, r, i);
1584
1587
  }
1585
- }, INITIAL = StateStackImpl.NULL;
1586
- const htmlVoidElements = [
1588
+ }, dt = ot.NULL, ft = [
1587
1589
  "area",
1588
1590
  "base",
1589
1591
  "basefont",
@@ -1604,110 +1606,122 @@ const htmlVoidElements = [
1604
1606
  "source",
1605
1607
  "track",
1606
1608
  "wbr"
1607
- ];
1608
- var Schema = class {
1609
+ ], D = class {
1609
1610
  constructor(e, t, n) {
1610
1611
  this.normal = t, this.property = e, n && (this.space = n);
1611
1612
  }
1612
1613
  };
1613
- Schema.prototype.normal = {}, Schema.prototype.property = {}, Schema.prototype.space = void 0;
1614
- function merge(e, t) {
1614
+ D.prototype.normal = {}, D.prototype.property = {}, D.prototype.space = void 0;
1615
+ //#endregion
1616
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js
1617
+ function pt(e, t) {
1615
1618
  let n = {}, r = {};
1616
1619
  for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
1617
- return new Schema(n, r, t);
1620
+ return new D(n, r, t);
1618
1621
  }
1619
- function normalize(e) {
1622
+ //#endregion
1623
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js
1624
+ function mt(e) {
1620
1625
  return e.toLowerCase();
1621
1626
  }
1622
- var Info = class {
1627
+ //#endregion
1628
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js
1629
+ var O = class {
1623
1630
  constructor(e, t) {
1624
1631
  this.attribute = t, this.property = e;
1625
1632
  }
1626
1633
  };
1627
- Info.prototype.attribute = "", Info.prototype.booleanish = !1, Info.prototype.boolean = !1, Info.prototype.commaOrSpaceSeparated = !1, Info.prototype.commaSeparated = !1, Info.prototype.defined = !1, Info.prototype.mustUseProperty = !1, Info.prototype.number = !1, Info.prototype.overloadedBoolean = !1, Info.prototype.property = "", Info.prototype.spaceSeparated = !1, Info.prototype.space = void 0;
1628
- var types_exports = /* @__PURE__ */ __exportAll({
1629
- boolean: () => boolean,
1630
- booleanish: () => booleanish,
1631
- commaOrSpaceSeparated: () => commaOrSpaceSeparated,
1632
- commaSeparated: () => commaSeparated,
1633
- number: () => number,
1634
- overloadedBoolean: () => overloadedBoolean,
1635
- spaceSeparated: () => spaceSeparated
1636
- }), powers = 0;
1637
- const boolean = increment(), booleanish = increment(), overloadedBoolean = increment(), number = increment(), spaceSeparated = increment(), commaSeparated = increment(), commaOrSpaceSeparated = increment();
1638
- function increment() {
1639
- return 2 ** ++powers;
1640
- }
1641
- var checks = Object.keys(types_exports), DefinedInfo = class extends Info {
1634
+ O.prototype.attribute = "", O.prototype.booleanish = !1, O.prototype.boolean = !1, O.prototype.commaOrSpaceSeparated = !1, O.prototype.commaSeparated = !1, O.prototype.defined = !1, O.prototype.mustUseProperty = !1, O.prototype.number = !1, O.prototype.overloadedBoolean = !1, O.prototype.property = "", O.prototype.spaceSeparated = !1, O.prototype.space = void 0;
1635
+ //#endregion
1636
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js
1637
+ var ht = /* @__PURE__ */ e({
1638
+ boolean: () => k,
1639
+ booleanish: () => A,
1640
+ commaOrSpaceSeparated: () => P,
1641
+ commaSeparated: () => N,
1642
+ number: () => j,
1643
+ overloadedBoolean: () => _t,
1644
+ spaceSeparated: () => M
1645
+ }), gt = 0, k = F(), A = F(), _t = F(), j = F(), M = F(), N = F(), P = F();
1646
+ function F() {
1647
+ return 2 ** ++gt;
1648
+ }
1649
+ //#endregion
1650
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js
1651
+ var vt = Object.keys(ht), yt = class extends O {
1642
1652
  constructor(e, t, n, r) {
1643
1653
  let i = -1;
1644
- if (super(e, t), mark(this, "space", r), typeof n == "number") for (; ++i < checks.length;) {
1645
- let e = checks[i];
1646
- mark(this, checks[i], (n & types_exports[e]) === types_exports[e]);
1654
+ if (super(e, t), bt(this, "space", r), typeof n == "number") for (; ++i < vt.length;) {
1655
+ let e = vt[i];
1656
+ bt(this, vt[i], (n & ht[e]) === ht[e]);
1647
1657
  }
1648
1658
  }
1649
1659
  };
1650
- DefinedInfo.prototype.defined = !0;
1651
- function mark(e, t, n) {
1660
+ yt.prototype.defined = !0;
1661
+ function bt(e, t, n) {
1652
1662
  n && (e[t] = n);
1653
1663
  }
1654
- function create(e) {
1664
+ //#endregion
1665
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js
1666
+ function I(e) {
1655
1667
  let t = {}, n = {};
1656
1668
  for (let [r, i] of Object.entries(e.properties)) {
1657
- let a = new DefinedInfo(r, e.transform(e.attributes || {}, r), i, e.space);
1658
- e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[normalize(r)] = r, n[normalize(a.attribute)] = r;
1669
+ let a = new yt(r, e.transform(e.attributes || {}, r), i, e.space);
1670
+ e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[mt(r)] = r, n[mt(a.attribute)] = r;
1659
1671
  }
1660
- return new Schema(t, n, e.space);
1672
+ return new D(t, n, e.space);
1661
1673
  }
1662
- const aria = create({
1674
+ //#endregion
1675
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js
1676
+ var xt = I({
1663
1677
  properties: {
1664
1678
  ariaActiveDescendant: null,
1665
- ariaAtomic: booleanish,
1679
+ ariaAtomic: A,
1666
1680
  ariaAutoComplete: null,
1667
- ariaBusy: booleanish,
1668
- ariaChecked: booleanish,
1669
- ariaColCount: number,
1670
- ariaColIndex: number,
1671
- ariaColSpan: number,
1672
- ariaControls: spaceSeparated,
1681
+ ariaBusy: A,
1682
+ ariaChecked: A,
1683
+ ariaColCount: j,
1684
+ ariaColIndex: j,
1685
+ ariaColSpan: j,
1686
+ ariaControls: M,
1673
1687
  ariaCurrent: null,
1674
- ariaDescribedBy: spaceSeparated,
1688
+ ariaDescribedBy: M,
1675
1689
  ariaDetails: null,
1676
- ariaDisabled: booleanish,
1677
- ariaDropEffect: spaceSeparated,
1690
+ ariaDisabled: A,
1691
+ ariaDropEffect: M,
1678
1692
  ariaErrorMessage: null,
1679
- ariaExpanded: booleanish,
1680
- ariaFlowTo: spaceSeparated,
1681
- ariaGrabbed: booleanish,
1693
+ ariaExpanded: A,
1694
+ ariaFlowTo: M,
1695
+ ariaGrabbed: A,
1682
1696
  ariaHasPopup: null,
1683
- ariaHidden: booleanish,
1697
+ ariaHidden: A,
1684
1698
  ariaInvalid: null,
1685
1699
  ariaKeyShortcuts: null,
1686
1700
  ariaLabel: null,
1687
- ariaLabelledBy: spaceSeparated,
1688
- ariaLevel: number,
1701
+ ariaLabelledBy: M,
1702
+ ariaLevel: j,
1689
1703
  ariaLive: null,
1690
- ariaModal: booleanish,
1691
- ariaMultiLine: booleanish,
1692
- ariaMultiSelectable: booleanish,
1704
+ ariaModal: A,
1705
+ ariaMultiLine: A,
1706
+ ariaMultiSelectable: A,
1693
1707
  ariaOrientation: null,
1694
- ariaOwns: spaceSeparated,
1708
+ ariaOwns: M,
1695
1709
  ariaPlaceholder: null,
1696
- ariaPosInSet: number,
1697
- ariaPressed: booleanish,
1698
- ariaReadOnly: booleanish,
1710
+ ariaPosInSet: j,
1711
+ ariaPressed: A,
1712
+ ariaReadOnly: A,
1699
1713
  ariaRelevant: null,
1700
- ariaRequired: booleanish,
1701
- ariaRoleDescription: spaceSeparated,
1702
- ariaRowCount: number,
1703
- ariaRowIndex: number,
1704
- ariaRowSpan: number,
1705
- ariaSelected: booleanish,
1706
- ariaSetSize: number,
1714
+ ariaRequired: A,
1715
+ ariaRoleDescription: M,
1716
+ ariaRowCount: j,
1717
+ ariaRowIndex: j,
1718
+ ariaRowSpan: j,
1719
+ ariaSelected: A,
1720
+ ariaSetSize: j,
1707
1721
  ariaSort: null,
1708
- ariaValueMax: number,
1709
- ariaValueMin: number,
1710
- ariaValueNow: number,
1722
+ ariaValueMax: j,
1723
+ ariaValueMin: j,
1724
+ ariaValueNow: j,
1711
1725
  ariaValueText: null,
1712
1726
  role: null
1713
1727
  },
@@ -1715,13 +1729,19 @@ const aria = create({
1715
1729
  return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
1716
1730
  }
1717
1731
  });
1718
- function caseSensitiveTransform(e, t) {
1732
+ //#endregion
1733
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js
1734
+ function St(e, t) {
1719
1735
  return t in e ? e[t] : t;
1720
1736
  }
1721
- function caseInsensitiveTransform(e, t) {
1722
- return caseSensitiveTransform(e, t.toLowerCase());
1737
+ //#endregion
1738
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js
1739
+ function Ct(e, t) {
1740
+ return St(e, t.toLowerCase());
1723
1741
  }
1724
- const html$3 = create({
1742
+ //#endregion
1743
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js
1744
+ var wt = I({
1725
1745
  attributes: {
1726
1746
  acceptcharset: "accept-charset",
1727
1747
  classname: "class",
@@ -1736,45 +1756,45 @@ const html$3 = create({
1736
1756
  ],
1737
1757
  properties: {
1738
1758
  abbr: null,
1739
- accept: commaSeparated,
1740
- acceptCharset: spaceSeparated,
1741
- accessKey: spaceSeparated,
1759
+ accept: N,
1760
+ acceptCharset: M,
1761
+ accessKey: M,
1742
1762
  action: null,
1743
1763
  allow: null,
1744
- allowFullScreen: boolean,
1745
- allowPaymentRequest: boolean,
1746
- allowUserMedia: boolean,
1764
+ allowFullScreen: k,
1765
+ allowPaymentRequest: k,
1766
+ allowUserMedia: k,
1747
1767
  alt: null,
1748
1768
  as: null,
1749
- async: boolean,
1769
+ async: k,
1750
1770
  autoCapitalize: null,
1751
- autoComplete: spaceSeparated,
1752
- autoFocus: boolean,
1753
- autoPlay: boolean,
1754
- blocking: spaceSeparated,
1771
+ autoComplete: M,
1772
+ autoFocus: k,
1773
+ autoPlay: k,
1774
+ blocking: M,
1755
1775
  capture: null,
1756
1776
  charSet: null,
1757
- checked: boolean,
1777
+ checked: k,
1758
1778
  cite: null,
1759
- className: spaceSeparated,
1760
- cols: number,
1779
+ className: M,
1780
+ cols: j,
1761
1781
  colSpan: null,
1762
1782
  content: null,
1763
- contentEditable: booleanish,
1764
- controls: boolean,
1765
- controlsList: spaceSeparated,
1766
- coords: number | commaSeparated,
1783
+ contentEditable: A,
1784
+ controls: k,
1785
+ controlsList: M,
1786
+ coords: j | N,
1767
1787
  crossOrigin: null,
1768
1788
  data: null,
1769
1789
  dateTime: null,
1770
1790
  decoding: null,
1771
- default: boolean,
1772
- defer: boolean,
1791
+ default: k,
1792
+ defer: k,
1773
1793
  dir: null,
1774
1794
  dirName: null,
1775
- disabled: boolean,
1776
- download: overloadedBoolean,
1777
- draggable: booleanish,
1795
+ disabled: k,
1796
+ download: _t,
1797
+ draggable: A,
1778
1798
  encType: null,
1779
1799
  enterKeyHint: null,
1780
1800
  fetchPriority: null,
@@ -1782,50 +1802,50 @@ const html$3 = create({
1782
1802
  formAction: null,
1783
1803
  formEncType: null,
1784
1804
  formMethod: null,
1785
- formNoValidate: boolean,
1805
+ formNoValidate: k,
1786
1806
  formTarget: null,
1787
- headers: spaceSeparated,
1788
- height: number,
1789
- hidden: overloadedBoolean,
1790
- high: number,
1807
+ headers: M,
1808
+ height: j,
1809
+ hidden: _t,
1810
+ high: j,
1791
1811
  href: null,
1792
1812
  hrefLang: null,
1793
- htmlFor: spaceSeparated,
1794
- httpEquiv: spaceSeparated,
1813
+ htmlFor: M,
1814
+ httpEquiv: M,
1795
1815
  id: null,
1796
1816
  imageSizes: null,
1797
1817
  imageSrcSet: null,
1798
- inert: boolean,
1818
+ inert: k,
1799
1819
  inputMode: null,
1800
1820
  integrity: null,
1801
1821
  is: null,
1802
- isMap: boolean,
1822
+ isMap: k,
1803
1823
  itemId: null,
1804
- itemProp: spaceSeparated,
1805
- itemRef: spaceSeparated,
1806
- itemScope: boolean,
1807
- itemType: spaceSeparated,
1824
+ itemProp: M,
1825
+ itemRef: M,
1826
+ itemScope: k,
1827
+ itemType: M,
1808
1828
  kind: null,
1809
1829
  label: null,
1810
1830
  lang: null,
1811
1831
  language: null,
1812
1832
  list: null,
1813
1833
  loading: null,
1814
- loop: boolean,
1815
- low: number,
1834
+ loop: k,
1835
+ low: j,
1816
1836
  manifest: null,
1817
1837
  max: null,
1818
- maxLength: number,
1838
+ maxLength: j,
1819
1839
  media: null,
1820
1840
  method: null,
1821
1841
  min: null,
1822
- minLength: number,
1823
- multiple: boolean,
1824
- muted: boolean,
1842
+ minLength: j,
1843
+ multiple: k,
1844
+ muted: k,
1825
1845
  name: null,
1826
1846
  nonce: null,
1827
- noModule: boolean,
1828
- noValidate: boolean,
1847
+ noModule: k,
1848
+ noValidate: k,
1829
1849
  onAbort: null,
1830
1850
  onAfterPrint: null,
1831
1851
  onAuxClick: null,
@@ -1914,65 +1934,65 @@ const html$3 = create({
1914
1934
  onVolumeChange: null,
1915
1935
  onWaiting: null,
1916
1936
  onWheel: null,
1917
- open: boolean,
1918
- optimum: number,
1937
+ open: k,
1938
+ optimum: j,
1919
1939
  pattern: null,
1920
- ping: spaceSeparated,
1940
+ ping: M,
1921
1941
  placeholder: null,
1922
- playsInline: boolean,
1942
+ playsInline: k,
1923
1943
  popover: null,
1924
1944
  popoverTarget: null,
1925
1945
  popoverTargetAction: null,
1926
1946
  poster: null,
1927
1947
  preload: null,
1928
- readOnly: boolean,
1948
+ readOnly: k,
1929
1949
  referrerPolicy: null,
1930
- rel: spaceSeparated,
1931
- required: boolean,
1932
- reversed: boolean,
1933
- rows: number,
1934
- rowSpan: number,
1935
- sandbox: spaceSeparated,
1950
+ rel: M,
1951
+ required: k,
1952
+ reversed: k,
1953
+ rows: j,
1954
+ rowSpan: j,
1955
+ sandbox: M,
1936
1956
  scope: null,
1937
- scoped: boolean,
1938
- seamless: boolean,
1939
- selected: boolean,
1940
- shadowRootClonable: boolean,
1941
- shadowRootDelegatesFocus: boolean,
1957
+ scoped: k,
1958
+ seamless: k,
1959
+ selected: k,
1960
+ shadowRootClonable: k,
1961
+ shadowRootDelegatesFocus: k,
1942
1962
  shadowRootMode: null,
1943
1963
  shape: null,
1944
- size: number,
1964
+ size: j,
1945
1965
  sizes: null,
1946
1966
  slot: null,
1947
- span: number,
1948
- spellCheck: booleanish,
1967
+ span: j,
1968
+ spellCheck: A,
1949
1969
  src: null,
1950
1970
  srcDoc: null,
1951
1971
  srcLang: null,
1952
1972
  srcSet: null,
1953
- start: number,
1973
+ start: j,
1954
1974
  step: null,
1955
1975
  style: null,
1956
- tabIndex: number,
1976
+ tabIndex: j,
1957
1977
  target: null,
1958
1978
  title: null,
1959
1979
  translate: null,
1960
1980
  type: null,
1961
- typeMustMatch: boolean,
1981
+ typeMustMatch: k,
1962
1982
  useMap: null,
1963
- value: booleanish,
1964
- width: number,
1983
+ value: A,
1984
+ width: j,
1965
1985
  wrap: null,
1966
1986
  writingSuggestions: null,
1967
1987
  align: null,
1968
1988
  aLink: null,
1969
- archive: spaceSeparated,
1989
+ archive: M,
1970
1990
  axis: null,
1971
1991
  background: null,
1972
1992
  bgColor: null,
1973
- border: number,
1993
+ border: j,
1974
1994
  borderColor: null,
1975
- bottomMargin: number,
1995
+ bottomMargin: j,
1976
1996
  cellPadding: null,
1977
1997
  cellSpacing: null,
1978
1998
  char: null,
@@ -1983,54 +2003,54 @@ const html$3 = create({
1983
2003
  codeBase: null,
1984
2004
  codeType: null,
1985
2005
  color: null,
1986
- compact: boolean,
1987
- declare: boolean,
2006
+ compact: k,
2007
+ declare: k,
1988
2008
  event: null,
1989
2009
  face: null,
1990
2010
  frame: null,
1991
2011
  frameBorder: null,
1992
- hSpace: number,
1993
- leftMargin: number,
2012
+ hSpace: j,
2013
+ leftMargin: j,
1994
2014
  link: null,
1995
2015
  longDesc: null,
1996
2016
  lowSrc: null,
1997
- marginHeight: number,
1998
- marginWidth: number,
1999
- noResize: boolean,
2000
- noHref: boolean,
2001
- noShade: boolean,
2002
- noWrap: boolean,
2017
+ marginHeight: j,
2018
+ marginWidth: j,
2019
+ noResize: k,
2020
+ noHref: k,
2021
+ noShade: k,
2022
+ noWrap: k,
2003
2023
  object: null,
2004
2024
  profile: null,
2005
2025
  prompt: null,
2006
2026
  rev: null,
2007
- rightMargin: number,
2027
+ rightMargin: j,
2008
2028
  rules: null,
2009
2029
  scheme: null,
2010
- scrolling: booleanish,
2030
+ scrolling: A,
2011
2031
  standby: null,
2012
2032
  summary: null,
2013
2033
  text: null,
2014
- topMargin: number,
2034
+ topMargin: j,
2015
2035
  valueType: null,
2016
2036
  version: null,
2017
2037
  vAlign: null,
2018
2038
  vLink: null,
2019
- vSpace: number,
2039
+ vSpace: j,
2020
2040
  allowTransparency: null,
2021
2041
  autoCorrect: null,
2022
2042
  autoSave: null,
2023
- disablePictureInPicture: boolean,
2024
- disableRemotePlayback: boolean,
2043
+ disablePictureInPicture: k,
2044
+ disableRemotePlayback: k,
2025
2045
  prefix: null,
2026
2046
  property: null,
2027
- results: number,
2047
+ results: j,
2028
2048
  security: null,
2029
2049
  unselectable: null
2030
2050
  },
2031
2051
  space: "html",
2032
- transform: caseInsensitiveTransform
2033
- }), svg$1 = create({
2052
+ transform: Ct
2053
+ }), Tt = I({
2034
2054
  attributes: {
2035
2055
  accentHeight: "accent-height",
2036
2056
  alignmentBaseline: "alignment-baseline",
@@ -2206,29 +2226,29 @@ const html$3 = create({
2206
2226
  timelineBegin: "timelinebegin"
2207
2227
  },
2208
2228
  properties: {
2209
- about: commaOrSpaceSeparated,
2210
- accentHeight: number,
2229
+ about: P,
2230
+ accentHeight: j,
2211
2231
  accumulate: null,
2212
2232
  additive: null,
2213
2233
  alignmentBaseline: null,
2214
- alphabetic: number,
2215
- amplitude: number,
2234
+ alphabetic: j,
2235
+ amplitude: j,
2216
2236
  arabicForm: null,
2217
- ascent: number,
2237
+ ascent: j,
2218
2238
  attributeName: null,
2219
2239
  attributeType: null,
2220
- azimuth: number,
2240
+ azimuth: j,
2221
2241
  bandwidth: null,
2222
2242
  baselineShift: null,
2223
2243
  baseFrequency: null,
2224
2244
  baseProfile: null,
2225
2245
  bbox: null,
2226
2246
  begin: null,
2227
- bias: number,
2247
+ bias: j,
2228
2248
  by: null,
2229
2249
  calcMode: null,
2230
- capHeight: number,
2231
- className: spaceSeparated,
2250
+ capHeight: j,
2251
+ className: M,
2232
2252
  clip: null,
2233
2253
  clipPath: null,
2234
2254
  clipPathUnits: null,
@@ -2248,26 +2268,26 @@ const html$3 = create({
2248
2268
  d: null,
2249
2269
  dataType: null,
2250
2270
  defaultAction: null,
2251
- descent: number,
2252
- diffuseConstant: number,
2271
+ descent: j,
2272
+ diffuseConstant: j,
2253
2273
  direction: null,
2254
2274
  display: null,
2255
2275
  dur: null,
2256
- divisor: number,
2276
+ divisor: j,
2257
2277
  dominantBaseline: null,
2258
- download: boolean,
2278
+ download: k,
2259
2279
  dx: null,
2260
2280
  dy: null,
2261
2281
  edgeMode: null,
2262
2282
  editable: null,
2263
- elevation: number,
2283
+ elevation: j,
2264
2284
  enableBackground: null,
2265
2285
  end: null,
2266
2286
  event: null,
2267
- exponent: number,
2287
+ exponent: j,
2268
2288
  externalResourcesRequired: null,
2269
2289
  fill: null,
2270
- fillOpacity: number,
2290
+ fillOpacity: j,
2271
2291
  fillRule: null,
2272
2292
  filter: null,
2273
2293
  filterRes: null,
@@ -2288,37 +2308,37 @@ const html$3 = create({
2288
2308
  from: null,
2289
2309
  fx: null,
2290
2310
  fy: null,
2291
- g1: commaSeparated,
2292
- g2: commaSeparated,
2293
- glyphName: commaSeparated,
2311
+ g1: N,
2312
+ g2: N,
2313
+ glyphName: N,
2294
2314
  glyphOrientationHorizontal: null,
2295
2315
  glyphOrientationVertical: null,
2296
2316
  glyphRef: null,
2297
2317
  gradientTransform: null,
2298
2318
  gradientUnits: null,
2299
2319
  handler: null,
2300
- hanging: number,
2320
+ hanging: j,
2301
2321
  hatchContentUnits: null,
2302
2322
  hatchUnits: null,
2303
2323
  height: null,
2304
2324
  href: null,
2305
2325
  hrefLang: null,
2306
- horizAdvX: number,
2307
- horizOriginX: number,
2308
- horizOriginY: number,
2326
+ horizAdvX: j,
2327
+ horizOriginX: j,
2328
+ horizOriginY: j,
2309
2329
  id: null,
2310
- ideographic: number,
2330
+ ideographic: j,
2311
2331
  imageRendering: null,
2312
2332
  initialVisibility: null,
2313
2333
  in: null,
2314
2334
  in2: null,
2315
- intercept: number,
2316
- k: number,
2317
- k1: number,
2318
- k2: number,
2319
- k3: number,
2320
- k4: number,
2321
- kernelMatrix: commaOrSpaceSeparated,
2335
+ intercept: j,
2336
+ k: j,
2337
+ k1: j,
2338
+ k2: j,
2339
+ k3: j,
2340
+ k4: j,
2341
+ kernelMatrix: P,
2322
2342
  kernelUnitLength: null,
2323
2343
  keyPoints: null,
2324
2344
  keySplines: null,
@@ -2328,7 +2348,7 @@ const html$3 = create({
2328
2348
  lengthAdjust: null,
2329
2349
  letterSpacing: null,
2330
2350
  lightingColor: null,
2331
- limitingConeAngle: number,
2351
+ limitingConeAngle: j,
2332
2352
  local: null,
2333
2353
  markerEnd: null,
2334
2354
  markerMid: null,
@@ -2344,7 +2364,7 @@ const html$3 = create({
2344
2364
  media: null,
2345
2365
  mediaCharacterEncoding: null,
2346
2366
  mediaContentEncodings: null,
2347
- mediaSize: number,
2367
+ mediaSize: j,
2348
2368
  mediaTime: null,
2349
2369
  method: null,
2350
2370
  min: null,
@@ -2450,43 +2470,43 @@ const html$3 = create({
2450
2470
  origin: null,
2451
2471
  overflow: null,
2452
2472
  overlay: null,
2453
- overlinePosition: number,
2454
- overlineThickness: number,
2473
+ overlinePosition: j,
2474
+ overlineThickness: j,
2455
2475
  paintOrder: null,
2456
2476
  panose1: null,
2457
2477
  path: null,
2458
- pathLength: number,
2478
+ pathLength: j,
2459
2479
  patternContentUnits: null,
2460
2480
  patternTransform: null,
2461
2481
  patternUnits: null,
2462
2482
  phase: null,
2463
- ping: spaceSeparated,
2483
+ ping: M,
2464
2484
  pitch: null,
2465
2485
  playbackOrder: null,
2466
2486
  pointerEvents: null,
2467
2487
  points: null,
2468
- pointsAtX: number,
2469
- pointsAtY: number,
2470
- pointsAtZ: number,
2488
+ pointsAtX: j,
2489
+ pointsAtY: j,
2490
+ pointsAtZ: j,
2471
2491
  preserveAlpha: null,
2472
2492
  preserveAspectRatio: null,
2473
2493
  primitiveUnits: null,
2474
2494
  propagate: null,
2475
- property: commaOrSpaceSeparated,
2495
+ property: P,
2476
2496
  r: null,
2477
2497
  radius: null,
2478
2498
  referrerPolicy: null,
2479
2499
  refX: null,
2480
2500
  refY: null,
2481
- rel: commaOrSpaceSeparated,
2482
- rev: commaOrSpaceSeparated,
2501
+ rel: P,
2502
+ rev: P,
2483
2503
  renderingIntent: null,
2484
2504
  repeatCount: null,
2485
2505
  repeatDur: null,
2486
- requiredExtensions: commaOrSpaceSeparated,
2487
- requiredFeatures: commaOrSpaceSeparated,
2488
- requiredFonts: commaOrSpaceSeparated,
2489
- requiredFormats: commaOrSpaceSeparated,
2506
+ requiredExtensions: P,
2507
+ requiredFeatures: P,
2508
+ requiredFonts: P,
2509
+ requiredFormats: P,
2490
2510
  resource: null,
2491
2511
  restart: null,
2492
2512
  result: null,
@@ -2499,8 +2519,8 @@ const html$3 = create({
2499
2519
  side: null,
2500
2520
  slope: null,
2501
2521
  snapshotTime: null,
2502
- specularConstant: number,
2503
- specularExponent: number,
2522
+ specularConstant: j,
2523
+ specularExponent: j,
2504
2524
  spreadMethod: null,
2505
2525
  spacing: null,
2506
2526
  startOffset: null,
@@ -2510,30 +2530,30 @@ const html$3 = create({
2510
2530
  stitchTiles: null,
2511
2531
  stopColor: null,
2512
2532
  stopOpacity: null,
2513
- strikethroughPosition: number,
2514
- strikethroughThickness: number,
2533
+ strikethroughPosition: j,
2534
+ strikethroughThickness: j,
2515
2535
  string: null,
2516
2536
  stroke: null,
2517
- strokeDashArray: commaOrSpaceSeparated,
2537
+ strokeDashArray: P,
2518
2538
  strokeDashOffset: null,
2519
2539
  strokeLineCap: null,
2520
2540
  strokeLineJoin: null,
2521
- strokeMiterLimit: number,
2522
- strokeOpacity: number,
2541
+ strokeMiterLimit: j,
2542
+ strokeOpacity: j,
2523
2543
  strokeWidth: null,
2524
2544
  style: null,
2525
- surfaceScale: number,
2545
+ surfaceScale: j,
2526
2546
  syncBehavior: null,
2527
2547
  syncBehaviorDefault: null,
2528
2548
  syncMaster: null,
2529
2549
  syncTolerance: null,
2530
2550
  syncToleranceDefault: null,
2531
- systemLanguage: commaOrSpaceSeparated,
2532
- tabIndex: number,
2551
+ systemLanguage: P,
2552
+ tabIndex: j,
2533
2553
  tableValues: null,
2534
2554
  target: null,
2535
- targetX: number,
2536
- targetY: number,
2555
+ targetX: j,
2556
+ targetY: j,
2537
2557
  textAnchor: null,
2538
2558
  textDecoration: null,
2539
2559
  textRendering: null,
@@ -2542,28 +2562,28 @@ const html$3 = create({
2542
2562
  title: null,
2543
2563
  transformBehavior: null,
2544
2564
  type: null,
2545
- typeOf: commaOrSpaceSeparated,
2565
+ typeOf: P,
2546
2566
  to: null,
2547
2567
  transform: null,
2548
2568
  transformOrigin: null,
2549
2569
  u1: null,
2550
2570
  u2: null,
2551
- underlinePosition: number,
2552
- underlineThickness: number,
2571
+ underlinePosition: j,
2572
+ underlineThickness: j,
2553
2573
  unicode: null,
2554
2574
  unicodeBidi: null,
2555
2575
  unicodeRange: null,
2556
- unitsPerEm: number,
2576
+ unitsPerEm: j,
2557
2577
  values: null,
2558
- vAlphabetic: number,
2559
- vMathematical: number,
2578
+ vAlphabetic: j,
2579
+ vMathematical: j,
2560
2580
  vectorEffect: null,
2561
- vHanging: number,
2562
- vIdeographic: number,
2581
+ vHanging: j,
2582
+ vIdeographic: j,
2563
2583
  version: null,
2564
- vertAdvY: number,
2565
- vertOriginX: number,
2566
- vertOriginY: number,
2584
+ vertAdvY: j,
2585
+ vertOriginX: j,
2586
+ vertOriginY: j,
2567
2587
  viewBox: null,
2568
2588
  viewTarget: null,
2569
2589
  visibility: null,
@@ -2575,7 +2595,7 @@ const html$3 = create({
2575
2595
  x1: null,
2576
2596
  x2: null,
2577
2597
  xChannelSelector: null,
2578
- xHeight: number,
2598
+ xHeight: j,
2579
2599
  y: null,
2580
2600
  y1: null,
2581
2601
  y2: null,
@@ -2584,8 +2604,8 @@ const html$3 = create({
2584
2604
  zoomAndPan: null
2585
2605
  },
2586
2606
  space: "svg",
2587
- transform: caseSensitiveTransform
2588
- }), xlink = create({
2607
+ transform: St
2608
+ }), Et = I({
2589
2609
  properties: {
2590
2610
  xLinkActuate: null,
2591
2611
  xLinkArcRole: null,
@@ -2599,15 +2619,15 @@ const html$3 = create({
2599
2619
  transform(e, t) {
2600
2620
  return "xlink:" + t.slice(5).toLowerCase();
2601
2621
  }
2602
- }), xmlns = create({
2622
+ }), Dt = I({
2603
2623
  attributes: { xmlnsxlink: "xmlns:xlink" },
2604
2624
  properties: {
2605
2625
  xmlnsXLink: null,
2606
2626
  xmlns: null
2607
2627
  },
2608
2628
  space: "xmlns",
2609
- transform: caseInsensitiveTransform
2610
- }), xml = create({
2629
+ transform: Ct
2630
+ }), Ot = I({
2611
2631
  properties: {
2612
2632
  xmlBase: null,
2613
2633
  xmlLang: null,
@@ -2617,62 +2637,64 @@ const html$3 = create({
2617
2637
  transform(e, t) {
2618
2638
  return "xml:" + t.slice(3).toLowerCase();
2619
2639
  }
2620
- });
2621
- var cap = /[A-Z]/g, dash = /-[a-z]/g, valid = /^data[-\w.:]+$/i;
2622
- function find(e, t) {
2623
- let n = normalize(t), r = t, i = Info;
2640
+ }), kt = /[A-Z]/g, At = /-[a-z]/g, jt = /^data[-\w.:]+$/i;
2641
+ function Mt(e, t) {
2642
+ let n = mt(t), r = t, i = O;
2624
2643
  if (n in e.normal) return e.property[e.normal[n]];
2625
- if (n.length > 4 && n.slice(0, 4) === "data" && valid.test(t)) {
2644
+ if (n.length > 4 && n.slice(0, 4) === "data" && jt.test(t)) {
2626
2645
  if (t.charAt(4) === "-") {
2627
- let e = t.slice(5).replace(dash, camelcase);
2646
+ let e = t.slice(5).replace(At, Pt);
2628
2647
  r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
2629
2648
  } else {
2630
2649
  let e = t.slice(4);
2631
- if (!dash.test(e)) {
2632
- let n = e.replace(cap, kebab);
2650
+ if (!At.test(e)) {
2651
+ let n = e.replace(kt, Nt);
2633
2652
  n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
2634
2653
  }
2635
2654
  }
2636
- i = DefinedInfo;
2655
+ i = yt;
2637
2656
  }
2638
2657
  return new i(r, t);
2639
2658
  }
2640
- function kebab(e) {
2659
+ function Nt(e) {
2641
2660
  return "-" + e.toLowerCase();
2642
2661
  }
2643
- function camelcase(e) {
2662
+ function Pt(e) {
2644
2663
  return e.charAt(1).toUpperCase();
2645
2664
  }
2646
- const html$2 = merge([
2647
- aria,
2648
- html$3,
2649
- xlink,
2650
- xmlns,
2651
- xml
2652
- ], "html"), svg = merge([
2653
- aria,
2654
- svg$1,
2655
- xlink,
2656
- xmlns,
2657
- xml
2658
- ], "svg");
2659
- var own$2 = {}.hasOwnProperty;
2660
- function zwitch(e, t) {
2665
+ //#endregion
2666
+ //#region ../../node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js
2667
+ var Ft = pt([
2668
+ xt,
2669
+ wt,
2670
+ Et,
2671
+ Dt,
2672
+ Ot
2673
+ ], "html"), It = pt([
2674
+ xt,
2675
+ Tt,
2676
+ Et,
2677
+ Dt,
2678
+ Ot
2679
+ ], "svg"), Lt = {}.hasOwnProperty;
2680
+ function Rt(e, t) {
2661
2681
  let n = t || {};
2662
2682
  function r(t, ...n) {
2663
2683
  let i = r.invalid, a = r.handlers;
2664
- if (t && own$2.call(t, e)) {
2684
+ if (t && Lt.call(t, e)) {
2665
2685
  let n = String(t[e]);
2666
- i = own$2.call(a, n) ? a[n] : r.unknown;
2686
+ i = Lt.call(a, n) ? a[n] : r.unknown;
2667
2687
  }
2668
2688
  if (i) return i.call(this, t, ...n);
2669
2689
  }
2670
2690
  return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
2671
2691
  }
2672
- var defaultSubsetRegex = /["&'<>`]/g, surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, controlCharactersRegex = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g, regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g, subsetToRegexCache = /* @__PURE__ */ new WeakMap();
2673
- function core(e, t) {
2674
- if (e = e.replace(t.subset ? charactersToExpressionCached(t.subset) : defaultSubsetRegex, r), t.subset || t.escapeOnly) return e;
2675
- return e.replace(surrogatePairsRegex, n).replace(controlCharactersRegex, r);
2692
+ //#endregion
2693
+ //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
2694
+ var zt = /["&'<>`]/g, Bt = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Vt = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g, Ht = /[|\\{}()[\]^$+*?.]/g, Ut = /* @__PURE__ */ new WeakMap();
2695
+ function Wt(e, t) {
2696
+ if (e = e.replace(t.subset ? Gt(t.subset) : zt, r), t.subset || t.escapeOnly) return e;
2697
+ return e.replace(Bt, n).replace(Vt, r);
2676
2698
  function n(e, n, r) {
2677
2699
  return t.format((e.charCodeAt(0) - 55296) * 1024 + e.charCodeAt(1) - 56320 + 65536, r.charCodeAt(n + 2), t);
2678
2700
  }
@@ -2680,26 +2702,32 @@ function core(e, t) {
2680
2702
  return t.format(e.charCodeAt(0), r.charCodeAt(n + 1), t);
2681
2703
  }
2682
2704
  }
2683
- function charactersToExpressionCached(e) {
2684
- let t = subsetToRegexCache.get(e);
2685
- return t || (t = charactersToExpression(e), subsetToRegexCache.set(e, t)), t;
2705
+ function Gt(e) {
2706
+ let t = Ut.get(e);
2707
+ return t || (t = Kt(e), Ut.set(e, t)), t;
2686
2708
  }
2687
- function charactersToExpression(e) {
2709
+ function Kt(e) {
2688
2710
  let t = [], n = -1;
2689
- for (; ++n < e.length;) t.push(e[n].replace(regexEscapeRegex, "\\$&"));
2711
+ for (; ++n < e.length;) t.push(e[n].replace(Ht, "\\$&"));
2690
2712
  return RegExp("(?:" + t.join("|") + ")", "g");
2691
2713
  }
2692
- var hexadecimalRegex = /[\dA-Fa-f]/;
2693
- function toHexadecimal(e, t, n) {
2714
+ //#endregion
2715
+ //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js
2716
+ var qt = /[\dA-Fa-f]/;
2717
+ function Jt(e, t, n) {
2694
2718
  let r = "&#x" + e.toString(16).toUpperCase();
2695
- return n && t && !hexadecimalRegex.test(String.fromCharCode(t)) ? r : r + ";";
2719
+ return n && t && !qt.test(String.fromCharCode(t)) ? r : r + ";";
2696
2720
  }
2697
- var decimalRegex = /\d/;
2698
- function toDecimal(e, t, n) {
2721
+ //#endregion
2722
+ //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js
2723
+ var Yt = /\d/;
2724
+ function Xt(e, t, n) {
2699
2725
  let r = "&#" + String(e);
2700
- return n && t && !decimalRegex.test(String.fromCharCode(t)) ? r : r + ";";
2726
+ return n && t && !Yt.test(String.fromCharCode(t)) ? r : r + ";";
2701
2727
  }
2702
- const characterEntitiesLegacy = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), characterEntitiesHtml4 = {
2728
+ //#endregion
2729
+ //#region ../../node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
2730
+ var Zt = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), Qt = {
2703
2731
  nbsp: "\xA0",
2704
2732
  iexcl: "¡",
2705
2733
  cent: "¢",
@@ -2952,7 +2980,7 @@ const characterEntitiesLegacy = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.A
2952
2980
  lsaquo: "‹",
2953
2981
  rsaquo: "›",
2954
2982
  euro: "€"
2955
- }, dangerous = [
2983
+ }, $t = [
2956
2984
  "cent",
2957
2985
  "copy",
2958
2986
  "divide",
@@ -2961,169 +2989,191 @@ const characterEntitiesLegacy = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.A
2961
2989
  "not",
2962
2990
  "para",
2963
2991
  "times"
2964
- ];
2965
- var own$1 = {}.hasOwnProperty, characters = {}, key;
2966
- for (key in characterEntitiesHtml4) own$1.call(characterEntitiesHtml4, key) && (characters[characterEntitiesHtml4[key]] = key);
2967
- var notAlphanumericRegex = /[^\dA-Za-z]/;
2968
- function toNamed(e, t, n, r) {
2992
+ ], en = {}.hasOwnProperty, tn = {}, L;
2993
+ for (L in Qt) en.call(Qt, L) && (tn[Qt[L]] = L);
2994
+ var nn = /[^\dA-Za-z]/;
2995
+ function rn(e, t, n, r) {
2969
2996
  let i = String.fromCharCode(e);
2970
- if (own$1.call(characters, i)) {
2971
- let e = characters[i], a = "&" + e;
2972
- return n && characterEntitiesLegacy.includes(e) && !dangerous.includes(e) && (!r || t && t !== 61 && notAlphanumericRegex.test(String.fromCharCode(t))) ? a : a + ";";
2997
+ if (en.call(tn, i)) {
2998
+ let e = tn[i], a = "&" + e;
2999
+ return n && Zt.includes(e) && !$t.includes(e) && (!r || t && t !== 61 && nn.test(String.fromCharCode(t))) ? a : a + ";";
2973
3000
  }
2974
3001
  return "";
2975
3002
  }
2976
- function formatSmart(e, t, n) {
2977
- let r = toHexadecimal(e, t, n.omitOptionalSemicolons), i;
2978
- if ((n.useNamedReferences || n.useShortestReferences) && (i = toNamed(e, t, n.omitOptionalSemicolons, n.attribute)), (n.useShortestReferences || !i) && n.useShortestReferences) {
2979
- let i = toDecimal(e, t, n.omitOptionalSemicolons);
3003
+ //#endregion
3004
+ //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js
3005
+ function an(e, t, n) {
3006
+ let r = Jt(e, t, n.omitOptionalSemicolons), i;
3007
+ if ((n.useNamedReferences || n.useShortestReferences) && (i = rn(e, t, n.omitOptionalSemicolons, n.attribute)), (n.useShortestReferences || !i) && n.useShortestReferences) {
3008
+ let i = Xt(e, t, n.omitOptionalSemicolons);
2980
3009
  i.length < r.length && (r = i);
2981
3010
  }
2982
3011
  return i && (!n.useShortestReferences || i.length < r.length) ? i : r;
2983
3012
  }
2984
- function stringifyEntities(e, t) {
2985
- return core(e, Object.assign({ format: formatSmart }, t));
3013
+ //#endregion
3014
+ //#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js
3015
+ function R(e, t) {
3016
+ return Wt(e, Object.assign({ format: an }, t));
2986
3017
  }
2987
- var htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g, bogusCommentEntitySubset = [">"], commentEntitySubset = ["<", ">"];
2988
- function comment(e, t, n, r) {
2989
- return r.settings.bogusComments ? "<?" + stringifyEntities(e.value, Object.assign({}, r.settings.characterReferences, { subset: bogusCommentEntitySubset })) + ">" : "<!--" + e.value.replace(htmlCommentRegex, i) + "-->";
3018
+ //#endregion
3019
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js
3020
+ var on = /^>|^->|<!--|-->|--!>|<!-$/g, sn = [">"], cn = ["<", ">"];
3021
+ function ln(e, t, n, r) {
3022
+ return r.settings.bogusComments ? "<?" + R(e.value, Object.assign({}, r.settings.characterReferences, { subset: sn })) + ">" : "<!--" + e.value.replace(on, i) + "-->";
2990
3023
  function i(e) {
2991
- return stringifyEntities(e, Object.assign({}, r.settings.characterReferences, { subset: commentEntitySubset }));
3024
+ return R(e, Object.assign({}, r.settings.characterReferences, { subset: cn }));
2992
3025
  }
2993
3026
  }
2994
- function doctype(e, t, n, r) {
3027
+ //#endregion
3028
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js
3029
+ function un(e, t, n, r) {
2995
3030
  return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
2996
3031
  }
2997
- function ccount(e, t) {
3032
+ //#endregion
3033
+ //#region ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js
3034
+ function dn(e, t) {
2998
3035
  let n = String(e);
2999
3036
  if (typeof t != "string") throw TypeError("Expected character");
3000
3037
  let r = 0, i = n.indexOf(t);
3001
3038
  for (; i !== -1;) r++, i = n.indexOf(t, i + t.length);
3002
3039
  return r;
3003
3040
  }
3004
- function stringify$2(e, t) {
3041
+ //#endregion
3042
+ //#region ../../node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
3043
+ function fn(e, t) {
3005
3044
  let n = t || {};
3006
3045
  return (e[e.length - 1] === "" ? [...e, ""] : e).join((n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")).trim();
3007
3046
  }
3008
- function stringify$1(e) {
3047
+ //#endregion
3048
+ //#region ../../node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
3049
+ function pn(e) {
3009
3050
  return e.join(" ").trim();
3010
3051
  }
3011
- var re = /[ \t\n\f\r]/g;
3012
- function whitespace(e) {
3013
- return typeof e == "object" ? e.type === "text" ? empty(e.value) : !1 : empty(e);
3052
+ //#endregion
3053
+ //#region ../../node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js
3054
+ var mn = /[ \t\n\f\r]/g;
3055
+ function hn(e) {
3056
+ return typeof e == "object" ? e.type === "text" ? gn(e.value) : !1 : gn(e);
3014
3057
  }
3015
- function empty(e) {
3016
- return e.replace(re, "") === "";
3058
+ function gn(e) {
3059
+ return e.replace(mn, "") === "";
3017
3060
  }
3018
- const siblingAfter = siblings(1), siblingBefore = siblings(-1);
3019
- var emptyChildren$1 = [];
3020
- function siblings(e) {
3061
+ //#endregion
3062
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js
3063
+ var z = yn(1), _n = yn(-1), vn = [];
3064
+ function yn(e) {
3021
3065
  return t;
3022
3066
  function t(t, n, r) {
3023
- let i = t ? t.children : emptyChildren$1, a = (n || 0) + e, o = i[a];
3024
- if (!r) for (; o && whitespace(o);) a += e, o = i[a];
3067
+ let i = t ? t.children : vn, a = (n || 0) + e, o = i[a];
3068
+ if (!r) for (; o && hn(o);) a += e, o = i[a];
3025
3069
  return o;
3026
3070
  }
3027
3071
  }
3028
- var own = {}.hasOwnProperty;
3029
- function omission(e) {
3072
+ //#endregion
3073
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js
3074
+ var bn = {}.hasOwnProperty;
3075
+ function xn(e) {
3030
3076
  return t;
3031
3077
  function t(t, n, r) {
3032
- return own.call(e, t.tagName) && e[t.tagName](t, n, r);
3033
- }
3034
- }
3035
- const closing = omission({
3036
- body: body$1,
3037
- caption: headOrColgroupOrCaption,
3038
- colgroup: headOrColgroupOrCaption,
3039
- dd,
3040
- dt,
3041
- head: headOrColgroupOrCaption,
3042
- html: html$1,
3043
- li,
3044
- optgroup,
3045
- option,
3046
- p,
3047
- rp: rubyElement,
3048
- rt: rubyElement,
3049
- tbody: tbody$1,
3050
- td: cells,
3051
- tfoot,
3052
- th: cells,
3053
- thead,
3054
- tr
3078
+ return bn.call(e, t.tagName) && e[t.tagName](t, n, r);
3079
+ }
3080
+ }
3081
+ //#endregion
3082
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js
3083
+ var Sn = xn({
3084
+ body: Tn,
3085
+ caption: Cn,
3086
+ colgroup: Cn,
3087
+ dd: kn,
3088
+ dt: On,
3089
+ head: Cn,
3090
+ html: wn,
3091
+ li: Dn,
3092
+ optgroup: jn,
3093
+ option: Mn,
3094
+ p: En,
3095
+ rp: An,
3096
+ rt: An,
3097
+ tbody: Pn,
3098
+ td: Ln,
3099
+ tfoot: Fn,
3100
+ th: Ln,
3101
+ thead: Nn,
3102
+ tr: In
3055
3103
  });
3056
- function headOrColgroupOrCaption(e, t, n) {
3057
- let r = siblingAfter(n, t, !0);
3058
- return !r || r.type !== "comment" && !(r.type === "text" && whitespace(r.value.charAt(0)));
3104
+ function Cn(e, t, n) {
3105
+ let r = z(n, t, !0);
3106
+ return !r || r.type !== "comment" && !(r.type === "text" && hn(r.value.charAt(0)));
3059
3107
  }
3060
- function html$1(e, t, n) {
3061
- let r = siblingAfter(n, t);
3108
+ function wn(e, t, n) {
3109
+ let r = z(n, t);
3062
3110
  return !r || r.type !== "comment";
3063
3111
  }
3064
- function body$1(e, t, n) {
3065
- let r = siblingAfter(n, t);
3112
+ function Tn(e, t, n) {
3113
+ let r = z(n, t);
3066
3114
  return !r || r.type !== "comment";
3067
3115
  }
3068
- function p(e, t, n) {
3069
- let r = siblingAfter(n, t);
3116
+ function En(e, t, n) {
3117
+ let r = z(n, t);
3070
3118
  return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || !(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
3071
3119
  }
3072
- function li(e, t, n) {
3073
- let r = siblingAfter(n, t);
3120
+ function Dn(e, t, n) {
3121
+ let r = z(n, t);
3074
3122
  return !r || r.type === "element" && r.tagName === "li";
3075
3123
  }
3076
- function dt(e, t, n) {
3077
- let r = siblingAfter(n, t);
3124
+ function On(e, t, n) {
3125
+ let r = z(n, t);
3078
3126
  return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
3079
3127
  }
3080
- function dd(e, t, n) {
3081
- let r = siblingAfter(n, t);
3128
+ function kn(e, t, n) {
3129
+ let r = z(n, t);
3082
3130
  return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
3083
3131
  }
3084
- function rubyElement(e, t, n) {
3085
- let r = siblingAfter(n, t);
3132
+ function An(e, t, n) {
3133
+ let r = z(n, t);
3086
3134
  return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
3087
3135
  }
3088
- function optgroup(e, t, n) {
3089
- let r = siblingAfter(n, t);
3136
+ function jn(e, t, n) {
3137
+ let r = z(n, t);
3090
3138
  return !r || r.type === "element" && r.tagName === "optgroup";
3091
3139
  }
3092
- function option(e, t, n) {
3093
- let r = siblingAfter(n, t);
3140
+ function Mn(e, t, n) {
3141
+ let r = z(n, t);
3094
3142
  return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
3095
3143
  }
3096
- function thead(e, t, n) {
3097
- let r = siblingAfter(n, t);
3144
+ function Nn(e, t, n) {
3145
+ let r = z(n, t);
3098
3146
  return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
3099
3147
  }
3100
- function tbody$1(e, t, n) {
3101
- let r = siblingAfter(n, t);
3148
+ function Pn(e, t, n) {
3149
+ let r = z(n, t);
3102
3150
  return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
3103
3151
  }
3104
- function tfoot(e, t, n) {
3105
- return !siblingAfter(n, t);
3152
+ function Fn(e, t, n) {
3153
+ return !z(n, t);
3106
3154
  }
3107
- function tr(e, t, n) {
3108
- let r = siblingAfter(n, t);
3155
+ function In(e, t, n) {
3156
+ let r = z(n, t);
3109
3157
  return !r || r.type === "element" && r.tagName === "tr";
3110
3158
  }
3111
- function cells(e, t, n) {
3112
- let r = siblingAfter(n, t);
3159
+ function Ln(e, t, n) {
3160
+ let r = z(n, t);
3113
3161
  return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
3114
3162
  }
3115
- const opening = omission({
3116
- body,
3117
- colgroup,
3118
- head,
3119
- html,
3120
- tbody
3163
+ //#endregion
3164
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js
3165
+ var Rn = xn({
3166
+ body: Vn,
3167
+ colgroup: Hn,
3168
+ head: Bn,
3169
+ html: zn,
3170
+ tbody: Un
3121
3171
  });
3122
- function html(e) {
3123
- let t = siblingAfter(e, -1);
3172
+ function zn(e) {
3173
+ let t = z(e, -1);
3124
3174
  return !t || t.type !== "comment";
3125
3175
  }
3126
- function head(e) {
3176
+ function Bn(e) {
3127
3177
  let t = /* @__PURE__ */ new Set();
3128
3178
  for (let n of e.children) if (n.type === "element" && (n.tagName === "base" || n.tagName === "title")) {
3129
3179
  if (t.has(n.tagName)) return !1;
@@ -3132,35 +3182,37 @@ function head(e) {
3132
3182
  let n = e.children[0];
3133
3183
  return !n || n.type === "element";
3134
3184
  }
3135
- function body(e) {
3136
- let t = siblingAfter(e, -1, !0);
3137
- return !t || t.type !== "comment" && !(t.type === "text" && whitespace(t.value.charAt(0))) && !(t.type === "element" && (t.tagName === "meta" || t.tagName === "link" || t.tagName === "script" || t.tagName === "style" || t.tagName === "template"));
3185
+ function Vn(e) {
3186
+ let t = z(e, -1, !0);
3187
+ return !t || t.type !== "comment" && !(t.type === "text" && hn(t.value.charAt(0))) && !(t.type === "element" && (t.tagName === "meta" || t.tagName === "link" || t.tagName === "script" || t.tagName === "style" || t.tagName === "template"));
3138
3188
  }
3139
- function colgroup(e, t, n) {
3140
- let r = siblingBefore(n, t), i = siblingAfter(e, -1, !0);
3141
- return n && r && r.type === "element" && r.tagName === "colgroup" && closing(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "col");
3189
+ function Hn(e, t, n) {
3190
+ let r = _n(n, t), i = z(e, -1, !0);
3191
+ return n && r && r.type === "element" && r.tagName === "colgroup" && Sn(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "col");
3142
3192
  }
3143
- function tbody(e, t, n) {
3144
- let r = siblingBefore(n, t), i = siblingAfter(e, -1);
3145
- return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && closing(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "tr");
3193
+ function Un(e, t, n) {
3194
+ let r = _n(n, t), i = z(e, -1);
3195
+ return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && Sn(r, n.children.indexOf(r), n) ? !1 : !!(i && i.type === "element" && i.tagName === "tr");
3146
3196
  }
3147
- var constants = {
3197
+ //#endregion
3198
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js
3199
+ var B = {
3148
3200
  name: [[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")], ["\0 \n\f\r \"&'/<=>".split(""), "\0 \n\f\r \"&'/<=>`".split("")]],
3149
3201
  unquoted: [[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")], ["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]],
3150
3202
  single: [["&'".split(""), "\"&'`".split("")], ["\0&'".split(""), "\0\"&'`".split("")]],
3151
3203
  double: [["\"&".split(""), "\"&'`".split("")], ["\0\"&".split(""), "\0\"&'`".split("")]]
3152
3204
  };
3153
- function element(e, t, n, r) {
3205
+ function Wn(e, t, n, r) {
3154
3206
  let i = r.schema, a = i.space === "svg" ? !1 : r.settings.omitOptionalTags, o = i.space === "svg" ? r.settings.closeEmptyElements : r.settings.voids.includes(e.tagName.toLowerCase()), s = [], c;
3155
- i.space === "html" && e.tagName === "svg" && (r.schema = svg);
3156
- let l = serializeAttributes(r, e.properties), u = r.all(i.space === "html" && e.tagName === "template" ? e.content : e);
3157
- return r.schema = i, u && (o = !1), (l || !a || !opening(e, t, n)) && (s.push("<", e.tagName, l ? " " + l : ""), o && (i.space === "svg" || r.settings.closeSelfClosing) && (c = l.charAt(l.length - 1), (!r.settings.tightSelfClosing || c === "/" || c && c !== "\"" && c !== "'") && s.push(" "), s.push("/")), s.push(">")), s.push(u), !o && (!a || !closing(e, t, n)) && s.push("</" + e.tagName + ">"), s.join("");
3207
+ i.space === "html" && e.tagName === "svg" && (r.schema = It);
3208
+ let l = Gn(r, e.properties), u = r.all(i.space === "html" && e.tagName === "template" ? e.content : e);
3209
+ return r.schema = i, u && (o = !1), (l || !a || !Rn(e, t, n)) && (s.push("<", e.tagName, l ? " " + l : ""), o && (i.space === "svg" || r.settings.closeSelfClosing) && (c = l.charAt(l.length - 1), (!r.settings.tightSelfClosing || c === "/" || c && c !== "\"" && c !== "'") && s.push(" "), s.push("/")), s.push(">")), s.push(u), !o && (!a || !Sn(e, t, n)) && s.push("</" + e.tagName + ">"), s.join("");
3158
3210
  }
3159
- function serializeAttributes(e, t) {
3211
+ function Gn(e, t) {
3160
3212
  let n = [], r = -1, i;
3161
3213
  if (t) {
3162
3214
  for (i in t) if (t[i] !== null && t[i] !== void 0) {
3163
- let r = serializeAttribute(e, i, t[i]);
3215
+ let r = Kn(e, i, t[i]);
3164
3216
  r && n.push(r);
3165
3217
  }
3166
3218
  }
@@ -3170,54 +3222,64 @@ function serializeAttributes(e, t) {
3170
3222
  }
3171
3223
  return n.join("");
3172
3224
  }
3173
- function serializeAttribute(e, t, n) {
3174
- let r = find(e.schema, t), i = e.settings.allowParseErrors && e.schema.space === "html" ? 0 : 1, a = e.settings.allowDangerousCharacters ? 0 : 1, o = e.quote, s;
3225
+ function Kn(e, t, n) {
3226
+ let r = Mt(e.schema, t), i = e.settings.allowParseErrors && e.schema.space === "html" ? 0 : 1, a = e.settings.allowDangerousCharacters ? 0 : 1, o = e.quote, s;
3175
3227
  if (r.overloadedBoolean && (n === r.attribute || n === "") ? n = !0 : (r.boolean || r.overloadedBoolean) && (typeof n != "string" || n === r.attribute || n === "") && (n = !!n), n == null || n === !1 || typeof n == "number" && Number.isNaN(n)) return "";
3176
- let c = stringifyEntities(r.attribute, Object.assign({}, e.settings.characterReferences, { subset: constants.name[i][a] }));
3177
- return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? stringify$2 : stringify$1)(n, { padLeft: !e.settings.tightCommaSeparatedLists }) : String(n), e.settings.collapseEmptyAttributes && !n) ? c : (e.settings.preferUnquoted && (s = stringifyEntities(n, Object.assign({}, e.settings.characterReferences, {
3228
+ let c = R(r.attribute, Object.assign({}, e.settings.characterReferences, { subset: B.name[i][a] }));
3229
+ return n === !0 || (n = Array.isArray(n) ? (r.commaSeparated ? fn : pn)(n, { padLeft: !e.settings.tightCommaSeparatedLists }) : String(n), e.settings.collapseEmptyAttributes && !n) ? c : (e.settings.preferUnquoted && (s = R(n, Object.assign({}, e.settings.characterReferences, {
3178
3230
  attribute: !0,
3179
- subset: constants.unquoted[i][a]
3180
- }))), s !== n && (e.settings.quoteSmart && ccount(n, o) > ccount(n, e.alternative) && (o = e.alternative), s = o + stringifyEntities(n, Object.assign({}, e.settings.characterReferences, {
3181
- subset: (o === "'" ? constants.single : constants.double)[i][a],
3231
+ subset: B.unquoted[i][a]
3232
+ }))), s !== n && (e.settings.quoteSmart && dn(n, o) > dn(n, e.alternative) && (o = e.alternative), s = o + R(n, Object.assign({}, e.settings.characterReferences, {
3233
+ subset: (o === "'" ? B.single : B.double)[i][a],
3182
3234
  attribute: !0
3183
3235
  })) + o), c + (s && "=" + s));
3184
3236
  }
3185
- var textEntitySubset = ["<", "&"];
3186
- function text(e, t, n, r) {
3187
- return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? e.value : stringifyEntities(e.value, Object.assign({}, r.settings.characterReferences, { subset: textEntitySubset }));
3237
+ //#endregion
3238
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js
3239
+ var qn = ["<", "&"];
3240
+ function Jn(e, t, n, r) {
3241
+ return n && n.type === "element" && (n.tagName === "script" || n.tagName === "style") ? e.value : R(e.value, Object.assign({}, r.settings.characterReferences, { subset: qn }));
3188
3242
  }
3189
- function raw(e, t, n, r) {
3190
- return r.settings.allowDangerousHtml ? e.value : text(e, t, n, r);
3243
+ //#endregion
3244
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js
3245
+ function Yn(e, t, n, r) {
3246
+ return r.settings.allowDangerousHtml ? e.value : Jn(e, t, n, r);
3191
3247
  }
3192
- function root(e, t, n, r) {
3248
+ //#endregion
3249
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js
3250
+ function Xn(e, t, n, r) {
3193
3251
  return r.all(e);
3194
3252
  }
3195
- const handle = zwitch("type", {
3196
- invalid,
3197
- unknown,
3253
+ //#endregion
3254
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js
3255
+ var Zn = Rt("type", {
3256
+ invalid: Qn,
3257
+ unknown: $n,
3198
3258
  handlers: {
3199
- comment,
3200
- doctype,
3201
- element,
3202
- raw,
3203
- root,
3204
- text
3259
+ comment: ln,
3260
+ doctype: un,
3261
+ element: Wn,
3262
+ raw: Yn,
3263
+ root: Xn,
3264
+ text: Jn
3205
3265
  }
3206
3266
  });
3207
- function invalid(e) {
3267
+ function Qn(e) {
3208
3268
  throw Error("Expected node, not `" + e + "`");
3209
3269
  }
3210
- function unknown(e) {
3270
+ function $n(e) {
3211
3271
  let t = e;
3212
3272
  throw Error("Cannot compile unknown node `" + t.type + "`");
3213
3273
  }
3214
- var emptyOptions = {}, emptyCharacterReferences = {}, emptyChildren = [];
3215
- function toHtml(e, t) {
3216
- let n = t || emptyOptions, r = n.quote || "\"", i = r === "\"" ? "'" : "\"";
3274
+ //#endregion
3275
+ //#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js
3276
+ var er = {}, tr = {}, nr = [];
3277
+ function rr(e, t) {
3278
+ let n = t || er, r = n.quote || "\"", i = r === "\"" ? "'" : "\"";
3217
3279
  if (r !== "\"" && r !== "'") throw Error("Invalid quote `" + r + "`, expected `'` or `\"`");
3218
3280
  return {
3219
- one,
3220
- all,
3281
+ one: ir,
3282
+ all: ar,
3221
3283
  settings: {
3222
3284
  omitOptionalTags: n.omitOptionalTags || !1,
3223
3285
  allowParseErrors: n.allowParseErrors || !1,
@@ -3232,12 +3294,12 @@ function toHtml(e, t) {
3232
3294
  tightSelfClosing: n.tightSelfClosing || !1,
3233
3295
  collapseEmptyAttributes: n.collapseEmptyAttributes || !1,
3234
3296
  allowDangerousHtml: n.allowDangerousHtml || !1,
3235
- voids: n.voids || htmlVoidElements,
3236
- characterReferences: n.characterReferences || emptyCharacterReferences,
3297
+ voids: n.voids || ft,
3298
+ characterReferences: n.characterReferences || tr,
3237
3299
  closeSelfClosing: n.closeSelfClosing || !1,
3238
3300
  closeEmptyElements: n.closeEmptyElements || !1
3239
3301
  },
3240
- schema: n.space === "svg" ? svg : html$2,
3302
+ schema: n.space === "svg" ? It : Ft,
3241
3303
  quote: r,
3242
3304
  alternative: i
3243
3305
  }.one(Array.isArray(e) ? {
@@ -3245,29 +3307,31 @@ function toHtml(e, t) {
3245
3307
  children: e
3246
3308
  } : e, void 0, void 0);
3247
3309
  }
3248
- function one(e, t, n) {
3249
- return handle(e, t, n, this);
3310
+ function ir(e, t, n) {
3311
+ return Zn(e, t, n, this);
3250
3312
  }
3251
- function all(e) {
3252
- let t = [], n = e && e.children || emptyChildren, r = -1;
3313
+ function ar(e) {
3314
+ let t = [], n = e && e.children || nr, r = -1;
3253
3315
  for (; ++r < n.length;) t[r] = this.one(n[r], r, e);
3254
3316
  return t.join("");
3255
3317
  }
3256
- function resolveColorReplacements(e, t) {
3318
+ //#endregion
3319
+ //#region ../../node_modules/.pnpm/@shikijs+core@3.22.0/node_modules/@shikijs/core/dist/index.mjs
3320
+ function V(e, t) {
3257
3321
  let n = typeof e == "string" ? {} : { ...e.colorReplacements }, r = typeof e == "string" ? e : e.name;
3258
3322
  for (let [e, i] of Object.entries(t?.colorReplacements || {})) typeof i == "string" ? n[e] = i : e === r && Object.assign(n, i);
3259
3323
  return n;
3260
3324
  }
3261
- function applyColorReplacements(e, t) {
3325
+ function H(e, t) {
3262
3326
  return e && (t?.[e?.toLowerCase()] || e);
3263
3327
  }
3264
- function toArray(e) {
3328
+ function or(e) {
3265
3329
  return Array.isArray(e) ? e : [e];
3266
3330
  }
3267
- async function normalizeGetter(e) {
3331
+ async function sr(e) {
3268
3332
  return Promise.resolve(typeof e == "function" ? e() : e).then((e) => e.default || e);
3269
3333
  }
3270
- function isPlainLang(e) {
3334
+ function U(e) {
3271
3335
  return !e || [
3272
3336
  "plaintext",
3273
3337
  "txt",
@@ -3275,23 +3339,23 @@ function isPlainLang(e) {
3275
3339
  "plain"
3276
3340
  ].includes(e);
3277
3341
  }
3278
- function isSpecialLang(e) {
3279
- return e === "ansi" || isPlainLang(e);
3342
+ function cr(e) {
3343
+ return e === "ansi" || U(e);
3280
3344
  }
3281
- function isNoneTheme(e) {
3345
+ function W(e) {
3282
3346
  return e === "none";
3283
3347
  }
3284
- function isSpecialTheme(e) {
3285
- return isNoneTheme(e);
3348
+ function lr(e) {
3349
+ return W(e);
3286
3350
  }
3287
- function addClassToHast(e, t) {
3351
+ function ur(e, t) {
3288
3352
  if (!t) return e;
3289
3353
  e.properties ||= {}, e.properties.class ||= [], typeof e.properties.class == "string" && (e.properties.class = e.properties.class.split(/\s+/g)), Array.isArray(e.properties.class) || (e.properties.class = []);
3290
3354
  let n = Array.isArray(t) ? t : t.split(/\s+/g);
3291
3355
  for (let t of n) t && !e.properties.class.includes(t) && e.properties.class.push(t);
3292
3356
  return e;
3293
3357
  }
3294
- function splitLines(e, t = !1) {
3358
+ function G(e, t = !1) {
3295
3359
  if (e.length === 0) return [["", 0]];
3296
3360
  let n = e.split(/(\r?\n)/g), r = 0, i = [];
3297
3361
  for (let e = 0; e < n.length; e += 2) {
@@ -3300,8 +3364,8 @@ function splitLines(e, t = !1) {
3300
3364
  }
3301
3365
  return i;
3302
3366
  }
3303
- function createPositionConverter(e) {
3304
- let t = splitLines(e, !0).map(([e]) => e);
3367
+ function dr(e) {
3368
+ let t = G(e, !0).map(([e]) => e);
3305
3369
  function n(n) {
3306
3370
  if (n === e.length) return {
3307
3371
  line: t.length - 1,
@@ -3328,7 +3392,7 @@ function createPositionConverter(e) {
3328
3392
  posToIndex: r
3329
3393
  };
3330
3394
  }
3331
- function guessEmbeddedLanguages(e, t, n) {
3395
+ function fr(e, t, n) {
3332
3396
  let r = /* @__PURE__ */ new Set();
3333
3397
  for (let t of e.matchAll(/:?lang=["']([^"']+)["']/g)) {
3334
3398
  let e = t[1].toLowerCase().trim();
@@ -3350,8 +3414,8 @@ function guessEmbeddedLanguages(e, t, n) {
3350
3414
  let i = n.getBundledLanguages();
3351
3415
  return Array.from(r).filter((e) => e && i[e]);
3352
3416
  }
3353
- var DEFAULT_COLOR_LIGHT_DARK = "light-dark()", COLOR_KEYS = ["color", "background-color"];
3354
- function splitToken(e, t) {
3417
+ var pr = "light-dark()", mr = ["color", "background-color"];
3418
+ function hr(e, t) {
3355
3419
  let n = 0, r = [];
3356
3420
  for (let i of t) i > n && r.push({
3357
3421
  ...e,
@@ -3364,54 +3428,54 @@ function splitToken(e, t) {
3364
3428
  offset: e.offset + n
3365
3429
  }), r;
3366
3430
  }
3367
- function splitTokens(e, t) {
3431
+ function gr(e, t) {
3368
3432
  let n = Array.from(t instanceof Set ? t : new Set(t)).sort((e, t) => e - t);
3369
3433
  return n.length ? e.map((e) => e.flatMap((e) => {
3370
3434
  let t = n.filter((t) => e.offset < t && t < e.offset + e.content.length).map((t) => t - e.offset).sort((e, t) => e - t);
3371
- return t.length ? splitToken(e, t) : e;
3435
+ return t.length ? hr(e, t) : e;
3372
3436
  })) : e;
3373
3437
  }
3374
- function flatTokenVariants(e, n, r, i, a = "css-vars") {
3438
+ function _r(e, n, r, i, a = "css-vars") {
3375
3439
  let o = {
3376
3440
  content: e.content,
3377
3441
  explanation: e.explanation,
3378
3442
  offset: e.offset
3379
- }, s = n.map((t) => getTokenStyleObject(e.variants[t])), c = new Set(s.flatMap((e) => Object.keys(e))), l = {}, u = (e, t) => {
3443
+ }, s = n.map((t) => K(e.variants[t])), c = new Set(s.flatMap((e) => Object.keys(e))), l = {}, u = (e, t) => {
3380
3444
  let i = t === "color" ? "" : t === "background-color" ? "-bg" : `-${t}`;
3381
3445
  return r + n[e] + (t === "color" ? "" : i);
3382
3446
  };
3383
3447
  return s.forEach((e, r) => {
3384
3448
  for (let o of c) {
3385
3449
  let c = e[o] || "inherit";
3386
- if (r === 0 && i && COLOR_KEYS.includes(o)) if (i === DEFAULT_COLOR_LIGHT_DARK && s.length > 1) {
3450
+ if (r === 0 && i && mr.includes(o)) if (i === pr && s.length > 1) {
3387
3451
  let e = n.findIndex((e) => e === "light"), i = n.findIndex((e) => e === "dark");
3388
- if (e === -1 || i === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
3452
+ if (e === -1 || i === -1) throw new t("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
3389
3453
  l[o] = `light-dark(${s[e][o] || "inherit"}, ${s[i][o] || "inherit"})`, a === "css-vars" && (l[u(r, o)] = c);
3390
3454
  } else l[o] = c;
3391
3455
  else a === "css-vars" && (l[u(r, o)] = c);
3392
3456
  }
3393
3457
  }), o.htmlStyle = l, o;
3394
3458
  }
3395
- function getTokenStyleObject(e) {
3459
+ function K(e) {
3396
3460
  let t = {};
3397
3461
  if (e.color && (t.color = e.color), e.bgColor && (t["background-color"] = e.bgColor), e.fontStyle) {
3398
- e.fontStyle & FontStyle.Italic && (t["font-style"] = "italic"), e.fontStyle & FontStyle.Bold && (t["font-weight"] = "bold");
3462
+ e.fontStyle & v.Italic && (t["font-style"] = "italic"), e.fontStyle & v.Bold && (t["font-weight"] = "bold");
3399
3463
  let n = [];
3400
- e.fontStyle & FontStyle.Underline && n.push("underline"), e.fontStyle & FontStyle.Strikethrough && n.push("line-through"), n.length && (t["text-decoration"] = n.join(" "));
3464
+ e.fontStyle & v.Underline && n.push("underline"), e.fontStyle & v.Strikethrough && n.push("line-through"), n.length && (t["text-decoration"] = n.join(" "));
3401
3465
  }
3402
3466
  return t;
3403
3467
  }
3404
- function stringifyTokenStyle(e) {
3468
+ function vr(e) {
3405
3469
  return typeof e == "string" ? e : Object.entries(e).map(([e, t]) => `${e}:${t}`).join(";");
3406
3470
  }
3407
- var _grammarStateMap = /* @__PURE__ */ new WeakMap();
3408
- function setLastGrammarStateToMap(e, t) {
3409
- _grammarStateMap.set(e, t);
3471
+ var yr = /* @__PURE__ */ new WeakMap();
3472
+ function br(e, t) {
3473
+ yr.set(e, t);
3410
3474
  }
3411
- function getLastGrammarStateFromMap(e) {
3412
- return _grammarStateMap.get(e);
3475
+ function q(e) {
3476
+ return yr.get(e);
3413
3477
  }
3414
- var GrammarState = class e {
3478
+ var xr = class e {
3415
3479
  _stacks = {};
3416
3480
  lang;
3417
3481
  get themes() {
@@ -3424,7 +3488,7 @@ var GrammarState = class e {
3424
3488
  return this._stacks[this.theme];
3425
3489
  }
3426
3490
  static initial(t, n) {
3427
- return new e(Object.fromEntries(toArray(n).map((e) => [e, INITIAL])), t);
3491
+ return new e(Object.fromEntries(or(n).map((e) => [e, dt])), t);
3428
3492
  }
3429
3493
  constructor(...e) {
3430
3494
  if (e.length === 2) {
@@ -3439,7 +3503,7 @@ var GrammarState = class e {
3439
3503
  return this._stacks[e];
3440
3504
  }
3441
3505
  getScopes(e = this.theme) {
3442
- return getScopes(this._stacks[e]);
3506
+ return Sr(this._stacks[e]);
3443
3507
  }
3444
3508
  toJSON() {
3445
3509
  return {
@@ -3450,7 +3514,7 @@ var GrammarState = class e {
3450
3514
  };
3451
3515
  }
3452
3516
  };
3453
- function getScopes(e) {
3517
+ function Sr(e) {
3454
3518
  let t = [], n = /* @__PURE__ */ new Set();
3455
3519
  function r(e) {
3456
3520
  if (n.has(e)) return;
@@ -3460,38 +3524,38 @@ function getScopes(e) {
3460
3524
  }
3461
3525
  return r(e), t;
3462
3526
  }
3463
- function getGrammarStack(e, n) {
3464
- if (!(e instanceof GrammarState)) throw new ShikiError("Invalid grammar state");
3527
+ function Cr(e, n) {
3528
+ if (!(e instanceof xr)) throw new t("Invalid grammar state");
3465
3529
  return e.getInternalStack(n);
3466
3530
  }
3467
- function transformerDecorations() {
3531
+ function wr() {
3468
3532
  let e = /* @__PURE__ */ new WeakMap();
3469
3533
  function n(n) {
3470
3534
  if (!e.has(n.meta)) {
3471
3535
  let r = function(e) {
3472
3536
  if (typeof e == "number") {
3473
- if (e < 0 || e > n.source.length) throw new ShikiError(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);
3537
+ if (e < 0 || e > n.source.length) throw new t(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);
3474
3538
  return {
3475
3539
  ...i.indexToPos(e),
3476
3540
  offset: e
3477
3541
  };
3478
3542
  } else {
3479
3543
  let n = i.lines[e.line];
3480
- if (n === void 0) throw new ShikiError(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${i.lines.length}`);
3544
+ if (n === void 0) throw new t(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${i.lines.length}`);
3481
3545
  let r = e.character;
3482
- if (r < 0 && (r = n.length + r), r < 0 || r > n.length) throw new ShikiError(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);
3546
+ if (r < 0 && (r = n.length + r), r < 0 || r > n.length) throw new t(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);
3483
3547
  return {
3484
3548
  ...e,
3485
3549
  character: r,
3486
3550
  offset: i.posToIndex(e.line, r)
3487
3551
  };
3488
3552
  }
3489
- }, i = createPositionConverter(n.source), a = (n.options.decorations || []).map((e) => ({
3553
+ }, i = dr(n.source), a = (n.options.decorations || []).map((e) => ({
3490
3554
  ...e,
3491
3555
  start: r(e.start),
3492
3556
  end: r(e.end)
3493
3557
  }));
3494
- verifyIntersections(a), e.set(n.meta, {
3558
+ Tr(a), e.set(n.meta, {
3495
3559
  decorations: a,
3496
3560
  converter: i,
3497
3561
  source: n.source
@@ -3502,17 +3566,17 @@ function transformerDecorations() {
3502
3566
  return {
3503
3567
  name: "shiki:decorations",
3504
3568
  tokens(e) {
3505
- if (this.options.decorations?.length) return splitTokens(e, n(this).decorations.flatMap((e) => [e.start.offset, e.end.offset]));
3569
+ if (this.options.decorations?.length) return gr(e, n(this).decorations.flatMap((e) => [e.start.offset, e.end.offset]));
3506
3570
  },
3507
3571
  code(e) {
3508
3572
  if (!this.options.decorations?.length) return;
3509
3573
  let r = n(this), i = Array.from(e.children).filter((e) => e.type === "element" && e.tagName === "span");
3510
- if (i.length !== r.converter.lines.length) throw new ShikiError(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
3574
+ if (i.length !== r.converter.lines.length) throw new t(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
3511
3575
  function a(e, n, r, a) {
3512
3576
  let o = i[e], c = "", l = -1, u = -1;
3513
- if (n === 0 && (l = 0), r === 0 && (u = 0), r === Infinity && (u = o.children.length), l === -1 || u === -1) for (let e = 0; e < o.children.length; e++) c += stringify(o.children[e]), l === -1 && c.length === n && (l = e + 1), u === -1 && c.length === r && (u = e + 1);
3514
- if (l === -1) throw new ShikiError(`Failed to find start index for decoration ${JSON.stringify(a.start)}`);
3515
- if (u === -1) throw new ShikiError(`Failed to find end index for decoration ${JSON.stringify(a.end)}`);
3577
+ if (n === 0 && (l = 0), r === 0 && (u = 0), r === Infinity && (u = o.children.length), l === -1 || u === -1) for (let e = 0; e < o.children.length; e++) c += Er(o.children[e]), l === -1 && c.length === n && (l = e + 1), u === -1 && c.length === r && (u = e + 1);
3578
+ if (l === -1) throw new t(`Failed to find start index for decoration ${JSON.stringify(a.start)}`);
3579
+ if (u === -1) throw new t(`Failed to find end index for decoration ${JSON.stringify(a.end)}`);
3516
3580
  let d = o.children.slice(l, u);
3517
3581
  if (!a.alwaysWrap && d.length === o.children.length) s(o, a, "line");
3518
3582
  else if (!a.alwaysWrap && d.length === 1 && d[0].type === "element") s(d[0], a, "token");
@@ -3535,7 +3599,7 @@ function transformerDecorations() {
3535
3599
  ...e.properties,
3536
3600
  ...r,
3537
3601
  class: e.properties.class
3538
- }, t.properties?.class && addClassToHast(e, t.properties.class), e = i(e, n) || e, e;
3602
+ }, t.properties?.class && ur(e, t.properties.class), e = i(e, n) || e, e;
3539
3603
  }
3540
3604
  let c = [], l = r.decorations.sort((e, t) => t.start.offset - e.start.offset || e.end.offset - t.end.offset);
3541
3605
  for (let e of l) {
@@ -3551,33 +3615,33 @@ function transformerDecorations() {
3551
3615
  }
3552
3616
  };
3553
3617
  }
3554
- function verifyIntersections(e) {
3618
+ function Tr(e) {
3555
3619
  for (let n = 0; n < e.length; n++) {
3556
3620
  let r = e[n];
3557
- if (r.start.offset > r.end.offset) throw new ShikiError(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);
3621
+ if (r.start.offset > r.end.offset) throw new t(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);
3558
3622
  for (let i = n + 1; i < e.length; i++) {
3559
3623
  let n = e[i], a = r.start.offset <= n.start.offset && n.start.offset < r.end.offset, o = r.start.offset < n.end.offset && n.end.offset <= r.end.offset, s = n.start.offset <= r.start.offset && r.start.offset < n.end.offset, c = n.start.offset < r.end.offset && r.end.offset <= n.end.offset;
3560
3624
  if (a || o || s || c) {
3561
3625
  if (a && o || s && c || s && r.start.offset === r.end.offset || o && n.start.offset === n.end.offset) continue;
3562
- throw new ShikiError(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(n.start)} intersect.`);
3626
+ throw new t(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(n.start)} intersect.`);
3563
3627
  }
3564
3628
  }
3565
3629
  }
3566
3630
  }
3567
- function stringify(e) {
3568
- return e.type === "text" ? e.value : e.type === "element" ? e.children.map(stringify).join("") : "";
3631
+ function Er(e) {
3632
+ return e.type === "text" ? e.value : e.type === "element" ? e.children.map(Er).join("") : "";
3569
3633
  }
3570
- var builtInTransformers = [/* @__PURE__ */ transformerDecorations()];
3571
- function getTransformers(e) {
3572
- let t = sortTransformersByEnforcement(e.transformers || []);
3634
+ var Dr = [/* @__PURE__ */ wr()];
3635
+ function Or(e) {
3636
+ let t = kr(e.transformers || []);
3573
3637
  return [
3574
3638
  ...t.pre,
3575
3639
  ...t.normal,
3576
3640
  ...t.post,
3577
- ...builtInTransformers
3641
+ ...Dr
3578
3642
  ];
3579
3643
  }
3580
- function sortTransformersByEnforcement(e) {
3644
+ function kr(e) {
3581
3645
  let t = [], n = [], r = [];
3582
3646
  for (let i of e) switch (i.enforce) {
3583
3647
  case "pre":
@@ -3594,7 +3658,7 @@ function sortTransformersByEnforcement(e) {
3594
3658
  normal: r
3595
3659
  };
3596
3660
  }
3597
- var namedColors = [
3661
+ var J = [
3598
3662
  "black",
3599
3663
  "red",
3600
3664
  "green",
@@ -3611,7 +3675,7 @@ var namedColors = [
3611
3675
  "brightMagenta",
3612
3676
  "brightCyan",
3613
3677
  "brightWhite"
3614
- ], decorations = {
3678
+ ], Ar = {
3615
3679
  1: "bold",
3616
3680
  2: "dim",
3617
3681
  3: "italic",
@@ -3620,7 +3684,7 @@ var namedColors = [
3620
3684
  8: "hidden",
3621
3685
  9: "strikethrough"
3622
3686
  };
3623
- function findSequence(e, t) {
3687
+ function jr(e, t) {
3624
3688
  let n = e.indexOf("\x1B", t);
3625
3689
  if (n !== -1 && e[n + 1] === "[") {
3626
3690
  let t = e.indexOf("m", n);
@@ -3632,7 +3696,7 @@ function findSequence(e, t) {
3632
3696
  }
3633
3697
  return { position: e.length };
3634
3698
  }
3635
- function parseColor(e) {
3699
+ function Mr(e) {
3636
3700
  let t = e.shift();
3637
3701
  if (t === "2") {
3638
3702
  let t = e.splice(0, 3).map((e) => Number.parseInt(e));
@@ -3648,19 +3712,19 @@ function parseColor(e) {
3648
3712
  };
3649
3713
  }
3650
3714
  }
3651
- function parseSequence(e) {
3715
+ function Nr(e) {
3652
3716
  let t = [];
3653
3717
  for (; e.length > 0;) {
3654
3718
  let n = e.shift();
3655
3719
  if (!n) continue;
3656
3720
  let r = Number.parseInt(n);
3657
3721
  if (!Number.isNaN(r)) if (r === 0) t.push({ type: "resetAll" });
3658
- else if (r <= 9) decorations[r] && t.push({
3722
+ else if (r <= 9) Ar[r] && t.push({
3659
3723
  type: "setDecoration",
3660
- value: decorations[r]
3724
+ value: Ar[r]
3661
3725
  });
3662
3726
  else if (r <= 29) {
3663
- let e = decorations[r - 20];
3727
+ let e = Ar[r - 20];
3664
3728
  e && (t.push({
3665
3729
  type: "resetDecoration",
3666
3730
  value: e
@@ -3672,11 +3736,11 @@ function parseSequence(e) {
3672
3736
  type: "setForegroundColor",
3673
3737
  value: {
3674
3738
  type: "named",
3675
- name: namedColors[r - 30]
3739
+ name: J[r - 30]
3676
3740
  }
3677
3741
  });
3678
3742
  else if (r === 38) {
3679
- let n = parseColor(e);
3743
+ let n = Mr(e);
3680
3744
  n && t.push({
3681
3745
  type: "setForegroundColor",
3682
3746
  value: n
@@ -3686,11 +3750,11 @@ function parseSequence(e) {
3686
3750
  type: "setBackgroundColor",
3687
3751
  value: {
3688
3752
  type: "named",
3689
- name: namedColors[r - 40]
3753
+ name: J[r - 40]
3690
3754
  }
3691
3755
  });
3692
3756
  else if (r === 48) {
3693
- let n = parseColor(e);
3757
+ let n = Mr(e);
3694
3758
  n && t.push({
3695
3759
  type: "setBackgroundColor",
3696
3760
  value: n
@@ -3705,31 +3769,31 @@ function parseSequence(e) {
3705
3769
  type: "setForegroundColor",
3706
3770
  value: {
3707
3771
  type: "named",
3708
- name: namedColors[r - 90 + 8]
3772
+ name: J[r - 90 + 8]
3709
3773
  }
3710
3774
  }) : r >= 100 && r <= 107 && t.push({
3711
3775
  type: "setBackgroundColor",
3712
3776
  value: {
3713
3777
  type: "named",
3714
- name: namedColors[r - 100 + 8]
3778
+ name: J[r - 100 + 8]
3715
3779
  }
3716
3780
  });
3717
3781
  }
3718
3782
  return t;
3719
3783
  }
3720
- function createAnsiSequenceParser() {
3784
+ function Pr() {
3721
3785
  let e = null, t = null, n = /* @__PURE__ */ new Set();
3722
3786
  return { parse(r) {
3723
3787
  let i = [], a = 0;
3724
3788
  do {
3725
- let o = findSequence(r, a), s = o.sequence ? r.substring(a, o.startPosition) : r.substring(a);
3789
+ let o = jr(r, a), s = o.sequence ? r.substring(a, o.startPosition) : r.substring(a);
3726
3790
  if (s.length > 0 && i.push({
3727
3791
  value: s,
3728
3792
  foreground: e,
3729
3793
  background: t,
3730
3794
  decorations: new Set(n)
3731
3795
  }), o.sequence) {
3732
- let r = parseSequence(o.sequence);
3796
+ let r = Nr(o.sequence);
3733
3797
  for (let i of r) i.type === "resetAll" ? (e = null, t = null, n.clear()) : i.type === "resetForegroundColor" ? e = null : i.type === "resetBackgroundColor" ? t = null : i.type === "resetDecoration" && n.delete(i.value);
3734
3798
  for (let i of r) i.type === "setForegroundColor" ? e = i.value : i.type === "setBackgroundColor" ? t = i.value : i.type === "setDecoration" && n.add(i.value);
3735
3799
  }
@@ -3738,7 +3802,7 @@ function createAnsiSequenceParser() {
3738
3802
  return i;
3739
3803
  } };
3740
3804
  }
3741
- var defaultNamedColorsMap = {
3805
+ var Fr = {
3742
3806
  black: "#000000",
3743
3807
  red: "#bb0000",
3744
3808
  green: "#00bb00",
@@ -3756,7 +3820,7 @@ var defaultNamedColorsMap = {
3756
3820
  brightCyan: "#55ffff",
3757
3821
  brightWhite: "#ffffff"
3758
3822
  };
3759
- function createColorPalette(e = defaultNamedColorsMap) {
3823
+ function Ir(e = Fr) {
3760
3824
  function t(t) {
3761
3825
  return e[t];
3762
3826
  }
@@ -3767,7 +3831,7 @@ function createColorPalette(e = defaultNamedColorsMap) {
3767
3831
  function i() {
3768
3832
  if (r) return r;
3769
3833
  r = [];
3770
- for (let e = 0; e < namedColors.length; e++) r.push(t(namedColors[e]));
3834
+ for (let e = 0; e < J.length; e++) r.push(t(J[e]));
3771
3835
  let e = [
3772
3836
  0,
3773
3837
  95,
@@ -3801,7 +3865,7 @@ function createColorPalette(e = defaultNamedColorsMap) {
3801
3865
  }
3802
3866
  return { value: o };
3803
3867
  }
3804
- var defaultAnsiColors = {
3868
+ var Lr = {
3805
3869
  black: "#000000",
3806
3870
  red: "#cd3131",
3807
3871
  green: "#0DBC79",
@@ -3819,16 +3883,16 @@ var defaultAnsiColors = {
3819
3883
  brightCyan: "#29B8DB",
3820
3884
  brightWhite: "#FFFFFF"
3821
3885
  };
3822
- function tokenizeAnsiWithTheme(e, t, n) {
3823
- let r = resolveColorReplacements(e, n), i = splitLines(t), a = createColorPalette(Object.fromEntries(namedColors.map((t) => {
3886
+ function Rr(e, t, n) {
3887
+ let r = V(e, n), i = G(t), a = Ir(Object.fromEntries(J.map((t) => {
3824
3888
  let n = `terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;
3825
- return [t, e.colors?.[n] || defaultAnsiColors[t]];
3826
- }))), o = createAnsiSequenceParser();
3889
+ return [t, e.colors?.[n] || Lr[t]];
3890
+ }))), o = Pr();
3827
3891
  return i.map((t) => o.parse(t[0]).map((n) => {
3828
3892
  let i, o;
3829
- n.decorations.has("reverse") ? (i = n.background ? a.value(n.background) : e.bg, o = n.foreground ? a.value(n.foreground) : e.fg) : (i = n.foreground ? a.value(n.foreground) : e.fg, o = n.background ? a.value(n.background) : void 0), i = applyColorReplacements(i, r), o = applyColorReplacements(o, r), n.decorations.has("dim") && (i = dimColor(i));
3830
- let s = FontStyle.None;
3831
- return n.decorations.has("bold") && (s |= FontStyle.Bold), n.decorations.has("italic") && (s |= FontStyle.Italic), n.decorations.has("underline") && (s |= FontStyle.Underline), n.decorations.has("strikethrough") && (s |= FontStyle.Strikethrough), {
3893
+ n.decorations.has("reverse") ? (i = n.background ? a.value(n.background) : e.bg, o = n.foreground ? a.value(n.foreground) : e.fg) : (i = n.foreground ? a.value(n.foreground) : e.fg, o = n.background ? a.value(n.background) : void 0), i = H(i, r), o = H(o, r), n.decorations.has("dim") && (i = zr(i));
3894
+ let s = v.None;
3895
+ return n.decorations.has("bold") && (s |= v.Bold), n.decorations.has("italic") && (s |= v.Italic), n.decorations.has("underline") && (s |= v.Underline), n.decorations.has("strikethrough") && (s |= v.Strikethrough), {
3832
3896
  content: n.value,
3833
3897
  offset: t[1],
3834
3898
  color: i,
@@ -3837,7 +3901,7 @@ function tokenizeAnsiWithTheme(e, t, n) {
3837
3901
  };
3838
3902
  }));
3839
3903
  }
3840
- function dimColor(e) {
3904
+ function zr(e) {
3841
3905
  let t = e.match(/#([0-9a-f]{3,8})/i);
3842
3906
  if (t) {
3843
3907
  let e = t[1];
@@ -3856,41 +3920,41 @@ function dimColor(e) {
3856
3920
  let n = e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
3857
3921
  return n ? `var(${n[1]}-dim)` : e;
3858
3922
  }
3859
- function codeToTokensBase(e, n, r = {}) {
3923
+ function Y(e, n, r = {}) {
3860
3924
  let { theme: i = e.getLoadedThemes()[0] } = r, a = e.resolveLangAlias(r.lang || "text");
3861
- if (isPlainLang(a) || isNoneTheme(i)) return splitLines(n).map((e) => [{
3925
+ if (U(a) || W(i)) return G(n).map((e) => [{
3862
3926
  content: e[0],
3863
3927
  offset: e[1]
3864
3928
  }]);
3865
3929
  let { theme: o, colorMap: s } = e.setTheme(i);
3866
- if (a === "ansi") return tokenizeAnsiWithTheme(o, n, r);
3930
+ if (a === "ansi") return Rr(o, n, r);
3867
3931
  let c = e.getLanguage(r.lang || "text");
3868
3932
  if (r.grammarState) {
3869
- if (r.grammarState.lang !== c.name) throw new ShikiError(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${c.name}"`);
3870
- if (!r.grammarState.themes.includes(o.name)) throw new ShikiError(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${o.name}"`);
3933
+ if (r.grammarState.lang !== c.name) throw new t(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${c.name}"`);
3934
+ if (!r.grammarState.themes.includes(o.name)) throw new t(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${o.name}"`);
3871
3935
  }
3872
- return tokenizeWithTheme(n, c, o, s, r);
3936
+ return Vr(n, c, o, s, r);
3873
3937
  }
3874
- function getLastGrammarState(...e) {
3875
- if (e.length === 2) return getLastGrammarStateFromMap(e[1]);
3938
+ function Br(...e) {
3939
+ if (e.length === 2) return q(e[1]);
3876
3940
  let [n, r, i = {}] = e, { lang: a = "text", theme: o = n.getLoadedThemes()[0] } = i;
3877
- if (isPlainLang(a) || isNoneTheme(o)) throw new ShikiError("Plain language does not have grammar state");
3878
- if (a === "ansi") throw new ShikiError("ANSI language does not have grammar state");
3941
+ if (U(a) || W(o)) throw new t("Plain language does not have grammar state");
3942
+ if (a === "ansi") throw new t("ANSI language does not have grammar state");
3879
3943
  let { theme: s, colorMap: c } = n.setTheme(o), l = n.getLanguage(a);
3880
- return new GrammarState(_tokenizeWithTheme(r, l, s, c, i).stateStack, l.name, s.name);
3944
+ return new xr(Hr(r, l, s, c, i).stateStack, l.name, s.name);
3881
3945
  }
3882
- function tokenizeWithTheme(e, t, n, r, i) {
3883
- let a = _tokenizeWithTheme(e, t, n, r, i), o = new GrammarState(a.stateStack, t.name, n.name);
3884
- return setLastGrammarStateToMap(a.tokens, o), a.tokens;
3946
+ function Vr(e, t, n, r, i) {
3947
+ let a = Hr(e, t, n, r, i), o = new xr(a.stateStack, t.name, n.name);
3948
+ return br(a.tokens, o), a.tokens;
3885
3949
  }
3886
- function _tokenizeWithTheme(e, t, n, r, i) {
3887
- let a = resolveColorReplacements(n, i), { tokenizeMaxLineLength: o = 0, tokenizeTimeLimit: s = 500 } = i, c = splitLines(e), l = i.grammarState ? getGrammarStack(i.grammarState, n.name) ?? INITIAL : i.grammarContextCode == null ? INITIAL : _tokenizeWithTheme(i.grammarContextCode, t, n, r, {
3950
+ function Hr(e, t, n, r, i) {
3951
+ let a = V(n, i), { tokenizeMaxLineLength: o = 0, tokenizeTimeLimit: s = 500 } = i, c = G(e), l = i.grammarState ? Cr(i.grammarState, n.name) ?? dt : i.grammarContextCode == null ? dt : Hr(i.grammarContextCode, t, n, r, {
3888
3952
  ...i,
3889
3953
  grammarState: void 0,
3890
3954
  grammarContextCode: void 0
3891
3955
  }).stateStack, u = [], d = [];
3892
3956
  for (let e = 0, f = c.length; e < f; e++) {
3893
- let [f, m] = c[e];
3957
+ let [f, p] = c[e];
3894
3958
  if (f === "") {
3895
3959
  u = [], d.push([]);
3896
3960
  continue;
@@ -3898,21 +3962,21 @@ function _tokenizeWithTheme(e, t, n, r, i) {
3898
3962
  if (o > 0 && f.length >= o) {
3899
3963
  u = [], d.push([{
3900
3964
  content: f,
3901
- offset: m,
3965
+ offset: p,
3902
3966
  color: "",
3903
3967
  fontStyle: 0
3904
3968
  }]);
3905
3969
  continue;
3906
3970
  }
3907
- let h, g, _;
3908
- i.includeExplanation && (h = t.tokenizeLine(f, l, s), g = h.tokens, _ = 0);
3909
- let v = t.tokenizeLine2(f, l, s), y = v.tokens.length / 2;
3910
- for (let e = 0; e < y; e++) {
3911
- let t = v.tokens[2 * e], o = e + 1 < y ? v.tokens[2 * e + 2] : f.length;
3971
+ let m, h, g;
3972
+ i.includeExplanation && (m = t.tokenizeLine(f, l, s), h = m.tokens, g = 0);
3973
+ let _ = t.tokenizeLine2(f, l, s), ee = _.tokens.length / 2;
3974
+ for (let e = 0; e < ee; e++) {
3975
+ let t = _.tokens[2 * e], o = e + 1 < ee ? _.tokens[2 * e + 2] : f.length;
3912
3976
  if (t === o) continue;
3913
- let s = v.tokens[2 * e + 1], c = applyColorReplacements(r[EncodedTokenMetadata.getForeground(s)], a), l = EncodedTokenMetadata.getFontStyle(s), d = {
3977
+ let s = _.tokens[2 * e + 1], c = H(r[y.getForeground(s)], a), l = y.getFontStyle(s), d = {
3914
3978
  content: f.substring(t, o),
3915
- offset: m + t,
3979
+ offset: p + t,
3916
3980
  color: c,
3917
3981
  fontStyle: l
3918
3982
  };
@@ -3937,68 +4001,68 @@ function _tokenizeWithTheme(e, t, n, r, i) {
3937
4001
  d.explanation = [];
3938
4002
  let r = 0;
3939
4003
  for (; t + r < o;) {
3940
- let t = g[_], n = f.substring(t.startIndex, t.endIndex);
4004
+ let t = h[g], n = f.substring(t.startIndex, t.endIndex);
3941
4005
  r += n.length, d.explanation.push({
3942
4006
  content: n,
3943
- scopes: i.includeExplanation === "scopeName" ? explainThemeScopesNameOnly(t.scopes) : explainThemeScopesFull(e, t.scopes)
3944
- }), _ += 1;
4007
+ scopes: i.includeExplanation === "scopeName" ? Ur(t.scopes) : Wr(e, t.scopes)
4008
+ }), g += 1;
3945
4009
  }
3946
4010
  }
3947
4011
  u.push(d);
3948
4012
  }
3949
- d.push(u), u = [], l = v.ruleStack;
4013
+ d.push(u), u = [], l = _.ruleStack;
3950
4014
  }
3951
4015
  return {
3952
4016
  tokens: d,
3953
4017
  stateStack: l
3954
4018
  };
3955
4019
  }
3956
- function explainThemeScopesNameOnly(e) {
4020
+ function Ur(e) {
3957
4021
  return e.map((e) => ({ scopeName: e }));
3958
4022
  }
3959
- function explainThemeScopesFull(e, t) {
4023
+ function Wr(e, t) {
3960
4024
  let n = [];
3961
4025
  for (let r = 0, i = t.length; r < i; r++) {
3962
4026
  let i = t[r];
3963
4027
  n[r] = {
3964
4028
  scopeName: i,
3965
- themeMatches: explainThemeScope(e, i, t.slice(0, r))
4029
+ themeMatches: qr(e, i, t.slice(0, r))
3966
4030
  };
3967
4031
  }
3968
4032
  return n;
3969
4033
  }
3970
- function matchesOne(e, t) {
4034
+ function Gr(e, t) {
3971
4035
  return e === t || t.substring(0, e.length) === e && t[e.length] === ".";
3972
4036
  }
3973
- function matches(e, t, n) {
3974
- if (!matchesOne(e[e.length - 1], t)) return !1;
4037
+ function Kr(e, t, n) {
4038
+ if (!Gr(e[e.length - 1], t)) return !1;
3975
4039
  let r = e.length - 2, i = n.length - 1;
3976
- for (; r >= 0 && i >= 0;) matchesOne(e[r], n[i]) && --r, --i;
4040
+ for (; r >= 0 && i >= 0;) Gr(e[r], n[i]) && --r, --i;
3977
4041
  return r === -1;
3978
4042
  }
3979
- function explainThemeScope(e, t, n) {
4043
+ function qr(e, t, n) {
3980
4044
  let r = [];
3981
- for (let { selectors: i, settings: a } of e) for (let e of i) if (matches(e, t, n)) {
4045
+ for (let { selectors: i, settings: a } of e) for (let e of i) if (Kr(e, t, n)) {
3982
4046
  r.push(a);
3983
4047
  break;
3984
4048
  }
3985
4049
  return r;
3986
4050
  }
3987
- function codeToTokensWithThemes(e, t, n) {
4051
+ function Jr(e, t, n) {
3988
4052
  let r = Object.entries(n.themes).filter((e) => e[1]).map((e) => ({
3989
4053
  color: e[0],
3990
4054
  theme: e[1]
3991
4055
  })), i = r.map((r) => {
3992
- let i = codeToTokensBase(e, t, {
4056
+ let i = Y(e, t, {
3993
4057
  ...n,
3994
4058
  theme: r.theme
3995
4059
  });
3996
4060
  return {
3997
4061
  tokens: i,
3998
- state: getLastGrammarStateFromMap(i),
4062
+ state: q(i),
3999
4063
  theme: typeof r.theme == "string" ? r.theme : r.theme.name
4000
4064
  };
4001
- }), a = syncThemesTokenization(...i.map((e) => e.tokens)), o = a[0].map((e, t) => e.map((e, i) => {
4065
+ }), a = Yr(...i.map((e) => e.tokens)), o = a[0].map((e, t) => e.map((e, i) => {
4002
4066
  let o = {
4003
4067
  content: e.content,
4004
4068
  variants: {},
@@ -4008,10 +4072,10 @@ function codeToTokensWithThemes(e, t, n) {
4008
4072
  let { content: a, explanation: s, offset: c, ...l } = e[t][i];
4009
4073
  o.variants[r[n].color] = l;
4010
4074
  }), o;
4011
- })), s = i[0].state ? new GrammarState(Object.fromEntries(i.map((e) => [e.theme, e.state?.getInternalStack(e.theme)])), i[0].state.lang) : void 0;
4012
- return s && setLastGrammarStateToMap(o, s), o;
4075
+ })), s = i[0].state ? new xr(Object.fromEntries(i.map((e) => [e.theme, e.state?.getInternalStack(e.theme)])), i[0].state.lang) : void 0;
4076
+ return s && br(o, s), o;
4013
4077
  }
4014
- function syncThemesTokenization(...e) {
4078
+ function Yr(...e) {
4015
4079
  let t = e.map(() => []), n = e.length;
4016
4080
  for (let r = 0; r < e[0].length; r++) {
4017
4081
  let i = e.map((e) => e[r]), a = t.map(() => []);
@@ -4034,26 +4098,26 @@ function syncThemesTokenization(...e) {
4034
4098
  }
4035
4099
  return t;
4036
4100
  }
4037
- function codeToTokens(e, n, r) {
4101
+ function X(e, n, r) {
4038
4102
  let i, a, o, s, c, l;
4039
4103
  if ("themes" in r) {
4040
- let { defaultColor: u = "light", cssVariablePrefix: d = "--shiki-", colorsRendering: f = "css-vars" } = r, m = Object.entries(r.themes).filter((e) => e[1]).map((e) => ({
4104
+ let { defaultColor: u = "light", cssVariablePrefix: d = "--shiki-", colorsRendering: f = "css-vars" } = r, p = Object.entries(r.themes).filter((e) => e[1]).map((e) => ({
4041
4105
  color: e[0],
4042
4106
  theme: e[1]
4043
4107
  })).sort((e, t) => e.color === u ? -1 : t.color === u ? 1 : 0);
4044
- if (m.length === 0) throw new ShikiError("`themes` option must not be empty");
4045
- let h = codeToTokensWithThemes(e, n, r);
4046
- if (l = getLastGrammarStateFromMap(h), u && DEFAULT_COLOR_LIGHT_DARK !== u && !m.find((e) => e.color === u)) throw new ShikiError(`\`themes\` option must contain the defaultColor key \`${u}\``);
4047
- let g = m.map((t) => e.getTheme(t.theme)), _ = m.map((e) => e.color);
4048
- o = h.map((e) => e.map((e) => flatTokenVariants(e, _, d, u, f))), l && setLastGrammarStateToMap(o, l);
4049
- let v = m.map((e) => resolveColorReplacements(e.theme, r));
4050
- a = mapThemeColors(m, g, v, d, u, "fg", f), i = mapThemeColors(m, g, v, d, u, "bg", f), s = `shiki-themes ${g.map((e) => e.name).join(" ")}`, c = u ? void 0 : [a, i].join(";");
4108
+ if (p.length === 0) throw new t("`themes` option must not be empty");
4109
+ let m = Jr(e, n, r);
4110
+ if (l = q(m), u && pr !== u && !p.find((e) => e.color === u)) throw new t(`\`themes\` option must contain the defaultColor key \`${u}\``);
4111
+ let h = p.map((t) => e.getTheme(t.theme)), g = p.map((e) => e.color);
4112
+ o = m.map((e) => e.map((e) => _r(e, g, d, u, f))), l && br(o, l);
4113
+ let _ = p.map((e) => V(e.theme, r));
4114
+ a = Xr(p, h, _, d, u, "fg", f), i = Xr(p, h, _, d, u, "bg", f), s = `shiki-themes ${h.map((e) => e.name).join(" ")}`, c = u ? void 0 : [a, i].join(";");
4051
4115
  } else if ("theme" in r) {
4052
- let t = resolveColorReplacements(r.theme, r);
4053
- o = codeToTokensBase(e, n, r);
4116
+ let t = V(r.theme, r);
4117
+ o = Y(e, n, r);
4054
4118
  let c = e.getTheme(r.theme);
4055
- i = applyColorReplacements(c.bg, t), a = applyColorReplacements(c.fg, t), s = c.name, l = getLastGrammarStateFromMap(o);
4056
- } else throw new ShikiError("Invalid options, either `theme` or `themes` must be provided");
4119
+ i = H(c.bg, t), a = H(c.fg, t), s = c.name, l = q(o);
4120
+ } else throw new t("Invalid options, either `theme` or `themes` must be provided");
4057
4121
  return {
4058
4122
  tokens: o,
4059
4123
  fg: a,
@@ -4063,47 +4127,47 @@ function codeToTokens(e, n, r) {
4063
4127
  grammarState: l
4064
4128
  };
4065
4129
  }
4066
- function mapThemeColors(e, n, r, i, a, o, s) {
4130
+ function Xr(e, n, r, i, a, o, s) {
4067
4131
  return e.map((c, l) => {
4068
- let u = applyColorReplacements(n[l][o], r[l]) || "inherit", d = `${i + c.color}${o === "bg" ? "-bg" : ""}:${u}`;
4132
+ let u = H(n[l][o], r[l]) || "inherit", d = `${i + c.color}${o === "bg" ? "-bg" : ""}:${u}`;
4069
4133
  if (l === 0 && a) {
4070
- if (a === DEFAULT_COLOR_LIGHT_DARK && e.length > 1) {
4134
+ if (a === pr && e.length > 1) {
4071
4135
  let i = e.findIndex((e) => e.color === "light"), a = e.findIndex((e) => e.color === "dark");
4072
- if (i === -1 || a === -1) throw new ShikiError("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
4073
- return `light-dark(${applyColorReplacements(n[i][o], r[i]) || "inherit"}, ${applyColorReplacements(n[a][o], r[a]) || "inherit"});${d}`;
4136
+ if (i === -1 || a === -1) throw new t("When using `defaultColor: \"light-dark()\"`, you must provide both `light` and `dark` themes");
4137
+ return `light-dark(${H(n[i][o], r[i]) || "inherit"}, ${H(n[a][o], r[a]) || "inherit"});${d}`;
4074
4138
  }
4075
4139
  return u;
4076
4140
  }
4077
4141
  return s === "css-vars" ? d : null;
4078
4142
  }).filter((e) => !!e).join(";");
4079
4143
  }
4080
- function codeToHast(e, t, n, r = {
4144
+ function Z(e, t, n, r = {
4081
4145
  meta: {},
4082
4146
  options: n,
4083
- codeToHast: (t, n) => codeToHast(e, t, n),
4084
- codeToTokens: (t, n) => codeToTokens(e, t, n)
4147
+ codeToHast: (t, n) => Z(e, t, n),
4148
+ codeToTokens: (t, n) => X(e, t, n)
4085
4149
  }) {
4086
4150
  let i = t;
4087
- for (let e of getTransformers(n)) i = e.preprocess?.call(r, i, n) || i;
4088
- let { tokens: a, fg: o, bg: s, themeName: c, rootStyle: l, grammarState: u } = codeToTokens(e, i, n), { mergeWhitespaces: d = !0, mergeSameStyleTokens: f = !1 } = n;
4089
- d === !0 ? a = mergeWhitespaceTokens(a) : d === "never" && (a = splitWhitespaceTokens(a)), f && (a = mergeAdjacentStyledTokens(a));
4090
- let m = {
4151
+ for (let e of Or(n)) i = e.preprocess?.call(r, i, n) || i;
4152
+ let { tokens: a, fg: o, bg: s, themeName: c, rootStyle: l, grammarState: u } = X(e, i, n), { mergeWhitespaces: d = !0, mergeSameStyleTokens: f = !1 } = n;
4153
+ d === !0 ? a = Qr(a) : d === "never" && (a = $r(a)), f && (a = ei(a));
4154
+ let p = {
4091
4155
  ...r,
4092
4156
  get source() {
4093
4157
  return i;
4094
4158
  }
4095
4159
  };
4096
- for (let e of getTransformers(n)) a = e.tokens?.call(m, a) || a;
4097
- return tokensToHast(a, {
4160
+ for (let e of Or(n)) a = e.tokens?.call(p, a) || a;
4161
+ return Zr(a, {
4098
4162
  ...n,
4099
4163
  fg: o,
4100
4164
  bg: s,
4101
4165
  themeName: c,
4102
4166
  rootStyle: n.rootStyle === !1 ? !1 : n.rootStyle ?? l
4103
- }, m, u);
4167
+ }, p, u);
4104
4168
  }
4105
- function tokensToHast(e, t, n, r = getLastGrammarStateFromMap(e)) {
4106
- let i = getTransformers(t), a = [], o = {
4169
+ function Zr(e, t, n, r = q(e)) {
4170
+ let i = Or(t), a = [], o = {
4107
4171
  type: "root",
4108
4172
  children: []
4109
4173
  }, { structure: s = "classic", tabindex: c = "0" } = t, l = { class: `shiki ${t.themeName || ""}` };
@@ -4120,10 +4184,10 @@ function tokensToHast(e, t, n, r = getLastGrammarStateFromMap(e)) {
4120
4184
  tagName: "code",
4121
4185
  properties: {},
4122
4186
  children: a
4123
- }, f = [], m = {
4187
+ }, f = [], p = {
4124
4188
  ...n,
4125
4189
  structure: s,
4126
- addClassToHast,
4190
+ addClassToHast: ur,
4127
4191
  get source() {
4128
4192
  return n.source;
4129
4193
  },
@@ -4171,19 +4235,19 @@ function tokensToHast(e, t, n, r = getLastGrammarStateFromMap(e)) {
4171
4235
  type: "text",
4172
4236
  value: a.content
4173
4237
  }]
4174
- }, c = stringifyTokenStyle(a.htmlStyle || getTokenStyleObject(a));
4238
+ }, c = vr(a.htmlStyle || K(a));
4175
4239
  c && (e.properties.style = c);
4176
- for (let o of i) e = o?.span?.call(m, e, t + 1, r, n, a) || e;
4240
+ for (let o of i) e = o?.span?.call(p, e, t + 1, r, n, a) || e;
4177
4241
  s === "inline" ? o.children.push(e) : s === "classic" && n.children.push(e), r += a.content.length;
4178
4242
  }
4179
4243
  if (s === "classic") {
4180
- for (let e of i) n = e?.line?.call(m, n, t + 1) || n;
4244
+ for (let e of i) n = e?.line?.call(p, n, t + 1) || n;
4181
4245
  f.push(n), a.push(n);
4182
4246
  } else s === "inline" && f.push(n);
4183
4247
  }), s === "classic") {
4184
- for (let e of i) d = e?.code?.call(m, d) || d;
4248
+ for (let e of i) d = e?.code?.call(p, d) || d;
4185
4249
  u.children.push(d);
4186
- for (let e of i) u = e?.pre?.call(m, u) || u;
4250
+ for (let e of i) u = e?.pre?.call(p, u) || u;
4187
4251
  o.children.push(u);
4188
4252
  } else if (s === "inline") {
4189
4253
  let e = [], t = {
@@ -4205,7 +4269,7 @@ function tokensToHast(e, t, n, r = getLastGrammarStateFromMap(e)) {
4205
4269
  properties: {},
4206
4270
  children: e
4207
4271
  };
4208
- for (let e of i) n = e?.code?.call(m, n) || n;
4272
+ for (let e of i) n = e?.code?.call(p, n) || n;
4209
4273
  o.children = [];
4210
4274
  for (let e = 0; e < n.children.length; e++) {
4211
4275
  e > 0 && o.children.push({
@@ -4218,15 +4282,15 @@ function tokensToHast(e, t, n, r = getLastGrammarStateFromMap(e)) {
4218
4282
  t.type === "element" && o.children.push(...t.children);
4219
4283
  }
4220
4284
  }
4221
- let h = o;
4222
- for (let e of i) h = e?.root?.call(m, h) || h;
4223
- return r && setLastGrammarStateToMap(h, r), h;
4285
+ let m = o;
4286
+ for (let e of i) m = e?.root?.call(p, m) || m;
4287
+ return r && br(m, r), m;
4224
4288
  }
4225
- function mergeWhitespaceTokens(e) {
4289
+ function Qr(e) {
4226
4290
  return e.map((e) => {
4227
4291
  let t = [], n = "", r;
4228
4292
  return e.forEach((i, a) => {
4229
- let o = !(i.fontStyle && (i.fontStyle & FontStyle.Underline || i.fontStyle & FontStyle.Strikethrough));
4293
+ let o = !(i.fontStyle && (i.fontStyle & v.Underline || i.fontStyle & v.Strikethrough));
4230
4294
  o && i.content.match(/^\s+$/) && e[a + 1] ? (r === void 0 && (r = i.offset), n += i.content) : n ? (o ? t.push({
4231
4295
  ...i,
4232
4296
  offset: r,
@@ -4238,7 +4302,7 @@ function mergeWhitespaceTokens(e) {
4238
4302
  }), t;
4239
4303
  });
4240
4304
  }
4241
- function splitWhitespaceTokens(e) {
4305
+ function $r(e) {
4242
4306
  return e.map((e) => e.flatMap((e) => {
4243
4307
  if (e.content.match(/^\s+$/)) return e;
4244
4308
  let t = e.content.match(/^(\s*)(.*?)(\s*)$/);
@@ -4259,7 +4323,7 @@ function splitWhitespaceTokens(e) {
4259
4323
  }), a;
4260
4324
  }));
4261
4325
  }
4262
- function mergeAdjacentStyledTokens(e) {
4326
+ function ei(e) {
4263
4327
  return e.map((e) => {
4264
4328
  let t = [];
4265
4329
  for (let n of e) {
@@ -4267,38 +4331,38 @@ function mergeAdjacentStyledTokens(e) {
4267
4331
  t.push({ ...n });
4268
4332
  continue;
4269
4333
  }
4270
- let e = t[t.length - 1], r = stringifyTokenStyle(e.htmlStyle || getTokenStyleObject(e)), i = stringifyTokenStyle(n.htmlStyle || getTokenStyleObject(n)), a = e.fontStyle && (e.fontStyle & FontStyle.Underline || e.fontStyle & FontStyle.Strikethrough), o = n.fontStyle && (n.fontStyle & FontStyle.Underline || n.fontStyle & FontStyle.Strikethrough);
4334
+ let e = t[t.length - 1], r = vr(e.htmlStyle || K(e)), i = vr(n.htmlStyle || K(n)), a = e.fontStyle && (e.fontStyle & v.Underline || e.fontStyle & v.Strikethrough), o = n.fontStyle && (n.fontStyle & v.Underline || n.fontStyle & v.Strikethrough);
4271
4335
  !a && !o && r === i ? e.content += n.content : t.push({ ...n });
4272
4336
  }
4273
4337
  return t;
4274
4338
  });
4275
4339
  }
4276
- var hastToHtml = toHtml;
4277
- function codeToHtml(e, t, n) {
4340
+ var ti = rr;
4341
+ function ni(e, t, n) {
4278
4342
  let r = {
4279
4343
  meta: {},
4280
4344
  options: n,
4281
- codeToHast: (t, n) => codeToHast(e, t, n),
4282
- codeToTokens: (t, n) => codeToTokens(e, t, n)
4283
- }, i = hastToHtml(codeToHast(e, t, n, r));
4284
- for (let e of getTransformers(n)) i = e.postprocess?.call(r, i, n) || i;
4345
+ codeToHast: (t, n) => Z(e, t, n),
4346
+ codeToTokens: (t, n) => X(e, t, n)
4347
+ }, i = ti(Z(e, t, n, r));
4348
+ for (let e of Or(n)) i = e.postprocess?.call(r, i, n) || i;
4285
4349
  return i;
4286
4350
  }
4287
- var VSCODE_FALLBACK_EDITOR_FG = {
4351
+ var ri = {
4288
4352
  light: "#333333",
4289
4353
  dark: "#bbbbbb"
4290
- }, VSCODE_FALLBACK_EDITOR_BG = {
4354
+ }, ii = {
4291
4355
  light: "#fffffe",
4292
4356
  dark: "#1e1e1e"
4293
- }, RESOLVED_KEY = "__shiki_resolved";
4294
- function normalizeTheme(e) {
4295
- if (e?.[RESOLVED_KEY]) return e;
4357
+ }, ai = "__shiki_resolved";
4358
+ function oi(e) {
4359
+ if (e?.[ai]) return e;
4296
4360
  let t = { ...e };
4297
4361
  t.tokenColors && !t.settings && (t.settings = t.tokenColors, delete t.tokenColors), t.type ||= "dark", t.colorReplacements = { ...t.colorReplacements }, t.settings ||= [];
4298
4362
  let { bg: n, fg: r } = t;
4299
4363
  if (!n || !r) {
4300
4364
  let e = t.settings ? t.settings.find((e) => !e.name && !e.scope) : void 0;
4301
- e?.settings?.foreground && (r = e.settings.foreground), e?.settings?.background && (n = e.settings.background), !r && t?.colors?.["editor.foreground"] && (r = t.colors["editor.foreground"]), !n && t?.colors?.["editor.background"] && (n = t.colors["editor.background"]), r ||= t.type === "light" ? VSCODE_FALLBACK_EDITOR_FG.light : VSCODE_FALLBACK_EDITOR_FG.dark, n ||= t.type === "light" ? VSCODE_FALLBACK_EDITOR_BG.light : VSCODE_FALLBACK_EDITOR_BG.dark, t.fg = r, t.bg = n;
4365
+ e?.settings?.foreground && (r = e.settings.foreground), e?.settings?.background && (n = e.settings.background), !r && t?.colors?.["editor.foreground"] && (r = t.colors["editor.foreground"]), !n && t?.colors?.["editor.background"] && (n = t.colors["editor.background"]), r ||= t.type === "light" ? ri.light : ri.dark, n ||= t.type === "light" ? ii.light : ii.dark, t.fg = r, t.bg = n;
4302
4366
  }
4303
4367
  t.settings[0] && t.settings[0].settings && !t.settings[0].scope || t.settings.unshift({ settings: {
4304
4368
  foreground: t.fg,
@@ -4332,45 +4396,45 @@ function normalizeTheme(e) {
4332
4396
  let n = o(t.colors[e]);
4333
4397
  t.colorReplacements[n] = t.colors[e], t.colors[e] = n;
4334
4398
  }
4335
- return Object.defineProperty(t, RESOLVED_KEY, {
4399
+ return Object.defineProperty(t, ai, {
4336
4400
  enumerable: !1,
4337
4401
  writable: !1,
4338
4402
  value: !0
4339
4403
  }), t;
4340
4404
  }
4341
- async function resolveLangs(e) {
4342
- return Array.from(new Set((await Promise.all(e.filter((e) => !isSpecialLang(e)).map(async (e) => await normalizeGetter(e).then((e) => Array.isArray(e) ? e : [e])))).flat()));
4405
+ async function si(e) {
4406
+ return Array.from(new Set((await Promise.all(e.filter((e) => !cr(e)).map(async (e) => await sr(e).then((e) => Array.isArray(e) ? e : [e])))).flat()));
4343
4407
  }
4344
- async function resolveThemes(e) {
4345
- return (await Promise.all(e.map(async (e) => isSpecialTheme(e) ? null : normalizeTheme(await normalizeGetter(e))))).filter((e) => !!e);
4408
+ async function ci(e) {
4409
+ return (await Promise.all(e.map(async (e) => lr(e) ? null : oi(await sr(e))))).filter((e) => !!e);
4346
4410
  }
4347
- var _emitDeprecation = 3, _emitError = !1;
4348
- function enableDeprecationWarnings(e = !0, t = !1) {
4349
- _emitDeprecation = e, _emitError = t;
4411
+ var li = 3, ui = !1;
4412
+ function di(e = !0, t = !1) {
4413
+ li = e, ui = t;
4350
4414
  }
4351
- function warnDeprecated(e, t = 3) {
4352
- if (_emitDeprecation && !(typeof _emitDeprecation == "number" && t > _emitDeprecation)) {
4353
- if (_emitError) throw Error(`[SHIKI DEPRECATE]: ${e}`);
4415
+ function fi(e, t = 3) {
4416
+ if (li && !(typeof li == "number" && t > li)) {
4417
+ if (ui) throw Error(`[SHIKI DEPRECATE]: ${e}`);
4354
4418
  console.trace(`[SHIKI DEPRECATE]: ${e}`);
4355
4419
  }
4356
4420
  }
4357
- var ShikiError$1 = class extends Error {
4421
+ var Q = class extends Error {
4358
4422
  constructor(e) {
4359
4423
  super(e), this.name = "ShikiError";
4360
4424
  }
4361
4425
  };
4362
- function resolveLangAlias(e, t) {
4426
+ function pi(e, t) {
4363
4427
  if (!t) return e;
4364
4428
  if (t[e]) {
4365
4429
  let n = /* @__PURE__ */ new Set([e]);
4366
4430
  for (; t[e];) {
4367
- if (e = t[e], n.has(e)) throw new ShikiError$1(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);
4431
+ if (e = t[e], n.has(e)) throw new Q(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);
4368
4432
  n.add(e);
4369
4433
  }
4370
4434
  }
4371
4435
  return e;
4372
4436
  }
4373
- var Registry = class extends Registry$1 {
4437
+ var mi = class extends ut {
4374
4438
  constructor(e, t, n, r = {}) {
4375
4439
  super(e), this._resolver = e, this._themes = t, this._langs = n, this._alias = r, this._themes.map((e) => this.loadTheme(e)), this.loadLanguages(this._langs);
4376
4440
  }
@@ -4385,7 +4449,7 @@ var Registry = class extends Registry$1 {
4385
4449
  return typeof e == "string" ? this._resolvedThemes.get(e) : this.loadTheme(e);
4386
4450
  }
4387
4451
  loadTheme(e) {
4388
- let t = normalizeTheme(e);
4452
+ let t = oi(e);
4389
4453
  return t.name && (this._resolvedThemes.set(t.name, t), this._loadedThemesCache = null), t;
4390
4454
  }
4391
4455
  getLoadedThemes() {
@@ -4393,10 +4457,10 @@ var Registry = class extends Registry$1 {
4393
4457
  }
4394
4458
  setTheme(e) {
4395
4459
  let t = this._textmateThemeCache.get(e);
4396
- t || (t = Theme.createFromRawTheme(e), this._textmateThemeCache.set(e, t)), this._syncRegistry.setTheme(t);
4460
+ t || (t = h.createFromRawTheme(e), this._textmateThemeCache.set(e, t)), this._syncRegistry.setTheme(t);
4397
4461
  }
4398
4462
  getGrammar(e) {
4399
- return e = resolveLangAlias(e, this._alias), this._resolvedGrammars.get(e);
4463
+ return e = pi(e, this._alias), this._resolvedGrammars.get(e);
4400
4464
  }
4401
4465
  loadLanguage(e) {
4402
4466
  if (this.getGrammar(e.name)) return;
@@ -4420,7 +4484,7 @@ var Registry = class extends Registry$1 {
4420
4484
  let t = Array.from(this._langGraph.entries()), n = t.filter(([e, t]) => !t);
4421
4485
  if (n.length) {
4422
4486
  let e = t.filter(([e, t]) => t ? (t.embeddedLanguages || t.embeddedLangs)?.some((e) => n.map(([e]) => e).includes(e)) : !1).filter((e) => !n.includes(e));
4423
- throw new ShikiError$1(`Missing languages ${n.map(([e]) => `\`${e}\``).join(", ")}, required by ${e.map(([e]) => `\`${e}\``).join(", ")}`);
4487
+ throw new Q(`Missing languages ${n.map(([e]) => `\`${e}\``).join(", ")}, required by ${e.map(([e]) => `\`${e}\``).join(", ")}`);
4424
4488
  }
4425
4489
  for (let [e, n] of t) this._resolver.addLanguage(n);
4426
4490
  for (let [e, n] of t) this.loadLanguage(n);
@@ -4433,7 +4497,7 @@ var Registry = class extends Registry$1 {
4433
4497
  let t = e.embeddedLanguages ?? e.embeddedLangs;
4434
4498
  if (t) for (let e of t) this._langGraph.set(e, this._langMap.get(e));
4435
4499
  }
4436
- }, Resolver = class {
4500
+ }, hi = class {
4437
4501
  _langs = /* @__PURE__ */ new Map();
4438
4502
  _scopeToLang = /* @__PURE__ */ new Map();
4439
4503
  _injections = /* @__PURE__ */ new Map();
@@ -4468,19 +4532,19 @@ var Registry = class extends Registry$1 {
4468
4532
  }
4469
4533
  return n;
4470
4534
  }
4471
- }, instancesCount = 0;
4472
- function createShikiInternalSync(e) {
4473
- instancesCount += 1, e.warnings !== !1 && instancesCount >= 10 && instancesCount % 10 == 0 && console.warn(`[Shiki] ${instancesCount} 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.`);
4535
+ }, $ = 0;
4536
+ function gi(e) {
4537
+ $ += 1, e.warnings !== !1 && $ >= 10 && $ % 10 == 0 && console.warn(`[Shiki] ${$} 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.`);
4474
4538
  let t = !1;
4475
- if (!e.engine) throw new ShikiError$1("`engine` option is required for synchronous mode");
4476
- let n = (e.langs || []).flat(1), r = (e.themes || []).flat(1).map(normalizeTheme), i = new Registry(new Resolver(e.engine, n), r, n, e.langAlias), a;
4539
+ if (!e.engine) throw new Q("`engine` option is required for synchronous mode");
4540
+ let n = (e.langs || []).flat(1), r = (e.themes || []).flat(1).map(oi), i = new mi(new hi(e.engine, n), r, n, e.langAlias), a;
4477
4541
  function o(t) {
4478
- return resolveLangAlias(t, e.langAlias);
4542
+ return pi(t, e.langAlias);
4479
4543
  }
4480
4544
  function s(e) {
4481
- _();
4545
+ g();
4482
4546
  let t = i.getGrammar(typeof e == "string" ? e : e.name);
4483
- if (!t) throw new ShikiError$1(`Language \`${e}\` not found, you may need to load it first`);
4547
+ if (!t) throw new Q(`Language \`${e}\` not found, you may need to load it first`);
4484
4548
  return t;
4485
4549
  }
4486
4550
  function c(e) {
@@ -4491,13 +4555,13 @@ function createShikiInternalSync(e) {
4491
4555
  settings: [],
4492
4556
  type: "dark"
4493
4557
  };
4494
- _();
4558
+ g();
4495
4559
  let t = i.getTheme(e);
4496
- if (!t) throw new ShikiError$1(`Theme \`${e}\` not found, you may need to load it first`);
4560
+ if (!t) throw new Q(`Theme \`${e}\` not found, you may need to load it first`);
4497
4561
  return t;
4498
4562
  }
4499
4563
  function l(e) {
4500
- _();
4564
+ g();
4501
4565
  let t = c(e);
4502
4566
  return a !== e && (i.setTheme(t), a = e), {
4503
4567
  theme: t,
@@ -4505,29 +4569,29 @@ function createShikiInternalSync(e) {
4505
4569
  };
4506
4570
  }
4507
4571
  function u() {
4508
- return _(), i.getLoadedThemes();
4572
+ return g(), i.getLoadedThemes();
4509
4573
  }
4510
4574
  function d() {
4511
- return _(), i.getLoadedLanguages();
4575
+ return g(), i.getLoadedLanguages();
4512
4576
  }
4513
4577
  function f(...e) {
4514
- _(), i.loadLanguages(e.flat(1));
4578
+ g(), i.loadLanguages(e.flat(1));
4515
4579
  }
4516
- async function m(...e) {
4517
- return f(await resolveLangs(e));
4580
+ async function p(...e) {
4581
+ return f(await si(e));
4518
4582
  }
4519
- function h(...e) {
4520
- _();
4583
+ function m(...e) {
4584
+ g();
4521
4585
  for (let t of e.flat(1)) i.loadTheme(t);
4522
4586
  }
4523
- async function g(...e) {
4524
- return _(), h(await resolveThemes(e));
4587
+ async function h(...e) {
4588
+ return g(), m(await ci(e));
4525
4589
  }
4526
- function _() {
4527
- if (t) throw new ShikiError$1("Shiki instance has been disposed");
4590
+ function g() {
4591
+ if (t) throw new Q("Shiki instance has been disposed");
4528
4592
  }
4529
- function v() {
4530
- t || (t = !0, i.dispose(), --instancesCount);
4593
+ function _() {
4594
+ t || (t = !0, i.dispose(), --$);
4531
4595
  }
4532
4596
  return {
4533
4597
  setTheme: l,
@@ -4536,59 +4600,59 @@ function createShikiInternalSync(e) {
4536
4600
  getLoadedThemes: u,
4537
4601
  getLoadedLanguages: d,
4538
4602
  resolveLangAlias: o,
4539
- loadLanguage: m,
4603
+ loadLanguage: p,
4540
4604
  loadLanguageSync: f,
4541
- loadTheme: g,
4542
- loadThemeSync: h,
4543
- dispose: v,
4544
- [Symbol.dispose]: v
4605
+ loadTheme: h,
4606
+ loadThemeSync: m,
4607
+ dispose: _,
4608
+ [Symbol.dispose]: _
4545
4609
  };
4546
4610
  }
4547
- async function createShikiInternal(e) {
4548
- e.engine || warnDeprecated("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
4611
+ async function _i(e) {
4612
+ e.engine || fi("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");
4549
4613
  let [t, n, r] = await Promise.all([
4550
- resolveThemes(e.themes || []),
4551
- resolveLangs(e.langs || []),
4614
+ ci(e.themes || []),
4615
+ si(e.langs || []),
4552
4616
  e.engine
4553
4617
  ]);
4554
- return createShikiInternalSync({
4618
+ return gi({
4555
4619
  ...e,
4556
4620
  themes: t,
4557
4621
  langs: n,
4558
4622
  engine: r
4559
4623
  });
4560
4624
  }
4561
- async function createHighlighterCore(e) {
4562
- let t = await createShikiInternal(e);
4625
+ async function vi(e) {
4626
+ let t = await _i(e);
4563
4627
  return {
4564
- getLastGrammarState: (...e) => getLastGrammarState(t, ...e),
4565
- codeToTokensBase: (e, n) => codeToTokensBase(t, e, n),
4566
- codeToTokensWithThemes: (e, n) => codeToTokensWithThemes(t, e, n),
4567
- codeToTokens: (e, n) => codeToTokens(t, e, n),
4568
- codeToHast: (e, n) => codeToHast(t, e, n),
4569
- codeToHtml: (e, n) => codeToHtml(t, e, n),
4628
+ getLastGrammarState: (...e) => Br(t, ...e),
4629
+ codeToTokensBase: (e, n) => Y(t, e, n),
4630
+ codeToTokensWithThemes: (e, n) => Jr(t, e, n),
4631
+ codeToTokens: (e, n) => X(t, e, n),
4632
+ codeToHast: (e, n) => Z(t, e, n),
4633
+ codeToHtml: (e, n) => ni(t, e, n),
4570
4634
  getBundledLanguages: () => ({}),
4571
4635
  getBundledThemes: () => ({}),
4572
4636
  ...t,
4573
4637
  getInternalContext: () => t
4574
4638
  };
4575
4639
  }
4576
- function createHighlighterCoreSync(e) {
4577
- let t = createShikiInternalSync(e);
4640
+ function yi(e) {
4641
+ let t = gi(e);
4578
4642
  return {
4579
- getLastGrammarState: (...e) => getLastGrammarState(t, ...e),
4580
- codeToTokensBase: (e, n) => codeToTokensBase(t, e, n),
4581
- codeToTokensWithThemes: (e, n) => codeToTokensWithThemes(t, e, n),
4582
- codeToTokens: (e, n) => codeToTokens(t, e, n),
4583
- codeToHast: (e, n) => codeToHast(t, e, n),
4584
- codeToHtml: (e, n) => codeToHtml(t, e, n),
4643
+ getLastGrammarState: (...e) => Br(t, ...e),
4644
+ codeToTokensBase: (e, n) => Y(t, e, n),
4645
+ codeToTokensWithThemes: (e, n) => Jr(t, e, n),
4646
+ codeToTokens: (e, n) => X(t, e, n),
4647
+ codeToHast: (e, n) => Z(t, e, n),
4648
+ codeToHtml: (e, n) => ni(t, e, n),
4585
4649
  getBundledLanguages: () => ({}),
4586
4650
  getBundledThemes: () => ({}),
4587
4651
  ...t,
4588
4652
  getInternalContext: () => t
4589
4653
  };
4590
4654
  }
4591
- function makeSingletonHighlighterCore(e) {
4655
+ function bi(e) {
4592
4656
  let t;
4593
4657
  async function n(n) {
4594
4658
  if (t) {
@@ -4602,29 +4666,29 @@ function makeSingletonHighlighterCore(e) {
4602
4666
  }
4603
4667
  return n;
4604
4668
  }
4605
- var getSingletonHighlighterCore = /* @__PURE__ */ makeSingletonHighlighterCore(createHighlighterCore);
4606
- function createBundledHighlighter(e) {
4669
+ var xi = /* @__PURE__ */ bi(vi);
4670
+ function Si(e) {
4607
4671
  let n = e.langs, r = e.themes, i = e.engine;
4608
4672
  async function a(e) {
4609
4673
  function a(r) {
4610
4674
  if (typeof r == "string") {
4611
- if (r = e.langAlias?.[r] || r, isSpecialLang(r)) return [];
4675
+ if (r = e.langAlias?.[r] || r, cr(r)) return [];
4612
4676
  let i = n[r];
4613
- if (!i) throw new ShikiError(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);
4677
+ if (!i) throw new t(`Language \`${r}\` is not included in this bundle. You may want to load it from external source.`);
4614
4678
  return i;
4615
4679
  }
4616
4680
  return r;
4617
4681
  }
4618
4682
  function o(e) {
4619
- if (isSpecialTheme(e)) return "none";
4683
+ if (lr(e)) return "none";
4620
4684
  if (typeof e == "string") {
4621
4685
  let n = r[e];
4622
- if (!n) throw new ShikiError(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);
4686
+ if (!n) throw new t(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);
4623
4687
  return n;
4624
4688
  }
4625
4689
  return e;
4626
4690
  }
4627
- let s = (e.themes ?? []).map((e) => o(e)), c = (e.langs ?? []).map((e) => a(e)), l = await createHighlighterCore({
4691
+ let s = (e.themes ?? []).map((e) => o(e)), c = (e.langs ?? []).map((e) => a(e)), l = await vi({
4628
4692
  engine: e.engine ?? i(),
4629
4693
  ...e,
4630
4694
  themes: s,
@@ -4648,7 +4712,7 @@ function createBundledHighlighter(e) {
4648
4712
  }
4649
4713
  return a;
4650
4714
  }
4651
- function makeSingletonHighlighter(e) {
4715
+ function Ci(e) {
4652
4716
  let t;
4653
4717
  async function n(n = {}) {
4654
4718
  if (t) {
@@ -4666,8 +4730,8 @@ function makeSingletonHighlighter(e) {
4666
4730
  }
4667
4731
  return n;
4668
4732
  }
4669
- function createSingletonShorthands(e, t) {
4670
- let n = makeSingletonHighlighter(e);
4733
+ function wi(e, t) {
4734
+ let n = Ci(e);
4671
4735
  async function r(e, r) {
4672
4736
  let i = await n({
4673
4737
  langs: [r.lang],
@@ -4702,8 +4766,8 @@ function createSingletonShorthands(e, t) {
4702
4766
  }
4703
4767
  };
4704
4768
  }
4705
- var createdBundledHighlighter = createBundledHighlighter;
4706
- function createCssVariablesTheme(e = {}) {
4769
+ var Ti = Si;
4770
+ function Ei(e = {}) {
4707
4771
  let { name: t = "css-variables", variablePrefix: n = "--shiki-", fontStyle: r = !0 } = e, i = (t) => e.variableDefaults?.[t] ? `var(${n}${t}, ${e.variableDefaults[t]})` : `var(${n}${t})`, a = {
4708
4772
  name: t,
4709
4773
  type: "dark",
@@ -4882,4 +4946,5 @@ function createCssVariablesTheme(e = {}) {
4882
4946
  };
4883
4947
  return r || (a.tokenColors = a.tokenColors?.map((e) => (e.settings?.fontStyle && delete e.settings.fontStyle, e))), a;
4884
4948
  }
4885
- export { ShikiError, addClassToHast, applyColorReplacements, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createBundledHighlighter, createCssVariablesTheme, createHighlighterCore, createHighlighterCoreSync, createPositionConverter, createShikiInternal, createShikiInternalSync, createSingletonShorthands, createdBundledHighlighter, enableDeprecationWarnings, flatTokenVariants, getSingletonHighlighterCore, getTokenStyleObject, guessEmbeddedLanguages, hastToHtml, isNoneTheme, isPlainLang, isSpecialLang, isSpecialTheme, makeSingletonHighlighter, makeSingletonHighlighterCore, normalizeGetter, normalizeTheme, resolveColorReplacements, splitLines, splitToken, splitTokens, stringifyTokenStyle, toArray, tokenizeAnsiWithTheme, tokenizeWithTheme, tokensToHast, transformerDecorations, warnDeprecated };
4949
+ //#endregion
4950
+ export { t as ShikiError, ur as addClassToHast, H as applyColorReplacements, Z as codeToHast, ni as codeToHtml, X as codeToTokens, Y as codeToTokensBase, Jr as codeToTokensWithThemes, Si as createBundledHighlighter, Ei as createCssVariablesTheme, vi as createHighlighterCore, yi as createHighlighterCoreSync, dr as createPositionConverter, _i as createShikiInternal, gi as createShikiInternalSync, wi as createSingletonShorthands, Ti as createdBundledHighlighter, di as enableDeprecationWarnings, _r as flatTokenVariants, xi as getSingletonHighlighterCore, K as getTokenStyleObject, fr as guessEmbeddedLanguages, ti as hastToHtml, W as isNoneTheme, U as isPlainLang, cr as isSpecialLang, lr as isSpecialTheme, Ci as makeSingletonHighlighter, bi as makeSingletonHighlighterCore, sr as normalizeGetter, oi as normalizeTheme, V as resolveColorReplacements, G as splitLines, hr as splitToken, gr as splitTokens, vr as stringifyTokenStyle, or as toArray, Rr as tokenizeAnsiWithTheme, Vr as tokenizeWithTheme, Zr as tokensToHast, wr as transformerDecorations, fi as warnDeprecated };