@pagelines/sdk 1.0.504 → 1.0.505

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,11 +1,11 @@
1
1
  var Mn = Object.defineProperty;
2
- var _s = (a, t, e) => t in a ? Mn(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
2
+ var Rs = (a, t, e) => t in a ? Mn(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
3
  var h = (a, t) => Mn(a, "name", { value: t, configurable: !0 });
4
- var C = (a, t, e) => _s(a, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as Me, openBlock as T, createElementBlock as S, createElementVNode as w, normalizeClass as A, ref as ee, watch as ot, computed as W, createCommentVNode as B, renderSlot as ns, onMounted as tn, Fragment as Te, renderList as it, withDirectives as ss, vModelText as rs, unref as Kt, toDisplayString as ie, nextTick as jt, createVNode as Wt, createTextVNode as Je, withModifiers as Rs, shallowRef as Is } from "vue";
6
- import { SettingsObject as Cs, Agent as yt, getDefaultAvatarUrl as is, createLogger as Ds } from "@pagelines/core";
7
- import { P as Ms } from "./sdkClient.js";
8
- const Ls = { class: "spinner max-w-sm" }, Os = {
4
+ var I = (a, t, e) => Rs(a, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as Me, openBlock as T, createElementBlock as S, createElementVNode as w, normalizeClass as A, ref as ee, watch as Ye, computed as W, createCommentVNode as U, renderSlot as ns, onMounted as tn, Fragment as Te, renderList as at, withDirectives as ss, vModelText as rs, unref as Kt, toDisplayString as ie, nextTick as jt, createVNode as Wt, createTextVNode as et, withModifiers as Cs, shallowRef as Is } from "vue";
6
+ import { SettingsObject as Ds, Agent as yt, getDefaultAvatarUrl as is, createLogger as Ms } from "@pagelines/core";
7
+ import { P as Ls } from "./sdkClient.js";
8
+ const Os = { class: "spinner max-w-sm" }, zs = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
11
  }, Ln = /* @__PURE__ */ Me({
@@ -15,8 +15,8 @@ const Ls = { class: "spinner max-w-sm" }, Os = {
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(a) {
18
- return (t, e) => (T(), S("div", Ls, [
19
- (T(), S("svg", Os, [
18
+ return (t, e) => (T(), S("div", Os, [
19
+ (T(), S("svg", zs, [
20
20
  w("circle", {
21
21
  class: A([a.colorMode, "ring-path"]),
22
22
  cx: "50",
@@ -30,27 +30,27 @@ const Ls = { class: "spinner max-w-sm" }, Os = {
30
30
  ]))
31
31
  ]));
32
32
  }
33
- }), zs = [
33
+ }), Ps = [
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
- ], Ps = 9e4, pn = class pn extends Cs {
36
+ ], Ns = 9e4, as = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), $s = /* @__PURE__ */ new Set([...as, "EMPTY_STREAM", "RATE_LIMIT"]), pn = class pn extends Ds {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
- C(this, "isTextMode", !1);
40
- C(this, "lastMessage", { hash: "", time: 0 });
41
- C(this, "isConnecting", !1);
39
+ I(this, "isTextMode", !1);
40
+ I(this, "lastMessage", { hash: "", time: 0 });
41
+ I(this, "isConnecting", !1);
42
42
  // Chat conversation tracking (server-managed persistence)
43
- C(this, "conversationId");
44
- C(this, "textState", ee({
43
+ I(this, "conversationId");
44
+ I(this, "textState", ee({
45
45
  isActive: !1,
46
46
  isConnected: !1,
47
47
  isThinking: !1,
48
48
  connectionStatus: "disconnected"
49
49
  }));
50
- C(this, "agentMode", ee("self"));
51
- C(this, "sharedMessages", ee([]));
52
- C(this, "_agent");
53
- this._agent = e.agent instanceof yt ? e.agent : new yt({ config: e.agent }), this.setupModeWatcher();
50
+ I(this, "agentMode", ee("self"));
51
+ I(this, "sharedMessages", ee([]));
52
+ I(this, "_agent");
53
+ this._agent = e.agent instanceof yt ? e.agent : new yt({ config: e.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher();
54
54
  }
55
55
  get chatEnabled() {
56
56
  return this._agent.chatAvailable.value;
@@ -122,10 +122,29 @@ Current User:
122
122
  });
123
123
  }
124
124
  setupModeWatcher() {
125
- ot(this.agentMode, async (e, n) => {
125
+ Ye(this.agentMode, async (e, n) => {
126
126
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
127
127
  });
128
128
  }
129
+ setupAvailabilityWatcher() {
130
+ Ye(() => this._agent.chatAvailable.value, (e) => {
131
+ if (!(!this.isTextMode || this.isConnecting)) {
132
+ if (e) {
133
+ this.textState.value.isConnected || this.updateState(this.textState, {
134
+ isConnected: !0,
135
+ connectionStatus: "connected",
136
+ error: void 0
137
+ });
138
+ return;
139
+ }
140
+ this.textState.value.isConnected && this.updateState(this.textState, {
141
+ isConnected: !1,
142
+ connectionStatus: "disconnected",
143
+ error: this.chatUnavailableReason
144
+ });
145
+ }
146
+ });
147
+ }
129
148
  /**
130
149
  * Hard error path. Resets the connection and surfaces an inline bubble so
131
150
  * the user actually sees what happened — `connectionStatus: 'error'`
@@ -223,7 +242,7 @@ Current User:
223
242
  const g = this.sharedMessages.value, y = g[g.length - 1];
224
243
  if (y?.id === o && y.text) {
225
244
  let E = y.text;
226
- for (const O of zs)
245
+ for (const O of Ps)
227
246
  O.pattern.test(E) && (console.debug(`[chat] filtered directive: ${O.label}`), E = E.replace(O.pattern, "").trim(), O.pattern.lastIndex = 0);
228
247
  E ? E !== y.text && (y.text = E, this.sharedMessages.value = [...g]) : this.sharedMessages.value = g.slice(0, -1);
229
248
  }
@@ -231,9 +250,15 @@ Current User:
231
250
  }, "onDone"), b = /* @__PURE__ */ h((d) => {
232
251
  const g = this.sharedMessages.value, y = g[g.length - 1];
233
252
  if (y?.id === o && !y.text && (this.sharedMessages.value = g.slice(0, -1)), typeof d == "object" && d.code && d.error) {
234
- const { bucket: ae, actionUrl: ce, actionLabel: ne, help: N } = d;
235
- if (ae !== void 0 || (/* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP", "EMPTY_STREAM", "RATE_LIMIT"])).has(d.code)) {
236
- const Q = ae && ce && ne ? { code: d.code, bucket: ae, actionLabel: ne, actionUrl: ce, ...N ? { help: N } : {} } : void 0;
253
+ const { bucket: ce, actionUrl: ue, actionLabel: ne, help: N } = d;
254
+ if (ce !== void 0 || $s.has(d.code)) {
255
+ const ae = ce ?? (as.has(d.code) ? "account" : "error"), Q = {
256
+ code: d.code,
257
+ bucket: ae,
258
+ ...ne ? { actionLabel: ne } : {},
259
+ ...ue ? { actionUrl: ue } : {},
260
+ ...N ? { help: N } : {}
261
+ };
237
262
  this.addMessage(d.error, "system", void 0, Q), ae === "account" ? this.updateState(this.textState, { isThinking: !1, accountGated: !0 }) : this.updateState(this.textState, { isThinking: !1 });
238
263
  } else
239
264
  this.handleError(new Error(d.error));
@@ -267,7 +292,7 @@ Current User:
267
292
  });
268
293
  await Promise.race([
269
294
  d,
270
- new Promise((g, y) => setTimeout(() => y(new Error("timed out")), Ps))
295
+ new Promise((g, y) => setTimeout(() => y(new Error("timed out")), Ns))
271
296
  ]);
272
297
  } catch (d) {
273
298
  b(d.message || "Something went wrong");
@@ -300,24 +325,24 @@ function zn(a) {
300
325
  return a ? typeof a == "string" ? a : a.src || "" : "";
301
326
  }
302
327
  h(zn, "getImageSrc");
303
- function Gi(a) {
328
+ function Wi(a) {
304
329
  return zn(a.cover) || zn(a.avatar) || is(a.name);
305
330
  }
306
- h(Gi, "getAgentAvatarUrl");
331
+ h(Wi, "getAgentAvatarUrl");
307
332
  function Pn(a) {
308
333
  const t = a.target;
309
334
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = is());
310
335
  }
311
336
  h(Pn, "handleImageError");
312
- function ji(a) {
337
+ function qi(a) {
313
338
  const { template: t, agent: e } = a;
314
339
  return t.replace(/{name}/g, e.name || "Assistant").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
315
340
  }
316
- h(ji, "parseButtonTemplate");
317
- const Ns = {
341
+ h(qi, "parseButtonTemplate");
342
+ const Us = {
318
343
  key: 0,
319
344
  class: "absolute inset-0 flex items-center justify-center"
320
- }, Wi = /* @__PURE__ */ Me({
345
+ }, Vi = /* @__PURE__ */ Me({
321
346
  __name: "ElAgentButton",
322
347
  props: {
323
348
  theme: { default: "primary" },
@@ -344,25 +369,25 @@ const Ns = {
344
369
  return (r, s) => (T(), S("button", {
345
370
  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]])
346
371
  }, [
347
- a.loading ? (T(), S("div", Ns, [...s[0] || (s[0] = [
372
+ a.loading ? (T(), S("div", Us, [...s[0] || (s[0] = [
348
373
  w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
349
- ])])) : B("", !0),
374
+ ])])) : U("", !0),
350
375
  w("span", {
351
376
  class: A(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
352
377
  }, [
353
378
  a.icon ? (T(), S("i", {
354
379
  key: 0,
355
380
  class: A([a.icon, n.value])
356
- }, null, 2)) : B("", !0),
381
+ }, null, 2)) : U("", !0),
357
382
  ns(r.$slots, "default"),
358
383
  a.iconAfter ? (T(), S("i", {
359
384
  key: 1,
360
385
  class: A([a.iconAfter, n.value])
361
- }, null, 2)) : B("", !0)
386
+ }, null, 2)) : U("", !0)
362
387
  ], 2)
363
388
  ], 2));
364
389
  }
365
- }), $s = ["value"], qi = /* @__PURE__ */ Me({
390
+ }), Bs = ["value"], Yi = /* @__PURE__ */ Me({
366
391
  __name: "AgentInputEmail",
367
392
  props: {
368
393
  modelValue: { default: "" }
@@ -378,9 +403,9 @@ const Ns = {
378
403
  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",
379
404
  style: { "font-size": "16px" },
380
405
  onInput: r[0] || (r[0] = (s) => e("update:modelValue", s.target.value))
381
- }, null, 40, $s));
406
+ }, null, 40, Bs));
382
407
  }
383
- }), Bs = { class: "flex gap-1.5 justify-center" }, Us = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Vi = /* @__PURE__ */ Me({
408
+ }), Fs = { class: "flex gap-1.5 justify-center" }, Hs = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Zi = /* @__PURE__ */ Me({
384
409
  __name: "AgentInputOneTimeCode",
385
410
  props: {
386
411
  modelValue: {},
@@ -392,9 +417,9 @@ const Ns = {
392
417
  const e = a, n = t, r = ee([]), s = ee(Array.from({ length: e.length }).fill("")), o = ee(!1);
393
418
  tn(() => {
394
419
  e.modelValue && (s.value = e.modelValue.split("").slice(0, e.length)), e.focusFirst && !("ontouchstart" in window) && r.value[0]?.focus();
395
- }), ot(() => e.modelValue, (p) => {
420
+ }), Ye(() => e.modelValue, (p) => {
396
421
  s.value = p ? p.split("").slice(0, e.length) : Array.from({ length: e.length }).fill("");
397
- }), ot(s, () => {
422
+ }), Ye(s, () => {
398
423
  const p = s.value.filter(Boolean).join("");
399
424
  n("update:modelValue", p), p.length === e.length && n("autoSubmit", p);
400
425
  }, { deep: !0 });
@@ -407,8 +432,8 @@ const Ns = {
407
432
  }, 10);
408
433
  else {
409
434
  const y = [...s.value];
410
- g.split("").slice(0, e.length - p).forEach((O, ae) => {
411
- y[p + ae] = O;
435
+ g.split("").slice(0, e.length - p).forEach((O, ce) => {
436
+ y[p + ce] = O;
412
437
  }), s.value = y;
413
438
  const E = Math.min(p + g.length, e.length - 1);
414
439
  setTimeout(() => {
@@ -431,8 +456,8 @@ const Ns = {
431
456
  for (let d = p; d < e.length; d++)
432
457
  s.value[d] = "";
433
458
  }
434
- return h(b, "onFocus"), (p, d) => (T(), S("div", Bs, [
435
- (T(!0), S(Te, null, it(a.length, (g) => ss((T(), S("input", {
459
+ return h(b, "onFocus"), (p, d) => (T(), S("div", Fs, [
460
+ (T(!0), S(Te, null, at(a.length, (g) => ss((T(), S("input", {
436
461
  key: g,
437
462
  ref_for: !0,
438
463
  ref: /* @__PURE__ */ h((y) => r.value[g - 1] = y, "ref"),
@@ -447,15 +472,15 @@ const Ns = {
447
472
  onKeydown: /* @__PURE__ */ h((y) => c(g - 1, y), "onKeydown"),
448
473
  onPaste: /* @__PURE__ */ h((y) => l(g - 1, y), "onPaste"),
449
474
  onFocus: /* @__PURE__ */ h((y) => b(g - 1), "onFocus")
450
- }, null, 40, Us)), [
475
+ }, null, 40, Hs)), [
451
476
  [rs, s.value[g - 1]]
452
477
  ])), 128))
453
478
  ]));
454
479
  }
455
- }), Fs = { class: "relative flex-shrink-0" }, Hs = ["src", "alt"], Gs = { class: "absolute top-1 right-1" }, js = {
480
+ }), Gs = { class: "relative flex-shrink-0" }, js = ["src", "alt"], Ws = { class: "absolute top-1 right-1" }, qs = {
456
481
  key: 1,
457
482
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
458
- }, Ws = { class: "min-w-0" }, qs = /* @__PURE__ */ Me({
483
+ }, Vs = { class: "min-w-0" }, Ys = /* @__PURE__ */ Me({
459
484
  __name: "ElModeHeader",
460
485
  props: {
461
486
  agent: {},
@@ -469,7 +494,7 @@ const Ns = {
469
494
  a.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
470
495
  ]])
471
496
  }, [
472
- w("div", Fs, [
497
+ w("div", Gs, [
473
498
  w("div", {
474
499
  class: A(["rounded-full overflow-hidden border-white", a.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
475
500
  }, [
@@ -479,19 +504,19 @@ const Ns = {
479
504
  class: "w-full h-full object-cover",
480
505
  onError: e[0] || (e[0] = //@ts-ignore
481
506
  (...n) => Kt(Pn) && Kt(Pn)(...n))
482
- }, null, 40, Hs)
507
+ }, null, 40, js)
483
508
  ], 2),
484
- w("div", Gs, [
509
+ w("div", Ws, [
485
510
  a.isOnline ? (T(), S(Te, { key: 0 }, [
486
511
  e[1] || (e[1] = w("div", {
487
512
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
488
513
  style: { "animation-duration": "3s" }
489
514
  }, null, -1)),
490
515
  e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
491
- ], 64)) : (T(), S("div", js))
516
+ ], 64)) : (T(), S("div", qs))
492
517
  ])
493
518
  ]),
494
- w("div", Ws, [
519
+ w("div", Vs, [
495
520
  w("h1", {
496
521
  class: A(["font-light text-white mb-1 truncate", [
497
522
  a.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
@@ -509,11 +534,11 @@ const Ns = {
509
534
  }
510
535
  });
511
536
  const {
512
- entries: as,
537
+ entries: ls,
513
538
  setPrototypeOf: Nn,
514
- isFrozen: Vs,
515
- getPrototypeOf: Ys,
516
- getOwnPropertyDescriptor: Zs
539
+ isFrozen: Zs,
540
+ getPrototypeOf: Xs,
541
+ getOwnPropertyDescriptor: Ks
517
542
  } = Object;
518
543
  let {
519
544
  freeze: te,
@@ -539,7 +564,7 @@ Jt || (Jt = /* @__PURE__ */ h(function(t) {
539
564
  n[r - 1] = arguments[r];
540
565
  return new t(...n);
541
566
  }, "construct"));
542
- const et = G(Array.prototype.forEach), Xs = G(Array.prototype.lastIndexOf), $n = G(Array.prototype.pop), tt = G(Array.prototype.push), Ks = G(Array.prototype.splice), J = Array.isArray, at = G(String.prototype.toLowerCase), qt = G(String.prototype.toString), Bn = G(String.prototype.match), Fe = G(String.prototype.replace), Un = G(String.prototype.indexOf), Qs = G(String.prototype.trim), Js = G(Number.prototype.toString), er = G(Boolean.prototype.toString), Fn = typeof BigInt > "u" ? null : G(BigInt.prototype.toString), Hn = typeof Symbol > "u" ? null : G(Symbol.prototype.toString), $ = G(Object.prototype.hasOwnProperty), nt = G(Object.prototype.toString), Z = G(RegExp.prototype.test), xt = tr(TypeError);
567
+ const tt = G(Array.prototype.forEach), Qs = G(Array.prototype.lastIndexOf), $n = G(Array.prototype.pop), nt = G(Array.prototype.push), Js = G(Array.prototype.splice), J = Array.isArray, lt = G(String.prototype.toLowerCase), qt = G(String.prototype.toString), Un = G(String.prototype.match), Fe = G(String.prototype.replace), Bn = G(String.prototype.indexOf), er = G(String.prototype.trim), tr = G(Number.prototype.toString), nr = G(Boolean.prototype.toString), Fn = typeof BigInt > "u" ? null : G(BigInt.prototype.toString), Hn = typeof Symbol > "u" ? null : G(Symbol.prototype.toString), $ = G(Object.prototype.hasOwnProperty), st = G(Object.prototype.toString), Z = G(RegExp.prototype.test), xt = sr(TypeError);
543
568
  function G(a) {
544
569
  return function(t) {
545
570
  t instanceof RegExp && (t.lastIndex = 0);
@@ -549,16 +574,16 @@ function G(a) {
549
574
  };
550
575
  }
551
576
  h(G, "unapply");
552
- function tr(a) {
577
+ function sr(a) {
553
578
  return function() {
554
579
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
555
580
  e[n] = arguments[n];
556
581
  return Jt(a, e);
557
582
  };
558
583
  }
559
- h(tr, "unconstruct");
584
+ h(sr, "unconstruct");
560
585
  function R(a, t) {
561
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : at;
586
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : lt;
562
587
  if (Nn && Nn(a, null), !J(t))
563
588
  return a;
564
589
  let n = t.length;
@@ -566,66 +591,66 @@ function R(a, t) {
566
591
  let r = t[n];
567
592
  if (typeof r == "string") {
568
593
  const s = e(r);
569
- s !== r && (Vs(t) || (t[n] = s), r = s);
594
+ s !== r && (Zs(t) || (t[n] = s), r = s);
570
595
  }
571
596
  a[r] = !0;
572
597
  }
573
598
  return a;
574
599
  }
575
600
  h(R, "addToSet");
576
- function nr(a) {
601
+ function rr(a) {
577
602
  for (let t = 0; t < a.length; t++)
578
603
  $(a, t) || (a[t] = null);
579
604
  return a;
580
605
  }
581
- h(nr, "cleanArray");
606
+ h(rr, "cleanArray");
582
607
  function re(a) {
583
608
  const t = He(null);
584
- for (const [e, n] of as(a))
585
- $(a, e) && (J(n) ? t[e] = nr(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = re(n) : t[e] = n);
609
+ for (const [e, n] of ls(a))
610
+ $(a, e) && (J(n) ? t[e] = rr(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = re(n) : t[e] = n);
586
611
  return t;
587
612
  }
588
613
  h(re, "clone");
589
- function sr(a) {
614
+ function ir(a) {
590
615
  switch (typeof a) {
591
616
  case "string":
592
617
  return a;
593
618
  case "number":
594
- return Js(a);
619
+ return tr(a);
595
620
  case "boolean":
596
- return er(a);
621
+ return nr(a);
597
622
  case "bigint":
598
623
  return Fn ? Fn(a) : "0";
599
624
  case "symbol":
600
625
  return Hn ? Hn(a) : "Symbol()";
601
626
  case "undefined":
602
- return nt(a);
627
+ return st(a);
603
628
  case "function":
604
629
  case "object": {
605
630
  if (a === null)
606
- return nt(a);
631
+ return st(a);
607
632
  const t = a, e = Ge(t, "toString");
608
633
  if (typeof e == "function") {
609
634
  const n = e(t);
610
- return typeof n == "string" ? n : nt(n);
635
+ return typeof n == "string" ? n : st(n);
611
636
  }
612
- return nt(a);
637
+ return st(a);
613
638
  }
614
639
  default:
615
- return nt(a);
640
+ return st(a);
616
641
  }
617
642
  }
618
- h(sr, "stringifyValue");
643
+ h(ir, "stringifyValue");
619
644
  function Ge(a, t) {
620
645
  for (; a !== null; ) {
621
- const n = Zs(a, t);
646
+ const n = Ks(a, t);
622
647
  if (n) {
623
648
  if (n.get)
624
649
  return G(n.get);
625
650
  if (typeof n.value == "function")
626
651
  return G(n.value);
627
652
  }
628
- a = Ys(a);
653
+ a = Xs(a);
629
654
  }
630
655
  function e() {
631
656
  return null;
@@ -633,44 +658,44 @@ function Ge(a, t) {
633
658
  return h(e, "fallbackValue"), e;
634
659
  }
635
660
  h(Ge, "lookupGetter");
636
- function rr(a) {
661
+ function ar(a) {
637
662
  try {
638
663
  return Z(a, ""), !0;
639
664
  } catch {
640
665
  return !1;
641
666
  }
642
667
  }
643
- h(rr, "isRegex");
644
- const Gn = te(["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"]), Vt = te(["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"]), Yt = te(["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"]), ir = te(["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"]), Zt = te(["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"]), ar = te(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), jn = te(["#text"]), Wn = te(["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"]), Xt = te(["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"]), qn = te(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), kt = te(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), lr = oe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), or = oe(/<%[\w\W]*|[\w\W]*%>/gm), cr = oe(/\$\{[\w\W]*/gm), ur = oe(/^data-[\-\w.\u00B7-\uFFFF]+$/), hr = oe(/^aria-[\-\w]+$/), ls = oe(
668
+ h(ar, "isRegex");
669
+ const Gn = te(["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"]), Vt = te(["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"]), Yt = te(["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"]), lr = te(["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"]), Zt = te(["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"]), or = te(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), jn = te(["#text"]), Wn = te(["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"]), Xt = te(["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"]), qn = te(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), kt = te(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), cr = oe(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ur = oe(/<%[\w\W]*|[\w\W]*%>/gm), hr = oe(/\$\{[\w\W]*/gm), pr = oe(/^data-[\-\w.\u00B7-\uFFFF]+$/), dr = oe(/^aria-[\-\w]+$/), os = oe(
645
670
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
646
671
  // eslint-disable-line no-useless-escape
647
- ), pr = oe(/^(?:\w+script|data):/i), dr = oe(
672
+ ), fr = oe(/^(?:\w+script|data):/i), gr = oe(
648
673
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
649
674
  // eslint-disable-line no-control-regex
650
- ), os = oe(/^html$/i), fr = oe(/^[a-z][.\w]*(-[.\w]+)+$/i);
675
+ ), cs = oe(/^html$/i), mr = oe(/^[a-z][.\w]*(-[.\w]+)+$/i);
651
676
  var Vn = /* @__PURE__ */ Object.freeze({
652
677
  __proto__: null,
653
- ARIA_ATTR: hr,
654
- ATTR_WHITESPACE: dr,
655
- CUSTOM_ELEMENT: fr,
656
- DATA_ATTR: ur,
657
- DOCTYPE_NAME: os,
658
- ERB_EXPR: or,
659
- IS_ALLOWED_URI: ls,
660
- IS_SCRIPT_OR_DATA: pr,
661
- MUSTACHE_EXPR: lr,
662
- TMPLIT_EXPR: cr
678
+ ARIA_ATTR: dr,
679
+ ATTR_WHITESPACE: gr,
680
+ CUSTOM_ELEMENT: mr,
681
+ DATA_ATTR: pr,
682
+ DOCTYPE_NAME: cs,
683
+ ERB_EXPR: ur,
684
+ IS_ALLOWED_URI: os,
685
+ IS_SCRIPT_OR_DATA: fr,
686
+ MUSTACHE_EXPR: cr,
687
+ TMPLIT_EXPR: hr
663
688
  });
664
- const st = {
689
+ const rt = {
665
690
  element: 1,
666
691
  text: 3,
667
692
  // Deprecated
668
693
  progressingInstruction: 7,
669
694
  comment: 8,
670
695
  document: 9
671
- }, gr = /* @__PURE__ */ h(function() {
696
+ }, br = /* @__PURE__ */ h(function() {
672
697
  return typeof window > "u" ? null : window;
673
- }, "getGlobal"), mr = /* @__PURE__ */ h(function(t, e) {
698
+ }, "getGlobal"), xr = /* @__PURE__ */ h(function(t, e) {
674
699
  if (typeof t != "object" || typeof t.createPolicy != "function")
675
700
  return null;
676
701
  let n = null;
@@ -702,10 +727,10 @@ const st = {
702
727
  uponSanitizeShadowNode: []
703
728
  };
704
729
  }, "_createHooksMap");
705
- function cs() {
706
- let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gr();
707
- const t = /* @__PURE__ */ h((v) => cs(v), "DOMPurify");
708
- if (t.version = "3.4.1", t.removed = [], !a || !a.document || a.document.nodeType !== st.document || !a.Element)
730
+ function us() {
731
+ let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : br();
732
+ const t = /* @__PURE__ */ h((v) => us(v), "DOMPurify");
733
+ if (t.version = "3.4.1", t.removed = [], !a || !a.document || a.document.nodeType !== rt.document || !a.Element)
709
734
  return t.isSupported = !1, t;
710
735
  let {
711
736
  document: e
@@ -720,36 +745,36 @@ function cs() {
720
745
  HTMLFormElement: p,
721
746
  DOMParser: d,
722
747
  trustedTypes: g
723
- } = a, y = m.prototype, E = Ge(y, "cloneNode"), O = Ge(y, "remove"), ae = Ge(y, "nextSibling"), ce = Ge(y, "childNodes"), ne = Ge(y, "parentNode");
748
+ } = a, y = m.prototype, E = Ge(y, "cloneNode"), O = Ge(y, "remove"), ce = Ge(y, "nextSibling"), ue = Ge(y, "childNodes"), ne = Ge(y, "parentNode");
724
749
  if (typeof o == "function") {
725
750
  const v = e.createElement("template");
726
751
  v.content && v.content.ownerDocument && (e = v.content.ownerDocument);
727
752
  }
728
753
  let N, Y = "";
729
754
  const {
730
- implementation: ue,
755
+ implementation: ae,
731
756
  createNodeIterator: Q,
732
757
  createDocumentFragment: _t,
733
758
  getElementsByTagName: ut
734
759
  } = e, {
735
- importNode: I
760
+ importNode: C
736
761
  } = n;
737
762
  let q = Yn();
738
- t.isSupported = typeof as == "function" && typeof ne == "function" && ue && ue.createHTMLDocument !== void 0;
763
+ t.isSupported = typeof ls == "function" && typeof ne == "function" && ae && ae.createHTMLDocument !== void 0;
739
764
  const {
740
765
  MUSTACHE_EXPR: we,
741
766
  ERB_EXPR: Oe,
742
767
  TMPLIT_EXPR: ye,
743
768
  DATA_ATTR: Rt,
744
- ARIA_ATTR: It,
769
+ ARIA_ATTR: Ct,
745
770
  IS_SCRIPT_OR_DATA: ht,
746
771
  ATTR_WHITESPACE: pt,
747
- CUSTOM_ELEMENT: Ct
772
+ CUSTOM_ELEMENT: It
748
773
  } = Vn;
749
774
  let {
750
775
  IS_ALLOWED_URI: dt
751
- } = Vn, U = null;
752
- const Ze = R({}, [...Gn, ...Vt, ...Yt, ...Zt, ...jn]);
776
+ } = Vn, B = null;
777
+ const Xe = R({}, [...Gn, ...Vt, ...Yt, ...Zt, ...jn]);
753
778
  let F = null;
754
779
  const _ = R({}, [...Wn, ...Xt, ...qn, ...kt]);
755
780
  let f = Object.seal(He(null, {
@@ -786,49 +811,49 @@ function cs() {
786
811
  value: null
787
812
  }
788
813
  }));
789
- let xe = !0, ze = !0, Pe = !1, dn = !0, _e = !1, Xe = !0, Re = !1, Dt = !1, Mt = !1, Ne = !1, ft = !1, gt = !1, fn = !0, gn = !1;
814
+ let xe = !0, ze = !0, Pe = !1, dn = !0, _e = !1, Ke = !0, Re = !1, Dt = !1, Mt = !1, Ne = !1, ft = !1, gt = !1, fn = !0, gn = !1;
790
815
  const mn = "user-content-";
791
- let Lt = !0, Ke = !1, $e = {}, ge = null;
816
+ let Lt = !0, Qe = !1, $e = {}, ge = null;
792
817
  const Ot = 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"]);
793
818
  let bn = null;
794
819
  const xn = R({}, ["audio", "video", "img", "source", "image", "track"]);
795
820
  let zt = null;
796
821
  const kn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), mt = "http://www.w3.org/1998/Math/MathML", bt = "http://www.w3.org/2000/svg", me = "http://www.w3.org/1999/xhtml";
797
- let Be = me, Pt = !1, Nt = null;
798
- const ws = R({}, [mt, bt, me], qt);
799
- let $t = R({}, ["mi", "mo", "mn", "ms", "mtext"]), Bt = R({}, ["annotation-xml"]);
800
- const ys = R({}, ["title", "style", "font", "a", "script"]);
801
- let Qe = null;
802
- const vs = ["application/xhtml+xml", "text/html"], Ts = "text/html";
803
- let j = null, Ue = null;
804
- const Ss = e.createElement("form"), wn = /* @__PURE__ */ h(function(i) {
822
+ let Ue = me, Pt = !1, Nt = null;
823
+ const ys = R({}, [mt, bt, me], qt);
824
+ let $t = R({}, ["mi", "mo", "mn", "ms", "mtext"]), Ut = R({}, ["annotation-xml"]);
825
+ const vs = R({}, ["title", "style", "font", "a", "script"]);
826
+ let Je = null;
827
+ const Ts = ["application/xhtml+xml", "text/html"], Ss = "text/html";
828
+ let j = null, Be = null;
829
+ const As = e.createElement("form"), wn = /* @__PURE__ */ h(function(i) {
805
830
  return i instanceof RegExp || i instanceof Function;
806
- }, "isRegexOrFunction"), Ut = /* @__PURE__ */ h(function() {
831
+ }, "isRegexOrFunction"), Bt = /* @__PURE__ */ h(function() {
807
832
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
808
- if (Ue && Ue === i)
833
+ if (Be && Be === i)
809
834
  return;
810
- (!i || typeof i != "object") && (i = {}), i = re(i), Qe = // eslint-disable-next-line unicorn/prefer-includes
811
- vs.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Ts : i.PARSER_MEDIA_TYPE, j = Qe === "application/xhtml+xml" ? qt : at, U = $(i, "ALLOWED_TAGS") && J(i.ALLOWED_TAGS) ? R({}, i.ALLOWED_TAGS, j) : Ze, F = $(i, "ALLOWED_ATTR") && J(i.ALLOWED_ATTR) ? R({}, i.ALLOWED_ATTR, j) : _, Nt = $(i, "ALLOWED_NAMESPACES") && J(i.ALLOWED_NAMESPACES) ? R({}, i.ALLOWED_NAMESPACES, qt) : ws, zt = $(i, "ADD_URI_SAFE_ATTR") && J(i.ADD_URI_SAFE_ATTR) ? R(re(kn), i.ADD_URI_SAFE_ATTR, j) : kn, bn = $(i, "ADD_DATA_URI_TAGS") && J(i.ADD_DATA_URI_TAGS) ? R(re(xn), i.ADD_DATA_URI_TAGS, j) : xn, ge = $(i, "FORBID_CONTENTS") && J(i.FORBID_CONTENTS) ? R({}, i.FORBID_CONTENTS, j) : Ot, x = $(i, "FORBID_TAGS") && J(i.FORBID_TAGS) ? R({}, i.FORBID_TAGS, j) : re({}), M = $(i, "FORBID_ATTR") && J(i.FORBID_ATTR) ? R({}, i.FORBID_ATTR, j) : re({}), $e = $(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? re(i.USE_PROFILES) : i.USE_PROFILES : !1, xe = i.ALLOW_ARIA_ATTR !== !1, ze = i.ALLOW_DATA_ATTR !== !1, Pe = i.ALLOW_UNKNOWN_PROTOCOLS || !1, dn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = i.SAFE_FOR_TEMPLATES || !1, Xe = i.SAFE_FOR_XML !== !1, Re = i.WHOLE_DOCUMENT || !1, Ne = i.RETURN_DOM || !1, ft = i.RETURN_DOM_FRAGMENT || !1, gt = i.RETURN_TRUSTED_TYPE || !1, Mt = i.FORCE_BODY || !1, fn = i.SANITIZE_DOM !== !1, gn = i.SANITIZE_NAMED_PROPS || !1, Lt = i.KEEP_CONTENT !== !1, Ke = i.IN_PLACE || !1, dt = rr(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : ls, Be = typeof i.NAMESPACE == "string" ? i.NAMESPACE : me, $t = $(i, "MATHML_TEXT_INTEGRATION_POINTS") && i.MATHML_TEXT_INTEGRATION_POINTS && typeof i.MATHML_TEXT_INTEGRATION_POINTS == "object" ? re(i.MATHML_TEXT_INTEGRATION_POINTS) : R({}, ["mi", "mo", "mn", "ms", "mtext"]), Bt = $(i, "HTML_INTEGRATION_POINTS") && i.HTML_INTEGRATION_POINTS && typeof i.HTML_INTEGRATION_POINTS == "object" ? re(i.HTML_INTEGRATION_POINTS) : R({}, ["annotation-xml"]);
835
+ (!i || typeof i != "object") && (i = {}), i = re(i), Je = // eslint-disable-next-line unicorn/prefer-includes
836
+ Ts.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Ss : i.PARSER_MEDIA_TYPE, j = Je === "application/xhtml+xml" ? qt : lt, B = $(i, "ALLOWED_TAGS") && J(i.ALLOWED_TAGS) ? R({}, i.ALLOWED_TAGS, j) : Xe, F = $(i, "ALLOWED_ATTR") && J(i.ALLOWED_ATTR) ? R({}, i.ALLOWED_ATTR, j) : _, Nt = $(i, "ALLOWED_NAMESPACES") && J(i.ALLOWED_NAMESPACES) ? R({}, i.ALLOWED_NAMESPACES, qt) : ys, zt = $(i, "ADD_URI_SAFE_ATTR") && J(i.ADD_URI_SAFE_ATTR) ? R(re(kn), i.ADD_URI_SAFE_ATTR, j) : kn, bn = $(i, "ADD_DATA_URI_TAGS") && J(i.ADD_DATA_URI_TAGS) ? R(re(xn), i.ADD_DATA_URI_TAGS, j) : xn, ge = $(i, "FORBID_CONTENTS") && J(i.FORBID_CONTENTS) ? R({}, i.FORBID_CONTENTS, j) : Ot, x = $(i, "FORBID_TAGS") && J(i.FORBID_TAGS) ? R({}, i.FORBID_TAGS, j) : re({}), M = $(i, "FORBID_ATTR") && J(i.FORBID_ATTR) ? R({}, i.FORBID_ATTR, j) : re({}), $e = $(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? re(i.USE_PROFILES) : i.USE_PROFILES : !1, xe = i.ALLOW_ARIA_ATTR !== !1, ze = i.ALLOW_DATA_ATTR !== !1, Pe = i.ALLOW_UNKNOWN_PROTOCOLS || !1, dn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = i.SAFE_FOR_TEMPLATES || !1, Ke = i.SAFE_FOR_XML !== !1, Re = i.WHOLE_DOCUMENT || !1, Ne = i.RETURN_DOM || !1, ft = i.RETURN_DOM_FRAGMENT || !1, gt = i.RETURN_TRUSTED_TYPE || !1, Mt = i.FORCE_BODY || !1, fn = i.SANITIZE_DOM !== !1, gn = i.SANITIZE_NAMED_PROPS || !1, Lt = i.KEEP_CONTENT !== !1, Qe = i.IN_PLACE || !1, dt = ar(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : os, Ue = typeof i.NAMESPACE == "string" ? i.NAMESPACE : me, $t = $(i, "MATHML_TEXT_INTEGRATION_POINTS") && i.MATHML_TEXT_INTEGRATION_POINTS && typeof i.MATHML_TEXT_INTEGRATION_POINTS == "object" ? re(i.MATHML_TEXT_INTEGRATION_POINTS) : R({}, ["mi", "mo", "mn", "ms", "mtext"]), Ut = $(i, "HTML_INTEGRATION_POINTS") && i.HTML_INTEGRATION_POINTS && typeof i.HTML_INTEGRATION_POINTS == "object" ? re(i.HTML_INTEGRATION_POINTS) : R({}, ["annotation-xml"]);
812
837
  const u = $(i, "CUSTOM_ELEMENT_HANDLING") && i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING == "object" ? re(i.CUSTOM_ELEMENT_HANDLING) : He(null);
813
- if (f = He(null), $(u, "tagNameCheck") && wn(u.tagNameCheck) && (f.tagNameCheck = u.tagNameCheck), $(u, "attributeNameCheck") && wn(u.attributeNameCheck) && (f.attributeNameCheck = u.attributeNameCheck), $(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (f.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), _e && (ze = !1), ft && (Ne = !0), $e && (U = R({}, jn), F = He(null), $e.html === !0 && (R(U, Gn), R(F, Wn)), $e.svg === !0 && (R(U, Vt), R(F, Xt), R(F, kt)), $e.svgFilters === !0 && (R(U, Yt), R(F, Xt), R(F, kt)), $e.mathMl === !0 && (R(U, Zt), R(F, qn), R(F, kt))), P.tagCheck = null, P.attributeCheck = null, $(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? P.tagCheck = i.ADD_TAGS : J(i.ADD_TAGS) && (U === Ze && (U = re(U)), R(U, i.ADD_TAGS, j))), $(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? P.attributeCheck = i.ADD_ATTR : J(i.ADD_ATTR) && (F === _ && (F = re(F)), R(F, i.ADD_ATTR, j))), $(i, "ADD_URI_SAFE_ATTR") && J(i.ADD_URI_SAFE_ATTR) && R(zt, i.ADD_URI_SAFE_ATTR, j), $(i, "FORBID_CONTENTS") && J(i.FORBID_CONTENTS) && (ge === Ot && (ge = re(ge)), R(ge, i.FORBID_CONTENTS, j)), $(i, "ADD_FORBID_CONTENTS") && J(i.ADD_FORBID_CONTENTS) && (ge === Ot && (ge = re(ge)), R(ge, i.ADD_FORBID_CONTENTS, j)), Lt && (U["#text"] = !0), Re && R(U, ["html", "head", "body"]), U.table && (R(U, ["tbody"]), delete x.tbody), i.TRUSTED_TYPES_POLICY) {
838
+ if (f = He(null), $(u, "tagNameCheck") && wn(u.tagNameCheck) && (f.tagNameCheck = u.tagNameCheck), $(u, "attributeNameCheck") && wn(u.attributeNameCheck) && (f.attributeNameCheck = u.attributeNameCheck), $(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (f.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), _e && (ze = !1), ft && (Ne = !0), $e && (B = R({}, jn), F = He(null), $e.html === !0 && (R(B, Gn), R(F, Wn)), $e.svg === !0 && (R(B, Vt), R(F, Xt), R(F, kt)), $e.svgFilters === !0 && (R(B, Yt), R(F, Xt), R(F, kt)), $e.mathMl === !0 && (R(B, Zt), R(F, qn), R(F, kt))), P.tagCheck = null, P.attributeCheck = null, $(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? P.tagCheck = i.ADD_TAGS : J(i.ADD_TAGS) && (B === Xe && (B = re(B)), R(B, i.ADD_TAGS, j))), $(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? P.attributeCheck = i.ADD_ATTR : J(i.ADD_ATTR) && (F === _ && (F = re(F)), R(F, i.ADD_ATTR, j))), $(i, "ADD_URI_SAFE_ATTR") && J(i.ADD_URI_SAFE_ATTR) && R(zt, i.ADD_URI_SAFE_ATTR, j), $(i, "FORBID_CONTENTS") && J(i.FORBID_CONTENTS) && (ge === Ot && (ge = re(ge)), R(ge, i.FORBID_CONTENTS, j)), $(i, "ADD_FORBID_CONTENTS") && J(i.ADD_FORBID_CONTENTS) && (ge === Ot && (ge = re(ge)), R(ge, i.ADD_FORBID_CONTENTS, j)), Lt && (B["#text"] = !0), Re && R(B, ["html", "head", "body"]), B.table && (R(B, ["tbody"]), delete x.tbody), i.TRUSTED_TYPES_POLICY) {
814
839
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
815
840
  throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
816
841
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
817
842
  throw xt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
818
843
  N = i.TRUSTED_TYPES_POLICY, Y = N.createHTML("");
819
844
  } else
820
- N === void 0 && (N = mr(g, r)), N !== null && typeof Y == "string" && (Y = N.createHTML(""));
821
- te && te(i), Ue = i;
822
- }, "_parseConfig"), yn = R({}, [...Vt, ...Yt, ...ir]), vn = R({}, [...Zt, ...ar]), As = /* @__PURE__ */ h(function(i) {
845
+ N === void 0 && (N = xr(g, r)), N !== null && typeof Y == "string" && (Y = N.createHTML(""));
846
+ te && te(i), Be = i;
847
+ }, "_parseConfig"), yn = R({}, [...Vt, ...Yt, ...lr]), vn = R({}, [...Zt, ...or]), Es = /* @__PURE__ */ h(function(i) {
823
848
  let u = ne(i);
824
849
  (!u || !u.tagName) && (u = {
825
- namespaceURI: Be,
850
+ namespaceURI: Ue,
826
851
  tagName: "template"
827
852
  });
828
- const k = at(i.tagName), z = at(u.tagName);
829
- return Nt[i.namespaceURI] ? i.namespaceURI === bt ? u.namespaceURI === me ? k === "svg" : u.namespaceURI === mt ? k === "svg" && (z === "annotation-xml" || $t[z]) : !!yn[k] : i.namespaceURI === mt ? u.namespaceURI === me ? k === "math" : u.namespaceURI === bt ? k === "math" && Bt[z] : !!vn[k] : i.namespaceURI === me ? u.namespaceURI === bt && !Bt[z] || u.namespaceURI === mt && !$t[z] ? !1 : !vn[k] && (ys[k] || !yn[k]) : !!(Qe === "application/xhtml+xml" && Nt[i.namespaceURI]) : !1;
853
+ const k = lt(i.tagName), z = lt(u.tagName);
854
+ return Nt[i.namespaceURI] ? i.namespaceURI === bt ? u.namespaceURI === me ? k === "svg" : u.namespaceURI === mt ? k === "svg" && (z === "annotation-xml" || $t[z]) : !!yn[k] : i.namespaceURI === mt ? u.namespaceURI === me ? k === "math" : u.namespaceURI === bt ? k === "math" && Ut[z] : !!vn[k] : i.namespaceURI === me ? u.namespaceURI === bt && !Ut[z] || u.namespaceURI === mt && !$t[z] ? !1 : !vn[k] && (vs[k] || !yn[k]) : !!(Je === "application/xhtml+xml" && Nt[i.namespaceURI]) : !1;
830
855
  }, "_checkValidNamespace"), he = /* @__PURE__ */ h(function(i) {
831
- tt(t.removed, {
856
+ nt(t.removed, {
832
857
  element: i
833
858
  });
834
859
  try {
@@ -836,14 +861,14 @@ function cs() {
836
861
  } catch {
837
862
  O(i);
838
863
  }
839
- }, "_forceRemove"), Ie = /* @__PURE__ */ h(function(i, u) {
864
+ }, "_forceRemove"), Ce = /* @__PURE__ */ h(function(i, u) {
840
865
  try {
841
- tt(t.removed, {
866
+ nt(t.removed, {
842
867
  attribute: u.getAttributeNode(i),
843
868
  from: u
844
869
  });
845
870
  } catch {
846
- tt(t.removed, {
871
+ nt(t.removed, {
847
872
  attribute: null,
848
873
  from: u
849
874
  });
@@ -864,25 +889,25 @@ function cs() {
864
889
  if (Mt)
865
890
  i = "<remove></remove>" + i;
866
891
  else {
867
- const H = Bn(i, /^[\r\n\t ]+/);
892
+ const H = Un(i, /^[\r\n\t ]+/);
868
893
  k = H && H[0];
869
894
  }
870
- Qe === "application/xhtml+xml" && Be === me && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
895
+ Je === "application/xhtml+xml" && Ue === me && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
871
896
  const z = N ? N.createHTML(i) : i;
872
- if (Be === me)
897
+ if (Ue === me)
873
898
  try {
874
- u = new d().parseFromString(z, Qe);
899
+ u = new d().parseFromString(z, Je);
875
900
  } catch {
876
901
  }
877
902
  if (!u || !u.documentElement) {
878
- u = ue.createDocument(Be, "template", null);
903
+ u = ae.createDocument(Ue, "template", null);
879
904
  try {
880
905
  u.documentElement.innerHTML = Pt ? Y : z;
881
906
  } catch {
882
907
  }
883
908
  }
884
909
  const X = u.body || u.documentElement;
885
- return i && k && X.insertBefore(e.createTextNode(k), X.childNodes[0] || null), Be === me ? ut.call(u, Re ? "html" : "body")[0] : Re ? u.documentElement : X;
910
+ return i && k && X.insertBefore(e.createTextNode(k), X.childNodes[0] || null), Ue === me ? ut.call(u, Re ? "html" : "body")[0] : Re ? u.documentElement : X;
886
911
  }, "_initDocument"), Sn = /* @__PURE__ */ h(function(i) {
887
912
  return Q.call(
888
913
  i.ownerDocument || i,
@@ -897,8 +922,8 @@ function cs() {
897
922
  return typeof l == "function" && i instanceof l;
898
923
  }, "_isNode");
899
924
  function ke(v, i, u) {
900
- et(v, (k) => {
901
- k.call(t, i, u, Ue);
925
+ tt(v, (k) => {
926
+ k.call(t, i, u, Be);
902
927
  });
903
928
  }
904
929
  h(ke, "_executeHooks");
@@ -909,34 +934,34 @@ function cs() {
909
934
  const k = j(i.nodeName);
910
935
  if (ke(q.uponSanitizeElement, i, {
911
936
  tagName: k,
912
- allowedTags: U
913
- }), Xe && i.hasChildNodes() && !Ht(i.firstElementChild) && Z(/<[/\w!]/g, i.innerHTML) && Z(/<[/\w!]/g, i.textContent) || Xe && i.namespaceURI === me && k === "style" && Ht(i.firstElementChild) || i.nodeType === st.progressingInstruction || Xe && i.nodeType === st.comment && Z(/<[/\w]/g, i.data))
937
+ allowedTags: B
938
+ }), Ke && i.hasChildNodes() && !Ht(i.firstElementChild) && Z(/<[/\w!]/g, i.innerHTML) && Z(/<[/\w!]/g, i.textContent) || Ke && i.namespaceURI === me && k === "style" && Ht(i.firstElementChild) || i.nodeType === rt.progressingInstruction || Ke && i.nodeType === rt.comment && Z(/<[/\w]/g, i.data))
914
939
  return he(i), !0;
915
- if (x[k] || !(P.tagCheck instanceof Function && P.tagCheck(k)) && !U[k]) {
940
+ if (x[k] || !(P.tagCheck instanceof Function && P.tagCheck(k)) && !B[k]) {
916
941
  if (!x[k] && _n(k) && (f.tagNameCheck instanceof RegExp && Z(f.tagNameCheck, k) || f.tagNameCheck instanceof Function && f.tagNameCheck(k)))
917
942
  return !1;
918
943
  if (Lt && !ge[k]) {
919
- const z = ne(i) || i.parentNode, X = ce(i) || i.childNodes;
944
+ const z = ne(i) || i.parentNode, X = ue(i) || i.childNodes;
920
945
  if (X && z) {
921
946
  const H = X.length;
922
947
  for (let se = H - 1; se >= 0; --se) {
923
948
  const le = E(X[se], !0);
924
- z.insertBefore(le, ae(i));
949
+ z.insertBefore(le, ce(i));
925
950
  }
926
951
  }
927
952
  }
928
953
  return he(i), !0;
929
954
  }
930
- return i instanceof m && !As(i) || (k === "noscript" || k === "noembed" || k === "noframes") && Z(/<\/no(script|embed|frames)/i, i.innerHTML) ? (he(i), !0) : (_e && i.nodeType === st.text && (u = i.textContent, et([we, Oe, ye], (z) => {
955
+ return i instanceof m && !Es(i) || (k === "noscript" || k === "noembed" || k === "noframes") && Z(/<\/no(script|embed|frames)/i, i.innerHTML) ? (he(i), !0) : (_e && i.nodeType === rt.text && (u = i.textContent, tt([we, Oe, ye], (z) => {
931
956
  u = Fe(u, z, " ");
932
- }), i.textContent !== u && (tt(t.removed, {
957
+ }), i.textContent !== u && (nt(t.removed, {
933
958
  element: i.cloneNode()
934
959
  }), i.textContent = u)), ke(q.afterSanitizeElements, i, null), !1);
935
960
  }, "_sanitizeElements"), En = /* @__PURE__ */ h(function(i, u, k) {
936
- if (M[u] || fn && (u === "id" || u === "name") && (k in e || k in Ss))
961
+ if (M[u] || fn && (u === "id" || u === "name") && (k in e || k in As))
937
962
  return !1;
938
963
  if (!(ze && !M[u] && Z(Rt, u))) {
939
- if (!(xe && Z(It, u))) {
964
+ if (!(xe && Z(Ct, u))) {
940
965
  if (!(P.attributeCheck instanceof Function && P.attributeCheck(u, i))) {
941
966
  if (!F[u] || M[u]) {
942
967
  if (
@@ -949,7 +974,7 @@ function cs() {
949
974
  ) return !1;
950
975
  } else if (!zt[u]) {
951
976
  if (!Z(dt, Fe(k, pt, ""))) {
952
- if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Un(k, "data:") === 0 && bn[i])) {
977
+ if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Bn(k, "data:") === 0 && bn[i])) {
953
978
  if (!(Pe && !Z(ht, Fe(k, pt, "")))) {
954
979
  if (k)
955
980
  return !1;
@@ -961,8 +986,8 @@ function cs() {
961
986
  }
962
987
  }
963
988
  return !0;
964
- }, "_isValidAttribute"), Es = R({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), _n = /* @__PURE__ */ h(function(i) {
965
- return !Es[at(i)] && Z(Ct, i);
989
+ }, "_isValidAttribute"), _s = R({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), _n = /* @__PURE__ */ h(function(i) {
990
+ return !_s[lt(i)] && Z(It, i);
966
991
  }, "_isBasicCustomElement"), Rn = /* @__PURE__ */ h(function(i) {
967
992
  ke(q.beforeSanitizeAttributes, i, null);
968
993
  const {
@@ -984,35 +1009,35 @@ function cs() {
984
1009
  namespaceURI: se,
985
1010
  value: le
986
1011
  } = X, pe = j(H), Gt = le;
987
- let V = H === "value" ? Gt : Qs(Gt);
988
- if (k.attrName = pe, k.attrValue = V, k.keepAttr = !0, k.forceKeepAttr = void 0, ke(q.uponSanitizeAttribute, i, k), V = k.attrValue, gn && (pe === "id" || pe === "name") && Un(V, mn) !== 0 && (Ie(H, i), V = mn + V), Xe && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, V)) {
989
- Ie(H, i);
1012
+ let V = H === "value" ? Gt : er(Gt);
1013
+ if (k.attrName = pe, k.attrValue = V, k.keepAttr = !0, k.forceKeepAttr = void 0, ke(q.uponSanitizeAttribute, i, k), V = k.attrValue, gn && (pe === "id" || pe === "name") && Bn(V, mn) !== 0 && (Ce(H, i), V = mn + V), Ke && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, V)) {
1014
+ Ce(H, i);
990
1015
  continue;
991
1016
  }
992
- if (pe === "attributename" && Bn(V, "href")) {
993
- Ie(H, i);
1017
+ if (pe === "attributename" && Un(V, "href")) {
1018
+ Ce(H, i);
994
1019
  continue;
995
1020
  }
996
1021
  if (k.forceKeepAttr)
997
1022
  continue;
998
1023
  if (!k.keepAttr) {
999
- Ie(H, i);
1024
+ Ce(H, i);
1000
1025
  continue;
1001
1026
  }
1002
1027
  if (!dn && Z(/\/>/i, V)) {
1003
- Ie(H, i);
1028
+ Ce(H, i);
1004
1029
  continue;
1005
1030
  }
1006
- _e && et([we, Oe, ye], (Dn) => {
1031
+ _e && tt([we, Oe, ye], (Dn) => {
1007
1032
  V = Fe(V, Dn, " ");
1008
1033
  });
1009
- const Cn = j(i.nodeName);
1010
- if (!En(Cn, pe, V)) {
1011
- Ie(H, i);
1034
+ const In = j(i.nodeName);
1035
+ if (!En(In, pe, V)) {
1036
+ Ce(H, i);
1012
1037
  continue;
1013
1038
  }
1014
1039
  if (N && typeof g == "object" && typeof g.getAttributeType == "function" && !se)
1015
- switch (g.getAttributeType(Cn, pe)) {
1040
+ switch (g.getAttributeType(In, pe)) {
1016
1041
  case "TrustedHTML": {
1017
1042
  V = N.createHTML(V);
1018
1043
  break;
@@ -1026,32 +1051,32 @@ function cs() {
1026
1051
  try {
1027
1052
  se ? i.setAttributeNS(se, H, V) : i.setAttribute(H, V), Ft(i) ? he(i) : $n(t.removed);
1028
1053
  } catch {
1029
- Ie(H, i);
1054
+ Ce(H, i);
1030
1055
  }
1031
1056
  }
1032
1057
  ke(q.afterSanitizeAttributes, i, null);
1033
- }, "_sanitizeAttributes"), In = /* @__PURE__ */ h(function(i) {
1058
+ }, "_sanitizeAttributes"), Cn = /* @__PURE__ */ h(function(i) {
1034
1059
  let u = null;
1035
1060
  const k = Sn(i);
1036
1061
  for (ke(q.beforeSanitizeShadowDOM, i, null); u = k.nextNode(); )
1037
- ke(q.uponSanitizeShadowNode, u, null), An(u), Rn(u), u.content instanceof s && In(u.content);
1062
+ ke(q.uponSanitizeShadowNode, u, null), An(u), Rn(u), u.content instanceof s && Cn(u.content);
1038
1063
  ke(q.afterSanitizeShadowDOM, i, null);
1039
1064
  }, "_sanitizeShadowDOM");
1040
1065
  return t.sanitize = function(v) {
1041
1066
  let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, k = null, z = null, X = null;
1042
- if (Pt = !v, Pt && (v = "<!-->"), typeof v != "string" && !Ht(v) && (v = sr(v), typeof v != "string"))
1067
+ if (Pt = !v, Pt && (v = "<!-->"), typeof v != "string" && !Ht(v) && (v = ir(v), typeof v != "string"))
1043
1068
  throw xt("dirty is not a string, aborting");
1044
1069
  if (!t.isSupported)
1045
1070
  return v;
1046
- if (Dt || Ut(i), t.removed = [], typeof v == "string" && (Ke = !1), Ke) {
1071
+ if (Dt || Bt(i), t.removed = [], typeof v == "string" && (Qe = !1), Qe) {
1047
1072
  const le = v.nodeName;
1048
1073
  if (typeof le == "string") {
1049
1074
  const pe = j(le);
1050
- if (!U[pe] || x[pe])
1075
+ if (!B[pe] || x[pe])
1051
1076
  throw xt("root node is forbidden and cannot be sanitized in-place");
1052
1077
  }
1053
1078
  } else if (v instanceof l)
1054
- u = Tn("<!---->"), k = u.ownerDocument.importNode(v, !0), k.nodeType === st.element && k.nodeName === "BODY" || k.nodeName === "HTML" ? u = k : u.appendChild(k);
1079
+ u = Tn("<!---->"), k = u.ownerDocument.importNode(v, !0), k.nodeType === rt.element && k.nodeName === "BODY" || k.nodeName === "HTML" ? u = k : u.appendChild(k);
1055
1080
  else {
1056
1081
  if (!Ne && !_e && !Re && // eslint-disable-next-line unicorn/prefer-includes
1057
1082
  v.indexOf("<") === -1)
@@ -1060,16 +1085,16 @@ function cs() {
1060
1085
  return Ne ? null : gt ? Y : "";
1061
1086
  }
1062
1087
  u && Mt && he(u.firstChild);
1063
- const H = Sn(Ke ? v : u);
1088
+ const H = Sn(Qe ? v : u);
1064
1089
  for (; z = H.nextNode(); )
1065
- An(z), Rn(z), z.content instanceof s && In(z.content);
1066
- if (Ke)
1090
+ An(z), Rn(z), z.content instanceof s && Cn(z.content);
1091
+ if (Qe)
1067
1092
  return v;
1068
1093
  if (Ne) {
1069
1094
  if (_e) {
1070
1095
  u.normalize();
1071
1096
  let le = u.innerHTML;
1072
- et([we, Oe, ye], (pe) => {
1097
+ tt([we, Oe, ye], (pe) => {
1073
1098
  le = Fe(le, pe, " ");
1074
1099
  }), u.innerHTML = le;
1075
1100
  }
@@ -1078,28 +1103,28 @@ function cs() {
1078
1103
  X.appendChild(u.firstChild);
1079
1104
  else
1080
1105
  X = u;
1081
- return (F.shadowroot || F.shadowrootmode) && (X = I.call(n, X, !0)), X;
1106
+ return (F.shadowroot || F.shadowrootmode) && (X = C.call(n, X, !0)), X;
1082
1107
  }
1083
1108
  let se = Re ? u.outerHTML : u.innerHTML;
1084
- return Re && U["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && Z(os, u.ownerDocument.doctype.name) && (se = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1085
- ` + se), _e && et([we, Oe, ye], (le) => {
1109
+ return Re && B["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && Z(cs, u.ownerDocument.doctype.name) && (se = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1110
+ ` + se), _e && tt([we, Oe, ye], (le) => {
1086
1111
  se = Fe(se, le, " ");
1087
1112
  }), N && gt ? N.createHTML(se) : se;
1088
1113
  }, t.setConfig = function() {
1089
1114
  let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1090
- Ut(v), Dt = !0;
1115
+ Bt(v), Dt = !0;
1091
1116
  }, t.clearConfig = function() {
1092
- Ue = null, Dt = !1;
1117
+ Be = null, Dt = !1;
1093
1118
  }, t.isValidAttribute = function(v, i, u) {
1094
- Ue || Ut({});
1119
+ Be || Bt({});
1095
1120
  const k = j(v), z = j(i);
1096
1121
  return En(k, z, u);
1097
1122
  }, t.addHook = function(v, i) {
1098
- typeof i == "function" && tt(q[v], i);
1123
+ typeof i == "function" && nt(q[v], i);
1099
1124
  }, t.removeHook = function(v, i) {
1100
1125
  if (i !== void 0) {
1101
- const u = Xs(q[v], i);
1102
- return u === -1 ? void 0 : Ks(q[v], u, 1)[0];
1126
+ const u = Qs(q[v], i);
1127
+ return u === -1 ? void 0 : Js(q[v], u, 1)[0];
1103
1128
  }
1104
1129
  return $n(q[v]);
1105
1130
  }, t.removeHooks = function(v) {
@@ -1108,18 +1133,18 @@ function cs() {
1108
1133
  q = Yn();
1109
1134
  }, t;
1110
1135
  }
1111
- h(cs, "createDOMPurify");
1112
- var br = cs();
1136
+ h(us, "createDOMPurify");
1137
+ var kr = us();
1113
1138
  function nn() {
1114
1139
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1115
1140
  }
1116
1141
  h(nn, "z");
1117
1142
  var Le = nn();
1118
- function us(a) {
1143
+ function hs(a) {
1119
1144
  Le = a;
1120
1145
  }
1121
- h(us, "G");
1122
- var Ce = { exec: /* @__PURE__ */ h(() => null, "exec") };
1146
+ h(hs, "G");
1147
+ var Ie = { exec: /* @__PURE__ */ h(() => null, "exec") };
1123
1148
  function D(a, t = "") {
1124
1149
  let e = typeof a == "string" ? a : a.source, n = { replace: /* @__PURE__ */ h((r, s) => {
1125
1150
  let o = typeof s == "string" ? s : s.source;
@@ -1128,14 +1153,14 @@ function D(a, t = "") {
1128
1153
  return n;
1129
1154
  }
1130
1155
  h(D, "k");
1131
- var xr = ((a = "") => {
1156
+ var wr = ((a = "") => {
1132
1157
  try {
1133
1158
  return !!new RegExp("(?<=1)(?<!1)" + a);
1134
1159
  } catch {
1135
1160
  return !1;
1136
1161
  }
1137
- })(), K = { 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__ */ h((a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}>`), "blockquoteBeginRegex") }, kr = /^(?:[ \t]*(?:\n|$))+/, wr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, yr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ct = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, vr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, hs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ps = D(hs).replace(/bull/g, sn).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(), Tr = D(hs).replace(/bull/g, sn).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(), rn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Sr = /^[^\n]+/, an = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ar = D(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", an).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Er = D(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, sn).getRegex(), At = "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", ln = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _r = D("^ {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", ln).replace("tag", At).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ds = D(rn).replace("hr", ct).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", At).getRegex(), Rr = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ds).getRegex(), on = { blockquote: Rr, code: wr, def: Ar, fences: yr, heading: vr, hr: ct, html: _r, lheading: ps, list: Er, newline: kr, paragraph: ds, table: Ce, text: Sr }, Zn = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ct).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", At).getRegex(), Ir = { ...on, lheading: Tr, table: Zn, paragraph: D(rn).replace("hr", ct).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Zn).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", At).getRegex() }, Cr = { ...on, html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ln).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: Ce, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: D(rn).replace("hr", ct).replace("heading", ` *#{1,6} *[^
1138
- ]`).replace("lheading", ps).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Dr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Mr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, fs = /^( {2,}|\\)\n(?!\s*$)/, Lr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ye = /[\p{P}\p{S}]/u, Et = /[\s\p{P}\p{S}]/u, cn = /[^\s\p{P}\p{S}]/u, Or = D(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Et).getRegex(), gs = /(?!~)[\p{P}\p{S}]/u, zr = /(?!~)[\s\p{P}\p{S}]/u, Pr = /(?:[^\s\p{P}\p{S}]|~)/u, Nr = D(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", xr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ms = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, $r = D(ms, "u").replace(/punct/g, Ye).getRegex(), Br = D(ms, "u").replace(/punct/g, gs).getRegex(), bs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ur = D(bs, "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Et).replace(/punct/g, Ye).getRegex(), Fr = D(bs, "gu").replace(/notPunctSpace/g, Pr).replace(/punctSpace/g, zr).replace(/punct/g, gs).getRegex(), Hr = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Et).replace(/punct/g, Ye).getRegex(), Gr = D(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ye).getRegex(), jr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Wr = D(jr, "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Et).replace(/punct/g, Ye).getRegex(), qr = D(/\\(punct)/, "gu").replace(/punct/g, Ye).getRegex(), Vr = D(/^<(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(), Yr = D(ln).replace("(?:-->|$)", "-->").getRegex(), Zr = D("^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", Yr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Xr = D(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", vt).replace("ref", an).getRegex(), ks = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", an).getRegex(), Kr = D("reflink|nolink(?!\\()", "g").replace("reflink", xs).replace("nolink", ks).getRegex(), Xn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, un = { _backpedal: Ce, anyPunctuation: qr, autolink: Vr, blockSkip: Nr, br: fs, code: Mr, del: Ce, delLDelim: Ce, delRDelim: Ce, emStrongLDelim: $r, emStrongRDelimAst: Ur, emStrongRDelimUnd: Hr, escape: Dr, link: Xr, nolink: ks, punctuation: Or, reflink: xs, reflinkSearch: Kr, tag: Zr, text: Lr, url: Ce }, Qr = { ...un, link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", vt).getRegex(), reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt).getRegex() }, en = { ...un, emStrongRDelimAst: Fr, emStrongLDelim: Br, delLDelim: Gr, delRDelim: Wr, url: D(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Xn).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: D(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Xn).getRegex() }, Jr = { ...en, br: D(fs).replace("{2,}", "*").getRegex(), text: D(en.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, wt = { normal: on, gfm: Ir, pedantic: Cr }, rt = { normal: un, gfm: en, breaks: Jr, pedantic: Qr }, ei = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Kn = /* @__PURE__ */ h((a) => ei[a], "de");
1162
+ })(), K = { 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__ */ h((a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((a) => new RegExp(`^ {0,${Math.min(3, a - 1)}}>`), "blockquoteBeginRegex") }, yr = /^(?:[ \t]*(?:\n|$))+/, vr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Tr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ct = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Sr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ps = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ds = D(ps).replace(/bull/g, sn).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(), Ar = D(ps).replace(/bull/g, sn).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(), rn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Er = /^[^\n]+/, an = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, _r = D(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", an).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Rr = D(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, sn).getRegex(), At = "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", ln = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Cr = D("^ {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", ln).replace("tag", At).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), fs = D(rn).replace("hr", ct).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", At).getRegex(), Ir = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", fs).getRegex(), on = { blockquote: Ir, code: vr, def: _r, fences: Tr, heading: Sr, hr: ct, html: Cr, lheading: ds, list: Rr, newline: yr, paragraph: fs, table: Ie, text: Er }, Zn = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ct).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", At).getRegex(), Dr = { ...on, lheading: Ar, table: Zn, paragraph: D(rn).replace("hr", ct).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Zn).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", At).getRegex() }, Mr = { ...on, html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ln).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: Ie, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: D(rn).replace("hr", ct).replace("heading", ` *#{1,6} *[^
1163
+ ]`).replace("lheading", ds).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Lr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Or = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, gs = /^( {2,}|\\)\n(?!\s*$)/, zr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ze = /[\p{P}\p{S}]/u, Et = /[\s\p{P}\p{S}]/u, cn = /[^\s\p{P}\p{S}]/u, Pr = D(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Et).getRegex(), ms = /(?!~)[\p{P}\p{S}]/u, Nr = /(?!~)[\s\p{P}\p{S}]/u, $r = /(?:[^\s\p{P}\p{S}]|~)/u, Ur = D(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", wr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), bs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Br = D(bs, "u").replace(/punct/g, Ze).getRegex(), Fr = D(bs, "u").replace(/punct/g, ms).getRegex(), xs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hr = D(xs, "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Et).replace(/punct/g, Ze).getRegex(), Gr = D(xs, "gu").replace(/notPunctSpace/g, $r).replace(/punctSpace/g, Nr).replace(/punct/g, ms).getRegex(), jr = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Et).replace(/punct/g, Ze).getRegex(), Wr = D(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ze).getRegex(), qr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Vr = D(qr, "gu").replace(/notPunctSpace/g, cn).replace(/punctSpace/g, Et).replace(/punct/g, Ze).getRegex(), Yr = D(/\\(punct)/, "gu").replace(/punct/g, Ze).getRegex(), Zr = D(/^<(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(), Xr = D(ln).replace("(?:-->|$)", "-->").getRegex(), Kr = D("^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", Xr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Qr = D(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ks = D(/^!?\[(label)\]\[(ref)\]/).replace("label", vt).replace("ref", an).getRegex(), ws = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", an).getRegex(), Jr = D("reflink|nolink(?!\\()", "g").replace("reflink", ks).replace("nolink", ws).getRegex(), Xn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, un = { _backpedal: Ie, anyPunctuation: Yr, autolink: Zr, blockSkip: Ur, br: gs, code: Or, del: Ie, delLDelim: Ie, delRDelim: Ie, emStrongLDelim: Br, emStrongRDelimAst: Hr, emStrongRDelimUnd: jr, escape: Lr, link: Qr, nolink: ws, punctuation: Pr, reflink: ks, reflinkSearch: Jr, tag: Kr, text: zr, url: Ie }, ei = { ...un, link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", vt).getRegex(), reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt).getRegex() }, en = { ...un, emStrongRDelimAst: Gr, emStrongLDelim: Fr, delLDelim: Wr, delRDelim: Vr, url: D(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Xn).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: D(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Xn).getRegex() }, ti = { ...en, br: D(gs).replace("{2,}", "*").getRegex(), text: D(en.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, wt = { normal: on, gfm: Dr, pedantic: Mr }, it = { normal: un, gfm: en, breaks: ti, pedantic: ei }, ni = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Kn = /* @__PURE__ */ h((a) => ni[a], "de");
1139
1164
  function be(a, t) {
1140
1165
  if (t) {
1141
1166
  if (K.escapeTest.test(a)) return a.replace(K.escapeReplace, Kn);
@@ -1181,7 +1206,7 @@ function es(a) {
1181
1206
  `);
1182
1207
  }
1183
1208
  h(es, "Y");
1184
- function ti(a, t) {
1209
+ function si(a, t) {
1185
1210
  if (a.indexOf(t[1]) === -1) return -1;
1186
1211
  let e = 0;
1187
1212
  for (let n = 0; n < a.length; n++) if (a[n] === "\\") n++;
@@ -1189,8 +1214,8 @@ function ti(a, t) {
1189
1214
  else if (a[n] === t[1] && (e--, e < 0)) return n;
1190
1215
  return e > 0 ? -2 : -1;
1191
1216
  }
1192
- h(ti, "ge");
1193
- function ni(a, t = 0) {
1217
+ h(si, "ge");
1218
+ function ri(a, t = 0) {
1194
1219
  let e = t, n = "";
1195
1220
  for (let r of a) if (r === " ") {
1196
1221
  let s = 4 - e % 4;
@@ -1198,7 +1223,7 @@ function ni(a, t = 0) {
1198
1223
  } else n += r, e++;
1199
1224
  return n;
1200
1225
  }
1201
- h(ni, "fe");
1226
+ h(ri, "fe");
1202
1227
  function ts(a, t, e, n, r) {
1203
1228
  let s = t.href, o = t.title || null, l = a[1].replace(r.other.outputLinkReplace, "$1");
1204
1229
  n.state.inLink = !0;
@@ -1206,7 +1231,7 @@ function ts(a, t, e, n, r) {
1206
1231
  return n.state.inLink = !1, m;
1207
1232
  }
1208
1233
  h(ts, "me");
1209
- function si(a, t, e) {
1234
+ function ii(a, t, e) {
1210
1235
  let n = a.match(e.other.indentCodeCompensation);
1211
1236
  if (n === null) return t;
1212
1237
  let r = n[1];
@@ -1219,12 +1244,12 @@ function si(a, t, e) {
1219
1244
  }).join(`
1220
1245
  `);
1221
1246
  }
1222
- h(si, "rt");
1247
+ h(ii, "rt");
1223
1248
  var je, Tt = (je = class {
1224
1249
  constructor(t) {
1225
- C(this, "options");
1226
- C(this, "rules");
1227
- C(this, "lexer");
1250
+ I(this, "options");
1251
+ I(this, "rules");
1252
+ I(this, "lexer");
1228
1253
  this.options = t || Le;
1229
1254
  }
1230
1255
  space(t) {
@@ -1241,7 +1266,7 @@ var je, Tt = (je = class {
1241
1266
  fences(t) {
1242
1267
  let e = this.rules.block.fences.exec(t);
1243
1268
  if (e) {
1244
- let n = e[0], r = si(n, e[3] || "", this.rules);
1269
+ let n = e[0], r = ii(n, e[3] || "", this.rules);
1245
1270
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
1246
1271
  }
1247
1272
  }
@@ -1312,25 +1337,25 @@ ${p}` : p;
1312
1337
  let c = !1, b = "", p = "";
1313
1338
  if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
1314
1339
  b = e[0], t = t.substring(b.length);
1315
- let d = ni(e[2].split(`
1340
+ let d = ri(e[2].split(`
1316
1341
  `, 1)[0], e[1].length), g = t.split(`
1317
1342
  `, 1)[0], y = !d.trim(), E = 0;
1318
1343
  if (this.options.pedantic ? (E = 2, p = d.trimStart()) : y ? E = e[1].length + 1 : (E = d.search(this.rules.other.nonSpaceChar), E = E > 4 ? 1 : E, p = d.slice(E), E += e[1].length), y && this.rules.other.blankLine.test(g) && (b += g + `
1319
1344
  `, t = t.substring(g.length + 1), c = !0), !c) {
1320
- let O = this.rules.other.nextBulletRegex(E), ae = this.rules.other.hrRegex(E), ce = this.rules.other.fencesBeginRegex(E), ne = this.rules.other.headingBeginRegex(E), N = this.rules.other.htmlBeginRegex(E), Y = this.rules.other.blockquoteBeginRegex(E);
1345
+ let O = this.rules.other.nextBulletRegex(E), ce = this.rules.other.hrRegex(E), ue = this.rules.other.fencesBeginRegex(E), ne = this.rules.other.headingBeginRegex(E), N = this.rules.other.htmlBeginRegex(E), Y = this.rules.other.blockquoteBeginRegex(E);
1321
1346
  for (; t; ) {
1322
- let ue = t.split(`
1347
+ let ae = t.split(`
1323
1348
  `, 1)[0], Q;
1324
- if (g = ue, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), Q = g) : Q = g.replace(this.rules.other.tabCharGlobal, " "), ce.test(g) || ne.test(g) || N.test(g) || Y.test(g) || O.test(g) || ae.test(g)) break;
1349
+ if (g = ae, this.options.pedantic ? (g = g.replace(this.rules.other.listReplaceNesting, " "), Q = g) : Q = g.replace(this.rules.other.tabCharGlobal, " "), ue.test(g) || ne.test(g) || N.test(g) || Y.test(g) || O.test(g) || ce.test(g)) break;
1325
1350
  if (Q.search(this.rules.other.nonSpaceChar) >= E || !g.trim()) p += `
1326
1351
  ` + Q.slice(E);
1327
1352
  else {
1328
- if (y || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ce.test(d) || ne.test(d) || ae.test(d)) break;
1353
+ if (y || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ue.test(d) || ne.test(d) || ce.test(d)) break;
1329
1354
  p += `
1330
1355
  ` + g;
1331
1356
  }
1332
- y = !g.trim(), b += ue + `
1333
- `, t = t.substring(ue.length + 1), d = Q.slice(E);
1357
+ y = !g.trim(), b += ae + `
1358
+ `, t = t.substring(ae.length + 1), d = Q.slice(E);
1334
1359
  }
1335
1360
  }
1336
1361
  s.loose || (l ? s.loose = !0 : this.rules.other.doubleBlankLine.test(b) && (l = !0)), s.items.push({ type: "list_item", raw: b, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), s.raw += b;
@@ -1431,7 +1456,7 @@ ${p}` : p;
1431
1456
  let o = ve(n.slice(0, -1), "\\");
1432
1457
  if ((n.length - o.length) % 2 === 0) return;
1433
1458
  } else {
1434
- let o = ti(e[2], "()");
1459
+ let o = si(e[2], "()");
1435
1460
  if (o === -2) return;
1436
1461
  if (o > -1) {
1437
1462
  let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + o;
@@ -1541,17 +1566,17 @@ ${p}` : p;
1541
1566
  }
1542
1567
  }, h(je, "w"), je), Ae, de = (Ae = class {
1543
1568
  constructor(t) {
1544
- C(this, "tokens");
1545
- C(this, "options");
1546
- C(this, "state");
1547
- C(this, "inlineQueue");
1548
- C(this, "tokenizer");
1569
+ I(this, "tokens");
1570
+ I(this, "options");
1571
+ I(this, "state");
1572
+ I(this, "inlineQueue");
1573
+ I(this, "tokenizer");
1549
1574
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Le, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1550
- let e = { other: K, block: wt.normal, inline: rt.normal };
1551
- this.options.pedantic ? (e.block = wt.pedantic, e.inline = rt.pedantic) : this.options.gfm && (e.block = wt.gfm, this.options.breaks ? e.inline = rt.breaks : e.inline = rt.gfm), this.tokenizer.rules = e;
1575
+ let e = { other: K, block: wt.normal, inline: it.normal };
1576
+ this.options.pedantic ? (e.block = wt.pedantic, e.inline = it.pedantic) : this.options.gfm && (e.block = wt.gfm, this.options.breaks ? e.inline = it.breaks : e.inline = it.gfm), this.tokenizer.rules = e;
1552
1577
  }
1553
1578
  static get rules() {
1554
- return { block: wt, inline: rt };
1579
+ return { block: wt, inline: it };
1555
1580
  }
1556
1581
  static lex(t, e) {
1557
1582
  return new Ae(e).lex(t);
@@ -1760,8 +1785,8 @@ ${p}` : p;
1760
1785
  }
1761
1786
  }, h(Ae, "l"), Ae), We, St = (We = class {
1762
1787
  constructor(t) {
1763
- C(this, "options");
1764
- C(this, "parser");
1788
+ I(this, "options");
1789
+ I(this, "parser");
1765
1790
  this.options = t || Le;
1766
1791
  }
1767
1792
  space(t) {
@@ -1908,9 +1933,9 @@ ${t}</tr>
1908
1933
  }
1909
1934
  }, h(qe, "L"), qe), Ee, fe = (Ee = class {
1910
1935
  constructor(t) {
1911
- C(this, "options");
1912
- C(this, "renderer");
1913
- C(this, "textRenderer");
1936
+ I(this, "options");
1937
+ I(this, "renderer");
1938
+ I(this, "textRenderer");
1914
1939
  this.options = t || Le, this.options.renderer = this.options.renderer || new St(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new hn();
1915
1940
  }
1916
1941
  static parse(t, e) {
@@ -2057,10 +2082,10 @@ ${t}</tr>
2057
2082
  }
2058
2083
  return n;
2059
2084
  }
2060
- }, h(Ee, "l"), Ee), Se, lt = (Se = class {
2085
+ }, h(Ee, "l"), Ee), Se, ot = (Se = class {
2061
2086
  constructor(t) {
2062
- C(this, "options");
2063
- C(this, "block");
2087
+ I(this, "options");
2088
+ I(this, "block");
2064
2089
  this.options = t || Le;
2065
2090
  }
2066
2091
  preprocess(t) {
@@ -2081,18 +2106,18 @@ ${t}</tr>
2081
2106
  provideParser(t = this.block) {
2082
2107
  return t ? fe.parse : fe.parseInline;
2083
2108
  }
2084
- }, h(Se, "P"), C(Se, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(Se, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Se), Ve, ri = (Ve = class {
2109
+ }, h(Se, "P"), I(Se, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), I(Se, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Se), Ve, ai = (Ve = class {
2085
2110
  constructor(...t) {
2086
- C(this, "defaults", nn());
2087
- C(this, "options", this.setOptions);
2088
- C(this, "parse", this.parseMarkdown(!0));
2089
- C(this, "parseInline", this.parseMarkdown(!1));
2090
- C(this, "Parser", fe);
2091
- C(this, "Renderer", St);
2092
- C(this, "TextRenderer", hn);
2093
- C(this, "Lexer", de);
2094
- C(this, "Tokenizer", Tt);
2095
- C(this, "Hooks", lt);
2111
+ I(this, "defaults", nn());
2112
+ I(this, "options", this.setOptions);
2113
+ I(this, "parse", this.parseMarkdown(!0));
2114
+ I(this, "parseInline", this.parseMarkdown(!1));
2115
+ I(this, "Parser", fe);
2116
+ I(this, "Renderer", St);
2117
+ I(this, "TextRenderer", hn);
2118
+ I(this, "Lexer", de);
2119
+ I(this, "Tokenizer", Tt);
2120
+ I(this, "Hooks", ot);
2096
2121
  this.use(...t);
2097
2122
  }
2098
2123
  walkTokens(t, e) {
@@ -2165,13 +2190,13 @@ ${t}</tr>
2165
2190
  r.tokenizer = s;
2166
2191
  }
2167
2192
  if (n.hooks) {
2168
- let s = this.defaults.hooks || new lt();
2193
+ let s = this.defaults.hooks || new ot();
2169
2194
  for (let o in n.hooks) {
2170
2195
  if (!(o in s)) throw new Error(`hook '${o}' does not exist`);
2171
2196
  if (["options", "block"].includes(o)) continue;
2172
2197
  let l = o, m = n.hooks[l], c = s[l];
2173
- lt.passThroughHooks.has(o) ? s[l] = (b) => {
2174
- if (this.defaults.async && lt.passThroughHooksRespectAsync.has(o)) return (async () => {
2198
+ ot.passThroughHooks.has(o) ? s[l] = (b) => {
2199
+ if (this.defaults.async && ot.passThroughHooksRespectAsync.has(o)) return (async () => {
2175
2200
  let d = await m.call(s, b);
2176
2201
  return c.call(s, d);
2177
2202
  })();
@@ -2241,18 +2266,18 @@ Please report this to https://github.com/markedjs/marked.`, t) {
2241
2266
  throw n;
2242
2267
  };
2243
2268
  }
2244
- }, h(Ve, "D"), Ve), De = new ri();
2269
+ }, h(Ve, "D"), Ve), De = new ai();
2245
2270
  function L(a, t) {
2246
2271
  return De.parse(a, t);
2247
2272
  }
2248
2273
  h(L, "g");
2249
2274
  L.options = L.setOptions = function(a) {
2250
- return De.setOptions(a), L.defaults = De.defaults, us(L.defaults), L;
2275
+ return De.setOptions(a), L.defaults = De.defaults, hs(L.defaults), L;
2251
2276
  };
2252
2277
  L.getDefaults = nn;
2253
2278
  L.defaults = Le;
2254
2279
  L.use = function(...a) {
2255
- return De.use(...a), L.defaults = De.defaults, us(L.defaults), L;
2280
+ return De.use(...a), L.defaults = De.defaults, hs(L.defaults), L;
2256
2281
  };
2257
2282
  L.walkTokens = function(a, t) {
2258
2283
  return De.walkTokens(a, t);
@@ -2265,7 +2290,7 @@ L.TextRenderer = hn;
2265
2290
  L.Lexer = de;
2266
2291
  L.lexer = de.lex;
2267
2292
  L.Tokenizer = Tt;
2268
- L.Hooks = lt;
2293
+ L.Hooks = ot;
2269
2294
  L.parse = L;
2270
2295
  L.options;
2271
2296
  L.setOptions;
@@ -2274,40 +2299,40 @@ L.walkTokens;
2274
2299
  L.parseInline;
2275
2300
  fe.parse;
2276
2301
  de.lex;
2277
- const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2302
+ const li = { class: "@container/chat flex flex-col h-full relative" }, oi = {
2278
2303
  key: 0,
2279
2304
  class: "pb-4"
2280
- }, li = {
2305
+ }, ci = {
2281
2306
  key: 0,
2282
2307
  class: "flex flex-col items-center justify-center px-4 min-h-full"
2283
- }, oi = { class: "relative mb-4 size-20 @sm/chat:size-24" }, ci = ["src", "alt"], ui = {
2308
+ }, ui = { class: "relative mb-4 size-20 @sm/chat:size-24" }, hi = ["src", "alt"], pi = {
2284
2309
  key: 0,
2285
2310
  class: "mt-5 flex flex-col items-stretch gap-2 w-full max-w-xs"
2286
- }, hi = ["onClick"], pi = ["title"], di = {
2311
+ }, di = ["onClick"], fi = ["title"], gi = {
2287
2312
  key: 1,
2288
2313
  class: "flex justify-end px-2 pb-2"
2289
- }, fi = {
2314
+ }, mi = {
2290
2315
  key: 0,
2291
2316
  class: "flex items-center gap-3 py-3 px-2"
2292
- }, gi = ["data-issue-code", "data-issue-bucket"], mi = { class: "flex flex-col gap-1 min-w-0" }, bi = ["href"], xi = ["data-test"], ki = {
2317
+ }, bi = ["data-issue-code", "data-issue-bucket"], xi = { class: "flex flex-col gap-1 min-w-0" }, ki = ["href"], wi = ["data-test"], yi = {
2293
2318
  key: 0,
2294
2319
  class: "flex-shrink-0 size-7 @sm/chat:size-8"
2295
- }, wi = ["src", "alt"], yi = ["src", "alt"], vi = ["src"], Ti = ["href"], Si = ["innerHTML"], Ai = {
2320
+ }, vi = ["src", "alt"], Ti = ["src", "alt"], Si = ["src"], Ai = ["href"], Ei = ["innerHTML"], _i = {
2296
2321
  key: 2,
2297
2322
  class: "flex gap-2 justify-start items-center mb-4"
2298
- }, Ei = ["src", "alt"], _i = {
2323
+ }, Ri = ["src", "alt"], Ci = {
2299
2324
  key: 0,
2300
2325
  class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
2301
- }, Ri = ["src", "alt"], Ii = { class: "max-w-20 truncate" }, Ci = ["onClick"], Di = {
2326
+ }, Ii = ["src", "alt"], Di = { class: "max-w-20 truncate" }, Mi = ["onClick"], Li = {
2302
2327
  key: 0,
2303
2328
  class: "shrink-0 flex items-center justify-center size-14"
2304
- }, Mi = ["disabled"], Li = {
2329
+ }, Oi = ["disabled"], zi = {
2305
2330
  key: 0,
2306
2331
  class: "i-svg-spinners-ring-resize size-4"
2307
- }, Oi = {
2332
+ }, Pi = {
2308
2333
  key: 1,
2309
2334
  class: "i-tabler-paperclip size-5"
2310
- }, zi = ["placeholder", "disabled"], Pi = ["disabled"], Yi = /* @__PURE__ */ Me({
2335
+ }, Ni = ["placeholder", "disabled"], $i = ["disabled"], Xi = /* @__PURE__ */ Me({
2311
2336
  __name: "ElAgentChat",
2312
2337
  props: {
2313
2338
  chatController: {},
@@ -2336,7 +2361,7 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2336
2361
  if (!_)
2337
2362
  return "";
2338
2363
  const f = L.parse(_, { async: !1 });
2339
- return br.sanitize(f, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2364
+ return kr.sanitize(f, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2340
2365
  }
2341
2366
  h(e, "renderMarkdown");
2342
2367
  const n = {
@@ -2358,9 +2383,9 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2358
2383
  return !M || M.sender !== x.sender;
2359
2384
  }
2360
2385
  h(y, "shouldShowAvatar");
2361
- const E = W(() => a.chatController?.textState.value), O = W(() => E.value?.isConnected ?? !1), ae = W(() => E.value?.isThinking ?? !1), ce = W(() => E.value?.connectionStatus === "disconnected" && !!E.value?.error), ne = W(() => E.value?.connectionStatus !== "connected" && !E.value?.error), N = W(() => E.value?.error), Y = W(() => a.chatController?.sharedMessages.value ?? []), ue = W(() => E.value?.accountGated ?? !1), Q = W(() => !O.value || ue.value), _t = W(() => ce.value ? "Agent is offline" : ne.value ? "Connecting..." : ue.value ? "Resolve the billing issue above to continue" : "Message"), ut = W(() => (l.value.trim() || d.value.length > 0) && !Q.value && !g.value), I = W(() => a.variant === "light"), q = W(
2362
- () => I.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2363
- ), we = W(() => I.value ? "text-theme-300" : "text-white/30");
2386
+ const E = W(() => a.chatController?.textState.value), O = W(() => E.value?.isConnected ?? !1), ce = W(() => E.value?.isThinking ?? !1), ue = W(() => E.value?.connectionStatus === "disconnected" && !!E.value?.error), ne = W(() => E.value?.connectionStatus !== "connected" && !E.value?.error), N = W(() => E.value?.error), Y = W(() => a.chatController?.sharedMessages.value ?? []), ae = W(() => E.value?.accountGated ?? !1), Q = W(() => !O.value || ae.value), _t = W(() => ue.value ? "Agent is offline" : ne.value ? "Connecting..." : ae.value ? "Resolve the billing issue above to continue" : "Message"), ut = W(() => (l.value.trim() || d.value.length > 0) && !Q.value && !g.value), C = W(() => a.variant === "light"), q = W(
2387
+ () => C.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2388
+ ), we = W(() => C.value ? "text-theme-300" : "text-white/30");
2364
2389
  tn(async () => {
2365
2390
  a.chatController && !O.value && await a.chatController.startTextConversation();
2366
2391
  });
@@ -2380,10 +2405,10 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2380
2405
  Q.value || (l.value = _, await ye());
2381
2406
  }
2382
2407
  h(Rt, "sendStarterPrompt");
2383
- async function It(_) {
2408
+ async function Ct(_) {
2384
2409
  _.key === "Enter" && !_.shiftKey && (_.preventDefault(), await ye());
2385
2410
  }
2386
- h(It, "handleKeydown");
2411
+ h(Ct, "handleKeydown");
2387
2412
  function ht() {
2388
2413
  c.value && jt(() => {
2389
2414
  c.value.scrollTop = c.value.scrollHeight;
@@ -2393,11 +2418,11 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2393
2418
  function pt() {
2394
2419
  b.value && (b.value.style.height = "auto", b.value.style.height = `${Math.min(b.value.scrollHeight, 150)}px`);
2395
2420
  }
2396
- h(pt, "adjustTextareaHeight"), ot(l, () => jt(() => pt()));
2397
- function Ct() {
2421
+ h(pt, "adjustTextareaHeight"), Ye(l, () => jt(() => pt()));
2422
+ function It() {
2398
2423
  p.value?.click();
2399
2424
  }
2400
- h(Ct, "triggerFileInput");
2425
+ h(It, "triggerFileInput");
2401
2426
  async function dt(_) {
2402
2427
  const f = _.target, x = f.files?.[0];
2403
2428
  if (!(!x || !a.uploadFn)) {
@@ -2414,11 +2439,11 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2414
2439
  }
2415
2440
  }
2416
2441
  h(dt, "handleFileSelect");
2417
- function U(_) {
2442
+ function B(_) {
2418
2443
  d.value = d.value.filter((f, x) => x !== _);
2419
2444
  }
2420
- h(U, "removeAttachment");
2421
- function Ze(_, f) {
2445
+ h(B, "removeAttachment");
2446
+ function Xe(_, f) {
2422
2447
  if (f === 0) {
2423
2448
  const Pe = _[f];
2424
2449
  return Pe?.timestamp ? F(new Date(Pe.timestamp)) : null;
@@ -2428,7 +2453,7 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2428
2453
  const P = new Date(x.timestamp).getTime();
2429
2454
  return new Date(M.timestamp).getTime() - P > 36e5 ? F(new Date(M.timestamp)) : null;
2430
2455
  }
2431
- h(Ze, "shouldShowTimeDivider");
2456
+ h(Xe, "shouldShowTimeDivider");
2432
2457
  function F(_) {
2433
2458
  const f = /* @__PURE__ */ new Date(), x = _.toDateString() === f.toDateString(), M = new Date(f);
2434
2459
  M.setDate(M.getDate() - 1);
@@ -2443,26 +2468,26 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2443
2468
  ...ze ? {} : { year: "numeric" }
2444
2469
  })}, ${xe}`;
2445
2470
  }
2446
- return h(F, "formatTimeDivider"), ot(Y, (_) => {
2471
+ return h(F, "formatTimeDivider"), Ye(Y, (_) => {
2447
2472
  _.length > 0 && jt(() => ht());
2448
- }, { immediate: !0, deep: !0 }), (_, f) => (T(), S("div", ii, [
2449
- I.value ? B("", !0) : (T(), S("div", ai, [
2450
- Wt(qs, {
2473
+ }, { immediate: !0, deep: !0 }), (_, f) => (T(), S("div", li, [
2474
+ C.value ? U("", !0) : (T(), S("div", oi, [
2475
+ Wt(Ys, {
2451
2476
  agent: a.agent,
2452
2477
  "is-online": O.value
2453
2478
  }, null, 8, ["agent", "is-online"])
2454
2479
  ])),
2455
- ce.value ? (T(), S("div", {
2480
+ ue.value ? (T(), S("div", {
2456
2481
  key: 1,
2457
- class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2482
+ class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", C.value ? "text-theme-400" : "text-white/60"])
2458
2483
  }, [
2459
2484
  w("i", {
2460
- class: A(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2485
+ class: A(["i-heroicons-cloud-arrow-down size-8", C.value ? "text-theme-300" : "text-white/40"])
2461
2486
  }, null, 2),
2462
2487
  w("span", null, ie(N.value), 1)
2463
2488
  ], 2)) : ne.value ? (T(), S("div", {
2464
2489
  key: 2,
2465
- class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
2490
+ class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", C.value ? "text-theme-400" : "text-theme-600"])
2466
2491
  }, [
2467
2492
  Wt(Ln, { class: "size-4" })
2468
2493
  ], 2)) : a.setupHint ? (T(), S("div", {
@@ -2471,103 +2496,103 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2471
2496
  }, [
2472
2497
  f[6] || (f[6] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2473
2498
  w("span", null, ie(a.setupHint), 1)
2474
- ], 2)) : B("", !0),
2499
+ ], 2)) : U("", !0),
2475
2500
  w("div", {
2476
2501
  ref_key: "messagesContainer",
2477
2502
  ref: c,
2478
2503
  class: "flex-1 overflow-y-auto overflow-x-hidden pt-4 pb-[120px] px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2479
2504
  }, [
2480
- Y.value.length === 0 && !ne.value && !ce.value ? (T(), S("div", li, [
2481
- w("div", oi, [
2505
+ Y.value.length === 0 && !ne.value && !ue.value ? (T(), S("div", ci, [
2506
+ w("div", ui, [
2482
2507
  w("img", {
2483
2508
  src: a.agent.avatarUrl.value,
2484
2509
  alt: a.agent.displayName.value,
2485
- class: A(["size-full rounded-full object-cover ring-1", I.value ? "ring-black/5" : "ring-white/10"])
2486
- }, null, 10, ci),
2510
+ class: A(["size-full rounded-full object-cover ring-1", C.value ? "ring-black/5" : "ring-white/10"])
2511
+ }, null, 10, hi),
2487
2512
  O.value ? (T(), S("span", {
2488
2513
  key: 0,
2489
- class: A(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", I.value ? "bg-white" : "bg-theme-900"])
2514
+ class: A(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", C.value ? "bg-white" : "bg-theme-900"])
2490
2515
  }, [...f[7] || (f[7] = [
2491
2516
  w("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2492
- ])], 2)) : B("", !0)
2517
+ ])], 2)) : U("", !0)
2493
2518
  ]),
2494
2519
  w("div", {
2495
- class: A(["text-base @sm/chat:text-lg font-semibold", I.value ? "text-theme-900" : "text-white"])
2520
+ class: A(["text-base @sm/chat:text-lg font-semibold", C.value ? "text-theme-900" : "text-white"])
2496
2521
  }, ie(a.agent.displayName.value), 3),
2497
2522
  w("p", {
2498
2523
  class: A(["mt-1 text-center text-xs @sm/chat:text-sm", we.value])
2499
2524
  }, ie(a.emptyStateMessage || "Tap a prompt to get started, or type your own."), 3),
2500
- s.value.length > 0 && !Q.value ? (T(), S("div", ui, [
2501
- (T(!0), S(Te, null, it(s.value, (x) => (T(), S("button", {
2525
+ s.value.length > 0 && !Q.value ? (T(), S("div", pi, [
2526
+ (T(!0), S(Te, null, at(s.value, (x) => (T(), S("button", {
2502
2527
  key: x,
2503
2528
  type: "button",
2504
2529
  "data-test": "chat-starter-prompt",
2505
- class: A(["text-left text-sm rounded-2xl px-4 py-2.5 transition-colors cursor-pointer", I.value ? "bg-theme-25 border border-theme-200 text-theme-700 hover:bg-theme-50 hover:border-theme-300" : "bg-white/5 border border-white/10 text-white/80 hover:bg-white/10 hover:border-white/20"]),
2530
+ class: A(["text-left text-sm rounded-2xl px-4 py-2.5 transition-colors cursor-pointer", C.value ? "bg-theme-25 border border-theme-200 text-theme-700 hover:bg-theme-50 hover:border-theme-300" : "bg-white/5 border border-white/10 text-white/80 hover:bg-white/10 hover:border-white/20"]),
2506
2531
  onClick: /* @__PURE__ */ h((M) => Rt(x), "onClick")
2507
- }, ie(x), 11, hi))), 128))
2508
- ])) : B("", !0),
2532
+ }, ie(x), 11, di))), 128))
2533
+ ])) : U("", !0),
2509
2534
  w("div", {
2510
- class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", I.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2535
+ class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", C.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2511
2536
  title: o.value.tooltip
2512
2537
  }, [
2513
2538
  w("i", {
2514
2539
  class: A([o.value.icon, "size-3"])
2515
2540
  }, null, 2),
2516
2541
  w("span", null, ie(o.value.label), 1)
2517
- ], 10, pi)
2518
- ])) : B("", !0),
2519
- Y.value.length > 0 ? (T(), S("div", di, [
2542
+ ], 10, fi)
2543
+ ])) : U("", !0),
2544
+ Y.value.length > 0 ? (T(), S("div", gi, [
2520
2545
  w("button", {
2521
2546
  type: "button",
2522
2547
  "data-test": "chat-new-session",
2523
- class: A(["inline-flex items-center gap-1 text-[11px] rounded-full px-2 py-1 transition-colors", I.value ? "text-theme-400 hover:text-theme-700 hover:bg-theme-50" : "text-white/40 hover:text-white hover:bg-white/5"]),
2548
+ class: A(["inline-flex items-center gap-1 text-[11px] rounded-full px-2 py-1 transition-colors", C.value ? "text-theme-400 hover:text-theme-700 hover:bg-theme-50" : "text-white/40 hover:text-white hover:bg-white/5"]),
2524
2549
  onClick: Oe
2525
2550
  }, [...f[8] || (f[8] = [
2526
2551
  w("i", { class: "i-tabler-refresh size-3" }, null, -1),
2527
2552
  w("span", null, "New chat", -1)
2528
2553
  ])], 2)
2529
- ])) : B("", !0),
2530
- (T(!0), S(Te, null, it(Y.value, (x, M) => (T(), S(Te, {
2554
+ ])) : U("", !0),
2555
+ (T(!0), S(Te, null, at(Y.value, (x, M) => (T(), S(Te, {
2531
2556
  key: x.id
2532
2557
  }, [
2533
- Ze(Y.value, M) ? (T(), S("div", fi, [
2558
+ Xe(Y.value, M) ? (T(), S("div", mi, [
2534
2559
  w("div", {
2535
2560
  class: A(["flex-1 h-px", q.value])
2536
2561
  }, null, 2),
2537
2562
  w("span", {
2538
2563
  class: A(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", we.value])
2539
- }, ie(Ze(Y.value, M)), 3),
2564
+ }, ie(Xe(Y.value, M)), 3),
2540
2565
  w("div", {
2541
2566
  class: A(["flex-1 h-px", q.value])
2542
2567
  }, null, 2)
2543
- ])) : B("", !0),
2568
+ ])) : U("", !0),
2544
2569
  x.sender === "system" ? (T(), S("div", {
2545
2570
  key: 1,
2546
2571
  "data-test": "messaging-system-msg",
2547
2572
  "data-issue-code": x.issue?.code,
2548
2573
  "data-issue-bucket": x.issue?.bucket,
2549
- class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", I.value ? "text-theme-500" : "text-white/70"])
2574
+ class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", C.value ? "text-theme-500" : "text-white/70"])
2550
2575
  }, [
2551
2576
  w("i", {
2552
- class: A(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", x.issue?.bucket === "account" ? I.value ? "text-amber-500" : "text-amber-300" : I.value ? "text-red-500" : "text-red-300"])
2577
+ class: A(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", x.issue?.bucket === "account" ? C.value ? "text-amber-500" : "text-amber-300" : C.value ? "text-red-500" : "text-red-300"])
2553
2578
  }, null, 2),
2554
- w("div", mi, [
2579
+ w("div", xi, [
2555
2580
  w("span", null, ie(x.text), 1),
2556
2581
  x.issue?.help ? (T(), S("span", {
2557
2582
  key: 0,
2558
- class: A(["text-[12px]", I.value ? "text-theme-400" : "text-white/55"])
2559
- }, ie(x.issue.help), 3)) : B("", !0),
2583
+ class: A(["text-[12px]", C.value ? "text-theme-400" : "text-white/55"])
2584
+ }, ie(x.issue.help), 3)) : U("", !0),
2560
2585
  x.issue?.actionUrl ? (T(), S("a", {
2561
2586
  key: 1,
2562
2587
  href: x.issue.actionUrl,
2563
2588
  "data-test": "messaging-system-msg-action",
2564
- class: A(["text-[12px] font-medium inline-flex items-center gap-1", I.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"])
2589
+ class: A(["text-[12px] font-medium inline-flex items-center gap-1", C.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"])
2565
2590
  }, [
2566
- Je(ie(x.issue.actionLabel) + " ", 1),
2591
+ et(ie(x.issue.actionLabel) + " ", 1),
2567
2592
  f[9] || (f[9] = w("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2568
- ], 10, bi)) : B("", !0)
2593
+ ], 10, ki)) : U("", !0)
2569
2594
  ])
2570
- ], 10, gi)) : (T(), S("div", {
2595
+ ], 10, bi)) : (T(), S("div", {
2571
2596
  key: 2,
2572
2597
  "data-test": x.sender === "agent" ? "messaging-assistant-msg" : x.sender === "user" ? "messaging-user-msg" : void 0,
2573
2598
  class: A(["flex gap-2 items-end", {
@@ -2576,14 +2601,14 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2576
2601
  "mb-4": y(Y.value, M)
2577
2602
  }])
2578
2603
  }, [
2579
- x.sender === "agent" ? (T(), S("div", ki, [
2604
+ x.sender === "agent" ? (T(), S("div", yi, [
2580
2605
  y(Y.value, M) ? (T(), S("img", {
2581
2606
  key: 0,
2582
2607
  src: a.agent.avatarUrl.value,
2583
2608
  alt: a.agent.displayName.value,
2584
- class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2585
- }, null, 10, wi)) : B("", !0)
2586
- ])) : B("", !0),
2609
+ class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", C.value ? "ring-1 ring-black/5" : ""])
2610
+ }, null, 10, vi)) : U("", !0)
2611
+ ])) : U("", !0),
2587
2612
  w("div", {
2588
2613
  class: A(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2589
2614
  }, [
@@ -2591,65 +2616,65 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2591
2616
  key: 0,
2592
2617
  class: A(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2593
2618
  }, [
2594
- (T(!0), S(Te, null, it(x.attachments, (P, xe) => (T(), S(Te, { key: xe }, [
2619
+ (T(!0), S(Te, null, at(x.attachments, (P, xe) => (T(), S(Te, { key: xe }, [
2595
2620
  P.type === "image" ? (T(), S("img", {
2596
2621
  key: 0,
2597
2622
  src: P.url,
2598
2623
  alt: P.name,
2599
2624
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2600
- }, null, 8, yi)) : P.type === "audio" ? (T(), S("audio", {
2625
+ }, null, 8, Ti)) : P.type === "audio" ? (T(), S("audio", {
2601
2626
  key: 1,
2602
2627
  src: P.url,
2603
2628
  controls: "",
2604
2629
  class: "max-w-full"
2605
- }, null, 8, vi)) : (T(), S("a", {
2630
+ }, null, 8, Si)) : (T(), S("a", {
2606
2631
  key: 2,
2607
2632
  href: P.url,
2608
2633
  target: "_blank",
2609
2634
  rel: "noopener",
2610
- class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", I.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2635
+ class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", C.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2611
2636
  }, [
2612
2637
  f[10] || (f[10] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2613
- Je(" " + ie(P.name), 1)
2614
- ], 10, Ti))
2638
+ et(" " + ie(P.name), 1)
2639
+ ], 10, Ai))
2615
2640
  ], 64))), 128))
2616
- ], 2)) : B("", !0),
2641
+ ], 2)) : U("", !0),
2617
2642
  x.text ? (T(), S("div", {
2618
2643
  key: 1,
2619
2644
  class: A(["rounded-2xl px-3.5 py-2", [
2620
- x.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : I.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2645
+ x.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : C.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2621
2646
  ]])
2622
2647
  }, [
2623
2648
  w("div", {
2624
- class: A(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", x.sender === "user" || !I.value ? "chat-msg-prose-invert" : ""]),
2649
+ class: A(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", x.sender === "user" || !C.value ? "chat-msg-prose-invert" : ""]),
2625
2650
  innerHTML: e(x.text),
2626
- onClick: f[0] || (f[0] = Rs(() => {
2651
+ onClick: f[0] || (f[0] = Cs(() => {
2627
2652
  }, ["stop"]))
2628
- }, null, 10, Si)
2629
- ], 2)) : B("", !0)
2653
+ }, null, 10, Ei)
2654
+ ], 2)) : U("", !0)
2630
2655
  ], 2)
2631
- ], 10, xi))
2656
+ ], 10, wi))
2632
2657
  ], 64))), 128)),
2633
- ae.value ? (T(), S("div", Ai, [
2658
+ ce.value ? (T(), S("div", _i, [
2634
2659
  w("img", {
2635
2660
  src: a.agent.avatarUrl.value,
2636
2661
  alt: a.agent.displayName.value,
2637
- class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2638
- }, null, 10, Ei),
2662
+ class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", C.value ? "ring-1 ring-black/5" : ""])
2663
+ }, null, 10, Ri),
2639
2664
  w("div", {
2640
- class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2665
+ class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", C.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2641
2666
  }, [
2642
2667
  w("i", {
2643
- class: A(["i-svg-spinners-3-dots-bounce size-7", I.value ? "text-theme-400" : "text-white/50"])
2668
+ class: A(["i-svg-spinners-3-dots-bounce size-7", C.value ? "text-theme-400" : "text-white/50"])
2644
2669
  }, null, 2)
2645
2670
  ], 2)
2646
- ])) : B("", !0)
2671
+ ])) : U("", !0)
2647
2672
  ], 512),
2648
2673
  w("div", {
2649
- class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", I.value ? "bg-gradient-to-t from-white via-white/95 to-white/70" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2674
+ class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", C.value ? "bg-gradient-to-t from-white via-white/95 to-white/70" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2650
2675
  }, [
2651
- d.value.length > 0 ? (T(), S("div", _i, [
2652
- (T(!0), S(Te, null, it(d.value, (x, M) => (T(), S("div", {
2676
+ d.value.length > 0 ? (T(), S("div", Ci, [
2677
+ (T(!0), S(Te, null, at(d.value, (x, M) => (T(), S("div", {
2653
2678
  key: M,
2654
2679
  class: "relative shrink-0 group"
2655
2680
  }, [
@@ -2657,25 +2682,25 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2657
2682
  key: 0,
2658
2683
  src: x.url,
2659
2684
  alt: x.name,
2660
- class: A(["size-14 rounded-xl object-cover border", I.value ? "border-black/10" : "border-white/20"])
2661
- }, null, 10, Ri)) : (T(), S("div", {
2685
+ class: A(["size-14 rounded-xl object-cover border", C.value ? "border-black/10" : "border-white/20"])
2686
+ }, null, 10, Ii)) : (T(), S("div", {
2662
2687
  key: 1,
2663
- class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", I.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2688
+ class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", C.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2664
2689
  }, [
2665
2690
  f[11] || (f[11] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2666
- w("span", Ii, ie(x.name), 1)
2691
+ w("span", Di, ie(x.name), 1)
2667
2692
  ], 2)),
2668
2693
  w("button", {
2669
2694
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
2670
- onClick: /* @__PURE__ */ h((P) => U(M), "onClick")
2695
+ onClick: /* @__PURE__ */ h((P) => B(M), "onClick")
2671
2696
  }, [...f[12] || (f[12] = [
2672
2697
  w("i", { class: "i-tabler-x size-3" }, null, -1)
2673
- ])], 8, Ci)
2698
+ ])], 8, Mi)
2674
2699
  ]))), 128)),
2675
- g.value ? (T(), S("div", Di, [
2700
+ g.value ? (T(), S("div", Li, [
2676
2701
  Wt(Ln, { class: "size-5" })
2677
- ])) : B("", !0)
2678
- ])) : B("", !0),
2702
+ ])) : U("", !0)
2703
+ ])) : U("", !0),
2679
2704
  a.uploadFn ? (T(), S("input", {
2680
2705
  key: 1,
2681
2706
  ref_key: "fileInput",
@@ -2684,21 +2709,21 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2684
2709
  accept: "image/*,audio/*,video/*",
2685
2710
  class: "hidden",
2686
2711
  onChange: dt
2687
- }, null, 544)) : B("", !0),
2712
+ }, null, 544)) : U("", !0),
2688
2713
  w("div", {
2689
- class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", I.value ? m.value ? "bg-white ring-1 ring-black/10 shadow-[0_4px_16px_rgba(0,0,0,0.06)]" : "bg-theme-50 ring-1 ring-transparent hover:ring-black/5" : m.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2714
+ class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", C.value ? m.value ? "bg-white ring-1 ring-black/10 shadow-[0_4px_16px_rgba(0,0,0,0.06)]" : "bg-theme-50 ring-1 ring-transparent hover:ring-black/5" : m.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2690
2715
  }, [
2691
2716
  w("button", {
2692
2717
  class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2693
2718
  a.uploadFn ? "cursor-pointer" : "cursor-default",
2694
- I.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2719
+ C.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2695
2720
  g.value ? "opacity-50 pointer-events-none" : ""
2696
2721
  ]]),
2697
2722
  disabled: Q.value || g.value || !a.uploadFn,
2698
- onClick: f[1] || (f[1] = (x) => a.uploadFn && Ct())
2723
+ onClick: f[1] || (f[1] = (x) => a.uploadFn && It())
2699
2724
  }, [
2700
- g.value ? (T(), S("i", Li)) : (T(), S("i", Oi))
2701
- ], 10, Mi),
2725
+ g.value ? (T(), S("i", zi)) : (T(), S("i", Pi))
2726
+ ], 10, Oi),
2702
2727
  ss(w("textarea", {
2703
2728
  ref_key: "textarea",
2704
2729
  ref: b,
@@ -2709,42 +2734,42 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2709
2734
  placeholder: _t.value,
2710
2735
  disabled: Q.value,
2711
2736
  style: { fontSize: "16px", resize: "none" },
2712
- class: A(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", I.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2713
- onKeydown: It,
2737
+ class: A(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", C.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2738
+ onKeydown: Ct,
2714
2739
  onFocus: f[3] || (f[3] = (x) => m.value = !0),
2715
2740
  onBlur: f[4] || (f[4] = (x) => m.value = !1)
2716
- }, null, 42, zi), [
2741
+ }, null, 42, Ni), [
2717
2742
  [rs, l.value]
2718
2743
  ]),
2719
2744
  w("button", {
2720
2745
  "data-test": "messaging-send-btn",
2721
- class: A(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", ut.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : I.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2746
+ class: A(["shrink-0 flex items-center justify-center rounded-full transition-all duration-300 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", ut.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : C.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2722
2747
  disabled: !ut.value,
2723
2748
  onClick: f[5] || (f[5] = (x) => ye())
2724
2749
  }, [...f[13] || (f[13] = [
2725
2750
  w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2726
- ])], 10, Pi)
2751
+ ])], 10, $i)
2727
2752
  ], 2),
2728
2753
  w("div", {
2729
- class: A(["text-[10px] text-center mt-2.5 select-none opacity-70", I.value ? "text-theme-400" : "text-white/50"])
2754
+ class: A(["text-[10px] text-center mt-2.5 select-none opacity-70", C.value ? "text-theme-400" : "text-white/50"])
2730
2755
  }, [
2731
- f[14] || (f[14] = Je(" Press ", -1)),
2756
+ f[14] || (f[14] = et(" Press ", -1)),
2732
2757
  w("kbd", {
2733
- class: A(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", I.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2758
+ class: A(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", C.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2734
2759
  }, "Enter", 2),
2735
- f[15] || (f[15] = Je(" to send, ", -1)),
2760
+ f[15] || (f[15] = et(" to send, ", -1)),
2736
2761
  w("kbd", {
2737
- class: A(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", I.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2762
+ class: A(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", C.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2738
2763
  }, "Shift+Enter", 2),
2739
- f[16] || (f[16] = Je(" for new line ", -1))
2764
+ f[16] || (f[16] = et(" for new line ", -1))
2740
2765
  ], 2)
2741
2766
  ], 2)
2742
2767
  ]));
2743
2768
  }
2744
- }), Ni = { class: "agent-wrap" }, $i = {
2769
+ }), Ui = { class: "agent-wrap" }, Bi = {
2745
2770
  key: 0,
2746
2771
  class: "flex items-center justify-center h-full"
2747
- }, Zi = /* @__PURE__ */ Me({
2772
+ }, Ki = /* @__PURE__ */ Me({
2748
2773
  __name: "AgentWrap",
2749
2774
  props: {
2750
2775
  sdk: {},
@@ -2758,7 +2783,7 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2758
2783
  apiBase: {}
2759
2784
  },
2760
2785
  setup(a) {
2761
- const t = Ds("AgentWrap"), e = a, n = e.sdk || Ms.getInstance({
2786
+ const t = Ms("AgentWrap"), e = a, n = e.sdk || Ls.getInstance({
2762
2787
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2763
2788
  ...e.apiBase && { apiBase: e.apiBase }
2764
2789
  }), r = ee(!e.agent), s = Is(e.agent ? new yt({ config: e.agent }) : void 0), o = ee();
@@ -2838,8 +2863,8 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2838
2863
  }
2839
2864
  });
2840
2865
  }
2841
- }), (l, m) => (T(), S("div", Ni, [
2842
- r.value ? (T(), S("div", $i, [...m[0] || (m[0] = [
2866
+ }), (l, m) => (T(), S("div", Ui, [
2867
+ r.value ? (T(), S("div", Bi, [...m[0] || (m[0] = [
2843
2868
  w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2844
2869
  ])])) : s.value ? ns(l.$slots, "default", {
2845
2870
  key: 1,
@@ -2850,21 +2875,21 @@ const ii = { class: "@container/chat flex flex-col h-full relative" }, ai = {
2850
2875
  buttonText: a.buttonText,
2851
2876
  buttonIcon: a.buttonIcon,
2852
2877
  loading: r.value
2853
- }) : B("", !0)
2878
+ }) : U("", !0)
2854
2879
  ]));
2855
2880
  }
2856
2881
  });
2857
2882
  export {
2858
2883
  On as A,
2859
- Zi as _,
2860
- Yi as a,
2861
- qi as b,
2862
- Wi as c,
2863
- Vi as d,
2884
+ Ki as _,
2885
+ Xi as a,
2886
+ Yi as b,
2887
+ Vi as c,
2888
+ Zi as d,
2864
2889
  Ln as e,
2865
- qs as f,
2866
- Gi as g,
2890
+ Ys as f,
2891
+ Wi as g,
2867
2892
  Pn as h,
2868
- ji as p
2893
+ qi as p
2869
2894
  };
2870
2895
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map