@pagelines/sdk 1.0.460 → 1.0.461

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.
@@ -2,10 +2,10 @@ var In = Object.defineProperty;
2
2
  var ws = (l, t, e) => t in l ? In(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
3
  var h = (l, t) => In(l, "name", { value: t, configurable: !0 });
4
4
  var C = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as Ie, openBlock as S, createElementBlock as A, createElementVNode as w, normalizeClass as E, ref as Z, watch as rt, computed as H, createCommentVNode as U, renderSlot as Zn, onMounted as Jt, Fragment as _e, renderList as bt, withDirectives as Xn, vModelText as Kn, unref as Zt, toDisplayString as re, nextTick as Ft, createVNode as Ht, createTextVNode as Ye, shallowRef as vs } from "vue";
6
- import { SettingsObject as ys, Agent as wt, getDefaultAvatarUrl as Qn, createLogger as Ts } from "@pagelines/core";
7
- import { P as Ss } from "./sdkClient.js";
8
- const As = { class: "spinner max-w-sm" }, Es = {
5
+ import { defineComponent as Ie, openBlock as S, createElementBlock as A, createElementVNode as v, normalizeClass as E, ref as Z, watch as rt, computed as H, createCommentVNode as U, renderSlot as Zn, onMounted as Jt, Fragment as _e, renderList as bt, withDirectives as Xn, vModelText as Kn, unref as Zt, toDisplayString as re, nextTick as Ft, createVNode as Ht, createTextVNode as Ye, withModifiers as vs, shallowRef as ys } from "vue";
6
+ import { SettingsObject as Ts, Agent as wt, getDefaultAvatarUrl as Qn, createLogger as Ss } from "@pagelines/core";
7
+ import { P as As } from "./sdkClient.js";
8
+ const Es = { class: "spinner max-w-sm" }, _s = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
11
  }, Dn = /* @__PURE__ */ Ie({
@@ -15,9 +15,9 @@ const As = { class: "spinner max-w-sm" }, Es = {
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(l) {
18
- return (t, e) => (S(), A("div", As, [
19
- (S(), A("svg", Es, [
20
- w("circle", {
18
+ return (t, e) => (S(), A("div", Es, [
19
+ (S(), A("svg", _s, [
20
+ v("circle", {
21
21
  class: E([l.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
@@ -30,10 +30,10 @@ const As = { class: "spinner max-w-sm" }, Es = {
30
30
  ]))
31
31
  ]));
32
32
  }
33
- }), _s = [
33
+ }), Rs = [
34
34
  { pattern: /\bNO_REP\w*\b/g, label: "NO_REPLY — bot chose not to respond" },
35
35
  { pattern: /\bHEARTBEAT_OK\b/g, label: "HEARTBEAT_OK — scheduled check, nothing to do" }
36
- ], Rs = 9e4, un = class un extends ys {
36
+ ], Cs = 9e4, un = class un extends Ts {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
39
  C(this, "isTextMode", !1);
@@ -180,24 +180,24 @@ Current User:
180
180
  ...this.sharedMessages.value,
181
181
  { id: a, text: "", sender: "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
182
182
  ]);
183
- const m = this.sharedMessages.value, T = m[m.length - 1];
184
- T?.id === a && (T.text += p, this.sharedMessages.value = [...m]);
183
+ const x = this.sharedMessages.value, T = x[x.length - 1];
184
+ T?.id === a && (T.text += p, this.sharedMessages.value = [...x]);
185
185
  }, "onDelta"), f = /* @__PURE__ */ h((p) => {
186
186
  if (!o) {
187
187
  g("empty_stream — assistant returned no content");
188
188
  return;
189
189
  }
190
- const m = this.sharedMessages.value, T = m[m.length - 1];
190
+ const x = this.sharedMessages.value, T = x[x.length - 1];
191
191
  if (T?.id === a && T.text) {
192
192
  let _ = T.text;
193
- for (const z of _s)
193
+ for (const z of Rs)
194
194
  z.pattern.test(_) && (console.debug(`[chat] filtered directive: ${z.label}`), _ = _.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
195
- _ ? _ !== T.text && (T.text = _, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
195
+ _ ? _ !== T.text && (T.text = _, this.sharedMessages.value = [...x]) : this.sharedMessages.value = x.slice(0, -1);
196
196
  }
197
197
  p && (this.conversationId = p), this.updateState(this.textState, { isThinking: !1 });
198
198
  }, "onDone"), g = /* @__PURE__ */ h((p) => {
199
- const m = this.sharedMessages.value, T = m[m.length - 1];
200
- if (T?.id === a && !T.text && (this.sharedMessages.value = m.slice(0, -1)), typeof p == "object" && p.code && p.error) {
199
+ const x = this.sharedMessages.value, T = x[x.length - 1];
200
+ if (T?.id === a && !T.text && (this.sharedMessages.value = x.slice(0, -1)), typeof p == "object" && p.code && p.error) {
201
201
  const { bucket: te, actionUrl: ae, actionLabel: J, help: P } = p;
202
202
  if (te !== void 0 || (/* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP", "EMPTY_STREAM", "RATE_LIMIT"])).has(p.code)) {
203
203
  const ne = te && ae && J ? { code: p.code, bucket: te, actionLabel: J, actionUrl: ae, ...P ? { help: P } : {} } : void 0;
@@ -236,7 +236,7 @@ Current User:
236
236
  });
237
237
  await Promise.race([
238
238
  p,
239
- new Promise((m, T) => setTimeout(() => T(new Error("timed out")), Rs))
239
+ new Promise((x, T) => setTimeout(() => T(new Error("timed out")), Cs))
240
240
  ]);
241
241
  } catch (p) {
242
242
  g(p.message || "Something went wrong");
@@ -269,24 +269,24 @@ function Ln(l) {
269
269
  return l ? typeof l == "string" ? l : l.src || "" : "";
270
270
  }
271
271
  h(Ln, "getImageSrc");
272
- function Ii(l) {
272
+ function Di(l) {
273
273
  return Ln(l.cover) || Ln(l.avatar) || Qn(l.name);
274
274
  }
275
- h(Ii, "getAgentAvatarUrl");
275
+ h(Di, "getAgentAvatarUrl");
276
276
  function zn(l) {
277
277
  const t = l.target;
278
278
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Qn());
279
279
  }
280
280
  h(zn, "handleImageError");
281
- function Di(l) {
281
+ function Mi(l) {
282
282
  const { template: t, agent: e } = l;
283
283
  return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
284
284
  }
285
- h(Di, "parseButtonTemplate");
286
- const Cs = {
285
+ h(Mi, "parseButtonTemplate");
286
+ const Is = {
287
287
  key: 0,
288
288
  class: "absolute inset-0 flex items-center justify-center"
289
- }, Mi = /* @__PURE__ */ Ie({
289
+ }, Li = /* @__PURE__ */ Ie({
290
290
  __name: "ElAgentButton",
291
291
  props: {
292
292
  theme: { default: "primary" },
@@ -313,10 +313,10 @@ const Cs = {
313
313
  return (s, r) => (S(), A("button", {
314
314
  class: E(["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]])
315
315
  }, [
316
- l.loading ? (S(), A("div", Cs, [...r[0] || (r[0] = [
317
- w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
316
+ l.loading ? (S(), A("div", Is, [...r[0] || (r[0] = [
317
+ v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
318
318
  ])])) : U("", !0),
319
- w("span", {
319
+ v("span", {
320
320
  class: E(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
321
321
  }, [
322
322
  l.icon ? (S(), A("i", {
@@ -331,7 +331,7 @@ const Cs = {
331
331
  ], 2)
332
332
  ], 2));
333
333
  }
334
- }), Is = ["value"], Li = /* @__PURE__ */ Ie({
334
+ }), Ds = ["value"], zi = /* @__PURE__ */ Ie({
335
335
  __name: "AgentInputEmail",
336
336
  props: {
337
337
  modelValue: { default: "" }
@@ -347,9 +347,9 @@ const Cs = {
347
347
  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",
348
348
  style: { "font-size": "16px" },
349
349
  onInput: s[0] || (s[0] = (r) => e("update:modelValue", r.target.value))
350
- }, null, 40, Is));
350
+ }, null, 40, Ds));
351
351
  }
352
- }), Ds = { class: "flex gap-1.5 justify-center" }, Ms = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], zi = /* @__PURE__ */ Ie({
352
+ }), Ms = { class: "flex gap-1.5 justify-center" }, Ls = ["onUpdate:modelValue", "onInput", "onKeydown", "onPaste", "onFocus"], Oi = /* @__PURE__ */ Ie({
353
353
  __name: "AgentInputOneTimeCode",
354
354
  props: {
355
355
  modelValue: {},
@@ -369,17 +369,17 @@ const Cs = {
369
369
  }, { deep: !0 });
370
370
  function o(d, p) {
371
371
  p.preventDefault(), a.value = !0;
372
- const m = (p.clipboardData?.getData("text") || "").replace(/\D/g, "");
373
- if (m.length === e.length)
374
- r.value = m.split(""), setTimeout(() => {
372
+ const x = (p.clipboardData?.getData("text") || "").replace(/\D/g, "");
373
+ if (x.length === e.length)
374
+ r.value = x.split(""), setTimeout(() => {
375
375
  s.value[e.length - 1]?.focus(), a.value = !1;
376
376
  }, 10);
377
377
  else {
378
378
  const T = [...r.value];
379
- m.split("").slice(0, e.length - d).forEach((z, te) => {
379
+ x.split("").slice(0, e.length - d).forEach((z, te) => {
380
380
  T[d + te] = z;
381
381
  }), r.value = T;
382
- const _ = Math.min(d + m.length, e.length - 1);
382
+ const _ = Math.min(d + x.length, e.length - 1);
383
383
  setTimeout(() => {
384
384
  s.value[_]?.focus(), a.value = !1;
385
385
  }, 10);
@@ -387,8 +387,8 @@ const Cs = {
387
387
  }
388
388
  h(o, "onPaste");
389
389
  function c(d, p) {
390
- const m = p.target.value.slice(-1).replace(/\D/g, "");
391
- r.value[d] = m, m && d < e.length - 1 && s.value[d + 1]?.focus();
390
+ const x = p.target.value.slice(-1).replace(/\D/g, "");
391
+ r.value[d] = x, x && d < e.length - 1 && s.value[d + 1]?.focus();
392
392
  }
393
393
  h(c, "onInput");
394
394
  function f(d, p) {
@@ -400,31 +400,31 @@ const Cs = {
400
400
  for (let p = d; p < e.length; p++)
401
401
  r.value[p] = "";
402
402
  }
403
- return h(g, "onFocus"), (d, p) => (S(), A("div", Ds, [
404
- (S(!0), A(_e, null, bt(l.length, (m) => Xn((S(), A("input", {
405
- key: m,
403
+ return h(g, "onFocus"), (d, p) => (S(), A("div", Ms, [
404
+ (S(!0), A(_e, null, bt(l.length, (x) => Xn((S(), A("input", {
405
+ key: x,
406
406
  ref_for: !0,
407
- ref: /* @__PURE__ */ h((T) => s.value[m - 1] = T, "ref"),
408
- "onUpdate:modelValue": /* @__PURE__ */ h((T) => r.value[m - 1] = T, "onUpdate:modelValue"),
407
+ ref: /* @__PURE__ */ h((T) => s.value[x - 1] = T, "ref"),
408
+ "onUpdate:modelValue": /* @__PURE__ */ h((T) => r.value[x - 1] = T, "onUpdate:modelValue"),
409
409
  type: "text",
410
410
  inputmode: "numeric",
411
411
  autocomplete: "one-time-code",
412
412
  class: "size-11 text-center font-mono text-theme-900 bg-white border border-white rounded-lg focus:outline-none transition-all",
413
413
  style: { "font-size": "16px" },
414
414
  maxlength: "1",
415
- onInput: /* @__PURE__ */ h((T) => c(m - 1, T), "onInput"),
416
- onKeydown: /* @__PURE__ */ h((T) => f(m - 1, T), "onKeydown"),
417
- onPaste: /* @__PURE__ */ h((T) => o(m - 1, T), "onPaste"),
418
- onFocus: /* @__PURE__ */ h((T) => g(m - 1), "onFocus")
419
- }, null, 40, Ms)), [
420
- [Kn, r.value[m - 1]]
415
+ onInput: /* @__PURE__ */ h((T) => c(x - 1, T), "onInput"),
416
+ onKeydown: /* @__PURE__ */ h((T) => f(x - 1, T), "onKeydown"),
417
+ onPaste: /* @__PURE__ */ h((T) => o(x - 1, T), "onPaste"),
418
+ onFocus: /* @__PURE__ */ h((T) => g(x - 1), "onFocus")
419
+ }, null, 40, Ls)), [
420
+ [Kn, r.value[x - 1]]
421
421
  ])), 128))
422
422
  ]));
423
423
  }
424
- }), Ls = { class: "relative flex-shrink-0" }, zs = ["src", "alt"], Os = { class: "absolute top-1 right-1" }, Ps = {
424
+ }), zs = { class: "relative flex-shrink-0" }, Os = ["src", "alt"], Ps = { class: "absolute top-1 right-1" }, Ns = {
425
425
  key: 1,
426
426
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
427
- }, Ns = { class: "min-w-0" }, $s = /* @__PURE__ */ Ie({
427
+ }, $s = { class: "min-w-0" }, Us = /* @__PURE__ */ Ie({
428
428
  __name: "ElModeHeader",
429
429
  props: {
430
430
  agent: {},
@@ -438,36 +438,36 @@ const Cs = {
438
438
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
439
439
  ]])
440
440
  }, [
441
- w("div", Ls, [
442
- w("div", {
441
+ v("div", zs, [
442
+ v("div", {
443
443
  class: E(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
444
444
  }, [
445
- w("img", {
445
+ v("img", {
446
446
  src: l.agent.avatarUrl.value,
447
447
  alt: l.agent.displayName.value,
448
448
  class: "w-full h-full object-cover",
449
449
  onError: e[0] || (e[0] = //@ts-ignore
450
450
  (...n) => Zt(zn) && Zt(zn)(...n))
451
- }, null, 40, zs)
451
+ }, null, 40, Os)
452
452
  ], 2),
453
- w("div", Os, [
453
+ v("div", Ps, [
454
454
  l.isOnline ? (S(), A(_e, { key: 0 }, [
455
- e[1] || (e[1] = w("div", {
455
+ e[1] || (e[1] = v("div", {
456
456
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
457
457
  style: { "animation-duration": "3s" }
458
458
  }, null, -1)),
459
- e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
460
- ], 64)) : (S(), A("div", Ps))
459
+ e[2] || (e[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
460
+ ], 64)) : (S(), A("div", Ns))
461
461
  ])
462
462
  ]),
463
- w("div", Ns, [
464
- w("h1", {
463
+ v("div", $s, [
464
+ v("h1", {
465
465
  class: E(["font-light text-white mb-1 truncate", [
466
466
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
467
467
  l.layout === "horizontal" ? "text-white/95" : ""
468
468
  ]])
469
469
  }, re(l.agent.displayName.value), 3),
470
- w("p", {
470
+ v("p", {
471
471
  class: E(["font-light line-clamp-1", [
472
472
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
473
473
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
@@ -480,9 +480,9 @@ const Cs = {
480
480
  const {
481
481
  entries: Jn,
482
482
  setPrototypeOf: On,
483
- isFrozen: Us,
484
- getPrototypeOf: Bs,
485
- getOwnPropertyDescriptor: Fs
483
+ isFrozen: Bs,
484
+ getPrototypeOf: Fs,
485
+ getOwnPropertyDescriptor: Hs
486
486
  } = Object;
487
487
  let {
488
488
  freeze: K,
@@ -508,7 +508,7 @@ Kt || (Kt = /* @__PURE__ */ h(function(t) {
508
508
  n[s - 1] = arguments[s];
509
509
  return new t(...n);
510
510
  }, "construct"));
511
- const Ze = Q(Array.prototype.forEach), Hs = Q(Array.prototype.lastIndexOf), Pn = Q(Array.prototype.pop), Xe = Q(Array.prototype.push), Gs = Q(Array.prototype.splice), kt = Q(String.prototype.toLowerCase), Gt = Q(String.prototype.toString), Wt = Q(String.prototype.match), Ne = Q(String.prototype.replace), Ws = Q(String.prototype.indexOf), js = Q(String.prototype.trim), ce = Q(Object.prototype.hasOwnProperty), Y = Q(RegExp.prototype.test), Ke = qs(TypeError);
511
+ const Ze = Q(Array.prototype.forEach), Gs = Q(Array.prototype.lastIndexOf), Pn = Q(Array.prototype.pop), Xe = Q(Array.prototype.push), Ws = Q(Array.prototype.splice), kt = Q(String.prototype.toLowerCase), Gt = Q(String.prototype.toString), Wt = Q(String.prototype.match), Ne = Q(String.prototype.replace), js = Q(String.prototype.indexOf), qs = Q(String.prototype.trim), ce = Q(Object.prototype.hasOwnProperty), Y = Q(RegExp.prototype.test), Ke = Vs(TypeError);
512
512
  function Q(l) {
513
513
  return function(t) {
514
514
  t instanceof RegExp && (t.lastIndex = 0);
@@ -518,14 +518,14 @@ function Q(l) {
518
518
  };
519
519
  }
520
520
  h(Q, "unapply");
521
- function qs(l) {
521
+ function Vs(l) {
522
522
  return function() {
523
523
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
524
524
  e[n] = arguments[n];
525
525
  return Kt(l, e);
526
526
  };
527
527
  }
528
- h(qs, "unconstruct");
528
+ h(Vs, "unconstruct");
529
529
  function R(l, t) {
530
530
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : kt;
531
531
  On && On(l, null);
@@ -534,36 +534,36 @@ function R(l, t) {
534
534
  let s = t[n];
535
535
  if (typeof s == "string") {
536
536
  const r = e(s);
537
- r !== s && (Us(t) || (t[n] = r), s = r);
537
+ r !== s && (Bs(t) || (t[n] = r), s = r);
538
538
  }
539
539
  l[s] = !0;
540
540
  }
541
541
  return l;
542
542
  }
543
543
  h(R, "addToSet");
544
- function Vs(l) {
544
+ function Ys(l) {
545
545
  for (let t = 0; t < l.length; t++)
546
546
  ce(l, t) || (l[t] = null);
547
547
  return l;
548
548
  }
549
- h(Vs, "cleanArray");
549
+ h(Ys, "cleanArray");
550
550
  function fe(l) {
551
551
  const t = nt(null);
552
552
  for (const [e, n] of Jn(l))
553
- ce(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = fe(n) : t[e] = n);
553
+ ce(l, e) && (Array.isArray(n) ? t[e] = Ys(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = fe(n) : t[e] = n);
554
554
  return t;
555
555
  }
556
556
  h(fe, "clone");
557
557
  function Qe(l, t) {
558
558
  for (; l !== null; ) {
559
- const n = Fs(l, t);
559
+ const n = Hs(l, t);
560
560
  if (n) {
561
561
  if (n.get)
562
562
  return Q(n.get);
563
563
  if (typeof n.value == "function")
564
564
  return Q(n.value);
565
565
  }
566
- l = Bs(l);
566
+ l = Fs(l);
567
567
  }
568
568
  function e() {
569
569
  return null;
@@ -571,25 +571,25 @@ function Qe(l, t) {
571
571
  return h(e, "fallbackValue"), e;
572
572
  }
573
573
  h(Qe, "lookupGetter");
574
- const Nn = K(["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"]), jt = K(["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"]), qt = K(["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"]), Ys = K(["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"]), Vt = K(["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"]), Zs = K(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $n = K(["#text"]), Un = K(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Yt = K(["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"]), Bn = K(["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"]), mt = K(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Xs = ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ks = ie(/<%[\w\W]*|[\w\W]*%>/gm), Qs = ie(/\$\{[\w\W]*/gm), Js = ie(/^data-[\-\w.\u00B7-\uFFFF]+$/), er = ie(/^aria-[\-\w]+$/), es = ie(
574
+ const Nn = K(["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"]), jt = K(["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"]), qt = K(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Zs = K(["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"]), Vt = K(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Xs = K(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), $n = K(["#text"]), Un = K(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Yt = K(["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"]), Bn = K(["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"]), mt = K(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ks = ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qs = ie(/<%[\w\W]*|[\w\W]*%>/gm), Js = ie(/\$\{[\w\W]*/gm), er = ie(/^data-[\-\w.\u00B7-\uFFFF]+$/), tr = ie(/^aria-[\-\w]+$/), es = ie(
575
575
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
576
576
  // eslint-disable-line no-useless-escape
577
- ), tr = ie(/^(?:\w+script|data):/i), nr = ie(
577
+ ), nr = ie(/^(?:\w+script|data):/i), sr = ie(
578
578
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
579
579
  // eslint-disable-line no-control-regex
580
- ), ts = ie(/^html$/i), sr = ie(/^[a-z][.\w]*(-[.\w]+)+$/i);
580
+ ), ts = ie(/^html$/i), rr = ie(/^[a-z][.\w]*(-[.\w]+)+$/i);
581
581
  var Fn = /* @__PURE__ */ Object.freeze({
582
582
  __proto__: null,
583
- ARIA_ATTR: er,
584
- ATTR_WHITESPACE: nr,
585
- CUSTOM_ELEMENT: sr,
586
- DATA_ATTR: Js,
583
+ ARIA_ATTR: tr,
584
+ ATTR_WHITESPACE: sr,
585
+ CUSTOM_ELEMENT: rr,
586
+ DATA_ATTR: er,
587
587
  DOCTYPE_NAME: ts,
588
- ERB_EXPR: Ks,
588
+ ERB_EXPR: Qs,
589
589
  IS_ALLOWED_URI: es,
590
- IS_SCRIPT_OR_DATA: tr,
591
- MUSTACHE_EXPR: Xs,
592
- TMPLIT_EXPR: Qs
590
+ IS_SCRIPT_OR_DATA: nr,
591
+ MUSTACHE_EXPR: Ks,
592
+ TMPLIT_EXPR: Js
593
593
  });
594
594
  const Je = {
595
595
  element: 1,
@@ -598,9 +598,9 @@ const Je = {
598
598
  progressingInstruction: 7,
599
599
  comment: 8,
600
600
  document: 9
601
- }, rr = /* @__PURE__ */ h(function() {
601
+ }, ir = /* @__PURE__ */ h(function() {
602
602
  return typeof window > "u" ? null : window;
603
- }, "getGlobal"), ir = /* @__PURE__ */ h(function(t, e) {
603
+ }, "getGlobal"), ar = /* @__PURE__ */ h(function(t, e) {
604
604
  if (typeof t != "object" || typeof t.createPolicy != "function")
605
605
  return null;
606
606
  let n = null;
@@ -633,7 +633,7 @@ const Je = {
633
633
  };
634
634
  }, "_createHooksMap");
635
635
  function ns() {
636
- let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : rr();
636
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ir();
637
637
  const t = /* @__PURE__ */ h((y) => ns(y), "DOMPurify");
638
638
  if (t.version = "3.4.0", t.removed = [], !l || !l.document || l.document.nodeType !== Je.document || !l.Element)
639
639
  return t.isSupported = !1, t;
@@ -649,7 +649,7 @@ function ns() {
649
649
  NamedNodeMap: g = l.NamedNodeMap || l.MozNamedAttrMap,
650
650
  HTMLFormElement: d,
651
651
  DOMParser: p,
652
- trustedTypes: m
652
+ trustedTypes: x
653
653
  } = l, T = c.prototype, _ = Qe(T, "cloneNode"), z = Qe(T, "remove"), te = Qe(T, "nextSibling"), ae = Qe(T, "childNodes"), J = Qe(T, "parentNode");
654
654
  if (typeof a == "function") {
655
655
  const y = e.createElement("template");
@@ -680,9 +680,9 @@ function ns() {
680
680
  IS_ALLOWED_URI: ct
681
681
  } = Fn, N = null;
682
682
  const Ge = R({}, [...Nn, ...jt, ...qt, ...Vt, ...$n]);
683
- let v = null;
683
+ let w = null;
684
684
  const k = R({}, [...Un, ...Yt, ...Bn, ...mt]);
685
- let x = Object.seal(nt(null, {
685
+ let m = Object.seal(nt(null, {
686
686
  tagNameCheck: {
687
687
  writable: !0,
688
688
  configurable: !1,
@@ -737,17 +737,17 @@ function ns() {
737
737
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
738
738
  if (!(Pe && Pe === i)) {
739
739
  if ((!i || typeof i != "object") && (i = {}), i = fe(i), Ve = // eslint-disable-next-line unicorn/prefer-includes
740
- ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, F = Ve === "application/xhtml+xml" ? Gt : kt, N = ce(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, F) : Ge, v = ce(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, F) : k, Pt = ce(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Gt) : fs, zt = ce(i, "ADD_URI_SAFE_ATTR") ? R(fe(xn), i.ADD_URI_SAFE_ATTR, F) : xn, gn = ce(i, "ADD_DATA_URI_TAGS") ? R(fe(mn), i.ADD_DATA_URI_TAGS, F) : mn, pe = ce(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, F) : Lt, L = ce(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, F) : fe({}), B = ce(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, F) : fe({}), ze = ce(i, "USE_PROFILES") ? i.USE_PROFILES : !1, We = i.ALLOW_ARIA_ATTR !== !1, Te = i.ALLOW_DATA_ATTR !== !1, hn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, pn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = i.SAFE_FOR_TEMPLATES || !1, je = i.SAFE_FOR_XML !== !1, Ae = i.WHOLE_DOCUMENT || !1, Le = i.RETURN_DOM || !1, ut = i.RETURN_DOM_FRAGMENT || !1, ht = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, Mt = i.KEEP_CONTENT !== !1, qe = i.IN_PLACE || !1, ct = i.ALLOWED_URI_REGEXP || es, Oe = i.NAMESPACE || de, ft = i.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = i.HTML_INTEGRATION_POINTS || gt, x = i.CUSTOM_ELEMENT_HANDLING || nt(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (x.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (x.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (Te = !1), ut && (Le = !0), ze && (N = R({}, $n), v = nt(null), ze.html === !0 && (R(N, Nn), R(v, Un)), ze.svg === !0 && (R(N, jt), R(v, Yt), R(v, mt)), ze.svgFilters === !0 && (R(N, qt), R(v, Yt), R(v, mt)), ze.mathMl === !0 && (R(N, Vt), R(v, Bn), R(v, mt))), V.tagCheck = null, V.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? V.tagCheck = i.ADD_TAGS : (N === Ge && (N = fe(N)), R(N, i.ADD_TAGS, F))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? V.attributeCheck = i.ADD_ATTR : (v === k && (v = fe(v)), R(v, i.ADD_ATTR, F))), i.ADD_URI_SAFE_ATTR && R(zt, i.ADD_URI_SAFE_ATTR, F), i.FORBID_CONTENTS && (pe === Lt && (pe = fe(pe)), R(pe, i.FORBID_CONTENTS, F)), i.ADD_FORBID_CONTENTS && (pe === Lt && (pe = fe(pe)), R(pe, i.ADD_FORBID_CONTENTS, F)), Mt && (N["#text"] = !0), Ae && R(N, ["html", "head", "body"]), N.table && (R(N, ["tbody"]), delete L.tbody), i.TRUSTED_TYPES_POLICY) {
740
+ ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, F = Ve === "application/xhtml+xml" ? Gt : kt, N = ce(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, F) : Ge, w = ce(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, F) : k, Pt = ce(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Gt) : fs, zt = ce(i, "ADD_URI_SAFE_ATTR") ? R(fe(xn), i.ADD_URI_SAFE_ATTR, F) : xn, gn = ce(i, "ADD_DATA_URI_TAGS") ? R(fe(mn), i.ADD_DATA_URI_TAGS, F) : mn, pe = ce(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, F) : Lt, L = ce(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, F) : fe({}), B = ce(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, F) : fe({}), ze = ce(i, "USE_PROFILES") ? i.USE_PROFILES : !1, We = i.ALLOW_ARIA_ATTR !== !1, Te = i.ALLOW_DATA_ATTR !== !1, hn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, pn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Se = i.SAFE_FOR_TEMPLATES || !1, je = i.SAFE_FOR_XML !== !1, Ae = i.WHOLE_DOCUMENT || !1, Le = i.RETURN_DOM || !1, ut = i.RETURN_DOM_FRAGMENT || !1, ht = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, Mt = i.KEEP_CONTENT !== !1, qe = i.IN_PLACE || !1, ct = i.ALLOWED_URI_REGEXP || es, Oe = i.NAMESPACE || de, ft = i.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = i.HTML_INTEGRATION_POINTS || gt, m = i.CUSTOM_ELEMENT_HANDLING || nt(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (m.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (m.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (m.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (Te = !1), ut && (Le = !0), ze && (N = R({}, $n), w = nt(null), ze.html === !0 && (R(N, Nn), R(w, Un)), ze.svg === !0 && (R(N, jt), R(w, Yt), R(w, mt)), ze.svgFilters === !0 && (R(N, qt), R(w, Yt), R(w, mt)), ze.mathMl === !0 && (R(N, Vt), R(w, Bn), R(w, mt))), V.tagCheck = null, V.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? V.tagCheck = i.ADD_TAGS : (N === Ge && (N = fe(N)), R(N, i.ADD_TAGS, F))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? V.attributeCheck = i.ADD_ATTR : (w === k && (w = fe(w)), R(w, i.ADD_ATTR, F))), i.ADD_URI_SAFE_ATTR && R(zt, i.ADD_URI_SAFE_ATTR, F), i.FORBID_CONTENTS && (pe === Lt && (pe = fe(pe)), R(pe, i.FORBID_CONTENTS, F)), i.ADD_FORBID_CONTENTS && (pe === Lt && (pe = fe(pe)), R(pe, i.ADD_FORBID_CONTENTS, F)), Mt && (N["#text"] = !0), Ae && R(N, ["html", "head", "body"]), N.table && (R(N, ["tbody"]), delete L.tbody), i.TRUSTED_TYPES_POLICY) {
741
741
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
742
742
  throw Ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
743
743
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
744
744
  throw Ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
745
745
  P = i.TRUSTED_TYPES_POLICY, W = P.createHTML("");
746
746
  } else
747
- P === void 0 && (P = ir(m, s)), P !== null && typeof W == "string" && (W = P.createHTML(""));
747
+ P === void 0 && (P = ar(x, s)), P !== null && typeof W == "string" && (W = P.createHTML(""));
748
748
  K && K(i), Pe = i;
749
749
  }
750
- }, "_parseConfig"), kn = R({}, [...jt, ...qt, ...Ys]), wn = R({}, [...Vt, ...Zs]), ks = /* @__PURE__ */ h(function(i) {
750
+ }, "_parseConfig"), kn = R({}, [...jt, ...qt, ...Zs]), wn = R({}, [...Vt, ...Xs]), ks = /* @__PURE__ */ h(function(i) {
751
751
  let u = J(i);
752
752
  (!u || !u.tagName) && (u = {
753
753
  namespaceURI: Oe,
@@ -841,7 +841,7 @@ function ns() {
841
841
  }), je && i.hasChildNodes() && !Ut(i.firstElementChild) && Y(/<[/\w!]/g, i.innerHTML) && Y(/<[/\w!]/g, i.textContent) || je && i.namespaceURI === de && b === "style" && Ut(i.firstElementChild) || i.nodeType === Je.progressingInstruction || je && i.nodeType === Je.comment && Y(/<[/\w]/g, i.data))
842
842
  return oe(i), !0;
843
843
  if (L[b] || !(V.tagCheck instanceof Function && V.tagCheck(b)) && !N[b]) {
844
- if (!L[b] && An(b) && (x.tagNameCheck instanceof RegExp && Y(x.tagNameCheck, b) || x.tagNameCheck instanceof Function && x.tagNameCheck(b)))
844
+ if (!L[b] && An(b) && (m.tagNameCheck instanceof RegExp && Y(m.tagNameCheck, b) || m.tagNameCheck instanceof Function && m.tagNameCheck(b)))
845
845
  return !1;
846
846
  if (Mt && !pe[b]) {
847
847
  const O = J(i) || i.parentNode, q = ae(i) || i.childNodes;
@@ -866,18 +866,18 @@ function ns() {
866
866
  if (!(Te && !B[u] && Y(_t, u))) {
867
867
  if (!(We && Y(lt, u))) {
868
868
  if (!(V.attributeCheck instanceof Function && V.attributeCheck(u, i))) {
869
- if (!v[u] || B[u]) {
869
+ if (!w[u] || B[u]) {
870
870
  if (
871
871
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
872
872
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
873
873
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
874
- !(An(i) && (x.tagNameCheck instanceof RegExp && Y(x.tagNameCheck, i) || x.tagNameCheck instanceof Function && x.tagNameCheck(i)) && (x.attributeNameCheck instanceof RegExp && Y(x.attributeNameCheck, u) || x.attributeNameCheck instanceof Function && x.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
874
+ !(An(i) && (m.tagNameCheck instanceof RegExp && Y(m.tagNameCheck, i) || m.tagNameCheck instanceof Function && m.tagNameCheck(i)) && (m.attributeNameCheck instanceof RegExp && Y(m.attributeNameCheck, u) || m.attributeNameCheck instanceof Function && m.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
875
875
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
876
- u === "is" && x.allowCustomizedBuiltInElements && (x.tagNameCheck instanceof RegExp && Y(x.tagNameCheck, b) || x.tagNameCheck instanceof Function && x.tagNameCheck(b)))
876
+ u === "is" && m.allowCustomizedBuiltInElements && (m.tagNameCheck instanceof RegExp && Y(m.tagNameCheck, b) || m.tagNameCheck instanceof Function && m.tagNameCheck(b)))
877
877
  ) return !1;
878
878
  } else if (!zt[u]) {
879
879
  if (!Y(ct, Ne(b, ot, ""))) {
880
- if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Ws(b, "data:") === 0 && gn[i])) {
880
+ if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && js(b, "data:") === 0 && gn[i])) {
881
881
  if (!(hn && !Y(Rt, Ne(b, ot, "")))) {
882
882
  if (b)
883
883
  return !1;
@@ -902,7 +902,7 @@ function ns() {
902
902
  attrName: "",
903
903
  attrValue: "",
904
904
  keepAttr: !0,
905
- allowedAttributes: v,
905
+ allowedAttributes: w,
906
906
  forceKeepAttr: void 0
907
907
  };
908
908
  let O = u.length;
@@ -912,7 +912,7 @@ function ns() {
912
912
  namespaceURI: ee,
913
913
  value: se
914
914
  } = q, be = F($), Bt = se;
915
- let j = $ === "value" ? Bt : js(Bt);
915
+ let j = $ === "value" ? Bt : qs(Bt);
916
916
  if (b.attrName = be, b.attrValue = j, b.keepAttr = !0, b.forceKeepAttr = void 0, me(G.uponSanitizeAttribute, i, b), j = b.attrValue, fn && (be === "id" || be === "name") && (Ee($, i), j = ds + j), je && Y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, j)) {
917
917
  Ee($, i);
918
918
  continue;
@@ -939,8 +939,8 @@ function ns() {
939
939
  Ee($, i);
940
940
  continue;
941
941
  }
942
- if (P && typeof m == "object" && typeof m.getAttributeType == "function" && !ee)
943
- switch (m.getAttributeType(Rn, be)) {
942
+ if (P && typeof x == "object" && typeof x.getAttributeType == "function" && !ee)
943
+ switch (x.getAttributeType(Rn, be)) {
944
944
  case "TrustedHTML": {
945
945
  j = P.createHTML(j);
946
946
  break;
@@ -1009,7 +1009,7 @@ function ns() {
1009
1009
  q.appendChild(u.firstChild);
1010
1010
  else
1011
1011
  q = u;
1012
- return (v.shadowroot || v.shadowrootmode) && (q = I.call(n, q, !0)), q;
1012
+ return (w.shadowroot || w.shadowrootmode) && (q = I.call(n, q, !0)), q;
1013
1013
  }
1014
1014
  let ee = Ae ? u.outerHTML : u.innerHTML;
1015
1015
  return Ae && N["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && Y(ts, u.ownerDocument.doctype.name) && (ee = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
@@ -1029,8 +1029,8 @@ function ns() {
1029
1029
  typeof i == "function" && Xe(G[y], i);
1030
1030
  }, t.removeHook = function(y, i) {
1031
1031
  if (i !== void 0) {
1032
- const u = Hs(G[y], i);
1033
- return u === -1 ? void 0 : Gs(G[y], u, 1)[0];
1032
+ const u = Gs(G[y], i);
1033
+ return u === -1 ? void 0 : Ws(G[y], u, 1)[0];
1034
1034
  }
1035
1035
  return Pn(G[y]);
1036
1036
  }, t.removeHooks = function(y) {
@@ -1040,7 +1040,7 @@ function ns() {
1040
1040
  }, t;
1041
1041
  }
1042
1042
  h(ns, "createDOMPurify");
1043
- var ar = ns();
1043
+ var lr = ns();
1044
1044
  function en() {
1045
1045
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1046
1046
  }
@@ -1059,14 +1059,14 @@ function D(l, t = "") {
1059
1059
  return n;
1060
1060
  }
1061
1061
  h(D, "k");
1062
- var lr = (() => {
1062
+ var or = (() => {
1063
1063
  try {
1064
1064
  return !!new RegExp("(?<=1)(?<!1)");
1065
1065
  } catch {
1066
1066
  return !1;
1067
1067
  }
1068
- })(), X = { 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((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, or = /^(?:[ \t]*(?:\n|$))+/, cr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ur = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, it = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, tn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, is = D(rs).replace(/bull/g, tn).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(), pr = D(rs).replace(/bull/g, tn).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(), nn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dr = /^[^\n]+/, sn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, fr = D(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", sn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gr = D(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, tn).getRegex(), St = "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", rn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, mr = 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", rn).replace("tag", St).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = D(nn).replace("hr", it).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", St).getRegex(), xr = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), an = { blockquote: xr, code: cr, def: fr, fences: ur, heading: hr, hr: it, html: mr, lheading: is, list: gr, newline: or, paragraph: as, table: Re, text: dr }, Gn = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", it).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", St).getRegex(), br = { ...an, lheading: pr, table: Gn, paragraph: D(nn).replace("hr", it).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).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", St).getRegex() }, kr = { ...an, html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", rn).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: Re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: D(nn).replace("hr", it).replace("heading", ` *#{1,6} *[^
1069
- ]`).replace("lheading", is).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, wr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, vr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ls = /^( {2,}|\\)\n(?!\s*$)/, yr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, He = /[\p{P}\p{S}]/u, At = /[\s\p{P}\p{S}]/u, ln = /[^\s\p{P}\p{S}]/u, Tr = D(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, At).getRegex(), os = /(?!~)[\p{P}\p{S}]/u, Sr = /(?!~)[\s\p{P}\p{S}]/u, Ar = /(?:[^\s\p{P}\p{S}]|~)/u, Er = D(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", lr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), cs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, _r = D(cs, "u").replace(/punct/g, He).getRegex(), Rr = D(cs, "u").replace(/punct/g, os).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Cr = D(us, "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Ir = D(us, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, Sr).replace(/punct/g, os).getRegex(), Dr = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Mr = D(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, He).getRegex(), Lr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", zr = D(Lr, "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Or = D(/\\(punct)/, "gu").replace(/punct/g, He).getRegex(), Pr = 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(), Nr = D(rn).replace("(?:-->|$)", "-->").getRegex(), $r = 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", Nr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ur = D(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", vt).replace("ref", sn).getRegex(), ps = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", sn).getRegex(), Br = D("reflink|nolink(?!\\()", "g").replace("reflink", hs).replace("nolink", ps).getRegex(), Wn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, on = { _backpedal: Re, anyPunctuation: Or, autolink: Pr, blockSkip: Er, br: ls, code: vr, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: _r, emStrongRDelimAst: Cr, emStrongRDelimUnd: Dr, escape: wr, link: Ur, nolink: ps, punctuation: Tr, reflink: hs, reflinkSearch: Br, tag: $r, text: yr, url: Re }, Fr = { ...on, link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", vt).getRegex(), reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt).getRegex() }, Qt = { ...on, emStrongRDelimAst: Ir, emStrongLDelim: Rr, delLDelim: Mr, delRDelim: zr, url: D(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Wn).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", Wn).getRegex() }, Hr = { ...Qt, br: D(ls).replace("{2,}", "*").getRegex(), text: D(Qt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, xt = { normal: an, gfm: br, pedantic: kr }, et = { normal: on, gfm: Qt, breaks: Hr, pedantic: Fr }, Gr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, jn = /* @__PURE__ */ h((l) => Gr[l], "ke");
1068
+ })(), X = { 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((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, cr = /^(?:[ \t]*(?:\n|$))+/, ur = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, hr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, it = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, pr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, tn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, rs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, is = D(rs).replace(/bull/g, tn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), dr = D(rs).replace(/bull/g, tn).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(), nn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fr = /^[^\n]+/, sn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, gr = D(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", sn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), mr = D(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, tn).getRegex(), St = "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", rn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = 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", rn).replace("tag", St).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = D(nn).replace("hr", it).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", St).getRegex(), br = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), an = { blockquote: br, code: ur, def: gr, fences: hr, heading: pr, hr: it, html: xr, lheading: is, list: mr, newline: cr, paragraph: as, table: Re, text: fr }, Gn = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", it).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", St).getRegex(), kr = { ...an, lheading: dr, table: Gn, paragraph: D(nn).replace("hr", it).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).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", St).getRegex() }, wr = { ...an, html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", rn).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: Re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: D(nn).replace("hr", it).replace("heading", ` *#{1,6} *[^
1069
+ ]`).replace("lheading", is).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, vr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ls = /^( {2,}|\\)\n(?!\s*$)/, Tr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, He = /[\p{P}\p{S}]/u, At = /[\s\p{P}\p{S}]/u, ln = /[^\s\p{P}\p{S}]/u, Sr = D(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, At).getRegex(), os = /(?!~)[\p{P}\p{S}]/u, Ar = /(?!~)[\s\p{P}\p{S}]/u, Er = /(?:[^\s\p{P}\p{S}]|~)/u, _r = D(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", or ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), cs = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rr = D(cs, "u").replace(/punct/g, He).getRegex(), Cr = D(cs, "u").replace(/punct/g, os).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = D(us, "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Dr = D(us, "gu").replace(/notPunctSpace/g, Er).replace(/punctSpace/g, Ar).replace(/punct/g, os).getRegex(), Mr = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Lr = D(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, He).getRegex(), zr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Or = D(zr, "gu").replace(/notPunctSpace/g, ln).replace(/punctSpace/g, At).replace(/punct/g, He).getRegex(), Pr = D(/\\(punct)/, "gu").replace(/punct/g, He).getRegex(), Nr = 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(), $r = D(rn).replace("(?:-->|$)", "-->").getRegex(), Ur = 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", $r).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), vt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Br = D(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", vt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", vt).replace("ref", sn).getRegex(), ps = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", sn).getRegex(), Fr = D("reflink|nolink(?!\\()", "g").replace("reflink", hs).replace("nolink", ps).getRegex(), Wn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, on = { _backpedal: Re, anyPunctuation: Pr, autolink: Nr, blockSkip: _r, br: ls, code: yr, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: Rr, emStrongRDelimAst: Ir, emStrongRDelimUnd: Mr, escape: vr, link: Br, nolink: ps, punctuation: Sr, reflink: hs, reflinkSearch: Fr, tag: Ur, text: Tr, url: Re }, Hr = { ...on, link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", vt).getRegex(), reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", vt).getRegex() }, Qt = { ...on, emStrongRDelimAst: Dr, emStrongLDelim: Cr, delLDelim: Lr, delRDelim: Or, url: D(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Wn).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", Wn).getRegex() }, Gr = { ...Qt, br: D(ls).replace("{2,}", "*").getRegex(), text: D(Qt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, xt = { normal: an, gfm: kr, pedantic: wr }, et = { normal: on, gfm: Qt, breaks: Gr, pedantic: Hr }, Wr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, jn = /* @__PURE__ */ h((l) => Wr[l], "ke");
1070
1070
  function ge(l, t) {
1071
1071
  if (t) {
1072
1072
  if (X.escapeTest.test(l)) return l.replace(X.escapeReplace, jn);
@@ -1104,7 +1104,7 @@ function tt(l, t, e) {
1104
1104
  return l.slice(0, n - s);
1105
1105
  }
1106
1106
  h(tt, "I");
1107
- function Wr(l, t) {
1107
+ function jr(l, t) {
1108
1108
  if (l.indexOf(t[1]) === -1) return -1;
1109
1109
  let e = 0;
1110
1110
  for (let n = 0; n < l.length; n++) if (l[n] === "\\") n++;
@@ -1112,8 +1112,8 @@ function Wr(l, t) {
1112
1112
  else if (l[n] === t[1] && (e--, e < 0)) return n;
1113
1113
  return e > 0 ? -2 : -1;
1114
1114
  }
1115
- h(Wr, "de");
1116
- function jr(l, t = 0) {
1115
+ h(jr, "de");
1116
+ function qr(l, t = 0) {
1117
1117
  let e = t, n = "";
1118
1118
  for (let s of l) if (s === " ") {
1119
1119
  let r = 4 - e % 4;
@@ -1121,7 +1121,7 @@ function jr(l, t = 0) {
1121
1121
  } else n += s, e++;
1122
1122
  return n;
1123
1123
  }
1124
- h(jr, "ge");
1124
+ h(qr, "ge");
1125
1125
  function Yn(l, t, e, n, s) {
1126
1126
  let r = t.href, a = t.title || null, o = l[1].replace(s.other.outputLinkReplace, "$1");
1127
1127
  n.state.inLink = !0;
@@ -1129,7 +1129,7 @@ function Yn(l, t, e, n, s) {
1129
1129
  return n.state.inLink = !1, c;
1130
1130
  }
1131
1131
  h(Yn, "fe");
1132
- function qr(l, t, e) {
1132
+ function Vr(l, t, e) {
1133
1133
  let n = l.match(e.other.indentCodeCompensation);
1134
1134
  if (n === null) return t;
1135
1135
  let s = n[1];
@@ -1142,7 +1142,7 @@ function qr(l, t, e) {
1142
1142
  }).join(`
1143
1143
  `);
1144
1144
  }
1145
- h(qr, "nt");
1145
+ h(Vr, "nt");
1146
1146
  var $e, yt = ($e = class {
1147
1147
  constructor(t) {
1148
1148
  C(this, "options");
@@ -1165,7 +1165,7 @@ var $e, yt = ($e = class {
1165
1165
  fences(t) {
1166
1166
  let e = this.rules.block.fences.exec(t);
1167
1167
  if (e) {
1168
- let n = e[0], s = qr(n, e[3] || "", this.rules);
1168
+ let n = e[0], s = Vr(n, e[3] || "", this.rules);
1169
1169
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
1170
1170
  }
1171
1171
  }
@@ -1205,19 +1205,19 @@ ${g}` : g, r = r ? `${r}
1205
1205
  ${d}` : d;
1206
1206
  let p = this.lexer.state.top;
1207
1207
  if (this.lexer.state.top = !0, this.lexer.blockTokens(d, a, !0), this.lexer.state.top = p, n.length === 0) break;
1208
- let m = a.at(-1);
1209
- if (m?.type === "code") break;
1210
- if (m?.type === "blockquote") {
1211
- let T = m, _ = T.raw + `
1208
+ let x = a.at(-1);
1209
+ if (x?.type === "code") break;
1210
+ if (x?.type === "blockquote") {
1211
+ let T = x, _ = T.raw + `
1212
1212
  ` + n.join(`
1213
1213
  `), z = this.blockquote(_);
1214
1214
  a[a.length - 1] = z, s = s.substring(0, s.length - T.raw.length) + z.raw, r = r.substring(0, r.length - T.text.length) + z.text;
1215
1215
  break;
1216
- } else if (m?.type === "list") {
1217
- let T = m, _ = T.raw + `
1216
+ } else if (x?.type === "list") {
1217
+ let T = x, _ = T.raw + `
1218
1218
  ` + n.join(`
1219
1219
  `), z = this.list(_);
1220
- a[a.length - 1] = z, s = s.substring(0, s.length - m.raw.length) + z.raw, r = r.substring(0, r.length - T.raw.length) + z.raw, n = _.substring(a.at(-1).raw.length).split(`
1220
+ a[a.length - 1] = z, s = s.substring(0, s.length - x.raw.length) + z.raw, r = r.substring(0, r.length - T.raw.length) + z.raw, n = _.substring(a.at(-1).raw.length).split(`
1221
1221
  `);
1222
1222
  continue;
1223
1223
  }
@@ -1235,24 +1235,24 @@ ${d}` : d;
1235
1235
  let f = !1, g = "", d = "";
1236
1236
  if (!(e = a.exec(t)) || this.rules.block.hr.test(t)) break;
1237
1237
  g = e[0], t = t.substring(g.length);
1238
- let p = jr(e[2].split(`
1239
- `, 1)[0], e[1].length), m = t.split(`
1238
+ let p = qr(e[2].split(`
1239
+ `, 1)[0], e[1].length), x = t.split(`
1240
1240
  `, 1)[0], T = !p.trim(), _ = 0;
1241
- if (this.options.pedantic ? (_ = 2, d = p.trimStart()) : T ? _ = e[1].length + 1 : (_ = p.search(this.rules.other.nonSpaceChar), _ = _ > 4 ? 1 : _, d = p.slice(_), _ += e[1].length), T && this.rules.other.blankLine.test(m) && (g += m + `
1242
- `, t = t.substring(m.length + 1), f = !0), !f) {
1241
+ if (this.options.pedantic ? (_ = 2, d = p.trimStart()) : T ? _ = e[1].length + 1 : (_ = p.search(this.rules.other.nonSpaceChar), _ = _ > 4 ? 1 : _, d = p.slice(_), _ += e[1].length), T && this.rules.other.blankLine.test(x) && (g += x + `
1242
+ `, t = t.substring(x.length + 1), f = !0), !f) {
1243
1243
  let z = this.rules.other.nextBulletRegex(_), te = this.rules.other.hrRegex(_), ae = this.rules.other.fencesBeginRegex(_), J = this.rules.other.headingBeginRegex(_), P = this.rules.other.htmlBeginRegex(_), W = this.rules.other.blockquoteBeginRegex(_);
1244
1244
  for (; t; ) {
1245
1245
  let le = t.split(`
1246
1246
  `, 1)[0], ne;
1247
- if (m = le, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), ne = m) : ne = m.replace(this.rules.other.tabCharGlobal, " "), ae.test(m) || J.test(m) || P.test(m) || W.test(m) || z.test(m) || te.test(m)) break;
1248
- if (ne.search(this.rules.other.nonSpaceChar) >= _ || !m.trim()) d += `
1247
+ if (x = le, this.options.pedantic ? (x = x.replace(this.rules.other.listReplaceNesting, " "), ne = x) : ne = x.replace(this.rules.other.tabCharGlobal, " "), ae.test(x) || J.test(x) || P.test(x) || W.test(x) || z.test(x) || te.test(x)) break;
1248
+ if (ne.search(this.rules.other.nonSpaceChar) >= _ || !x.trim()) d += `
1249
1249
  ` + ne.slice(_);
1250
1250
  else {
1251
1251
  if (T || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ae.test(p) || J.test(p) || te.test(p)) break;
1252
1252
  d += `
1253
- ` + m;
1253
+ ` + x;
1254
1254
  }
1255
- T = !m.trim(), g += le + `
1255
+ T = !x.trim(), g += le + `
1256
1256
  `, t = t.substring(le.length + 1), p = ne.slice(_);
1257
1257
  }
1258
1258
  }
@@ -1348,7 +1348,7 @@ ${d}` : d;
1348
1348
  let a = tt(n.slice(0, -1), "\\");
1349
1349
  if ((n.length - a.length) % 2 === 0) return;
1350
1350
  } else {
1351
- let a = Wr(e[2], "()");
1351
+ let a = jr(e[2], "()");
1352
1352
  if (a === -2) return;
1353
1353
  if (a > -1) {
1354
1354
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + a;
@@ -1394,8 +1394,8 @@ ${d}` : d;
1394
1394
  let T = p.slice(1, -1);
1395
1395
  return { type: "em", raw: p, text: T, tokens: this.lexer.inlineTokens(T) };
1396
1396
  }
1397
- let m = p.slice(2, -2);
1398
- return { type: "strong", raw: p, text: m, tokens: this.lexer.inlineTokens(m) };
1397
+ let x = p.slice(2, -2);
1398
+ return { type: "strong", raw: p, text: x, tokens: this.lexer.inlineTokens(x) };
1399
1399
  }
1400
1400
  }
1401
1401
  }
@@ -1644,8 +1644,8 @@ ${d}` : d;
1644
1644
  let f = t;
1645
1645
  if (this.options.extensions?.startInline) {
1646
1646
  let g = 1 / 0, d = t.slice(1), p;
1647
- this.options.extensions.startInline.forEach((m) => {
1648
- p = m.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (g = Math.min(g, p));
1647
+ this.options.extensions.startInline.forEach((x) => {
1648
+ p = x.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (g = Math.min(g, p));
1649
1649
  }), g < 1 / 0 && g >= 0 && (f = t.substring(0, g + 1));
1650
1650
  }
1651
1651
  if (c = this.tokenizer.inlineText(f)) {
@@ -1987,7 +1987,7 @@ ${t}</tr>
1987
1987
  provideParser(t = this.block) {
1988
1988
  return t ? he.parse : he.parseInline;
1989
1989
  }
1990
- }, h(ke, "P"), C(ke, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(ke, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ke), Fe, Vr = (Fe = class {
1990
+ }, h(ke, "P"), C(ke, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(ke, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ke), Fe, Yr = (Fe = class {
1991
1991
  constructor(...t) {
1992
1992
  C(this, "defaults", en());
1993
1993
  C(this, "options", this.setOptions);
@@ -2147,7 +2147,7 @@ Please report this to https://github.com/markedjs/marked.`, t) {
2147
2147
  throw n;
2148
2148
  };
2149
2149
  }
2150
- }, h(Fe, "D"), Fe), Ce = new Vr();
2150
+ }, h(Fe, "D"), Fe), Ce = new Yr();
2151
2151
  function M(l, t) {
2152
2152
  return Ce.parse(l, t);
2153
2153
  }
@@ -2180,37 +2180,37 @@ M.walkTokens;
2180
2180
  M.parseInline;
2181
2181
  he.parse;
2182
2182
  ue.lex;
2183
- const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2183
+ const Zr = { class: "@container/chat flex flex-col h-full relative" }, Xr = {
2184
2184
  key: 0,
2185
2185
  class: "pb-4"
2186
- }, Xr = {
2186
+ }, Kr = {
2187
2187
  key: 0,
2188
2188
  class: "flex flex-col items-center justify-center px-4 min-h-full"
2189
- }, Kr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Qr = ["src", "alt"], Jr = ["title"], ei = {
2189
+ }, Qr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Jr = ["src", "alt"], ei = ["title"], ti = {
2190
2190
  key: 1,
2191
2191
  class: "flex justify-end px-2 pb-2"
2192
- }, ti = {
2192
+ }, ni = {
2193
2193
  key: 0,
2194
2194
  class: "flex items-center gap-3 py-3 px-2"
2195
- }, ni = ["data-issue-code", "data-issue-bucket"], si = { class: "flex flex-col gap-1 min-w-0" }, ri = ["href"], ii = ["data-test"], ai = {
2195
+ }, si = ["data-issue-code", "data-issue-bucket"], ri = { class: "flex flex-col gap-1 min-w-0" }, ii = ["href"], ai = ["data-test"], li = {
2196
2196
  key: 0,
2197
2197
  class: "flex-shrink-0 size-7 @sm/chat:size-8"
2198
- }, li = ["src", "alt"], oi = ["src", "alt"], ci = ["src"], ui = ["href"], hi = ["innerHTML"], pi = {
2198
+ }, oi = ["src", "alt"], ci = ["src", "alt"], ui = ["src"], hi = ["href"], pi = ["innerHTML"], di = {
2199
2199
  key: 2,
2200
2200
  class: "flex gap-2 justify-start items-center mb-4"
2201
- }, di = ["src", "alt"], fi = {
2201
+ }, fi = ["src", "alt"], gi = {
2202
2202
  key: 0,
2203
2203
  class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto"
2204
- }, gi = ["src", "alt"], mi = { class: "max-w-20 truncate" }, xi = ["onClick"], bi = {
2204
+ }, mi = ["src", "alt"], xi = { class: "max-w-20 truncate" }, bi = ["onClick"], ki = {
2205
2205
  key: 0,
2206
2206
  class: "shrink-0 flex items-center justify-center size-14"
2207
- }, ki = ["disabled"], wi = {
2207
+ }, wi = ["disabled"], vi = {
2208
2208
  key: 0,
2209
2209
  class: "i-svg-spinners-ring-resize size-4"
2210
- }, vi = {
2210
+ }, yi = {
2211
2211
  key: 1,
2212
2212
  class: "i-tabler-paperclip size-5"
2213
- }, yi = ["placeholder", "disabled"], Ti = ["disabled"], Oi = /* @__PURE__ */ Ie({
2213
+ }, Ti = ["placeholder", "disabled"], Si = ["disabled"], Pi = /* @__PURE__ */ Ie({
2214
2214
  __name: "ElAgentChat",
2215
2215
  props: {
2216
2216
  chatController: {},
@@ -2224,12 +2224,21 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2224
2224
  },
2225
2225
  setup(l) {
2226
2226
  const t = new M.Renderer();
2227
- t.link = ({ href: v, text: k }) => `<a href="${v}" target="_blank" rel="noopener noreferrer">${k}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2228
- function e(v) {
2229
- if (!v)
2227
+ t.link = ({ href: w, text: k }) => {
2228
+ let m = !1;
2229
+ if (typeof window < "u")
2230
+ try {
2231
+ m = new URL(w, window.location.href).origin === window.location.origin;
2232
+ } catch {
2233
+ m = !1;
2234
+ }
2235
+ return m ? `<a href="${w}">${k}</a>` : `<a href="${w}" target="_blank" rel="noopener noreferrer">${k}</a>`;
2236
+ }, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2237
+ function e(w) {
2238
+ if (!w)
2230
2239
  return "";
2231
- const k = M.parse(v, { async: !1 });
2232
- return ar.sanitize(k, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2240
+ const k = M.parse(w, { async: !1 });
2241
+ return lr.sanitize(k, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2233
2242
  }
2234
2243
  h(e, "renderMarkdown");
2235
2244
  const n = {
@@ -2241,23 +2250,23 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2241
2250
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2242
2251
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2243
2252
  }, r = H(() => l.setupHint ?? n[l.scope]), a = H(() => {
2244
- const v = { ...s[l.scope] };
2245
- return l.scope === "org" && l.scopeName && (v.label = l.scopeName, v.tooltip = `Visible to ${l.scopeName} members`), v;
2246
- }), o = Z(""), c = Z(!1), f = Z(), g = Z(), d = Z(), p = Z([]), m = Z(!1);
2247
- function T(v, k) {
2248
- const x = v[k], L = v[k + 1];
2249
- return !L || L.sender !== x.sender;
2253
+ const w = { ...s[l.scope] };
2254
+ return l.scope === "org" && l.scopeName && (w.label = l.scopeName, w.tooltip = `Visible to ${l.scopeName} members`), w;
2255
+ }), o = Z(""), c = Z(!1), f = Z(), g = Z(), d = Z(), p = Z([]), x = Z(!1);
2256
+ function T(w, k) {
2257
+ const m = w[k], L = w[k + 1];
2258
+ return !L || L.sender !== m.sender;
2250
2259
  }
2251
2260
  h(T, "shouldShowAvatar");
2252
- const _ = H(() => l.chatController?.textState.value), z = H(() => _.value?.isConnected ?? !1), te = H(() => _.value?.isThinking ?? !1), ae = H(() => _.value?.connectionStatus === "disconnected" && !!_.value?.error), J = H(() => _.value?.connectionStatus !== "connected" && !_.value?.error), P = H(() => _.value?.error), W = H(() => l.chatController?.sharedMessages.value ?? []), le = H(() => _.value?.accountGated ?? !1), ne = H(() => !z.value || le.value), Et = H(() => ae.value ? "Agent is offline" : J.value ? "Connecting..." : le.value ? "Resolve the billing issue above to continue" : "Message"), at = H(() => (o.value.trim() || p.value.length > 0) && !ne.value && !m.value), I = H(() => l.variant === "light"), G = H(
2261
+ const _ = H(() => l.chatController?.textState.value), z = H(() => _.value?.isConnected ?? !1), te = H(() => _.value?.isThinking ?? !1), ae = H(() => _.value?.connectionStatus === "disconnected" && !!_.value?.error), J = H(() => _.value?.connectionStatus !== "connected" && !_.value?.error), P = H(() => _.value?.error), W = H(() => l.chatController?.sharedMessages.value ?? []), le = H(() => _.value?.accountGated ?? !1), ne = H(() => !z.value || le.value), Et = H(() => ae.value ? "Agent is offline" : J.value ? "Connecting..." : le.value ? "Resolve the billing issue above to continue" : "Message"), at = H(() => (o.value.trim() || p.value.length > 0) && !ne.value && !x.value), I = H(() => l.variant === "light"), G = H(
2253
2262
  () => I.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2254
2263
  ), xe = H(() => I.value ? "text-theme-300" : "text-white/30");
2255
2264
  Jt(async () => {
2256
2265
  if (l.chatController && !z.value)
2257
2266
  try {
2258
2267
  await l.chatController.startTextConversation();
2259
- } catch (v) {
2260
- console.error("Failed to start text conversation:", v);
2268
+ } catch (w) {
2269
+ console.error("Failed to start text conversation:", w);
2261
2270
  }
2262
2271
  });
2263
2272
  function Me() {
@@ -2265,20 +2274,20 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2265
2274
  }
2266
2275
  h(Me, "startNewConversation");
2267
2276
  async function ye() {
2268
- const v = o.value.trim(), k = p.value.length > 0;
2269
- if (!v && !k || !l.chatController || !z.value || m.value)
2277
+ const w = o.value.trim(), k = p.value.length > 0;
2278
+ if (!w && !k || !l.chatController || !z.value || x.value)
2270
2279
  return;
2271
- const x = o.value, L = k ? [...p.value] : void 0;
2280
+ const m = o.value, L = k ? [...p.value] : void 0;
2272
2281
  o.value = "", p.value = [], g.value && (g.value.style.height = "auto", g.value.focus());
2273
2282
  try {
2274
- await l.chatController.sendChatMessage(x, L), lt();
2283
+ await l.chatController.sendChatMessage(m, L), lt();
2275
2284
  } catch (B) {
2276
2285
  console.error("Error sending message:", B);
2277
2286
  }
2278
2287
  }
2279
2288
  h(ye, "sendMessage");
2280
- function _t(v) {
2281
- v.key === "Enter" && !v.shiftKey && (v.preventDefault(), ye());
2289
+ function _t(w) {
2290
+ w.key === "Enter" && !w.shiftKey && (w.preventDefault(), ye());
2282
2291
  }
2283
2292
  h(_t, "handleKeydown");
2284
2293
  function lt() {
@@ -2295,55 +2304,55 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2295
2304
  d.value?.click();
2296
2305
  }
2297
2306
  h(ot, "triggerFileInput");
2298
- async function Ct(v) {
2299
- const k = v.target, x = k.files?.[0];
2300
- if (!(!x || !l.uploadFn)) {
2301
- m.value = !0;
2307
+ async function Ct(w) {
2308
+ const k = w.target, m = k.files?.[0];
2309
+ if (!(!m || !l.uploadFn)) {
2310
+ x.value = !0;
2302
2311
  try {
2303
- const L = await l.uploadFn(x);
2312
+ const L = await l.uploadFn(m);
2304
2313
  p.value = [...p.value, L];
2305
2314
  } catch (L) {
2306
2315
  console.error("Upload failed:", L);
2307
2316
  } finally {
2308
- m.value = !1, k.value = "";
2317
+ x.value = !1, k.value = "";
2309
2318
  }
2310
2319
  }
2311
2320
  }
2312
2321
  h(Ct, "handleFileSelect");
2313
- function ct(v) {
2314
- p.value = p.value.filter((k, x) => x !== v);
2322
+ function ct(w) {
2323
+ p.value = p.value.filter((k, m) => m !== w);
2315
2324
  }
2316
2325
  h(ct, "removeAttachment");
2317
- function N(v, k) {
2326
+ function N(w, k) {
2318
2327
  if (k === 0) {
2319
- const Te = v[k];
2328
+ const Te = w[k];
2320
2329
  return Te?.timestamp ? Ge(new Date(Te.timestamp)) : null;
2321
2330
  }
2322
- const x = v[k - 1], L = v[k];
2323
- if (!x?.timestamp || !L?.timestamp) return null;
2324
- const B = new Date(x.timestamp).getTime();
2331
+ const m = w[k - 1], L = w[k];
2332
+ if (!m?.timestamp || !L?.timestamp) return null;
2333
+ const B = new Date(m.timestamp).getTime();
2325
2334
  return new Date(L.timestamp).getTime() - B > 36e5 ? Ge(new Date(L.timestamp)) : null;
2326
2335
  }
2327
2336
  h(N, "shouldShowTimeDivider");
2328
- function Ge(v) {
2329
- const k = /* @__PURE__ */ new Date(), x = v.toDateString() === k.toDateString(), L = new Date(k);
2337
+ function Ge(w) {
2338
+ const k = /* @__PURE__ */ new Date(), m = w.toDateString() === k.toDateString(), L = new Date(k);
2330
2339
  L.setDate(L.getDate() - 1);
2331
- const B = v.toDateString() === L.toDateString(), V = v.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2332
- if (x) return V;
2340
+ const B = w.toDateString() === L.toDateString(), V = w.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2341
+ if (m) return V;
2333
2342
  if (B) return `Yesterday, ${V}`;
2334
- const We = v.getFullYear() === k.getFullYear();
2335
- return `${v.toLocaleDateString("en-US", {
2343
+ const We = w.getFullYear() === k.getFullYear();
2344
+ return `${w.toLocaleDateString("en-US", {
2336
2345
  weekday: "long",
2337
2346
  month: "short",
2338
2347
  day: "numeric",
2339
2348
  ...We ? {} : { year: "numeric" }
2340
2349
  })}, ${V}`;
2341
2350
  }
2342
- return h(Ge, "formatTimeDivider"), rt(W, (v) => {
2343
- v.length > 0 && Ft(() => lt());
2344
- }, { immediate: !0, deep: !0 }), (v, k) => (S(), A("div", Yr, [
2345
- I.value ? U("", !0) : (S(), A("div", Zr, [
2346
- Ht($s, {
2351
+ return h(Ge, "formatTimeDivider"), rt(W, (w) => {
2352
+ w.length > 0 && Ft(() => lt());
2353
+ }, { immediate: !0, deep: !0 }), (w, k) => (S(), A("div", Zr, [
2354
+ I.value ? U("", !0) : (S(), A("div", Xr, [
2355
+ Ht(Us, {
2347
2356
  agent: l.agent,
2348
2357
  "is-online": z.value
2349
2358
  }, null, 8, ["agent", "is-online"])
@@ -2352,10 +2361,10 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2352
2361
  key: 1,
2353
2362
  class: E(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2354
2363
  }, [
2355
- w("i", {
2364
+ v("i", {
2356
2365
  class: E(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2357
2366
  }, null, 2),
2358
- w("span", null, re(P.value), 1)
2367
+ v("span", null, re(P.value), 1)
2359
2368
  ], 2)) : J.value ? (S(), A("div", {
2360
2369
  key: 2,
2361
2370
  class: E(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
@@ -2365,199 +2374,201 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2365
2374
  key: 3,
2366
2375
  class: E(["flex items-center justify-center gap-1.5 py-2 text-[11px]", xe.value])
2367
2376
  }, [
2368
- k[5] || (k[5] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2369
- w("span", null, re(r.value), 1)
2377
+ k[6] || (k[6] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2378
+ v("span", null, re(r.value), 1)
2370
2379
  ], 2)) : U("", !0),
2371
- w("div", {
2380
+ v("div", {
2372
2381
  ref_key: "messagesContainer",
2373
2382
  ref: f,
2374
2383
  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"
2375
2384
  }, [
2376
- W.value.length === 0 && !J.value && !ae.value ? (S(), A("div", Xr, [
2377
- w("div", Kr, [
2378
- w("img", {
2385
+ W.value.length === 0 && !J.value && !ae.value ? (S(), A("div", Kr, [
2386
+ v("div", Qr, [
2387
+ v("img", {
2379
2388
  src: l.agent.avatarUrl.value,
2380
2389
  alt: l.agent.displayName.value,
2381
2390
  class: E(["size-full rounded-full object-cover ring-1", I.value ? "ring-black/5" : "ring-white/10"])
2382
- }, null, 10, Qr),
2391
+ }, null, 10, Jr),
2383
2392
  z.value ? (S(), A("span", {
2384
2393
  key: 0,
2385
2394
  class: E(["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"])
2386
- }, [...k[6] || (k[6] = [
2387
- w("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2395
+ }, [...k[7] || (k[7] = [
2396
+ v("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2388
2397
  ])], 2)) : U("", !0)
2389
2398
  ]),
2390
- w("div", {
2399
+ v("div", {
2391
2400
  class: E(["text-base @sm/chat:text-lg font-semibold", I.value ? "text-theme-900" : "text-white"])
2392
2401
  }, re(l.agent.displayName.value), 3),
2393
- w("p", {
2402
+ v("p", {
2394
2403
  class: E(["mt-1 text-center text-xs @sm/chat:text-sm", xe.value])
2395
2404
  }, re(l.emptyStateMessage || "Send a message to get started"), 3),
2396
- w("div", {
2405
+ v("div", {
2397
2406
  class: E(["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"]),
2398
2407
  title: a.value.tooltip
2399
2408
  }, [
2400
- w("i", {
2409
+ v("i", {
2401
2410
  class: E([a.value.icon, "size-3"])
2402
2411
  }, null, 2),
2403
- w("span", null, re(a.value.label), 1)
2404
- ], 10, Jr)
2412
+ v("span", null, re(a.value.label), 1)
2413
+ ], 10, ei)
2405
2414
  ])) : U("", !0),
2406
- W.value.length > 0 ? (S(), A("div", ei, [
2407
- w("button", {
2415
+ W.value.length > 0 ? (S(), A("div", ti, [
2416
+ v("button", {
2408
2417
  type: "button",
2409
2418
  "data-test": "chat-new-session",
2410
2419
  class: E(["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"]),
2411
2420
  onClick: Me
2412
- }, [...k[7] || (k[7] = [
2413
- w("i", { class: "i-tabler-refresh size-3" }, null, -1),
2414
- w("span", null, "New chat", -1)
2421
+ }, [...k[8] || (k[8] = [
2422
+ v("i", { class: "i-tabler-refresh size-3" }, null, -1),
2423
+ v("span", null, "New chat", -1)
2415
2424
  ])], 2)
2416
2425
  ])) : U("", !0),
2417
- (S(!0), A(_e, null, bt(W.value, (x, L) => (S(), A(_e, {
2418
- key: x.id
2426
+ (S(!0), A(_e, null, bt(W.value, (m, L) => (S(), A(_e, {
2427
+ key: m.id
2419
2428
  }, [
2420
- N(W.value, L) ? (S(), A("div", ti, [
2421
- w("div", {
2429
+ N(W.value, L) ? (S(), A("div", ni, [
2430
+ v("div", {
2422
2431
  class: E(["flex-1 h-px", G.value])
2423
2432
  }, null, 2),
2424
- w("span", {
2433
+ v("span", {
2425
2434
  class: E(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", xe.value])
2426
2435
  }, re(N(W.value, L)), 3),
2427
- w("div", {
2436
+ v("div", {
2428
2437
  class: E(["flex-1 h-px", G.value])
2429
2438
  }, null, 2)
2430
2439
  ])) : U("", !0),
2431
- x.sender === "system" ? (S(), A("div", {
2440
+ m.sender === "system" ? (S(), A("div", {
2432
2441
  key: 1,
2433
2442
  "data-test": "messaging-system-msg",
2434
- "data-issue-code": x.issue?.code,
2435
- "data-issue-bucket": x.issue?.bucket,
2443
+ "data-issue-code": m.issue?.code,
2444
+ "data-issue-bucket": m.issue?.bucket,
2436
2445
  class: E(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", I.value ? "text-theme-500" : "text-white/70"])
2437
2446
  }, [
2438
- w("i", {
2439
- class: E(["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"])
2447
+ v("i", {
2448
+ class: E(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", m.issue?.bucket === "account" ? I.value ? "text-amber-500" : "text-amber-300" : I.value ? "text-red-500" : "text-red-300"])
2440
2449
  }, null, 2),
2441
- w("div", si, [
2442
- w("span", null, re(x.text), 1),
2443
- x.issue?.help ? (S(), A("span", {
2450
+ v("div", ri, [
2451
+ v("span", null, re(m.text), 1),
2452
+ m.issue?.help ? (S(), A("span", {
2444
2453
  key: 0,
2445
2454
  class: E(["text-[12px]", I.value ? "text-theme-400" : "text-white/55"])
2446
- }, re(x.issue.help), 3)) : U("", !0),
2447
- x.issue?.actionUrl ? (S(), A("a", {
2455
+ }, re(m.issue.help), 3)) : U("", !0),
2456
+ m.issue?.actionUrl ? (S(), A("a", {
2448
2457
  key: 1,
2449
- href: x.issue.actionUrl,
2458
+ href: m.issue.actionUrl,
2450
2459
  "data-test": "messaging-system-msg-action",
2451
2460
  class: E(["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"])
2452
2461
  }, [
2453
- Ye(re(x.issue.actionLabel) + " ", 1),
2454
- k[8] || (k[8] = w("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2455
- ], 10, ri)) : U("", !0)
2462
+ Ye(re(m.issue.actionLabel) + " ", 1),
2463
+ k[9] || (k[9] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2464
+ ], 10, ii)) : U("", !0)
2456
2465
  ])
2457
- ], 10, ni)) : (S(), A("div", {
2466
+ ], 10, si)) : (S(), A("div", {
2458
2467
  key: 2,
2459
- "data-test": x.sender === "agent" ? "messaging-assistant-msg" : x.sender === "user" ? "messaging-user-msg" : void 0,
2468
+ "data-test": m.sender === "agent" ? "messaging-assistant-msg" : m.sender === "user" ? "messaging-user-msg" : void 0,
2460
2469
  class: E(["flex gap-2 items-end", {
2461
- "justify-end": x.sender === "user",
2462
- "justify-start": x.sender === "agent",
2470
+ "justify-end": m.sender === "user",
2471
+ "justify-start": m.sender === "agent",
2463
2472
  "mb-4": T(W.value, L)
2464
2473
  }])
2465
2474
  }, [
2466
- x.sender === "agent" ? (S(), A("div", ai, [
2475
+ m.sender === "agent" ? (S(), A("div", li, [
2467
2476
  T(W.value, L) ? (S(), A("img", {
2468
2477
  key: 0,
2469
2478
  src: l.agent.avatarUrl.value,
2470
2479
  alt: l.agent.displayName.value,
2471
2480
  class: E(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2472
- }, null, 10, li)) : U("", !0)
2481
+ }, null, 10, oi)) : U("", !0)
2473
2482
  ])) : U("", !0),
2474
- w("div", {
2475
- class: E(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2483
+ v("div", {
2484
+ class: E(m.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2476
2485
  }, [
2477
- x.attachments?.length ? (S(), A("div", {
2486
+ m.attachments?.length ? (S(), A("div", {
2478
2487
  key: 0,
2479
- class: E(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2488
+ class: E(["mb-1 space-y-1", m.sender === "user" ? "flex flex-col items-end" : ""])
2480
2489
  }, [
2481
- (S(!0), A(_e, null, bt(x.attachments, (B, V) => (S(), A(_e, { key: V }, [
2490
+ (S(!0), A(_e, null, bt(m.attachments, (B, V) => (S(), A(_e, { key: V }, [
2482
2491
  B.type === "image" ? (S(), A("img", {
2483
2492
  key: 0,
2484
2493
  src: B.url,
2485
2494
  alt: B.name,
2486
2495
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2487
- }, null, 8, oi)) : B.type === "audio" ? (S(), A("audio", {
2496
+ }, null, 8, ci)) : B.type === "audio" ? (S(), A("audio", {
2488
2497
  key: 1,
2489
2498
  src: B.url,
2490
2499
  controls: "",
2491
2500
  class: "max-w-full"
2492
- }, null, 8, ci)) : (S(), A("a", {
2501
+ }, null, 8, ui)) : (S(), A("a", {
2493
2502
  key: 2,
2494
2503
  href: B.url,
2495
2504
  target: "_blank",
2496
2505
  rel: "noopener",
2497
2506
  class: E(["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"])
2498
2507
  }, [
2499
- k[9] || (k[9] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2508
+ k[10] || (k[10] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2500
2509
  Ye(" " + re(B.name), 1)
2501
- ], 10, ui))
2510
+ ], 10, hi))
2502
2511
  ], 64))), 128))
2503
2512
  ], 2)) : U("", !0),
2504
- x.text ? (S(), A("div", {
2513
+ m.text ? (S(), A("div", {
2505
2514
  key: 1,
2506
2515
  class: E(["rounded-2xl px-3.5 py-2", [
2507
- 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]"
2516
+ m.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]"
2508
2517
  ]])
2509
2518
  }, [
2510
- w("div", {
2511
- class: E(["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" : ""]),
2512
- innerHTML: e(x.text)
2513
- }, null, 10, hi)
2519
+ v("div", {
2520
+ class: E(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", m.sender === "user" || !I.value ? "chat-msg-prose-invert" : ""]),
2521
+ innerHTML: e(m.text),
2522
+ onClick: k[0] || (k[0] = vs(() => {
2523
+ }, ["stop"]))
2524
+ }, null, 10, pi)
2514
2525
  ], 2)) : U("", !0)
2515
2526
  ], 2)
2516
- ], 10, ii))
2527
+ ], 10, ai))
2517
2528
  ], 64))), 128)),
2518
- te.value ? (S(), A("div", pi, [
2519
- w("img", {
2529
+ te.value ? (S(), A("div", di, [
2530
+ v("img", {
2520
2531
  src: l.agent.avatarUrl.value,
2521
2532
  alt: l.agent.displayName.value,
2522
2533
  class: E(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2523
- }, null, 10, di),
2524
- w("div", {
2534
+ }, null, 10, fi),
2535
+ v("div", {
2525
2536
  class: E(["rounded-2xl px-3.5 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2526
2537
  }, [
2527
- w("i", {
2538
+ v("i", {
2528
2539
  class: E(["i-svg-spinners-3-dots-bounce size-7", I.value ? "text-theme-400" : "text-white/50"])
2529
2540
  }, null, 2)
2530
2541
  ], 2)
2531
2542
  ])) : U("", !0)
2532
2543
  ], 512),
2533
- w("div", {
2544
+ v("div", {
2534
2545
  class: E(["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"])
2535
2546
  }, [
2536
- p.value.length > 0 ? (S(), A("div", fi, [
2537
- (S(!0), A(_e, null, bt(p.value, (x, L) => (S(), A("div", {
2547
+ p.value.length > 0 ? (S(), A("div", gi, [
2548
+ (S(!0), A(_e, null, bt(p.value, (m, L) => (S(), A("div", {
2538
2549
  key: L,
2539
2550
  class: "relative shrink-0 group"
2540
2551
  }, [
2541
- x.type === "image" ? (S(), A("img", {
2552
+ m.type === "image" ? (S(), A("img", {
2542
2553
  key: 0,
2543
- src: x.url,
2544
- alt: x.name,
2554
+ src: m.url,
2555
+ alt: m.name,
2545
2556
  class: E(["size-14 rounded-xl object-cover border", I.value ? "border-black/10" : "border-white/20"])
2546
- }, null, 10, gi)) : (S(), A("div", {
2557
+ }, null, 10, mi)) : (S(), A("div", {
2547
2558
  key: 1,
2548
2559
  class: E(["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"])
2549
2560
  }, [
2550
- k[10] || (k[10] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2551
- w("span", mi, re(x.name), 1)
2561
+ k[11] || (k[11] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2562
+ v("span", xi, re(m.name), 1)
2552
2563
  ], 2)),
2553
- w("button", {
2564
+ v("button", {
2554
2565
  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",
2555
2566
  onClick: /* @__PURE__ */ h((B) => ct(L), "onClick")
2556
- }, [...k[11] || (k[11] = [
2557
- w("i", { class: "i-tabler-x size-3" }, null, -1)
2558
- ])], 8, xi)
2567
+ }, [...k[12] || (k[12] = [
2568
+ v("i", { class: "i-tabler-x size-3" }, null, -1)
2569
+ ])], 8, bi)
2559
2570
  ]))), 128)),
2560
- m.value ? (S(), A("div", bi, [
2571
+ x.value ? (S(), A("div", ki, [
2561
2572
  Ht(Dn, { class: "size-5" })
2562
2573
  ])) : U("", !0)
2563
2574
  ])) : U("", !0),
@@ -2570,24 +2581,24 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2570
2581
  class: "hidden",
2571
2582
  onChange: Ct
2572
2583
  }, null, 544)) : U("", !0),
2573
- w("div", {
2584
+ v("div", {
2574
2585
  class: E(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", I.value ? c.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" : c.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
2575
2586
  }, [
2576
- w("button", {
2587
+ v("button", {
2577
2588
  class: E(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2578
2589
  l.uploadFn ? "cursor-pointer" : "cursor-default",
2579
2590
  I.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2580
- m.value ? "opacity-50 pointer-events-none" : ""
2591
+ x.value ? "opacity-50 pointer-events-none" : ""
2581
2592
  ]]),
2582
- disabled: ne.value || m.value || !l.uploadFn,
2583
- onClick: k[0] || (k[0] = (x) => l.uploadFn && ot())
2593
+ disabled: ne.value || x.value || !l.uploadFn,
2594
+ onClick: k[1] || (k[1] = (m) => l.uploadFn && ot())
2584
2595
  }, [
2585
- m.value ? (S(), A("i", wi)) : (S(), A("i", vi))
2586
- ], 10, ki),
2587
- Xn(w("textarea", {
2596
+ x.value ? (S(), A("i", vi)) : (S(), A("i", yi))
2597
+ ], 10, wi),
2598
+ Xn(v("textarea", {
2588
2599
  ref_key: "textarea",
2589
2600
  ref: g,
2590
- "onUpdate:modelValue": k[1] || (k[1] = (x) => o.value = x),
2601
+ "onUpdate:modelValue": k[2] || (k[2] = (m) => o.value = m),
2591
2602
  "data-test": "messaging-input",
2592
2603
  rows: "1",
2593
2604
  enterkeyhint: "send",
@@ -2596,40 +2607,40 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2596
2607
  style: { fontSize: "16px", resize: "none" },
2597
2608
  class: E(["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"]),
2598
2609
  onKeydown: _t,
2599
- onFocus: k[2] || (k[2] = (x) => c.value = !0),
2600
- onBlur: k[3] || (k[3] = (x) => c.value = !1)
2601
- }, null, 42, yi), [
2610
+ onFocus: k[3] || (k[3] = (m) => c.value = !0),
2611
+ onBlur: k[4] || (k[4] = (m) => c.value = !1)
2612
+ }, null, 42, Ti), [
2602
2613
  [Kn, o.value]
2603
2614
  ]),
2604
- w("button", {
2615
+ v("button", {
2605
2616
  "data-test": "messaging-send-btn",
2606
2617
  class: E(["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", at.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"]),
2607
2618
  disabled: !at.value,
2608
- onClick: k[4] || (k[4] = (x) => ye())
2609
- }, [...k[12] || (k[12] = [
2610
- w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2611
- ])], 10, Ti)
2619
+ onClick: k[5] || (k[5] = (m) => ye())
2620
+ }, [...k[13] || (k[13] = [
2621
+ v("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2622
+ ])], 10, Si)
2612
2623
  ], 2),
2613
- w("div", {
2624
+ v("div", {
2614
2625
  class: E(["text-[10px] text-center mt-2.5 select-none opacity-70", I.value ? "text-theme-400" : "text-white/50"])
2615
2626
  }, [
2616
- k[13] || (k[13] = Ye(" Press ", -1)),
2617
- w("kbd", {
2627
+ k[14] || (k[14] = Ye(" Press ", -1)),
2628
+ v("kbd", {
2618
2629
  class: E(["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"])
2619
2630
  }, "Enter", 2),
2620
- k[14] || (k[14] = Ye(" to send, ", -1)),
2621
- w("kbd", {
2631
+ k[15] || (k[15] = Ye(" to send, ", -1)),
2632
+ v("kbd", {
2622
2633
  class: E(["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"])
2623
2634
  }, "Shift+Enter", 2),
2624
- k[15] || (k[15] = Ye(" for new line ", -1))
2635
+ k[16] || (k[16] = Ye(" for new line ", -1))
2625
2636
  ], 2)
2626
2637
  ], 2)
2627
2638
  ]));
2628
2639
  }
2629
- }), Si = { class: "agent-wrap" }, Ai = {
2640
+ }), Ai = { class: "agent-wrap" }, Ei = {
2630
2641
  key: 0,
2631
2642
  class: "flex items-center justify-center h-full"
2632
- }, Pi = /* @__PURE__ */ Ie({
2643
+ }, Ni = /* @__PURE__ */ Ie({
2633
2644
  __name: "AgentWrap",
2634
2645
  props: {
2635
2646
  sdk: {},
@@ -2643,10 +2654,10 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2643
2654
  apiBase: {}
2644
2655
  },
2645
2656
  setup(l) {
2646
- const t = Ts("AgentWrap"), e = l, n = e.sdk || Ss.getInstance({
2657
+ const t = Ss("AgentWrap"), e = l, n = e.sdk || As.getInstance({
2647
2658
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2648
2659
  ...e.apiBase && { apiBase: e.apiBase }
2649
- }), s = Z(!e.agent), r = vs(e.agent ? new wt({ config: e.agent }) : void 0), a = Z();
2660
+ }), s = Z(!e.agent), r = ys(e.agent ? new wt({ config: e.agent }) : void 0), a = Z();
2650
2661
  return Jt(async () => {
2651
2662
  if (e.agent) {
2652
2663
  t.debug("Agent provided via props, skipping fetch", {
@@ -2723,9 +2734,9 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2723
2734
  }
2724
2735
  });
2725
2736
  }
2726
- }), (o, c) => (S(), A("div", Si, [
2727
- s.value ? (S(), A("div", Ai, [...c[0] || (c[0] = [
2728
- w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2737
+ }), (o, c) => (S(), A("div", Ai, [
2738
+ s.value ? (S(), A("div", Ei, [...c[0] || (c[0] = [
2739
+ v("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2729
2740
  ])])) : r.value ? Zn(o.$slots, "default", {
2730
2741
  key: 1,
2731
2742
  sdk: Zt(n),
@@ -2741,15 +2752,15 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2741
2752
  });
2742
2753
  export {
2743
2754
  Mn as A,
2744
- Pi as _,
2745
- Oi as a,
2746
- Li as b,
2747
- Mi as c,
2748
- zi as d,
2755
+ Ni as _,
2756
+ Pi as a,
2757
+ zi as b,
2758
+ Li as c,
2759
+ Oi as d,
2749
2760
  Dn as e,
2750
- $s as f,
2751
- Ii as g,
2761
+ Us as f,
2762
+ Di as g,
2752
2763
  zn as h,
2753
- Di as p
2764
+ Mi as p
2754
2765
  };
2755
2766
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map