@pagelines/sdk 1.0.447 → 1.0.448

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,7 +2,7 @@ var Dn = Object.defineProperty;
2
2
  var ws = (l, t, e) => t in l ? Dn(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
3
  var h = (l, t) => Dn(l, "name", { value: t, configurable: !0 });
4
4
  var D = (l, t, e) => ws(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as De, openBlock as A, createElementBlock as E, createElementVNode as T, normalizeClass as _, ref as V, watch as nt, computed as F, createCommentVNode as G, renderSlot as Zn, onMounted as Qt, Fragment as _e, renderList as xt, withDirectives as Xn, vModelText as Kn, unref as Yt, toDisplayString as pe, nextTick as Bt, createVNode as Ft, createTextVNode as ft, shallowRef as vs } from "vue";
5
+ import { defineComponent as De, openBlock as S, createElementBlock as A, createElementVNode as T, normalizeClass as _, ref as V, watch as nt, computed as F, createCommentVNode as G, renderSlot as Zn, onMounted as Qt, Fragment as _e, renderList as xt, withDirectives as Xn, vModelText as Kn, unref as Yt, toDisplayString as ie, nextTick as Bt, createVNode as Ft, createTextVNode as ft, shallowRef as vs } from "vue";
6
6
  import { SettingsObject as ys, Agent as kt, getDefaultAvatarUrl as Qn, createLogger as Ts } from "@pagelines/core";
7
7
  import { P as Ss } from "./sdkClient.js";
8
8
  const As = { class: "spinner max-w-sm" }, Es = {
@@ -15,8 +15,8 @@ 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) => (A(), E("div", As, [
19
- (A(), E("svg", Es, [
18
+ return (t, e) => (S(), A("div", As, [
19
+ (S(), A("svg", Es, [
20
20
  T("circle", {
21
21
  class: _([l.colorMode, "ring-path"]),
22
22
  cx: "50",
@@ -179,10 +179,10 @@ Current User:
179
179
  }
180
180
  const m = this.sharedMessages.value, y = m[m.length - 1];
181
181
  if (y?.id === a && y.text) {
182
- let S = y.text;
182
+ let E = y.text;
183
183
  for (const z of _s)
184
- z.pattern.test(S) && (console.debug(`[chat] filtered directive: ${z.label}`), S = S.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
185
- S ? S !== y.text && (y.text = S, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
184
+ z.pattern.test(E) && (console.debug(`[chat] filtered directive: ${z.label}`), E = E.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
185
+ E ? E !== y.text && (y.text = E, this.sharedMessages.value = [...m]) : this.sharedMessages.value = m.slice(0, -1);
186
186
  }
187
187
  f && (this.conversationId = f), this.updateState(this.textState, { isThinking: !1 });
188
188
  }, "onDone"), g = /* @__PURE__ */ h((f) => {
@@ -196,8 +196,8 @@ Current User:
196
196
  ])).has(f.code) ? (this.addMessage(f.error, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(f.error));
197
197
  return;
198
198
  }
199
- const S = typeof f == "string" ? f : f.error, z = this.mapChatError(S);
200
- this.isTransientError(S) ? (this.addMessage(z, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(z));
199
+ const E = typeof f == "string" ? f : f.error, z = this.mapChatError(E);
200
+ this.isTransientError(E) ? (this.addMessage(z, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(z));
201
201
  }, "onError"), p = /* @__PURE__ */ h((f) => {
202
202
  this.addMessage(f, "system");
203
203
  }, "onStatus");
@@ -300,21 +300,21 @@ const Cs = {
300
300
  md: "size-4",
301
301
  lg: "size-5"
302
302
  })[l.size]);
303
- return (s, r) => (A(), E("button", {
303
+ return (s, r) => (S(), A("button", {
304
304
  class: _(["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]])
305
305
  }, [
306
- l.loading ? (A(), E("div", Cs, [...r[0] || (r[0] = [
306
+ l.loading ? (S(), A("div", Cs, [...r[0] || (r[0] = [
307
307
  T("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
308
308
  ])])) : G("", !0),
309
309
  T("span", {
310
310
  class: _(["flex items-center gap-2 transition-opacity duration-200", l.loading ? "opacity-0" : "opacity-100"])
311
311
  }, [
312
- l.icon ? (A(), E("i", {
312
+ l.icon ? (S(), A("i", {
313
313
  key: 0,
314
314
  class: _([l.icon, n.value])
315
315
  }, null, 2)) : G("", !0),
316
316
  Zn(s.$slots, "default"),
317
- l.iconAfter ? (A(), E("i", {
317
+ l.iconAfter ? (S(), A("i", {
318
318
  key: 1,
319
319
  class: _([l.iconAfter, n.value])
320
320
  }, null, 2)) : G("", !0)
@@ -329,7 +329,7 @@ const Cs = {
329
329
  emits: ["update:modelValue"],
330
330
  setup(l, { emit: t }) {
331
331
  const e = t;
332
- return (n, s) => (A(), E("input", {
332
+ return (n, s) => (S(), A("input", {
333
333
  type: "email",
334
334
  autocomplete: "email",
335
335
  placeholder: "Enter Your Email",
@@ -369,9 +369,9 @@ const Cs = {
369
369
  m.split("").slice(0, e.length - p).forEach((z, de) => {
370
370
  y[p + de] = z;
371
371
  }), r.value = y;
372
- const S = Math.min(p + m.length, e.length - 1);
372
+ const E = Math.min(p + m.length, e.length - 1);
373
373
  setTimeout(() => {
374
- s.value[S]?.focus(), a.value = !1;
374
+ s.value[E]?.focus(), a.value = !1;
375
375
  }, 10);
376
376
  }
377
377
  }
@@ -390,8 +390,8 @@ const Cs = {
390
390
  for (let f = p; f < e.length; f++)
391
391
  r.value[f] = "";
392
392
  }
393
- return h(g, "onFocus"), (p, f) => (A(), E("div", Is, [
394
- (A(!0), E(_e, null, xt(l.length, (m) => Xn((A(), E("input", {
393
+ return h(g, "onFocus"), (p, f) => (S(), A("div", Is, [
394
+ (S(!0), A(_e, null, xt(l.length, (m) => Xn((S(), A("input", {
395
395
  key: m,
396
396
  ref_for: !0,
397
397
  ref: /* @__PURE__ */ h((y) => s.value[m - 1] = y, "ref"),
@@ -423,7 +423,7 @@ const Cs = {
423
423
  layout: { default: "centered" }
424
424
  },
425
425
  setup(l) {
426
- return (t, e) => (A(), E("div", {
426
+ return (t, e) => (S(), A("div", {
427
427
  class: _(["flex gap-4", [
428
428
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
429
429
  ]])
@@ -441,13 +441,13 @@ const Cs = {
441
441
  }, null, 40, zs)
442
442
  ], 2),
443
443
  T("div", Os, [
444
- l.isOnline ? (A(), E(_e, { key: 0 }, [
444
+ l.isOnline ? (S(), A(_e, { key: 0 }, [
445
445
  e[1] || (e[1] = T("div", {
446
446
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
447
447
  style: { "animation-duration": "3s" }
448
448
  }, null, -1)),
449
449
  e[2] || (e[2] = T("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
450
- ], 64)) : (A(), E("div", Ps))
450
+ ], 64)) : (S(), A("div", Ps))
451
451
  ])
452
452
  ]),
453
453
  T("div", Ns, [
@@ -456,13 +456,13 @@ const Cs = {
456
456
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
457
457
  l.layout === "horizontal" ? "text-white/95" : ""
458
458
  ]])
459
- }, pe(l.agent.displayName.value), 3),
459
+ }, ie(l.agent.displayName.value), 3),
460
460
  T("p", {
461
461
  class: _(["font-light line-clamp-1", [
462
462
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
463
463
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
464
464
  ]])
465
- }, pe(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
465
+ }, ie(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
466
466
  ])
467
467
  ], 2));
468
468
  }
@@ -498,7 +498,7 @@ Xt || (Xt = /* @__PURE__ */ h(function(t) {
498
498
  n[s - 1] = arguments[s];
499
499
  return new t(...n);
500
500
  }, "construct"));
501
- const Ve = X(Array.prototype.forEach), Hs = X(Array.prototype.lastIndexOf), Pn = X(Array.prototype.pop), Ye = X(Array.prototype.push), Gs = X(Array.prototype.splice), bt = X(String.prototype.toLowerCase), Ht = X(String.prototype.toString), Gt = X(String.prototype.match), Ne = X(String.prototype.replace), Ws = X(String.prototype.indexOf), js = X(String.prototype.trim), ie = X(Object.prototype.hasOwnProperty), q = X(RegExp.prototype.test), Ze = qs(TypeError);
501
+ const Ve = X(Array.prototype.forEach), Hs = X(Array.prototype.lastIndexOf), Pn = X(Array.prototype.pop), Ye = X(Array.prototype.push), Gs = X(Array.prototype.splice), bt = X(String.prototype.toLowerCase), Ht = X(String.prototype.toString), Gt = X(String.prototype.match), Ne = X(String.prototype.replace), Ws = X(String.prototype.indexOf), js = X(String.prototype.trim), ae = X(Object.prototype.hasOwnProperty), q = X(RegExp.prototype.test), Ze = qs(TypeError);
502
502
  function X(l) {
503
503
  return function(t) {
504
504
  t instanceof RegExp && (t.lastIndex = 0);
@@ -533,17 +533,17 @@ function R(l, t) {
533
533
  h(R, "addToSet");
534
534
  function Vs(l) {
535
535
  for (let t = 0; t < l.length; t++)
536
- ie(l, t) || (l[t] = null);
536
+ ae(l, t) || (l[t] = null);
537
537
  return l;
538
538
  }
539
539
  h(Vs, "cleanArray");
540
- function ue(l) {
540
+ function he(l) {
541
541
  const t = et(null);
542
542
  for (const [e, n] of Jn(l))
543
- ie(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = ue(n) : t[e] = n);
543
+ ae(l, e) && (Array.isArray(n) ? t[e] = Vs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = he(n) : t[e] = n);
544
544
  return t;
545
545
  }
546
- h(ue, "clone");
546
+ h(he, "clone");
547
547
  function Xe(l, t) {
548
548
  for (; l !== null; ) {
549
549
  const n = Fs(l, t);
@@ -640,7 +640,7 @@ function ns() {
640
640
  HTMLFormElement: p,
641
641
  DOMParser: f,
642
642
  trustedTypes: m
643
- } = l, y = c.prototype, S = Xe(y, "cloneNode"), z = Xe(y, "remove"), de = Xe(y, "nextSibling"), me = Xe(y, "childNodes"), ne = Xe(y, "parentNode");
643
+ } = l, y = c.prototype, E = Xe(y, "cloneNode"), z = Xe(y, "remove"), de = Xe(y, "nextSibling"), me = Xe(y, "childNodes"), ne = Xe(y, "parentNode");
644
644
  if (typeof a == "function") {
645
645
  const v = e.createElement("template");
646
646
  v.content && v.content.ownerDocument && (e = v.content.ownerDocument);
@@ -650,7 +650,7 @@ function ns() {
650
650
  implementation: se,
651
651
  createNodeIterator: fe,
652
652
  createDocumentFragment: rt,
653
- getElementsByTagName: L
653
+ getElementsByTagName: M
654
654
  } = e, {
655
655
  importNode: it
656
656
  } = n;
@@ -668,9 +668,9 @@ function ns() {
668
668
  } = Fn;
669
669
  let {
670
670
  IS_ALLOWED_URI: Ge
671
- } = Fn, b = null;
671
+ } = Fn, k = null;
672
672
  const w = R({}, [...Nn, ...Wt, ...jt, ...qt, ...$n]);
673
- let k = null;
673
+ let b = null;
674
674
  const O = R({}, [...Un, ...Vt, ...Bn, ...gt]);
675
675
  let C = Object.seal(et(null, {
676
676
  tagNameCheck: {
@@ -708,14 +708,14 @@ function ns() {
708
708
  }));
709
709
  let un = !0, Rt = !0, hn = !1, pn = !0, Se = !1, We = !0, Ae = !1, Ct = !1, Dt = !1, Le = !1, ot = !1, ct = !1, dn = !0, fn = !1;
710
710
  const ds = "user-content-";
711
- let It = !0, je = !1, ze = {}, oe = null;
711
+ let It = !0, je = !1, ze = {}, ce = null;
712
712
  const Mt = R({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
713
713
  let gn = null;
714
714
  const mn = R({}, ["audio", "video", "img", "source", "image", "track"]);
715
715
  let Lt = null;
716
- const xn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ut = "http://www.w3.org/1998/Math/MathML", ht = "http://www.w3.org/2000/svg", ce = "http://www.w3.org/1999/xhtml";
717
- let Oe = ce, zt = !1, Ot = null;
718
- const fs = R({}, [ut, ht, ce], Ht);
716
+ const xn = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ut = "http://www.w3.org/1998/Math/MathML", ht = "http://www.w3.org/2000/svg", ue = "http://www.w3.org/1999/xhtml";
717
+ let Oe = ue, zt = !1, Ot = null;
718
+ const fs = R({}, [ut, ht, ue], Ht);
719
719
  let pt = R({}, ["mi", "mo", "mn", "ms", "mtext"]), dt = R({}, ["annotation-xml"]);
720
720
  const gs = R({}, ["title", "style", "font", "a", "script"]);
721
721
  let qe = null;
@@ -726,8 +726,8 @@ function ns() {
726
726
  }, "isRegexOrFunction"), Pt = /* @__PURE__ */ h(function() {
727
727
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
728
728
  if (!(Pe && Pe === i)) {
729
- if ((!i || typeof i != "object") && (i = {}), i = ue(i), qe = // eslint-disable-next-line unicorn/prefer-includes
730
- ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, B = qe === "application/xhtml+xml" ? Ht : bt, b = ie(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : w, k = ie(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : O, Ot = ie(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Ht) : fs, Lt = ie(i, "ADD_URI_SAFE_ATTR") ? R(ue(xn), i.ADD_URI_SAFE_ATTR, B) : xn, gn = ie(i, "ADD_DATA_URI_TAGS") ? R(ue(mn), i.ADD_DATA_URI_TAGS, B) : mn, oe = ie(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : Mt, J = ie(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : ue({}), Te = ie(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : ue({}), ze = ie(i, "USE_PROFILES") ? i.USE_PROFILES : !1, un = i.ALLOW_ARIA_ATTR !== !1, Rt = 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, We = i.SAFE_FOR_XML !== !1, Ae = i.WHOLE_DOCUMENT || !1, Le = i.RETURN_DOM || !1, ot = i.RETURN_DOM_FRAGMENT || !1, ct = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, It = i.KEEP_CONTENT !== !1, je = i.IN_PLACE || !1, Ge = i.ALLOWED_URI_REGEXP || es, Oe = i.NAMESPACE || ce, pt = i.MATHML_TEXT_INTEGRATION_POINTS || pt, dt = i.HTML_INTEGRATION_POINTS || dt, C = i.CUSTOM_ELEMENT_HANDLING || et(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (C.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (C.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (C.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (Rt = !1), ot && (Le = !0), ze && (b = R({}, $n), k = et(null), ze.html === !0 && (R(b, Nn), R(k, Un)), ze.svg === !0 && (R(b, Wt), R(k, Vt), R(k, gt)), ze.svgFilters === !0 && (R(b, jt), R(k, Vt), R(k, gt)), ze.mathMl === !0 && (R(b, qt), R(k, Bn), R(k, gt))), ee.tagCheck = null, ee.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ee.tagCheck = i.ADD_TAGS : (b === w && (b = ue(b)), R(b, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ee.attributeCheck = i.ADD_ATTR : (k === O && (k = ue(k)), R(k, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(Lt, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (oe === Mt && (oe = ue(oe)), R(oe, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (oe === Mt && (oe = ue(oe)), R(oe, i.ADD_FORBID_CONTENTS, B)), It && (b["#text"] = !0), Ae && R(b, ["html", "head", "body"]), b.table && (R(b, ["tbody"]), delete J.tbody), i.TRUSTED_TYPES_POLICY) {
729
+ if ((!i || typeof i != "object") && (i = {}), i = he(i), qe = // eslint-disable-next-line unicorn/prefer-includes
730
+ ms.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? xs : i.PARSER_MEDIA_TYPE, B = qe === "application/xhtml+xml" ? Ht : bt, k = ae(i, "ALLOWED_TAGS") ? R({}, i.ALLOWED_TAGS, B) : w, b = ae(i, "ALLOWED_ATTR") ? R({}, i.ALLOWED_ATTR, B) : O, Ot = ae(i, "ALLOWED_NAMESPACES") ? R({}, i.ALLOWED_NAMESPACES, Ht) : fs, Lt = ae(i, "ADD_URI_SAFE_ATTR") ? R(he(xn), i.ADD_URI_SAFE_ATTR, B) : xn, gn = ae(i, "ADD_DATA_URI_TAGS") ? R(he(mn), i.ADD_DATA_URI_TAGS, B) : mn, ce = ae(i, "FORBID_CONTENTS") ? R({}, i.FORBID_CONTENTS, B) : Mt, J = ae(i, "FORBID_TAGS") ? R({}, i.FORBID_TAGS, B) : he({}), Te = ae(i, "FORBID_ATTR") ? R({}, i.FORBID_ATTR, B) : he({}), ze = ae(i, "USE_PROFILES") ? i.USE_PROFILES : !1, un = i.ALLOW_ARIA_ATTR !== !1, Rt = 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, We = i.SAFE_FOR_XML !== !1, Ae = i.WHOLE_DOCUMENT || !1, Le = i.RETURN_DOM || !1, ot = i.RETURN_DOM_FRAGMENT || !1, ct = i.RETURN_TRUSTED_TYPE || !1, Dt = i.FORCE_BODY || !1, dn = i.SANITIZE_DOM !== !1, fn = i.SANITIZE_NAMED_PROPS || !1, It = i.KEEP_CONTENT !== !1, je = i.IN_PLACE || !1, Ge = i.ALLOWED_URI_REGEXP || es, Oe = i.NAMESPACE || ue, pt = i.MATHML_TEXT_INTEGRATION_POINTS || pt, dt = i.HTML_INTEGRATION_POINTS || dt, C = i.CUSTOM_ELEMENT_HANDLING || et(null), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (C.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && bn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (C.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (C.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Se && (Rt = !1), ot && (Le = !0), ze && (k = R({}, $n), b = et(null), ze.html === !0 && (R(k, Nn), R(b, Un)), ze.svg === !0 && (R(k, Wt), R(b, Vt), R(b, gt)), ze.svgFilters === !0 && (R(k, jt), R(b, Vt), R(b, gt)), ze.mathMl === !0 && (R(k, qt), R(b, Bn), R(b, gt))), ee.tagCheck = null, ee.attributeCheck = null, i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ee.tagCheck = i.ADD_TAGS : (k === w && (k = he(k)), R(k, i.ADD_TAGS, B))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ee.attributeCheck = i.ADD_ATTR : (b === O && (b = he(b)), R(b, i.ADD_ATTR, B))), i.ADD_URI_SAFE_ATTR && R(Lt, i.ADD_URI_SAFE_ATTR, B), i.FORBID_CONTENTS && (ce === Mt && (ce = he(ce)), R(ce, i.FORBID_CONTENTS, B)), i.ADD_FORBID_CONTENTS && (ce === Mt && (ce = he(ce)), R(ce, i.ADD_FORBID_CONTENTS, B)), It && (k["#text"] = !0), Ae && R(k, ["html", "head", "body"]), k.table && (R(k, ["tbody"]), delete J.tbody), i.TRUSTED_TYPES_POLICY) {
731
731
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
732
732
  throw Ze('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
733
733
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -744,7 +744,7 @@ function ns() {
744
744
  tagName: "template"
745
745
  });
746
746
  const x = bt(i.tagName), P = bt(u.tagName);
747
- return Ot[i.namespaceURI] ? i.namespaceURI === ht ? u.namespaceURI === ce ? x === "svg" : u.namespaceURI === ut ? x === "svg" && (P === "annotation-xml" || pt[P]) : !!kn[x] : i.namespaceURI === ut ? u.namespaceURI === ce ? x === "math" : u.namespaceURI === ht ? x === "math" && dt[P] : !!wn[x] : i.namespaceURI === ce ? u.namespaceURI === ht && !dt[P] || u.namespaceURI === ut && !pt[P] ? !1 : !wn[x] && (gs[x] || !kn[x]) : !!(qe === "application/xhtml+xml" && Ot[i.namespaceURI]) : !1;
747
+ return Ot[i.namespaceURI] ? i.namespaceURI === ht ? u.namespaceURI === ue ? x === "svg" : u.namespaceURI === ut ? x === "svg" && (P === "annotation-xml" || pt[P]) : !!kn[x] : i.namespaceURI === ut ? u.namespaceURI === ue ? x === "math" : u.namespaceURI === ht ? x === "math" && dt[P] : !!wn[x] : i.namespaceURI === ue ? u.namespaceURI === ht && !dt[P] || u.namespaceURI === ut && !pt[P] ? !1 : !wn[x] && (gs[x] || !kn[x]) : !!(qe === "application/xhtml+xml" && Ot[i.namespaceURI]) : !1;
748
748
  }, "_checkValidNamespace"), re = /* @__PURE__ */ h(function(i) {
749
749
  Ye(t.removed, {
750
750
  element: i
@@ -785,9 +785,9 @@ function ns() {
785
785
  const N = Gt(i, /^[\r\n\t ]+/);
786
786
  x = N && N[0];
787
787
  }
788
- qe === "application/xhtml+xml" && Oe === ce && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
788
+ qe === "application/xhtml+xml" && Oe === ue && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
789
789
  const P = $ ? $.createHTML(i) : i;
790
- if (Oe === ce)
790
+ if (Oe === ue)
791
791
  try {
792
792
  u = new f().parseFromString(P, qe);
793
793
  } catch {
@@ -800,7 +800,7 @@ function ns() {
800
800
  }
801
801
  }
802
802
  const W = u.body || u.documentElement;
803
- return i && x && W.insertBefore(e.createTextNode(x), W.childNodes[0] || null), Oe === ce ? L.call(u, Ae ? "html" : "body")[0] : Ae ? u.documentElement : W;
803
+ return i && x && W.insertBefore(e.createTextNode(x), W.childNodes[0] || null), Oe === ue ? M.call(u, Ae ? "html" : "body")[0] : Ae ? u.documentElement : W;
804
804
  }, "_initDocument"), yn = /* @__PURE__ */ h(function(i) {
805
805
  return fe.call(
806
806
  i.ownerDocument || i,
@@ -827,18 +827,18 @@ function ns() {
827
827
  const x = B(i.nodeName);
828
828
  if (ge(U.uponSanitizeElement, i, {
829
829
  tagName: x,
830
- allowedTags: b
831
- }), We && i.hasChildNodes() && !$t(i.firstElementChild) && q(/<[/\w!]/g, i.innerHTML) && q(/<[/\w!]/g, i.textContent) || We && i.namespaceURI === ce && x === "style" && $t(i.firstElementChild) || i.nodeType === Ke.progressingInstruction || We && i.nodeType === Ke.comment && q(/<[/\w]/g, i.data))
830
+ allowedTags: k
831
+ }), We && i.hasChildNodes() && !$t(i.firstElementChild) && q(/<[/\w!]/g, i.innerHTML) && q(/<[/\w!]/g, i.textContent) || We && i.namespaceURI === ue && x === "style" && $t(i.firstElementChild) || i.nodeType === Ke.progressingInstruction || We && i.nodeType === Ke.comment && q(/<[/\w]/g, i.data))
832
832
  return re(i), !0;
833
- if (J[x] || !(ee.tagCheck instanceof Function && ee.tagCheck(x)) && !b[x]) {
833
+ if (J[x] || !(ee.tagCheck instanceof Function && ee.tagCheck(x)) && !k[x]) {
834
834
  if (!J[x] && An(x) && (C.tagNameCheck instanceof RegExp && q(C.tagNameCheck, x) || C.tagNameCheck instanceof Function && C.tagNameCheck(x)))
835
835
  return !1;
836
- if (It && !oe[x]) {
836
+ if (It && !ce[x]) {
837
837
  const P = ne(i) || i.parentNode, W = me(i) || i.childNodes;
838
838
  if (W && P) {
839
839
  const N = W.length;
840
840
  for (let K = N - 1; K >= 0; --K) {
841
- const Q = S(W[K], !0);
841
+ const Q = E(W[K], !0);
842
842
  Q.__removalCount = (i.__removalCount || 0) + 1, P.insertBefore(Q, de(i));
843
843
  }
844
844
  }
@@ -856,7 +856,7 @@ function ns() {
856
856
  if (!(Rt && !Te[u] && q(At, u))) {
857
857
  if (!(un && q(Et, u))) {
858
858
  if (!(ee.attributeCheck instanceof Function && ee.attributeCheck(u, i))) {
859
- if (!k[u] || Te[u]) {
859
+ if (!b[u] || Te[u]) {
860
860
  if (
861
861
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
862
862
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
@@ -892,7 +892,7 @@ function ns() {
892
892
  attrName: "",
893
893
  attrValue: "",
894
894
  keepAttr: !0,
895
- allowedAttributes: k,
895
+ allowedAttributes: b,
896
896
  forceKeepAttr: void 0
897
897
  };
898
898
  let P = u.length;
@@ -968,7 +968,7 @@ function ns() {
968
968
  if (Ct || Pt(i), t.removed = [], typeof v == "string" && (je = !1), je) {
969
969
  if (v.nodeName) {
970
970
  const Q = B(v.nodeName);
971
- if (!b[Q] || J[Q])
971
+ if (!k[Q] || J[Q])
972
972
  throw Ze("root node is forbidden and cannot be sanitized in-place");
973
973
  }
974
974
  } else if (v instanceof o)
@@ -999,10 +999,10 @@ function ns() {
999
999
  W.appendChild(u.firstChild);
1000
1000
  else
1001
1001
  W = u;
1002
- return (k.shadowroot || k.shadowrootmode) && (W = it.call(n, W, !0)), W;
1002
+ return (b.shadowroot || b.shadowrootmode) && (W = it.call(n, W, !0)), W;
1003
1003
  }
1004
1004
  let K = Ae ? u.outerHTML : u.innerHTML;
1005
- return Ae && b["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && q(ts, u.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1005
+ return Ae && k["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && q(ts, u.ownerDocument.doctype.name) && (K = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1006
1006
  ` + K), Se && Ve([ve, Me, ye], (Q) => {
1007
1007
  K = Ne(K, Q, " ");
1008
1008
  }), $ && ct ? $.createHTML(K) : K;
@@ -1057,13 +1057,13 @@ var lr = (() => {
1057
1057
  }
1058
1058
  })(), Y = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ 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|$)|$)/, st = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, en = / {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 = I(rs).replace(/bull/g, en).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 = I(rs).replace(/bull/g, en).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(), tn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, dr = /^[^\n]+/, nn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, fr = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", nn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gr = I(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, en).getRegex(), Tt = "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", sn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, mr = I("^ {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", sn).replace("tag", Tt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), as = I(tn).replace("hr", st).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", Tt).getRegex(), xr = I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", as).getRegex(), rn = { blockquote: xr, code: cr, def: fr, fences: ur, heading: hr, hr: st, html: mr, lheading: is, list: gr, newline: or, paragraph: as, table: Re, text: dr }, Gn = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", st).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", Tt).getRegex(), br = { ...rn, lheading: pr, table: Gn, paragraph: I(tn).replace("hr", st).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", Tt).getRegex() }, kr = { ...rn, html: I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", sn).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: I(tn).replace("hr", st).replace("heading", ` *#{1,6} *[^
1059
1059
  ]`).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, St = /[\s\p{P}\p{S}]/u, an = /[^\s\p{P}\p{S}]/u, Tr = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, St).getRegex(), os = /(?!~)[\p{P}\p{S}]/u, Sr = /(?!~)[\s\p{P}\p{S}]/u, Ar = /(?:[^\s\p{P}\p{S}]|~)/u, Er = I(/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 = I(cs, "u").replace(/punct/g, He).getRegex(), Rr = I(cs, "u").replace(/punct/g, os).getRegex(), us = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Cr = I(us, "gu").replace(/notPunctSpace/g, an).replace(/punctSpace/g, St).replace(/punct/g, He).getRegex(), Dr = I(us, "gu").replace(/notPunctSpace/g, Ar).replace(/punctSpace/g, Sr).replace(/punct/g, os).getRegex(), Ir = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, an).replace(/punctSpace/g, St).replace(/punct/g, He).getRegex(), Mr = I(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, He).getRegex(), Lr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", zr = I(Lr, "gu").replace(/notPunctSpace/g, an).replace(/punctSpace/g, St).replace(/punct/g, He).getRegex(), Or = I(/\\(punct)/, "gu").replace(/punct/g, He).getRegex(), Pr = I(/^<(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 = I(sn).replace("(?:-->|$)", "-->").getRegex(), $r = I("^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(), wt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Ur = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", wt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), hs = I(/^!?\[(label)\]\[(ref)\]/).replace("label", wt).replace("ref", nn).getRegex(), ps = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", nn).getRegex(), Br = I("reflink|nolink(?!\\()", "g").replace("reflink", hs).replace("nolink", ps).getRegex(), Wn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ln = { _backpedal: Re, anyPunctuation: Or, autolink: Pr, blockSkip: Er, br: ls, code: vr, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: _r, emStrongRDelimAst: Cr, emStrongRDelimUnd: Ir, escape: wr, link: Ur, nolink: ps, punctuation: Tr, reflink: hs, reflinkSearch: Br, tag: $r, text: yr, url: Re }, Fr = { ...ln, link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", wt).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", wt).getRegex() }, Kt = { ...ln, emStrongRDelimAst: Dr, emStrongLDelim: Rr, delLDelim: Mr, delRDelim: zr, url: I(/^((?: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: I(/^([`~]+|[^`~])(?:(?= {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 = { ...Kt, br: I(ls).replace("{2,}", "*").getRegex(), text: I(Kt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, mt = { normal: rn, gfm: br, pedantic: kr }, Qe = { normal: ln, gfm: Kt, breaks: Hr, pedantic: Fr }, Gr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, jn = /* @__PURE__ */ h((l) => Gr[l], "ke");
1060
- function he(l, t) {
1060
+ function pe(l, t) {
1061
1061
  if (t) {
1062
1062
  if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, jn);
1063
1063
  } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, jn);
1064
1064
  return l;
1065
1065
  }
1066
- h(he, "T");
1066
+ h(pe, "T");
1067
1067
  function qn(l) {
1068
1068
  try {
1069
1069
  l = encodeURI(l).replace(Y.percentDecode, "%");
@@ -1198,16 +1198,16 @@ ${p}` : p;
1198
1198
  let m = a.at(-1);
1199
1199
  if (m?.type === "code") break;
1200
1200
  if (m?.type === "blockquote") {
1201
- let y = m, S = y.raw + `
1201
+ let y = m, E = y.raw + `
1202
1202
  ` + n.join(`
1203
- `), z = this.blockquote(S);
1203
+ `), z = this.blockquote(E);
1204
1204
  a[a.length - 1] = z, s = s.substring(0, s.length - y.raw.length) + z.raw, r = r.substring(0, r.length - y.text.length) + z.text;
1205
1205
  break;
1206
1206
  } else if (m?.type === "list") {
1207
- let y = m, S = y.raw + `
1207
+ let y = m, E = y.raw + `
1208
1208
  ` + n.join(`
1209
- `), z = this.list(S);
1210
- a[a.length - 1] = z, s = s.substring(0, s.length - m.raw.length) + z.raw, r = r.substring(0, r.length - y.raw.length) + z.raw, n = S.substring(a.at(-1).raw.length).split(`
1209
+ `), z = this.list(E);
1210
+ a[a.length - 1] = z, s = s.substring(0, s.length - m.raw.length) + z.raw, r = r.substring(0, r.length - y.raw.length) + z.raw, n = E.substring(a.at(-1).raw.length).split(`
1211
1211
  `);
1212
1212
  continue;
1213
1213
  }
@@ -1227,23 +1227,23 @@ ${p}` : p;
1227
1227
  g = e[0], t = t.substring(g.length);
1228
1228
  let f = jr(e[2].split(`
1229
1229
  `, 1)[0], e[1].length), m = t.split(`
1230
- `, 1)[0], y = !f.trim(), S = 0;
1231
- if (this.options.pedantic ? (S = 2, p = f.trimStart()) : y ? S = e[1].length + 1 : (S = f.search(this.rules.other.nonSpaceChar), S = S > 4 ? 1 : S, p = f.slice(S), S += e[1].length), y && this.rules.other.blankLine.test(m) && (g += m + `
1230
+ `, 1)[0], y = !f.trim(), E = 0;
1231
+ if (this.options.pedantic ? (E = 2, p = f.trimStart()) : y ? E = e[1].length + 1 : (E = f.search(this.rules.other.nonSpaceChar), E = E > 4 ? 1 : E, p = f.slice(E), E += e[1].length), y && this.rules.other.blankLine.test(m) && (g += m + `
1232
1232
  `, t = t.substring(m.length + 1), d = !0), !d) {
1233
- let z = this.rules.other.nextBulletRegex(S), de = this.rules.other.hrRegex(S), me = this.rules.other.fencesBeginRegex(S), ne = this.rules.other.headingBeginRegex(S), $ = this.rules.other.htmlBeginRegex(S), j = this.rules.other.blockquoteBeginRegex(S);
1233
+ let z = this.rules.other.nextBulletRegex(E), de = this.rules.other.hrRegex(E), me = this.rules.other.fencesBeginRegex(E), ne = this.rules.other.headingBeginRegex(E), $ = this.rules.other.htmlBeginRegex(E), j = this.rules.other.blockquoteBeginRegex(E);
1234
1234
  for (; t; ) {
1235
1235
  let se = t.split(`
1236
1236
  `, 1)[0], fe;
1237
1237
  if (m = se, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), fe = m) : fe = m.replace(this.rules.other.tabCharGlobal, " "), me.test(m) || ne.test(m) || $.test(m) || j.test(m) || z.test(m) || de.test(m)) break;
1238
- if (fe.search(this.rules.other.nonSpaceChar) >= S || !m.trim()) p += `
1239
- ` + fe.slice(S);
1238
+ if (fe.search(this.rules.other.nonSpaceChar) >= E || !m.trim()) p += `
1239
+ ` + fe.slice(E);
1240
1240
  else {
1241
1241
  if (y || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || me.test(f) || ne.test(f) || de.test(f)) break;
1242
1242
  p += `
1243
1243
  ` + m;
1244
1244
  }
1245
1245
  y = !m.trim(), g += se + `
1246
- `, t = t.substring(se.length + 1), f = fe.slice(S);
1246
+ `, t = t.substring(se.length + 1), f = fe.slice(E);
1247
1247
  }
1248
1248
  }
1249
1249
  r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(g) && (o = !0)), r.items.push({ type: "list_item", raw: g, task: !!this.options.gfm && this.rules.other.listIsTask.test(p), loose: !1, text: p, tokens: [] }), r.raw += g;
@@ -1446,7 +1446,7 @@ ${p}` : p;
1446
1446
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1447
1447
  }
1448
1448
  }
1449
- }, h($e, "w"), $e), ke, ae = (ke = class {
1449
+ }, h($e, "w"), $e), ke, le = (ke = class {
1450
1450
  constructor(t) {
1451
1451
  D(this, "tokens");
1452
1452
  D(this, "options");
@@ -1666,8 +1666,8 @@ ${p}` : p;
1666
1666
  code({ text: t, lang: e, escaped: n }) {
1667
1667
  let s = (e || "").match(Y.notSpaceStart)?.[0], r = t.replace(Y.endingNewline, "") + `
1668
1668
  `;
1669
- return s ? '<pre><code class="language-' + he(s) + '">' + (n ? r : he(r, !0)) + `</code></pre>
1670
- ` : "<pre><code>" + (n ? r : he(r, !0)) + `</code></pre>
1669
+ return s ? '<pre><code class="language-' + pe(s) + '">' + (n ? r : pe(r, !0)) + `</code></pre>
1670
+ ` : "<pre><code>" + (n ? r : pe(r, !0)) + `</code></pre>
1671
1671
  `;
1672
1672
  }
1673
1673
  blockquote({ tokens: t }) {
@@ -1745,7 +1745,7 @@ ${t}</tr>
1745
1745
  return `<em>${this.parser.parseInline(t)}</em>`;
1746
1746
  }
1747
1747
  codespan({ text: t }) {
1748
- return `<code>${he(t, !0)}</code>`;
1748
+ return `<code>${pe(t, !0)}</code>`;
1749
1749
  }
1750
1750
  br(t) {
1751
1751
  return "<br>";
@@ -1758,18 +1758,18 @@ ${t}</tr>
1758
1758
  if (r === null) return s;
1759
1759
  t = r;
1760
1760
  let a = '<a href="' + t + '"';
1761
- return e && (a += ' title="' + he(e) + '"'), a += ">" + s + "</a>", a;
1761
+ return e && (a += ' title="' + pe(e) + '"'), a += ">" + s + "</a>", a;
1762
1762
  }
1763
1763
  image({ href: t, title: e, text: n, tokens: s }) {
1764
1764
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1765
1765
  let r = qn(t);
1766
- if (r === null) return he(n);
1766
+ if (r === null) return pe(n);
1767
1767
  t = r;
1768
- let a = `<img src="${t}" alt="${he(n)}"`;
1769
- return e && (a += ` title="${he(e)}"`), a += ">", a;
1768
+ let a = `<img src="${t}" alt="${pe(n)}"`;
1769
+ return e && (a += ` title="${pe(e)}"`), a += ">", a;
1770
1770
  }
1771
1771
  text(t) {
1772
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : he(t.text);
1772
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : pe(t.text);
1773
1773
  }
1774
1774
  }, h(Ue, "y"), Ue), Be, on = (Be = class {
1775
1775
  strong({ text: t }) {
@@ -1802,7 +1802,7 @@ ${t}</tr>
1802
1802
  checkbox({ raw: t }) {
1803
1803
  return t;
1804
1804
  }
1805
- }, h(Be, "$"), Be), we, le = (we = class {
1805
+ }, h(Be, "$"), Be), we, oe = (we = class {
1806
1806
  constructor(t) {
1807
1807
  D(this, "options");
1808
1808
  D(this, "renderer");
@@ -1972,10 +1972,10 @@ ${t}</tr>
1972
1972
  return t;
1973
1973
  }
1974
1974
  provideLexer(t = this.block) {
1975
- return t ? ae.lex : ae.lexInline;
1975
+ return t ? le.lex : le.lexInline;
1976
1976
  }
1977
1977
  provideParser(t = this.block) {
1978
- return t ? le.parse : le.parseInline;
1978
+ return t ? oe.parse : oe.parseInline;
1979
1979
  }
1980
1980
  }, h(be, "P"), D(be, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(be, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), be), Fe, Vr = (Fe = class {
1981
1981
  constructor(...t) {
@@ -1983,10 +1983,10 @@ ${t}</tr>
1983
1983
  D(this, "options", this.setOptions);
1984
1984
  D(this, "parse", this.parseMarkdown(!0));
1985
1985
  D(this, "parseInline", this.parseMarkdown(!1));
1986
- D(this, "Parser", le);
1986
+ D(this, "Parser", oe);
1987
1987
  D(this, "Renderer", yt);
1988
1988
  D(this, "TextRenderer", on);
1989
- D(this, "Lexer", ae);
1989
+ D(this, "Lexer", le);
1990
1990
  D(this, "Tokenizer", vt);
1991
1991
  D(this, "Hooks", tt);
1992
1992
  this.use(...t);
@@ -2098,10 +2098,10 @@ ${t}</tr>
2098
2098
  return this.defaults = { ...this.defaults, ...t }, this;
2099
2099
  }
2100
2100
  lexer(t, e) {
2101
- return ae.lex(t, e ?? this.defaults);
2101
+ return le.lex(t, e ?? this.defaults);
2102
2102
  }
2103
2103
  parser(t, e) {
2104
- return le.parse(t, e ?? this.defaults);
2104
+ return oe.parse(t, e ?? this.defaults);
2105
2105
  }
2106
2106
  parseMarkdown(t) {
2107
2107
  return (e, n) => {
@@ -2110,16 +2110,16 @@ ${t}</tr>
2110
2110
  if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
2111
2111
  if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2112
2112
  if (r.hooks && (r.hooks.options = r, r.hooks.block = t), r.async) return (async () => {
2113
- let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer(t) : t ? ae.lex : ae.lexInline)(o, r), d = r.hooks ? await r.hooks.processAllTokens(c) : c;
2113
+ let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer(t) : t ? le.lex : le.lexInline)(o, r), d = r.hooks ? await r.hooks.processAllTokens(c) : c;
2114
2114
  r.walkTokens && await Promise.all(this.walkTokens(d, r.walkTokens));
2115
- let g = await (r.hooks ? await r.hooks.provideParser(t) : t ? le.parse : le.parseInline)(d, r);
2115
+ let g = await (r.hooks ? await r.hooks.provideParser(t) : t ? oe.parse : oe.parseInline)(d, r);
2116
2116
  return r.hooks ? await r.hooks.postprocess(g) : g;
2117
2117
  })().catch(a);
2118
2118
  try {
2119
2119
  r.hooks && (e = r.hooks.preprocess(e));
2120
- let o = (r.hooks ? r.hooks.provideLexer(t) : t ? ae.lex : ae.lexInline)(e, r);
2120
+ let o = (r.hooks ? r.hooks.provideLexer(t) : t ? le.lex : le.lexInline)(e, r);
2121
2121
  r.hooks && (o = r.hooks.processAllTokens(o)), r.walkTokens && this.walkTokens(o, r.walkTokens);
2122
- let c = (r.hooks ? r.hooks.provideParser(t) : t ? le.parse : le.parseInline)(o, r);
2122
+ let c = (r.hooks ? r.hooks.provideParser(t) : t ? oe.parse : oe.parseInline)(o, r);
2123
2123
  return r.hooks && (c = r.hooks.postprocess(c)), c;
2124
2124
  } catch (o) {
2125
2125
  return a(o);
@@ -2130,7 +2130,7 @@ ${t}</tr>
2130
2130
  return (n) => {
2131
2131
  if (n.message += `
2132
2132
  Please report this to https://github.com/markedjs/marked.`, t) {
2133
- let s = "<p>An error occurred:</p><pre>" + he(n.message + "", !0) + "</pre>";
2133
+ let s = "<p>An error occurred:</p><pre>" + pe(n.message + "", !0) + "</pre>";
2134
2134
  return e ? Promise.resolve(s) : s;
2135
2135
  }
2136
2136
  if (e) return Promise.reject(n);
@@ -2138,38 +2138,38 @@ Please report this to https://github.com/markedjs/marked.`, t) {
2138
2138
  };
2139
2139
  }
2140
2140
  }, h(Fe, "D"), Fe), Ce = new Vr();
2141
- function M(l, t) {
2141
+ function L(l, t) {
2142
2142
  return Ce.parse(l, t);
2143
2143
  }
2144
- h(M, "g");
2145
- M.options = M.setOptions = function(l) {
2146
- return Ce.setOptions(l), M.defaults = Ce.defaults, ss(M.defaults), M;
2144
+ h(L, "g");
2145
+ L.options = L.setOptions = function(l) {
2146
+ return Ce.setOptions(l), L.defaults = Ce.defaults, ss(L.defaults), L;
2147
2147
  };
2148
- M.getDefaults = Jt;
2149
- M.defaults = Ie;
2150
- M.use = function(...l) {
2151
- return Ce.use(...l), M.defaults = Ce.defaults, ss(M.defaults), M;
2148
+ L.getDefaults = Jt;
2149
+ L.defaults = Ie;
2150
+ L.use = function(...l) {
2151
+ return Ce.use(...l), L.defaults = Ce.defaults, ss(L.defaults), L;
2152
2152
  };
2153
- M.walkTokens = function(l, t) {
2153
+ L.walkTokens = function(l, t) {
2154
2154
  return Ce.walkTokens(l, t);
2155
2155
  };
2156
- M.parseInline = Ce.parseInline;
2157
- M.Parser = le;
2158
- M.parser = le.parse;
2159
- M.Renderer = yt;
2160
- M.TextRenderer = on;
2161
- M.Lexer = ae;
2162
- M.lexer = ae.lex;
2163
- M.Tokenizer = vt;
2164
- M.Hooks = tt;
2165
- M.parse = M;
2166
- M.options;
2167
- M.setOptions;
2168
- M.use;
2169
- M.walkTokens;
2170
- M.parseInline;
2171
- le.parse;
2172
- ae.lex;
2156
+ L.parseInline = Ce.parseInline;
2157
+ L.Parser = oe;
2158
+ L.parser = oe.parse;
2159
+ L.Renderer = yt;
2160
+ L.TextRenderer = on;
2161
+ L.Lexer = le;
2162
+ L.lexer = le.lex;
2163
+ L.Tokenizer = vt;
2164
+ L.Hooks = tt;
2165
+ L.parse = L;
2166
+ L.options;
2167
+ L.setOptions;
2168
+ L.use;
2169
+ L.walkTokens;
2170
+ L.parseInline;
2171
+ oe.parse;
2172
+ le.lex;
2173
2173
  const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2174
2174
  key: 0,
2175
2175
  class: "pb-4"
@@ -2210,12 +2210,12 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2210
2210
  emptyStateMessage: {}
2211
2211
  },
2212
2212
  setup(l) {
2213
- const t = new M.Renderer();
2214
- t.link = ({ href: b, text: w }) => `<a href="${b}" target="_blank" rel="noopener noreferrer">${w}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2215
- function e(b) {
2216
- if (!b)
2213
+ const t = new L.Renderer();
2214
+ t.link = ({ href: k, text: w }) => `<a href="${k}" target="_blank" rel="noopener noreferrer">${w}</a>`, L.setOptions({ breaks: !0, gfm: !0, renderer: t });
2215
+ function e(k) {
2216
+ if (!k)
2217
2217
  return "";
2218
- const w = M.parse(b, { async: !1 });
2218
+ const w = L.parse(k, { async: !1 });
2219
2219
  return ar.sanitize(w, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2220
2220
  }
2221
2221
  h(e, "renderMarkdown");
@@ -2228,40 +2228,40 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2228
2228
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2229
2229
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2230
2230
  }, r = F(() => l.setupHint ?? n[l.scope]), a = F(() => {
2231
- const b = { ...s[l.scope] };
2232
- return l.scope === "org" && l.scopeName && (b.label = l.scopeName, b.tooltip = `Visible to ${l.scopeName} members`), b;
2231
+ const k = { ...s[l.scope] };
2232
+ return l.scope === "org" && l.scopeName && (k.label = l.scopeName, k.tooltip = `Visible to ${l.scopeName} members`), k;
2233
2233
  }), o = V(""), c = V(!1), d = V(), g = V(), p = V(), f = V([]), m = V(!1);
2234
- function y(b, w) {
2235
- const k = b[w], O = b[w + 1];
2236
- return !O || O.sender !== k.sender;
2234
+ function y(k, w) {
2235
+ const b = k[w], O = k[w + 1];
2236
+ return !O || O.sender !== b.sender;
2237
2237
  }
2238
2238
  h(y, "shouldShowAvatar");
2239
- const S = F(() => l.chatController?.textState.value), z = F(() => S.value?.isConnected ?? !1), de = F(() => S.value?.isThinking ?? !1), me = F(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), ne = F(() => S.value?.connectionStatus !== "connected" && !S.value?.error), $ = F(() => S.value?.error), j = F(() => l.chatController?.sharedMessages.value?.filter((b) => b.sender !== "system") ?? []), se = F(() => !z.value), fe = F(() => me.value ? "Agent is offline" : ne.value ? "Connecting..." : "Message"), rt = F(() => (o.value.trim() || f.value.length > 0) && !se.value && !m.value), L = F(() => l.variant === "light"), it = F(
2240
- () => L.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2241
- ), U = F(() => L.value ? "text-theme-300" : "text-white/30");
2239
+ const E = F(() => l.chatController?.textState.value), z = F(() => E.value?.isConnected ?? !1), de = F(() => E.value?.isThinking ?? !1), me = F(() => E.value?.connectionStatus === "disconnected" && !!E.value?.error), ne = F(() => E.value?.connectionStatus !== "connected" && !E.value?.error), $ = F(() => E.value?.error), j = F(() => l.chatController?.sharedMessages.value ?? []), se = F(() => !z.value), fe = F(() => me.value ? "Agent is offline" : ne.value ? "Connecting..." : "Message"), rt = F(() => (o.value.trim() || f.value.length > 0) && !se.value && !m.value), M = F(() => l.variant === "light"), it = F(
2240
+ () => M.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2241
+ ), U = F(() => M.value ? "text-theme-300" : "text-white/30");
2242
2242
  Qt(async () => {
2243
2243
  if (l.chatController && !z.value)
2244
2244
  try {
2245
2245
  await l.chatController.startTextConversation();
2246
- } catch (b) {
2247
- console.error("Failed to start text conversation:", b);
2246
+ } catch (k) {
2247
+ console.error("Failed to start text conversation:", k);
2248
2248
  }
2249
2249
  });
2250
2250
  async function ve() {
2251
- const b = o.value.trim(), w = f.value.length > 0;
2252
- if (!b && !w || !l.chatController || !z.value || m.value)
2251
+ const k = o.value.trim(), w = f.value.length > 0;
2252
+ if (!k && !w || !l.chatController || !z.value || m.value)
2253
2253
  return;
2254
- const k = o.value, O = w ? [...f.value] : void 0;
2254
+ const b = o.value, O = w ? [...f.value] : void 0;
2255
2255
  o.value = "", f.value = [], g.value && (g.value.style.height = "auto", g.value.focus());
2256
2256
  try {
2257
- await l.chatController.sendChatMessage(k, O), ye();
2257
+ await l.chatController.sendChatMessage(b, O), ye();
2258
2258
  } catch (C) {
2259
2259
  console.error("Error sending message:", C);
2260
2260
  }
2261
2261
  }
2262
2262
  h(ve, "sendMessage");
2263
- function Me(b) {
2264
- b.key === "Enter" && !b.shiftKey && (b.preventDefault(), ve());
2263
+ function Me(k) {
2264
+ k.key === "Enter" && !k.shiftKey && (k.preventDefault(), ve());
2265
2265
  }
2266
2266
  h(Me, "handleKeydown");
2267
2267
  function ye() {
@@ -2278,12 +2278,12 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2278
2278
  p.value?.click();
2279
2279
  }
2280
2280
  h(Et, "triggerFileInput");
2281
- async function _t(b) {
2282
- const w = b.target, k = w.files?.[0];
2283
- if (!(!k || !l.uploadFn)) {
2281
+ async function _t(k) {
2282
+ const w = k.target, b = w.files?.[0];
2283
+ if (!(!b || !l.uploadFn)) {
2284
2284
  m.value = !0;
2285
2285
  try {
2286
- const O = await l.uploadFn(k);
2286
+ const O = await l.uploadFn(b);
2287
2287
  f.value = [...f.value, O];
2288
2288
  } catch (O) {
2289
2289
  console.error("Upload failed:", O);
@@ -2293,207 +2293,217 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2293
2293
  }
2294
2294
  }
2295
2295
  h(_t, "handleFileSelect");
2296
- function at(b) {
2297
- f.value = f.value.filter((w, k) => k !== b);
2296
+ function at(k) {
2297
+ f.value = f.value.filter((w, b) => b !== k);
2298
2298
  }
2299
2299
  h(at, "removeAttachment");
2300
- function lt(b, w) {
2300
+ function lt(k, w) {
2301
2301
  if (w === 0) {
2302
- const ee = b[w];
2302
+ const ee = k[w];
2303
2303
  return ee?.timestamp ? Ge(new Date(ee.timestamp)) : null;
2304
2304
  }
2305
- const k = b[w - 1], O = b[w];
2306
- if (!k?.timestamp || !O?.timestamp) return null;
2307
- const C = new Date(k.timestamp).getTime();
2305
+ const b = k[w - 1], O = k[w];
2306
+ if (!b?.timestamp || !O?.timestamp) return null;
2307
+ const C = new Date(b.timestamp).getTime();
2308
2308
  return new Date(O.timestamp).getTime() - C > 36e5 ? Ge(new Date(O.timestamp)) : null;
2309
2309
  }
2310
2310
  h(lt, "shouldShowTimeDivider");
2311
- function Ge(b) {
2312
- const w = /* @__PURE__ */ new Date(), k = b.toDateString() === w.toDateString(), O = new Date(w);
2311
+ function Ge(k) {
2312
+ const w = /* @__PURE__ */ new Date(), b = k.toDateString() === w.toDateString(), O = new Date(w);
2313
2313
  O.setDate(O.getDate() - 1);
2314
- const C = b.toDateString() === O.toDateString(), J = b.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2315
- if (k) return J;
2314
+ const C = k.toDateString() === O.toDateString(), J = k.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2315
+ if (b) return J;
2316
2316
  if (C) return `Yesterday, ${J}`;
2317
- const Te = b.getFullYear() === w.getFullYear();
2318
- return `${b.toLocaleDateString("en-US", {
2317
+ const Te = k.getFullYear() === w.getFullYear();
2318
+ return `${k.toLocaleDateString("en-US", {
2319
2319
  weekday: "long",
2320
2320
  month: "short",
2321
2321
  day: "numeric",
2322
2322
  ...Te ? {} : { year: "numeric" }
2323
2323
  })}, ${J}`;
2324
2324
  }
2325
- return h(Ge, "formatTimeDivider"), nt(j, (b) => {
2326
- b.length > 0 && Bt(() => ye());
2327
- }, { immediate: !0, deep: !0 }), (b, w) => (A(), E("div", Yr, [
2328
- L.value ? G("", !0) : (A(), E("div", Zr, [
2325
+ return h(Ge, "formatTimeDivider"), nt(j, (k) => {
2326
+ k.length > 0 && Bt(() => ye());
2327
+ }, { immediate: !0, deep: !0 }), (k, w) => (S(), A("div", Yr, [
2328
+ M.value ? G("", !0) : (S(), A("div", Zr, [
2329
2329
  Ft($s, {
2330
2330
  agent: l.agent,
2331
2331
  "is-online": z.value
2332
2332
  }, null, 8, ["agent", "is-online"])
2333
2333
  ])),
2334
- me.value ? (A(), E("div", {
2334
+ me.value ? (S(), A("div", {
2335
2335
  key: 1,
2336
- class: _(["py-16 flex flex-col items-center justify-center gap-3 text-sm", L.value ? "text-theme-400" : "text-white/60"])
2336
+ class: _(["py-16 flex flex-col items-center justify-center gap-3 text-sm", M.value ? "text-theme-400" : "text-white/60"])
2337
2337
  }, [
2338
2338
  T("i", {
2339
- class: _(["i-heroicons-cloud-arrow-down size-8", L.value ? "text-theme-300" : "text-white/40"])
2339
+ class: _(["i-heroicons-cloud-arrow-down size-8", M.value ? "text-theme-300" : "text-white/40"])
2340
2340
  }, null, 2),
2341
- T("span", null, pe($.value), 1)
2342
- ], 2)) : ne.value ? (A(), E("div", {
2341
+ T("span", null, ie($.value), 1)
2342
+ ], 2)) : ne.value ? (S(), A("div", {
2343
2343
  key: 2,
2344
- class: _(["py-16 flex flex-col items-center justify-center gap-2 text-sm", L.value ? "text-theme-400" : "text-theme-600"])
2344
+ class: _(["py-16 flex flex-col items-center justify-center gap-2 text-sm", M.value ? "text-theme-400" : "text-theme-600"])
2345
2345
  }, [
2346
2346
  Ft(In, { class: "size-4" })
2347
- ], 2)) : r.value ? (A(), E("div", {
2347
+ ], 2)) : r.value ? (S(), A("div", {
2348
2348
  key: 3,
2349
2349
  class: _(["flex items-center justify-center gap-1.5 py-2 text-[11px]", U.value])
2350
2350
  }, [
2351
2351
  w[5] || (w[5] = T("i", { class: "i-tabler-tool size-3" }, null, -1)),
2352
- T("span", null, pe(r.value), 1)
2352
+ T("span", null, ie(r.value), 1)
2353
2353
  ], 2)) : G("", !0),
2354
2354
  T("div", {
2355
2355
  ref_key: "messagesContainer",
2356
2356
  ref: d,
2357
2357
  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"
2358
2358
  }, [
2359
- j.value.length === 0 && !ne.value && !me.value ? (A(), E("div", Xr, [
2359
+ j.value.length === 0 && !ne.value && !me.value ? (S(), A("div", Xr, [
2360
2360
  T("div", Kr, [
2361
2361
  T("img", {
2362
2362
  src: l.agent.avatarUrl.value,
2363
2363
  alt: l.agent.displayName.value,
2364
- class: _(["size-full rounded-full object-cover ring-1", L.value ? "ring-black/5" : "ring-white/10"])
2364
+ class: _(["size-full rounded-full object-cover ring-1", M.value ? "ring-black/5" : "ring-white/10"])
2365
2365
  }, null, 10, Qr),
2366
- z.value ? (A(), E("span", {
2366
+ z.value ? (S(), A("span", {
2367
2367
  key: 0,
2368
- class: _(["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", L.value ? "bg-white" : "bg-theme-900"])
2368
+ class: _(["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", M.value ? "bg-white" : "bg-theme-900"])
2369
2369
  }, [...w[6] || (w[6] = [
2370
2370
  T("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2371
2371
  ])], 2)) : G("", !0)
2372
2372
  ]),
2373
2373
  T("div", {
2374
- class: _(["text-base @sm/chat:text-lg font-semibold", L.value ? "text-theme-900" : "text-white"])
2375
- }, pe(l.agent.displayName.value), 3),
2374
+ class: _(["text-base @sm/chat:text-lg font-semibold", M.value ? "text-theme-900" : "text-white"])
2375
+ }, ie(l.agent.displayName.value), 3),
2376
2376
  T("p", {
2377
2377
  class: _(["mt-1 text-center text-xs @sm/chat:text-sm", U.value])
2378
- }, pe(l.emptyStateMessage || "Send a message to get started"), 3),
2378
+ }, ie(l.emptyStateMessage || "Send a message to get started"), 3),
2379
2379
  T("div", {
2380
- class: _(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", L.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2380
+ class: _(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", M.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2381
2381
  title: a.value.tooltip
2382
2382
  }, [
2383
2383
  T("i", {
2384
2384
  class: _([a.value.icon, "size-3"])
2385
2385
  }, null, 2),
2386
- T("span", null, pe(a.value.label), 1)
2386
+ T("span", null, ie(a.value.label), 1)
2387
2387
  ], 10, Jr)
2388
2388
  ])) : G("", !0),
2389
- (A(!0), E(_e, null, xt(j.value, (k, O) => (A(), E(_e, {
2390
- key: k.id
2389
+ (S(!0), A(_e, null, xt(j.value, (b, O) => (S(), A(_e, {
2390
+ key: b.id
2391
2391
  }, [
2392
- lt(j.value, O) ? (A(), E("div", ei, [
2392
+ lt(j.value, O) ? (S(), A("div", ei, [
2393
2393
  T("div", {
2394
2394
  class: _(["flex-1 h-px", it.value])
2395
2395
  }, null, 2),
2396
2396
  T("span", {
2397
2397
  class: _(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", U.value])
2398
- }, pe(lt(j.value, O)), 3),
2398
+ }, ie(lt(j.value, O)), 3),
2399
2399
  T("div", {
2400
2400
  class: _(["flex-1 h-px", it.value])
2401
2401
  }, null, 2)
2402
2402
  ])) : G("", !0),
2403
- T("div", {
2404
- "data-test": k.sender === "agent" ? "messaging-assistant-msg" : k.sender === "user" ? "messaging-user-msg" : void 0,
2403
+ b.sender === "system" ? (S(), A("div", {
2404
+ key: 1,
2405
+ "data-test": "messaging-system-msg",
2406
+ class: _(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", M.value ? "text-theme-500" : "text-white/70"])
2407
+ }, [
2408
+ T("i", {
2409
+ class: _(["i-tabler-alert-circle size-4 mt-0.5 shrink-0", M.value ? "text-red-500" : "text-red-300"])
2410
+ }, null, 2),
2411
+ T("span", null, ie(b.text), 1)
2412
+ ], 2)) : (S(), A("div", {
2413
+ key: 2,
2414
+ "data-test": b.sender === "agent" ? "messaging-assistant-msg" : b.sender === "user" ? "messaging-user-msg" : void 0,
2405
2415
  class: _(["flex gap-2 items-end", {
2406
- "justify-end": k.sender === "user",
2407
- "justify-start": k.sender === "agent",
2416
+ "justify-end": b.sender === "user",
2417
+ "justify-start": b.sender === "agent",
2408
2418
  "mb-4": y(j.value, O)
2409
2419
  }])
2410
2420
  }, [
2411
- k.sender === "agent" ? (A(), E("div", ni, [
2412
- y(j.value, O) ? (A(), E("img", {
2421
+ b.sender === "agent" ? (S(), A("div", ni, [
2422
+ y(j.value, O) ? (S(), A("img", {
2413
2423
  key: 0,
2414
2424
  src: l.agent.avatarUrl.value,
2415
2425
  alt: l.agent.displayName.value,
2416
- class: _(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", L.value ? "ring-1 ring-black/5" : ""])
2426
+ class: _(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", M.value ? "ring-1 ring-black/5" : ""])
2417
2427
  }, null, 10, si)) : G("", !0)
2418
2428
  ])) : G("", !0),
2419
2429
  T("div", {
2420
- class: _(k.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2430
+ class: _(b.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2421
2431
  }, [
2422
- k.attachments?.length ? (A(), E("div", {
2432
+ b.attachments?.length ? (S(), A("div", {
2423
2433
  key: 0,
2424
- class: _(["mb-1 space-y-1", k.sender === "user" ? "flex flex-col items-end" : ""])
2434
+ class: _(["mb-1 space-y-1", b.sender === "user" ? "flex flex-col items-end" : ""])
2425
2435
  }, [
2426
- (A(!0), E(_e, null, xt(k.attachments, (C, J) => (A(), E(_e, { key: J }, [
2427
- C.type === "image" ? (A(), E("img", {
2436
+ (S(!0), A(_e, null, xt(b.attachments, (C, J) => (S(), A(_e, { key: J }, [
2437
+ C.type === "image" ? (S(), A("img", {
2428
2438
  key: 0,
2429
2439
  src: C.url,
2430
2440
  alt: C.name,
2431
2441
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2432
- }, null, 8, ri)) : C.type === "audio" ? (A(), E("audio", {
2442
+ }, null, 8, ri)) : C.type === "audio" ? (S(), A("audio", {
2433
2443
  key: 1,
2434
2444
  src: C.url,
2435
2445
  controls: "",
2436
2446
  class: "max-w-full"
2437
- }, null, 8, ii)) : (A(), E("a", {
2447
+ }, null, 8, ii)) : (S(), A("a", {
2438
2448
  key: 2,
2439
2449
  href: C.url,
2440
2450
  target: "_blank",
2441
2451
  rel: "noopener",
2442
- class: _(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", L.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2452
+ class: _(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", M.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2443
2453
  }, [
2444
2454
  w[7] || (w[7] = T("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2445
- ft(" " + pe(C.name), 1)
2455
+ ft(" " + ie(C.name), 1)
2446
2456
  ], 10, ai))
2447
2457
  ], 64))), 128))
2448
2458
  ], 2)) : G("", !0),
2449
- k.text ? (A(), E("div", {
2459
+ b.text ? (S(), A("div", {
2450
2460
  key: 1,
2451
2461
  class: _(["rounded-2xl px-3.5 py-2", [
2452
- k.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : L.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]"
2462
+ b.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : M.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]"
2453
2463
  ]])
2454
2464
  }, [
2455
2465
  T("div", {
2456
- class: _(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", k.sender === "user" || !L.value ? "chat-msg-prose-invert" : ""]),
2457
- innerHTML: e(k.text)
2466
+ class: _(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", b.sender === "user" || !M.value ? "chat-msg-prose-invert" : ""]),
2467
+ innerHTML: e(b.text)
2458
2468
  }, null, 10, li)
2459
2469
  ], 2)) : G("", !0)
2460
2470
  ], 2)
2461
- ], 10, ti)
2471
+ ], 10, ti))
2462
2472
  ], 64))), 128)),
2463
- de.value ? (A(), E("div", oi, [
2473
+ de.value ? (S(), A("div", oi, [
2464
2474
  T("img", {
2465
2475
  src: l.agent.avatarUrl.value,
2466
2476
  alt: l.agent.displayName.value,
2467
- class: _(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", L.value ? "ring-1 ring-black/5" : ""])
2477
+ class: _(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", M.value ? "ring-1 ring-black/5" : ""])
2468
2478
  }, null, 10, ci),
2469
2479
  T("div", {
2470
- class: _(["rounded-2xl px-3.5 py-2.5 flex items-center", L.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2480
+ class: _(["rounded-2xl px-3.5 py-2.5 flex items-center", M.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2471
2481
  }, [
2472
2482
  T("i", {
2473
- class: _(["i-svg-spinners-3-dots-bounce size-7", L.value ? "text-theme-400" : "text-white/50"])
2483
+ class: _(["i-svg-spinners-3-dots-bounce size-7", M.value ? "text-theme-400" : "text-white/50"])
2474
2484
  }, null, 2)
2475
2485
  ], 2)
2476
2486
  ])) : G("", !0)
2477
2487
  ], 512),
2478
2488
  T("div", {
2479
- class: _(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", L.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"])
2489
+ class: _(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", M.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"])
2480
2490
  }, [
2481
- f.value.length > 0 ? (A(), E("div", ui, [
2482
- (A(!0), E(_e, null, xt(f.value, (k, O) => (A(), E("div", {
2491
+ f.value.length > 0 ? (S(), A("div", ui, [
2492
+ (S(!0), A(_e, null, xt(f.value, (b, O) => (S(), A("div", {
2483
2493
  key: O,
2484
2494
  class: "relative shrink-0 group"
2485
2495
  }, [
2486
- k.type === "image" ? (A(), E("img", {
2496
+ b.type === "image" ? (S(), A("img", {
2487
2497
  key: 0,
2488
- src: k.url,
2489
- alt: k.name,
2490
- class: _(["size-14 rounded-xl object-cover border", L.value ? "border-black/10" : "border-white/20"])
2491
- }, null, 10, hi)) : (A(), E("div", {
2498
+ src: b.url,
2499
+ alt: b.name,
2500
+ class: _(["size-14 rounded-xl object-cover border", M.value ? "border-black/10" : "border-white/20"])
2501
+ }, null, 10, hi)) : (S(), A("div", {
2492
2502
  key: 1,
2493
- class: _(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", L.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2503
+ class: _(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", M.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2494
2504
  }, [
2495
2505
  w[8] || (w[8] = T("i", { class: "i-tabler-file size-4" }, null, -1)),
2496
- T("span", pi, pe(k.name), 1)
2506
+ T("span", pi, ie(b.name), 1)
2497
2507
  ], 2)),
2498
2508
  T("button", {
2499
2509
  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",
@@ -2502,11 +2512,11 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2502
2512
  T("i", { class: "i-tabler-x size-3" }, null, -1)
2503
2513
  ])], 8, di)
2504
2514
  ]))), 128)),
2505
- m.value ? (A(), E("div", fi, [
2515
+ m.value ? (S(), A("div", fi, [
2506
2516
  Ft(In, { class: "size-5" })
2507
2517
  ])) : G("", !0)
2508
2518
  ])) : G("", !0),
2509
- l.uploadFn ? (A(), E("input", {
2519
+ l.uploadFn ? (S(), A("input", {
2510
2520
  key: 1,
2511
2521
  ref_key: "fileInput",
2512
2522
  ref: p,
@@ -2516,55 +2526,55 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2516
2526
  onChange: _t
2517
2527
  }, null, 544)) : G("", !0),
2518
2528
  T("div", {
2519
- class: _(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", L.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"])
2529
+ class: _(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-all duration-300", M.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"])
2520
2530
  }, [
2521
2531
  T("button", {
2522
2532
  class: _(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2523
2533
  l.uploadFn ? "cursor-pointer" : "cursor-default",
2524
- L.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2534
+ M.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2525
2535
  m.value ? "opacity-50 pointer-events-none" : ""
2526
2536
  ]]),
2527
2537
  disabled: se.value || m.value || !l.uploadFn,
2528
- onClick: w[0] || (w[0] = (k) => l.uploadFn && Et())
2538
+ onClick: w[0] || (w[0] = (b) => l.uploadFn && Et())
2529
2539
  }, [
2530
- m.value ? (A(), E("i", mi)) : (A(), E("i", xi))
2540
+ m.value ? (S(), A("i", mi)) : (S(), A("i", xi))
2531
2541
  ], 10, gi),
2532
2542
  Xn(T("textarea", {
2533
2543
  ref_key: "textarea",
2534
2544
  ref: g,
2535
- "onUpdate:modelValue": w[1] || (w[1] = (k) => o.value = k),
2545
+ "onUpdate:modelValue": w[1] || (w[1] = (b) => o.value = b),
2536
2546
  "data-test": "messaging-input",
2537
2547
  rows: "1",
2538
2548
  enterkeyhint: "send",
2539
2549
  placeholder: fe.value,
2540
2550
  disabled: se.value,
2541
2551
  style: { fontSize: "16px", resize: "none" },
2542
- class: _(["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", L.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2552
+ class: _(["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", M.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2543
2553
  onKeydown: Me,
2544
- onFocus: w[2] || (w[2] = (k) => c.value = !0),
2545
- onBlur: w[3] || (w[3] = (k) => c.value = !1)
2554
+ onFocus: w[2] || (w[2] = (b) => c.value = !0),
2555
+ onBlur: w[3] || (w[3] = (b) => c.value = !1)
2546
2556
  }, null, 42, bi), [
2547
2557
  [Kn, o.value]
2548
2558
  ]),
2549
2559
  T("button", {
2550
2560
  "data-test": "messaging-send-btn",
2551
- class: _(["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", rt.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : L.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2561
+ class: _(["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", rt.value ? "bg-primary-500 text-white shadow-md hover:scale-105 active:scale-95 cursor-pointer" : M.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2552
2562
  disabled: !rt.value,
2553
- onClick: w[4] || (w[4] = (k) => ve())
2563
+ onClick: w[4] || (w[4] = (b) => ve())
2554
2564
  }, [...w[10] || (w[10] = [
2555
2565
  T("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2556
2566
  ])], 10, ki)
2557
2567
  ], 2),
2558
2568
  T("div", {
2559
- class: _(["text-[10px] text-center mt-2.5 select-none opacity-70", L.value ? "text-theme-400" : "text-white/50"])
2569
+ class: _(["text-[10px] text-center mt-2.5 select-none opacity-70", M.value ? "text-theme-400" : "text-white/50"])
2560
2570
  }, [
2561
2571
  w[11] || (w[11] = ft(" Press ", -1)),
2562
2572
  T("kbd", {
2563
- class: _(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", L.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2573
+ class: _(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", M.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2564
2574
  }, "Enter", 2),
2565
2575
  w[12] || (w[12] = ft(" to send, ", -1)),
2566
2576
  T("kbd", {
2567
- class: _(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", L.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2577
+ class: _(["font-sans px-1.5 py-0.5 rounded-md text-[10px]", M.value ? "bg-black/[0.04] border border-black/[0.05]" : "bg-white/10 border border-white/15"])
2568
2578
  }, "Shift+Enter", 2),
2569
2579
  w[13] || (w[13] = ft(" for new line ", -1))
2570
2580
  ], 2)
@@ -2668,8 +2678,8 @@ const Yr = { class: "@container/chat flex flex-col h-full relative" }, Zr = {
2668
2678
  }
2669
2679
  });
2670
2680
  }
2671
- }), (o, c) => (A(), E("div", wi, [
2672
- s.value ? (A(), E("div", vi, [...c[0] || (c[0] = [
2681
+ }), (o, c) => (S(), A("div", wi, [
2682
+ s.value ? (S(), A("div", vi, [...c[0] || (c[0] = [
2673
2683
  T("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2674
2684
  ])])) : r.value ? Zn(o.$slots, "default", {
2675
2685
  key: 1,