@kernelift/markdown 1.1.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1460,9 +1460,9 @@ function fp(e, t, n, r) {
1460
1460
  e.src.charCodeAt(a) === 32 ? (a++, N++, y = !1, R = !0) : e.src.charCodeAt(a) === 9 ? (R = !0, (e.bsCount[d] + N) % 4 === 3 ? (a++, N++, y = !1) : y = !0) : R = !1;
1461
1461
  let v = N;
1462
1462
  for (o.push(e.bMarks[d]), e.bMarks[d] = a; a < i; ) {
1463
- const F = e.src.charCodeAt(a);
1464
- if (ne(F))
1465
- F === 9 ? v += 4 - (v + e.bsCount[d] + (y ? 1 : 0)) % 4 : v++;
1463
+ const U = e.src.charCodeAt(a);
1464
+ if (ne(U))
1465
+ U === 9 ? v += 4 - (v + e.bsCount[d] + (y ? 1 : 0)) % 4 : v++;
1466
1466
  else
1467
1467
  break;
1468
1468
  a++;
@@ -1587,10 +1587,10 @@ function Rp(e, t, n, r) {
1587
1587
  const C = e.sCount[c] + p - (e.bMarks[c] + e.tShift[c]);
1588
1588
  let N = C;
1589
1589
  for (; i < a; ) {
1590
- const L = e.src.charCodeAt(i);
1591
- if (L === 9)
1590
+ const w = e.src.charCodeAt(i);
1591
+ if (w === 9)
1592
1592
  N += 4 - (N + e.bsCount[c]) % 4;
1593
- else if (L === 32)
1593
+ else if (w === 32)
1594
1594
  N++;
1595
1595
  else
1596
1596
  break;
@@ -1601,18 +1601,18 @@ function Rp(e, t, n, r) {
1601
1601
  R >= a ? y = 1 : y = N - C, y > 4 && (y = 1);
1602
1602
  const v = C + y;
1603
1603
  o = e.push("list_item_open", "li", 1), o.markup = String.fromCharCode(d);
1604
- const F = [c, 0];
1605
- o.map = F, _ && (o.info = e.src.slice(s, p - 1));
1606
- const A = e.tight, h = e.tShift[c], M = e.sCount[c], P = e.listIndent;
1607
- if (e.listIndent = e.blkIndent, e.blkIndent = v, e.tight = !0, e.tShift[c] = R - e.bMarks[c], e.sCount[c] = N, R >= a && e.isEmpty(c + 1) ? e.line = Math.min(e.line + 2, n) : e.md.block.tokenize(e, c, n, !0), (!e.tight || T) && (l = !1), T = e.line - c > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = P, e.tShift[c] = h, e.sCount[c] = M, e.tight = A, o = e.push("list_item_close", "li", -1), o.markup = String.fromCharCode(d), c = e.line, F[1] = c, c >= n || e.sCount[c] < e.blkIndent || e.sCount[c] - e.blkIndent >= 4)
1604
+ const U = [c, 0];
1605
+ o.map = U, _ && (o.info = e.src.slice(s, p - 1));
1606
+ const A = e.tight, O = e.tShift[c], M = e.sCount[c], P = e.listIndent;
1607
+ if (e.listIndent = e.blkIndent, e.blkIndent = v, e.tight = !0, e.tShift[c] = R - e.bMarks[c], e.sCount[c] = N, R >= a && e.isEmpty(c + 1) ? e.line = Math.min(e.line + 2, n) : e.md.block.tokenize(e, c, n, !0), (!e.tight || T) && (l = !1), T = e.line - c > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = P, e.tShift[c] = O, e.sCount[c] = M, e.tight = A, o = e.push("list_item_close", "li", -1), o.markup = String.fromCharCode(d), c = e.line, U[1] = c, c >= n || e.sCount[c] < e.blkIndent || e.sCount[c] - e.blkIndent >= 4)
1608
1608
  break;
1609
- let G = !1;
1610
- for (let L = 0, k = f.length; L < k; L++)
1611
- if (f[L](e, c, n, !0)) {
1612
- G = !0;
1609
+ let L = !1;
1610
+ for (let w = 0, F = f.length; w < F; w++)
1611
+ if (f[w](e, c, n, !0)) {
1612
+ L = !0;
1613
1613
  break;
1614
1614
  }
1615
- if (G)
1615
+ if (L)
1616
1616
  break;
1617
1617
  if (_) {
1618
1618
  if (p = ss(e, c), p < 0)
@@ -1637,13 +1637,13 @@ function Cp(e, t, n, r) {
1637
1637
  if (e.sCount[f] - e.blkIndent > 3 && (C = !0), e.sCount[f] < 0 && (C = !0), !C) {
1638
1638
  const y = e.md.block.ruler.getRules("reference"), v = e.parentType;
1639
1639
  e.parentType = "reference";
1640
- let F = !1;
1641
- for (let A = 0, h = y.length; A < h; A++)
1640
+ let U = !1;
1641
+ for (let A = 0, O = y.length; A < O; A++)
1642
1642
  if (y[A](e, f, b, !0)) {
1643
- F = !0;
1643
+ U = !0;
1644
1644
  break;
1645
1645
  }
1646
- if (e.parentType = v, F)
1646
+ if (e.parentType = v, U)
1647
1647
  return null;
1648
1648
  }
1649
1649
  const N = e.bMarks[f] + e.tShift[f], R = e.eMarks[f];
@@ -3095,8 +3095,8 @@ function Vm() {
3095
3095
  throw new Error("map is read-only");
3096
3096
  } : E instanceof Set && (E.add = E.clear = E.delete = function() {
3097
3097
  throw new Error("set is read-only");
3098
- }), Object.freeze(E), Object.getOwnPropertyNames(E).forEach((O) => {
3099
- const D = E[O], H = typeof D;
3098
+ }), Object.freeze(E), Object.getOwnPropertyNames(E).forEach((h) => {
3099
+ const D = E[h], H = typeof D;
3100
3100
  (H === "object" || H === "function") && !Object.isFrozen(D) && e(D);
3101
3101
  }), E;
3102
3102
  }
@@ -3104,8 +3104,8 @@ function Vm() {
3104
3104
  /**
3105
3105
  * @param {CompiledMode} mode
3106
3106
  */
3107
- constructor(O) {
3108
- O.data === void 0 && (O.data = {}), this.data = O.data, this.isMatchIgnored = !1;
3107
+ constructor(h) {
3108
+ h.data === void 0 && (h.data = {}), this.data = h.data, this.isMatchIgnored = !1;
3109
3109
  }
3110
3110
  ignoreMatch() {
3111
3111
  this.isMatchIgnored = !0;
@@ -3114,27 +3114,27 @@ function Vm() {
3114
3114
  function n(E) {
3115
3115
  return E.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
3116
3116
  }
3117
- function r(E, ...O) {
3117
+ function r(E, ...h) {
3118
3118
  const D = /* @__PURE__ */ Object.create(null);
3119
3119
  for (const H in E)
3120
3120
  D[H] = E[H];
3121
- return O.forEach(function(H) {
3121
+ return h.forEach(function(H) {
3122
3122
  for (const se in H)
3123
3123
  D[se] = H[se];
3124
3124
  }), /** @type {T} */
3125
3125
  D;
3126
3126
  }
3127
- const a = "</span>", i = (E) => !!E.scope, s = (E, { prefix: O }) => {
3127
+ const a = "</span>", i = (E) => !!E.scope, s = (E, { prefix: h }) => {
3128
3128
  if (E.startsWith("language:"))
3129
3129
  return E.replace("language:", "language-");
3130
3130
  if (E.includes(".")) {
3131
3131
  const D = E.split(".");
3132
3132
  return [
3133
- `${O}${D.shift()}`,
3133
+ `${h}${D.shift()}`,
3134
3134
  ...D.map((H, se) => `${H}${"_".repeat(se + 1)}`)
3135
3135
  ].join(" ");
3136
3136
  }
3137
- return `${O}${E}`;
3137
+ return `${h}${E}`;
3138
3138
  };
3139
3139
  class o {
3140
3140
  /**
@@ -3143,24 +3143,24 @@ function Vm() {
3143
3143
  * @param {Tree} parseTree - the parse tree (must support `walk` API)
3144
3144
  * @param {{classPrefix: string}} options
3145
3145
  */
3146
- constructor(O, D) {
3147
- this.buffer = "", this.classPrefix = D.classPrefix, O.walk(this);
3146
+ constructor(h, D) {
3147
+ this.buffer = "", this.classPrefix = D.classPrefix, h.walk(this);
3148
3148
  }
3149
3149
  /**
3150
3150
  * Adds texts to the output stream
3151
3151
  *
3152
3152
  * @param {string} text */
3153
- addText(O) {
3154
- this.buffer += n(O);
3153
+ addText(h) {
3154
+ this.buffer += n(h);
3155
3155
  }
3156
3156
  /**
3157
3157
  * Adds a node open to the output stream (if needed)
3158
3158
  *
3159
3159
  * @param {Node} node */
3160
- openNode(O) {
3161
- if (!i(O)) return;
3160
+ openNode(h) {
3161
+ if (!i(h)) return;
3162
3162
  const D = s(
3163
- O.scope,
3163
+ h.scope,
3164
3164
  { prefix: this.classPrefix }
3165
3165
  );
3166
3166
  this.span(D);
@@ -3169,8 +3169,8 @@ function Vm() {
3169
3169
  * Adds a node close to the output stream (if needed)
3170
3170
  *
3171
3171
  * @param {Node} node */
3172
- closeNode(O) {
3173
- i(O) && (this.buffer += a);
3172
+ closeNode(h) {
3173
+ i(h) && (this.buffer += a);
3174
3174
  }
3175
3175
  /**
3176
3176
  * returns the accumulated buffer
@@ -3183,13 +3183,13 @@ function Vm() {
3183
3183
  * Builds a span element
3184
3184
  *
3185
3185
  * @param {string} className */
3186
- span(O) {
3187
- this.buffer += `<span class="${O}">`;
3186
+ span(h) {
3187
+ this.buffer += `<span class="${h}">`;
3188
3188
  }
3189
3189
  }
3190
3190
  const c = (E = {}) => {
3191
- const O = { children: [] };
3192
- return Object.assign(O, E), O;
3191
+ const h = { children: [] };
3192
+ return Object.assign(h, E), h;
3193
3193
  };
3194
3194
  class l {
3195
3195
  constructor() {
@@ -3202,12 +3202,12 @@ function Vm() {
3202
3202
  return this.rootNode;
3203
3203
  }
3204
3204
  /** @param {Node} node */
3205
- add(O) {
3206
- this.top.children.push(O);
3205
+ add(h) {
3206
+ this.top.children.push(h);
3207
3207
  }
3208
3208
  /** @param {string} scope */
3209
- openNode(O) {
3210
- const D = c({ scope: O });
3209
+ openNode(h) {
3210
+ const D = c({ scope: h });
3211
3211
  this.add(D), this.stack.push(D);
3212
3212
  }
3213
3213
  closeNode() {
@@ -3224,21 +3224,21 @@ function Vm() {
3224
3224
  * @typedef { import("./html_renderer").Renderer } Renderer
3225
3225
  * @param {Renderer} builder
3226
3226
  */
3227
- walk(O) {
3228
- return this.constructor._walk(O, this.rootNode);
3227
+ walk(h) {
3228
+ return this.constructor._walk(h, this.rootNode);
3229
3229
  }
3230
3230
  /**
3231
3231
  * @param {Renderer} builder
3232
3232
  * @param {Node} node
3233
3233
  */
3234
- static _walk(O, D) {
3235
- return typeof D == "string" ? O.addText(D) : D.children && (O.openNode(D), D.children.forEach((H) => this._walk(O, H)), O.closeNode(D)), O;
3234
+ static _walk(h, D) {
3235
+ return typeof D == "string" ? h.addText(D) : D.children && (h.openNode(D), D.children.forEach((H) => this._walk(h, H)), h.closeNode(D)), h;
3236
3236
  }
3237
3237
  /**
3238
3238
  * @param {Node} node
3239
3239
  */
3240
- static _collapse(O) {
3241
- typeof O != "string" && O.children && (O.children.every((D) => typeof D == "string") ? O.children = [O.children.join("")] : O.children.forEach((D) => {
3240
+ static _collapse(h) {
3241
+ typeof h != "string" && h.children && (h.children.every((D) => typeof D == "string") ? h.children = [h.children.join("")] : h.children.forEach((D) => {
3242
3242
  l._collapse(D);
3243
3243
  }));
3244
3244
  }
@@ -3247,18 +3247,18 @@ function Vm() {
3247
3247
  /**
3248
3248
  * @param {*} options
3249
3249
  */
3250
- constructor(O) {
3251
- super(), this.options = O;
3250
+ constructor(h) {
3251
+ super(), this.options = h;
3252
3252
  }
3253
3253
  /**
3254
3254
  * @param {string} text
3255
3255
  */
3256
- addText(O) {
3257
- O !== "" && this.add(O);
3256
+ addText(h) {
3257
+ h !== "" && this.add(h);
3258
3258
  }
3259
3259
  /** @param {string} scope */
3260
- startScope(O) {
3261
- this.openNode(O);
3260
+ startScope(h) {
3261
+ this.openNode(h);
3262
3262
  }
3263
3263
  endScope() {
3264
3264
  this.closeNode();
@@ -3267,8 +3267,8 @@ function Vm() {
3267
3267
  * @param {Emitter & {root: DataNode}} emitter
3268
3268
  * @param {string} name
3269
3269
  */
3270
- __addSublanguage(O, D) {
3271
- const H = O.root;
3270
+ __addSublanguage(h, D) {
3271
+ const H = h.root;
3272
3272
  D && (H.scope = `language:${D}`), this.add(H);
3273
3273
  }
3274
3274
  toHTML() {
@@ -3294,8 +3294,8 @@ function Vm() {
3294
3294
  return E.map((D) => _(D)).join("");
3295
3295
  }
3296
3296
  function S(E) {
3297
- const O = E[E.length - 1];
3298
- return typeof O == "object" && O.constructor === Object ? (E.splice(E.length - 1, 1), O) : {};
3297
+ const h = E[E.length - 1];
3298
+ return typeof h == "object" && h.constructor === Object ? (E.splice(E.length - 1, 1), h) : {};
3299
3299
  }
3300
3300
  function T(...E) {
3301
3301
  return "(" + (S(E).capture ? "" : "?:") + E.map((H) => _(H)).join("|") + ")";
@@ -3303,38 +3303,38 @@ function Vm() {
3303
3303
  function f(E) {
3304
3304
  return new RegExp(E.toString() + "|").exec("").length - 1;
3305
3305
  }
3306
- function b(E, O) {
3307
- const D = E && E.exec(O);
3306
+ function b(E, h) {
3307
+ const D = E && E.exec(h);
3308
3308
  return D && D.index === 0;
3309
3309
  }
3310
3310
  const C = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
3311
- function N(E, { joinWith: O }) {
3311
+ function N(E, { joinWith: h }) {
3312
3312
  let D = 0;
3313
3313
  return E.map((H) => {
3314
3314
  D += 1;
3315
3315
  const se = D;
3316
- let ce = _(H), B = "";
3316
+ let ce = _(H), G = "";
3317
3317
  for (; ce.length > 0; ) {
3318
- const w = C.exec(ce);
3319
- if (!w) {
3320
- B += ce;
3318
+ const k = C.exec(ce);
3319
+ if (!k) {
3320
+ G += ce;
3321
3321
  break;
3322
3322
  }
3323
- B += ce.substring(0, w.index), ce = ce.substring(w.index + w[0].length), w[0][0] === "\\" && w[1] ? B += "\\" + String(Number(w[1]) + se) : (B += w[0], w[0] === "(" && D++);
3323
+ G += ce.substring(0, k.index), ce = ce.substring(k.index + k[0].length), k[0][0] === "\\" && k[1] ? G += "\\" + String(Number(k[1]) + se) : (G += k[0], k[0] === "(" && D++);
3324
3324
  }
3325
- return B;
3326
- }).map((H) => `(${H})`).join(O);
3325
+ return G;
3326
+ }).map((H) => `(${H})`).join(h);
3327
3327
  }
3328
- const R = /\b\B/, y = "[a-zA-Z]\\w*", v = "[a-zA-Z_]\\w*", F = "\\b\\d+(\\.\\d+)?", A = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", h = "\\b(0b[01]+)", M = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", P = (E = {}) => {
3329
- const O = /^#![ ]*\//;
3328
+ const R = /\b\B/, y = "[a-zA-Z]\\w*", v = "[a-zA-Z_]\\w*", U = "\\b\\d+(\\.\\d+)?", A = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", O = "\\b(0b[01]+)", M = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", P = (E = {}) => {
3329
+ const h = /^#![ ]*\//;
3330
3330
  return E.binary && (E.begin = g(
3331
- O,
3331
+ h,
3332
3332
  /.*\b/,
3333
3333
  E.binary,
3334
3334
  /\b.*/
3335
3335
  )), r({
3336
3336
  scope: "meta",
3337
- begin: O,
3337
+ begin: h,
3338
3338
  end: /$/,
3339
3339
  relevance: 0,
3340
3340
  /** @type {ModeCallback} */
@@ -3342,29 +3342,29 @@ function Vm() {
3342
3342
  D.index !== 0 && H.ignoreMatch();
3343
3343
  }
3344
3344
  }, E);
3345
- }, G = {
3345
+ }, L = {
3346
3346
  begin: "\\\\[\\s\\S]",
3347
3347
  relevance: 0
3348
- }, L = {
3348
+ }, w = {
3349
3349
  scope: "string",
3350
3350
  begin: "'",
3351
3351
  end: "'",
3352
3352
  illegal: "\\n",
3353
- contains: [G]
3354
- }, k = {
3353
+ contains: [L]
3354
+ }, F = {
3355
3355
  scope: "string",
3356
3356
  begin: '"',
3357
3357
  end: '"',
3358
3358
  illegal: "\\n",
3359
- contains: [G]
3359
+ contains: [L]
3360
3360
  }, z = {
3361
3361
  begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
3362
- }, K = function(E, O, D = {}) {
3362
+ }, K = function(E, h, D = {}) {
3363
3363
  const H = r(
3364
3364
  {
3365
3365
  scope: "comment",
3366
3366
  begin: E,
3367
- end: O,
3367
+ end: h,
3368
3368
  contains: []
3369
3369
  },
3370
3370
  D
@@ -3427,7 +3427,7 @@ function Vm() {
3427
3427
  ), H;
3428
3428
  }, j = K("//", "$"), le = K("/\\*", "\\*/"), Se = K("#", "$"), Oe = {
3429
3429
  scope: "number",
3430
- begin: F,
3430
+ begin: U,
3431
3431
  relevance: 0
3432
3432
  }, Re = {
3433
3433
  scope: "number",
@@ -3435,19 +3435,19 @@ function Vm() {
3435
3435
  relevance: 0
3436
3436
  }, Te = {
3437
3437
  scope: "number",
3438
- begin: h,
3438
+ begin: O,
3439
3439
  relevance: 0
3440
3440
  }, ie = {
3441
3441
  scope: "regexp",
3442
3442
  begin: /\/(?=[^/\n]*\/)/,
3443
3443
  end: /\/[gimuy]*/,
3444
3444
  contains: [
3445
- G,
3445
+ L,
3446
3446
  {
3447
3447
  begin: /\[/,
3448
3448
  end: /\]/,
3449
3449
  relevance: 0,
3450
- contains: [G]
3450
+ contains: [L]
3451
3451
  }
3452
3452
  ]
3453
3453
  }, pe = {
@@ -3465,10 +3465,10 @@ function Vm() {
3465
3465
  };
3466
3466
  var oe = /* @__PURE__ */ Object.freeze({
3467
3467
  __proto__: null,
3468
- APOS_STRING_MODE: L,
3469
- BACKSLASH_ESCAPE: G,
3468
+ APOS_STRING_MODE: w,
3469
+ BACKSLASH_ESCAPE: L,
3470
3470
  BINARY_NUMBER_MODE: Te,
3471
- BINARY_NUMBER_RE: h,
3471
+ BINARY_NUMBER_RE: O,
3472
3472
  COMMENT: K,
3473
3473
  C_BLOCK_COMMENT_MODE: le,
3474
3474
  C_LINE_COMMENT_MODE: j,
@@ -3479,12 +3479,12 @@ function Vm() {
3479
3479
  E,
3480
3480
  {
3481
3481
  /** @type {ModeCallback} */
3482
- "on:begin": (O, D) => {
3483
- D.data._beginMatch = O[1];
3482
+ "on:begin": (h, D) => {
3483
+ D.data._beginMatch = h[1];
3484
3484
  },
3485
3485
  /** @type {ModeCallback} */
3486
- "on:end": (O, D) => {
3487
- D.data._beginMatch !== O[1] && D.ignoreMatch();
3486
+ "on:end": (h, D) => {
3487
+ D.data._beginMatch !== h[1] && D.ignoreMatch();
3488
3488
  }
3489
3489
  }
3490
3490
  );
@@ -3494,9 +3494,9 @@ function Vm() {
3494
3494
  MATCH_NOTHING_RE: R,
3495
3495
  METHOD_GUARD: X,
3496
3496
  NUMBER_MODE: Oe,
3497
- NUMBER_RE: F,
3497
+ NUMBER_RE: U,
3498
3498
  PHRASAL_WORDS_MODE: z,
3499
- QUOTE_STRING_MODE: k,
3499
+ QUOTE_STRING_MODE: F,
3500
3500
  REGEXP_MODE: ie,
3501
3501
  RE_STARTERS_RE: M,
3502
3502
  SHEBANG: P,
@@ -3504,28 +3504,28 @@ function Vm() {
3504
3504
  UNDERSCORE_IDENT_RE: v,
3505
3505
  UNDERSCORE_TITLE_MODE: ee
3506
3506
  });
3507
- function _e(E, O) {
3508
- E.input[E.index - 1] === "." && O.ignoreMatch();
3507
+ function _e(E, h) {
3508
+ E.input[E.index - 1] === "." && h.ignoreMatch();
3509
3509
  }
3510
- function Ce(E, O) {
3510
+ function Ce(E, h) {
3511
3511
  E.className !== void 0 && (E.scope = E.className, delete E.className);
3512
3512
  }
3513
- function ye(E, O) {
3514
- O && E.beginKeywords && (E.begin = "\\b(" + E.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", E.__beforeBegin = _e, E.keywords = E.keywords || E.beginKeywords, delete E.beginKeywords, E.relevance === void 0 && (E.relevance = 0));
3513
+ function ye(E, h) {
3514
+ h && E.beginKeywords && (E.begin = "\\b(" + E.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", E.__beforeBegin = _e, E.keywords = E.keywords || E.beginKeywords, delete E.beginKeywords, E.relevance === void 0 && (E.relevance = 0));
3515
3515
  }
3516
- function Et(E, O) {
3516
+ function Et(E, h) {
3517
3517
  Array.isArray(E.illegal) && (E.illegal = T(...E.illegal));
3518
3518
  }
3519
- function Vt(E, O) {
3519
+ function Vt(E, h) {
3520
3520
  if (E.match) {
3521
3521
  if (E.begin || E.end) throw new Error("begin & end are not supported with match");
3522
3522
  E.begin = E.match, delete E.match;
3523
3523
  }
3524
3524
  }
3525
- function nt(E, O) {
3525
+ function nt(E, h) {
3526
3526
  E.relevance === void 0 && (E.relevance = 1);
3527
3527
  }
3528
- const gt = (E, O) => {
3528
+ const gt = (E, h) => {
3529
3529
  if (!E.beforeMatch) return;
3530
3530
  if (E.starts) throw new Error("beforeMatch cannot be used with starts");
3531
3531
  const D = Object.assign({}, E);
@@ -3553,40 +3553,40 @@ function Vm() {
3553
3553
  "value"
3554
3554
  // common variable name
3555
3555
  ], zt = "keyword";
3556
- function ft(E, O, D = zt) {
3556
+ function ft(E, h, D = zt) {
3557
3557
  const H = /* @__PURE__ */ Object.create(null);
3558
3558
  return typeof E == "string" ? se(D, E.split(" ")) : Array.isArray(E) ? se(D, E) : Object.keys(E).forEach(function(ce) {
3559
3559
  Object.assign(
3560
3560
  H,
3561
- ft(E[ce], O, ce)
3561
+ ft(E[ce], h, ce)
3562
3562
  );
3563
3563
  }), H;
3564
- function se(ce, B) {
3565
- O && (B = B.map((w) => w.toLowerCase())), B.forEach(function(w) {
3566
- const q = w.split("|");
3564
+ function se(ce, G) {
3565
+ h && (G = G.map((k) => k.toLowerCase())), G.forEach(function(k) {
3566
+ const q = k.split("|");
3567
3567
  H[q[0]] = [ce, rt(q[0], q[1])];
3568
3568
  });
3569
3569
  }
3570
3570
  }
3571
- function rt(E, O) {
3572
- return O ? Number(O) : Wt(E) ? 0 : 1;
3571
+ function rt(E, h) {
3572
+ return h ? Number(h) : Wt(E) ? 0 : 1;
3573
3573
  }
3574
3574
  function Wt(E) {
3575
3575
  return St.includes(E.toLowerCase());
3576
3576
  }
3577
3577
  const bt = {}, Pe = (E) => {
3578
3578
  console.error(E);
3579
- }, We = (E, ...O) => {
3580
- console.log(`WARN: ${E}`, ...O);
3581
- }, Ne = (E, O) => {
3582
- bt[`${E}/${O}`] || (console.log(`Deprecated as of ${E}. ${O}`), bt[`${E}/${O}`] = !0);
3579
+ }, We = (E, ...h) => {
3580
+ console.log(`WARN: ${E}`, ...h);
3581
+ }, Ne = (E, h) => {
3582
+ bt[`${E}/${h}`] || (console.log(`Deprecated as of ${E}. ${h}`), bt[`${E}/${h}`] = !0);
3583
3583
  }, Ze = new Error();
3584
- function Tt(E, O, { key: D }) {
3584
+ function Tt(E, h, { key: D }) {
3585
3585
  let H = 0;
3586
- const se = E[D], ce = {}, B = {};
3587
- for (let w = 1; w <= O.length; w++)
3588
- B[w + H] = se[w], ce[w + H] = !0, H += f(O[w - 1]);
3589
- E[D] = B, E[D]._emit = ce, E[D]._multi = !0;
3586
+ const se = E[D], ce = {}, G = {};
3587
+ for (let k = 1; k <= h.length; k++)
3588
+ G[k + H] = se[k], ce[k + H] = !0, H += f(h[k - 1]);
3589
+ E[D] = G, E[D]._emit = ce, E[D]._multi = !0;
3590
3590
  }
3591
3591
  function Rt(E) {
3592
3592
  if (Array.isArray(E.begin)) {
@@ -3613,10 +3613,10 @@ function Vm() {
3613
3613
  $t(E), typeof E.beginScope == "string" && (E.beginScope = { _wrap: E.beginScope }), typeof E.endScope == "string" && (E.endScope = { _wrap: E.endScope }), Rt(E), at(E);
3614
3614
  }
3615
3615
  function Kt(E) {
3616
- function O(B, w) {
3616
+ function h(G, k) {
3617
3617
  return new RegExp(
3618
- _(B),
3619
- "m" + (E.case_insensitive ? "i" : "") + (E.unicodeRegex ? "u" : "") + (w ? "g" : "")
3618
+ _(G),
3619
+ "m" + (E.case_insensitive ? "i" : "") + (E.unicodeRegex ? "u" : "") + (k ? "g" : "")
3620
3620
  );
3621
3621
  }
3622
3622
  class D {
@@ -3624,18 +3624,18 @@ function Vm() {
3624
3624
  this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
3625
3625
  }
3626
3626
  // @ts-ignore
3627
- addRule(w, q) {
3628
- q.position = this.position++, this.matchIndexes[this.matchAt] = q, this.regexes.push([q, w]), this.matchAt += f(w) + 1;
3627
+ addRule(k, q) {
3628
+ q.position = this.position++, this.matchIndexes[this.matchAt] = q, this.regexes.push([q, k]), this.matchAt += f(k) + 1;
3629
3629
  }
3630
3630
  compile() {
3631
3631
  this.regexes.length === 0 && (this.exec = () => null);
3632
- const w = this.regexes.map((q) => q[1]);
3633
- this.matcherRe = O(N(w, { joinWith: "|" }), !0), this.lastIndex = 0;
3632
+ const k = this.regexes.map((q) => q[1]);
3633
+ this.matcherRe = h(N(k, { joinWith: "|" }), !0), this.lastIndex = 0;
3634
3634
  }
3635
3635
  /** @param {string} s */
3636
- exec(w) {
3636
+ exec(k) {
3637
3637
  this.matcherRe.lastIndex = this.lastIndex;
3638
- const q = this.matcherRe.exec(w);
3638
+ const q = this.matcherRe.exec(k);
3639
3639
  if (!q)
3640
3640
  return null;
3641
3641
  const me = q.findIndex((ot, Jt) => Jt > 0 && ot !== void 0), ue = this.matchIndexes[me];
@@ -3647,10 +3647,10 @@ function Vm() {
3647
3647
  this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
3648
3648
  }
3649
3649
  // @ts-ignore
3650
- getMatcher(w) {
3651
- if (this.multiRegexes[w]) return this.multiRegexes[w];
3650
+ getMatcher(k) {
3651
+ if (this.multiRegexes[k]) return this.multiRegexes[k];
3652
3652
  const q = new D();
3653
- return this.rules.slice(w).forEach(([me, ue]) => q.addRule(me, ue)), q.compile(), this.multiRegexes[w] = q, q;
3653
+ return this.rules.slice(k).forEach(([me, ue]) => q.addRule(me, ue)), q.compile(), this.multiRegexes[k] = q, q;
3654
3654
  }
3655
3655
  resumingScanAtSamePosition() {
3656
3656
  return this.regexIndex !== 0;
@@ -3659,31 +3659,31 @@ function Vm() {
3659
3659
  this.regexIndex = 0;
3660
3660
  }
3661
3661
  // @ts-ignore
3662
- addRule(w, q) {
3663
- this.rules.push([w, q]), q.type === "begin" && this.count++;
3662
+ addRule(k, q) {
3663
+ this.rules.push([k, q]), q.type === "begin" && this.count++;
3664
3664
  }
3665
3665
  /** @param {string} s */
3666
- exec(w) {
3666
+ exec(k) {
3667
3667
  const q = this.getMatcher(this.regexIndex);
3668
3668
  q.lastIndex = this.lastIndex;
3669
- let me = q.exec(w);
3669
+ let me = q.exec(k);
3670
3670
  if (this.resumingScanAtSamePosition() && !(me && me.index === this.lastIndex)) {
3671
3671
  const ue = this.getMatcher(0);
3672
- ue.lastIndex = this.lastIndex + 1, me = ue.exec(w);
3672
+ ue.lastIndex = this.lastIndex + 1, me = ue.exec(k);
3673
3673
  }
3674
3674
  return me && (this.regexIndex += me.position + 1, this.regexIndex === this.count && this.considerAll()), me;
3675
3675
  }
3676
3676
  }
3677
- function se(B) {
3678
- const w = new H();
3679
- return B.contains.forEach((q) => w.addRule(q.begin, { rule: q, type: "begin" })), B.terminatorEnd && w.addRule(B.terminatorEnd, { type: "end" }), B.illegal && w.addRule(B.illegal, { type: "illegal" }), w;
3677
+ function se(G) {
3678
+ const k = new H();
3679
+ return G.contains.forEach((q) => k.addRule(q.begin, { rule: q, type: "begin" })), G.terminatorEnd && k.addRule(G.terminatorEnd, { type: "end" }), G.illegal && k.addRule(G.illegal, { type: "illegal" }), k;
3680
3680
  }
3681
- function ce(B, w) {
3681
+ function ce(G, k) {
3682
3682
  const q = (
3683
3683
  /** @type CompiledMode */
3684
- B
3684
+ G
3685
3685
  );
3686
- if (B.isCompiled) return q;
3686
+ if (G.isCompiled) return q;
3687
3687
  [
3688
3688
  Ce,
3689
3689
  // do this early so compiler extensions generally don't have to worry about
@@ -3691,27 +3691,27 @@ function Vm() {
3691
3691
  Vt,
3692
3692
  Ct,
3693
3693
  gt
3694
- ].forEach((ue) => ue(B, w)), E.compilerExtensions.forEach((ue) => ue(B, w)), B.__beforeBegin = null, [
3694
+ ].forEach((ue) => ue(G, k)), E.compilerExtensions.forEach((ue) => ue(G, k)), G.__beforeBegin = null, [
3695
3695
  ye,
3696
3696
  // do this later so compiler extensions that come earlier have access to the
3697
3697
  // raw array if they wanted to perhaps manipulate it, etc.
3698
3698
  Et,
3699
3699
  // default to 1 relevance if not specified
3700
3700
  nt
3701
- ].forEach((ue) => ue(B, w)), B.isCompiled = !0;
3701
+ ].forEach((ue) => ue(G, k)), G.isCompiled = !0;
3702
3702
  let me = null;
3703
- return typeof B.keywords == "object" && B.keywords.$pattern && (B.keywords = Object.assign({}, B.keywords), me = B.keywords.$pattern, delete B.keywords.$pattern), me = me || /\w+/, B.keywords && (B.keywords = ft(B.keywords, E.case_insensitive)), q.keywordPatternRe = O(me, !0), w && (B.begin || (B.begin = /\B|\b/), q.beginRe = O(q.begin), !B.end && !B.endsWithParent && (B.end = /\B|\b/), B.end && (q.endRe = O(q.end)), q.terminatorEnd = _(q.end) || "", B.endsWithParent && w.terminatorEnd && (q.terminatorEnd += (B.end ? "|" : "") + w.terminatorEnd)), B.illegal && (q.illegalRe = O(
3703
+ return typeof G.keywords == "object" && G.keywords.$pattern && (G.keywords = Object.assign({}, G.keywords), me = G.keywords.$pattern, delete G.keywords.$pattern), me = me || /\w+/, G.keywords && (G.keywords = ft(G.keywords, E.case_insensitive)), q.keywordPatternRe = h(me, !0), k && (G.begin || (G.begin = /\B|\b/), q.beginRe = h(q.begin), !G.end && !G.endsWithParent && (G.end = /\B|\b/), G.end && (q.endRe = h(q.end)), q.terminatorEnd = _(q.end) || "", G.endsWithParent && k.terminatorEnd && (q.terminatorEnd += (G.end ? "|" : "") + k.terminatorEnd)), G.illegal && (q.illegalRe = h(
3704
3704
  /** @type {RegExp | string} */
3705
- B.illegal
3706
- )), B.contains || (B.contains = []), B.contains = [].concat(...B.contains.map(function(ue) {
3707
- return Qt(ue === "self" ? B : ue);
3708
- })), B.contains.forEach(function(ue) {
3705
+ G.illegal
3706
+ )), G.contains || (G.contains = []), G.contains = [].concat(...G.contains.map(function(ue) {
3707
+ return Qt(ue === "self" ? G : ue);
3708
+ })), G.contains.forEach(function(ue) {
3709
3709
  ce(
3710
3710
  /** @type Mode */
3711
3711
  ue,
3712
3712
  q
3713
3713
  );
3714
- }), B.starts && ce(B.starts, w), q.matcher = se(q), q;
3714
+ }), G.starts && ce(G.starts, k), q.matcher = se(q), q;
3715
3715
  }
3716
3716
  if (E.compilerExtensions || (E.compilerExtensions = []), E.contains && E.contains.includes("self"))
3717
3717
  throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
@@ -3724,21 +3724,21 @@ function Vm() {
3724
3724
  return E ? E.endsWithParent || Nt(E.starts) : !1;
3725
3725
  }
3726
3726
  function Qt(E) {
3727
- return E.variants && !E.cachedVariants && (E.cachedVariants = E.variants.map(function(O) {
3728
- return r(E, { variants: null }, O);
3727
+ return E.variants && !E.cachedVariants && (E.cachedVariants = E.variants.map(function(h) {
3728
+ return r(E, { variants: null }, h);
3729
3729
  })), E.cachedVariants ? E.cachedVariants : Nt(E) ? r(E, { starts: E.starts ? r(E.starts) : null }) : Object.isFrozen(E) ? r(E) : E;
3730
3730
  }
3731
3731
  var Xt = "11.11.1";
3732
3732
  class Zt extends Error {
3733
- constructor(O, D) {
3734
- super(O), this.name = "HTMLInjectionError", this.html = D;
3733
+ constructor(h, D) {
3734
+ super(h), this.name = "HTMLInjectionError", this.html = D;
3735
3735
  }
3736
3736
  }
3737
3737
  const it = n, Ot = r, Z = Symbol("nomatch"), Je = 7, Ye = function(E) {
3738
- const O = /* @__PURE__ */ Object.create(null), D = /* @__PURE__ */ Object.create(null), H = [];
3738
+ const h = /* @__PURE__ */ Object.create(null), D = /* @__PURE__ */ Object.create(null), H = [];
3739
3739
  let se = !0;
3740
- const ce = "Could not find the language '{}', did you forget to load/include a language module?", B = { disableAutodetect: !0, name: "Plain text", contains: [] };
3741
- let w = {
3740
+ const ce = "Could not find the language '{}', did you forget to load/include a language module?", G = { disableAutodetect: !0, name: "Plain text", contains: [] };
3741
+ let k = {
3742
3742
  ignoreUnescapedHTML: !1,
3743
3743
  throwUnescapedHTML: !1,
3744
3744
  noHighlightRe: /^(no-?highlight)$/i,
@@ -3751,12 +3751,12 @@ function Vm() {
3751
3751
  __emitter: u
3752
3752
  };
3753
3753
  function q(I) {
3754
- return w.noHighlightRe.test(I);
3754
+ return k.noHighlightRe.test(I);
3755
3755
  }
3756
3756
  function me(I) {
3757
3757
  let Y = I.className + " ";
3758
3758
  Y += I.parentNode ? I.parentNode.className : "";
3759
- const $ = w.languageDetectRe.exec(Y);
3759
+ const $ = k.languageDetectRe.exec(Y);
3760
3760
  if ($) {
3761
3761
  const te = He($[1]);
3762
3762
  return te || (We(ce.replace("{}", $[1])), We("Falling back to no-highlight mode for this block.", I)), te ? $[1] : "no-highlight";
@@ -3777,8 +3777,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3777
3777
  }
3778
3778
  function ot(I, Y, $, te) {
3779
3779
  const de = /* @__PURE__ */ Object.create(null);
3780
- function De(x, U) {
3781
- return x.keywords[U];
3780
+ function De(x, B) {
3781
+ return x.keywords[B];
3782
3782
  }
3783
3783
  function Ve() {
3784
3784
  if (!V.keywords) {
@@ -3787,21 +3787,21 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3787
3787
  }
3788
3788
  let x = 0;
3789
3789
  V.keywordPatternRe.lastIndex = 0;
3790
- let U = V.keywordPatternRe.exec(J), W = "";
3791
- for (; U; ) {
3792
- W += J.substring(x, U.index);
3793
- const Q = xe.case_insensitive ? U[0].toLowerCase() : U[0], ge = De(V, Q);
3790
+ let B = V.keywordPatternRe.exec(J), W = "";
3791
+ for (; B; ) {
3792
+ W += J.substring(x, B.index);
3793
+ const Q = xe.case_insensitive ? B[0].toLowerCase() : B[0], ge = De(V, Q);
3794
3794
  if (ge) {
3795
3795
  const [Me, Ko] = ge;
3796
3796
  if (Ee.addText(W), W = "", de[Q] = (de[Q] || 0) + 1, de[Q] <= Je && (je += Ko), Me.startsWith("_"))
3797
- W += U[0];
3797
+ W += B[0];
3798
3798
  else {
3799
3799
  const Qo = xe.classNameAliases[Me] || Me;
3800
- Le(U[0], Qo);
3800
+ Le(B[0], Qo);
3801
3801
  }
3802
3802
  } else
3803
- W += U[0];
3804
- x = V.keywordPatternRe.lastIndex, U = V.keywordPatternRe.exec(J);
3803
+ W += B[0];
3804
+ x = V.keywordPatternRe.lastIndex, B = V.keywordPatternRe.exec(J);
3805
3805
  }
3806
3806
  W += J.substring(x), Ee.addText(W);
3807
3807
  }
@@ -3809,7 +3809,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3809
3809
  if (J === "") return;
3810
3810
  let x = null;
3811
3811
  if (typeof V.subLanguage == "string") {
3812
- if (!O[V.subLanguage]) {
3812
+ if (!h[V.subLanguage]) {
3813
3813
  Ee.addText(J);
3814
3814
  return;
3815
3815
  }
@@ -3822,30 +3822,30 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3822
3822
  function he() {
3823
3823
  V.subLanguage != null ? It() : Ve(), J = "";
3824
3824
  }
3825
- function Le(x, U) {
3826
- x !== "" && (Ee.startScope(U), Ee.addText(x), Ee.endScope());
3825
+ function Le(x, B) {
3826
+ x !== "" && (Ee.startScope(B), Ee.addText(x), Ee.endScope());
3827
3827
  }
3828
- function Cn(x, U) {
3828
+ function Cn(x, B) {
3829
3829
  let W = 1;
3830
- const Q = U.length - 1;
3830
+ const Q = B.length - 1;
3831
3831
  for (; W <= Q; ) {
3832
3832
  if (!x._emit[W]) {
3833
3833
  W++;
3834
3834
  continue;
3835
3835
  }
3836
- const ge = xe.classNameAliases[x[W]] || x[W], Me = U[W];
3836
+ const ge = xe.classNameAliases[x[W]] || x[W], Me = B[W];
3837
3837
  ge ? Le(Me, ge) : (J = Me, Ve(), J = ""), W++;
3838
3838
  }
3839
3839
  }
3840
- function Nn(x, U) {
3841
- return x.scope && typeof x.scope == "string" && Ee.openNode(xe.classNameAliases[x.scope] || x.scope), x.beginScope && (x.beginScope._wrap ? (Le(J, xe.classNameAliases[x.beginScope._wrap] || x.beginScope._wrap), J = "") : x.beginScope._multi && (Cn(x.beginScope, U), J = "")), V = Object.create(x, { parent: { value: V } }), V;
3840
+ function Nn(x, B) {
3841
+ return x.scope && typeof x.scope == "string" && Ee.openNode(xe.classNameAliases[x.scope] || x.scope), x.beginScope && (x.beginScope._wrap ? (Le(J, xe.classNameAliases[x.beginScope._wrap] || x.beginScope._wrap), J = "") : x.beginScope._multi && (Cn(x.beginScope, B), J = "")), V = Object.create(x, { parent: { value: V } }), V;
3842
3842
  }
3843
- function On(x, U, W) {
3843
+ function On(x, B, W) {
3844
3844
  let Q = b(x.endRe, W);
3845
3845
  if (Q) {
3846
3846
  if (x["on:end"]) {
3847
3847
  const ge = new t(x);
3848
- x["on:end"](U, ge), ge.isMatchIgnored && (Q = !1);
3848
+ x["on:end"](B, ge), ge.isMatchIgnored && (Q = !1);
3849
3849
  }
3850
3850
  if (Q) {
3851
3851
  for (; x.endsParent && x.parent; )
@@ -3854,61 +3854,61 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3854
3854
  }
3855
3855
  }
3856
3856
  if (x.endsWithParent)
3857
- return On(x.parent, U, W);
3857
+ return On(x.parent, B, W);
3858
3858
  }
3859
3859
  function Vo(x) {
3860
3860
  return V.matcher.regexIndex === 0 ? (J += x[0], 1) : (xt = !0, 0);
3861
3861
  }
3862
3862
  function zo(x) {
3863
- const U = x[0], W = x.rule, Q = new t(W), ge = [W.__beforeBegin, W["on:begin"]];
3863
+ const B = x[0], W = x.rule, Q = new t(W), ge = [W.__beforeBegin, W["on:begin"]];
3864
3864
  for (const Me of ge)
3865
3865
  if (Me && (Me(x, Q), Q.isMatchIgnored))
3866
- return Vo(U);
3867
- return W.skip ? J += U : (W.excludeBegin && (J += U), he(), !W.returnBegin && !W.excludeBegin && (J = U)), Nn(W, x), W.returnBegin ? 0 : U.length;
3866
+ return Vo(B);
3867
+ return W.skip ? J += B : (W.excludeBegin && (J += B), he(), !W.returnBegin && !W.excludeBegin && (J = B)), Nn(W, x), W.returnBegin ? 0 : B.length;
3868
3868
  }
3869
3869
  function Wo(x) {
3870
- const U = x[0], W = Y.substring(x.index), Q = On(V, x, W);
3870
+ const B = x[0], W = Y.substring(x.index), Q = On(V, x, W);
3871
3871
  if (!Q)
3872
3872
  return Z;
3873
3873
  const ge = V;
3874
- V.endScope && V.endScope._wrap ? (he(), Le(U, V.endScope._wrap)) : V.endScope && V.endScope._multi ? (he(), Cn(V.endScope, x)) : ge.skip ? J += U : (ge.returnEnd || ge.excludeEnd || (J += U), he(), ge.excludeEnd && (J = U));
3874
+ V.endScope && V.endScope._wrap ? (he(), Le(B, V.endScope._wrap)) : V.endScope && V.endScope._multi ? (he(), Cn(V.endScope, x)) : ge.skip ? J += B : (ge.returnEnd || ge.excludeEnd || (J += B), he(), ge.excludeEnd && (J = B));
3875
3875
  do
3876
3876
  V.scope && Ee.closeNode(), !V.skip && !V.subLanguage && (je += V.relevance), V = V.parent;
3877
3877
  while (V !== Q.parent);
3878
- return Q.starts && Nn(Q.starts, x), ge.returnEnd ? 0 : U.length;
3878
+ return Q.starts && Nn(Q.starts, x), ge.returnEnd ? 0 : B.length;
3879
3879
  }
3880
3880
  function $o() {
3881
3881
  const x = [];
3882
- for (let U = V; U !== xe; U = U.parent)
3883
- U.scope && x.unshift(U.scope);
3884
- x.forEach((U) => Ee.openNode(U));
3882
+ for (let B = V; B !== xe; B = B.parent)
3883
+ B.scope && x.unshift(B.scope);
3884
+ x.forEach((B) => Ee.openNode(B));
3885
3885
  }
3886
3886
  let vt = {};
3887
- function tn(x, U) {
3888
- const W = U && U[0];
3887
+ function tn(x, B) {
3888
+ const W = B && B[0];
3889
3889
  if (J += x, W == null)
3890
3890
  return he(), 0;
3891
- if (vt.type === "begin" && U.type === "end" && vt.index === U.index && W === "") {
3892
- if (J += Y.slice(U.index, U.index + 1), !se) {
3891
+ if (vt.type === "begin" && B.type === "end" && vt.index === B.index && W === "") {
3892
+ if (J += Y.slice(B.index, B.index + 1), !se) {
3893
3893
  const Q = new Error(`0 width match regex (${I})`);
3894
3894
  throw Q.languageName = I, Q.badRule = vt.rule, Q;
3895
3895
  }
3896
3896
  return 1;
3897
3897
  }
3898
- if (vt = U, U.type === "begin")
3899
- return zo(U);
3900
- if (U.type === "illegal" && !$) {
3898
+ if (vt = B, B.type === "begin")
3899
+ return zo(B);
3900
+ if (B.type === "illegal" && !$) {
3901
3901
  const Q = new Error('Illegal lexeme "' + W + '" for mode "' + (V.scope || "<unnamed>") + '"');
3902
3902
  throw Q.mode = V, Q;
3903
- } else if (U.type === "end") {
3904
- const Q = Wo(U);
3903
+ } else if (B.type === "end") {
3904
+ const Q = Wo(B);
3905
3905
  if (Q !== Z)
3906
3906
  return Q;
3907
3907
  }
3908
- if (U.type === "illegal" && W === "")
3908
+ if (B.type === "illegal" && W === "")
3909
3909
  return J += `
3910
3910
  `, 1;
3911
- if (Dt > 1e5 && Dt > U.index * 3)
3911
+ if (Dt > 1e5 && Dt > B.index * 3)
3912
3912
  throw new Error("potential infinite loop, way more iterations than matches");
3913
3913
  return J += W, W.length;
3914
3914
  }
@@ -3917,7 +3917,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3917
3917
  throw Pe(ce.replace("{}", I)), new Error('Unknown language: "' + I + '"');
3918
3918
  const hn = Kt(xe);
3919
3919
  let yt = "", V = te || hn;
3920
- const nn = {}, Ee = new w.__emitter(w);
3920
+ const nn = {}, Ee = new k.__emitter(k);
3921
3921
  $o();
3922
3922
  let J = "", je = 0, ke = 0, Dt = 0, xt = !1;
3923
3923
  try {
@@ -3928,7 +3928,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3928
3928
  Dt++, xt ? xt = !1 : V.matcher.considerAll(), V.matcher.lastIndex = ke;
3929
3929
  const x = V.matcher.exec(Y);
3930
3930
  if (!x) break;
3931
- const U = Y.substring(ke, x.index), W = tn(U, x);
3931
+ const B = Y.substring(ke, x.index), W = tn(B, x);
3932
3932
  ke = x.index + W;
3933
3933
  }
3934
3934
  tn(Y.substring(ke));
@@ -3975,13 +3975,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
3975
3975
  value: it(I),
3976
3976
  illegal: !1,
3977
3977
  relevance: 0,
3978
- _top: B,
3979
- _emitter: new w.__emitter(w)
3978
+ _top: G,
3979
+ _emitter: new k.__emitter(k)
3980
3980
  };
3981
3981
  return Y._emitter.addText(I), Y;
3982
3982
  }
3983
3983
  function jt(I, Y) {
3984
- Y = Y || w.languages || Object.keys(O);
3984
+ Y = Y || k.languages || Object.keys(h);
3985
3985
  const $ = Jt(I), te = Y.filter(He).filter(Rn).map(
3986
3986
  (he) => ot(he, I, !1)
3987
3987
  );
@@ -4013,7 +4013,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
4013
4013
  console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", I);
4014
4014
  return;
4015
4015
  }
4016
- if (I.children.length > 0 && (w.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(I)), w.throwUnescapedHTML))
4016
+ if (I.children.length > 0 && (k.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(I)), k.throwUnescapedHTML))
4017
4017
  throw new Zt(
4018
4018
  "One of your code blocks includes unescaped HTML.",
4019
4019
  I.innerHTML
@@ -4031,7 +4031,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
4031
4031
  }), At("after:highlightElement", { el: I, result: de, text: te });
4032
4032
  }
4033
4033
  function wo(I) {
4034
- w = Ot(w, I);
4034
+ k = Ot(k, I);
4035
4035
  }
4036
4036
  const Po = () => {
4037
4037
  ht(), Ne("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
@@ -4048,7 +4048,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
4048
4048
  bn || window.addEventListener("DOMContentLoaded", I, !1), bn = !0;
4049
4049
  return;
4050
4050
  }
4051
- document.querySelectorAll(w.cssSelector).forEach(en);
4051
+ document.querySelectorAll(k.cssSelector).forEach(en);
4052
4052
  }
4053
4053
  function Fo(I, Y) {
4054
4054
  let $ = null;
@@ -4059,20 +4059,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
4059
4059
  Pe(te);
4060
4060
  else
4061
4061
  throw te;
4062
- $ = B;
4062
+ $ = G;
4063
4063
  }
4064
- $.name || ($.name = I), O[I] = $, $.rawDefinition = Y.bind(null, E), $.aliases && Tn($.aliases, { languageName: I });
4064
+ $.name || ($.name = I), h[I] = $, $.rawDefinition = Y.bind(null, E), $.aliases && Tn($.aliases, { languageName: I });
4065
4065
  }
4066
4066
  function Uo(I) {
4067
- delete O[I];
4067
+ delete h[I];
4068
4068
  for (const Y of Object.keys(D))
4069
4069
  D[Y] === I && delete D[Y];
4070
4070
  }
4071
4071
  function Bo() {
4072
- return Object.keys(O);
4072
+ return Object.keys(h);
4073
4073
  }
4074
4074
  function He(I) {
4075
- return I = (I || "").toLowerCase(), O[I] || O[D[I]];
4075
+ return I = (I || "").toLowerCase(), h[I] || h[D[I]];
4076
4076
  }
4077
4077
  function Tn(I, { languageName: Y }) {
4078
4078
  typeof I == "string" && (I = [I]), I.forEach(($) => {
@@ -5914,7 +5914,7 @@ function eE() {
5914
5914
  n.C_BLOCK_COMMENT_MODE,
5915
5915
  m,
5916
5916
  _
5917
- ], F = {
5917
+ ], U = {
5918
5918
  // This mode covers expression context where we can't expect a function
5919
5919
  // definition and shouldn't highlight anything that looks like one:
5920
5920
  // `return some()`, `else if()`, `(x*sum(1, 2))`
@@ -6035,7 +6035,7 @@ function eE() {
6035
6035
  illegal: "</",
6036
6036
  classNameAliases: { "function.dispatch": "built_in" },
6037
6037
  contains: [].concat(
6038
- F,
6038
+ U,
6039
6039
  A,
6040
6040
  y,
6041
6041
  v,
@@ -10599,7 +10599,7 @@ function hE() {
10599
10599
  }
10600
10600
  ]),
10601
10601
  relevance: 0
10602
- }, F = {
10602
+ }, U = {
10603
10603
  className: "function",
10604
10604
  begin: "(" + o + "[\\*&\\s]+)+" + d,
10605
10605
  returnBegin: !0,
@@ -10692,7 +10692,7 @@ function hE() {
10692
10692
  classNameAliases: { "function.dispatch": "built_in" },
10693
10693
  contains: [].concat(
10694
10694
  v,
10695
- F,
10695
+ U,
10696
10696
  R,
10697
10697
  y,
10698
10698
  [
@@ -12518,7 +12518,7 @@ function xE() {
12518
12518
  begin: "#(line)",
12519
12519
  end: "$",
12520
12520
  relevance: 5
12521
- }, F = {
12521
+ }, U = {
12522
12522
  className: "keyword",
12523
12523
  begin: "@[a-zA-Z_][a-zA-Z_\\d]*"
12524
12524
  }, A = t.COMMENT(
@@ -12546,7 +12546,7 @@ function xE() {
12546
12546
  S,
12547
12547
  y,
12548
12548
  v,
12549
- F
12549
+ U
12550
12550
  ]
12551
12551
  };
12552
12552
  }
@@ -14646,7 +14646,7 @@ function WE() {
14646
14646
  }
14647
14647
  ].concat(l, u);
14648
14648
  _.contains = y, S.contains = y;
14649
- const h = [
14649
+ const O = [
14650
14650
  {
14651
14651
  begin: /^\s*=>/,
14652
14652
  starts: {
@@ -14675,7 +14675,7 @@ function WE() {
14675
14675
  ],
14676
14676
  keywords: o,
14677
14677
  illegal: /\/\*/,
14678
- contains: [t.SHEBANG({ binary: "ruby" })].concat(h).concat(u).concat(y)
14678
+ contains: [t.SHEBANG({ binary: "ruby" })].concat(O).concat(u).concat(y)
14679
14679
  };
14680
14680
  }
14681
14681
  return Pr = e, Pr;
@@ -16447,7 +16447,7 @@ function eg() {
16447
16447
  // A single $ can be used as an operator
16448
16448
  relevance: 0
16449
16449
  };
16450
- }, y = R({ includeEqual: !0 }), v = R({ includeEqual: !1 }), F = function(ie, pe) {
16450
+ }, y = R({ includeEqual: !0 }), v = R({ includeEqual: !1 }), U = function(ie, pe) {
16451
16451
  return {
16452
16452
  begin: r(
16453
16453
  // a type annotation is a
@@ -16501,7 +16501,7 @@ function eg() {
16501
16501
  v
16502
16502
  ]
16503
16503
  };
16504
- }, A = F(/:/, "operator"), h = F(/\bof\b/, "keyword"), M = {
16504
+ }, A = U(/:/, "operator"), O = U(/\bof\b/, "keyword"), M = {
16505
16505
  begin: [
16506
16506
  /(^|\s+)/,
16507
16507
  // prevents matching the following: `match s.stype with`
@@ -16534,7 +16534,7 @@ function eg() {
16534
16534
  scope: "computation-expression",
16535
16535
  // BUG: might conflict with record deconstruction. e.g. let f { Name = name } = name // will highlight f
16536
16536
  match: /\b[_a-z]\w*(?=\s*\{)/
16537
- }, G = {
16537
+ }, L = {
16538
16538
  // preprocessor directives and fsi commands:
16539
16539
  begin: [
16540
16540
  /^\s*/,
@@ -16543,12 +16543,12 @@ function eg() {
16543
16543
  ],
16544
16544
  beginScope: { 2: "meta" },
16545
16545
  end: n(/\s|$/)
16546
- }, L = {
16546
+ }, w = {
16547
16547
  variants: [
16548
16548
  o.BINARY_NUMBER_MODE,
16549
16549
  o.C_NUMBER_MODE
16550
16550
  ]
16551
- }, k = {
16551
+ }, F = {
16552
16552
  scope: "string",
16553
16553
  begin: /"/,
16554
16554
  end: /"/,
@@ -16644,15 +16644,15 @@ function eg() {
16644
16644
  Se,
16645
16645
  le,
16646
16646
  z,
16647
- k,
16647
+ F,
16648
16648
  Re,
16649
16649
  l,
16650
16650
  T,
16651
16651
  b,
16652
16652
  A,
16653
16653
  P,
16654
- G,
16655
16654
  L,
16655
+ w,
16656
16656
  N,
16657
16657
  y
16658
16658
  ], {
@@ -16675,7 +16675,7 @@ function eg() {
16675
16675
  le,
16676
16676
  K,
16677
16677
  z,
16678
- k,
16678
+ F,
16679
16679
  Re
16680
16680
  ]
16681
16681
  },
@@ -16694,16 +16694,16 @@ function eg() {
16694
16694
  // can contain any constant value
16695
16695
  K,
16696
16696
  z,
16697
- k,
16697
+ F,
16698
16698
  Re,
16699
- L
16699
+ w
16700
16700
  ]
16701
16701
  },
16702
- h,
16702
+ O,
16703
16703
  A,
16704
16704
  P,
16705
- G,
16706
16705
  L,
16706
+ w,
16707
16707
  N,
16708
16708
  y
16709
16709
  ]
@@ -22204,7 +22204,7 @@ function Cg() {
22204
22204
  }, x = { variants: [
22205
22205
  Dt,
22206
22206
  xt
22207
- ] }, U = {
22207
+ ] }, B = {
22208
22208
  $pattern: n,
22209
22209
  keyword: a,
22210
22210
  built_in: V,
@@ -22212,7 +22212,7 @@ function Cg() {
22212
22212
  literal: Ee
22213
22213
  }, W = {
22214
22214
  begin: "\\.\\s*" + t.UNDERSCORE_IDENT_RE,
22215
- keywords: U,
22215
+ keywords: B,
22216
22216
  relevance: 0
22217
22217
  }, Q = {
22218
22218
  className: "type",
@@ -22221,7 +22221,7 @@ function Cg() {
22221
22221
  excludeEnd: !0
22222
22222
  }, ge = {
22223
22223
  className: "variable",
22224
- keywords: U,
22224
+ keywords: B,
22225
22225
  begin: n,
22226
22226
  relevance: 0,
22227
22227
  contains: [
@@ -22232,7 +22232,7 @@ function Cg() {
22232
22232
  return {
22233
22233
  name: "ISBL",
22234
22234
  case_insensitive: !0,
22235
- keywords: U,
22235
+ keywords: B,
22236
22236
  illegal: "\\$|\\?|%|,|;$|~|#|@|</",
22237
22237
  contains: [
22238
22238
  {
@@ -22240,7 +22240,7 @@ function Cg() {
22240
22240
  begin: Me,
22241
22241
  end: "\\)$",
22242
22242
  returnBegin: !0,
22243
- keywords: U,
22243
+ keywords: B,
22244
22244
  illegal: "[\\[\\]\\|\\$\\?%,~#@]",
22245
22245
  contains: [
22246
22246
  {
@@ -22770,7 +22770,7 @@ function Og() {
22770
22770
  ],
22771
22771
  subLanguage: "graphql"
22772
22772
  }
22773
- }, F = {
22773
+ }, U = {
22774
22774
  className: "string",
22775
22775
  begin: "`",
22776
22776
  end: "`",
@@ -22778,7 +22778,7 @@ function Og() {
22778
22778
  l.BACKSLASH_ESCAPE,
22779
22779
  N
22780
22780
  ]
22781
- }, h = {
22781
+ }, O = {
22782
22782
  className: "comment",
22783
22783
  variants: [
22784
22784
  l.COMMENT(
@@ -22829,7 +22829,7 @@ function Og() {
22829
22829
  R,
22830
22830
  y,
22831
22831
  v,
22832
- F,
22832
+ U,
22833
22833
  // Skip numbers when they are part of a variable name
22834
22834
  { match: /\$\d+/ },
22835
22835
  C
@@ -22847,7 +22847,7 @@ function Og() {
22847
22847
  "self"
22848
22848
  ].concat(M)
22849
22849
  });
22850
- const P = [].concat(h, N.contains), G = P.concat([
22850
+ const P = [].concat(O, N.contains), L = P.concat([
22851
22851
  // eat recursive parens in sub expressions
22852
22852
  {
22853
22853
  begin: /(\s*)\(/,
@@ -22855,7 +22855,7 @@ function Og() {
22855
22855
  keywords: S,
22856
22856
  contains: ["self"].concat(P)
22857
22857
  }
22858
- ]), L = {
22858
+ ]), w = {
22859
22859
  className: "params",
22860
22860
  // convert this to negative lookbehind in v12
22861
22861
  begin: /(\s*)\(/,
@@ -22864,8 +22864,8 @@ function Og() {
22864
22864
  excludeBegin: !0,
22865
22865
  excludeEnd: !0,
22866
22866
  keywords: S,
22867
- contains: G
22868
- }, k = {
22867
+ contains: L
22868
+ }, F = {
22869
22869
  variants: [
22870
22870
  // class Car extends vehicle
22871
22871
  {
@@ -22950,7 +22950,7 @@ function Og() {
22950
22950
  3: "title.function"
22951
22951
  },
22952
22952
  label: "func.def",
22953
- contains: [L],
22953
+ contains: [w],
22954
22954
  illegal: /%/
22955
22955
  }, le = {
22956
22956
  relevance: 0,
@@ -22998,7 +22998,7 @@ function Og() {
22998
22998
  // eat to avoid empty params
22999
22999
  begin: /\(\)/
23000
23000
  },
23001
- L
23001
+ w
23002
23002
  ]
23003
23003
  }, ie = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + l.UNDERSCORE_IDENT_RE + ")\\s*=>", pe = {
23004
23004
  match: [
@@ -23017,7 +23017,7 @@ function Og() {
23017
23017
  3: "title.function"
23018
23018
  },
23019
23019
  contains: [
23020
- L
23020
+ w
23021
23021
  ]
23022
23022
  };
23023
23023
  return {
@@ -23025,7 +23025,7 @@ function Og() {
23025
23025
  aliases: ["js", "jsx", "mjs", "cjs"],
23026
23026
  keywords: S,
23027
23027
  // this will be extended by TypeScript
23028
- exports: { PARAMS_CONTAINS: G, CLASS_REFERENCE: z },
23028
+ exports: { PARAMS_CONTAINS: L, CLASS_REFERENCE: z },
23029
23029
  illegal: /#(?![$_A-z])/,
23030
23030
  contains: [
23031
23031
  l.SHEBANG({
@@ -23039,8 +23039,8 @@ function Og() {
23039
23039
  R,
23040
23040
  y,
23041
23041
  v,
23042
- F,
23043
- h,
23042
+ U,
23043
+ O,
23044
23044
  // Skip numbers when they are part of a variable name
23045
23045
  { match: /\$\d+/ },
23046
23046
  C,
@@ -23057,7 +23057,7 @@ function Og() {
23057
23057
  keywords: "return throw case",
23058
23058
  relevance: 0,
23059
23059
  contains: [
23060
- h,
23060
+ O,
23061
23061
  l.REGEXP_MODE,
23062
23062
  {
23063
23063
  className: "function",
@@ -23086,7 +23086,7 @@ function Og() {
23086
23086
  excludeBegin: !0,
23087
23087
  excludeEnd: !0,
23088
23088
  keywords: S,
23089
- contains: G
23089
+ contains: L
23090
23090
  }
23091
23091
  ]
23092
23092
  }
@@ -23141,7 +23141,7 @@ function Og() {
23141
23141
  returnBegin: !0,
23142
23142
  label: "func.def",
23143
23143
  contains: [
23144
- L,
23144
+ w,
23145
23145
  l.inherit(l.TITLE_MODE, { begin: m, className: "title.function" })
23146
23146
  ]
23147
23147
  },
@@ -23161,11 +23161,11 @@ function Og() {
23161
23161
  {
23162
23162
  match: [/\bconstructor(?=\s*\()/],
23163
23163
  className: { 1: "title.function" },
23164
- contains: [L]
23164
+ contains: [w]
23165
23165
  },
23166
23166
  Oe,
23167
23167
  le,
23168
- k,
23168
+ F,
23169
23169
  Te,
23170
23170
  {
23171
23171
  match: /\$[(.]/
@@ -24069,7 +24069,7 @@ function xg() {
24069
24069
  "(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)",
24070
24070
  "(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)",
24071
24071
  "(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"
24072
- ].map((h) => h + "(?![a-zA-Z@:_])")), a = new RegExp([
24072
+ ].map((O) => O + "(?![a-zA-Z@:_])")), a = new RegExp([
24073
24073
  // A function \module_function_name:signature or \__module_function_name:signature,
24074
24074
  // where both module and function_name need at least two characters and
24075
24075
  // function_name may contain single underscores.
@@ -24090,7 +24090,7 @@ function xg() {
24090
24090
  "(?:hbox|vbox):n",
24091
24091
  "::[a-zA-Z]_unbraced",
24092
24092
  "::[a-zA-Z:]"
24093
- ].map((h) => h + "(?![a-zA-Z:_])").join("|")), i = [
24093
+ ].map((O) => O + "(?![a-zA-Z:_])").join("|")), i = [
24094
24094
  { begin: /[a-zA-Z@]+/ },
24095
24095
  // control word
24096
24096
  { begin: /[^a-zA-Z@]?/ }
@@ -24182,30 +24182,30 @@ function xg() {
24182
24182
  }, T = {
24183
24183
  begin: /\s+/,
24184
24184
  relevance: 0
24185
- }, f = [g], b = [S], C = function(h, M) {
24185
+ }, f = [g], b = [S], C = function(O, M) {
24186
24186
  return {
24187
24187
  contains: [T],
24188
24188
  starts: {
24189
24189
  relevance: 0,
24190
- contains: h,
24190
+ contains: O,
24191
24191
  starts: M
24192
24192
  }
24193
24193
  };
24194
- }, N = function(h, M) {
24194
+ }, N = function(O, M) {
24195
24195
  return {
24196
- begin: "\\\\" + h + "(?![a-zA-Z@:_])",
24196
+ begin: "\\\\" + O + "(?![a-zA-Z@:_])",
24197
24197
  keywords: {
24198
24198
  $pattern: /\\[a-zA-Z]+/,
24199
- keyword: "\\" + h
24199
+ keyword: "\\" + O
24200
24200
  },
24201
24201
  relevance: 0,
24202
24202
  contains: [T],
24203
24203
  starts: M
24204
24204
  };
24205
- }, R = function(h, M) {
24205
+ }, R = function(O, M) {
24206
24206
  return t.inherit(
24207
24207
  {
24208
- begin: "\\\\begin(?=[ ]*(\\r?\\n[ ]*)?\\{" + h + "\\})",
24208
+ begin: "\\\\begin(?=[ ]*(\\r?\\n[ ]*)?\\{" + O + "\\})",
24209
24209
  keywords: {
24210
24210
  $pattern: /\\[a-zA-Z]+/,
24211
24211
  keyword: "\\begin"
@@ -24214,26 +24214,26 @@ function xg() {
24214
24214
  },
24215
24215
  C(f, M)
24216
24216
  );
24217
- }, y = (h = "string") => t.END_SAME_AS_BEGIN({
24218
- className: h,
24217
+ }, y = (O = "string") => t.END_SAME_AS_BEGIN({
24218
+ className: O,
24219
24219
  begin: /(.|\r?\n)/,
24220
24220
  end: /(.|\r?\n)/,
24221
24221
  excludeBegin: !0,
24222
24222
  excludeEnd: !0,
24223
24223
  endsParent: !0
24224
- }), v = function(h) {
24224
+ }), v = function(O) {
24225
24225
  return {
24226
24226
  className: "string",
24227
- end: "(?=\\\\end\\{" + h + "\\})"
24227
+ end: "(?=\\\\end\\{" + O + "\\})"
24228
24228
  };
24229
- }, F = (h = "string") => ({
24229
+ }, U = (O = "string") => ({
24230
24230
  relevance: 0,
24231
24231
  begin: /\{/,
24232
24232
  starts: {
24233
24233
  endsParent: !0,
24234
24234
  contains: [
24235
24235
  {
24236
- className: h,
24236
+ className: O,
24237
24237
  end: /(?=\})/,
24238
24238
  endsParent: !0,
24239
24239
  contains: [
@@ -24251,30 +24251,30 @@ function xg() {
24251
24251
  ...[
24252
24252
  "verb",
24253
24253
  "lstinline"
24254
- ].map((h) => N(h, { contains: [y()] })),
24254
+ ].map((O) => N(O, { contains: [y()] })),
24255
24255
  N("mint", C(f, { contains: [y()] })),
24256
24256
  N("mintinline", C(f, { contains: [
24257
- F(),
24257
+ U(),
24258
24258
  y()
24259
24259
  ] })),
24260
24260
  N("url", { contains: [
24261
- F("link"),
24262
- F("link")
24261
+ U("link"),
24262
+ U("link")
24263
24263
  ] }),
24264
- N("hyperref", { contains: [F("link")] }),
24265
- N("href", C(b, { contains: [F("link")] })),
24264
+ N("hyperref", { contains: [U("link")] }),
24265
+ N("href", C(b, { contains: [U("link")] })),
24266
24266
  ...[].concat(...[
24267
24267
  "",
24268
24268
  "\\*"
24269
- ].map((h) => [
24270
- R("verbatim" + h, v("verbatim" + h)),
24271
- R("filecontents" + h, C(f, v("filecontents" + h))),
24269
+ ].map((O) => [
24270
+ R("verbatim" + O, v("verbatim" + O)),
24271
+ R("filecontents" + O, C(f, v("filecontents" + O))),
24272
24272
  ...[
24273
24273
  "",
24274
24274
  "B",
24275
24275
  "L"
24276
24276
  ].map(
24277
- (M) => R(M + "Verbatim" + h, C(b, v(M + "Verbatim" + h)))
24277
+ (M) => R(M + "Verbatim" + O, C(b, v(M + "Verbatim" + O)))
24278
24278
  )
24279
24279
  ])),
24280
24280
  R("minted", C(b, C(f, v("minted"))))
@@ -25215,11 +25215,11 @@ function wg() {
25215
25215
  className: "string",
25216
25216
  begin: "~?" + P + ".*?" + P
25217
25217
  };
25218
- }, b = function(P, G, L) {
25218
+ }, b = function(P, L, w) {
25219
25219
  return {
25220
25220
  className: P,
25221
- begin: G,
25222
- relevance: L
25221
+ begin: L,
25222
+ relevance: w
25223
25223
  };
25224
25224
  }, C = {
25225
25225
  $pattern: /[a-z-]+/,
@@ -25295,7 +25295,7 @@ function wg() {
25295
25295
  }
25296
25296
  }
25297
25297
  ]
25298
- }, F = {
25298
+ }, U = {
25299
25299
  className: "keyword",
25300
25300
  begin: "@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",
25301
25301
  starts: {
@@ -25323,7 +25323,7 @@ function wg() {
25323
25323
  returnEnd: !0,
25324
25324
  contains: R
25325
25325
  }
25326
- }, h = {
25326
+ }, O = {
25327
25327
  // first parse unambiguous selectors (i.e. those not starting with tag)
25328
25328
  // then fall into the scary lookahead-discriminator variant.
25329
25329
  // this mode also handles mixin definitions and calls
@@ -25381,16 +25381,16 @@ function wg() {
25381
25381
  }, M = {
25382
25382
  begin: d + `:(:)?(${m.join("|")})`,
25383
25383
  returnBegin: !0,
25384
- contains: [h]
25384
+ contains: [O]
25385
25385
  };
25386
25386
  return S.push(
25387
25387
  u.C_LINE_COMMENT_MODE,
25388
25388
  u.C_BLOCK_COMMENT_MODE,
25389
- F,
25389
+ U,
25390
25390
  A,
25391
25391
  M,
25392
25392
  v,
25393
- h,
25393
+ O,
25394
25394
  y,
25395
25395
  _.FUNCTION_DISPATCH
25396
25396
  ), {
@@ -37161,11 +37161,11 @@ function pS() {
37161
37161
  begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
37162
37162
  end: /[ \t]*(\w+)\b/,
37163
37163
  contains: t.QUOTE_STRING_MODE.contains.concat(l),
37164
- "on:begin": (L, k) => {
37165
- k.data._beginMatch = L[1] || L[2];
37164
+ "on:begin": (w, F) => {
37165
+ F.data._beginMatch = w[1] || w[2];
37166
37166
  },
37167
- "on:end": (L, k) => {
37168
- k.data._beginMatch !== L[1] && k.ignoreMatch();
37167
+ "on:end": (w, F) => {
37168
+ F.data._beginMatch !== w[1] && F.ignoreMatch();
37169
37169
  }
37170
37170
  }, p = t.END_SAME_AS_BEGIN({
37171
37171
  begin: /<<<[ \t]*'(\w+)'\n/,
@@ -37393,14 +37393,14 @@ function pS() {
37393
37393
  "stdClass"
37394
37394
  ], N = {
37395
37395
  keyword: f,
37396
- literal: ((L) => {
37397
- const k = [];
37398
- return L.forEach((z) => {
37399
- k.push(z), z.toLowerCase() === z ? k.push(z.toUpperCase()) : k.push(z.toLowerCase());
37400
- }), k;
37396
+ literal: ((w) => {
37397
+ const F = [];
37398
+ return w.forEach((z) => {
37399
+ F.push(z), z.toLowerCase() === z ? F.push(z.toUpperCase()) : F.push(z.toLowerCase());
37400
+ }), F;
37401
37401
  })(T),
37402
37402
  built_in: b
37403
- }, R = (L) => L.map((k) => k.replace(/\|\d+$/, "")), y = { variants: [
37403
+ }, R = (w) => w.map((F) => F.replace(/\|\d+$/, "")), y = { variants: [
37404
37404
  {
37405
37405
  match: [
37406
37406
  /new/,
@@ -37414,7 +37414,7 @@ function pS() {
37414
37414
  4: "title.class"
37415
37415
  }
37416
37416
  }
37417
- ] }, v = n.concat(a, "\\b(?!\\()"), F = { variants: [
37417
+ ] }, v = n.concat(a, "\\b(?!\\()"), U = { variants: [
37418
37418
  {
37419
37419
  match: [
37420
37420
  n.concat(
@@ -37470,7 +37470,7 @@ function pS() {
37470
37470
  ] }, A = {
37471
37471
  scope: "attr",
37472
37472
  match: n.concat(a, n.lookahead(":"), n.lookahead(/(?!::)/))
37473
- }, h = {
37473
+ }, O = {
37474
37474
  relevance: 0,
37475
37475
  begin: /\(/,
37476
37476
  end: /\)/,
@@ -37478,7 +37478,7 @@ function pS() {
37478
37478
  contains: [
37479
37479
  A,
37480
37480
  o,
37481
- F,
37481
+ U,
37482
37482
  t.C_BLOCK_COMMENT_MODE,
37483
37483
  g,
37484
37484
  S,
@@ -37495,17 +37495,17 @@ function pS() {
37495
37495
  n.lookahead(/(?=\()/)
37496
37496
  ],
37497
37497
  scope: { 3: "title.function.invoke" },
37498
- contains: [h]
37498
+ contains: [O]
37499
37499
  };
37500
- h.contains.push(M);
37500
+ O.contains.push(M);
37501
37501
  const P = [
37502
37502
  A,
37503
- F,
37503
+ U,
37504
37504
  t.C_BLOCK_COMMENT_MODE,
37505
37505
  g,
37506
37506
  S,
37507
37507
  y
37508
- ], G = {
37508
+ ], L = {
37509
37509
  begin: n.concat(
37510
37510
  /#\[\s*\\?/,
37511
37511
  n.either(
@@ -37553,7 +37553,7 @@ function pS() {
37553
37553
  case_insensitive: !1,
37554
37554
  keywords: N,
37555
37555
  contains: [
37556
- G,
37556
+ L,
37557
37557
  t.HASH_COMMENT_MODE,
37558
37558
  t.COMMENT("//", "$"),
37559
37559
  t.COMMENT(
@@ -37588,7 +37588,7 @@ function pS() {
37588
37588
  },
37589
37589
  o,
37590
37590
  M,
37591
- F,
37591
+ U,
37592
37592
  {
37593
37593
  match: [
37594
37594
  /const/,
@@ -37625,9 +37625,9 @@ function pS() {
37625
37625
  keywords: N,
37626
37626
  contains: [
37627
37627
  "self",
37628
- G,
37628
+ L,
37629
37629
  o,
37630
- F,
37630
+ U,
37631
37631
  t.C_BLOCK_COMMENT_MODE,
37632
37632
  g,
37633
37633
  S
@@ -45847,8 +45847,8 @@ function $S() {
45847
45847
  exceptions: y,
45848
45848
  when: v
45849
45849
  } = {}) {
45850
- const F = v;
45851
- return y = y || [], R.map((A) => A.match(/\|\d+$/) || y.includes(A) ? A : F(A) ? `${A}|0` : A);
45850
+ const U = v;
45851
+ return y = y || [], R.map((A) => A.match(/\|\d+$/) || y.includes(A) ? A : U(A) ? `${A}|0` : A);
45852
45852
  }
45853
45853
  return {
45854
45854
  name: "SQL",
@@ -47489,11 +47489,11 @@ function jS() {
47489
47489
  return v.map((A) => e(A)).join("");
47490
47490
  }
47491
47491
  function r(v) {
47492
- const F = v[v.length - 1];
47493
- return typeof F == "object" && F.constructor === Object ? (v.splice(v.length - 1, 1), F) : {};
47492
+ const U = v[v.length - 1];
47493
+ return typeof U == "object" && U.constructor === Object ? (v.splice(v.length - 1, 1), U) : {};
47494
47494
  }
47495
47495
  function a(...v) {
47496
- return "(" + (r(v).capture ? "" : "?:") + v.map((h) => e(h)).join("|") + ")";
47496
+ return "(" + (r(v).capture ? "" : "?:") + v.map((O) => e(O)).join("|") + ")";
47497
47497
  }
47498
47498
  const i = (v) => n(
47499
47499
  /\b/,
@@ -47812,14 +47812,14 @@ function jS() {
47812
47812
  "swift"
47813
47813
  ];
47814
47814
  function y(v) {
47815
- const F = {
47815
+ const U = {
47816
47816
  match: /\s+/,
47817
47817
  relevance: 0
47818
47818
  }, A = v.COMMENT(
47819
47819
  "/\\*",
47820
47820
  "\\*/",
47821
47821
  { contains: ["self"] }
47822
- ), h = [
47822
+ ), O = [
47823
47823
  v.C_LINE_COMMENT_MODE,
47824
47824
  A
47825
47825
  ], M = {
@@ -47832,10 +47832,10 @@ function jS() {
47832
47832
  // Consume .keyword to prevent highlighting properties and methods as keywords.
47833
47833
  match: n(/\./, a(...l)),
47834
47834
  relevance: 0
47835
- }, G = l.filter((Z) => typeof Z == "string").concat(["_|0"]), L = l.filter((Z) => typeof Z != "string").concat(c).map(i), k = { variants: [
47835
+ }, L = l.filter((Z) => typeof Z == "string").concat(["_|0"]), w = l.filter((Z) => typeof Z != "string").concat(c).map(i), F = { variants: [
47836
47836
  {
47837
47837
  className: "keyword",
47838
- match: a(...L, ...o)
47838
+ match: a(...w, ...o)
47839
47839
  }
47840
47840
  ] }, z = {
47841
47841
  $pattern: a(
@@ -47844,12 +47844,12 @@ function jS() {
47844
47844
  /#\w+/
47845
47845
  // number keywords
47846
47846
  ),
47847
- keyword: G.concat(m),
47847
+ keyword: L.concat(m),
47848
47848
  literal: u
47849
47849
  }, K = [
47850
47850
  M,
47851
47851
  P,
47852
- k
47852
+ F
47853
47853
  ], j = {
47854
47854
  // Consume .built_in to prevent highlighting properties and methods.
47855
47855
  match: n(/\./, a(...p)),
@@ -48038,7 +48038,7 @@ function jS() {
48038
48038
  end: />/,
48039
48039
  keywords: z,
48040
48040
  contains: [
48041
- ...h,
48041
+ ...O,
48042
48042
  ...K,
48043
48043
  ...We,
48044
48044
  Oe,
@@ -48058,7 +48058,7 @@ function jS() {
48058
48058
  contains: [
48059
48059
  "self",
48060
48060
  Tt,
48061
- ...h,
48061
+ ...O,
48062
48062
  gt,
48063
48063
  ...K,
48064
48064
  ...Se,
@@ -48074,7 +48074,7 @@ function jS() {
48074
48074
  end: />/,
48075
48075
  keywords: "repeat each",
48076
48076
  contains: [
48077
- ...h,
48077
+ ...O,
48078
48078
  Ne
48079
48079
  ]
48080
48080
  }, $t = {
@@ -48100,7 +48100,7 @@ function jS() {
48100
48100
  keywords: z,
48101
48101
  contains: [
48102
48102
  $t,
48103
- ...h,
48103
+ ...O,
48104
48104
  ...K,
48105
48105
  ...Te,
48106
48106
  ee,
@@ -48124,7 +48124,7 @@ function jS() {
48124
48124
  contains: [
48125
48125
  at,
48126
48126
  Ct,
48127
- F
48127
+ U
48128
48128
  ],
48129
48129
  illegal: [
48130
48130
  /\[/,
@@ -48139,7 +48139,7 @@ function jS() {
48139
48139
  contains: [
48140
48140
  at,
48141
48141
  Ct,
48142
- F
48142
+ U
48143
48143
  ],
48144
48144
  illegal: /\[|%/
48145
48145
  }, Qt = {
@@ -48248,7 +48248,7 @@ function jS() {
48248
48248
  name: "Swift",
48249
48249
  keywords: z,
48250
48250
  contains: [
48251
- ...h,
48251
+ ...O,
48252
48252
  Kt,
48253
48253
  Nt,
48254
48254
  Zt,
@@ -48259,7 +48259,7 @@ function jS() {
48259
48259
  {
48260
48260
  beginKeywords: "import",
48261
48261
  end: /$/,
48262
- contains: [...h],
48262
+ contains: [...O],
48263
48263
  relevance: 0
48264
48264
  },
48265
48265
  gt,
@@ -49443,7 +49443,7 @@ function cf() {
49443
49443
  ],
49444
49444
  subLanguage: "css"
49445
49445
  }
49446
- }, F = {
49446
+ }, U = {
49447
49447
  begin: ".?gql`",
49448
49448
  end: "",
49449
49449
  starts: {
@@ -49513,7 +49513,7 @@ function cf() {
49513
49513
  u.QUOTE_STRING_MODE,
49514
49514
  y,
49515
49515
  v,
49516
- F,
49516
+ U,
49517
49517
  A,
49518
49518
  // Skip numbers when they are part of a variable name
49519
49519
  { match: /\$\d+/ },
@@ -49532,15 +49532,15 @@ function cf() {
49532
49532
  "self"
49533
49533
  ].concat(P)
49534
49534
  });
49535
- const G = [].concat(M, R.contains), L = G.concat([
49535
+ const L = [].concat(M, R.contains), w = L.concat([
49536
49536
  // eat recursive parens in sub expressions
49537
49537
  {
49538
49538
  begin: /(\s*)\(/,
49539
49539
  end: /\)/,
49540
49540
  keywords: T,
49541
- contains: ["self"].concat(G)
49541
+ contains: ["self"].concat(L)
49542
49542
  }
49543
- ]), k = {
49543
+ ]), F = {
49544
49544
  className: "params",
49545
49545
  // convert this to negative lookbehind in v12
49546
49546
  begin: /(\s*)\(/,
@@ -49549,7 +49549,7 @@ function cf() {
49549
49549
  excludeBegin: !0,
49550
49550
  excludeEnd: !0,
49551
49551
  keywords: T,
49552
- contains: L
49552
+ contains: w
49553
49553
  }, z = {
49554
49554
  variants: [
49555
49555
  // class Car extends vehicle
@@ -49635,7 +49635,7 @@ function cf() {
49635
49635
  3: "title.function"
49636
49636
  },
49637
49637
  label: "func.def",
49638
- contains: [k],
49638
+ contains: [F],
49639
49639
  illegal: /%/
49640
49640
  }, Se = {
49641
49641
  relevance: 0,
@@ -49683,7 +49683,7 @@ function cf() {
49683
49683
  // eat to avoid empty params
49684
49684
  begin: /\(\)/
49685
49685
  },
49686
- k
49686
+ F
49687
49687
  ]
49688
49688
  }, pe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + u.UNDERSCORE_IDENT_RE + ")\\s*=>", ee = {
49689
49689
  match: [
@@ -49702,7 +49702,7 @@ function cf() {
49702
49702
  3: "title.function"
49703
49703
  },
49704
49704
  contains: [
49705
- k
49705
+ F
49706
49706
  ]
49707
49707
  };
49708
49708
  return {
@@ -49710,7 +49710,7 @@ function cf() {
49710
49710
  aliases: ["js", "jsx", "mjs", "cjs"],
49711
49711
  keywords: T,
49712
49712
  // this will be extended by TypeScript
49713
- exports: { PARAMS_CONTAINS: L, CLASS_REFERENCE: K },
49713
+ exports: { PARAMS_CONTAINS: w, CLASS_REFERENCE: K },
49714
49714
  illegal: /#(?![$_A-z])/,
49715
49715
  contains: [
49716
49716
  u.SHEBANG({
@@ -49723,7 +49723,7 @@ function cf() {
49723
49723
  u.QUOTE_STRING_MODE,
49724
49724
  y,
49725
49725
  v,
49726
- F,
49726
+ U,
49727
49727
  A,
49728
49728
  M,
49729
49729
  // Skip numbers when they are part of a variable name
@@ -49771,7 +49771,7 @@ function cf() {
49771
49771
  excludeBegin: !0,
49772
49772
  excludeEnd: !0,
49773
49773
  keywords: T,
49774
- contains: L
49774
+ contains: w
49775
49775
  }
49776
49776
  ]
49777
49777
  }
@@ -49826,7 +49826,7 @@ function cf() {
49826
49826
  returnBegin: !0,
49827
49827
  label: "func.def",
49828
49828
  contains: [
49829
- k,
49829
+ F,
49830
49830
  u.inherit(u.TITLE_MODE, { begin: p, className: "title.function" })
49831
49831
  ]
49832
49832
  },
@@ -49846,7 +49846,7 @@ function cf() {
49846
49846
  {
49847
49847
  match: [/\bconstructor(?=\s*\()/],
49848
49848
  className: { 1: "title.function" },
49849
- contains: [k]
49849
+ contains: [F]
49850
49850
  },
49851
49851
  Re,
49852
49852
  Se,
@@ -49917,14 +49917,14 @@ function cf() {
49917
49917
  }, C = {
49918
49918
  className: "meta",
49919
49919
  begin: "@" + p
49920
- }, N = (F, A, h) => {
49921
- const M = F.contains.findIndex((P) => P.label === A);
49920
+ }, N = (U, A, O) => {
49921
+ const M = U.contains.findIndex((P) => P.label === A);
49922
49922
  if (M === -1)
49923
49923
  throw new Error("can not find mode to replace");
49924
- F.contains.splice(M, 1, h);
49924
+ U.contains.splice(M, 1, O);
49925
49925
  };
49926
49926
  Object.assign(m.keywords, b), m.exports.PARAMS_CONTAINS.push(C);
49927
- const R = m.contains.find((F) => F.scope === "attr"), y = Object.assign(
49927
+ const R = m.contains.find((U) => U.scope === "attr"), y = Object.assign(
49928
49928
  {},
49929
49929
  R,
49930
49930
  { match: _.concat(p, _.lookahead(/\s*\?:/)) }
@@ -49943,7 +49943,7 @@ function cf() {
49943
49943
  y
49944
49944
  // Added for optional property assignment highlighting
49945
49945
  ]), N(m, "shebang", u.SHEBANG()), N(m, "use_strict", T);
49946
- const v = m.contains.find((F) => F.label === "func.def");
49946
+ const v = m.contains.find((U) => U.label === "func.def");
49947
49947
  return v.relevance = 0, Object.assign(m, {
49948
49948
  name: "TypeScript",
49949
49949
  aliases: [
@@ -52783,17 +52783,17 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
52783
52783
  emits: ["update:modelValue"],
52784
52784
  setup(e, { expose: t }) {
52785
52785
  const n = e, r = Mt(""), a = Mt(null), i = Mt(!1), s = Mt(""), o = Q_(e, "modelValue"), c = (A) => {
52786
- const h = A.match(/```/g);
52787
- if (h && h.length % 2 !== 0)
52786
+ const O = A.match(/```/g);
52787
+ if (O && O.length % 2 !== 0)
52788
52788
  return !0;
52789
52789
  const P = A.replace(/```[\s\S]*?```/g, "").match(/`/g);
52790
52790
  if (P && P.length % 2 !== 0)
52791
52791
  return !0;
52792
- const G = A.split(`
52793
- `), L = G[G.length - 1];
52794
- if (L && L.trim().startsWith("|") && !L.trim().endsWith("|"))
52792
+ const L = A.split(`
52793
+ `), w = L[L.length - 1];
52794
+ if (w && w.trim().startsWith("|") && !w.trim().endsWith("|"))
52795
52795
  return !0;
52796
- const k = [
52796
+ const F = [
52797
52797
  "div",
52798
52798
  "table",
52799
52799
  "thead",
@@ -52806,74 +52806,74 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
52806
52806
  "li",
52807
52807
  "blockquote"
52808
52808
  ];
52809
- for (const z of k) {
52809
+ for (const z of F) {
52810
52810
  const K = (A.match(new RegExp(`<${z}[^>]*>`, "gi")) || []).length, j = (A.match(new RegExp(`</${z}>`, "gi")) || []).length;
52811
52811
  if (K > j)
52812
52812
  return !0;
52813
52813
  }
52814
- if (L) {
52815
- const z = L.trim();
52814
+ if (w) {
52815
+ const z = w.trim();
52816
52816
  if (/^[-*+]\s*$/.test(z) || /^\d+\.\s*$/.test(z) || /^#{1,6}\s*$/.test(z))
52817
52817
  return !0;
52818
52818
  }
52819
52819
  return !1;
52820
52820
  }, l = (A) => {
52821
- const h = A.lastIndexOf("\n```\n");
52822
- if (h > 0 && (A.slice(0, h + 4).match(/```/g) || []).length % 2 === 0)
52823
- return h + 4;
52821
+ const O = A.lastIndexOf("\n```\n");
52822
+ if (O > 0 && (A.slice(0, O + 4).match(/```/g) || []).length % 2 === 0)
52823
+ return O + 4;
52824
52824
  const M = A.lastIndexOf(`
52825
52825
 
52826
52826
  `);
52827
52827
  if (M > 0) {
52828
- const G = A.slice(0, M);
52829
- if (!c(G))
52828
+ const L = A.slice(0, M);
52829
+ if (!c(L))
52830
52830
  return M + 2;
52831
52831
  }
52832
52832
  const P = A.match(/\|\s*\n(?!\|)/g);
52833
52833
  if (P && P.length > 0) {
52834
- const G = P[P.length - 1], L = A.lastIndexOf(G);
52835
- if (L > 0) {
52836
- const k = L + G.length, z = A.slice(0, k);
52834
+ const L = P[P.length - 1], w = A.lastIndexOf(L);
52835
+ if (w > 0) {
52836
+ const F = w + L.length, z = A.slice(0, F);
52837
52837
  if (!c(z))
52838
- return k;
52838
+ return F;
52839
52839
  }
52840
52840
  }
52841
52841
  return -1;
52842
52842
  }, u = (A) => {
52843
- const h = document.createElement("template");
52844
- return h.innerHTML = A.trim(), h.content;
52845
- }, _ = (A, h) => {
52846
- if (s.value === h)
52843
+ const O = document.createElement("template");
52844
+ return O.innerHTML = A.trim(), O.content;
52845
+ }, _ = (A, O) => {
52846
+ if (s.value === O)
52847
52847
  return;
52848
- const P = u(h), G = Array.from(P.children), L = Array.from(A.children);
52849
- if (L.length === 0) {
52850
- A.appendChild(P), s.value = h;
52848
+ const P = u(O), L = Array.from(P.children), w = Array.from(A.children);
52849
+ if (w.length === 0) {
52850
+ A.appendChild(P), s.value = O;
52851
52851
  return;
52852
52852
  }
52853
- let k = 0;
52854
- const z = Math.min(L.length, G.length);
52853
+ let F = 0;
52854
+ const z = Math.min(w.length, L.length);
52855
52855
  for (let K = 0; K < z; K++) {
52856
- const j = L[K], le = G[K];
52856
+ const j = w[K], le = L[K];
52857
52857
  if (j && le && j.outerHTML === le.outerHTML)
52858
- k = K + 1;
52858
+ F = K + 1;
52859
52859
  else
52860
52860
  break;
52861
52861
  }
52862
- if (k > 0 && k < G.length) {
52863
- for (; A.children.length > k; )
52862
+ if (F > 0 && F < L.length) {
52863
+ for (; A.children.length > F; )
52864
52864
  A.lastElementChild?.remove();
52865
52865
  const K = document.createDocumentFragment();
52866
- for (let j = k; j < G.length; j++) {
52867
- const le = G[j];
52866
+ for (let j = F; j < L.length; j++) {
52867
+ const le = L[j];
52868
52868
  le && K.appendChild(le.cloneNode(!0));
52869
52869
  }
52870
52870
  A.appendChild(K);
52871
- } else if (k === 0)
52871
+ } else if (F === 0)
52872
52872
  A.innerHTML = "", A.appendChild(P);
52873
- else if (L.length > G.length)
52874
- for (; A.children.length > G.length; )
52873
+ else if (w.length > L.length)
52874
+ for (; A.children.length > L.length; )
52875
52875
  A.lastElementChild?.remove();
52876
- s.value = h;
52876
+ s.value = O;
52877
52877
  }, m = Mt(), p = X_();
52878
52878
  Z_(() => {
52879
52879
  n.options ? p.value = new ve(
@@ -52890,39 +52890,43 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
52890
52890
  n.options
52891
52891
  )
52892
52892
  ) : p.value = new ve();
52893
- const A = p.value.renderer.rules.table_open || function(M, P, G, L, k) {
52894
- return k.renderToken(M, P, G);
52895
- }, h = p.value.renderer.rules.table_close || function(M, P, G, L, k) {
52896
- return k.renderToken(M, P, G);
52893
+ const A = p.value.renderer.rules.table_open || function(M, P, L, w, F) {
52894
+ return F.renderToken(M, P, L);
52895
+ }, O = p.value.renderer.rules.table_close || function(M, P, L, w, F) {
52896
+ return F.renderToken(M, P, L);
52897
52897
  };
52898
- p.value.renderer.rules.table_open = function(M, P, G, L, k) {
52899
- return '<div class="table-container">' + A(M, P, G, L, k);
52900
- }, p.value.renderer.rules.table_close = function(M, P, G, L, k) {
52901
- return h(M, P, G, L, k) + "</div>";
52898
+ p.value.renderer.rules.table_open = function(M, P, L, w, F) {
52899
+ return '<div class="table-container">' + A(M, P, L, w, F);
52900
+ }, p.value.renderer.rules.table_close = function(M, P, L, w, F) {
52901
+ return O(M, P, L, w, F) + "</div>";
52902
52902
  }, p.value.renderer.rules.fence = (M, P) => {
52903
- const G = M[P], L = G.info.trim(), k = G.content;
52903
+ const L = M[P], w = L.info.trim(), F = L.content;
52904
52904
  if (!p.value)
52905
52905
  throw new Error("MarkdownIt instance is not initialized");
52906
- const z = L && (Wu.getLanguage(L) || L === "vue") ? Wu.highlight(k, {
52907
- language: L === "vue" ? "html" : L,
52906
+ const z = w && (Wu.getLanguage(w) || w === "vue") ? Wu.highlight(F, {
52907
+ language: w === "vue" ? "html" : w,
52908
52908
  ignoreIllegals: !0
52909
- }).value : p.value.utils.escapeHtml(k), j = k.split(`
52909
+ }).value : p.value.utils.escapeHtml(F), j = F.split(`
52910
52910
  `).length, le = Array.from(
52911
52911
  { length: j },
52912
52912
  (Te, ie) => `<div class="ln" data-line="${ie + 1}">${ie + 1}</div>`
52913
- ).join(""), Se = n.incremental ? !1 : j > n.codeMaxHeight, Oe = Se ? "code-block--collapsed" : "", Re = Se ? `<button class="expand-btn" data-expanded="false">${n.expandText}</button>` : "";
52913
+ ).join(""), Se = n.incremental ? !1 : j > n.codeMaxHeight, Oe = Se ? "code-block--collapsed" : "", Re = Se ? `<button class="expand-btn" data-expanded="false" title="${n.expandText}">
52914
+ <i class="expand-icon material-symbols--expand-more"></i>
52915
+ </button>` : "";
52914
52916
  return `
52915
52917
  <div class="code-block-wrapper not-prose ${Oe}" data-lines="${j}">
52916
52918
  <div class="code-header">
52917
- <span class="lang">${L || "text"}</span>
52919
+ <span class="lang">${w || "text"}</span>
52918
52920
  <div class="code-header__actions">
52919
52921
  ${Re}
52920
- <button class="copy-btn">${n.copyText}</button>
52922
+ <button class="copy-btn" title="${n.copyText}">
52923
+ <i class="copy-icon material-symbols--content-copy"></i>
52924
+ </button>
52921
52925
  </div>
52922
52926
  </div>
52923
52927
  <div class="code-content">
52924
52928
  <div class="line-numbers" style="min-width: ${Math.max(2, j.toString().length)}ch;">${le}</div>
52925
- <pre><code class="hljs ${L} code-content__code">${z}</code></pre>
52929
+ <pre><code class="hljs ${w} code-content__code">${z}</code></pre>
52926
52930
  </div>
52927
52931
  ${Se ? '<div class="code-block__fade"></div>' : ""}
52928
52932
  </div>
@@ -52940,8 +52944,8 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
52940
52944
  }), m.value?.addEventListener("click", N), m.value?.addEventListener("click", C), d();
52941
52945
  });
52942
52946
  const d = () => {
52943
- m.value?.querySelectorAll(".code-block-wrapper")?.forEach((h) => {
52944
- const M = h.querySelector("pre"), P = h.querySelector(".line-numbers");
52947
+ m.value?.querySelectorAll(".code-block-wrapper")?.forEach((O) => {
52948
+ const M = O.querySelector("pre"), P = O.querySelector(".line-numbers");
52945
52949
  M && P && M.addEventListener("scroll", () => {
52946
52950
  P.scrollTop = M.scrollTop;
52947
52951
  });
@@ -52950,51 +52954,51 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
52950
52954
  setTimeout(() => {
52951
52955
  d();
52952
52956
  }, 0);
52953
- }, S = (A, h) => h.startsWith(A) && h.length > A.length, T = (A) => {
52957
+ }, S = (A, O) => O.startsWith(A) && O.length > A.length, T = (A) => {
52954
52958
  if (!p.value || !m.value) return;
52955
- const h = r.value, M = S(h, A);
52956
- if (i.value = M, !h || !M) {
52959
+ const O = r.value, M = S(O, A);
52960
+ if (i.value = M, !O || !M) {
52957
52961
  f(A);
52958
52962
  return;
52959
52963
  }
52960
52964
  if (c(A)) {
52961
- const k = p.value.render(A), z = u(k);
52965
+ const F = p.value.render(A), z = u(F);
52962
52966
  requestAnimationFrame(() => {
52963
52967
  m.value && (m.value.innerHTML = "", m.value.appendChild(z));
52964
52968
  }), r.value = A, g();
52965
52969
  return;
52966
52970
  }
52967
- const P = l(h);
52971
+ const P = l(O);
52968
52972
  if (P <= 0) {
52969
- const k = p.value.render(A);
52970
- _(m.value, k), r.value = A, g();
52973
+ const F = p.value.render(A);
52974
+ _(m.value, F), r.value = A, g();
52971
52975
  return;
52972
52976
  }
52973
- const G = h.slice(0, P), L = A.slice(0, Math.min(P, A.length));
52974
- if (G === L && A.length > P) {
52975
- const k = p.value.render(A);
52976
- _(m.value, k);
52977
+ const L = O.slice(0, P), w = A.slice(0, Math.min(P, A.length));
52978
+ if (L === w && A.length > P) {
52979
+ const F = p.value.render(A);
52980
+ _(m.value, F);
52977
52981
  } else {
52978
- const k = p.value.render(A);
52979
- _(m.value, k);
52982
+ const F = p.value.render(A);
52983
+ _(m.value, F);
52980
52984
  }
52981
52985
  r.value = A, s.value = p.value.render(A), g();
52982
52986
  }, f = (A) => {
52983
52987
  if (!p.value || !m.value) return;
52984
- const h = p.value.render(A), M = u(h);
52985
- m.value.innerHTML = "", m.value.appendChild(M), r.value = A, s.value = h, g();
52988
+ const O = p.value.render(A), M = u(O);
52989
+ m.value.innerHTML = "", m.value.appendChild(M), r.value = A, s.value = O, g();
52986
52990
  }, b = (A) => {
52987
52991
  if (a.value !== null && cancelAnimationFrame(a.value), n.incrementalDebounce <= 0) {
52988
52992
  if (n.incremental)
52989
52993
  try {
52990
- const h = performance.now();
52994
+ const O = performance.now();
52991
52995
  T(A);
52992
52996
  const M = performance.now();
52993
- console.log(`[kernelift](markdown) Incremental render took ${M - h} ms`);
52994
- } catch (h) {
52997
+ console.log(`[kernelift](markdown) Incremental render took ${M - O} ms`);
52998
+ } catch (O) {
52995
52999
  console.warn(
52996
53000
  "[kernelift](markdown) Incremental rendering failed, falling back to full render",
52997
- h
53001
+ O
52998
53002
  ), f(A);
52999
53003
  }
53000
53004
  else
@@ -53004,14 +53008,14 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
53004
53008
  a.value = requestAnimationFrame(() => {
53005
53009
  if (n.incremental)
53006
53010
  try {
53007
- const h = performance.now();
53011
+ const O = performance.now();
53008
53012
  T(A);
53009
53013
  const M = performance.now();
53010
- console.log(`[kernelift](markdown) Incremental render took ${M - h} ms`);
53011
- } catch (h) {
53014
+ console.log(`[kernelift](markdown) Incremental render took ${M - O} ms`);
53015
+ } catch (O) {
53012
53016
  console.warn(
53013
53017
  "[kernelift](markdown) Incremental rendering failed, falling back to full render",
53014
- h
53018
+ O
53015
53019
  ), f(A);
53016
53020
  }
53017
53021
  else
@@ -53019,20 +53023,24 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
53019
53023
  a.value = null;
53020
53024
  });
53021
53025
  }, C = (A) => {
53022
- const h = A.target?.closest(".expand-btn");
53023
- if (!h) return;
53024
- const M = h.closest(".code-block-wrapper");
53026
+ const O = A.target?.closest(".expand-btn");
53027
+ if (!O) return;
53028
+ const M = O.closest(".code-block-wrapper");
53025
53029
  if (!M) return;
53026
- h.dataset.expanded === "true" ? (M.classList.add("code-block--collapsed"), h.dataset.expanded = "false", h.textContent = n.expandText) : (M.classList.remove("code-block--collapsed"), h.dataset.expanded = "true", h.textContent = n.collapseText);
53030
+ const P = O.dataset.expanded === "true", L = O.querySelector(".expand-icon");
53031
+ P ? (M.classList.add("code-block--collapsed"), O.dataset.expanded = "false", O.title = n.expandText, L && (L.classList.remove("material-symbols--expand-less"), L.classList.add("material-symbols--expand-more"))) : (M.classList.remove("code-block--collapsed"), O.dataset.expanded = "true", O.title = n.collapseText, L && (L.classList.remove("material-symbols--expand-more"), L.classList.add("material-symbols--expand-less")));
53027
53032
  }, N = (A) => {
53028
- const h = A.target?.closest(".copy-btn");
53029
- if (!h) return;
53030
- const P = h.closest(".code-block-wrapper")?.querySelector(".code-content__code")?.innerText;
53033
+ const O = A.target?.closest(".copy-btn");
53034
+ if (!O) return;
53035
+ const P = O.closest(".code-block-wrapper")?.querySelector(".code-content__code")?.innerText;
53031
53036
  if (!P) {
53032
53037
  console.error("[kernelift/markdown-render] Failed to copy code");
53033
53038
  return;
53034
53039
  }
53035
- if (typeof n.onCopy == "function") {
53040
+ const L = O.querySelector(".copy-icon");
53041
+ if (L && (L.classList.remove("material-symbols--content-copy"), L.classList.add("material-symbols--check"), O.classList.add("copied"), O.title = "Copied!"), setTimeout(() => {
53042
+ L && (L.classList.remove("material-symbols--check"), L.classList.add("material-symbols--content-copy"), O.classList.remove("copied"), O.title = n.copyText);
53043
+ }, 2e3), typeof n.onCopy == "function") {
53036
53044
  n.onCopy(P || "");
53037
53045
  return;
53038
53046
  } else
@@ -53042,8 +53050,8 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
53042
53050
  console.error("[kernelift/markdown-render] Failed to copy code");
53043
53051
  });
53044
53052
  };
53045
- J_([() => o.value, () => p.value], ([A, h]) => {
53046
- h && m.value && b(A || "");
53053
+ J_([() => o.value, () => p.value], ([A, O]) => {
53054
+ O && m.value && b(A || "");
53047
53055
  });
53048
53056
  const R = (A) => {
53049
53057
  p.value && A(p.value);
@@ -53061,13 +53069,13 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
53061
53069
  resetRenderState: v,
53062
53070
  isStreaming: i
53063
53071
  });
53064
- const F = (/* @__PURE__ */ new Date()).getTime();
53065
- return (A, h) => (td(), ed("article", {
53072
+ const U = (/* @__PURE__ */ new Date()).getTime();
53073
+ return (A, O) => (td(), ed("article", {
53066
53074
  class: "kernelift-md-render",
53067
53075
  "data-theme": e.themeMode
53068
53076
  }, [
53069
53077
  nd("div", {
53070
- id: `kernelift-md-render__container-${rd(F)}`,
53078
+ id: `kernelift-md-render__container-${rd(U)}`,
53071
53079
  class: "kernelift-md-render__container",
53072
53080
  ref_key: "containerRef",
53073
53081
  ref: m
@@ -53079,7 +53087,7 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
53079
53087
  for (const [r, a] of t)
53080
53088
  n[r] = a;
53081
53089
  return n;
53082
- }, nR = /* @__PURE__ */ eR(jT, [["__scopeId", "data-v-8178b58e"]]);
53090
+ }, nR = /* @__PURE__ */ eR(jT, [["__scopeId", "data-v-3441a21c"]]);
53083
53091
  export {
53084
53092
  nR as MdRender
53085
53093
  };