@pagelines/sdk 1.0.392 → 1.0.393

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.
@@ -1,22 +1,22 @@
1
- var _n = Object.defineProperty;
2
- var ws = (l, t, e) => t in l ? _n(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
- var u = (l, t) => _n(l, "name", { value: t, configurable: !0 });
4
- var D = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as _e, openBlock as y, createElementBlock as T, createElementVNode as v, normalizeClass as A, ref as Q, watch as Qe, computed as W, createCommentVNode as H, renderSlot as qn, onMounted as Zt, Fragment as Se, renderList as dt, withDirectives as Vn, vModelText as Yn, unref as jt, toDisplayString as ce, nextTick as Nt, createVNode as $t, createTextVNode as vs, normalizeStyle as ys, shallowRef as Ts } from "vue";
6
- import { SettingsObject as Ss, Agent as xt, getDefaultAvatarUrl as Zn, createLogger as As } from "@pagelines/core";
7
- import { P as Es } from "./sdkClient.js";
8
- const _s = { class: "spinner max-w-sm" }, Rs = {
1
+ var Rn = Object.defineProperty;
2
+ var bs = (l, t, e) => t in l ? Rn(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var u = (l, t) => Rn(l, "name", { value: t, configurable: !0 });
4
+ var D = (l, t, e) => bs(l, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as _e, openBlock as y, createElementBlock as T, createElementVNode as v, normalizeClass as A, ref as Q, watch as Je, computed as W, createCommentVNode as H, renderSlot as Vn, onMounted as Xt, Fragment as Se, renderList as gt, withDirectives as Yn, vModelText as Zn, unref as qt, toDisplayString as ce, nextTick as $t, createVNode as Ut, createTextVNode as ws, normalizeStyle as vs, shallowRef as ys } from "vue";
6
+ import { SettingsObject as Ts, Agent as kt, getDefaultAvatarUrl as Xn, createLogger as Ss } from "@pagelines/core";
7
+ import { P as As } from "./sdkClient.js";
8
+ const Es = { class: "spinner max-w-sm" }, _s = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
- }, Rn = /* @__PURE__ */ _e({
11
+ }, Dn = /* @__PURE__ */ _e({
12
12
  __name: "FSpinner",
13
13
  props: {
14
14
  width: { type: String, default: "" },
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(l) {
18
- return (t, e) => (y(), T("div", _s, [
19
- (y(), T("svg", Rs, [
18
+ return (t, e) => (y(), T("div", Es, [
19
+ (y(), T("svg", _s, [
20
20
  v("circle", {
21
21
  class: A([l.colorMode, "ring-path"]),
22
22
  cx: "50",
@@ -30,10 +30,10 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
30
30
  ]))
31
31
  ]));
32
32
  }
33
- }), Ds = [
33
+ }), Rs = [
34
34
  { pattern: /\bNO_REP\w*\b/g, label: "NO_REPLY — bot chose not to respond" },
35
35
  { pattern: /\bHEARTBEAT_OK\b/g, label: "HEARTBEAT_OK — scheduled check, nothing to do" }
36
- ], Cs = 9e4, an = class an extends Ss {
36
+ ], Ds = 9e4, ln = class ln extends Ts {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
39
  D(this, "isTextMode", !1);
@@ -50,7 +50,7 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
50
50
  D(this, "agentMode", Q("self"));
51
51
  D(this, "sharedMessages", Q([]));
52
52
  D(this, "_agent");
53
- this._agent = e.agent instanceof xt ? e.agent : new xt({ config: e.agent }), this.setupModeWatcher();
53
+ this._agent = e.agent instanceof kt ? e.agent : new kt({ config: e.agent }), this.setupModeWatcher();
54
54
  }
55
55
  get chatEnabled() {
56
56
  return this._agent.chatAvailable.value;
@@ -103,7 +103,7 @@ Current User:
103
103
  });
104
104
  }
105
105
  setupModeWatcher() {
106
- Qe(this.agentMode, async (e, n) => {
106
+ Je(this.agentMode, async (e, n) => {
107
107
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
108
108
  });
109
109
  }
@@ -176,7 +176,7 @@ Current User:
176
176
  const m = this.sharedMessages.value, w = m[m.length - 1];
177
177
  if (w?.id === a && w.text) {
178
178
  let S = w.text;
179
- for (const O of Ds)
179
+ for (const O of Rs)
180
180
  O.pattern.test(S) && (console.debug(`[chat] filtered directive: ${O.label}`), S = S.replace(O.pattern, "").trim(), O.pattern.lastIndex = 0);
181
181
  S ? S !== w.text && (w.text = S, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
182
182
  }
@@ -214,7 +214,7 @@ Current User:
214
214
  });
215
215
  await Promise.race([
216
216
  g,
217
- new Promise((m, w) => setTimeout(() => w(new Error("timed out")), Cs))
217
+ new Promise((m, w) => setTimeout(() => w(new Error("timed out")), Ds))
218
218
  ]);
219
219
  } catch (g) {
220
220
  d(g.message || "Something went wrong");
@@ -237,30 +237,30 @@ Current User:
237
237
  await this.endConversation();
238
238
  }
239
239
  };
240
- u(an, "AgentChatController");
241
- let Dn = an;
242
- function Cn(l) {
240
+ u(ln, "AgentChatController");
241
+ let Cn = ln;
242
+ function In(l) {
243
243
  return l ? typeof l == "string" ? l : l.src || "" : "";
244
244
  }
245
- u(Cn, "getImageSrc");
246
- function Ci(l) {
247
- return Cn(l.cover) || Cn(l.avatar) || Zn(l.name);
245
+ u(In, "getImageSrc");
246
+ function _i(l) {
247
+ return In(l.cover) || In(l.avatar) || Xn(l.name);
248
248
  }
249
- u(Ci, "getAgentAvatarUrl");
250
- function In(l) {
249
+ u(_i, "getAgentAvatarUrl");
250
+ function Mn(l) {
251
251
  const t = l.target;
252
- t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Zn());
252
+ t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Xn());
253
253
  }
254
- u(In, "handleImageError");
255
- function Ii(l) {
254
+ u(Mn, "handleImageError");
255
+ function Ri(l) {
256
256
  const { template: t, agent: e } = l;
257
257
  return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
258
258
  }
259
- u(Ii, "parseButtonTemplate");
260
- const Is = {
259
+ u(Ri, "parseButtonTemplate");
260
+ const Cs = {
261
261
  key: 0,
262
262
  class: "absolute inset-0 flex items-center justify-center"
263
- }, Mi = /* @__PURE__ */ _e({
263
+ }, Di = /* @__PURE__ */ _e({
264
264
  __name: "ElAgentButton",
265
265
  props: {
266
266
  theme: { default: "primary" },
@@ -287,7 +287,7 @@ const Is = {
287
287
  return (s, r) => (y(), T("button", {
288
288
  class: A(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
289
289
  }, [
290
- l.loading ? (y(), T("div", Is, [...r[0] || (r[0] = [
290
+ l.loading ? (y(), T("div", Cs, [...r[0] || (r[0] = [
291
291
  v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
292
292
  ])])) : H("", !0),
293
293
  v("span", {
@@ -297,7 +297,7 @@ const Is = {
297
297
  key: 0,
298
298
  class: A([l.icon, n.value])
299
299
  }, null, 2)) : H("", !0),
300
- qn(s.$slots, "default"),
300
+ Vn(s.$slots, "default"),
301
301
  l.iconAfter ? (y(), T("i", {
302
302
  key: 1,
303
303
  class: A([l.iconAfter, n.value])
@@ -305,7 +305,7 @@ const Is = {
305
305
  ], 2)
306
306
  ], 2));
307
307
  }
308
- }), Ms = ["value"], Li = /* @__PURE__ */ _e({
308
+ }), Is = ["value"], Ci = /* @__PURE__ */ _e({
309
309
  __name: "AgentInputEmail",
310
310
  props: {
311
311
  modelValue: { default: "" }
@@ -321,9 +321,9 @@ const Is = {
321
321
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-all",
322
322
  style: { "font-size": "16px" },
323
323
  onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
324
- }, null, 40, Ms));
324
+ }, null, 40, Is));
325
325
  }
326
- }), Ls = { class: "flex gap-1.5 justify-center" }, zs = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], zi = /* @__PURE__ */ _e({
326
+ }), Ms = { class: "flex gap-1.5 justify-center" }, Ls = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Ii = /* @__PURE__ */ _e({
327
327
  __name: "AgentInputOneTimeCode",
328
328
  props: {
329
329
  modelValue: {},
@@ -333,11 +333,11 @@ const Is = {
333
333
  emits: ["update:modelValue", "autoSubmit"],
334
334
  setup(l, { emit: t }) {
335
335
  const e = l, n = t, s = Q([]), r = Q(Array.from({ length: e.length }).fill("")), a = Q(!1);
336
- Zt(() => {
336
+ Xt(() => {
337
337
  e.modelValue && (r.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && s.value[0]?.focus();
338
- }), Qe(() => e.modelValue, (p) => {
338
+ }), Je(() => e.modelValue, (p) => {
339
339
  r.value = p ? p.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
340
- }), Qe(r, () => {
340
+ }), Je(r, () => {
341
341
  const p = r.value.filter(Boolean).join("");
342
342
  n("update:modelValue", p), p.length === e.length && n("autoSubmit", p);
343
343
  }, { deep: !0 });
@@ -374,8 +374,8 @@ const Is = {
374
374
  for (let g = p; g < e.length; g++)
375
375
  r.value[g] = "";
376
376
  }
377
- return u(d, "onFocus"), (p, g) => (y(), T("div", Ls, [
378
- (y(!0), T(Se, null, dt(l.length, (m) => Vn((y(), T("input", {
377
+ return u(d, "onFocus"), (p, g) => (y(), T("div", Ms, [
378
+ (y(!0), T(Se, null, gt(l.length, (m) => Yn((y(), T("input", {
379
379
  key: m,
380
380
  ref_for: !0,
381
381
  ref: /* @__PURE__ */ u((w) => s.value[m - 1] = w, "ref"),
@@ -390,15 +390,15 @@ const Is = {
390
390
  onKeydown: /* @__PURE__ */ u((w) => f(m - 1, w), "onKeydown"),
391
391
  onPaste: /* @__PURE__ */ u((w) => o(m - 1, w), "onPaste"),
392
392
  onFocus: /* @__PURE__ */ u((w) => d(m - 1), "onFocus")
393
- }, null, 40, zs)), [
394
- [Yn, r.value[m - 1]]
393
+ }, null, 40, Ls)), [
394
+ [Zn, r.value[m - 1]]
395
395
  ])), 128))
396
396
  ]));
397
397
  }
398
- }), Os = { class: "relative flex-shrink-0" }, Ps = ["src", "alt"], Ns = { class: "absolute top-1 right-1" }, $s = {
398
+ }), zs = { class: "relative flex-shrink-0" }, Os = ["src", "alt"], Ns = { class: "absolute top-1 right-1" }, Ps = {
399
399
  key: 1,
400
400
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
401
- }, Us = { class: "min-w-0" }, Bs = /* @__PURE__ */ _e({
401
+ }, $s = { class: "min-w-0" }, Us = /* @__PURE__ */ _e({
402
402
  __name: "ElModeHeader",
403
403
  props: {
404
404
  agent: {},
@@ -412,7 +412,7 @@ const Is = {
412
412
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
413
413
  ]])
414
414
  }, [
415
- v("div", Os, [
415
+ v("div", zs, [
416
416
  v("div", {
417
417
  class: A(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
418
418
  }, [
@@ -421,8 +421,8 @@ const Is = {
421
421
  alt: l.agent.displayName.value,
422
422
  class: "w-full h-full object-cover",
423
423
  onError: e[0] || (e[0] = //@ts-ignore
424
- (...n) => jt(In) && jt(In)(...n))
425
- }, null, 40, Ps)
424
+ (...n) => qt(Mn) && qt(Mn)(...n))
425
+ }, null, 40, Os)
426
426
  ], 2),
427
427
  v("div", Ns, [
428
428
  l.isOnline ? (y(), T(Se, { key: 0 }, [
@@ -431,10 +431,10 @@ const Is = {
431
431
  style: { "animation-duration": "3s" }
432
432
  }, null, -1)),
433
433
  e[2] || (e[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
434
- ], 64)) : (y(), T("div", $s))
434
+ ], 64)) : (y(), T("div", Ps))
435
435
  ])
436
436
  ]),
437
- v("div", Us, [
437
+ v("div", $s, [
438
438
  v("h1", {
439
439
  class: A(["font-light text-white mb-1 truncate", [
440
440
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
@@ -452,19 +452,19 @@ const Is = {
452
452
  }
453
453
  });
454
454
  const {
455
- entries: Xn,
456
- setPrototypeOf: Mn,
457
- isFrozen: Fs,
458
- getPrototypeOf: Hs,
459
- getOwnPropertyDescriptor: Gs
455
+ entries: Kn,
456
+ setPrototypeOf: Ln,
457
+ isFrozen: Bs,
458
+ getPrototypeOf: Fs,
459
+ getOwnPropertyDescriptor: Hs
460
460
  } = Object;
461
461
  let {
462
462
  freeze: Z,
463
463
  seal: ee,
464
- create: gt
464
+ create: mt
465
465
  } = Object, {
466
- apply: qt,
467
- construct: Vt
466
+ apply: Vt,
467
+ construct: Yt
468
468
  } = typeof Reflect < "u" && Reflect;
469
469
  Z || (Z = /* @__PURE__ */ u(function(t) {
470
470
  return t;
@@ -472,109 +472,109 @@ Z || (Z = /* @__PURE__ */ u(function(t) {
472
472
  ee || (ee = /* @__PURE__ */ u(function(t) {
473
473
  return t;
474
474
  }, "seal"));
475
- qt || (qt = /* @__PURE__ */ u(function(t, e) {
475
+ Vt || (Vt = /* @__PURE__ */ u(function(t, e) {
476
476
  for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), r = 2; r < n; r++)
477
477
  s[r - 2] = arguments[r];
478
478
  return t.apply(e, s);
479
479
  }, "apply"));
480
- Vt || (Vt = /* @__PURE__ */ u(function(t) {
480
+ Yt || (Yt = /* @__PURE__ */ u(function(t) {
481
481
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
482
482
  n[s - 1] = arguments[s];
483
483
  return new t(...n);
484
484
  }, "construct"));
485
- const ht = X(Array.prototype.forEach), Ws = X(Array.prototype.lastIndexOf), Ln = X(Array.prototype.pop), We = X(Array.prototype.push), js = X(Array.prototype.splice), mt = X(String.prototype.toLowerCase), Ut = X(String.prototype.toString), Bt = X(String.prototype.match), je = X(String.prototype.replace), qs = X(String.prototype.indexOf), Vs = X(String.prototype.trim), J = X(Object.prototype.hasOwnProperty), V = X(RegExp.prototype.test), qe = Ys(TypeError);
485
+ const pt = X(Array.prototype.forEach), Gs = X(Array.prototype.lastIndexOf), zn = X(Array.prototype.pop), je = X(Array.prototype.push), Ws = X(Array.prototype.splice), xt = X(String.prototype.toLowerCase), Bt = X(String.prototype.toString), Ft = X(String.prototype.match), qe = X(String.prototype.replace), js = X(String.prototype.indexOf), qs = X(String.prototype.trim), J = X(Object.prototype.hasOwnProperty), V = X(RegExp.prototype.test), Ve = Vs(TypeError);
486
486
  function X(l) {
487
487
  return function(t) {
488
488
  t instanceof RegExp && (t.lastIndex = 0);
489
489
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), s = 1; s < e; s++)
490
490
  n[s - 1] = arguments[s];
491
- return qt(l, t, n);
491
+ return Vt(l, t, n);
492
492
  };
493
493
  }
494
494
  u(X, "unapply");
495
- function Ys(l) {
495
+ function Vs(l) {
496
496
  return function() {
497
497
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
498
498
  e[n] = arguments[n];
499
- return Vt(l, e);
499
+ return Yt(l, e);
500
500
  };
501
501
  }
502
- u(Ys, "unconstruct");
502
+ u(Vs, "unconstruct");
503
503
  function R(l, t) {
504
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mt;
505
- Mn && Mn(l, null);
504
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : xt;
505
+ Ln && Ln(l, null);
506
506
  let n = t.length;
507
507
  for (; n--; ) {
508
508
  let s = t[n];
509
509
  if (typeof s == "string") {
510
510
  const r = e(s);
511
- r !== s && (Fs(t) || (t[n] = r), s = r);
511
+ r !== s && (Bs(t) || (t[n] = r), s = r);
512
512
  }
513
513
  l[s] = !0;
514
514
  }
515
515
  return l;
516
516
  }
517
517
  u(R, "addToSet");
518
- function Zs(l) {
518
+ function Ys(l) {
519
519
  for (let t = 0; t < l.length; t++)
520
520
  J(l, t) || (l[t] = null);
521
521
  return l;
522
522
  }
523
- u(Zs, "cleanArray");
523
+ u(Ys, "cleanArray");
524
524
  function le(l) {
525
- const t = gt(null);
526
- for (const [e, n] of Xn(l))
527
- J(l, e) && (Array.isArray(n) ? t[e] = Zs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
525
+ const t = mt(null);
526
+ for (const [e, n] of Kn(l))
527
+ J(l, e) && (Array.isArray(n) ? t[e] = Ys(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
528
528
  return t;
529
529
  }
530
530
  u(le, "clone");
531
- function Ve(l, t) {
531
+ function Ye(l, t) {
532
532
  for (; l !== null; ) {
533
- const n = Gs(l, t);
533
+ const n = Hs(l, t);
534
534
  if (n) {
535
535
  if (n.get)
536
536
  return X(n.get);
537
537
  if (typeof n.value == "function")
538
538
  return X(n.value);
539
539
  }
540
- l = Hs(l);
540
+ l = Fs(l);
541
541
  }
542
542
  function e() {
543
543
  return null;
544
544
  }
545
545
  return u(e, "fallbackValue"), e;
546
546
  }
547
- u(Ve, "lookupGetter");
548
- const zn = Z(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ft = Z(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ht = Z(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Xs = Z(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Gt = Z(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ks = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), Pn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Wt = Z(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Nn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), pt = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Qs = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Js = ee(/<%[\w\W]*|[\w\W]*%>/gm), er = ee(/\$\{[\w\W]*/gm), tr = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), nr = ee(/^aria-[\-\w]+$/), Kn = ee(
547
+ u(Ye, "lookupGetter");
548
+ const On = Z(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Ht = Z(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Gt = Z(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Zs = Z(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Wt = Z(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Xs = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Nn = Z(["#text"]), Pn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), jt = Z(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), $n = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), ft = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ks = ee(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = ee(/<%[\w\W]*|[\w\W]*%>/gm), Js = ee(/\$\{[\w\W]*/gm), er = ee(/^data-[\-\w.\u00B7-\uFFFF]+$/), tr = ee(/^aria-[\-\w]+$/), Qn = ee(
549
549
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
550
550
  // eslint-disable-line no-useless-escape
551
- ), sr = ee(/^(?:\w+script|data):/i), rr = ee(
551
+ ), nr = ee(/^(?:\w+script|data):/i), sr = ee(
552
552
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
553
553
  // eslint-disable-line no-control-regex
554
- ), Qn = ee(/^html$/i), ir = ee(/^[a-z][.\w]*(-[.\w]+)+$/i);
555
- var $n = /* @__PURE__ */ Object.freeze({
554
+ ), Jn = ee(/^html$/i), rr = ee(/^[a-z][.\w]*(-[.\w]+)+$/i);
555
+ var Un = /* @__PURE__ */ Object.freeze({
556
556
  __proto__: null,
557
- ARIA_ATTR: nr,
558
- ATTR_WHITESPACE: rr,
559
- CUSTOM_ELEMENT: ir,
560
- DATA_ATTR: tr,
561
- DOCTYPE_NAME: Qn,
562
- ERB_EXPR: Js,
563
- IS_ALLOWED_URI: Kn,
564
- IS_SCRIPT_OR_DATA: sr,
565
- MUSTACHE_EXPR: Qs,
566
- TMPLIT_EXPR: er
557
+ ARIA_ATTR: tr,
558
+ ATTR_WHITESPACE: sr,
559
+ CUSTOM_ELEMENT: rr,
560
+ DATA_ATTR: er,
561
+ DOCTYPE_NAME: Jn,
562
+ ERB_EXPR: Qs,
563
+ IS_ALLOWED_URI: Qn,
564
+ IS_SCRIPT_OR_DATA: nr,
565
+ MUSTACHE_EXPR: Ks,
566
+ TMPLIT_EXPR: Js
567
567
  });
568
- const Ye = {
568
+ const Ze = {
569
569
  element: 1,
570
570
  text: 3,
571
571
  // Deprecated
572
572
  progressingInstruction: 7,
573
573
  comment: 8,
574
574
  document: 9
575
- }, ar = /* @__PURE__ */ u(function() {
575
+ }, ir = /* @__PURE__ */ u(function() {
576
576
  return typeof window > "u" ? null : window;
577
- }, "getGlobal"), lr = /* @__PURE__ */ u(function(t, e) {
577
+ }, "getGlobal"), ar = /* @__PURE__ */ u(function(t, e) {
578
578
  if (typeof t != "object" || typeof t.createPolicy != "function")
579
579
  return null;
580
580
  let n = null;
@@ -593,7 +593,7 @@ const Ye = {
593
593
  } catch {
594
594
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
595
595
  }
596
- }, "_createTrustedTypesPolicy"), Un = /* @__PURE__ */ u(function() {
596
+ }, "_createTrustedTypesPolicy"), Bn = /* @__PURE__ */ u(function() {
597
597
  return {
598
598
  afterSanitizeAttributes: [],
599
599
  afterSanitizeElements: [],
@@ -606,10 +606,10 @@ const Ye = {
606
606
  uponSanitizeShadowNode: []
607
607
  };
608
608
  }, "_createHooksMap");
609
- function Jn() {
610
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ar();
611
- const t = /* @__PURE__ */ u((k) => Jn(k), "DOMPurify");
612
- if (t.version = "3.3.3", t.removed = [], !l || !l.document || l.document.nodeType !== Ye.document || !l.Element)
609
+ function es() {
610
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ir();
611
+ const t = /* @__PURE__ */ u((k) => es(k), "DOMPurify");
612
+ if (t.version = "3.3.3", t.removed = [], !l || !l.document || l.document.nodeType !== Ze.document || !l.Element)
613
613
  return t.isSupported = !1, t;
614
614
  let {
615
615
  document: e
@@ -624,7 +624,7 @@ function Jn() {
624
624
  HTMLFormElement: p,
625
625
  DOMParser: g,
626
626
  trustedTypes: m
627
- } = l, w = c.prototype, S = Ve(w, "cloneNode"), O = Ve(w, "remove"), me = Ve(w, "nextSibling"), xe = Ve(w, "childNodes"), te = Ve(w, "parentNode");
627
+ } = l, w = c.prototype, S = Ye(w, "cloneNode"), O = Ye(w, "remove"), me = Ye(w, "nextSibling"), xe = Ye(w, "childNodes"), te = Ye(w, "parentNode");
628
628
  if (typeof a == "function") {
629
629
  const k = e.createElement("template");
630
630
  k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
@@ -633,30 +633,30 @@ function Jn() {
633
633
  const {
634
634
  implementation: ne,
635
635
  createNodeIterator: ue,
636
- createDocumentFragment: et,
637
- getElementsByTagName: tt
636
+ createDocumentFragment: tt,
637
+ getElementsByTagName: nt
638
638
  } = e, {
639
- importNode: Tt
639
+ importNode: St
640
640
  } = n;
641
- let F = Un();
642
- t.isSupported = typeof Xn == "function" && typeof te == "function" && ne && ne.createHTMLDocument !== void 0;
641
+ let F = Bn();
642
+ t.isSupported = typeof Kn == "function" && typeof te == "function" && ne && ne.createHTMLDocument !== void 0;
643
643
  const {
644
- MUSTACHE_EXPR: Ue,
644
+ MUSTACHE_EXPR: Be,
645
645
  ERB_EXPR: L,
646
- TMPLIT_EXPR: Be,
647
- DATA_ATTR: St,
648
- ARIA_ATTR: At,
649
- IS_SCRIPT_OR_DATA: nt,
650
- ATTR_WHITESPACE: Fe,
646
+ TMPLIT_EXPR: Fe,
647
+ DATA_ATTR: At,
648
+ ARIA_ATTR: Et,
649
+ IS_SCRIPT_OR_DATA: st,
650
+ ATTR_WHITESPACE: He,
651
651
  CUSTOM_ELEMENT: E
652
- } = $n;
652
+ } = Un;
653
653
  let {
654
654
  IS_ALLOWED_URI: _
655
- } = $n, b = null;
656
- const z = R({}, [...zn, ...Ft, ...Ht, ...Gt, ...On]);
655
+ } = Un, b = null;
656
+ const z = R({}, [...On, ...Ht, ...Gt, ...Wt, ...Nn]);
657
657
  let I = null;
658
- const he = R({}, [...Pn, ...Wt, ...Nn, ...pt]);
659
- let P = Object.seal(gt(null, {
658
+ const he = R({}, [...Pn, ...jt, ...$n, ...ft]);
659
+ let N = Object.seal(mt(null, {
660
660
  tagNameCheck: {
661
661
  writable: !0,
662
662
  configurable: !1,
@@ -675,8 +675,8 @@ function Jn() {
675
675
  enumerable: !0,
676
676
  value: !1
677
677
  }
678
- })), pe = null, st = null;
679
- const ke = Object.seal(gt(null, {
678
+ })), pe = null, rt = null;
679
+ const ke = Object.seal(mt(null, {
680
680
  tagCheck: {
681
681
  writable: !0,
682
682
  configurable: !1,
@@ -690,47 +690,47 @@ function Jn() {
690
690
  value: null
691
691
  }
692
692
  }));
693
- let ln = !0, Et = !0, on = !1, cn = !0, De = !1, rt = !0, ye = !1, _t = !1, Rt = !1, Ce = !1, it = !1, at = !1, un = !0, hn = !1;
694
- const ps = "user-content-";
695
- let Dt = !0, He = !1, Ie = {}, ie = null;
696
- const Ct = R({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
697
- let pn = null;
698
- const fn = R({}, ["audio", "video", "img", "source", "image", "track"]);
699
- let It = null;
700
- const dn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), lt = "http://www.w3.org/1998/Math/MathML", ot = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
701
- let Me = fe, Mt = !1, Lt = null;
702
- const fs = R({}, [lt, ot, fe], Ut);
703
- let ct = R({}, ["mi", "mo", "mn", "ms", "mtext"]), ut = R({}, ["annotation-xml"]);
704
- const ds = R({}, ["title", "style", "font", "a", "script"]);
705
- let Ge = null;
706
- const gs = ["application/xhtml+xml", "text/html"], ms = "text/html";
693
+ let on = !0, _t = !0, cn = !1, un = !0, De = !1, it = !0, ye = !1, Rt = !1, Dt = !1, Ce = !1, at = !1, lt = !1, hn = !0, pn = !1;
694
+ const hs = "user-content-";
695
+ let Ct = !0, Ge = !1, Ie = {}, ie = null;
696
+ const It = R({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
697
+ let fn = null;
698
+ const dn = R({}, ["audio", "video", "img", "source", "image", "track"]);
699
+ let Mt = null;
700
+ const gn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ot = "http://www.w3.org/1998/Math/MathML", ct = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
701
+ let Me = fe, Lt = !1, zt = null;
702
+ const ps = R({}, [ot, ct, fe], Bt);
703
+ let ut = R({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = R({}, ["annotation-xml"]);
704
+ const fs = R({}, ["title", "style", "font", "a", "script"]);
705
+ let We = null;
706
+ const ds = ["application/xhtml+xml", "text/html"], gs = "text/html";
707
707
  let B = null, Le = null;
708
- const xs = e.createElement("form"), gn = /* @__PURE__ */ u(function(i) {
708
+ const ms = e.createElement("form"), mn = /* @__PURE__ */ u(function(i) {
709
709
  return i instanceof RegExp || i instanceof Function;
710
- }, "isRegexOrFunction"), zt = /* @__PURE__ */ u(function() {
710
+ }, "isRegexOrFunction"), Ot = /* @__PURE__ */ u(function() {
711
711
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
712
712
  if (!(Le && Le === i)) {
713
- if ((!i || typeof i != "object") && (i = {}), i = le(i), Ge = // eslint-disable-next-line unicorn/prefer-includes
714
- gs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? ms : i.PARSER_MEDIA_TYPE, B = Ge === "application/xhtml+xml" ? Ut : mt, b = J(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : z, I = J(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : he, Lt = J(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Ut) : fs, It = J(i, "ADD_URI_SAFE_ATTR") ? R(le(dn), i.ADD_URI_SAFE_ATTR, B) : dn, pn = J(i, "ADD_DATA_URI_TAGS") ? R(le(fn), i.ADD_DATA_URI_TAGS, B) : fn, ie = J(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : Ct, pe = J(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : le({}), st = J(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : le({}), Ie = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, ln = i.ALLOW_ARIA_ATTR !== !1, Et = i.ALLOW_DATA_ATTR !== !1, on = i.ALLOW_UNKNOWN_PROTOCOLS || !1, cn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = i.SAFE_FOR_TEMPLATES || !1, rt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, it = i.RETURN_DOM_FRAGMENT || !1, at = i.RETURN_TRUSTED_TYPE || !1, Rt = i.FORCE_BODY || !1, un = i.SANITIZE_DOM !== !1, hn = i.SANITIZE_NAMED_PROPS || !1, Dt = i.KEEP_CONTENT !== !1, He = i.IN_PLACE || !1, _ = i.ALLOWED_URI_REGEXP || Kn, Me = i.NAMESPACE || fe, ct = i.MATHML_TEXT_INTEGRATION_POINTS || ct, ut = i.HTML_INTEGRATION_POINTS || ut, P = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (P.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && gn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (P.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (P.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), De && (Et = !1), it && (Ce = !0), Ie && (b = R({}, On), I = gt(null), Ie.html === !0 && (R(b, zn), R(I, Pn)), Ie.svg === !0 && (R(b, Ft), R(I, Wt), R(I, pt)), Ie.svgFilters === !0 && (R(b, Ht), R(I, Wt), R(I, pt)), Ie.mathMl === !0 && (R(b, Gt), R(I, Nn), R(I, pt))), J(i, "ADD_TAGS") || (ke.tagCheck = null), J(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (b === z && (b = le(b)), R(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (I === he && (I = le(I)), R(I, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(It, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), R(ie, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ie === Ct && (ie = le(ie)), R(ie, i.ADD_FORBID_CONTENTS, B)), Dt && (b["#text"] = !0), ye && R(b, ["html", "head", "body"]), b.table && (R(b, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
713
+ if ((!i || typeof i != "object") && (i = {}), i = le(i), We = // eslint-disable-next-line unicorn/prefer-includes
714
+ ds.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? gs : i.PARSER_MEDIA_TYPE, B = We === "application/xhtml+xml" ? Bt : xt, b = J(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : z, I = J(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : he, zt = J(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Bt) : ps, Mt = J(i, "ADD_URI_SAFE_ATTR") ? R(le(gn), i.ADD_URI_SAFE_ATTR, B) : gn, fn = J(i, "ADD_DATA_URI_TAGS") ? R(le(dn), i.ADD_DATA_URI_TAGS, B) : dn, ie = J(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : It, pe = J(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : le({}), rt = J(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : le({}), Ie = J(i, "USE_PROFILES") ? i.USE_PROFILES : !1, on = i.ALLOW_ARIA_ATTR !== !1, _t = i.ALLOW_DATA_ATTR !== !1, cn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, un = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = i.SAFE_FOR_TEMPLATES || !1, it = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, at = i.RETURN_DOM_FRAGMENT || !1, lt = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, hn = i.SANITIZE_DOM !== !1, pn = i.SANITIZE_NAMED_PROPS || !1, Ct = i.KEEP_CONTENT !== !1, Ge = i.IN_PLACE || !1, _ = i.ALLOWED_URI_REGEXP || Qn, Me = i.NAMESPACE || fe, ut = i.MATHML_TEXT_INTEGRATION_POINTS || ut, ht = i.HTML_INTEGRATION_POINTS || ht, N = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && mn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (N.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && mn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (N.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), De && (_t = !1), at && (Ce = !0), Ie && (b = R({}, Nn), I = mt(null), Ie.html === !0 && (R(b, On), R(I, Pn)), Ie.svg === !0 && (R(b, Ht), R(I, jt), R(I, ft)), Ie.svgFilters === !0 && (R(b, Gt), R(I, jt), R(I, ft)), Ie.mathMl === !0 && (R(b, Wt), R(I, $n), R(I, ft))), J(i, "ADD_TAGS") || (ke.tagCheck = null), J(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (b === z && (b = le(b)), R(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (I === he && (I = le(I)), R(I, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(Mt, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ie === It && (ie = le(ie)), R(ie, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ie === It && (ie = le(ie)), R(ie, i.ADD_FORBID_CONTENTS, B)), Ct && (b["#text"] = !0), ye && R(b, ["html", "head", "body"]), b.table && (R(b, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
715
715
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
716
- throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
716
+ throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
717
717
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
718
- throw qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
718
+ throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
719
719
  U = i.TRUSTED_TYPES_POLICY, q = U.createHTML("");
720
720
  } else
721
- U === void 0 && (U = lr(m, s)), U !== null && typeof q == "string" && (q = U.createHTML(""));
721
+ U === void 0 && (U = ar(m, s)), U !== null && typeof q == "string" && (q = U.createHTML(""));
722
722
  Z && Z(i), Le = i;
723
723
  }
724
- }, "_parseConfig"), mn = R({}, [...Ft, ...Ht, ...Xs]), xn = R({}, [...Gt, ...Ks]), ks = /* @__PURE__ */ u(function(i) {
724
+ }, "_parseConfig"), xn = R({}, [...Ht, ...Gt, ...Zs]), kn = R({}, [...Wt, ...Xs]), xs = /* @__PURE__ */ u(function(i) {
725
725
  let h = te(i);
726
726
  (!h || !h.tagName) && (h = {
727
727
  namespaceURI: Me,
728
728
  tagName: "template"
729
729
  });
730
- const x = mt(i.tagName), N = mt(h.tagName);
731
- return Lt[i.namespaceURI] ? i.namespaceURI === ot ? h.namespaceURI === fe ? x === "svg" : h.namespaceURI === lt ? x === "svg" && (N === "annotation-xml" || ct[N]) : !!mn[x] : i.namespaceURI === lt ? h.namespaceURI === fe ? x === "math" : h.namespaceURI === ot ? x === "math" && ut[N] : !!xn[x] : i.namespaceURI === fe ? h.namespaceURI === ot && !ut[N] || h.namespaceURI === lt && !ct[N] ? !1 : !xn[x] && (ds[x] || !mn[x]) : !!(Ge === "application/xhtml+xml" && Lt[i.namespaceURI]) : !1;
730
+ const x = xt(i.tagName), P = xt(h.tagName);
731
+ return zt[i.namespaceURI] ? i.namespaceURI === ct ? h.namespaceURI === fe ? x === "svg" : h.namespaceURI === ot ? x === "svg" && (P === "annotation-xml" || ut[P]) : !!xn[x] : i.namespaceURI === ot ? h.namespaceURI === fe ? x === "math" : h.namespaceURI === ct ? x === "math" && ht[P] : !!kn[x] : i.namespaceURI === fe ? h.namespaceURI === ct && !ht[P] || h.namespaceURI === ot && !ut[P] ? !1 : !kn[x] && (fs[x] || !xn[x]) : !!(We === "application/xhtml+xml" && zt[i.namespaceURI]) : !1;
732
732
  }, "_checkValidNamespace"), ae = /* @__PURE__ */ u(function(i) {
733
- We(t.removed, {
733
+ je(t.removed, {
734
734
  element: i
735
735
  });
736
736
  try {
@@ -740,18 +740,18 @@ function Jn() {
740
740
  }
741
741
  }, "_forceRemove"), Te = /* @__PURE__ */ u(function(i, h) {
742
742
  try {
743
- We(t.removed, {
743
+ je(t.removed, {
744
744
  attribute: h.getAttributeNode(i),
745
745
  from: h
746
746
  });
747
747
  } catch {
748
- We(t.removed, {
748
+ je(t.removed, {
749
749
  attribute: null,
750
750
  from: h
751
751
  });
752
752
  }
753
753
  if (h.removeAttribute(i), i === "is")
754
- if (Ce || it)
754
+ if (Ce || at)
755
755
  try {
756
756
  ae(h);
757
757
  } catch {
@@ -761,31 +761,31 @@ function Jn() {
761
761
  h.setAttribute(i, "");
762
762
  } catch {
763
763
  }
764
- }, "_removeAttribute"), kn = /* @__PURE__ */ u(function(i) {
764
+ }, "_removeAttribute"), bn = /* @__PURE__ */ u(function(i) {
765
765
  let h = null, x = null;
766
- if (Rt)
766
+ if (Dt)
767
767
  i = "<remove></remove>" + i;
768
768
  else {
769
- const $ = Bt(i, /^[\r\n\t ]+/);
769
+ const $ = Ft(i, /^[\r\n\t ]+/);
770
770
  x = $ && $[0];
771
771
  }
772
- Ge === "application/xhtml+xml" && Me === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
773
- const N = U ? U.createHTML(i) : i;
772
+ We === "application/xhtml+xml" && Me === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
773
+ const P = U ? U.createHTML(i) : i;
774
774
  if (Me === fe)
775
775
  try {
776
- h = new g().parseFromString(N, Ge);
776
+ h = new g().parseFromString(P, We);
777
777
  } catch {
778
778
  }
779
779
  if (!h || !h.documentElement) {
780
780
  h = ne.createDocument(Me, "template", null);
781
781
  try {
782
- h.documentElement.innerHTML = Mt ? q : N;
782
+ h.documentElement.innerHTML = Lt ? q : P;
783
783
  } catch {
784
784
  }
785
785
  }
786
786
  const j = h.body || h.documentElement;
787
- return i && x && j.insertBefore(e.createTextNode(x), j.childNodes[0] || null), Me === fe ? tt.call(h, ye ? "html" : "body")[0] : ye ? h.documentElement : j;
788
- }, "_initDocument"), bn = /* @__PURE__ */ u(function(i) {
787
+ return i && x && j.insertBefore(e.createTextNode(x), j.childNodes[0] || null), Me === fe ? nt.call(h, ye ? "html" : "body")[0] : ye ? h.documentElement : j;
788
+ }, "_initDocument"), wn = /* @__PURE__ */ u(function(i) {
789
789
  return ue.call(
790
790
  i.ownerDocument || i,
791
791
  i,
@@ -793,66 +793,66 @@ function Jn() {
793
793
  f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION,
794
794
  null
795
795
  );
796
- }, "_createNodeIterator"), Ot = /* @__PURE__ */ u(function(i) {
796
+ }, "_createNodeIterator"), Nt = /* @__PURE__ */ u(function(i) {
797
797
  return i instanceof p && (typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || !(i.attributes instanceof d) || typeof i.removeAttribute != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function");
798
- }, "_isClobbered"), wn = /* @__PURE__ */ u(function(i) {
798
+ }, "_isClobbered"), vn = /* @__PURE__ */ u(function(i) {
799
799
  return typeof o == "function" && i instanceof o;
800
800
  }, "_isNode");
801
801
  function de(k, i, h) {
802
- ht(k, (x) => {
802
+ pt(k, (x) => {
803
803
  x.call(t, i, h, Le);
804
804
  });
805
805
  }
806
806
  u(de, "_executeHooks");
807
- const vn = /* @__PURE__ */ u(function(i) {
807
+ const yn = /* @__PURE__ */ u(function(i) {
808
808
  let h = null;
809
- if (de(F.beforeSanitizeElements, i, null), Ot(i))
809
+ if (de(F.beforeSanitizeElements, i, null), Nt(i))
810
810
  return ae(i), !0;
811
811
  const x = B(i.nodeName);
812
812
  if (de(F.uponSanitizeElement, i, {
813
813
  tagName: x,
814
814
  allowedTags: b
815
- }), rt && i.hasChildNodes() && !wn(i.firstElementChild) && V(/<[/\w!]/g, i.innerHTML) && V(/<[/\w!]/g, i.textContent) || i.nodeType === Ye.progressingInstruction || rt && i.nodeType === Ye.comment && V(/<[/\w]/g, i.data))
815
+ }), it && i.hasChildNodes() && !vn(i.firstElementChild) && V(/<[/\w!]/g, i.innerHTML) && V(/<[/\w!]/g, i.textContent) || i.nodeType === Ze.progressingInstruction || it && i.nodeType === Ze.comment && V(/<[/\w]/g, i.data))
816
816
  return ae(i), !0;
817
817
  if (!(ke.tagCheck instanceof Function && ke.tagCheck(x)) && (!b[x] || pe[x])) {
818
- if (!pe[x] && Tn(x) && (P.tagNameCheck instanceof RegExp && V(P.tagNameCheck, x) || P.tagNameCheck instanceof Function && P.tagNameCheck(x)))
818
+ if (!pe[x] && Sn(x) && (N.tagNameCheck instanceof RegExp && V(N.tagNameCheck, x) || N.tagNameCheck instanceof Function && N.tagNameCheck(x)))
819
819
  return !1;
820
- if (Dt && !ie[x]) {
821
- const N = te(i) || i.parentNode, j = xe(i) || i.childNodes;
822
- if (j && N) {
820
+ if (Ct && !ie[x]) {
821
+ const P = te(i) || i.parentNode, j = xe(i) || i.childNodes;
822
+ if (j && P) {
823
823
  const $ = j.length;
824
824
  for (let K = $ - 1; K >= 0; --K) {
825
825
  const ge = S(j[K], !0);
826
- ge.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(ge, me(i));
826
+ ge.__removalCount = (i.__removalCount || 0) + 1, P.insertBefore(ge, me(i));
827
827
  }
828
828
  }
829
829
  }
830
830
  return ae(i), !0;
831
831
  }
832
- return i instanceof c && !ks(i) || (x === "noscript" || x === "noembed" || x === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (De && i.nodeType === Ye.text && (h = i.textContent, ht([Ue, L, Be], (N) => {
833
- h = je(h, N, " ");
834
- }), i.textContent !== h && (We(t.removed, {
832
+ return i instanceof c && !xs(i) || (x === "noscript" || x === "noembed" || x === "noframes") && V(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (De && i.nodeType === Ze.text && (h = i.textContent, pt([Be, L, Fe], (P) => {
833
+ h = qe(h, P, " ");
834
+ }), i.textContent !== h && (je(t.removed, {
835
835
  element: i.cloneNode()
836
836
  }), i.textContent = h)), de(F.afterSanitizeElements, i, null), !1);
837
- }, "_sanitizeElements"), yn = /* @__PURE__ */ u(function(i, h, x) {
838
- if (st[h] || un && (h === "id" || h === "name") && (x in e || x in xs))
837
+ }, "_sanitizeElements"), Tn = /* @__PURE__ */ u(function(i, h, x) {
838
+ if (rt[h] || hn && (h === "id" || h === "name") && (x in e || x in ms))
839
839
  return !1;
840
- if (!(Et && !st[h] && V(St, h))) {
841
- if (!(ln && V(At, h))) {
840
+ if (!(_t && !rt[h] && V(At, h))) {
841
+ if (!(on && V(Et, h))) {
842
842
  if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(h, i))) {
843
- if (!I[h] || st[h]) {
843
+ if (!I[h] || rt[h]) {
844
844
  if (
845
845
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
846
846
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
847
847
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
848
- !(Tn(i) && (P.tagNameCheck instanceof RegExp && V(P.tagNameCheck, i) || P.tagNameCheck instanceof Function && P.tagNameCheck(i)) && (P.attributeNameCheck instanceof RegExp && V(P.attributeNameCheck, h) || P.attributeNameCheck instanceof Function && P.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
848
+ !(Sn(i) && (N.tagNameCheck instanceof RegExp && V(N.tagNameCheck, i) || N.tagNameCheck instanceof Function && N.tagNameCheck(i)) && (N.attributeNameCheck instanceof RegExp && V(N.attributeNameCheck, h) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(h, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
849
849
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
850
- h === "is" && P.allowCustomizedBuiltInElements && (P.tagNameCheck instanceof RegExp && V(P.tagNameCheck, x) || P.tagNameCheck instanceof Function && P.tagNameCheck(x)))
850
+ h === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && V(N.tagNameCheck, x) || N.tagNameCheck instanceof Function && N.tagNameCheck(x)))
851
851
  ) return !1;
852
- } else if (!It[h]) {
853
- if (!V(_, je(x, Fe, ""))) {
854
- if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && qs(x, "data:") === 0 && pn[i])) {
855
- if (!(on && !V(nt, je(x, Fe, "")))) {
852
+ } else if (!Mt[h]) {
853
+ if (!V(_, qe(x, He, ""))) {
854
+ if (!((h === "src" || h === "xlink:href" || h === "href") && i !== "script" && js(x, "data:") === 0 && fn[i])) {
855
+ if (!(cn && !V(st, qe(x, He, "")))) {
856
856
  if (x)
857
857
  return !1;
858
858
  }
@@ -863,14 +863,14 @@ function Jn() {
863
863
  }
864
864
  }
865
865
  return !0;
866
- }, "_isValidAttribute"), Tn = /* @__PURE__ */ u(function(i) {
867
- return i !== "annotation-xml" && Bt(i, E);
868
- }, "_isBasicCustomElement"), Sn = /* @__PURE__ */ u(function(i) {
866
+ }, "_isValidAttribute"), Sn = /* @__PURE__ */ u(function(i) {
867
+ return i !== "annotation-xml" && Ft(i, E);
868
+ }, "_isBasicCustomElement"), An = /* @__PURE__ */ u(function(i) {
869
869
  de(F.beforeSanitizeAttributes, i, null);
870
870
  const {
871
871
  attributes: h
872
872
  } = i;
873
- if (!h || Ot(i))
873
+ if (!h || Nt(i))
874
874
  return;
875
875
  const x = {
876
876
  attrName: "",
@@ -879,19 +879,19 @@ function Jn() {
879
879
  allowedAttributes: I,
880
880
  forceKeepAttr: void 0
881
881
  };
882
- let N = h.length;
883
- for (; N--; ) {
884
- const j = h[N], {
882
+ let P = h.length;
883
+ for (; P--; ) {
884
+ const j = h[P], {
885
885
  name: $,
886
886
  namespaceURI: K,
887
887
  value: ge
888
888
  } = j, ze = B($), Pt = ge;
889
- let G = $ === "value" ? Pt : Vs(Pt);
890
- if (x.attrName = ze, x.attrValue = G, x.keepAttr = !0, x.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, x), G = x.attrValue, hn && (ze === "id" || ze === "name") && (Te($, i), G = ps + G), rt && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
889
+ let G = $ === "value" ? Pt : qs(Pt);
890
+ if (x.attrName = ze, x.attrValue = G, x.keepAttr = !0, x.forceKeepAttr = void 0, de(F.uponSanitizeAttribute, i, x), G = x.attrValue, pn && (ze === "id" || ze === "name") && (Te($, i), G = hs + G), it && V(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, G)) {
891
891
  Te($, i);
892
892
  continue;
893
893
  }
894
- if (ze === "attributename" && Bt(G, "href")) {
894
+ if (ze === "attributename" && Ft(G, "href")) {
895
895
  Te($, i);
896
896
  continue;
897
897
  }
@@ -901,20 +901,20 @@ function Jn() {
901
901
  Te($, i);
902
902
  continue;
903
903
  }
904
- if (!cn && V(/\/>/i, G)) {
904
+ if (!un && V(/\/>/i, G)) {
905
905
  Te($, i);
906
906
  continue;
907
907
  }
908
- De && ht([Ue, L, Be], (En) => {
909
- G = je(G, En, " ");
908
+ De && pt([Be, L, Fe], (_n) => {
909
+ G = qe(G, _n, " ");
910
910
  });
911
- const An = B(i.nodeName);
912
- if (!yn(An, ze, G)) {
911
+ const En = B(i.nodeName);
912
+ if (!Tn(En, ze, G)) {
913
913
  Te($, i);
914
914
  continue;
915
915
  }
916
916
  if (U && typeof m == "object" && typeof m.getAttributeType == "function" && !K)
917
- switch (m.getAttributeType(An, ze)) {
917
+ switch (m.getAttributeType(En, ze)) {
918
918
  case "TrustedHTML": {
919
919
  G = U.createHTML(G);
920
920
  break;
@@ -926,97 +926,97 @@ function Jn() {
926
926
  }
927
927
  if (G !== Pt)
928
928
  try {
929
- K ? i.setAttributeNS(K, $, G) : i.setAttribute($, G), Ot(i) ? ae(i) : Ln(t.removed);
929
+ K ? i.setAttributeNS(K, $, G) : i.setAttribute($, G), Nt(i) ? ae(i) : zn(t.removed);
930
930
  } catch {
931
931
  Te($, i);
932
932
  }
933
933
  }
934
934
  de(F.afterSanitizeAttributes, i, null);
935
- }, "_sanitizeAttributes"), bs = /* @__PURE__ */ u(function k(i) {
935
+ }, "_sanitizeAttributes"), ks = /* @__PURE__ */ u(function k(i) {
936
936
  let h = null;
937
- const x = bn(i);
937
+ const x = wn(i);
938
938
  for (de(F.beforeSanitizeShadowDOM, i, null); h = x.nextNode(); )
939
- de(F.uponSanitizeShadowNode, h, null), vn(h), Sn(h), h.content instanceof r && k(h.content);
939
+ de(F.uponSanitizeShadowNode, h, null), yn(h), An(h), h.content instanceof r && k(h.content);
940
940
  de(F.afterSanitizeShadowDOM, i, null);
941
941
  }, "_sanitizeShadowDOM");
942
942
  return t.sanitize = function(k) {
943
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, x = null, N = null, j = null;
944
- if (Mt = !k, Mt && (k = "<!-->"), typeof k != "string" && !wn(k))
943
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, x = null, P = null, j = null;
944
+ if (Lt = !k, Lt && (k = "<!-->"), typeof k != "string" && !vn(k))
945
945
  if (typeof k.toString == "function") {
946
946
  if (k = k.toString(), typeof k != "string")
947
- throw qe("dirty is not a string, aborting");
947
+ throw Ve("dirty is not a string, aborting");
948
948
  } else
949
- throw qe("toString is not a function");
949
+ throw Ve("toString is not a function");
950
950
  if (!t.isSupported)
951
951
  return k;
952
- if (_t || zt(i), t.removed = [], typeof k == "string" && (He = !1), He) {
952
+ if (Rt || Ot(i), t.removed = [], typeof k == "string" && (Ge = !1), Ge) {
953
953
  if (k.nodeName) {
954
954
  const ge = B(k.nodeName);
955
955
  if (!b[ge] || pe[ge])
956
- throw qe("root node is forbidden and cannot be sanitized in-place");
956
+ throw Ve("root node is forbidden and cannot be sanitized in-place");
957
957
  }
958
958
  } else if (k instanceof o)
959
- h = kn("<!---->"), x = h.ownerDocument.importNode(k, !0), x.nodeType === Ye.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? h = x : h.appendChild(x);
959
+ h = bn("<!---->"), x = h.ownerDocument.importNode(k, !0), x.nodeType === Ze.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? h = x : h.appendChild(x);
960
960
  else {
961
961
  if (!Ce && !De && !ye && // eslint-disable-next-line unicorn/prefer-includes
962
962
  k.indexOf("<") === -1)
963
- return U && at ? U.createHTML(k) : k;
964
- if (h = kn(k), !h)
965
- return Ce ? null : at ? q : "";
963
+ return U && lt ? U.createHTML(k) : k;
964
+ if (h = bn(k), !h)
965
+ return Ce ? null : lt ? q : "";
966
966
  }
967
- h && Rt && ae(h.firstChild);
968
- const $ = bn(He ? k : h);
969
- for (; N = $.nextNode(); )
970
- vn(N), Sn(N), N.content instanceof r && bs(N.content);
971
- if (He)
967
+ h && Dt && ae(h.firstChild);
968
+ const $ = wn(Ge ? k : h);
969
+ for (; P = $.nextNode(); )
970
+ yn(P), An(P), P.content instanceof r && ks(P.content);
971
+ if (Ge)
972
972
  return k;
973
973
  if (Ce) {
974
- if (it)
975
- for (j = et.call(h.ownerDocument); h.firstChild; )
974
+ if (at)
975
+ for (j = tt.call(h.ownerDocument); h.firstChild; )
976
976
  j.appendChild(h.firstChild);
977
977
  else
978
978
  j = h;
979
- return (I.shadowroot || I.shadowrootmode) && (j = Tt.call(n, j, !0)), j;
979
+ return (I.shadowroot || I.shadowrootmode) && (j = St.call(n, j, !0)), j;
980
980
  }
981
981
  let K = ye ? h.outerHTML : h.innerHTML;
982
- return ye && b["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && V(Qn, h.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
983
- ` + K), De && ht([Ue, L, Be], (ge) => {
984
- K = je(K, ge, " ");
985
- }), U && at ? U.createHTML(K) : K;
982
+ return ye && b["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && V(Jn, h.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
983
+ ` + K), De && pt([Be, L, Fe], (ge) => {
984
+ K = qe(K, ge, " ");
985
+ }), U && lt ? U.createHTML(K) : K;
986
986
  }, t.setConfig = function() {
987
987
  let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
988
- zt(k), _t = !0;
988
+ Ot(k), Rt = !0;
989
989
  }, t.clearConfig = function() {
990
- Le = null, _t = !1;
990
+ Le = null, Rt = !1;
991
991
  }, t.isValidAttribute = function(k, i, h) {
992
- Le || zt({});
993
- const x = B(k), N = B(i);
994
- return yn(x, N, h);
992
+ Le || Ot({});
993
+ const x = B(k), P = B(i);
994
+ return Tn(x, P, h);
995
995
  }, t.addHook = function(k, i) {
996
- typeof i == "function" && We(F[k], i);
996
+ typeof i == "function" && je(F[k], i);
997
997
  }, t.removeHook = function(k, i) {
998
998
  if (i !== void 0) {
999
- const h = Ws(F[k], i);
1000
- return h === -1 ? void 0 : js(F[k], h, 1)[0];
999
+ const h = Gs(F[k], i);
1000
+ return h === -1 ? void 0 : Ws(F[k], h, 1)[0];
1001
1001
  }
1002
- return Ln(F[k]);
1002
+ return zn(F[k]);
1003
1003
  }, t.removeHooks = function(k) {
1004
1004
  F[k] = [];
1005
1005
  }, t.removeAllHooks = function() {
1006
- F = Un();
1006
+ F = Bn();
1007
1007
  }, t;
1008
1008
  }
1009
- u(Jn, "createDOMPurify");
1010
- var or = Jn();
1011
- function Xt() {
1009
+ u(es, "createDOMPurify");
1010
+ var lr = es();
1011
+ function Kt() {
1012
1012
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1013
1013
  }
1014
- u(Xt, "M");
1015
- var Re = Xt();
1016
- function es(l) {
1014
+ u(Kt, "M");
1015
+ var Re = Kt();
1016
+ function ts(l) {
1017
1017
  Re = l;
1018
1018
  }
1019
- u(es, "G");
1019
+ u(ts, "G");
1020
1020
  var Ae = { exec: /* @__PURE__ */ u(() => null, "exec") };
1021
1021
  function C(l, t = "") {
1022
1022
  let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ u((s, r) => {
@@ -1026,22 +1026,22 @@ function C(l, t = "") {
1026
1026
  return n;
1027
1027
  }
1028
1028
  u(C, "k");
1029
- var cr = (() => {
1029
+ var or = (() => {
1030
1030
  try {
1031
1031
  return !!new RegExp("(?<=1)(?<!1)");
1032
1032
  } catch {
1033
1033
  return !1;
1034
1034
  }
1035
- })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ u((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, ur = /^(?:[ \t]*(?:\n|$))+/, hr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, pr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Je = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, fr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Kt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ts = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ns = C(ts).replace(/bull/g, Kt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), dr = C(ts).replace(/bull/g, Kt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, gr = /^[^\n]+/, Jt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mr = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Jt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xr = C(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Kt).getRegex(), vt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", en = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, kr = C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", en).replace("tag", vt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ss = C(Qt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), br = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ss).getRegex(), tn = { blockquote: br, code: hr, def: mr, fences: pr, heading: fr, hr: Je, html: kr, lheading: ns, list: xr, newline: ur, paragraph: ss, table: Ae, text: gr }, Bn = C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex(), wr = { ...tn, lheading: dr, table: Bn, paragraph: C(Qt).replace("hr", Je).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Bn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", vt).getRegex() }, vr = { ...tn, html: C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", en).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: C(Qt).replace("hr", Je).replace("heading", ` *#{1,6} *[^
1036
- ]`).replace("lheading", ns).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, yr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Tr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, rs = /^( {2,}|\\)\n(?!\s*$)/, Sr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, yt = /[\p{P}\p{S}]/u, nn = /[\s\p{P}\p{S}]/u, is = /[^\s\p{P}\p{S}]/u, Ar = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, nn).getRegex(), as = /(?!~)[\p{P}\p{S}]/u, Er = /(?!~)[\s\p{P}\p{S}]/u, _r = /(?:[^\s\p{P}\p{S}]|~)/u, ls = /(?![*_])[\p{P}\p{S}]/u, Rr = /(?![*_])[\s\p{P}\p{S}]/u, Dr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Cr = C(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", cr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), os = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ir = C(os, "u").replace(/punct/g, yt).getRegex(), Mr = C(os, "u").replace(/punct/g, as).getRegex(), cs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Lr = C(cs, "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), zr = C(cs, "gu").replace(/notPunctSpace/g, _r).replace(/punctSpace/g, Er).replace(/punct/g, as).getRegex(), Or = C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, is).replace(/punctSpace/g, nn).replace(/punct/g, yt).getRegex(), Pr = C(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ls).getRegex(), Nr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", $r = C(Nr, "gu").replace(/notPunctSpace/g, Dr).replace(/punctSpace/g, Rr).replace(/punct/g, ls).getRegex(), Ur = C(/\\(punct)/, "gu").replace(/punct/g, yt).getRegex(), Br = C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Fr = C(en).replace("(?:-->|$)", "-->").getRegex(), Hr = C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Fr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Gr = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), us = C(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", Jt).getRegex(), hs = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", Jt).getRegex(), Wr = C("reflink|nolink(?!\\()", "g").replace("reflink", us).replace("nolink", hs).getRegex(), Fn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, sn = { _backpedal: Ae, anyPunctuation: Ur, autolink: Br, blockSkip: Cr, br: rs, code: Tr, del: Ae, delLDelim: Ae, delRDelim: Ae, emStrongLDelim: Ir, emStrongRDelimAst: Lr, emStrongRDelimUnd: Or, escape: yr, link: Gr, nolink: hs, punctuation: Ar, reflink: us, reflinkSearch: Wr, tag: Hr, text: Sr, url: Ae }, jr = { ...sn, link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, Yt = { ...sn, emStrongRDelimAst: zr, emStrongLDelim: Mr, delLDelim: Pr, delRDelim: $r, url: C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Fn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Fn).getRegex() }, qr = { ...Yt, br: C(rs).replace("{2,}", "*").getRegex(), text: C(Yt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: tn, gfm: wr, pedantic: vr }, Ze = { normal: sn, gfm: Yt, breaks: qr, pedantic: jr }, Vr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Hn = /* @__PURE__ */ u((l) => Vr[l], "de");
1035
+ })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ u((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ u((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, cr = /^(?:[ \t]*(?:\n|$))+/, ur = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, hr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, et = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, pr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Qt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ns = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ss = C(ns).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), fr = C(ns).replace(/bull/g, Qt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Jt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dr = /^[^\n]+/, en = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, gr = C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", en).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = C(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Qt).getRegex(), yt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", tn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", tn).replace("tag", yt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), rs = C(Jt).replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex(), kr = C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", rs).getRegex(), nn = { blockquote: kr, code: ur, def: gr, fences: hr, heading: pr, hr: et, html: xr, lheading: ss, list: mr, newline: cr, paragraph: rs, table: Ae, text: dr }, Fn = C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex(), br = { ...nn, lheading: fr, table: Fn, paragraph: C(Jt).replace("hr", et).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Fn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", yt).getRegex() }, wr = { ...nn, html: C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", tn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: C(Jt).replace("hr", et).replace("heading", ` *#{1,6} *[^
1036
+ ]`).replace("lheading", ss).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, vr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, is = /^( {2,}|\\)\n(?!\s*$)/, Tr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ue = /[\p{P}\p{S}]/u, Tt = /[\s\p{P}\p{S}]/u, sn = /[^\s\p{P}\p{S}]/u, Sr = C(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Tt).getRegex(), as = /(?!~)[\p{P}\p{S}]/u, Ar = /(?!~)[\s\p{P}\p{S}]/u, Er = /(?:[^\s\p{P}\p{S}]|~)/u, _r = C(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", or ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ls = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rr = C(ls, "u").replace(/punct/g, Ue).getRegex(), Dr = C(ls, "u").replace(/punct/g, as).getRegex(), os = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Cr = C(os, "gu").replace(/notPunctSpace/g, sn).replace(/punctSpace/g, Tt).replace(/punct/g, Ue).getRegex(), Ir = C(os, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Ar).replace(/punct/g, as).getRegex(), Mr = C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, sn).replace(/punctSpace/g, Tt).replace(/punct/g, Ue).getRegex(), Lr = C(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ue).getRegex(), zr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Or = C(zr, "gu").replace(/notPunctSpace/g, sn).replace(/punctSpace/g, Tt).replace(/punct/g, Ue).getRegex(), Nr = C(/\\(punct)/, "gu").replace(/punct/g, Ue).getRegex(), Pr = C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), $r = C(tn).replace("(?:-->|$)", "-->").getRegex(), Ur = C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), bt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Br = C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", bt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), cs = C(/^!?\[(label)\]\[(ref)\]/).replace("label", bt).replace("ref", en).getRegex(), us = C(/^!?\[(ref)\](?:\[\])?/).replace("ref", en).getRegex(), Fr = C("reflink|nolink(?!\\()", "g").replace("reflink", cs).replace("nolink", us).getRegex(), Hn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, rn = { _backpedal: Ae, anyPunctuation: Nr, autolink: Pr, blockSkip: _r, br: is, code: yr, del: Ae, delLDelim: Ae, delRDelim: Ae, emStrongLDelim: Rr, emStrongRDelimAst: Cr, emStrongRDelimUnd: Mr, escape: vr, link: Br, nolink: us, punctuation: Sr, reflink: cs, reflinkSearch: Fr, tag: Ur, text: Tr, url: Ae }, Hr = { ...rn, link: C(/^!?\[(label)\]\((.*?)\)/).replace("label", bt).getRegex(), reflink: C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", bt).getRegex() }, Zt = { ...rn, emStrongRDelimAst: Ir, emStrongLDelim: Dr, delLDelim: Lr, delRDelim: Or, url: C(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Hn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: C(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Hn).getRegex() }, Gr = { ...Zt, br: C(is).replace("{2,}", "*").getRegex(), text: C(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, dt = { normal: nn, gfm: br, pedantic: wr }, Xe = { normal: rn, gfm: Zt, breaks: Gr, pedantic: Hr }, Wr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Gn = /* @__PURE__ */ u((l) => Wr[l], "ke");
1037
1037
  function oe(l, t) {
1038
1038
  if (t) {
1039
- if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Hn);
1040
- } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Hn);
1039
+ if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Gn);
1040
+ } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Gn);
1041
1041
  return l;
1042
1042
  }
1043
1043
  u(oe, "O");
1044
- function Gn(l) {
1044
+ function Wn(l) {
1045
1045
  try {
1046
1046
  l = encodeURI(l).replace(Y.percentDecode, "%");
1047
1047
  } catch {
@@ -1049,8 +1049,8 @@ function Gn(l) {
1049
1049
  }
1050
1050
  return l;
1051
1051
  }
1052
- u(Gn, "X");
1053
- function Wn(l, t) {
1052
+ u(Wn, "J");
1053
+ function jn(l, t) {
1054
1054
  let e = l.replace(Y.findPipe, (r, a, o) => {
1055
1055
  let c = !1, f = a;
1056
1056
  for (; --f >= 0 && o[f] === "\\"; ) c = !c;
@@ -1061,8 +1061,8 @@ function Wn(l, t) {
1061
1061
  for (; s < n.length; s++) n[s] = n[s].trim().replace(Y.slashPipe, "|");
1062
1062
  return n;
1063
1063
  }
1064
- u(Wn, "J");
1065
- function Xe(l, t, e) {
1064
+ u(jn, "V");
1065
+ function Ke(l, t, e) {
1066
1066
  let n = l.length;
1067
1067
  if (n === 0) return "";
1068
1068
  let s = 0;
@@ -1070,8 +1070,8 @@ function Xe(l, t, e) {
1070
1070
  s++;
1071
1071
  return l.slice(0, n - s);
1072
1072
  }
1073
- u(Xe, "E");
1074
- function Yr(l, t) {
1073
+ u(Ke, "I");
1074
+ function jr(l, t) {
1075
1075
  if (l.indexOf(t[1]) === -1) return -1;
1076
1076
  let e = 0;
1077
1077
  for (let n = 0; n < l.length; n++) if (l[n] === "\\") n++;
@@ -1079,8 +1079,8 @@ function Yr(l, t) {
1079
1079
  else if (l[n] === t[1] && (e--, e < 0)) return n;
1080
1080
  return e > 0 ? -2 : -1;
1081
1081
  }
1082
- u(Yr, "ge");
1083
- function Zr(l, t = 0) {
1082
+ u(jr, "de");
1083
+ function qr(l, t = 0) {
1084
1084
  let e = t, n = "";
1085
1085
  for (let s of l) if (s === " ") {
1086
1086
  let r = 4 - e % 4;
@@ -1088,15 +1088,15 @@ function Zr(l, t = 0) {
1088
1088
  } else n += s, e++;
1089
1089
  return n;
1090
1090
  }
1091
- u(Zr, "fe");
1092
- function jn(l, t, e, n, s) {
1091
+ u(qr, "ge");
1092
+ function qn(l, t, e, n, s) {
1093
1093
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
1094
1094
  n.state.inLink = !0;
1095
1095
  let c = { type: l[0].charAt(0) === "!" ? "image" : "link", raw: e, href: r, title: a, text: o, tokens: n.inlineTokens(o) };
1096
1096
  return n.state.inLink = !1, c;
1097
1097
  }
1098
- u(jn, "me");
1099
- function Xr(l, t, e) {
1098
+ u(qn, "fe");
1099
+ function Vr(l, t, e) {
1100
1100
  let n = l.match(e.other.indentCodeCompensation);
1101
1101
  if (n === null) return t;
1102
1102
  let s = n[1];
@@ -1109,8 +1109,8 @@ function Xr(l, t, e) {
1109
1109
  }).join(`
1110
1110
  `);
1111
1111
  }
1112
- u(Xr, "it");
1113
- var Oe, bt = (Oe = class {
1112
+ u(Vr, "nt");
1113
+ var Oe, wt = (Oe = class {
1114
1114
  constructor(t) {
1115
1115
  D(this, "options");
1116
1116
  D(this, "rules");
@@ -1125,14 +1125,14 @@ var Oe, bt = (Oe = class {
1125
1125
  let e = this.rules.block.code.exec(t);
1126
1126
  if (e) {
1127
1127
  let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
1128
- return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Xe(n, `
1128
+ return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Ke(n, `
1129
1129
  `) };
1130
1130
  }
1131
1131
  }
1132
1132
  fences(t) {
1133
1133
  let e = this.rules.block.fences.exec(t);
1134
1134
  if (e) {
1135
- let n = e[0], s = Xr(n, e[3] || "", this.rules);
1135
+ let n = e[0], s = Vr(n, e[3] || "", this.rules);
1136
1136
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
1137
1137
  }
1138
1138
  }
@@ -1141,7 +1141,7 @@ var Oe, bt = (Oe = class {
1141
1141
  if (e) {
1142
1142
  let n = e[2].trim();
1143
1143
  if (this.rules.other.endingHash.test(n)) {
1144
- let s = Xe(n, "#");
1144
+ let s = Ke(n, "#");
1145
1145
  (this.options.pedantic || !s || this.rules.other.endingSpaceChar.test(s)) && (n = s.trim());
1146
1146
  }
1147
1147
  return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
@@ -1149,13 +1149,13 @@ var Oe, bt = (Oe = class {
1149
1149
  }
1150
1150
  hr(t) {
1151
1151
  let e = this.rules.block.hr.exec(t);
1152
- if (e) return { type: "hr", raw: Xe(e[0], `
1152
+ if (e) return { type: "hr", raw: Ke(e[0], `
1153
1153
  `) };
1154
1154
  }
1155
1155
  blockquote(t) {
1156
1156
  let e = this.rules.block.blockquote.exec(t);
1157
1157
  if (e) {
1158
- let n = Xe(e[0], `
1158
+ let n = Ke(e[0], `
1159
1159
  `).split(`
1160
1160
  `), s = "", r = "", a = [];
1161
1161
  for (; n.length > 0; ) {
@@ -1202,7 +1202,7 @@ ${p}` : p;
1202
1202
  let f = !1, d = "", p = "";
1203
1203
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1204
1204
  d = e[0], t = t.substring(d.length);
1205
- let g = Zr(e[2].split(`
1205
+ let g = qr(e[2].split(`
1206
1206
  `, 1)[0], e[1].length), m = t.split(`
1207
1207
  `, 1)[0], w = !g.trim(), S = 0;
1208
1208
  if (this.options.pedantic ? (S = 2, p = g.trimStart()) : w ? S = e[1].length + 1 : (S = g.search(this.rules.other.nonSpaceChar), S = S > 4 ? 1 : S, p = g.slice(S), S += e[1].length), w && this.rules.other.blankLine.test(m) && (d += m + `
@@ -1270,18 +1270,21 @@ ${p}` : p;
1270
1270
  table(t) {
1271
1271
  let e = this.rules.block.table.exec(t);
1272
1272
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
1273
- let n = Wn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1273
+ let n = jn(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), r = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1274
1274
  `) : [], a = { type: "table", raw: e[0], header: [], align: [], rows: [] };
1275
1275
  if (n.length === s.length) {
1276
1276
  for (let o of s) this.rules.other.tableAlignRight.test(o) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? a.align.push("left") : a.align.push(null);
1277
1277
  for (let o = 0; o < n.length; o++) a.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: !0, align: a.align[o] });
1278
- for (let o of r) a.rows.push(Wn(o, a.header.length).map((c, f) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[f] })));
1278
+ for (let o of r) a.rows.push(jn(o, a.header.length).map((c, f) => ({ text: c, tokens: this.lexer.inline(c), header: !1, align: a.align[f] })));
1279
1279
  return a;
1280
1280
  }
1281
1281
  }
1282
1282
  lheading(t) {
1283
1283
  let e = this.rules.block.lheading.exec(t);
1284
- if (e) return { type: "heading", raw: e[0], depth: e[2].charAt(0) === "=" ? 1 : 2, text: e[1], tokens: this.lexer.inline(e[1]) };
1284
+ if (e) {
1285
+ let n = e[1].trim();
1286
+ return { type: "heading", raw: e[0], depth: e[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
1287
+ }
1285
1288
  }
1286
1289
  paragraph(t) {
1287
1290
  let e = this.rules.block.paragraph.exec(t);
@@ -1309,10 +1312,10 @@ ${p}` : p;
1309
1312
  let n = e[2].trim();
1310
1313
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
1311
1314
  if (!this.rules.other.endAngleBracket.test(n)) return;
1312
- let a = Xe(n.slice(0, -1), "\\");
1315
+ let a = Ke(n.slice(0, -1), "\\");
1313
1316
  if ((n.length - a.length) % 2 === 0) return;
1314
1317
  } else {
1315
- let a = Yr(e[2], "()");
1318
+ let a = jr(e[2], "()");
1316
1319
  if (a === -2) return;
1317
1320
  if (a > -1) {
1318
1321
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
@@ -1324,7 +1327,7 @@ ${p}` : p;
1324
1327
  let a = this.rules.other.pedanticHrefTitle.exec(s);
1325
1328
  a && (s = a[1], r = a[3]);
1326
1329
  } else r = e[3] ? e[3].slice(1, -1) : "";
1327
- return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), jn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: r && r.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
1330
+ return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), qn(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: r && r.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
1328
1331
  }
1329
1332
  }
1330
1333
  reflink(t, e) {
@@ -1335,12 +1338,12 @@ ${p}` : p;
1335
1338
  let a = n[0].charAt(0);
1336
1339
  return { type: "text", raw: a, text: a };
1337
1340
  }
1338
- return jn(n, r, n[0], this.lexer, this.rules);
1341
+ return qn(n, r, n[0], this.lexer, this.rules);
1339
1342
  }
1340
1343
  }
1341
1344
  emStrong(t, e, n = "") {
1342
1345
  let s = this.rules.inline.emStrongLDelim.exec(t);
1343
- if (!(!s || s[3] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[2]) || !n || this.rules.inline.punctuation.exec(n))) {
1346
+ if (!(!s || !s[1] && !s[2] && !s[3] && !s[4] || s[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1344
1347
  let r = [...s[0]].length - 1, a, o, c = r, f = 0, d = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1345
1348
  for (d.lastIndex = 0, e = e.slice(-1 * t.length + r); (s = d.exec(e)) != null; ) {
1346
1349
  if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a) continue;
@@ -1427,12 +1430,12 @@ ${p}` : p;
1427
1430
  D(this, "state");
1428
1431
  D(this, "inlineQueue");
1429
1432
  D(this, "tokenizer");
1430
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Re, this.options.tokenizer = this.options.tokenizer || new bt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1431
- let e = { other: Y, block: ft.normal, inline: Ze.normal };
1432
- this.options.pedantic ? (e.block = ft.pedantic, e.inline = Ze.pedantic) : this.options.gfm && (e.block = ft.gfm, this.options.breaks ? e.inline = Ze.breaks : e.inline = Ze.gfm), this.tokenizer.rules = e;
1433
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Re, this.options.tokenizer = this.options.tokenizer || new wt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1434
+ let e = { other: Y, block: dt.normal, inline: Xe.normal };
1435
+ this.options.pedantic ? (e.block = dt.pedantic, e.inline = Xe.pedantic) : this.options.gfm && (e.block = dt.gfm, this.options.breaks ? e.inline = Xe.breaks : e.inline = Xe.gfm), this.tokenizer.rules = e;
1433
1436
  }
1434
1437
  static get rules() {
1435
- return { block: ft, inline: Ze };
1438
+ return { block: dt, inline: Xe };
1436
1439
  }
1437
1440
  static lex(t, e) {
1438
1441
  return new we(e).lex(t);
@@ -1450,7 +1453,7 @@ ${p}` : p;
1450
1453
  return this.inlineQueue = [], this.tokens;
1451
1454
  }
1452
1455
  blockTokens(t, e = [], n = !1) {
1453
- for (this.options.pedantic && (t = t.replace(Y.tabCharGlobal, " ").replace(Y.spaceLine, "")); t; ) {
1456
+ for (this.tokenizer.lexer = this, this.options.pedantic && (t = t.replace(Y.tabCharGlobal, " ").replace(Y.spaceLine, "")); t; ) {
1454
1457
  let s;
1455
1458
  if (this.options.extensions?.block?.some((a) => (s = a.call({ lexer: this }, t, e)) ? (t = t.substring(s.raw.length), e.push(s), !0) : !1)) continue;
1456
1459
  if (s = this.tokenizer.space(t)) {
@@ -1548,6 +1551,7 @@ ${p}` : p;
1548
1551
  return this.inlineQueue.push({ src: t, tokens: e }), e;
1549
1552
  }
1550
1553
  inlineTokens(t, e = []) {
1554
+ this.tokenizer.lexer = this;
1551
1555
  let n = t, s = null;
1552
1556
  if (this.tokens.links) {
1553
1557
  let c = Object.keys(this.tokens.links);
@@ -1627,7 +1631,7 @@ ${p}` : p;
1627
1631
  }
1628
1632
  return e;
1629
1633
  }
1630
- }, u(we, "u"), we), Pe, wt = (Pe = class {
1634
+ }, u(we, "u"), we), Ne, vt = (Ne = class {
1631
1635
  constructor(t) {
1632
1636
  D(this, "options");
1633
1637
  D(this, "parser");
@@ -1727,7 +1731,7 @@ ${t}</tr>
1727
1731
  return `<del>${this.parser.parseInline(t)}</del>`;
1728
1732
  }
1729
1733
  link({ href: t, title: e, tokens: n }) {
1730
- let s = this.parser.parseInline(n), r = Gn(t);
1734
+ let s = this.parser.parseInline(n), r = Wn(t);
1731
1735
  if (r === null) return s;
1732
1736
  t = r;
1733
1737
  let a = '<a href="' + t + '"';
@@ -1735,7 +1739,7 @@ ${t}</tr>
1735
1739
  }
1736
1740
  image({ href: t, title: e, text: n, tokens: s }) {
1737
1741
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1738
- let r = Gn(t);
1742
+ let r = Wn(t);
1739
1743
  if (r === null) return oe(n);
1740
1744
  t = r;
1741
1745
  let a = `<img src="${t}" alt="${oe(n)}"`;
@@ -1744,7 +1748,7 @@ ${t}</tr>
1744
1748
  text(t) {
1745
1749
  return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : oe(t.text);
1746
1750
  }
1747
- }, u(Pe, "y"), Pe), Ne, rn = (Ne = class {
1751
+ }, u(Ne, "y"), Ne), Pe, an = (Pe = class {
1748
1752
  strong({ text: t }) {
1749
1753
  return t;
1750
1754
  }
@@ -1775,12 +1779,12 @@ ${t}</tr>
1775
1779
  checkbox({ raw: t }) {
1776
1780
  return t;
1777
1781
  }
1778
- }, u(Ne, "$"), Ne), ve, re = (ve = class {
1782
+ }, u(Pe, "$"), Pe), ve, re = (ve = class {
1779
1783
  constructor(t) {
1780
1784
  D(this, "options");
1781
1785
  D(this, "renderer");
1782
1786
  D(this, "textRenderer");
1783
- this.options = t || Re, this.options.renderer = this.options.renderer || new wt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new rn();
1787
+ this.options = t || Re, this.options.renderer = this.options.renderer || new vt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new an();
1784
1788
  }
1785
1789
  static parse(t, e) {
1786
1790
  return new ve(e).parse(t);
@@ -1789,6 +1793,7 @@ ${t}</tr>
1789
1793
  return new ve(e).parseInline(t);
1790
1794
  }
1791
1795
  parse(t) {
1796
+ this.renderer.parser = this;
1792
1797
  let e = "";
1793
1798
  for (let n = 0; n < t.length; n++) {
1794
1799
  let s = t[n];
@@ -1859,6 +1864,7 @@ ${t}</tr>
1859
1864
  return e;
1860
1865
  }
1861
1866
  parseInline(t, e = this.renderer) {
1867
+ this.renderer.parser = this;
1862
1868
  let n = "";
1863
1869
  for (let s = 0; s < t.length; s++) {
1864
1870
  let r = t[s];
@@ -1924,7 +1930,7 @@ ${t}</tr>
1924
1930
  }
1925
1931
  return n;
1926
1932
  }
1927
- }, u(ve, "u"), ve), be, Ke = (be = class {
1933
+ }, u(ve, "u"), ve), be, Qe = (be = class {
1928
1934
  constructor(t) {
1929
1935
  D(this, "options");
1930
1936
  D(this, "block");
@@ -1948,18 +1954,18 @@ ${t}</tr>
1948
1954
  provideParser() {
1949
1955
  return this.block ? re.parse : re.parseInline;
1950
1956
  }
1951
- }, u(be, "P"), D(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), $e, Kr = ($e = class {
1957
+ }, u(be, "P"), D(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), $e, Yr = ($e = class {
1952
1958
  constructor(...t) {
1953
- D(this, "defaults", Xt());
1959
+ D(this, "defaults", Kt());
1954
1960
  D(this, "options", this.setOptions);
1955
1961
  D(this, "parse", this.parseMarkdown(!0));
1956
1962
  D(this, "parseInline", this.parseMarkdown(!1));
1957
1963
  D(this, "Parser", re);
1958
- D(this, "Renderer", wt);
1959
- D(this, "TextRenderer", rn);
1964
+ D(this, "Renderer", vt);
1965
+ D(this, "TextRenderer", an);
1960
1966
  D(this, "Lexer", se);
1961
- D(this, "Tokenizer", bt);
1962
- D(this, "Hooks", Ke);
1967
+ D(this, "Tokenizer", wt);
1968
+ D(this, "Hooks", Qe);
1963
1969
  this.use(...t);
1964
1970
  }
1965
1971
  walkTokens(t, e) {
@@ -2006,7 +2012,7 @@ ${t}</tr>
2006
2012
  }
2007
2013
  "childTokens" in r && r.childTokens && (e.childTokens[r.name] = r.childTokens);
2008
2014
  }), s.extensions = e), n.renderer) {
2009
- let r = this.defaults.renderer || new wt(this.defaults);
2015
+ let r = this.defaults.renderer || new vt(this.defaults);
2010
2016
  for (let a in n.renderer) {
2011
2017
  if (!(a in r)) throw new Error(`renderer '${a}' does not exist`);
2012
2018
  if (["options", "parser"].includes(a)) continue;
@@ -2019,7 +2025,7 @@ ${t}</tr>
2019
2025
  s.renderer = r;
2020
2026
  }
2021
2027
  if (n.tokenizer) {
2022
- let r = this.defaults.tokenizer || new bt(this.defaults);
2028
+ let r = this.defaults.tokenizer || new wt(this.defaults);
2023
2029
  for (let a in n.tokenizer) {
2024
2030
  if (!(a in r)) throw new Error(`tokenizer '${a}' does not exist`);
2025
2031
  if (["options", "rules", "lexer"].includes(a)) continue;
@@ -2032,13 +2038,13 @@ ${t}</tr>
2032
2038
  s.tokenizer = r;
2033
2039
  }
2034
2040
  if (n.hooks) {
2035
- let r = this.defaults.hooks || new Ke();
2041
+ let r = this.defaults.hooks || new Qe();
2036
2042
  for (let a in n.hooks) {
2037
2043
  if (!(a in r)) throw new Error(`hook '${a}' does not exist`);
2038
2044
  if (["options", "block"].includes(a)) continue;
2039
2045
  let o = a, c = n.hooks[o], f = r[o];
2040
- Ke.passThroughHooks.has(a) ? r[o] = (d) => {
2041
- if (this.defaults.async && Ke.passThroughHooksRespectAsync.has(a)) return (async () => {
2046
+ Qe.passThroughHooks.has(a) ? r[o] = (d) => {
2047
+ if (this.defaults.async && Qe.passThroughHooksRespectAsync.has(a)) return (async () => {
2042
2048
  let g = await c.call(r, d);
2043
2049
  return f.call(r, g);
2044
2050
  })();
@@ -2108,18 +2114,18 @@ Please report this to https://github.com/markedjs/marked.`, t) {
2108
2114
  throw n;
2109
2115
  };
2110
2116
  }
2111
- }, u($e, "B"), $e), Ee = new Kr();
2117
+ }, u($e, "D"), $e), Ee = new Yr();
2112
2118
  function M(l, t) {
2113
2119
  return Ee.parse(l, t);
2114
2120
  }
2115
2121
  u(M, "g");
2116
2122
  M.options = M.setOptions = function(l) {
2117
- return Ee.setOptions(l), M.defaults = Ee.defaults, es(M.defaults), M;
2123
+ return Ee.setOptions(l), M.defaults = Ee.defaults, ts(M.defaults), M;
2118
2124
  };
2119
- M.getDefaults = Xt;
2125
+ M.getDefaults = Kt;
2120
2126
  M.defaults = Re;
2121
2127
  M.use = function(...l) {
2122
- return Ee.use(...l), M.defaults = Ee.defaults, es(M.defaults), M;
2128
+ return Ee.use(...l), M.defaults = Ee.defaults, ts(M.defaults), M;
2123
2129
  };
2124
2130
  M.walkTokens = function(l, t) {
2125
2131
  return Ee.walkTokens(l, t);
@@ -2127,12 +2133,12 @@ M.walkTokens = function(l, t) {
2127
2133
  M.parseInline = Ee.parseInline;
2128
2134
  M.Parser = re;
2129
2135
  M.parser = re.parse;
2130
- M.Renderer = wt;
2131
- M.TextRenderer = rn;
2136
+ M.Renderer = vt;
2137
+ M.TextRenderer = an;
2132
2138
  M.Lexer = se;
2133
2139
  M.lexer = se.lex;
2134
- M.Tokenizer = bt;
2135
- M.Hooks = Ke;
2140
+ M.Tokenizer = wt;
2141
+ M.Hooks = Qe;
2136
2142
  M.parse = M;
2137
2143
  M.options;
2138
2144
  M.setOptions;
@@ -2141,31 +2147,31 @@ M.walkTokens;
2141
2147
  M.parseInline;
2142
2148
  re.parse;
2143
2149
  se.lex;
2144
- const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2150
+ const Zr = { class: "flex flex-col h-full relative" }, Xr = {
2145
2151
  key: 0,
2146
2152
  class: "pb-4"
2147
- }, ei = {
2153
+ }, Kr = {
2148
2154
  key: 0,
2149
2155
  class: "flex flex-col items-center justify-center pt-12 pb-6 px-4"
2150
- }, ti = { class: "relative mb-3" }, ni = ["src", "alt"], si = ["title"], ri = {
2156
+ }, Qr = { class: "relative mb-3" }, Jr = ["src", "alt"], ei = ["title"], ti = {
2151
2157
  key: 0,
2152
2158
  class: "flex items-center gap-3 py-3 px-2"
2153
- }, ii = ["src", "alt"], ai = ["src", "alt"], li = ["src"], oi = ["href"], ci = ["innerHTML"], ui = {
2159
+ }, ni = ["src", "alt"], si = ["src", "alt"], ri = ["src"], ii = ["href"], ai = ["innerHTML"], li = {
2154
2160
  key: 1,
2155
2161
  class: "flex gap-2 justify-start items-end mb-4"
2156
- }, hi = { class: "flex-shrink-0" }, pi = ["src", "alt"], fi = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, di = {
2162
+ }, oi = { class: "flex-shrink-0" }, ci = ["src", "alt"], ui = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, hi = {
2157
2163
  key: 0,
2158
2164
  class: "flex items-center gap-2 px-3 pb-2 overflow-x-auto"
2159
- }, gi = ["src", "alt"], mi = { class: "max-w-20 truncate" }, xi = ["onClick"], ki = {
2165
+ }, pi = ["src", "alt"], fi = { class: "max-w-20 truncate" }, di = ["onClick"], gi = {
2160
2166
  key: 0,
2161
2167
  class: "shrink-0 flex items-center justify-center size-14"
2162
- }, bi = ["disabled"], wi = {
2168
+ }, mi = ["disabled"], xi = {
2163
2169
  key: 0,
2164
2170
  class: "i-svg-spinners-ring-resize size-4"
2165
- }, vi = {
2171
+ }, ki = {
2166
2172
  key: 1,
2167
2173
  class: "i-tabler-paperclip size-5"
2168
- }, yi = ["placeholder", "disabled"], Ti = ["disabled"], Oi = /* @__PURE__ */ _e({
2174
+ }, bi = ["placeholder", "disabled"], wi = ["disabled"], Mi = /* @__PURE__ */ _e({
2169
2175
  __name: "ElAgentChat",
2170
2176
  props: {
2171
2177
  chatController: {},
@@ -2185,7 +2191,7 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2185
2191
  if (!E)
2186
2192
  return "";
2187
2193
  const _ = M.parse(E, { async: !1 });
2188
- return or.sanitize(_, { ADD_ATTR: ["target"] });
2194
+ return lr.sanitize(_, { ADD_ATTR: ["target"] });
2189
2195
  }
2190
2196
  u(e, "renderMarkdown");
2191
2197
  const n = {
@@ -2205,8 +2211,8 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2205
2211
  return !z || z.sender !== b.sender;
2206
2212
  }
2207
2213
  u(w, "shouldShowAvatar");
2208
- const S = W(() => l.chatController?.textState.value), O = W(() => S.value?.isConnected ?? !1), me = W(() => S.value?.isThinking ?? !1), xe = W(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), te = W(() => S.value?.connectionStatus !== "connected" && !S.value?.error), U = W(() => S.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((E) => E.sender !== "system") ?? []), ne = W(() => !O.value), ue = W(() => xe.value ? "Agent is offline" : te.value ? "Connecting..." : "Message"), et = W(() => (c.value.trim() || g.value.length > 0) && !ne.value && !m.value);
2209
- Zt(async () => {
2214
+ const S = W(() => l.chatController?.textState.value), O = W(() => S.value?.isConnected ?? !1), me = W(() => S.value?.isThinking ?? !1), xe = W(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), te = W(() => S.value?.connectionStatus !== "connected" && !S.value?.error), U = W(() => S.value?.error), q = W(() => l.chatController?.sharedMessages.value?.filter((E) => E.sender !== "system") ?? []), ne = W(() => !O.value), ue = W(() => xe.value ? "Agent is offline" : te.value ? "Connecting..." : "Message"), tt = W(() => (c.value.trim() || g.value.length > 0) && !ne.value && !m.value);
2215
+ Xt(async () => {
2210
2216
  if (l.chatController && !O.value)
2211
2217
  try {
2212
2218
  await l.chatController.startTextConversation();
@@ -2214,7 +2220,7 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2214
2220
  console.error("Failed to start text conversation:", E);
2215
2221
  }
2216
2222
  });
2217
- async function tt() {
2223
+ async function nt() {
2218
2224
  const E = c.value.trim(), _ = g.value.length > 0;
2219
2225
  if (!E && !_ || !l.chatController || !O.value || m.value)
2220
2226
  return;
@@ -2226,27 +2232,27 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2226
2232
  console.error("Error sending message:", I);
2227
2233
  }
2228
2234
  }
2229
- u(tt, "sendMessage");
2230
- function Tt(E) {
2231
- E.key === "Enter" && !E.shiftKey && (E.preventDefault(), tt());
2235
+ u(nt, "sendMessage");
2236
+ function St(E) {
2237
+ E.key === "Enter" && !E.shiftKey && (E.preventDefault(), nt());
2232
2238
  }
2233
- u(Tt, "handleKeydown");
2239
+ u(St, "handleKeydown");
2234
2240
  function F() {
2235
- f.value && Nt(() => {
2241
+ f.value && $t(() => {
2236
2242
  f.value.scrollTop = f.value.scrollHeight;
2237
2243
  });
2238
2244
  }
2239
2245
  u(F, "scrollToBottom");
2240
- function Ue() {
2246
+ function Be() {
2241
2247
  d.value && (d.value.style.height = "auto", d.value.style.height = `${Math.min(d.value.scrollHeight, 150)}px`);
2242
2248
  }
2243
- u(Ue, "adjustTextareaHeight"), Qe(c, () => Nt(() => Ue()));
2249
+ u(Be, "adjustTextareaHeight"), Je(c, () => $t(() => Be()));
2244
2250
  const L = W(() => l.variant === "light");
2245
- function Be() {
2251
+ function Fe() {
2246
2252
  p.value?.click();
2247
2253
  }
2248
- u(Be, "triggerFileInput");
2249
- async function St(E) {
2254
+ u(Fe, "triggerFileInput");
2255
+ async function At(E) {
2250
2256
  const _ = E.target, b = _.files?.[0];
2251
2257
  if (!(!b || !l.uploadFn)) {
2252
2258
  m.value = !0;
@@ -2260,41 +2266,41 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2260
2266
  }
2261
2267
  }
2262
2268
  }
2263
- u(St, "handleFileSelect");
2264
- function At(E) {
2269
+ u(At, "handleFileSelect");
2270
+ function Et(E) {
2265
2271
  g.value = g.value.filter((_, b) => b !== E);
2266
2272
  }
2267
- u(At, "removeAttachment");
2268
- function nt(E, _) {
2273
+ u(Et, "removeAttachment");
2274
+ function st(E, _) {
2269
2275
  if (_ === 0) {
2270
2276
  const pe = E[_];
2271
- return pe?.timestamp ? Fe(new Date(pe.timestamp)) : null;
2277
+ return pe?.timestamp ? He(new Date(pe.timestamp)) : null;
2272
2278
  }
2273
2279
  const b = E[_ - 1], z = E[_];
2274
2280
  if (!b?.timestamp || !z?.timestamp) return null;
2275
2281
  const I = new Date(b.timestamp).getTime();
2276
- return new Date(z.timestamp).getTime() - I > 36e5 ? Fe(new Date(z.timestamp)) : null;
2282
+ return new Date(z.timestamp).getTime() - I > 36e5 ? He(new Date(z.timestamp)) : null;
2277
2283
  }
2278
- u(nt, "shouldShowTimeDivider");
2279
- function Fe(E) {
2284
+ u(st, "shouldShowTimeDivider");
2285
+ function He(E) {
2280
2286
  const _ = /* @__PURE__ */ new Date(), b = E.toDateString() === _.toDateString(), z = new Date(_);
2281
2287
  z.setDate(z.getDate() - 1);
2282
2288
  const I = E.toDateString() === z.toDateString(), he = E.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2283
2289
  if (b) return he;
2284
2290
  if (I) return `Yesterday, ${he}`;
2285
- const P = E.getFullYear() === _.getFullYear();
2291
+ const N = E.getFullYear() === _.getFullYear();
2286
2292
  return `${E.toLocaleDateString("en-US", {
2287
2293
  weekday: "long",
2288
2294
  month: "short",
2289
2295
  day: "numeric",
2290
- ...P ? {} : { year: "numeric" }
2296
+ ...N ? {} : { year: "numeric" }
2291
2297
  })}, ${he}`;
2292
2298
  }
2293
- return u(Fe, "formatTimeDivider"), Qe(q, (E) => {
2294
- E.length > 0 && Nt(() => F());
2295
- }, { immediate: !0, deep: !0 }), (E, _) => (y(), T("div", Qr, [
2296
- L.value ? H("", !0) : (y(), T("div", Jr, [
2297
- $t(Bs, {
2299
+ return u(He, "formatTimeDivider"), Je(q, (E) => {
2300
+ E.length > 0 && $t(() => F());
2301
+ }, { immediate: !0, deep: !0 }), (E, _) => (y(), T("div", Zr, [
2302
+ L.value ? H("", !0) : (y(), T("div", Xr, [
2303
+ Ut(Us, {
2298
2304
  agent: l.agent,
2299
2305
  "is-online": O.value
2300
2306
  }, null, 8, ["agent", "is-online"])
@@ -2311,7 +2317,7 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2311
2317
  key: 2,
2312
2318
  class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2313
2319
  }, [
2314
- $t(Rn, { class: "size-4" })
2320
+ Ut(Dn, { class: "size-4" })
2315
2321
  ], 2)) : r.value ? (y(), T("div", {
2316
2322
  key: 3,
2317
2323
  class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", L.value ? "text-theme-300" : "text-white/30"])
@@ -2324,13 +2330,13 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2324
2330
  ref: f,
2325
2331
  class: "flex-1 overflow-y-auto overflow-x-hidden py-4 px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2326
2332
  }, [
2327
- q.value.length === 0 && !te.value && !xe.value ? (y(), T("div", ei, [
2328
- v("div", ti, [
2333
+ q.value.length === 0 && !te.value && !xe.value ? (y(), T("div", Kr, [
2334
+ v("div", Qr, [
2329
2335
  v("img", {
2330
2336
  src: l.agent.avatarUrl.value,
2331
2337
  alt: l.agent.displayName.value,
2332
2338
  class: A(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2333
- }, null, 10, ni),
2339
+ }, null, 10, Jr),
2334
2340
  O.value ? (y(), T("span", {
2335
2341
  key: 0,
2336
2342
  class: A(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
@@ -2361,18 +2367,18 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2361
2367
  class: A([a.value.icon, "size-3"])
2362
2368
  }, null, 2),
2363
2369
  v("span", null, ce(a.value.label), 1)
2364
- ], 10, si)
2370
+ ], 10, ei)
2365
2371
  ])) : H("", !0),
2366
- (y(!0), T(Se, null, dt(q.value, (b, z) => (y(), T(Se, {
2372
+ (y(!0), T(Se, null, gt(q.value, (b, z) => (y(), T(Se, {
2367
2373
  key: b.id
2368
2374
  }, [
2369
- nt(q.value, z) ? (y(), T("div", ri, [
2375
+ st(q.value, z) ? (y(), T("div", ti, [
2370
2376
  v("div", {
2371
2377
  class: A(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2372
2378
  }, null, 2),
2373
2379
  v("span", {
2374
2380
  class: A(["font-medium shrink-0", [L.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2375
- }, ce(nt(q.value, z)), 3),
2381
+ }, ce(st(q.value, z)), 3),
2376
2382
  v("div", {
2377
2383
  class: A(["flex-1 h-px", L.value ? "bg-theme-200" : "bg-white/10"])
2378
2384
  }, null, 2)
@@ -2393,7 +2399,7 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2393
2399
  src: l.agent.avatarUrl.value,
2394
2400
  alt: l.agent.displayName.value,
2395
2401
  class: A(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2396
- }, null, 10, ii)) : H("", !0)
2402
+ }, null, 10, ni)) : H("", !0)
2397
2403
  ], 2)) : H("", !0),
2398
2404
  v("div", {
2399
2405
  class: A(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
@@ -2402,18 +2408,18 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2402
2408
  key: 0,
2403
2409
  class: A(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2404
2410
  }, [
2405
- (y(!0), T(Se, null, dt(b.attachments, (I, he) => (y(), T(Se, { key: he }, [
2411
+ (y(!0), T(Se, null, gt(b.attachments, (I, he) => (y(), T(Se, { key: he }, [
2406
2412
  I.type === "image" ? (y(), T("img", {
2407
2413
  key: 0,
2408
2414
  src: I.url,
2409
2415
  alt: I.name,
2410
2416
  class: A(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2411
- }, null, 10, ai)) : I.type === "audio" ? (y(), T("audio", {
2417
+ }, null, 10, si)) : I.type === "audio" ? (y(), T("audio", {
2412
2418
  key: 1,
2413
2419
  src: I.url,
2414
2420
  controls: "",
2415
2421
  class: "max-w-full"
2416
- }, null, 8, li)) : (y(), T("a", {
2422
+ }, null, 8, ri)) : (y(), T("a", {
2417
2423
  key: 2,
2418
2424
  href: I.url,
2419
2425
  target: "_blank",
@@ -2421,8 +2427,8 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2421
2427
  class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", L.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2422
2428
  }, [
2423
2429
  _[3] || (_[3] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2424
- vs(" " + ce(I.name), 1)
2425
- ], 10, oi))
2430
+ ws(" " + ce(I.name), 1)
2431
+ ], 10, ii))
2426
2432
  ], 64))), 128))
2427
2433
  ], 2)) : H("", !0),
2428
2434
  b.text ? (y(), T("div", {
@@ -2435,18 +2441,18 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2435
2441
  b.sender === "user" || !L.value ? "chat-msg-prose-invert" : ""
2436
2442
  ]]),
2437
2443
  innerHTML: e(b.text)
2438
- }, null, 10, ci)
2444
+ }, null, 10, ai)
2439
2445
  ], 2)) : H("", !0)
2440
2446
  ], 2)
2441
2447
  ], 2)
2442
2448
  ], 64))), 128)),
2443
- me.value ? (y(), T("div", ui, [
2444
- v("div", hi, [
2449
+ me.value ? (y(), T("div", li, [
2450
+ v("div", oi, [
2445
2451
  v("img", {
2446
2452
  src: l.agent.avatarUrl.value,
2447
2453
  alt: l.agent.displayName.value,
2448
2454
  class: A(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2449
- }, null, 10, pi)
2455
+ }, null, 10, ci)
2450
2456
  ]),
2451
2457
  v("div", {
2452
2458
  class: A(["rounded-2xl px-4 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
@@ -2457,9 +2463,9 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2457
2463
  ], 2)
2458
2464
  ])) : H("", !0)
2459
2465
  ], 512),
2460
- v("div", fi, [
2461
- g.value.length > 0 ? (y(), T("div", di, [
2462
- (y(!0), T(Se, null, dt(g.value, (b, z) => (y(), T("div", {
2466
+ v("div", ui, [
2467
+ g.value.length > 0 ? (y(), T("div", hi, [
2468
+ (y(!0), T(Se, null, gt(g.value, (b, z) => (y(), T("div", {
2463
2469
  key: z,
2464
2470
  class: "relative shrink-0 group"
2465
2471
  }, [
@@ -2468,22 +2474,22 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2468
2474
  src: b.url,
2469
2475
  alt: b.name,
2470
2476
  class: A(["size-14 rounded-lg object-cover border", L.value ? "border-theme-200" : "border-white/20"])
2471
- }, null, 10, gi)) : (y(), T("div", {
2477
+ }, null, 10, pi)) : (y(), T("div", {
2472
2478
  key: 1,
2473
2479
  class: A(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", L.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2474
2480
  }, [
2475
2481
  _[4] || (_[4] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2476
- v("span", mi, ce(b.name), 1)
2482
+ v("span", fi, ce(b.name), 1)
2477
2483
  ], 2)),
2478
2484
  v("button", {
2479
2485
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
2480
- onClick: /* @__PURE__ */ u((I) => At(z), "onClick")
2486
+ onClick: /* @__PURE__ */ u((I) => Et(z), "onClick")
2481
2487
  }, [..._[5] || (_[5] = [
2482
2488
  v("i", { class: "i-tabler-x size-3" }, null, -1)
2483
- ])], 8, xi)
2489
+ ])], 8, di)
2484
2490
  ]))), 128)),
2485
- m.value ? (y(), T("div", ki, [
2486
- $t(Rn, { class: "size-5" })
2491
+ m.value ? (y(), T("div", gi, [
2492
+ Ut(Dn, { class: "size-5" })
2487
2493
  ])) : H("", !0)
2488
2494
  ])) : H("", !0),
2489
2495
  l.uploadFn ? (y(), T("input", {
@@ -2493,7 +2499,7 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2493
2499
  type: "file",
2494
2500
  accept: "image/*,audio/*,video/*",
2495
2501
  class: "hidden",
2496
- onChange: St
2502
+ onChange: At
2497
2503
  }, null, 544)) : H("", !0),
2498
2504
  v("div", {
2499
2505
  class: A(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", L.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
@@ -2506,11 +2512,11 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2506
2512
  m.value ? "opacity-50 pointer-events-none" : ""
2507
2513
  ]]),
2508
2514
  disabled: ne.value || m.value,
2509
- onClick: Be
2515
+ onClick: Fe
2510
2516
  }, [
2511
- m.value ? (y(), T("i", wi)) : (y(), T("i", vi))
2512
- ], 10, bi)) : H("", !0),
2513
- Vn(v("textarea", {
2517
+ m.value ? (y(), T("i", xi)) : (y(), T("i", ki))
2518
+ ], 10, mi)) : H("", !0),
2519
+ Yn(v("textarea", {
2514
2520
  ref_key: "textarea",
2515
2521
  ref: d,
2516
2522
  "onUpdate:modelValue": _[0] || (_[0] = (b) => c.value = b),
@@ -2518,22 +2524,22 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2518
2524
  enterkeyhint: "send",
2519
2525
  placeholder: ue.value,
2520
2526
  disabled: ne.value,
2521
- style: ys({ fontSize: (o.value, "16px"), resize: "none" }),
2527
+ style: vs({ fontSize: (o.value, "16px"), resize: "none" }),
2522
2528
  class: A(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2523
- onKeydown: Tt
2524
- }, null, 46, yi), [
2525
- [Yn, c.value]
2529
+ onKeydown: St
2530
+ }, null, 46, bi), [
2531
+ [Zn, c.value]
2526
2532
  ]),
2527
2533
  v("button", {
2528
2534
  class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2529
2535
  o.value ? "size-10" : "size-9",
2530
- et.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : L.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2536
+ tt.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : L.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2531
2537
  ]]),
2532
- disabled: !et.value,
2533
- onClick: _[1] || (_[1] = (b) => tt())
2538
+ disabled: !tt.value,
2539
+ onClick: _[1] || (_[1] = (b) => nt())
2534
2540
  }, [..._[6] || (_[6] = [
2535
2541
  v("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2536
- ])], 10, Ti)
2542
+ ])], 10, wi)
2537
2543
  ], 2),
2538
2544
  v("div", {
2539
2545
  class: A(["text-[10px] text-center mt-2 select-none", L.value ? "text-theme-300" : "text-white/40"])
@@ -2541,10 +2547,10 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2541
2547
  ])
2542
2548
  ]));
2543
2549
  }
2544
- }), Si = { class: "agent-wrap" }, Ai = {
2550
+ }), vi = { class: "agent-wrap" }, yi = {
2545
2551
  key: 0,
2546
2552
  class: "flex items-center justify-center h-full"
2547
- }, Pi = /* @__PURE__ */ _e({
2553
+ }, Li = /* @__PURE__ */ _e({
2548
2554
  __name: "AgentWrap",
2549
2555
  props: {
2550
2556
  sdk: {},
@@ -2558,11 +2564,11 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2558
2564
  apiBase: {}
2559
2565
  },
2560
2566
  setup(l) {
2561
- const t = As("AgentWrap"), e = l, n = e.sdk || Es.getInstance({
2567
+ const t = Ss("AgentWrap"), e = l, n = e.sdk || As.getInstance({
2562
2568
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2563
2569
  ...e.apiBase && { apiBase: e.apiBase }
2564
- }), s = Q(!e.agent), r = Ts(e.agent ? new xt({ config: e.agent }) : void 0), a = Q();
2565
- return Zt(async () => {
2570
+ }), s = Q(!e.agent), r = ys(e.agent ? new kt({ config: e.agent }) : void 0), a = Q();
2571
+ return Xt(async () => {
2566
2572
  if (e.agent) {
2567
2573
  t.debug("Agent provided via props, skipping fetch", {
2568
2574
  agentId: e.agent.agentId,
@@ -2588,7 +2594,7 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2588
2594
  try {
2589
2595
  s.value = !0, t.debug("Fetching public agent", { handle: e.handle });
2590
2596
  const o = await n.getPublicAgent({ handle: e.handle });
2591
- o ? (r.value = new xt({ config: o }), t.debug("Successfully fetched public agent", {
2597
+ o ? (r.value = new kt({ config: o }), t.debug("Successfully fetched public agent", {
2592
2598
  agentId: o.agentId,
2593
2599
  handle: o.handle
2594
2600
  }), o.agentId && n.track({
@@ -2638,12 +2644,12 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2638
2644
  }
2639
2645
  });
2640
2646
  }
2641
- }), (o, c) => (y(), T("div", Si, [
2642
- s.value ? (y(), T("div", Ai, [...c[0] || (c[0] = [
2647
+ }), (o, c) => (y(), T("div", vi, [
2648
+ s.value ? (y(), T("div", yi, [...c[0] || (c[0] = [
2643
2649
  v("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2644
- ])])) : r.value ? qn(o.$slots, "default", {
2650
+ ])])) : r.value ? Vn(o.$slots, "default", {
2645
2651
  key: 1,
2646
- sdk: jt(n),
2652
+ sdk: qt(n),
2647
2653
  agent: r.value,
2648
2654
  context: l.context,
2649
2655
  firstMessage: l.firstMessage,
@@ -2655,16 +2661,16 @@ const Qr = { class: "flex flex-col h-full relative" }, Jr = {
2655
2661
  }
2656
2662
  });
2657
2663
  export {
2658
- Dn as A,
2659
- Pi as _,
2660
- Oi as a,
2661
- Li as b,
2662
- Mi as c,
2663
- zi as d,
2664
- Rn as e,
2665
- Bs as f,
2666
- Ci as g,
2667
- In as h,
2668
- Ii as p
2664
+ Cn as A,
2665
+ Li as _,
2666
+ Mi as a,
2667
+ Ci as b,
2668
+ Di as c,
2669
+ Ii as d,
2670
+ Dn as e,
2671
+ Us as f,
2672
+ _i as g,
2673
+ Mn as h,
2674
+ Ri as p
2669
2675
  };
2670
2676
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map