xmlui 0.9.43 → 0.9.44

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.
@@ -5,7 +5,7 @@ let q = class extends Error {
5
5
  constructor(e) {
6
6
  super(e), this.name = "ShikiError";
7
7
  }
8
- }, Je = class extends Error {
8
+ }, Xe = class extends Error {
9
9
  constructor(e) {
10
10
  super(e), this.name = "ShikiError";
11
11
  }
@@ -98,7 +98,7 @@ async function _n(n) {
98
98
  var bn = Object.defineProperty, Sn = (n, e, t) => e in n ? bn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, N = (n, e, t) => (Sn(n, typeof e != "symbol" ? e + "" : e, t), t);
99
99
  let x = null;
100
100
  function Cn(n) {
101
- throw new Je(n.UTF8ToString(n.getLastOnigError()));
101
+ throw new Xe(n.UTF8ToString(n.getLastOnigError()));
102
102
  }
103
103
  class Ne {
104
104
  constructor(e) {
@@ -141,7 +141,7 @@ class Ne {
141
141
  const D = class {
142
142
  constructor(n) {
143
143
  if (N(this, "id", ++D.LAST_ID), N(this, "_onigBinding"), N(this, "content"), N(this, "utf16Length"), N(this, "utf8Length"), N(this, "utf16OffsetToUtf8"), N(this, "utf8OffsetToUtf16"), N(this, "ptr"), !x)
144
- throw new Je("Must invoke loadWasm first.");
144
+ throw new Xe("Must invoke loadWasm first.");
145
145
  this._onigBinding = x, this.content = n;
146
146
  const e = new Ne(n);
147
147
  this.utf16Length = e.utf16Length, this.utf8Length = e.utf8Length, this.utf16OffsetToUtf8 = e.utf16OffsetToUtf8, this.utf8OffsetToUtf16 = e.utf8OffsetToUtf16, this.utf8Length < 1e4 && !D._sharedPtrInUse ? (D._sharedPtr || (D._sharedPtr = x.omalloc(1e4)), D._sharedPtrInUse = !0, x.HEAPU8.set(e.utf8Value, D._sharedPtr), this.ptr = D._sharedPtr) : this.ptr = e.createString(x);
@@ -163,7 +163,7 @@ N(le, "_sharedPtrInUse", !1);
163
163
  class wn {
164
164
  constructor(e) {
165
165
  if (N(this, "_onigBinding"), N(this, "_ptr"), !x)
166
- throw new Je("Must invoke loadWasm first.");
166
+ throw new Xe("Must invoke loadWasm first.");
167
167
  const t = [], r = [];
168
168
  for (let l = 0, a = e.length; l < a; l++) {
169
169
  const c = new Ne(e[l]);
@@ -266,32 +266,32 @@ async function Ln(n) {
266
266
  };
267
267
  }
268
268
  function On(n) {
269
- return Qe(n);
269
+ return Je(n);
270
270
  }
271
- function Qe(n) {
271
+ function Je(n) {
272
272
  return Array.isArray(n) ? Mn(n) : n instanceof RegExp ? n : typeof n == "object" ? Bn(n) : n;
273
273
  }
274
274
  function Mn(n) {
275
275
  let e = [];
276
276
  for (let t = 0, r = n.length; t < r; t++)
277
- e[t] = Qe(n[t]);
277
+ e[t] = Je(n[t]);
278
278
  return e;
279
279
  }
280
280
  function Bn(n) {
281
281
  let e = {};
282
282
  for (let t in n)
283
- e[t] = Qe(n[t]);
283
+ e[t] = Je(n[t]);
284
284
  return e;
285
285
  }
286
- function xt(n, ...e) {
286
+ function Tt(n, ...e) {
287
287
  return e.forEach((t) => {
288
288
  for (let r in t)
289
289
  n[r] = t[r];
290
290
  }), n;
291
291
  }
292
- function Et(n) {
292
+ function xt(n) {
293
293
  const e = ~n.lastIndexOf("/") || ~n.lastIndexOf("\\");
294
- return e === 0 ? n : ~e === n.length - 1 ? Et(n.substring(0, n.length - 1)) : n.substr(~e + 1);
294
+ return e === 0 ? n : ~e === n.length - 1 ? xt(n.substring(0, n.length - 1)) : n.substr(~e + 1);
295
295
  }
296
296
  var Oe = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, de = class {
297
297
  static hasCaptures(n) {
@@ -317,10 +317,10 @@ var Oe = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, de = class {
317
317
  });
318
318
  }
319
319
  };
320
- function It(n, e) {
320
+ function Et(n, e) {
321
321
  return n < e ? -1 : n > e ? 1 : 0;
322
322
  }
323
- function Lt(n, e) {
323
+ function It(n, e) {
324
324
  if (n === null && e === null)
325
325
  return 0;
326
326
  if (!n)
@@ -330,7 +330,7 @@ function Lt(n, e) {
330
330
  let t = n.length, r = e.length;
331
331
  if (t === r) {
332
332
  for (let s = 0; s < t; s++) {
333
- let o = It(n[s], e[s]);
333
+ let o = Et(n[s], e[s]);
334
334
  if (o !== 0)
335
335
  return o;
336
336
  }
@@ -338,13 +338,13 @@ function Lt(n, e) {
338
338
  }
339
339
  return t - r;
340
340
  }
341
- function lt(n) {
341
+ function at(n) {
342
342
  return !!(/^#[0-9a-f]{6}$/i.test(n) || /^#[0-9a-f]{8}$/i.test(n) || /^#[0-9a-f]{3}$/i.test(n) || /^#[0-9a-f]{4}$/i.test(n));
343
343
  }
344
- function Ot(n) {
344
+ function Lt(n) {
345
345
  return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
346
346
  }
347
- var Mt = class {
347
+ var Ot = class {
348
348
  constructor(n) {
349
349
  p(this, "cache", /* @__PURE__ */ new Map());
350
350
  this.fn = n;
@@ -357,7 +357,7 @@ var Mt = class {
357
357
  }
358
358
  }, _e = class {
359
359
  constructor(n, e, t) {
360
- p(this, "_cachedMatchRoot", new Mt(
360
+ p(this, "_cachedMatchRoot", new Ot(
361
361
  (n) => this._root.match(n)
362
362
  ));
363
363
  this._colorMap = n, this._defaults = e, this._root = t;
@@ -380,7 +380,7 @@ var Mt = class {
380
380
  const e = n.scopeName, r = this._cachedMatchRoot.get(e).find(
381
381
  (s) => Gn(n.parent, s.parentScopes)
382
382
  );
383
- return r ? new Bt(
383
+ return r ? new Mt(
384
384
  r.fontStyle,
385
385
  r.foreground,
386
386
  r.background
@@ -449,7 +449,7 @@ function Gn(n, e) {
449
449
  function Dn(n, e) {
450
450
  return e === n || n.startsWith(e) && n[e.length] === ".";
451
451
  }
452
- var Bt = class {
452
+ var Mt = class {
453
453
  constructor(n, e, t) {
454
454
  this.fontStyle = n, this.foregroundId = e, this.backgroundId = t;
455
455
  }
@@ -490,9 +490,9 @@ function Un(n) {
490
490
  }
491
491
  }
492
492
  let c = null;
493
- typeof i.settings.foreground == "string" && lt(i.settings.foreground) && (c = i.settings.foreground);
493
+ typeof i.settings.foreground == "string" && at(i.settings.foreground) && (c = i.settings.foreground);
494
494
  let u = null;
495
- typeof i.settings.background == "string" && lt(i.settings.background) && (u = i.settings.background);
495
+ typeof i.settings.background == "string" && at(i.settings.background) && (u = i.settings.background);
496
496
  for (let h = 0, d = l.length; h < d; h++) {
497
497
  let g = l[h].trim().split(" "), C = g[g.length - 1], _ = null;
498
498
  g.length > 1 && (_ = g.slice(0, g.length - 1), _.reverse()), t[r++] = new jn(
@@ -514,15 +514,15 @@ var jn = class {
514
514
  }, W = /* @__PURE__ */ ((n) => (n[n.NotSet = -1] = "NotSet", n[n.None = 0] = "None", n[n.Italic = 1] = "Italic", n[n.Bold = 2] = "Bold", n[n.Underline = 4] = "Underline", n[n.Strikethrough = 8] = "Strikethrough", n))(W || {});
515
515
  function $n(n, e) {
516
516
  n.sort((a, c) => {
517
- let u = It(a.scope, c.scope);
518
- return u !== 0 || (u = Lt(a.parentScopes, c.parentScopes), u !== 0) ? u : a.index - c.index;
517
+ let u = Et(a.scope, c.scope);
518
+ return u !== 0 || (u = It(a.parentScopes, c.parentScopes), u !== 0) ? u : a.index - c.index;
519
519
  });
520
520
  let t = 0, r = "#000000", s = "#ffffff";
521
521
  for (; n.length >= 1 && n[0].scope === ""; ) {
522
522
  let a = n.shift();
523
523
  a.fontStyle !== -1 && (t = a.fontStyle), a.foreground !== null && (r = a.foreground), a.background !== null && (s = a.background);
524
524
  }
525
- let o = new Fn(e), i = new Bt(t, o.getId(r), o.getId(s)), l = new zn(new $e(0, null, -1, 0, 0), []);
525
+ let o = new Fn(e), i = new Mt(t, o.getId(r), o.getId(s)), l = new zn(new $e(0, null, -1, 0, 0), []);
526
526
  for (let a = 0, c = n.length; a < c; a++) {
527
527
  let u = n[a];
528
528
  l.insert(0, u.scope, u.parentScopes, u.fontStyle, o.getId(u.foreground), o.getId(u.background));
@@ -556,7 +556,7 @@ var Fn = class {
556
556
  getColorMap() {
557
557
  return this._id2color.slice(0);
558
558
  }
559
- }, Wn = Object.freeze([]), $e = class Gt {
559
+ }, Wn = Object.freeze([]), $e = class Bt {
560
560
  constructor(e, t, r, s, o) {
561
561
  p(this, "scopeDepth");
562
562
  p(this, "parentScopes");
@@ -566,7 +566,7 @@ var Fn = class {
566
566
  this.scopeDepth = e, this.parentScopes = t || Wn, this.fontStyle = r, this.foreground = s, this.background = o;
567
567
  }
568
568
  clone() {
569
- return new Gt(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
569
+ return new Bt(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
570
570
  }
571
571
  static cloneArr(e) {
572
572
  let t = [];
@@ -620,7 +620,7 @@ var Fn = class {
620
620
  }
621
621
  for (let i = 0, l = this._rulesWithParentScopes.length; i < l; i++) {
622
622
  let a = this._rulesWithParentScopes[i];
623
- if (Lt(a.parentScopes, t) === 0) {
623
+ if (It(a.parentScopes, t) === 0) {
624
624
  a.acceptOverwrite(e, r, s, o);
625
625
  return;
626
626
  }
@@ -703,11 +703,11 @@ function be(n, e) {
703
703
  const a = l();
704
704
  return s === ")" && (s = r.next()), a;
705
705
  }
706
- if (ct(s)) {
706
+ if (lt(s)) {
707
707
  const a = [];
708
708
  do
709
709
  a.push(s), s = r.next();
710
- while (ct(s));
710
+ while (lt(s));
711
711
  return (c) => e(a, c);
712
712
  }
713
713
  return null;
@@ -731,7 +731,7 @@ function be(n, e) {
731
731
  return (u) => a.some((h) => h(u));
732
732
  }
733
733
  }
734
- function ct(n) {
734
+ function lt(n) {
735
735
  return !!n && !!n.match(/[\w\.:]+/);
736
736
  }
737
737
  function Hn(n) {
@@ -745,7 +745,7 @@ function Hn(n) {
745
745
  }
746
746
  };
747
747
  }
748
- function Dt(n) {
748
+ function Gt(n) {
749
749
  typeof n.dispose == "function" && n.dispose();
750
750
  }
751
751
  var se = class {
@@ -840,12 +840,12 @@ function Se(n, e, t) {
840
840
  if (t.visitedRule.has(r))
841
841
  continue;
842
842
  t.visitedRule.add(r);
843
- const s = r.repository ? xt({}, e.repository, r.repository) : e.repository;
843
+ const s = r.repository ? Tt({}, e.repository, r.repository) : e.repository;
844
844
  Array.isArray(r.patterns) && Se(r.patterns, { ...e, repository: s }, t);
845
845
  const o = r.include;
846
846
  if (!o)
847
847
  continue;
848
- const i = Ut(o);
848
+ const i = Dt(o);
849
849
  switch (i.kind) {
850
850
  case 0:
851
851
  ye({ ...e, selfGrammar: e.baseGrammar }, t);
@@ -892,7 +892,7 @@ var Xn = class {
892
892
  this.scopeName = n, this.ruleName = e;
893
893
  }
894
894
  };
895
- function Ut(n) {
895
+ function Dt(n) {
896
896
  if (n === "$base")
897
897
  return new Xn();
898
898
  if (n === "$self")
@@ -907,7 +907,7 @@ function Ut(n) {
907
907
  return new er(t, r);
908
908
  }
909
909
  }
910
- var tr = /\\(\d+)/, ut = /\\(\d+)/g, nr = -1, jt = -2;
910
+ var tr = /\\(\d+)/, ct = /\\(\d+)/g, nr = -1, Ut = -2;
911
911
  var ce = class {
912
912
  constructor(n, e, t, r) {
913
913
  p(this, "$location");
@@ -919,7 +919,7 @@ var ce = class {
919
919
  this.$location = n, this.id = e, this._name = t || null, this._nameIsCapturing = de.hasCaptures(this._name), this._contentName = r || null, this._contentNameIsCapturing = de.hasCaptures(this._contentName);
920
920
  }
921
921
  get debugName() {
922
- const n = this.$location ? `${Et(this.$location.filename)}:${this.$location.line}` : "unknown";
922
+ const n = this.$location ? `${xt(this.$location.filename)}:${this.$location.line}` : "unknown";
923
923
  return `${this.constructor.name}#${this.id} @ ${n}`;
924
924
  }
925
925
  getName(n, e) {
@@ -971,7 +971,7 @@ var ce = class {
971
971
  _getCachedCompiledPatterns(e) {
972
972
  return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new ie(), this.collectPatterns(e, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
973
973
  }
974
- }, ht = class extends ce {
974
+ }, ut = class extends ce {
975
975
  constructor(e, t, r, s, o) {
976
976
  super(e, t, r, s);
977
977
  p(this, "hasMissingPatterns");
@@ -1051,7 +1051,7 @@ var ce = class {
1051
1051
  p(this, "patterns");
1052
1052
  p(this, "_cachedCompiledPatterns");
1053
1053
  p(this, "_cachedCompiledWhilePatterns");
1054
- this._begin = new oe(o, this.id), this.beginCaptures = i, this.whileCaptures = a, this._while = new oe(l, jt), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = c.patterns, this.hasMissingPatterns = c.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
1054
+ this._begin = new oe(o, this.id), this.beginCaptures = i, this.whileCaptures = a, this._while = new oe(l, Ut), this.whileHasBackReferences = this._while.hasBackReferences, this.patterns = c.patterns, this.hasMissingPatterns = c.hasMissingPatterns, this._cachedCompiledPatterns = null, this._cachedCompiledWhilePatterns = null;
1055
1055
  }
1056
1056
  dispose() {
1057
1057
  this._cachedCompiledPatterns && (this._cachedCompiledPatterns.dispose(), this._cachedCompiledPatterns = null), this._cachedCompiledWhilePatterns && (this._cachedCompiledWhilePatterns.dispose(), this._cachedCompiledWhilePatterns = null);
@@ -1091,7 +1091,7 @@ var ce = class {
1091
1091
  _getCachedCompiledWhilePatterns(e, t) {
1092
1092
  return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new ie(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, t || "￿"), this._cachedCompiledWhilePatterns;
1093
1093
  }
1094
- }, $t = class E {
1094
+ }, jt = class E {
1095
1095
  static createCaptureRule(e, t, r, s, o) {
1096
1096
  return e.registerRule((i) => new rr(t, i, r, s, o));
1097
1097
  }
@@ -1106,9 +1106,9 @@ var ce = class {
1106
1106
  E._compileCaptures(e.captures, t, r)
1107
1107
  );
1108
1108
  if (typeof e.begin > "u") {
1109
- e.repository && (r = xt({}, r, e.repository));
1109
+ e.repository && (r = Tt({}, r, e.repository));
1110
1110
  let o = e.patterns;
1111
- return typeof o > "u" && e.include && (o = [{ include: e.include }]), new ht(
1111
+ return typeof o > "u" && e.include && (o = [{ include: e.include }]), new ut(
1112
1112
  e.$vscodeTextmateLocation,
1113
1113
  e.id,
1114
1114
  e.name,
@@ -1169,7 +1169,7 @@ var ce = class {
1169
1169
  const l = e[o];
1170
1170
  let a = -1;
1171
1171
  if (l.include) {
1172
- const c = Ut(l.include);
1172
+ const c = Dt(l.include);
1173
1173
  switch (c.kind) {
1174
1174
  case 0:
1175
1175
  case 1:
@@ -1195,7 +1195,7 @@ var ce = class {
1195
1195
  if (a !== -1) {
1196
1196
  const c = t.getRule(a);
1197
1197
  let u = !1;
1198
- if ((c instanceof ht || c instanceof ze || c instanceof Ce) && c.hasMissingPatterns && c.patterns.length === 0 && (u = !0), u)
1198
+ if ((c instanceof ut || c instanceof ze || c instanceof Ce) && c.hasMissingPatterns && c.patterns.length === 0 && (u = !0), u)
1199
1199
  continue;
1200
1200
  s.push(a);
1201
1201
  }
@@ -1205,7 +1205,7 @@ var ce = class {
1205
1205
  hasMissingPatterns: (e ? e.length : 0) !== s.length
1206
1206
  };
1207
1207
  }
1208
- }, oe = class Ft {
1208
+ }, oe = class $t {
1209
1209
  constructor(e, t) {
1210
1210
  p(this, "source");
1211
1211
  p(this, "ruleId");
@@ -1226,7 +1226,7 @@ var ce = class {
1226
1226
  this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = t, typeof this.source == "string" ? this.hasBackReferences = tr.test(this.source) : this.hasBackReferences = !1;
1227
1227
  }
1228
1228
  clone() {
1229
- return new Ft(this.source, this.ruleId);
1229
+ return new $t(this.source, this.ruleId);
1230
1230
  }
1231
1231
  setSource(e) {
1232
1232
  this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
@@ -1235,7 +1235,7 @@ var ce = class {
1235
1235
  if (typeof this.source != "string")
1236
1236
  throw new Error("This method should only be called if the source is a string");
1237
1237
  let r = t.map((s) => e.substring(s.start, s.end));
1238
- return ut.lastIndex = 0, this.source.replace(ut, (s, o) => Ot(r[parseInt(o, 10)] || ""));
1238
+ return ct.lastIndex = 0, this.source.replace(ct, (s, o) => Lt(r[parseInt(o, 10)] || ""));
1239
1239
  }
1240
1240
  _buildAnchorCache() {
1241
1241
  if (typeof this.source != "string")
@@ -1287,7 +1287,7 @@ var ce = class {
1287
1287
  compile(n) {
1288
1288
  if (!this._cached) {
1289
1289
  let e = this._items.map((t) => t.source);
1290
- this._cached = new ft(n, e, this._items.map((t) => t.ruleId));
1290
+ this._cached = new ht(n, e, this._items.map((t) => t.ruleId));
1291
1291
  }
1292
1292
  return this._cached;
1293
1293
  }
@@ -1296,9 +1296,9 @@ var ce = class {
1296
1296
  }
1297
1297
  _resolveAnchors(n, e, t) {
1298
1298
  let r = this._items.map((s) => s.resolveAnchors(e, t));
1299
- return new ft(n, r, this._items.map((s) => s.ruleId));
1299
+ return new ht(n, r, this._items.map((s) => s.ruleId));
1300
1300
  }
1301
- }, ft = class {
1301
+ }, ht = class {
1302
1302
  constructor(n, e, t) {
1303
1303
  p(this, "scanner");
1304
1304
  this.regExps = e, this.rules = t, this.scanner = n.createOnigScanner(e);
@@ -1328,7 +1328,7 @@ var ce = class {
1328
1328
  constructor(e, t) {
1329
1329
  p(this, "_defaultAttributes");
1330
1330
  p(this, "_embeddedLanguagesMatcher");
1331
- p(this, "_getBasicScopeAttributes", new Mt((e) => {
1331
+ p(this, "_getBasicScopeAttributes", new Ot((e) => {
1332
1332
  const t = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
1333
1333
  return new Be(t, r);
1334
1334
  }));
@@ -1376,7 +1376,7 @@ var ce = class {
1376
1376
  else {
1377
1377
  this.values = new Map(n);
1378
1378
  const e = n.map(
1379
- ([t, r]) => Ot(t)
1379
+ ([t, r]) => Lt(t)
1380
1380
  );
1381
1381
  e.sort(), e.reverse(), this.scopesRegExp = new RegExp(
1382
1382
  `^((${e.join(")|(")}))($|\\.)`,
@@ -1393,12 +1393,12 @@ var ce = class {
1393
1393
  }
1394
1394
  };
1395
1395
  typeof process < "u" && process.env.VSCODE_TEXTMATE_DEBUG;
1396
- var dt = class {
1396
+ var ft = class {
1397
1397
  constructor(n, e) {
1398
1398
  this.stack = n, this.stoppedEarly = e;
1399
1399
  }
1400
1400
  };
1401
- function Wt(n, e, t, r, s, o, i, l) {
1401
+ function Ft(n, e, t, r, s, o, i, l) {
1402
1402
  const a = e.content.length;
1403
1403
  let c = !1, u = -1;
1404
1404
  if (i) {
@@ -1415,10 +1415,10 @@ function Wt(n, e, t, r, s, o, i, l) {
1415
1415
  const h = Date.now();
1416
1416
  for (; !c; ) {
1417
1417
  if (l !== 0 && Date.now() - h > l)
1418
- return new dt(s, !0);
1418
+ return new ft(s, !0);
1419
1419
  d();
1420
1420
  }
1421
- return new dt(s, !1);
1421
+ return new ft(s, !1);
1422
1422
  function d() {
1423
1423
  const f = lr(
1424
1424
  n,
@@ -1547,7 +1547,7 @@ function ar(n, e, t, r, s, o) {
1547
1547
  for (let a = l.pop(); a; a = l.pop()) {
1548
1548
  const { ruleScanner: c, findOptions: u } = hr(a.rule, n, a.stack.endRule, t, r === i), h = c.findNextMatchSync(e, r, u);
1549
1549
  if (h) {
1550
- if (h.ruleId !== jt) {
1550
+ if (h.ruleId !== Ut) {
1551
1551
  s = a.stack.pop();
1552
1552
  break;
1553
1553
  }
@@ -1572,7 +1572,7 @@ function lr(n, e, t, r, s, o) {
1572
1572
  return u < c || a.priorityMatch && u === c ? a : i;
1573
1573
  }
1574
1574
  function cr(n, e, t, r, s, o) {
1575
- const i = s.getRule(n), { ruleScanner: l, findOptions: a } = zt(i, n, s.endRule, t, r === o), c = l.findNextMatchSync(e, r, a);
1575
+ const i = s.getRule(n), { ruleScanner: l, findOptions: a } = Wt(i, n, s.endRule, t, r === o), c = l.findNextMatchSync(e, r, a);
1576
1576
  return c ? {
1577
1577
  captureIndices: c.captureIndices,
1578
1578
  matchedRuleId: c.ruleId
@@ -1585,7 +1585,7 @@ function ur(n, e, t, r, s, o, i) {
1585
1585
  const g = n[d];
1586
1586
  if (!g.matcher(h))
1587
1587
  continue;
1588
- const C = e.getRule(g.ruleId), { ruleScanner: _, findOptions: y } = zt(C, e, null, r, s === i), b = _.findNextMatchSync(t, s, y);
1588
+ const C = e.getRule(g.ruleId), { ruleScanner: _, findOptions: y } = Wt(C, e, null, r, s === i), b = _.findNextMatchSync(t, s, y);
1589
1589
  if (!b)
1590
1590
  continue;
1591
1591
  const S = b.captureIndices[0].start;
@@ -1598,7 +1598,7 @@ function ur(n, e, t, r, s, o, i) {
1598
1598
  matchedRuleId: c
1599
1599
  } : null;
1600
1600
  }
1601
- function zt(n, e, t, r, s) {
1601
+ function Wt(n, e, t, r, s) {
1602
1602
  return {
1603
1603
  ruleScanner: n.compileAG(e, t, r, s),
1604
1604
  findOptions: 0
@@ -1629,7 +1629,7 @@ function ne(n, e, t, r, s, o, i) {
1629
1629
  s.produceFromScopes(c[c.length - 1].scopes, c[c.length - 1].endPos), c.pop();
1630
1630
  if (c.length > 0 ? s.produceFromScopes(c[c.length - 1].scopes, f.start) : s.produce(r, f.start), d.retokenizeCapturedWithRuleId) {
1631
1631
  const C = d.getName(l, i), _ = r.contentNameScopesList.pushAttributed(C, n), y = d.getContentName(l, i), b = _.pushAttributed(y, n), S = r.push(d.retokenizeCapturedWithRuleId, f.start, -1, !1, null, _, b), v = n.createOnigString(l.substring(0, f.end));
1632
- Wt(
1632
+ Ft(
1633
1633
  n,
1634
1634
  v,
1635
1635
  t && f.start === 0,
@@ -1639,7 +1639,7 @@ function ne(n, e, t, r, s, o, i) {
1639
1639
  !1,
1640
1640
  /* no time limit */
1641
1641
  0
1642
- ), Dt(v);
1642
+ ), Gt(v);
1643
1643
  continue;
1644
1644
  }
1645
1645
  const g = d.getName(l, i);
@@ -1670,8 +1670,8 @@ function dr(n, e, t, r, s, o, i, l) {
1670
1670
  l
1671
1671
  );
1672
1672
  }
1673
- function pt(n, e, t, r, s) {
1674
- const o = be(e, we), i = $t.getCompiledRuleId(t, r, s.repository);
1673
+ function dt(n, e, t, r, s) {
1674
+ const o = be(e, we), i = jt.getCompiledRuleId(t, r, s.repository);
1675
1675
  for (const l of o)
1676
1676
  n.push({
1677
1677
  debugSelector: e,
@@ -1714,7 +1714,7 @@ var gr = class {
1714
1714
  if (this._rootScopeName = n, this.balancedBracketSelectors = o, this._onigLib = l, this._basicScopeAttributesProvider = new or(
1715
1715
  t,
1716
1716
  r
1717
- ), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = i, this._grammar = gt(e, null), this._injections = null, this._tokenTypeMatchers = [], s)
1717
+ ), this._rootId = -1, this._lastRuleId = 0, this._ruleId2desc = [null], this._includedGrammars = {}, this._grammarRepository = i, this._grammar = pt(e, null), this._injections = null, this._tokenTypeMatchers = [], s)
1718
1718
  for (const a of Object.keys(s)) {
1719
1719
  const c = be(a, we);
1720
1720
  for (const u of c)
@@ -1749,7 +1749,7 @@ var gr = class {
1749
1749
  const s = r.injections;
1750
1750
  if (s)
1751
1751
  for (let i in s)
1752
- pt(
1752
+ dt(
1753
1753
  e,
1754
1754
  i,
1755
1755
  s[i],
@@ -1761,7 +1761,7 @@ var gr = class {
1761
1761
  const l = this.getExternalGrammar(i);
1762
1762
  if (l) {
1763
1763
  const a = l.injectionSelector;
1764
- a && pt(
1764
+ a && dt(
1765
1765
  e,
1766
1766
  a,
1767
1767
  l,
@@ -1789,7 +1789,7 @@ var gr = class {
1789
1789
  if (this._grammarRepository) {
1790
1790
  const t = this._grammarRepository.lookup(n);
1791
1791
  if (t)
1792
- return this._includedGrammars[n] = gt(
1792
+ return this._includedGrammars[n] = pt(
1793
1793
  t,
1794
1794
  e && e.$base
1795
1795
  ), this._includedGrammars[n];
@@ -1812,7 +1812,7 @@ var gr = class {
1812
1812
  };
1813
1813
  }
1814
1814
  _tokenize(n, e, t, r) {
1815
- this._rootId === -1 && (this._rootId = $t.getCompiledRuleId(
1815
+ this._rootId === -1 && (this._rootId = jt.getCompiledRuleId(
1816
1816
  this._grammar.repository.$self,
1817
1817
  this,
1818
1818
  this._grammar.repository
@@ -1859,7 +1859,7 @@ var gr = class {
1859
1859
  n,
1860
1860
  this._tokenTypeMatchers,
1861
1861
  this.balancedBracketSelectors
1862
- ), a = Wt(
1862
+ ), a = Ft(
1863
1863
  this,
1864
1864
  o,
1865
1865
  s,
@@ -1869,7 +1869,7 @@ var gr = class {
1869
1869
  !0,
1870
1870
  r
1871
1871
  );
1872
- return Dt(o), {
1872
+ return Gt(o), {
1873
1873
  lineLength: i,
1874
1874
  lineTokens: l,
1875
1875
  ruleStack: a.stack,
@@ -1877,7 +1877,7 @@ var gr = class {
1877
1877
  };
1878
1878
  }
1879
1879
  };
1880
- function gt(n, e) {
1880
+ function pt(n, e) {
1881
1881
  return n = On(n), n.repository = n.repository || {}, n.repository.$self = {
1882
1882
  $vscodeTextmateLocation: n.$vscodeTextmateLocation,
1883
1883
  patterns: n.patterns,
@@ -2442,7 +2442,7 @@ class ue {
2442
2442
  ue.prototype.normal = {};
2443
2443
  ue.prototype.property = {};
2444
2444
  ue.prototype.space = void 0;
2445
- function Ht(n, e) {
2445
+ function zt(n, e) {
2446
2446
  const t = {}, r = {};
2447
2447
  for (const s of n)
2448
2448
  Object.assign(t, s.property), Object.assign(r, s.normal);
@@ -2477,24 +2477,24 @@ O.prototype.property = "";
2477
2477
  O.prototype.spaceSeparated = !1;
2478
2478
  O.prototype.space = void 0;
2479
2479
  let Cr = 0;
2480
- const w = V(), A = V(), Ke = V(), m = V(), k = V(), Y = V(), M = V();
2480
+ const w = V(), A = V(), Ht = V(), m = V(), k = V(), Y = V(), M = V();
2481
2481
  function V() {
2482
2482
  return 2 ** ++Cr;
2483
2483
  }
2484
- const Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2484
+ const Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2485
2485
  __proto__: null,
2486
2486
  boolean: w,
2487
2487
  booleanish: A,
2488
2488
  commaOrSpaceSeparated: M,
2489
2489
  commaSeparated: Y,
2490
2490
  number: m,
2491
- overloadedBoolean: Ke,
2491
+ overloadedBoolean: Ht,
2492
2492
  spaceSeparated: k
2493
2493
  }, Symbol.toStringTag, { value: "Module" })), Ge = (
2494
2494
  /** @type {ReadonlyArray<keyof typeof types>} */
2495
- Object.keys(Ye)
2495
+ Object.keys(Ke)
2496
2496
  );
2497
- class Ze extends O {
2497
+ class Qe extends O {
2498
2498
  /**
2499
2499
  * @constructor
2500
2500
  * @param {string} property
@@ -2510,21 +2510,21 @@ class Ze extends O {
2510
2510
  */
2511
2511
  constructor(e, t, r, s) {
2512
2512
  let o = -1;
2513
- if (super(e, t), mt(this, "space", s), typeof r == "number")
2513
+ if (super(e, t), gt(this, "space", s), typeof r == "number")
2514
2514
  for (; ++o < Ge.length; ) {
2515
2515
  const i = Ge[o];
2516
- mt(this, Ge[o], (r & Ye[i]) === Ye[i]);
2516
+ gt(this, Ge[o], (r & Ke[i]) === Ke[i]);
2517
2517
  }
2518
2518
  }
2519
2519
  }
2520
- Ze.prototype.defined = !0;
2521
- function mt(n, e, t) {
2520
+ Qe.prototype.defined = !0;
2521
+ function gt(n, e, t) {
2522
2522
  t && (n[e] = t);
2523
2523
  }
2524
2524
  function Q(n) {
2525
2525
  const e = {}, t = {};
2526
2526
  for (const [r, s] of Object.entries(n.properties)) {
2527
- const o = new Ze(
2527
+ const o = new Qe(
2528
2528
  r,
2529
2529
  n.transform(n.attributes || {}, r),
2530
2530
  s,
@@ -2644,7 +2644,7 @@ const wr = Q({
2644
2644
  dir: null,
2645
2645
  dirName: null,
2646
2646
  disabled: w,
2647
- download: Ke,
2647
+ download: Ht,
2648
2648
  draggable: A,
2649
2649
  encType: null,
2650
2650
  enterKeyHint: null,
@@ -2657,7 +2657,7 @@ const wr = Q({
2657
2657
  formTarget: null,
2658
2658
  headers: k,
2659
2659
  height: m,
2660
- hidden: Ke,
2660
+ hidden: w,
2661
2661
  high: m,
2662
2662
  href: null,
2663
2663
  hrefLang: null,
@@ -3541,7 +3541,7 @@ const wr = Q({
3541
3541
  transform(n, e) {
3542
3542
  return "xml:" + e.slice(3).toLowerCase();
3543
3543
  }
3544
- }), kr = /[A-Z]/g, yt = /-[a-z]/g, Rr = /^data[-\w.:]+$/i;
3544
+ }), kr = /[A-Z]/g, mt = /-[a-z]/g, Rr = /^data[-\w.:]+$/i;
3545
3545
  function Ar(n, e) {
3546
3546
  const t = Ve(e);
3547
3547
  let r = e, s = O;
@@ -3549,16 +3549,16 @@ function Ar(n, e) {
3549
3549
  return n.property[n.normal[t]];
3550
3550
  if (t.length > 4 && t.slice(0, 4) === "data" && Rr.test(e)) {
3551
3551
  if (e.charAt(4) === "-") {
3552
- const o = e.slice(5).replace(yt, Nr);
3552
+ const o = e.slice(5).replace(mt, Nr);
3553
3553
  r = "data" + o.charAt(0).toUpperCase() + o.slice(1);
3554
3554
  } else {
3555
3555
  const o = e.slice(4);
3556
- if (!yt.test(o)) {
3556
+ if (!mt.test(o)) {
3557
3557
  let i = o.replace(kr, Pr);
3558
3558
  i.charAt(0) !== "-" && (i = "-" + i), e = "data" + i;
3559
3559
  }
3560
3560
  }
3561
- s = Ze;
3561
+ s = Qe;
3562
3562
  }
3563
3563
  return new s(r, e);
3564
3564
  }
@@ -3568,15 +3568,15 @@ function Pr(n) {
3568
3568
  function Nr(n) {
3569
3569
  return n.charAt(1).toUpperCase();
3570
3570
  }
3571
- const Tr = Ht([qt, wr, Yt, Xt, Jt], "html"), Qt = Ht([qt, vr, Yt, Xt, Jt], "svg"), _t = {}.hasOwnProperty;
3571
+ const Tr = zt([qt, wr, Yt, Xt, Jt], "html"), Qt = zt([qt, vr, Yt, Xt, Jt], "svg"), yt = {}.hasOwnProperty;
3572
3572
  function xr(n, e) {
3573
3573
  const t = e || {};
3574
3574
  function r(s, ...o) {
3575
3575
  let i = r.invalid;
3576
3576
  const l = r.handlers;
3577
- if (s && _t.call(s, n)) {
3577
+ if (s && yt.call(s, n)) {
3578
3578
  const a = String(s[n]);
3579
- i = _t.call(l, a) ? l[a] : r.unknown;
3579
+ i = yt.call(l, a) ? l[a] : r.unknown;
3580
3580
  }
3581
3581
  if (i)
3582
3582
  return i.call(this, s, ...o);
@@ -3586,7 +3586,7 @@ function xr(n, e) {
3586
3586
  const Er = /["&'<>`]/g, Ir = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, Lr = (
3587
3587
  // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
3588
3588
  /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
3589
- ), Or = /[|\\{}()[\]^$+*?.]/g, bt = /* @__PURE__ */ new WeakMap();
3589
+ ), Or = /[|\\{}()[\]^$+*?.]/g, _t = /* @__PURE__ */ new WeakMap();
3590
3590
  function Mr(n, e) {
3591
3591
  if (n = n.replace(
3592
3592
  e.subset ? Br(e.subset) : Er,
@@ -3610,8 +3610,8 @@ function Mr(n, e) {
3610
3610
  }
3611
3611
  }
3612
3612
  function Br(n) {
3613
- let e = bt.get(n);
3614
- return e || (e = Gr(n), bt.set(n, e)), e;
3613
+ let e = _t.get(n);
3614
+ return e || (e = Gr(n), _t.set(n, e)), e;
3615
3615
  }
3616
3616
  function Gr(n) {
3617
3617
  const e = [];
@@ -3999,15 +3999,15 @@ const Fr = [
3999
3999
  "not",
4000
4000
  "para",
4001
4001
  "times"
4002
- ], Zt = {}.hasOwnProperty, Xe = {};
4002
+ ], Zt = {}.hasOwnProperty, Ye = {};
4003
4003
  let pe;
4004
4004
  for (pe in De)
4005
- Zt.call(De, pe) && (Xe[De[pe]] = pe);
4005
+ Zt.call(De, pe) && (Ye[De[pe]] = pe);
4006
4006
  const zr = /[^\dA-Za-z]/;
4007
4007
  function Hr(n, e, t, r) {
4008
4008
  const s = String.fromCharCode(n);
4009
- if (Zt.call(Xe, s)) {
4010
- const o = Xe[s], i = "&" + o;
4009
+ if (Zt.call(Ye, s)) {
4010
+ const o = Ye[s], i = "&" + o;
4011
4011
  return t && Fr.includes(o) && !Wr.includes(o) && (!r || e && e !== 61 && zr.test(String.fromCharCode(e))) ? i : i + ";";
4012
4012
  }
4013
4013
  return "";
@@ -4048,7 +4048,7 @@ function Xr(n, e, t, r) {
4048
4048
  function Jr(n, e, t, r) {
4049
4049
  return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
4050
4050
  }
4051
- function St(n, e) {
4051
+ function bt(n, e) {
4052
4052
  const t = String(n);
4053
4053
  if (typeof e != "string")
4054
4054
  throw new TypeError("Expected character");
@@ -4067,10 +4067,10 @@ function Zr(n) {
4067
4067
  return n.join(" ").trim();
4068
4068
  }
4069
4069
  const es = /[ \t\n\f\r]/g;
4070
- function et(n) {
4071
- return typeof n == "object" ? n.type === "text" ? Ct(n.value) : !1 : Ct(n);
4070
+ function Ze(n) {
4071
+ return typeof n == "object" ? n.type === "text" ? St(n.value) : !1 : St(n);
4072
4072
  }
4073
- function Ct(n) {
4073
+ function St(n) {
4074
4074
  return n.replace(es, "") === "";
4075
4075
  }
4076
4076
  const T = tn(1), en = tn(-1), ts = [];
@@ -4080,7 +4080,7 @@ function tn(n) {
4080
4080
  const o = t ? t.children : ts;
4081
4081
  let i = (r || 0) + n, l = o[i];
4082
4082
  if (!s)
4083
- for (; l && et(l); )
4083
+ for (; l && Ze(l); )
4084
4084
  i += n, l = o[i];
4085
4085
  return l;
4086
4086
  }
@@ -4092,7 +4092,7 @@ function nn(n) {
4092
4092
  return ns.call(n, t.tagName) && n[t.tagName](t, r, s);
4093
4093
  }
4094
4094
  }
4095
- const tt = nn({
4095
+ const et = nn({
4096
4096
  body: ss,
4097
4097
  caption: Ue,
4098
4098
  colgroup: Ue,
@@ -4104,18 +4104,18 @@ const tt = nn({
4104
4104
  optgroup: cs,
4105
4105
  option: us,
4106
4106
  p: os,
4107
- rp: wt,
4108
- rt: wt,
4107
+ rp: Ct,
4108
+ rt: Ct,
4109
4109
  tbody: fs,
4110
- td: vt,
4110
+ td: wt,
4111
4111
  tfoot: ds,
4112
- th: vt,
4112
+ th: wt,
4113
4113
  thead: hs,
4114
4114
  tr: ps
4115
4115
  });
4116
4116
  function Ue(n, e, t) {
4117
4117
  const r = T(t, e, !0);
4118
- return !r || r.type !== "comment" && !(r.type === "text" && et(r.value.charAt(0)));
4118
+ return !r || r.type !== "comment" && !(r.type === "text" && Ze(r.value.charAt(0)));
4119
4119
  }
4120
4120
  function rs(n, e, t) {
4121
4121
  const r = T(t, e);
@@ -4142,7 +4142,7 @@ function ls(n, e, t) {
4142
4142
  const r = T(t, e);
4143
4143
  return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
4144
4144
  }
4145
- function wt(n, e, t) {
4145
+ function Ct(n, e, t) {
4146
4146
  const r = T(t, e);
4147
4147
  return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
4148
4148
  }
@@ -4169,7 +4169,7 @@ function ps(n, e, t) {
4169
4169
  const r = T(t, e);
4170
4170
  return !r || r.type === "element" && r.tagName === "tr";
4171
4171
  }
4172
- function vt(n, e, t) {
4172
+ function wt(n, e, t) {
4173
4173
  const r = T(t, e);
4174
4174
  return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
4175
4175
  }
@@ -4196,15 +4196,15 @@ function ys(n) {
4196
4196
  }
4197
4197
  function _s(n) {
4198
4198
  const e = T(n, -1, !0);
4199
- return !e || e.type !== "comment" && !(e.type === "text" && et(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
4199
+ return !e || e.type !== "comment" && !(e.type === "text" && Ze(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
4200
4200
  }
4201
4201
  function bs(n, e, t) {
4202
4202
  const r = en(t, e), s = T(n, -1, !0);
4203
- return t && r && r.type === "element" && r.tagName === "colgroup" && tt(r, t.children.indexOf(r), t) ? !1 : !!(s && s.type === "element" && s.tagName === "col");
4203
+ return t && r && r.type === "element" && r.tagName === "colgroup" && et(r, t.children.indexOf(r), t) ? !1 : !!(s && s.type === "element" && s.tagName === "col");
4204
4204
  }
4205
4205
  function Ss(n, e, t) {
4206
4206
  const r = en(t, e), s = T(n, -1);
4207
- return t && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && tt(r, t.children.indexOf(r), t) ? !1 : !!(s && s.type === "element" && s.tagName === "tr");
4207
+ return t && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && et(r, t.children.indexOf(r), t) ? !1 : !!(s && s.type === "element" && s.tagName === "tr");
4208
4208
  }
4209
4209
  const ge = {
4210
4210
  // See: <https://html.spec.whatwg.org/#attribute-name-state>.
@@ -4245,7 +4245,7 @@ function Cs(n, e, t, r) {
4245
4245
  const c = ws(r, n.properties), u = r.all(
4246
4246
  s.space === "html" && n.tagName === "template" ? n.content : n
4247
4247
  );
4248
- return r.schema = s, u && (i = !1), (c || !o || !gs(n, e, t)) && (l.push("<", n.tagName, c ? " " + c : ""), i && (s.space === "svg" || r.settings.closeSelfClosing) && (a = c.charAt(c.length - 1), (!r.settings.tightSelfClosing || a === "/" || a && a !== '"' && a !== "'") && l.push(" "), l.push("/")), l.push(">")), l.push(u), !i && (!o || !tt(n, e, t)) && l.push("</" + n.tagName + ">"), l.join("");
4248
+ return r.schema = s, u && (i = !1), (c || !o || !gs(n, e, t)) && (l.push("<", n.tagName, c ? " " + c : ""), i && (s.space === "svg" || r.settings.closeSelfClosing) && (a = c.charAt(c.length - 1), (!r.settings.tightSelfClosing || a === "/" || a && a !== '"' && a !== "'") && l.push(" "), l.push("/")), l.push(">")), l.push(u), !i && (!o || !et(n, e, t)) && l.push("</" + n.tagName + ">"), l.join("");
4249
4249
  }
4250
4250
  function ws(n, e) {
4251
4251
  const t = [];
@@ -4283,7 +4283,7 @@ function vs(n, e, t) {
4283
4283
  attribute: !0,
4284
4284
  subset: ge.unquoted[s][o]
4285
4285
  })
4286
- )), l !== t && (n.settings.quoteSmart && St(t, i) > St(t, n.alternative) && (i = n.alternative), l = i + X(
4286
+ )), l !== t && (n.settings.quoteSmart && bt(t, i) > bt(t, n.alternative) && (i = n.alternative), l = i + X(
4287
4287
  t,
4288
4288
  Object.assign({}, n.settings.characterReferences, {
4289
4289
  // Always encode without parse errors in non-HTML.
@@ -4382,17 +4382,17 @@ function Te(n, e = !1) {
4382
4382
  }
4383
4383
  return s;
4384
4384
  }
4385
- function nt(n) {
4385
+ function tt(n) {
4386
4386
  return !n || ["plaintext", "txt", "text", "plain"].includes(n);
4387
4387
  }
4388
4388
  function Gs(n) {
4389
- return n === "ansi" || nt(n);
4389
+ return n === "ansi" || tt(n);
4390
4390
  }
4391
- function rt(n) {
4391
+ function nt(n) {
4392
4392
  return n === "none";
4393
4393
  }
4394
4394
  function Ds(n) {
4395
- return rt(n);
4395
+ return nt(n);
4396
4396
  }
4397
4397
  function sn(n, e) {
4398
4398
  var r;
@@ -4529,10 +4529,10 @@ class Z {
4529
4529
  * @deprecated use `getScopes` instead
4530
4530
  */
4531
4531
  get scopes() {
4532
- return kt(this._stacks[this.theme]);
4532
+ return vt(this._stacks[this.theme]);
4533
4533
  }
4534
4534
  getScopes(e = this.theme) {
4535
- return kt(this._stacks[e]);
4535
+ return vt(this._stacks[e]);
4536
4536
  }
4537
4537
  toJSON() {
4538
4538
  return {
@@ -4543,7 +4543,7 @@ class Z {
4543
4543
  };
4544
4544
  }
4545
4545
  }
4546
- function kt(n) {
4546
+ function vt(n) {
4547
4547
  const e = [], t = /* @__PURE__ */ new Set();
4548
4548
  function r(s) {
4549
4549
  var i;
@@ -4732,7 +4732,7 @@ function Vs(n, e) {
4732
4732
  position: n.length
4733
4733
  };
4734
4734
  }
4735
- function Rt(n, e) {
4735
+ function kt(n, e) {
4736
4736
  let t = 1;
4737
4737
  const r = n[e + t++];
4738
4738
  let s;
@@ -4776,7 +4776,7 @@ function Ks(n) {
4776
4776
  value: { type: "named", name: H[s - 30] }
4777
4777
  });
4778
4778
  else if (s === 38) {
4779
- const [o, i] = Rt(n, t);
4779
+ const [o, i] = kt(n, t);
4780
4780
  i && e.push({
4781
4781
  type: "setForegroundColor",
4782
4782
  value: i
@@ -4791,7 +4791,7 @@ function Ks(n) {
4791
4791
  value: { type: "named", name: H[s - 40] }
4792
4792
  });
4793
4793
  else if (s === 48) {
4794
- const [o, i] = Rt(n, t);
4794
+ const [o, i] = kt(n, t);
4795
4795
  i && e.push({
4796
4796
  type: "setBackgroundColor",
4797
4797
  value: i
@@ -4931,12 +4931,12 @@ function Zs(n) {
4931
4931
  const t = n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
4932
4932
  return t ? `var(${t[1]}-dim)` : n;
4933
4933
  }
4934
- function st(n, e, t = {}) {
4934
+ function rt(n, e, t = {}) {
4935
4935
  const {
4936
4936
  lang: r = "text",
4937
4937
  theme: s = n.getLoadedThemes()[0]
4938
4938
  } = t;
4939
- if (nt(r) || rt(s))
4939
+ if (tt(r) || nt(s))
4940
4940
  return Te(e).map((a) => [{ content: a[0], offset: a[1] }]);
4941
4941
  const { theme: o, colorMap: i } = n.setTheme(s);
4942
4942
  if (r === "ansi")
@@ -4957,7 +4957,7 @@ function eo(...n) {
4957
4957
  lang: s = "text",
4958
4958
  theme: o = e.getLoadedThemes()[0]
4959
4959
  } = r;
4960
- if (nt(s) || rt(o))
4960
+ if (tt(s) || nt(o))
4961
4961
  throw new q("Plain language does not have grammar state");
4962
4962
  if (s === "ansi")
4963
4963
  throw new q("ANSI language does not have grammar state");
@@ -5025,7 +5025,7 @@ function Re(n, e, t, r, s) {
5025
5025
  fontStyle: ee
5026
5026
  };
5027
5027
  if (s.includeExplanation) {
5028
- const it = [];
5028
+ const ot = [];
5029
5029
  if (s.includeExplanation !== "scopeName")
5030
5030
  for (const $ of t.settings) {
5031
5031
  let K;
@@ -5039,24 +5039,24 @@ function Re(n, e, t, r, s) {
5039
5039
  default:
5040
5040
  continue;
5041
5041
  }
5042
- it.push({
5042
+ ot.push({
5043
5043
  settings: $,
5044
5044
  selectors: K.map((Ie) => Ie.split(/ /))
5045
5045
  });
5046
5046
  }
5047
5047
  Ee.explanation = [];
5048
- let at = 0;
5049
- for (; L + at < P; ) {
5048
+ let it = 0;
5049
+ for (; L + it < P; ) {
5050
5050
  const $ = y[b], K = g.substring(
5051
5051
  $.startIndex,
5052
5052
  $.endIndex
5053
5053
  );
5054
- at += K.length, Ee.explanation.push({
5054
+ it += K.length, Ee.explanation.push({
5055
5055
  content: K,
5056
5056
  scopes: s.includeExplanation === "scopeName" ? no(
5057
5057
  $.scopes
5058
5058
  ) : ro(
5059
- it,
5059
+ ot,
5060
5060
  $.scopes
5061
5061
  )
5062
5062
  }), b += 1;
@@ -5085,15 +5085,15 @@ function ro(n, e) {
5085
5085
  }
5086
5086
  return t;
5087
5087
  }
5088
- function At(n, e) {
5088
+ function Rt(n, e) {
5089
5089
  return n === e || e.substring(0, n.length) === n && e[n.length] === ".";
5090
5090
  }
5091
5091
  function so(n, e, t) {
5092
- if (!At(n[n.length - 1], e))
5092
+ if (!Rt(n[n.length - 1], e))
5093
5093
  return !1;
5094
5094
  let r = n.length - 2, s = t.length - 1;
5095
5095
  for (; r >= 0 && s >= 0; )
5096
- At(n[r], t[s]) && (r -= 1), s -= 1;
5096
+ Rt(n[r], t[s]) && (r -= 1), s -= 1;
5097
5097
  return r === -1;
5098
5098
  }
5099
5099
  function oo(n, e, t) {
@@ -5108,7 +5108,7 @@ function oo(n, e, t) {
5108
5108
  }
5109
5109
  function un(n, e, t) {
5110
5110
  const r = Object.entries(t.themes).filter((a) => a[1]).map((a) => ({ color: a[0], theme: a[1] })), s = r.map((a) => {
5111
- const c = st(n, e, {
5111
+ const c = rt(n, e, {
5112
5112
  ...t,
5113
5113
  theme: a.theme
5114
5114
  }), u = ae(c), h = typeof a.theme == "string" ? a.theme : a.theme.name;
@@ -5190,7 +5190,7 @@ function Ae(n, e, t) {
5190
5190
  s = h.map((_, y) => (y === 0 && c ? "" : `${u + _.color}:`) + (z(f[y].fg, C[y]) || "inherit")).join(";"), r = h.map((_, y) => (y === 0 && c ? "" : `${u + _.color}-bg:`) + (z(f[y].bg, C[y]) || "inherit")).join(";"), i = `shiki-themes ${f.map((_) => _.name).join(" ")}`, l = c ? void 0 : [s, r].join(";");
5191
5191
  } else if ("theme" in t) {
5192
5192
  const c = ve(t.theme, t);
5193
- o = st(
5193
+ o = rt(
5194
5194
  n,
5195
5195
  e,
5196
5196
  t
@@ -5427,10 +5427,10 @@ function ho(n, e, t) {
5427
5427
  s = ((o = i.postprocess) == null ? void 0 : o.call(r, s, t)) || s;
5428
5428
  return s;
5429
5429
  }
5430
- const Pt = { light: "#333333", dark: "#bbbbbb" }, Nt = { light: "#fffffe", dark: "#1e1e1e" }, Tt = "__shiki_resolved";
5431
- function ot(n) {
5430
+ const At = { light: "#333333", dark: "#bbbbbb" }, Pt = { light: "#fffffe", dark: "#1e1e1e" }, Nt = "__shiki_resolved";
5431
+ function st(n) {
5432
5432
  var l, a, c, u, h;
5433
- if (n != null && n[Tt])
5433
+ if (n != null && n[Nt])
5434
5434
  return n;
5435
5435
  const e = {
5436
5436
  ...n
@@ -5439,7 +5439,7 @@ function ot(n) {
5439
5439
  let { bg: t, fg: r } = e;
5440
5440
  if (!t || !r) {
5441
5441
  const d = e.settings ? e.settings.find((f) => !f.name && !f.scope) : void 0;
5442
- (l = d == null ? void 0 : d.settings) != null && l.foreground && (r = d.settings.foreground), (a = d == null ? void 0 : d.settings) != null && a.background && (t = d.settings.background), !r && ((c = e == null ? void 0 : e.colors) != null && c["editor.foreground"]) && (r = e.colors["editor.foreground"]), !t && ((u = e == null ? void 0 : e.colors) != null && u["editor.background"]) && (t = e.colors["editor.background"]), r || (r = e.type === "light" ? Pt.light : Pt.dark), t || (t = e.type === "light" ? Nt.light : Nt.dark), e.fg = r, e.bg = t;
5442
+ (l = d == null ? void 0 : d.settings) != null && l.foreground && (r = d.settings.foreground), (a = d == null ? void 0 : d.settings) != null && a.background && (t = d.settings.background), !r && ((c = e == null ? void 0 : e.colors) != null && c["editor.foreground"]) && (r = e.colors["editor.foreground"]), !t && ((u = e == null ? void 0 : e.colors) != null && u["editor.background"]) && (t = e.colors["editor.background"]), r || (r = e.type === "light" ? At.light : At.dark), t || (t = e.type === "light" ? Pt.light : Pt.dark), e.fg = r, e.bg = t;
5443
5443
  }
5444
5444
  e.settings[0] && e.settings[0].settings && !e.settings[0].scope || e.settings.unshift({
5445
5445
  settings: {
@@ -5483,7 +5483,7 @@ function ot(n) {
5483
5483
  const f = i(e.colors[d]);
5484
5484
  e.colorReplacements[f] = e.colors[d], e.colors[d] = f;
5485
5485
  }
5486
- return Object.defineProperty(e, Tt, {
5486
+ return Object.defineProperty(e, Nt, {
5487
5487
  enumerable: !1,
5488
5488
  writable: !1,
5489
5489
  value: !0
@@ -5497,7 +5497,7 @@ async function hn(n) {
5497
5497
  async function fn(n) {
5498
5498
  return (await Promise.all(
5499
5499
  n.map(
5500
- async (t) => Ds(t) ? null : ot(await on(t))
5500
+ async (t) => Ds(t) ? null : st(await on(t))
5501
5501
  )
5502
5502
  )).filter((t) => !!t);
5503
5503
  }
@@ -5517,7 +5517,7 @@ class fo extends br {
5517
5517
  return typeof t == "string" ? this._resolvedThemes.get(t) : this.loadTheme(t);
5518
5518
  }
5519
5519
  loadTheme(t) {
5520
- const r = ot(t);
5520
+ const r = st(t);
5521
5521
  return r.name && (this._resolvedThemes.set(r.name, r), this._loadedThemesCache = null), r;
5522
5522
  }
5523
5523
  getLoadedThemes() {
@@ -5639,7 +5639,7 @@ function go(n) {
5639
5639
  let e = !1;
5640
5640
  if (!n.engine)
5641
5641
  throw new I("`engine` option is required for synchronous mode");
5642
- const t = (n.langs || []).flat(1), r = (n.themes || []).flat(1).map(ot), s = new po(n.engine, t), o = new fo(s, r, t, n.langAlias);
5642
+ const t = (n.langs || []).flat(1), r = (n.themes || []).flat(1).map(st), s = new po(n.engine, t), o = new fo(s, r, t, n.langAlias);
5643
5643
  let i;
5644
5644
  function l(b) {
5645
5645
  _();
@@ -5730,7 +5730,7 @@ async function Co(n = {}) {
5730
5730
  const e = await mo(n);
5731
5731
  return {
5732
5732
  getLastGrammarState: (...t) => eo(e, ...t),
5733
- codeToTokensBase: (t, r) => st(e, t, r),
5733
+ codeToTokensBase: (t, r) => rt(e, t, r),
5734
5734
  codeToTokensWithThemes: (t, r) => un(e, t, r),
5735
5735
  codeToTokens: (t, r) => Ae(e, t, r),
5736
5736
  codeToHast: (t, r) => Pe(e, t, r),
@@ -5748,7 +5748,7 @@ export {
5748
5748
  Pe as codeToHast,
5749
5749
  ho as codeToHtml,
5750
5750
  Ae as codeToTokens,
5751
- st as codeToTokensBase,
5751
+ rt as codeToTokensBase,
5752
5752
  un as codeToTokensWithThemes,
5753
5753
  Co as createHighlighterCore,
5754
5754
  Fs as createPositionConverter,
@@ -5756,12 +5756,12 @@ export {
5756
5756
  go as createShikiInternalSync,
5757
5757
  an as getTokenStyleObject,
5758
5758
  Ls as hastToHtml,
5759
- rt as isNoneTheme,
5760
- nt as isPlainLang,
5759
+ nt as isNoneTheme,
5760
+ tt as isPlainLang,
5761
5761
  Gs as isSpecialLang,
5762
5762
  Ds as isSpecialTheme,
5763
5763
  on as normalizeGetter,
5764
- ot as normalizeTheme,
5764
+ st as normalizeTheme,
5765
5765
  ve as resolveColorReplacements,
5766
5766
  Te as splitLines,
5767
5767
  Us as splitToken,