@pagelines/sdk 1.0.358 → 1.0.360

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 En = Object.defineProperty;
2
2
  var ks = (l, t, e) => t in l ? En(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
3
  var h = (l, t) => En(l, "name", { value: t, configurable: !0 });
4
4
  var _ = (l, t, e) => ks(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as xt, openBlock as A, createElementBlock as E, createElementVNode as w, normalizeClass as v, ref as ne, watch as Wt, unref as jt, Fragment as Le, toDisplayString as ce, computed as Q, onMounted as jn, nextTick as zt, createVNode as Nt, createCommentVNode as q, renderList as Pt, createTextVNode as xs, withDirectives as bs, normalizeStyle as ws, vModelText as ys, shallowRef as Ts, renderSlot as vs } from "vue";
5
+ import { defineComponent as xt, openBlock as A, createElementBlock as E, createElementVNode as w, normalizeClass as T, ref as ne, watch as Wt, unref as jt, Fragment as Le, toDisplayString as ce, computed as Q, onMounted as jn, nextTick as zt, createVNode as Nt, createCommentVNode as q, renderList as Pt, createTextVNode as xs, withDirectives as bs, normalizeStyle as ws, vModelText as ys, shallowRef as vs, renderSlot as Ts } from "vue";
6
6
  import { SettingsObject as Ss, Agent as dt, getDefaultAvatarUrl as qn, createLogger as As } from "@pagelines/core";
7
7
  import { P as Es } from "./sdkClient-6j3pmwVP.js";
8
8
  const _s = { class: "spinner max-w-sm" }, Rs = {
@@ -18,7 +18,7 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
18
18
  return (t, e) => (A(), E("div", _s, [
19
19
  (A(), E("svg", Rs, [
20
20
  w("circle", {
21
- class: v([l.colorMode, "ring-path"]),
21
+ class: T([l.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -259,13 +259,13 @@ const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Ms = { clas
259
259
  },
260
260
  setup(l) {
261
261
  return (t, e) => (A(), E("div", {
262
- class: v(["flex gap-4", [
262
+ class: T(["flex gap-4", [
263
263
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
264
264
  ]])
265
265
  }, [
266
266
  w("div", Ds, [
267
267
  w("div", {
268
- class: v(["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"])
268
+ class: T(["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"])
269
269
  }, [
270
270
  w("img", {
271
271
  src: l.agent.avatarUrl.value,
@@ -287,13 +287,13 @@ const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Ms = { clas
287
287
  ]),
288
288
  w("div", Ls, [
289
289
  w("h1", {
290
- class: v(["font-light text-white mb-1 truncate", [
290
+ class: T(["font-light text-white mb-1 truncate", [
291
291
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
292
292
  l.layout === "horizontal" ? "text-white/95" : ""
293
293
  ]])
294
294
  }, ce(l.agent.displayName.value), 3),
295
295
  w("p", {
296
- class: v(["font-light line-clamp-1", [
296
+ class: T(["font-light line-clamp-1", [
297
297
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
298
298
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
299
299
  ]])
@@ -495,14 +495,14 @@ function Vn() {
495
495
  MUSTACHE_EXPR: $e,
496
496
  ERB_EXPR: I,
497
497
  TMPLIT_EXPR: Ue,
498
- DATA_ATTR: Tt,
499
- ARIA_ATTR: vt,
498
+ DATA_ATTR: vt,
499
+ ARIA_ATTR: Tt,
500
500
  IS_SCRIPT_OR_DATA: et,
501
501
  ATTR_WHITESPACE: Be,
502
502
  CUSTOM_ELEMENT: y
503
503
  } = Pn;
504
504
  let {
505
- IS_ALLOWED_URI: T
505
+ IS_ALLOWED_URI: v
506
506
  } = Pn, x = null;
507
507
  const L = S({}, [...Ln, ...Bt, ...Ft, ...Ht, ...On]);
508
508
  let C = null;
@@ -562,7 +562,7 @@ function Vn() {
562
562
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
563
563
  if (!(Me && Me === i)) {
564
564
  if ((!i || typeof i != "object") && (i = {}), i = le(i), He = // eslint-disable-next-line unicorn/prefer-includes
565
- ps.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? fs : i.PARSER_MEDIA_TYPE, U = He === "application/xhtml+xml" ? $t : ft, x = K(i, "ALLOWED_TAGS") ? S({}, i.ALLOWED_TAGS, U) : L, C = K(i, "ALLOWED_ATTR") ? S({}, i.ALLOWED_ATTR, U) : he, Mt = K(i, "ALLOWED_NAMESPACES") ? S({}, i.ALLOWED_NAMESPACES, $t) : us, Dt = K(i, "ADD_URI_SAFE_ATTR") ? S(le(fn), i.ADD_URI_SAFE_ATTR, U) : fn, hn = K(i, "ADD_DATA_URI_TAGS") ? S(le(pn), i.ADD_DATA_URI_TAGS, U) : pn, ie = K(i, "FORBID_CONTENTS") ? S({}, i.FORBID_CONTENTS, U) : Rt, pe = K(i, "FORBID_TAGS") ? S({}, i.FORBID_TAGS, U) : le({}), tt = K(i, "FORBID_ATTR") ? S({}, i.FORBID_ATTR, U) : le({}), De = K(i, "USE_PROFILES") ? i.USE_PROFILES : !1, an = i.ALLOW_ARIA_ATTR !== !1, St = i.ALLOW_DATA_ATTR !== !1, ln = i.ALLOW_UNKNOWN_PROTOCOLS || !1, on = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Re = i.RETURN_DOM || !1, st = i.RETURN_DOM_FRAGMENT || !1, rt = i.RETURN_TRUSTED_TYPE || !1, Et = i.FORCE_BODY || !1, cn = i.SANITIZE_DOM !== !1, un = i.SANITIZE_NAMED_PROPS || !1, _t = i.KEEP_CONTENT !== !1, Fe = i.IN_PLACE || !1, T = i.ALLOWED_URI_REGEXP || Zn, Ce = i.NAMESPACE || fe, lt = i.MATHML_TEXT_INTEGRATION_POINTS || lt, ot = i.HTML_INTEGRATION_POINTS || ot, z = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), _e && (St = !1), st && (Re = !0), De && (x = S({}, On), C = pt(null), De.html === !0 && (S(x, Ln), S(C, zn)), De.svg === !0 && (S(x, Bt), S(C, Gt), S(C, ut)), De.svgFilters === !0 && (S(x, Ft), S(C, Gt), S(C, ut)), De.mathMl === !0 && (S(x, Ht), S(C, Nn), S(C, ut))), K(i, "ADD_TAGS") || (ke.tagCheck = null), K(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (x === L && (x = le(x)), S(x, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (C === he && (C = le(C)), S(C, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && S(Dt, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.ADD_FORBID_CONTENTS, U)), _t && (x["#text"] = !0), ye && S(x, ["html", "head", "body"]), x.table && (S(x, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
565
+ ps.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? fs : i.PARSER_MEDIA_TYPE, U = He === "application/xhtml+xml" ? $t : ft, x = K(i, "ALLOWED_TAGS") ? S({}, i.ALLOWED_TAGS, U) : L, C = K(i, "ALLOWED_ATTR") ? S({}, i.ALLOWED_ATTR, U) : he, Mt = K(i, "ALLOWED_NAMESPACES") ? S({}, i.ALLOWED_NAMESPACES, $t) : us, Dt = K(i, "ADD_URI_SAFE_ATTR") ? S(le(fn), i.ADD_URI_SAFE_ATTR, U) : fn, hn = K(i, "ADD_DATA_URI_TAGS") ? S(le(pn), i.ADD_DATA_URI_TAGS, U) : pn, ie = K(i, "FORBID_CONTENTS") ? S({}, i.FORBID_CONTENTS, U) : Rt, pe = K(i, "FORBID_TAGS") ? S({}, i.FORBID_TAGS, U) : le({}), tt = K(i, "FORBID_ATTR") ? S({}, i.FORBID_ATTR, U) : le({}), De = K(i, "USE_PROFILES") ? i.USE_PROFILES : !1, an = i.ALLOW_ARIA_ATTR !== !1, St = i.ALLOW_DATA_ATTR !== !1, ln = i.ALLOW_UNKNOWN_PROTOCOLS || !1, on = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Re = i.RETURN_DOM || !1, st = i.RETURN_DOM_FRAGMENT || !1, rt = i.RETURN_TRUSTED_TYPE || !1, Et = i.FORCE_BODY || !1, cn = i.SANITIZE_DOM !== !1, un = i.SANITIZE_NAMED_PROPS || !1, _t = i.KEEP_CONTENT !== !1, Fe = i.IN_PLACE || !1, v = i.ALLOWED_URI_REGEXP || Zn, Ce = i.NAMESPACE || fe, lt = i.MATHML_TEXT_INTEGRATION_POINTS || lt, ot = i.HTML_INTEGRATION_POINTS || ot, z = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), _e && (St = !1), st && (Re = !0), De && (x = S({}, On), C = pt(null), De.html === !0 && (S(x, Ln), S(C, zn)), De.svg === !0 && (S(x, Bt), S(C, Gt), S(C, ut)), De.svgFilters === !0 && (S(x, Ft), S(C, Gt), S(C, ut)), De.mathMl === !0 && (S(x, Ht), S(C, Nn), S(C, ut))), K(i, "ADD_TAGS") || (ke.tagCheck = null), K(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (x === L && (x = le(x)), S(x, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (C === he && (C = le(C)), S(C, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && S(Dt, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.ADD_FORBID_CONTENTS, U)), _t && (x["#text"] = !0), ye && S(x, ["html", "head", "body"]), x.table && (S(x, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
566
566
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
567
567
  throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
568
568
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -589,7 +589,7 @@ function Vn() {
589
589
  } catch {
590
590
  F(i);
591
591
  }
592
- }, "_forceRemove"), Te = /* @__PURE__ */ h(function(i, u) {
592
+ }, "_forceRemove"), ve = /* @__PURE__ */ h(function(i, u) {
593
593
  try {
594
594
  Ge(t.removed, {
595
595
  attribute: u.getAttributeNode(i),
@@ -666,7 +666,7 @@ function Vn() {
666
666
  }), nt && i.hasChildNodes() && !bn(i.firstElementChild) && j(/<[/\w!]/g, i.innerHTML) && j(/<[/\w!]/g, i.textContent) || i.nodeType === Ye.progressingInstruction || nt && i.nodeType === Ye.comment && j(/<[/\w]/g, i.data))
667
667
  return ae(i), !0;
668
668
  if (!(ke.tagCheck instanceof Function && ke.tagCheck(g)) && (!x[g] || pe[g])) {
669
- if (!pe[g] && Tn(g) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
669
+ if (!pe[g] && vn(g) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
670
670
  return !1;
671
671
  if (_t && !ie[g]) {
672
672
  const N = ee(i) || i.parentNode, G = me(i) || i.childNodes;
@@ -688,20 +688,20 @@ function Vn() {
688
688
  }, "_sanitizeElements"), yn = /* @__PURE__ */ h(function(i, u, g) {
689
689
  if (tt[u] || cn && (u === "id" || u === "name") && (g in e || g in ds))
690
690
  return !1;
691
- if (!(St && !tt[u] && j(Tt, u))) {
692
- if (!(an && j(vt, u))) {
691
+ if (!(St && !tt[u] && j(vt, u))) {
692
+ if (!(an && j(Tt, u))) {
693
693
  if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(u, i))) {
694
694
  if (!C[u] || tt[u]) {
695
695
  if (
696
696
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
697
697
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
698
698
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
699
- !(Tn(i) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, i) || z.tagNameCheck instanceof Function && z.tagNameCheck(i)) && (z.attributeNameCheck instanceof RegExp && j(z.attributeNameCheck, u) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
699
+ !(vn(i) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, i) || z.tagNameCheck instanceof Function && z.tagNameCheck(i)) && (z.attributeNameCheck instanceof RegExp && j(z.attributeNameCheck, u) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
700
700
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
701
701
  u === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
702
702
  ) return !1;
703
703
  } else if (!Dt[u]) {
704
- if (!j(T, We(g, Be, ""))) {
704
+ if (!j(v, We(g, Be, ""))) {
705
705
  if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Bs(g, "data:") === 0 && hn[i])) {
706
706
  if (!(ln && !j(et, We(g, Be, "")))) {
707
707
  if (g)
@@ -714,9 +714,9 @@ function Vn() {
714
714
  }
715
715
  }
716
716
  return !0;
717
- }, "_isValidAttribute"), Tn = /* @__PURE__ */ h(function(i) {
717
+ }, "_isValidAttribute"), vn = /* @__PURE__ */ h(function(i) {
718
718
  return i !== "annotation-xml" && Ut(i, y);
719
- }, "_isBasicCustomElement"), vn = /* @__PURE__ */ h(function(i) {
719
+ }, "_isBasicCustomElement"), Tn = /* @__PURE__ */ h(function(i) {
720
720
  de(B.beforeSanitizeAttributes, i, null);
721
721
  const {
722
722
  attributes: u
@@ -738,22 +738,22 @@ function Vn() {
738
738
  value: ge
739
739
  } = G, Ie = U(P), Ot = ge;
740
740
  let H = P === "value" ? Ot : Fs(Ot);
741
- if (g.attrName = Ie, g.attrValue = H, g.keepAttr = !0, g.forceKeepAttr = void 0, de(B.uponSanitizeAttribute, i, g), H = g.attrValue, un && (Ie === "id" || Ie === "name") && (Te(P, i), H = cs + H), nt && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, H)) {
742
- Te(P, i);
741
+ if (g.attrName = Ie, g.attrValue = H, g.keepAttr = !0, g.forceKeepAttr = void 0, de(B.uponSanitizeAttribute, i, g), H = g.attrValue, un && (Ie === "id" || Ie === "name") && (ve(P, i), H = cs + H), nt && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, H)) {
742
+ ve(P, i);
743
743
  continue;
744
744
  }
745
745
  if (Ie === "attributename" && Ut(H, "href")) {
746
- Te(P, i);
746
+ ve(P, i);
747
747
  continue;
748
748
  }
749
749
  if (g.forceKeepAttr)
750
750
  continue;
751
751
  if (!g.keepAttr) {
752
- Te(P, i);
752
+ ve(P, i);
753
753
  continue;
754
754
  }
755
755
  if (!on && j(/\/>/i, H)) {
756
- Te(P, i);
756
+ ve(P, i);
757
757
  continue;
758
758
  }
759
759
  _e && ct([$e, I, Ue], (An) => {
@@ -761,7 +761,7 @@ function Vn() {
761
761
  });
762
762
  const Sn = U(i.nodeName);
763
763
  if (!yn(Sn, Ie, H)) {
764
- Te(P, i);
764
+ ve(P, i);
765
765
  continue;
766
766
  }
767
767
  if ($ && typeof b == "object" && typeof b.getAttributeType == "function" && !V)
@@ -779,7 +779,7 @@ function Vn() {
779
779
  try {
780
780
  V ? i.setAttributeNS(V, P, H) : i.setAttribute(P, H), Lt(i) ? ae(i) : In(t.removed);
781
781
  } catch {
782
- Te(P, i);
782
+ ve(P, i);
783
783
  }
784
784
  }
785
785
  de(B.afterSanitizeAttributes, i, null);
@@ -787,7 +787,7 @@ function Vn() {
787
787
  let u = null;
788
788
  const g = xn(i);
789
789
  for (de(B.beforeSanitizeShadowDOM, i, null); u = g.nextNode(); )
790
- de(B.uponSanitizeShadowNode, u, null), wn(u), vn(u), u.content instanceof r && k(u.content);
790
+ de(B.uponSanitizeShadowNode, u, null), wn(u), Tn(u), u.content instanceof r && k(u.content);
791
791
  de(B.afterSanitizeShadowDOM, i, null);
792
792
  }, "_sanitizeShadowDOM");
793
793
  return t.sanitize = function(k) {
@@ -818,7 +818,7 @@ function Vn() {
818
818
  u && Et && ae(u.firstChild);
819
819
  const P = xn(Fe ? k : u);
820
820
  for (; N = P.nextNode(); )
821
- wn(N), vn(N), N.content instanceof r && ms(N.content);
821
+ wn(N), Tn(N), N.content instanceof r && ms(N.content);
822
822
  if (Fe)
823
823
  return k;
824
824
  if (Re) {
@@ -868,7 +868,7 @@ function Qn(l) {
868
868
  Ae = l;
869
869
  }
870
870
  h(Qn, "G");
871
- var ve = { exec: /* @__PURE__ */ h(() => null, "exec") };
871
+ var Te = { exec: /* @__PURE__ */ h(() => null, "exec") };
872
872
  function R(l, t = "") {
873
873
  let e = typeof l == "string" ? l : l.source, n = { replace: /* @__PURE__ */ h((s, r) => {
874
874
  let a = typeof r == "string" ? r : r.source;
@@ -883,8 +883,8 @@ var sr = (() => {
883
883
  } catch {
884
884
  return !1;
885
885
  }
886
- })(), 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") }, rr = /^(?:[ \t]*(?:\n|$))+/, ir = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ar = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Qe = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, lr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Vt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Kn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Jn = R(Kn).replace(/bull/g, Vt).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(), or = R(Kn).replace(/bull/g, Vt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, cr = /^[^\n]+/, Kt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ur = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Kt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hr = R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Vt).getRegex(), bt = "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", Jt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, pr = R("^ {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", Jt).replace("tag", bt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), es = R(Qt).replace("hr", Qe).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", bt).getRegex(), fr = R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", es).getRegex(), en = { blockquote: fr, code: ir, def: ur, fences: ar, heading: lr, hr: Qe, html: pr, lheading: Jn, list: hr, newline: rr, paragraph: es, table: ve, text: cr }, Un = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Qe).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", bt).getRegex(), dr = { ...en, lheading: or, table: Un, paragraph: R(Qt).replace("hr", Qe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Un).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", bt).getRegex() }, gr = { ...en, html: R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Jt).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: ve, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: R(Qt).replace("hr", Qe).replace("heading", ` *#{1,6} *[^
887
- ]`).replace("lheading", Jn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, mr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ts = /^( {2,}|\\)\n(?!\s*$)/, xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = /[\p{P}\p{S}]/u, tn = /[\s\p{P}\p{S}]/u, ns = /[^\s\p{P}\p{S}]/u, br = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, tn).getRegex(), ss = /(?!~)[\p{P}\p{S}]/u, wr = /(?!~)[\s\p{P}\p{S}]/u, yr = /(?:[^\s\p{P}\p{S}]|~)/u, rs = /(?![*_])[\p{P}\p{S}]/u, Tr = /(?![*_])[\s\p{P}\p{S}]/u, vr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Sr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", sr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), is = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ar = R(is, "u").replace(/punct/g, wt).getRegex(), Er = R(is, "u").replace(/punct/g, ss).getRegex(), as = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", _r = R(as, "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Rr = R(as, "gu").replace(/notPunctSpace/g, yr).replace(/punctSpace/g, wr).replace(/punct/g, ss).getRegex(), Dr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Cr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, rs).getRegex(), Mr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ir = R(Mr, "gu").replace(/notPunctSpace/g, vr).replace(/punctSpace/g, Tr).replace(/punct/g, rs).getRegex(), Lr = R(/\\(punct)/, "gu").replace(/punct/g, wt).getRegex(), Or = R(/^<(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(), zr = R(Jt).replace("(?:-->|$)", "-->").getRegex(), Nr = R("^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", zr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), gt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Pr = R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", gt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ls = R(/^!?\[(label)\]\[(ref)\]/).replace("label", gt).replace("ref", Kt).getRegex(), os = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Kt).getRegex(), $r = R("reflink|nolink(?!\\()", "g").replace("reflink", ls).replace("nolink", os).getRegex(), Bn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nn = { _backpedal: ve, anyPunctuation: Lr, autolink: Or, blockSkip: Sr, br: ts, code: kr, del: ve, delLDelim: ve, delRDelim: ve, emStrongLDelim: Ar, emStrongRDelimAst: _r, emStrongRDelimUnd: Dr, escape: mr, link: Pr, nolink: os, punctuation: br, reflink: ls, reflinkSearch: $r, tag: Nr, text: xr, url: ve }, Ur = { ...nn, link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", gt).getRegex(), reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gt).getRegex() }, Zt = { ...nn, emStrongRDelimAst: Rr, emStrongLDelim: Er, delLDelim: Cr, delRDelim: Ir, url: R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Bn).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: R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Bn).getRegex() }, Br = { ...Zt, br: R(ts).replace("{2,}", "*").getRegex(), text: R(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ht = { normal: en, gfm: dr, pedantic: gr }, Ze = { normal: nn, gfm: Zt, breaks: Br, pedantic: Ur }, Fr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Fn = /* @__PURE__ */ h((l) => Fr[l], "de");
886
+ })(), 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") }, rr = /^(?:[ \t]*(?:\n|$))+/, ir = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ar = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Qe = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, lr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Vt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Kn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Jn = R(Kn).replace(/bull/g, Vt).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(), or = R(Kn).replace(/bull/g, Vt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, cr = /^[^\n]+/, Kt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ur = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Kt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hr = R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Vt).getRegex(), bt = "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", Jt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, pr = R("^ {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", Jt).replace("tag", bt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), es = R(Qt).replace("hr", Qe).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", bt).getRegex(), fr = R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", es).getRegex(), en = { blockquote: fr, code: ir, def: ur, fences: ar, heading: lr, hr: Qe, html: pr, lheading: Jn, list: hr, newline: rr, paragraph: es, table: Te, text: cr }, Un = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Qe).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", bt).getRegex(), dr = { ...en, lheading: or, table: Un, paragraph: R(Qt).replace("hr", Qe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Un).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", bt).getRegex() }, gr = { ...en, html: R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Jt).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: Te, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: R(Qt).replace("hr", Qe).replace("heading", ` *#{1,6} *[^
887
+ ]`).replace("lheading", Jn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, mr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ts = /^( {2,}|\\)\n(?!\s*$)/, xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = /[\p{P}\p{S}]/u, tn = /[\s\p{P}\p{S}]/u, ns = /[^\s\p{P}\p{S}]/u, br = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, tn).getRegex(), ss = /(?!~)[\p{P}\p{S}]/u, wr = /(?!~)[\s\p{P}\p{S}]/u, yr = /(?:[^\s\p{P}\p{S}]|~)/u, rs = /(?![*_])[\p{P}\p{S}]/u, vr = /(?![*_])[\s\p{P}\p{S}]/u, Tr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Sr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", sr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), is = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ar = R(is, "u").replace(/punct/g, wt).getRegex(), Er = R(is, "u").replace(/punct/g, ss).getRegex(), as = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", _r = R(as, "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Rr = R(as, "gu").replace(/notPunctSpace/g, yr).replace(/punctSpace/g, wr).replace(/punct/g, ss).getRegex(), Dr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Cr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, rs).getRegex(), Mr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ir = R(Mr, "gu").replace(/notPunctSpace/g, Tr).replace(/punctSpace/g, vr).replace(/punct/g, rs).getRegex(), Lr = R(/\\(punct)/, "gu").replace(/punct/g, wt).getRegex(), Or = R(/^<(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(), zr = R(Jt).replace("(?:-->|$)", "-->").getRegex(), Nr = R("^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", zr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), gt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Pr = R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", gt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ls = R(/^!?\[(label)\]\[(ref)\]/).replace("label", gt).replace("ref", Kt).getRegex(), os = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Kt).getRegex(), $r = R("reflink|nolink(?!\\()", "g").replace("reflink", ls).replace("nolink", os).getRegex(), Bn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nn = { _backpedal: Te, anyPunctuation: Lr, autolink: Or, blockSkip: Sr, br: ts, code: kr, del: Te, delLDelim: Te, delRDelim: Te, emStrongLDelim: Ar, emStrongRDelimAst: _r, emStrongRDelimUnd: Dr, escape: mr, link: Pr, nolink: os, punctuation: br, reflink: ls, reflinkSearch: $r, tag: Nr, text: xr, url: Te }, Ur = { ...nn, link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", gt).getRegex(), reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gt).getRegex() }, Zt = { ...nn, emStrongRDelimAst: Rr, emStrongLDelim: Er, delLDelim: Cr, delRDelim: Ir, url: R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Bn).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: R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Bn).getRegex() }, Br = { ...Zt, br: R(ts).replace("{2,}", "*").getRegex(), text: R(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ht = { normal: en, gfm: dr, pedantic: gr }, Ze = { normal: nn, gfm: Zt, breaks: Br, pedantic: Ur }, Fr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Fn = /* @__PURE__ */ h((l) => Fr[l], "de");
888
888
  function oe(l, t) {
889
889
  if (t) {
890
890
  if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Fn);
@@ -2031,12 +2031,12 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2031
2031
  },
2032
2032
  setup(l) {
2033
2033
  const t = new M.Renderer();
2034
- t.link = ({ href: y, text: T }) => `<a href="${y}" target="_blank" rel="noopener noreferrer">${T}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2034
+ t.link = ({ href: y, text: v }) => `<a href="${y}" target="_blank" rel="noopener noreferrer">${v}</a>`, M.setOptions({ breaks: !0, gfm: !0, renderer: t });
2035
2035
  function e(y) {
2036
2036
  if (!y)
2037
2037
  return "";
2038
- const T = M.parse(y, { async: !1 });
2039
- return nr.sanitize(T, { ADD_ATTR: ["target"] });
2038
+ const v = M.parse(y, { async: !1 });
2039
+ return nr.sanitize(v, { ADD_ATTR: ["target"] });
2040
2040
  }
2041
2041
  h(e, "renderMarkdown");
2042
2042
  const n = {
@@ -2051,8 +2051,8 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2051
2051
  const y = { ...s[l.scope] };
2052
2052
  return l.scope === "org" && l.scopeName && (y.label = l.scopeName, y.tooltip = `Visible to ${l.scopeName} members`), y;
2053
2053
  }), o = Q(() => l.scale === "lg"), c = ne(""), p = ne(), f = ne(), d = ne(), m = ne([]), b = ne(!1);
2054
- function O(y, T) {
2055
- const x = y[T], L = y[T + 1];
2054
+ function O(y, v) {
2055
+ const x = y[v], L = y[v + 1];
2056
2056
  return !L || L.sender !== x.sender;
2057
2057
  }
2058
2058
  h(O, "shouldShowAvatar");
@@ -2066,10 +2066,10 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2066
2066
  }
2067
2067
  });
2068
2068
  async function Je() {
2069
- const y = c.value.trim(), T = m.value.length > 0;
2070
- if (!y && !T || !l.chatController || !F.value || b.value)
2069
+ const y = c.value.trim(), v = m.value.length > 0;
2070
+ if (!y && !v || !l.chatController || !F.value || b.value)
2071
2071
  return;
2072
- const x = c.value, L = T ? [...m.value] : void 0;
2072
+ const x = c.value, L = v ? [...m.value] : void 0;
2073
2073
  c.value = "", m.value = [], f.value && (f.value.style.height = "auto", f.value.focus());
2074
2074
  try {
2075
2075
  await l.chatController.sendChatMessage(x, L), B();
@@ -2097,8 +2097,8 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2097
2097
  d.value?.click();
2098
2098
  }
2099
2099
  h(Ue, "triggerFileInput");
2100
- async function Tt(y) {
2101
- const T = y.target, x = T.files?.[0];
2100
+ async function vt(y) {
2101
+ const v = y.target, x = v.files?.[0];
2102
2102
  if (!(!x || !l.uploadFn)) {
2103
2103
  b.value = !0;
2104
2104
  try {
@@ -2107,33 +2107,33 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2107
2107
  } catch (L) {
2108
2108
  console.error("Upload failed:", L);
2109
2109
  } finally {
2110
- b.value = !1, T.value = "";
2110
+ b.value = !1, v.value = "";
2111
2111
  }
2112
2112
  }
2113
2113
  }
2114
- h(Tt, "handleFileSelect");
2115
- function vt(y) {
2116
- m.value = m.value.filter((T, x) => x !== y);
2114
+ h(vt, "handleFileSelect");
2115
+ function Tt(y) {
2116
+ m.value = m.value.filter((v, x) => x !== y);
2117
2117
  }
2118
- h(vt, "removeAttachment");
2119
- function et(y, T) {
2120
- if (T === 0) {
2121
- const pe = y[T];
2118
+ h(Tt, "removeAttachment");
2119
+ function et(y, v) {
2120
+ if (v === 0) {
2121
+ const pe = y[v];
2122
2122
  return pe?.timestamp ? Be(new Date(pe.timestamp)) : null;
2123
2123
  }
2124
- const x = y[T - 1], L = y[T];
2124
+ const x = y[v - 1], L = y[v];
2125
2125
  if (!x?.timestamp || !L?.timestamp) return null;
2126
2126
  const C = new Date(x.timestamp).getTime();
2127
2127
  return new Date(L.timestamp).getTime() - C > 36e5 ? Be(new Date(L.timestamp)) : null;
2128
2128
  }
2129
2129
  h(et, "shouldShowTimeDivider");
2130
2130
  function Be(y) {
2131
- const T = /* @__PURE__ */ new Date(), x = y.toDateString() === T.toDateString(), L = new Date(T);
2131
+ const v = /* @__PURE__ */ new Date(), x = y.toDateString() === v.toDateString(), L = new Date(v);
2132
2132
  L.setDate(L.getDate() - 1);
2133
2133
  const C = y.toDateString() === L.toDateString(), he = y.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2134
2134
  if (x) return he;
2135
2135
  if (C) return `Yesterday, ${he}`;
2136
- const z = y.getFullYear() === T.getFullYear();
2136
+ const z = y.getFullYear() === v.getFullYear();
2137
2137
  return `${y.toLocaleDateString("en-US", {
2138
2138
  weekday: "long",
2139
2139
  month: "short",
@@ -2143,7 +2143,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2143
2143
  }
2144
2144
  return h(Be, "formatTimeDivider"), Wt(W, (y) => {
2145
2145
  y.length > 0 && zt(() => B());
2146
- }, { immediate: !0, deep: !0 }), (y, T) => (A(), E("div", qr, [
2146
+ }, { immediate: !0, deep: !0 }), (y, v) => (A(), E("div", qr, [
2147
2147
  I.value ? q("", !0) : (A(), E("div", Yr, [
2148
2148
  Nt(Os, {
2149
2149
  agent: l.agent,
@@ -2152,22 +2152,22 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2152
2152
  ])),
2153
2153
  me.value ? (A(), E("div", {
2154
2154
  key: 1,
2155
- class: v(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2155
+ class: T(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2156
2156
  }, [
2157
2157
  w("i", {
2158
- class: v(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2158
+ class: T(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2159
2159
  }, null, 2),
2160
2160
  w("span", null, ce($.value), 1)
2161
2161
  ], 2)) : ee.value ? (A(), E("div", {
2162
2162
  key: 2,
2163
- class: v(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
2163
+ class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
2164
2164
  }, [
2165
2165
  Nt(_n, { class: "size-4" })
2166
2166
  ], 2)) : r.value ? (A(), E("div", {
2167
2167
  key: 3,
2168
- class: v(["flex items-center justify-center gap-1.5 py-2 text-[11px]", I.value ? "text-theme-300" : "text-white/30"])
2168
+ class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", I.value ? "text-theme-300" : "text-white/30"])
2169
2169
  }, [
2170
- T[2] || (T[2] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2170
+ v[2] || (v[2] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2171
2171
  w("span", null, ce(r.value), 1)
2172
2172
  ], 2)) : q("", !0),
2173
2173
  w("div", {
@@ -2180,18 +2180,18 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2180
2180
  w("img", {
2181
2181
  src: l.agent.avatarUrl.value,
2182
2182
  alt: l.agent.displayName.value,
2183
- class: v(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2183
+ class: T(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2184
2184
  }, null, 10, Vr),
2185
2185
  F.value ? (A(), E("span", {
2186
2186
  key: 0,
2187
- class: v(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2187
+ class: T(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2188
2188
  }, [
2189
2189
  w("span", {
2190
- class: v(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2190
+ class: T(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2191
2191
  style: { "animation-duration": "2.5s" }
2192
2192
  }, null, 2),
2193
2193
  w("span", {
2194
- class: v(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2194
+ class: T(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2195
2195
  o.value ? "size-3" : "size-2.5",
2196
2196
  I.value ? "ring-white" : "ring-theme-900"
2197
2197
  ]])
@@ -2199,17 +2199,17 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2199
2199
  ], 2)) : q("", !0)
2200
2200
  ]),
2201
2201
  w("div", {
2202
- class: v(["font-semibold", [I.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2202
+ class: T(["font-semibold", [I.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2203
2203
  }, ce(l.agent.displayName.value), 3),
2204
2204
  w("p", {
2205
- class: v(["mt-1 text-center", [I.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2205
+ class: T(["mt-1 text-center", [I.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2206
2206
  }, ce(l.emptyStateMessage || "Send a message to get started"), 3),
2207
2207
  w("div", {
2208
- class: v(["inline-flex items-center gap-1.5 mt-6 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"]),
2208
+ class: T(["inline-flex items-center gap-1.5 mt-6 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"]),
2209
2209
  title: a.value.tooltip
2210
2210
  }, [
2211
2211
  w("i", {
2212
- class: v([a.value.icon, "size-3"])
2212
+ class: T([a.value.icon, "size-3"])
2213
2213
  }, null, 2),
2214
2214
  w("span", null, ce(a.value.label), 1)
2215
2215
  ], 10, Qr)
@@ -2219,17 +2219,17 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2219
2219
  }, [
2220
2220
  et(W.value, L) ? (A(), E("div", Kr, [
2221
2221
  w("div", {
2222
- class: v(["flex-1 h-px", I.value ? "bg-theme-200" : "bg-white/10"])
2222
+ class: T(["flex-1 h-px", I.value ? "bg-theme-200" : "bg-white/10"])
2223
2223
  }, null, 2),
2224
2224
  w("span", {
2225
- class: v(["font-medium shrink-0", [I.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2225
+ class: T(["font-medium shrink-0", [I.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2226
2226
  }, ce(et(W.value, L)), 3),
2227
2227
  w("div", {
2228
- class: v(["flex-1 h-px", I.value ? "bg-theme-200" : "bg-white/10"])
2228
+ class: T(["flex-1 h-px", I.value ? "bg-theme-200" : "bg-white/10"])
2229
2229
  }, null, 2)
2230
2230
  ])) : q("", !0),
2231
2231
  w("div", {
2232
- class: v(["flex gap-2 items-end", {
2232
+ class: T(["flex gap-2 items-end", {
2233
2233
  "justify-end": x.sender === "user",
2234
2234
  "justify-start": x.sender === "agent",
2235
2235
  "mb-4": O(W.value, L)
@@ -2237,28 +2237,28 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2237
2237
  }, [
2238
2238
  x.sender === "agent" ? (A(), E("div", {
2239
2239
  key: 0,
2240
- class: v(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2240
+ class: T(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2241
2241
  }, [
2242
2242
  O(W.value, L) ? (A(), E("img", {
2243
2243
  key: 0,
2244
2244
  src: l.agent.avatarUrl.value,
2245
2245
  alt: l.agent.displayName.value,
2246
- class: v(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2246
+ class: T(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2247
2247
  }, null, 10, Jr)) : q("", !0)
2248
2248
  ], 2)) : q("", !0),
2249
2249
  w("div", {
2250
- class: v(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2250
+ class: T(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2251
2251
  }, [
2252
2252
  x.attachments?.length ? (A(), E("div", {
2253
2253
  key: 0,
2254
- class: v(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2254
+ class: T(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2255
2255
  }, [
2256
2256
  (A(!0), E(Le, null, Pt(x.attachments, (C, he) => (A(), E(Le, { key: he }, [
2257
2257
  C.type === "image" ? (A(), E("img", {
2258
2258
  key: 0,
2259
2259
  src: C.url,
2260
2260
  alt: C.name,
2261
- class: v(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2261
+ class: T(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2262
2262
  }, null, 10, ei)) : C.type === "audio" ? (A(), E("audio", {
2263
2263
  key: 1,
2264
2264
  src: C.url,
@@ -2269,19 +2269,22 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2269
2269
  href: C.url,
2270
2270
  target: "_blank",
2271
2271
  rel: "noopener",
2272
- class: v(["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"])
2272
+ class: T(["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"])
2273
2273
  }, [
2274
- T[3] || (T[3] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2274
+ v[3] || (v[3] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2275
2275
  xs(" " + ce(C.name), 1)
2276
2276
  ], 10, ni))
2277
2277
  ], 64))), 128))
2278
2278
  ], 2)) : q("", !0),
2279
2279
  x.text ? (A(), E("div", {
2280
2280
  key: 1,
2281
- class: v(["rounded-2xl px-3.5 py-2", x.sender === "user" ? "bg-primary-500 text-white" : I.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2281
+ class: T(["rounded-2xl px-3.5 py-2", x.sender === "user" ? "bg-primary-500 text-white" : I.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2282
2282
  }, [
2283
2283
  w("div", {
2284
- class: v(["chat-msg-prose break-words", o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]"]),
2284
+ class: T(["chat-msg-prose break-words", [
2285
+ o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]",
2286
+ x.sender === "user" || !I.value ? "chat-msg-prose-invert" : ""
2287
+ ]]),
2285
2288
  innerHTML: e(x.text)
2286
2289
  }, null, 10, si)
2287
2290
  ], 2)) : q("", !0)
@@ -2293,14 +2296,14 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2293
2296
  w("img", {
2294
2297
  src: l.agent.avatarUrl.value,
2295
2298
  alt: l.agent.displayName.value,
2296
- class: v(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2299
+ class: T(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2297
2300
  }, null, 10, ai)
2298
2301
  ]),
2299
2302
  w("div", {
2300
- class: v(["rounded-2xl px-4 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2303
+ class: T(["rounded-2xl px-4 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2301
2304
  }, [
2302
2305
  w("i", {
2303
- class: v(["i-svg-spinners-3-dots-fade size-6", I.value ? "text-theme-400" : "text-white/70"])
2306
+ class: T(["i-svg-spinners-3-dots-fade size-6", I.value ? "text-theme-400" : "text-white/70"])
2304
2307
  }, null, 2)
2305
2308
  ], 2)
2306
2309
  ])) : q("", !0)
@@ -2315,18 +2318,18 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2315
2318
  key: 0,
2316
2319
  src: x.url,
2317
2320
  alt: x.name,
2318
- class: v(["size-14 rounded-lg object-cover border", I.value ? "border-theme-200" : "border-white/20"])
2321
+ class: T(["size-14 rounded-lg object-cover border", I.value ? "border-theme-200" : "border-white/20"])
2319
2322
  }, null, 10, ci)) : (A(), E("div", {
2320
2323
  key: 1,
2321
- class: v(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", I.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2324
+ class: T(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", I.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2322
2325
  }, [
2323
- T[4] || (T[4] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2326
+ v[4] || (v[4] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2324
2327
  w("span", ui, ce(x.name), 1)
2325
2328
  ], 2)),
2326
2329
  w("button", {
2327
2330
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
2328
- onClick: /* @__PURE__ */ h((C) => vt(L), "onClick")
2329
- }, [...T[5] || (T[5] = [
2331
+ onClick: /* @__PURE__ */ h((C) => Tt(L), "onClick")
2332
+ }, [...v[5] || (v[5] = [
2330
2333
  w("i", { class: "i-tabler-x size-3" }, null, -1)
2331
2334
  ])], 8, hi)
2332
2335
  ]))), 128)),
@@ -2341,14 +2344,14 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2341
2344
  type: "file",
2342
2345
  accept: "image/*,audio/*,video/*",
2343
2346
  class: "hidden",
2344
- onChange: Tt
2347
+ onChange: vt
2345
2348
  }, null, 544)) : q("", !0),
2346
2349
  w("div", {
2347
- class: v(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", I.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2350
+ class: T(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", I.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2348
2351
  }, [
2349
2352
  l.uploadFn ? (A(), E("button", {
2350
2353
  key: 0,
2351
- class: v(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2354
+ class: T(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2352
2355
  o.value ? "size-10" : "size-9",
2353
2356
  I.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
2354
2357
  b.value ? "opacity-50 pointer-events-none" : ""
@@ -2361,30 +2364,30 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2361
2364
  bs(w("textarea", {
2362
2365
  ref_key: "textarea",
2363
2366
  ref: f,
2364
- "onUpdate:modelValue": T[0] || (T[0] = (x) => c.value = x),
2367
+ "onUpdate:modelValue": v[0] || (v[0] = (x) => c.value = x),
2365
2368
  rows: "1",
2366
2369
  enterkeyhint: "send",
2367
2370
  placeholder: ue.value,
2368
2371
  disabled: te.value,
2369
2372
  style: ws({ fontSize: (o.value, "16px"), resize: "none" }),
2370
- class: v(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", I.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2373
+ class: T(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", I.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2371
2374
  onKeydown: yt
2372
2375
  }, null, 46, mi), [
2373
2376
  [ys, c.value]
2374
2377
  ]),
2375
2378
  w("button", {
2376
- class: v(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2379
+ class: T(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2377
2380
  o.value ? "size-10" : "size-9",
2378
2381
  Ke.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : I.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2379
2382
  ]]),
2380
2383
  disabled: !Ke.value,
2381
- onClick: T[1] || (T[1] = (x) => Je())
2382
- }, [...T[6] || (T[6] = [
2384
+ onClick: v[1] || (v[1] = (x) => Je())
2385
+ }, [...v[6] || (v[6] = [
2383
2386
  w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2384
2387
  ])], 10, ki)
2385
2388
  ], 2),
2386
2389
  w("div", {
2387
- class: v(["text-[10px] text-center mt-2", I.value ? "text-theme-300" : "text-white/40"])
2390
+ class: T(["text-[10px] text-center mt-2", I.value ? "text-theme-300" : "text-white/40"])
2388
2391
  }, " Press Enter to send, Shift+Enter for new line ", 2)
2389
2392
  ])
2390
2393
  ]));
@@ -2409,7 +2412,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2409
2412
  const t = As("AgentWrap"), e = l, n = e.sdk || Es.getInstance({
2410
2413
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2411
2414
  ...e.apiBase && { apiBase: e.apiBase }
2412
- }), s = ne(!e.agent), r = Ts(e.agent ? new dt({ config: e.agent }) : void 0), a = ne();
2415
+ }), s = ne(!e.agent), r = vs(e.agent ? new dt({ config: e.agent }) : void 0), a = ne();
2413
2416
  return jn(async () => {
2414
2417
  if (e.agent) {
2415
2418
  t.debug("Agent provided via props, skipping fetch", {
@@ -2489,7 +2492,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2489
2492
  }), (o, c) => (A(), E("div", xi, [
2490
2493
  s.value ? (A(), E("div", bi, [...c[0] || (c[0] = [
2491
2494
  w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2492
- ])])) : r.value ? vs(o.$slots, "default", {
2495
+ ])])) : r.value ? Ts(o.$slots, "default", {
2493
2496
  key: 1,
2494
2497
  sdk: jt(n),
2495
2498
  agent: r.value,
@@ -2512,4 +2515,4 @@ export {
2512
2515
  Cn as h,
2513
2516
  Ai as p
2514
2517
  };
2515
- //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-CZiiYRYE.js.map
2518
+ //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-CHgCPDEe.js.map