@bcc-code/vue-bcc-chat-ui 7.1.30 → 7.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, inject as f, isRef as p, mergeModels as m, nextTick as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, shallowRef as O, toDisplayString as k, toValue as A, unref as j, useModel as M, useTemplateRef as ee, vModelText as N, vShow as P, watch as F, withCtx as I, withDirectives as te, withModifiers as L } from "vue";
2
- import { BccAvatar as R, BccButton as z, BccDialog as ne, BccImage as B, BccInput as re, BccInputText as ie, BccMenu as ae, BccMessage as oe, BccProgressSpinner as V, BccTag as se } from "@bcc-code/component-library-vue";
1
+ import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, inject as f, isRef as p, mergeModels as m, nextTick as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveDynamicComponent as D, shallowRef as O, toDisplayString as k, toValue as A, unref as j, useModel as M, useTemplateRef as N, vModelText as ee, vShow as P, watch as F, withCtx as I, withDirectives as te, withModifiers as L } from "vue";
2
+ import { BccAvatar as R, BccButton as z, BccDialog as ne, BccImage as B, BccInput as re, BccInputText as ie, BccMenu as ae, BccMessage as oe, BccProgressSpinner as se, BccTag as V } from "@bcc-code/component-library-vue";
3
3
  import { CometChat as H } from "@cometchat/chat-sdk-javascript";
4
- import { AddIcon as ce, AttachFileIcon as le, BarChartIcon as U, CalendarAddOnIcon as ue, CheckIcon as de, CloseIcon as fe, CodeBlocksIcon as pe, ContentCopyIcon as me, DeleteIcon as he, DescriptionIcon as ge, DoneAllIcon as _e, EditCalendarIcon as ve, EditIcon as ye, ErrorIcon as be, FilePresentIcon as xe, FolderZipIcon as Se, ForumIcon as Ce, ImageIcon as we, InfoIcon as Te, KeyboardArrowDownIcon as Ee, KeyboardArrowUpIcon as De, MicIcon as Oe, OpenInNewIcon as ke, PendingIcon as Ae, PictureAsPdfIcon as je, ReplyIcon as Me, ScheduleIcon as Ne, SendIcon as Pe, TableChartIcon as Fe, TextSnippetIcon as Ie, TranslateIcon as Le, VideocamIcon as Re } from "@bcc-code/icons-vue";
4
+ import { AddIcon as U, AttachFileIcon as ce, BarChartIcon as le, CalendarAddOnIcon as ue, CheckIcon as de, CloseIcon as fe, CodeBlocksIcon as pe, ContentCopyIcon as me, DeleteIcon as he, DescriptionIcon as ge, DoneAllIcon as _e, EditCalendarIcon as ve, EditIcon as ye, ErrorIcon as be, FilePresentIcon as xe, FolderZipIcon as Se, ForumIcon as Ce, ImageIcon as we, InfoIcon as Te, KeyboardArrowDownIcon as Ee, KeyboardArrowUpIcon as De, MicIcon as Oe, OpenInNewIcon as ke, PendingIcon as Ae, PictureAsPdfIcon as je, ReplyIcon as Me, ScheduleIcon as Ne, SendIcon as Pe, TableChartIcon as Fe, TextSnippetIcon as Ie, TranslateIcon as Le, VideocamIcon as Re } from "@bcc-code/icons-vue";
5
5
  //#region \0rolldown/runtime.js
6
6
  var W = Object.defineProperty, ze = (e, t) => {
7
7
  let n = {};
@@ -734,7 +734,7 @@ function or() {
734
734
  }
735
735
  let x, S = "", C = n, w = C.implementation, T = C.createNodeIterator, E = C.createDocumentFragment, D = C.getElementsByTagName, O = r.importNode, k = ar();
736
736
  t.isSupported = typeof Qt == "function" && typeof b == "function" && w && w.createHTMLDocument !== void 0;
737
- let A = Kn, j = qn, M = Jn, ee = Yn, N = Xn, P = Qn, F = $n, I = tr, te = Zn, L = null, R = Y({}, [
737
+ let A = Kn, j = qn, M = Jn, N = Yn, ee = Xn, P = Qn, F = $n, I = tr, te = Zn, L = null, R = Y({}, [
738
738
  ...Fn,
739
739
  ...In,
740
740
  ...Ln,
@@ -777,7 +777,7 @@ function or() {
777
777
  enumerable: !0,
778
778
  value: null
779
779
  }
780
- })), oe = !0, V = !0, se = !1, H = !0, ce = !1, le = !0, U = !1, ue = !1, de = !1, fe = !1, pe = !1, me = !1, he = !0, ge = !1, _e = "user-content-", ve = !0, ye = !1, be = {}, xe = null, Se = Y({}, [
780
+ })), oe = !0, se = !0, V = !1, H = !0, U = !1, ce = !0, le = !1, ue = !1, de = !1, fe = !1, pe = !1, me = !1, he = !0, ge = !1, _e = "user-content-", ve = !0, ye = !1, be = {}, xe = null, Se = Y({}, [
781
781
  "annotation-xml",
782
782
  "audio",
783
783
  "colgroup",
@@ -846,7 +846,7 @@ function or() {
846
846
  }, He = function() {
847
847
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
848
848
  if (ze && ze === e) return;
849
- (!e || typeof e != "object") && (e = {}), e = jn(e), Le = Re.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, W = Le === "application/xhtml+xml" ? _n : gn, L = q(e, "ALLOWED_TAGS") && hn(e.ALLOWED_TAGS) ? Y({}, e.ALLOWED_TAGS, W) : R, z = q(e, "ALLOWED_ATTR") && hn(e.ALLOWED_ATTR) ? Y({}, e.ALLOWED_ATTR, W) : ne, Me = q(e, "ALLOWED_NAMESPACES") && hn(e.ALLOWED_NAMESPACES) ? Y({}, e.ALLOWED_NAMESPACES, _n) : Ne, Te = q(e, "ADD_URI_SAFE_ATTR") && hn(e.ADD_URI_SAFE_ATTR) ? Y(jn(Ee), e.ADD_URI_SAFE_ATTR, W) : Ee, Ce = q(e, "ADD_DATA_URI_TAGS") && hn(e.ADD_DATA_URI_TAGS) ? Y(jn(we), e.ADD_DATA_URI_TAGS, W) : we, xe = q(e, "FORBID_CONTENTS") && hn(e.FORBID_CONTENTS) ? Y({}, e.FORBID_CONTENTS, W) : Se, re = q(e, "FORBID_TAGS") && hn(e.FORBID_TAGS) ? Y({}, e.FORBID_TAGS, W) : jn({}), ie = q(e, "FORBID_ATTR") && hn(e.FORBID_ATTR) ? Y({}, e.FORBID_ATTR, W) : jn({}), be = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? jn(e.USE_PROFILES) : e.USE_PROFILES : !1, oe = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, se = e.ALLOW_UNKNOWN_PROTOCOLS || !1, H = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = e.SAFE_FOR_TEMPLATES || !1, le = e.SAFE_FOR_XML !== !1, U = e.WHOLE_DOCUMENT || !1, fe = e.RETURN_DOM || !1, pe = e.RETURN_DOM_FRAGMENT || !1, me = e.RETURN_TRUSTED_TYPE || !1, de = e.FORCE_BODY || !1, he = e.SANITIZE_DOM !== !1, ge = e.SANITIZE_NAMED_PROPS || !1, ve = e.KEEP_CONTENT !== !1, ye = e.IN_PLACE || !1, te = Pn(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Zn, Ae = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ke, Pe = q(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? jn(e.MATHML_TEXT_INTEGRATION_POINTS) : Y({}, [
849
+ (!e || typeof e != "object") && (e = {}), e = jn(e), Le = Re.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, W = Le === "application/xhtml+xml" ? _n : gn, L = q(e, "ALLOWED_TAGS") && hn(e.ALLOWED_TAGS) ? Y({}, e.ALLOWED_TAGS, W) : R, z = q(e, "ALLOWED_ATTR") && hn(e.ALLOWED_ATTR) ? Y({}, e.ALLOWED_ATTR, W) : ne, Me = q(e, "ALLOWED_NAMESPACES") && hn(e.ALLOWED_NAMESPACES) ? Y({}, e.ALLOWED_NAMESPACES, _n) : Ne, Te = q(e, "ADD_URI_SAFE_ATTR") && hn(e.ADD_URI_SAFE_ATTR) ? Y(jn(Ee), e.ADD_URI_SAFE_ATTR, W) : Ee, Ce = q(e, "ADD_DATA_URI_TAGS") && hn(e.ADD_DATA_URI_TAGS) ? Y(jn(we), e.ADD_DATA_URI_TAGS, W) : we, xe = q(e, "FORBID_CONTENTS") && hn(e.FORBID_CONTENTS) ? Y({}, e.FORBID_CONTENTS, W) : Se, re = q(e, "FORBID_TAGS") && hn(e.FORBID_TAGS) ? Y({}, e.FORBID_TAGS, W) : jn({}), ie = q(e, "FORBID_ATTR") && hn(e.FORBID_ATTR) ? Y({}, e.FORBID_ATTR, W) : jn({}), be = q(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? jn(e.USE_PROFILES) : e.USE_PROFILES : !1, oe = e.ALLOW_ARIA_ATTR !== !1, se = e.ALLOW_DATA_ATTR !== !1, V = e.ALLOW_UNKNOWN_PROTOCOLS || !1, H = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, ce = e.SAFE_FOR_XML !== !1, le = e.WHOLE_DOCUMENT || !1, fe = e.RETURN_DOM || !1, pe = e.RETURN_DOM_FRAGMENT || !1, me = e.RETURN_TRUSTED_TYPE || !1, de = e.FORCE_BODY || !1, he = e.SANITIZE_DOM !== !1, ge = e.SANITIZE_NAMED_PROPS || !1, ve = e.KEEP_CONTENT !== !1, ye = e.IN_PLACE || !1, te = Pn(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Zn, Ae = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ke, Pe = q(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? jn(e.MATHML_TEXT_INTEGRATION_POINTS) : Y({}, [
850
850
  "mi",
851
851
  "mo",
852
852
  "mn",
@@ -854,7 +854,7 @@ function or() {
854
854
  "mtext"
855
855
  ]), Fe = q(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? jn(e.HTML_INTEGRATION_POINTS) : Y({}, ["annotation-xml"]);
856
856
  let t = q(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? jn(e.CUSTOM_ELEMENT_HANDLING) : on(null);
857
- if (B = on(null), q(t, "tagNameCheck") && Ve(t.tagNameCheck) && (B.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && Ve(t.attributeNameCheck) && (B.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (B.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), ce && (V = !1), pe && (fe = !0), be && (L = Y({}, Vn), z = on(null), be.html === !0 && (Y(L, Fn), Y(z, Hn)), be.svg === !0 && (Y(L, In), Y(z, Un), Y(z, Gn)), be.svgFilters === !0 && (Y(L, Ln), Y(z, Un), Y(z, Gn)), be.mathMl === !0 && (Y(L, zn), Y(z, Wn), Y(z, Gn))), ae.tagCheck = null, ae.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? ae.tagCheck = e.ADD_TAGS : hn(e.ADD_TAGS) && (L === R && (L = jn(L)), Y(L, e.ADD_TAGS, W))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? ae.attributeCheck = e.ADD_ATTR : hn(e.ADD_ATTR) && (z === ne && (z = jn(z)), Y(z, e.ADD_ATTR, W))), q(e, "ADD_URI_SAFE_ATTR") && hn(e.ADD_URI_SAFE_ATTR) && Y(Te, e.ADD_URI_SAFE_ATTR, W), q(e, "FORBID_CONTENTS") && hn(e.FORBID_CONTENTS) && (xe === Se && (xe = jn(xe)), Y(xe, e.FORBID_CONTENTS, W)), q(e, "ADD_FORBID_CONTENTS") && hn(e.ADD_FORBID_CONTENTS) && (xe === Se && (xe = jn(xe)), Y(xe, e.ADD_FORBID_CONTENTS, W)), ve && (L["#text"] = !0), U && Y(L, [
857
+ if (B = on(null), q(t, "tagNameCheck") && Ve(t.tagNameCheck) && (B.tagNameCheck = t.tagNameCheck), q(t, "attributeNameCheck") && Ve(t.attributeNameCheck) && (B.attributeNameCheck = t.attributeNameCheck), q(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (B.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), U && (se = !1), pe && (fe = !0), be && (L = Y({}, Vn), z = on(null), be.html === !0 && (Y(L, Fn), Y(z, Hn)), be.svg === !0 && (Y(L, In), Y(z, Un), Y(z, Gn)), be.svgFilters === !0 && (Y(L, Ln), Y(z, Un), Y(z, Gn)), be.mathMl === !0 && (Y(L, zn), Y(z, Wn), Y(z, Gn))), ae.tagCheck = null, ae.attributeCheck = null, q(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? ae.tagCheck = e.ADD_TAGS : hn(e.ADD_TAGS) && (L === R && (L = jn(L)), Y(L, e.ADD_TAGS, W))), q(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? ae.attributeCheck = e.ADD_ATTR : hn(e.ADD_ATTR) && (z === ne && (z = jn(z)), Y(z, e.ADD_ATTR, W))), q(e, "ADD_URI_SAFE_ATTR") && hn(e.ADD_URI_SAFE_ATTR) && Y(Te, e.ADD_URI_SAFE_ATTR, W), q(e, "FORBID_CONTENTS") && hn(e.FORBID_CONTENTS) && (xe === Se && (xe = jn(xe)), Y(xe, e.FORBID_CONTENTS, W)), q(e, "ADD_FORBID_CONTENTS") && hn(e.ADD_FORBID_CONTENTS) && (xe === Se && (xe = jn(xe)), Y(xe, e.ADD_FORBID_CONTENTS, W)), ve && (L["#text"] = !0), le && Y(L, [
858
858
  "html",
859
859
  "head",
860
860
  "body"
@@ -920,7 +920,7 @@ function or() {
920
920
  } catch {}
921
921
  }
922
922
  let a = t.body || t.documentElement;
923
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ae === ke ? D.call(t, U ? "html" : "body")[0] : U ? t.documentElement : a;
923
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ae === ke ? D.call(t, le ? "html" : "body")[0] : le ? t.documentElement : a;
924
924
  }, Je = function(e) {
925
925
  return T.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
926
926
  }, Ye = function(e) {
@@ -940,7 +940,7 @@ function or() {
940
940
  if (Ze(k.uponSanitizeElement, e, {
941
941
  tagName: r,
942
942
  allowedTags: L
943
- }), le && e.hasChildNodes() && !Xe(e.firstElementChild) && Dn(/<[/\w!]/g, e.innerHTML) && Dn(/<[/\w!]/g, e.textContent) || le && e.namespaceURI === ke && r === "style" && Xe(e.firstElementChild) || e.nodeType === nr.progressingInstruction || le && e.nodeType === nr.comment && Dn(/<[/\w]/g, e.data)) return Ge(e), !0;
943
+ }), ce && e.hasChildNodes() && !Xe(e.firstElementChild) && Dn(/<[/\w!]/g, e.innerHTML) && Dn(/<[/\w!]/g, e.textContent) || ce && e.namespaceURI === ke && r === "style" && Xe(e.firstElementChild) || e.nodeType === nr.progressingInstruction || ce && e.nodeType === nr.comment && Dn(/<[/\w]/g, e.data)) return Ge(e), !0;
944
944
  if (re[r] || !(ae.tagCheck instanceof Function && ae.tagCheck(r)) && !L[r]) {
945
945
  if (!re[r] && tt(r) && (B.tagNameCheck instanceof RegExp && Dn(B.tagNameCheck, r) || B.tagNameCheck instanceof Function && B.tagNameCheck(r))) return !1;
946
946
  if (ve && !xe[r]) {
@@ -955,7 +955,7 @@ function or() {
955
955
  }
956
956
  return Ge(e), !0;
957
957
  }
958
- return e instanceof c && !We(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Dn(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Ge(e), !0) : (ce && e.nodeType === nr.text && (n = e.textContent, un([
958
+ return e instanceof c && !We(e) || (r === "noscript" || r === "noembed" || r === "noframes") && Dn(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Ge(e), !0) : (U && e.nodeType === nr.text && (n = e.textContent, un([
959
959
  A,
960
960
  j,
961
961
  M
@@ -965,10 +965,10 @@ function or() {
965
965
  }, $e = function(e, t, r) {
966
966
  if (ie[t] || he && (t === "id" || t === "name") && (r in n || r in Be)) return !1;
967
967
  let i = z[t] || ae.attributeCheck instanceof Function && ae.attributeCheck(t, e);
968
- if (!(V && !ie[t] && Dn(ee, t)) && !(oe && Dn(N, t))) {
968
+ if (!(se && !ie[t] && Dn(N, t)) && !(oe && Dn(ee, t))) {
969
969
  if (!i || ie[t]) {
970
970
  if (!(tt(e) && (B.tagNameCheck instanceof RegExp && Dn(B.tagNameCheck, e) || B.tagNameCheck instanceof Function && B.tagNameCheck(e)) && (B.attributeNameCheck instanceof RegExp && Dn(B.attributeNameCheck, t) || B.attributeNameCheck instanceof Function && B.attributeNameCheck(t, e)) || t === "is" && B.allowCustomizedBuiltInElements && (B.tagNameCheck instanceof RegExp && Dn(B.tagNameCheck, r) || B.tagNameCheck instanceof Function && B.tagNameCheck(r)))) return !1;
971
- } else if (!Te[t] && !Dn(te, yn(r, F, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && bn(r, "data:") === 0 && Ce[e]) && !(se && !Dn(P, yn(r, F, ""))) && r) return !1;
971
+ } else if (!Te[t] && !Dn(te, yn(r, F, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && bn(r, "data:") === 0 && Ce[e]) && !(V && !Dn(P, yn(r, F, ""))) && r) return !1;
972
972
  }
973
973
  return !0;
974
974
  }, et = Y({}, [
@@ -995,7 +995,7 @@ function or() {
995
995
  }, i = n.length;
996
996
  for (; i--;) {
997
997
  let a = n[i], o = a.name, s = a.namespaceURI, c = a.value, l = W(o), u = c, d = o === "value" ? u : xn(u);
998
- if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0, Ze(k.uponSanitizeAttribute, e, r), d = r.attrValue, ge && (l === "id" || l === "name") && bn(d, _e) !== 0 && (Ke(o, e), d = _e + d), le && Dn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
998
+ if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0, Ze(k.uponSanitizeAttribute, e, r), d = r.attrValue, ge && (l === "id" || l === "name") && bn(d, _e) !== 0 && (Ke(o, e), d = _e + d), ce && Dn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
999
999
  Ke(o, e);
1000
1000
  continue;
1001
1001
  }
@@ -1012,7 +1012,7 @@ function or() {
1012
1012
  Ke(o, e);
1013
1013
  continue;
1014
1014
  }
1015
- ce && un([
1015
+ U && un([
1016
1016
  A,
1017
1017
  j,
1018
1018
  M
@@ -1069,7 +1069,7 @@ function or() {
1069
1069
  it(e);
1070
1070
  } else if (e instanceof s) i = qe("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === nr.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o), it(o);
1071
1071
  else {
1072
- if (!fe && !ce && !U && e.indexOf("<") === -1) return x && me ? x.createHTML(e) : e;
1072
+ if (!fe && !U && !le && e.indexOf("<") === -1) return x && me ? x.createHTML(e) : e;
1073
1073
  if (i = qe(e), !i) return fe ? null : me ? S : "";
1074
1074
  }
1075
1075
  i && de && Ge(i.firstChild);
@@ -1077,7 +1077,7 @@ function or() {
1077
1077
  for (; c = u.nextNode();) Qe(c), nt(c), c.content instanceof a && rt(c.content);
1078
1078
  if (ye) return e;
1079
1079
  if (fe) {
1080
- if (ce) {
1080
+ if (U) {
1081
1081
  i.normalize();
1082
1082
  let e = i.innerHTML;
1083
1083
  un([
@@ -1092,8 +1092,8 @@ function or() {
1092
1092
  else l = i;
1093
1093
  return (z.shadowroot || z.shadowrootmode) && (l = O.call(r, l, !0)), l;
1094
1094
  }
1095
- let d = U ? i.outerHTML : i.innerHTML;
1096
- return U && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Dn(er, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), ce && un([
1095
+ let d = le ? i.outerHTML : i.innerHTML;
1096
+ return le && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && Dn(er, i.ownerDocument.doctype.name) && (d = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + d), U && un([
1097
1097
  A,
1098
1098
  j,
1099
1099
  M
@@ -4163,40 +4163,53 @@ var oc = null, sc = null;
4163
4163
  function cc({ environment: e }) {
4164
4164
  He(e);
4165
4165
  let t = w(!1), r = w(!1), i = w(!1), a = w(!1), o = w(!1), s = w(!1), c = w(!1), l = w(!1), u = w(!1), d = w(!1), f = w(!1), p = w(!1), m = w(typeof navigator < "u" ? !navigator.onLine : !1), h = w(!1), g = w(null), _ = w(null), v = w([]), y = w([]), b = w([]), x = w([]), S = w(!1), C = w(!1), T = w(null), E = w(null), D = w(null), O = w(null), k = w([]), A = w({}), j = n(() => k.value.length);
4166
- function M(e) {
4166
+ function M() {
4167
+ return typeof navigator < "u" ? !navigator.onLine : !1;
4168
+ }
4169
+ function N() {
4170
+ let e = M();
4171
+ if (e !== m.value) {
4172
+ if (m.value = e, e) {
4173
+ p.value = !1, ye();
4174
+ return;
4175
+ }
4176
+ se = !0, V || Se(!0);
4177
+ }
4178
+ }
4179
+ function ee(e) {
4167
4180
  if (!e.length) return;
4168
4181
  let t = { ...A.value };
4169
4182
  for (let n of e) n.uid && n.displayName.trim() && (t[n.uid] = n.displayName);
4170
4183
  A.value = t;
4171
4184
  }
4172
- function ee(e) {
4173
- M(Object.entries(Vt(e)).map(([e, t]) => ({
4185
+ function P(e) {
4186
+ ee(Object.entries(Vt(e)).map(([e, t]) => ({
4174
4187
  uid: e,
4175
4188
  displayName: t
4176
4189
  })));
4177
4190
  }
4178
- function N(e, t) {
4179
- return ee(e), fc(e, t);
4191
+ function F(e, t) {
4192
+ return P(e), fc(e, t);
4180
4193
  }
4181
- let P = n(() => v.value.find((e) => e.id === T.value) ?? null), F = `bcc-ui-connection-${crypto.randomUUID()}`, I = `bcc-ui-message-${crypto.randomUUID()}`, te = !1, L = !1, R = null, z = null, ne = null, B = null, re = 0, ie = 0, ae = !1, oe = !1, V = null, se = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Set(), le = null, U = null, ue = 0;
4182
- async function de() {
4183
- await lc(e), !t.value && (ge(), ft(), t.value = !0, await ut(), _.value && (dt(_.value.uid), me(), Te(), !m.value && !oe && Ce()));
4194
+ let I = n(() => v.value.find((e) => e.id === T.value) ?? null), te = `bcc-ui-connection-${crypto.randomUUID()}`, L = `bcc-ui-message-${crypto.randomUUID()}`, R = !1, z = !1, ne = null, B = null, re = null, ie = null, ae = 0, oe = 0, se = !1, V = !1, U = null, ce = /* @__PURE__ */ new Map(), le = /* @__PURE__ */ new Set(), ue = null, de = null, fe = 0;
4195
+ async function pe() {
4196
+ await lc(e), !t.value && (ve(), ft(), t.value = !0, await ut(), _.value && (dt(_.value.uid), ge(), Te(), !m.value && !V && Ce()));
4184
4197
  }
4185
- async function fe(e) {
4198
+ async function me(e) {
4186
4199
  g.value = null, r.value = !0;
4187
4200
  try {
4188
- await de();
4201
+ await pe();
4189
4202
  let t = qe();
4190
4203
  await H.getLoggedinUser() && t !== e && await H.logout(), Je(e);
4191
4204
  let n = await uc(e);
4192
- _.value = hc(await H.login(n)), dt(_.value.uid), h.value = !0, m.value = typeof navigator < "u" ? !navigator.onLine : !1, me(), Te(), oe || await Ce(), await ke(), qt();
4205
+ _.value = hc(await H.login(n)), dt(_.value.uid), h.value = !0, m.value = typeof navigator < "u" ? !navigator.onLine : !1, ge(), Te(), V || await Ce(), await ke(), qt();
4193
4206
  } catch (e) {
4194
4207
  throw St(), g.value = Z(e, "Unable to sign in to chat."), e;
4195
4208
  } finally {
4196
4209
  r.value = !1;
4197
4210
  }
4198
4211
  }
4199
- async function pe() {
4212
+ async function he() {
4200
4213
  g.value = null;
4201
4214
  try {
4202
4215
  Je(null), Qe(), await H.getLoggedinUser() && await H.logout();
@@ -4204,16 +4217,16 @@ function cc({ environment: e }) {
4204
4217
  St();
4205
4218
  }
4206
4219
  }
4207
- function me() {
4220
+ function ge() {
4208
4221
  let e = lt();
4209
4222
  if (!e) {
4210
- V = null, k.value = [];
4223
+ U = null, k.value = [];
4211
4224
  return;
4212
4225
  }
4213
4226
  let t = `bcc-chat:${G().appId}:${e}`;
4214
- he(t), V = new $s(t), k.value = V.getQueue();
4227
+ _e(t), U = new $s(t), k.value = U.getQueue();
4215
4228
  }
4216
- function he(e) {
4229
+ function _e(e) {
4217
4230
  if (typeof window > "u") return;
4218
4231
  let t = `bcc-chat:${G().appId}:`, n = [];
4219
4232
  for (let r = 0; r < window.localStorage.length; r += 1) {
@@ -4222,33 +4235,27 @@ function cc({ environment: e }) {
4222
4235
  }
4223
4236
  n.forEach((e) => window.localStorage.removeItem(e));
4224
4237
  }
4225
- function ge() {
4226
- L || typeof window > "u" || (window.addEventListener("online", _e), window.addEventListener("offline", ve), L = !0);
4227
- }
4228
- function _e() {
4229
- m.value = !1, ae = !0, oe || Se(!0);
4230
- }
4231
4238
  function ve() {
4232
- m.value = !0, p.value = !1, ye();
4239
+ z || typeof window > "u" || (window.addEventListener("online", N), window.addEventListener("offline", N), window.addEventListener("focus", N), document.addEventListener("visibilitychange", N), z = !0, N());
4233
4240
  }
4234
4241
  function ye() {
4235
- R !== null && (clearTimeout(R), R = null);
4242
+ ne !== null && (clearTimeout(ne), ne = null);
4236
4243
  }
4237
4244
  function be() {
4238
- re = Date.now() + 1500;
4245
+ ae = Date.now() + 1500;
4239
4246
  }
4240
4247
  function xe() {
4241
- return Date.now() < re;
4248
+ return Date.now() < ae;
4242
4249
  }
4243
4250
  function Se(e = !1) {
4244
- if (R !== null || z || m.value || !h.value || oe) return;
4245
- let t = e ? 0 : Math.min(3e4, 1e3 * 2 ** Math.min(ie, 4));
4246
- R = setTimeout(() => {
4247
- R = null, Ce();
4251
+ if (ne !== null || B || m.value || !h.value || V) return;
4252
+ let t = e ? 0 : Math.min(3e4, 1e3 * 2 ** Math.min(oe, 4));
4253
+ ne = setTimeout(() => {
4254
+ ne = null, Ce();
4248
4255
  }, t);
4249
4256
  }
4250
4257
  async function Ce() {
4251
- if (!(m.value || !h.value || oe)) return z || (z = (async () => {
4258
+ if (N(), !(m.value || !h.value || V)) return B || (B = (async () => {
4252
4259
  ye();
4253
4260
  try {
4254
4261
  let e = await H.getLoggedinUser();
@@ -4258,47 +4265,47 @@ function cc({ environment: e }) {
4258
4265
  let n = await uc(t);
4259
4266
  e = await H.login(n);
4260
4267
  }
4261
- _.value = hc(e), h.value = !0, me();
4268
+ _.value = hc(e), h.value = !0, ge();
4262
4269
  let t = H.connect;
4263
- typeof t == "function" && (await t.call(H), p.value = !0), ie = 0, ae && await we();
4270
+ typeof t == "function" && (await t.call(H), p.value = !0), oe = 0, se && await we();
4264
4271
  } catch (e) {
4265
- p.value = !1, ie += 1, Lt(e) || (g.value = Z(e, "Unable to reconnect to chat.")), Se();
4272
+ p.value = !1, oe += 1, Lt(e) || (g.value = Z(e, "Unable to reconnect to chat.")), Se();
4266
4273
  } finally {
4267
- z = null;
4274
+ B = null;
4268
4275
  }
4269
- })(), z);
4276
+ })(), B);
4270
4277
  }
4271
4278
  async function we() {
4272
- return ne || m.value || !h.value || oe || (ne = (async () => {
4273
- ae = !1, g.value = null;
4279
+ return re || m.value || !h.value || V || (re = (async () => {
4280
+ se = !1, g.value = null;
4274
4281
  try {
4275
4282
  await ke(), qt();
4276
4283
  } finally {
4277
- ne = null;
4284
+ re = null;
4278
4285
  }
4279
- })()), ne;
4286
+ })()), re;
4280
4287
  }
4281
4288
  function Te() {
4282
- if (!V || v.value.length > 0) return;
4283
- let e = V.getConversations();
4289
+ if (!U || v.value.length > 0) return;
4290
+ let e = U.getConversations();
4284
4291
  e.length !== 0 && (v.value = bc(e), !T.value && v.value.length > 0 && Ee(T.value));
4285
4292
  }
4286
4293
  function Ee(e) {
4287
- if (!V || !e) return y.value = [], !1;
4288
- let t = V.getMessages(e).sort(xc);
4294
+ if (!U || !e) return y.value = [], !1;
4295
+ let t = U.getMessages(e).sort(xc);
4289
4296
  return y.value = t, t.length > 0;
4290
4297
  }
4291
4298
  async function De() {
4292
- oe = !1, ae = !0, await Ce();
4299
+ V = !1, se = !0, await Ce();
4293
4300
  }
4294
4301
  async function Oe() {
4295
- oe = !0, ae = !1, ye();
4302
+ V = !0, se = !1, ye();
4296
4303
  let e = H.disconnect;
4297
4304
  typeof e == "function" && await e.call(H), p.value = !1;
4298
4305
  }
4299
4306
  async function ke() {
4300
- if (await de(), i.value = !0, g.value = null, m.value && V) {
4301
- v.value = bc(V.getConversations()), P.value && await rt(), i.value = !1;
4307
+ if (await pe(), N(), i.value = !0, g.value = null, m.value) {
4308
+ v.value = bc(U?.getConversations() ?? []), I.value && await rt(), i.value = !1;
4302
4309
  return;
4303
4310
  }
4304
4311
  try {
@@ -4311,9 +4318,9 @@ function cc({ environment: e }) {
4311
4318
  let t = r.get(e.id);
4312
4319
  t && (e.subtitle === "No messages yet" && t.subtitle && t.subtitle !== "No messages yet" && (e.subtitle = t.subtitle), !e.lastMessageAt && t.lastMessageAt && (e.lastMessageAt = t.lastMessageAt), !e.lastMessage && t.lastMessage && (e.lastMessage = t.lastMessage));
4313
4320
  }
4314
- v.value = bc(await mt(t)), V?.setConversations(v.value), P.value && await rt();
4321
+ v.value = bc(await mt(t)), U?.setConversations(v.value), I.value && await rt();
4315
4322
  } catch (e) {
4316
- let t = V?.getConversations() ?? [];
4323
+ let t = U?.getConversations() ?? [];
4317
4324
  if (t.length > 0) {
4318
4325
  v.value = bc(t);
4319
4326
  return;
@@ -4324,7 +4331,7 @@ function cc({ environment: e }) {
4324
4331
  }
4325
4332
  }
4326
4333
  async function Ae(e) {
4327
- T.value = e, E.value = null, b.value = [], U = null, C.value = !1, D.value = null, O.value = null, Ee(e), await rt();
4334
+ T.value = e, E.value = null, b.value = [], de = null, C.value = !1, D.value = null, O.value = null, Ee(e), await rt();
4328
4335
  }
4329
4336
  function je(e) {
4330
4337
  e && (O.value = null), D.value = e;
@@ -4333,14 +4340,14 @@ function cc({ environment: e }) {
4333
4340
  e && (D.value = null), O.value = e;
4334
4341
  }
4335
4342
  async function Ne(e) {
4336
- E.value = e, U = null, C.value = !1, D.value = null, O.value = null, await at(e.id);
4343
+ E.value = e, de = null, C.value = !1, D.value = null, O.value = null, await at(e.id);
4337
4344
  }
4338
4345
  function Pe() {
4339
- E.value = null, b.value = [], U = null, C.value = !1, D.value = null, O.value = null;
4346
+ E.value = null, b.value = [], de = null, C.value = !1, D.value = null, O.value = null;
4340
4347
  }
4341
4348
  async function Fe(e, t) {
4342
4349
  if (u.value) return;
4343
- let n = P.value;
4350
+ let n = I.value;
4344
4351
  if (!n) return;
4345
4352
  let r = Vs(e);
4346
4353
  if (!Hs(r)) return;
@@ -4367,7 +4374,7 @@ function cc({ environment: e }) {
4367
4374
  let e = new H.TextMessage(n.targetId, r, kc(n));
4368
4375
  e.setMuid?.(a), Object.keys(o).length > 0 && e.setMetadata?.(o), i && e.setParentMessageId?.(Number(i));
4369
4376
  let t = await H.sendMessage(e);
4370
- wt(N(t, _.value?.uid)), gt(t), await yt(t), D.value = null;
4377
+ wt(F(t, _.value?.uid)), gt(t), await yt(t), D.value = null;
4371
4378
  } catch (e) {
4372
4379
  if (Lt(e)) {
4373
4380
  Gt("queued", a), Rt(n, r, o, E.value?.id, a), D.value = null;
@@ -4379,7 +4386,7 @@ function cc({ environment: e }) {
4379
4386
  }
4380
4387
  }
4381
4388
  async function Ie(e, t) {
4382
- let n = P.value;
4389
+ let n = I.value;
4383
4390
  if (!n || m.value) return;
4384
4391
  let r = Vs(t);
4385
4392
  if (Hs(r)) {
@@ -4388,7 +4395,7 @@ function cc({ environment: e }) {
4388
4395
  let t;
4389
4396
  e.kind === "text" ? t = new H.TextMessage(n.targetId, r, kc(n)) : (t = new H.MediaMessage(n.targetId, e.source?.getAttachment?.()?.getFileUrl?.() ?? e.source?.getAttachment?.()?.getUrl?.() ?? e.attachments[0]?.url ?? "", e.source?.getType?.() ?? e.type ?? e.kind, kc(n)), t.setCaption(r)), t.setId(Number(e.id));
4390
4397
  let i = await H.editMessage(t);
4391
- wt(N(i, _.value?.uid)), gt(i), O.value = null;
4398
+ wt(F(i, _.value?.uid)), gt(i), O.value = null;
4392
4399
  } catch (e) {
4393
4400
  throw g.value = Z(e, "Unable to edit the message."), e;
4394
4401
  } finally {
@@ -4398,7 +4405,7 @@ function cc({ environment: e }) {
4398
4405
  }
4399
4406
  async function Le(e, t) {
4400
4407
  if (u.value) return;
4401
- let n = P.value;
4408
+ let n = I.value;
4402
4409
  if (!n) return;
4403
4410
  let r = E.value?.id, i = crypto.randomUUID(), a = Dc(Ft(D.value, t), i), o = Nc(e.file);
4404
4411
  u.value = !0, g.value = null;
@@ -4425,7 +4432,7 @@ function cc({ environment: e }) {
4425
4432
  let t = new H.MediaMessage(n.targetId, e.file, o, kc(n));
4426
4433
  t.setMuid?.(i), Object.keys(a).length > 0 && t.setMetadata?.(a), r && t.setParentMessageId?.(Number(r)), e.caption?.trim() && t.setCaption?.(e.caption.trim());
4427
4434
  let s = await H.sendMediaMessage(t);
4428
- wt(N(s, _.value?.uid)), gt(s), await yt(s), D.value = null;
4435
+ wt(F(s, _.value?.uid)), gt(s), await yt(s), D.value = null;
4429
4436
  } catch (t) {
4430
4437
  if (Lt(t)) {
4431
4438
  Gt("queued", i), await Ht(n, e, a, r, i), D.value = null;
@@ -4438,7 +4445,7 @@ function cc({ environment: e }) {
4438
4445
  }
4439
4446
  async function Re(e, t) {
4440
4447
  if (u.value) return;
4441
- let n = P.value;
4448
+ let n = I.value;
4442
4449
  if (!n) return;
4443
4450
  let r = e.question.trim(), i = e.options.map((e) => e.trim()).filter(Boolean);
4444
4451
  if (!r || i.length < 2) return;
@@ -4473,7 +4480,7 @@ function cc({ environment: e }) {
4473
4480
  };
4474
4481
  a && (e.parentMessageId = Number(a)), Object.keys(s).length > 0 && (e.metadata = s);
4475
4482
  let t = await H.callExtension("polls", "POST", "v2/create", e), c = t?.message ?? t?.custom_message ?? t?.data?.message ?? null;
4476
- c ? (Kt(o), wt(N(c, _.value?.uid)), gt(c), await yt(c)) : (Kt(o), await Ct()), D.value = null;
4483
+ c ? (Kt(o), wt(F(c, _.value?.uid)), gt(c), await yt(c)) : (Kt(o), await Ct()), D.value = null;
4477
4484
  } catch (e) {
4478
4485
  if (Lt(e)) {
4479
4486
  Gt("queued", o), zt(n, {
@@ -4528,7 +4535,7 @@ function cc({ environment: e }) {
4528
4535
  let n = Et(e.id, e.parentMessageId) ?? e, r = n.reactions.find((e) => e.emoji === t && e.reactedByMe);
4529
4536
  wt(Dt(n, t));
4530
4537
  try {
4531
- wt(N(r ? await H.removeReaction(Number(e.id), t) : await H.addReaction(Number(e.id), t), _.value?.uid));
4538
+ wt(F(r ? await H.removeReaction(Number(e.id), t) : await H.addReaction(Number(e.id), t), _.value?.uid));
4532
4539
  } catch (e) {
4533
4540
  throw wt(n), g.value = Z(e, "Unable to update the reaction."), e;
4534
4541
  }
@@ -4539,7 +4546,7 @@ function cc({ environment: e }) {
4539
4546
  return;
4540
4547
  }
4541
4548
  if (!m.value) try {
4542
- let t = N(await H.deleteMessage(String(e.id)), _.value?.uid);
4549
+ let t = F(await H.deleteMessage(String(e.id)), _.value?.uid);
4543
4550
  At(t), jt(t);
4544
4551
  } catch (e) {
4545
4552
  throw g.value = Z(e, "Unable to delete the message."), e;
@@ -4570,29 +4577,31 @@ function cc({ environment: e }) {
4570
4577
  }
4571
4578
  }
4572
4579
  async function We(e) {
4573
- let t = e ?? P.value?.targetId, n = _.value?.uid, r = ++ue;
4580
+ let t = e ?? I.value?.targetId, n = _.value?.uid, r = ++fe;
4574
4581
  if (!t || !n) {
4575
- r === ue && (x.value = []);
4582
+ r === fe && (x.value = []);
4576
4583
  return;
4577
4584
  }
4578
- l.value = !0, g.value = null;
4579
- try {
4580
- let e = new H.MessagesRequestBuilder().setLimit(50).setGUID(n).withTags(!0).setTags([t]).build(), i = [], a = [];
4581
- do
4582
- a = await e.fetchPrevious(), i.push(...a.map((e) => N(e, _.value?.uid)));
4583
- while (a.length === 50);
4584
- let o = i.filter((e) => !(e.isDeleted || !e.scheduled?.scheduleDate || t && e.scheduled.originalChatUid && e.scheduled.originalChatUid !== t)).sort((e, t) => (e.scheduled?.scheduleDate?.getTime() ?? e.sentAt.getTime()) - (t.scheduled?.scheduleDate?.getTime() ?? t.sentAt.getTime()));
4585
- if (r !== ue) return;
4586
- x.value = o;
4587
- } catch (e) {
4588
- if (r !== ue) return;
4589
- throw g.value = Z(e, vt("loadScheduledMessagesError")), e;
4590
- } finally {
4591
- r === ue && (l.value = !1);
4585
+ if (!m.value) {
4586
+ l.value = !0, g.value = null;
4587
+ try {
4588
+ let e = new H.MessagesRequestBuilder().setLimit(50).setGUID(n).withTags(!0).setTags([t]).build(), i = [], a = [];
4589
+ do
4590
+ a = await e.fetchPrevious(), i.push(...a.map((e) => F(e, _.value?.uid)));
4591
+ while (a.length === 50);
4592
+ let o = i.filter((e) => !(e.isDeleted || !e.scheduled?.scheduleDate || t && e.scheduled.originalChatUid && e.scheduled.originalChatUid !== t)).sort((e, t) => (e.scheduled?.scheduleDate?.getTime() ?? e.sentAt.getTime()) - (t.scheduled?.scheduleDate?.getTime() ?? t.sentAt.getTime()));
4593
+ if (r !== fe) return;
4594
+ x.value = o;
4595
+ } catch (e) {
4596
+ if (r !== fe) return;
4597
+ throw g.value = Z(e, vt("loadScheduledMessagesError")), e;
4598
+ } finally {
4599
+ r === fe && (l.value = !1);
4600
+ }
4592
4601
  }
4593
4602
  }
4594
4603
  async function Ge(e, t) {
4595
- let n = P.value;
4604
+ let n = I.value;
4596
4605
  if (n) {
4597
4606
  d.value = !0, g.value = null;
4598
4607
  try {
@@ -4695,26 +4704,27 @@ function cc({ environment: e }) {
4695
4704
  }
4696
4705
  }
4697
4706
  async function nt(e) {
4698
- let t = P.value;
4699
- if (!t) return y.value = [], S.value = !1, !1;
4700
- if ((e?.reset || le?.conversationId !== t.id) && (le = {
4707
+ let t = I.value;
4708
+ if (!t || m.value) return y.value = [], S.value = !1, !1;
4709
+ if ((e?.reset || ue?.conversationId !== t.id) && (ue = {
4701
4710
  conversationId: t.id,
4702
4711
  request: Ze(t)
4703
- }, S.value = !0), !le) return !1;
4704
- let n = await tt(le.request), r = await Promise.all(n.map((e) => N(e, _.value?.uid)).filter(Tc).sort(xc).map(et));
4705
- y.value = e?.reset ? Cc(y.value.filter((e) => e.conversationId === t.id && wc(e)), r) : Cc(y.value, r), S.value = n.length === 50, V?.setMessages(t.id, y.value);
4712
+ }, S.value = !0), !ue) return !1;
4713
+ let n = await tt(ue.request), r = await Promise.all(n.map((e) => F(e, _.value?.uid)).filter(Tc).sort(xc).map(et));
4714
+ y.value = e?.reset ? Cc(y.value.filter((e) => e.conversationId === t.id && wc(e)), r) : Cc(y.value, r), S.value = n.length === 50, U?.setMessages(t.id, y.value);
4706
4715
  let i = n[n.length - 1];
4707
4716
  return i && (await bt(i), await yt(i)), n.length > 0;
4708
4717
  }
4709
4718
  async function rt() {
4710
- let e = P.value;
4719
+ N();
4720
+ let e = I.value;
4711
4721
  if (!e) {
4712
- y.value = [], S.value = !1, le = null;
4722
+ y.value = [], S.value = !1, ue = null;
4713
4723
  return;
4714
4724
  }
4715
4725
  let t = Ee(e.id);
4716
- if (a.value = !0, m.value && V) {
4717
- S.value = !1, le = null, a.value = !1;
4726
+ if (a.value = !0, m.value) {
4727
+ S.value = !1, ue = null, a.value = !1;
4718
4728
  return;
4719
4729
  }
4720
4730
  try {
@@ -4722,9 +4732,9 @@ function cc({ environment: e }) {
4722
4732
  ...t,
4723
4733
  lastMessage: y.value.at(-1) ?? null,
4724
4734
  unreadCount: 0
4725
- } : t), V?.setConversations(v.value);
4735
+ } : t), U?.setConversations(v.value);
4726
4736
  } catch (n) {
4727
- let r = V?.getMessages(e.id) ?? [];
4737
+ let r = U?.getMessages(e.id) ?? [];
4728
4738
  if (r.length > 0) {
4729
4739
  t || (y.value = r.sort(xc));
4730
4740
  return;
@@ -4737,24 +4747,24 @@ function cc({ environment: e }) {
4737
4747
  async function it(e) {
4738
4748
  let t = E.value?.id;
4739
4749
  if (!t) return b.value = [], C.value = !1, !1;
4740
- if ((e?.reset || U?.parentMessageId !== t) && (U = {
4750
+ if ((e?.reset || de?.parentMessageId !== t) && (de = {
4741
4751
  parentMessageId: t,
4742
4752
  request: $e(t)
4743
- }, C.value = !0), !U) return !1;
4744
- let n = await U.request.fetchPrevious(), r = await Promise.all(n.map((e) => N(e, _.value?.uid)).filter(Tc).sort(xc).map(et));
4745
- b.value = e?.reset ? Cc(b.value.filter((e) => e.parentMessageId === t && wc(e)), r) : Cc(b.value, r), C.value = n.length === 50, V?.setThreadMessages(t, b.value);
4753
+ }, C.value = !0), !de) return !1;
4754
+ let n = await de.request.fetchPrevious(), r = await Promise.all(n.map((e) => F(e, _.value?.uid)).filter(Tc).sort(xc).map(et));
4755
+ b.value = e?.reset ? Cc(b.value.filter((e) => e.parentMessageId === t && wc(e)), r) : Cc(b.value, r), C.value = n.length === 50, U?.setThreadMessages(t, b.value);
4746
4756
  let i = n[n.length - 1];
4747
4757
  return i && (await bt(i), await yt(i)), n.length > 0;
4748
4758
  }
4749
4759
  async function at(e) {
4750
- if (o.value = !0, m.value && V) {
4751
- b.value = V.getThreadMessages(e).sort(xc), C.value = !1, U = null, o.value = !1;
4760
+ if (o.value = !0, m.value) {
4761
+ b.value = (U?.getThreadMessages(e) ?? []).sort(xc), C.value = !1, de = null, o.value = !1;
4752
4762
  return;
4753
4763
  }
4754
4764
  try {
4755
4765
  await it({ reset: !0 });
4756
4766
  } catch (t) {
4757
- let n = V?.getThreadMessages(e) ?? [];
4767
+ let n = U?.getThreadMessages(e) ?? [];
4758
4768
  if (n.length > 0) {
4759
4769
  b.value = n.sort(xc);
4760
4770
  return;
@@ -4798,7 +4808,7 @@ function cc({ environment: e }) {
4798
4808
  if (n()) return !0;
4799
4809
  if (!e) break;
4800
4810
  }
4801
- for (; S.value && P.value && r < 100;) {
4811
+ for (; S.value && I.value && r < 100;) {
4802
4812
  r += 1;
4803
4813
  let e = await ot();
4804
4814
  if (n()) return !0;
@@ -4811,18 +4821,18 @@ function cc({ environment: e }) {
4811
4821
  _.value = e ? hc(e) : null, h.value = !!e;
4812
4822
  }
4813
4823
  function ft() {
4814
- te ||= (H.addConnectionListener(F, new H.ConnectionListener({
4824
+ R ||= (H.addConnectionListener(te, new H.ConnectionListener({
4815
4825
  onConnected: () => {
4816
- if (p.value = !0, ie = 0, ye(), ae) {
4826
+ if (p.value = !0, oe = 0, ye(), se) {
4817
4827
  we();
4818
4828
  return;
4819
4829
  }
4820
4830
  qt();
4821
4831
  },
4822
4832
  onDisconnected: () => {
4823
- p.value = !1, !m.value && h.value && !oe && (ae = !0, Se(!0));
4833
+ p.value = !1, !m.value && h.value && !V && (se = !0, Se(!0));
4824
4834
  }
4825
- })), H.addMessageListener(I, new H.MessageListener({
4835
+ })), H.addMessageListener(L, new H.MessageListener({
4826
4836
  onTextMessageReceived: (e) => {
4827
4837
  pt(e);
4828
4838
  },
@@ -4839,11 +4849,11 @@ function cc({ environment: e }) {
4839
4849
  xe() || Ct({ includeThread: !1 });
4840
4850
  },
4841
4851
  onMessageEdited: (e) => {
4842
- let t = N(e, _.value?.uid);
4852
+ let t = F(e, _.value?.uid);
4843
4853
  Tc(t) && (_t(t), gt(e));
4844
4854
  },
4845
4855
  onMessageDeleted: (e) => {
4846
- let t = N(e, _.value?.uid);
4856
+ let t = F(e, _.value?.uid);
4847
4857
  t.parentMessageId ? At(t) : (At(t), jt(t)), kt();
4848
4858
  },
4849
4859
  onMessageReactionAdded: () => {
@@ -4861,7 +4871,7 @@ function cc({ environment: e }) {
4861
4871
  })), !0);
4862
4872
  }
4863
4873
  async function pt(e) {
4864
- let t = N(e, _.value?.uid);
4874
+ let t = F(e, _.value?.uid);
4865
4875
  if (Tc(t)) {
4866
4876
  if (gt(e), await bt(e), t.parentMessageId) {
4867
4877
  K(t), Ot(t.parentMessageId), kt();
@@ -4880,7 +4890,7 @@ function cc({ environment: e }) {
4880
4890
  }));
4881
4891
  }
4882
4892
  async function ht(e) {
4883
- let t = V?.getParticipantSettings(e), n = t?.lastUpdated ? Date.now() - t.lastUpdated > 1440 * 60 * 1e3 : !0;
4893
+ let t = U?.getParticipantSettings(e), n = t?.lastUpdated ? Date.now() - t.lastUpdated > 1440 * 60 * 1e3 : !0;
4884
4894
  if (t && (m.value || !n)) return t.mutedUntil;
4885
4895
  if (m.value || !h.value) return t?.mutedUntil ?? null;
4886
4896
  try {
@@ -4897,7 +4907,7 @@ function cc({ environment: e }) {
4897
4907
  });
4898
4908
  if (!i.ok) return t?.mutedUntil ?? null;
4899
4909
  let a = await i.json();
4900
- return V?.storeParticipantSettings({
4910
+ return U?.storeParticipantSettings({
4901
4911
  chatUid: e,
4902
4912
  mutedUntil: a.mutedUntil ?? null,
4903
4913
  lastUpdated: Date.now()
@@ -4907,7 +4917,7 @@ function cc({ environment: e }) {
4907
4917
  }
4908
4918
  }
4909
4919
  function gt(e) {
4910
- let t = N(e, _.value?.uid);
4920
+ let t = F(e, _.value?.uid);
4911
4921
  if (!Tc(t) || t.isDeleted) return;
4912
4922
  let n = e.getConversationId(), r = v.value.find((e) => e.id === n);
4913
4923
  if (!r) {
@@ -4921,13 +4931,13 @@ function cc({ environment: e }) {
4921
4931
  unreadCount: n === T.value ? 0 : r.unreadCount + 1,
4922
4932
  lastMessage: t
4923
4933
  };
4924
- v.value = bc(v.value.map((e) => e.id === n ? i : e)), V?.setConversations(v.value);
4934
+ v.value = bc(v.value.map((e) => e.id === n ? i : e)), U?.setConversations(v.value);
4925
4935
  }
4926
4936
  function _t(e) {
4927
- y.value = Sc(y.value, e), T.value && V?.setMessages(T.value, y.value);
4937
+ y.value = Sc(y.value, e), T.value && U?.setMessages(T.value, y.value);
4928
4938
  }
4929
4939
  function K(e) {
4930
- e.parentMessageId === E.value?.id && (b.value = Sc(b.value, e), e.parentMessageId && V?.setThreadMessages(e.parentMessageId, b.value));
4940
+ e.parentMessageId === E.value?.id && (b.value = Sc(b.value, e), e.parentMessageId && U?.setThreadMessages(e.parentMessageId, b.value));
4931
4941
  }
4932
4942
  async function yt(e) {
4933
4943
  if (m.value) return;
@@ -4943,18 +4953,18 @@ function cc({ environment: e }) {
4943
4953
  return m.value ? [] : pc(await H.getMessageReceipts(String(e.id)));
4944
4954
  }
4945
4955
  function St() {
4946
- r.value = !1, i.value = !1, a.value = !1, o.value = !1, s.value = !1, c.value = !1, l.value = !1, u.value = !1, d.value = !1, f.value = !1, p.value = !1, ye(), ie = 0, ae = !1, oe = !1, h.value = !1, _.value = null, v.value = [], y.value = [], b.value = [], x.value = [], E.value = null, D.value = null, O.value = null, k.value = [], T.value = null, S.value = !1, C.value = !1, le = null, U = null, ce.clear();
4956
+ r.value = !1, i.value = !1, a.value = !1, o.value = !1, s.value = !1, c.value = !1, l.value = !1, u.value = !1, d.value = !1, f.value = !1, p.value = !1, ye(), oe = 0, se = !1, V = !1, h.value = !1, _.value = null, v.value = [], y.value = [], b.value = [], x.value = [], E.value = null, D.value = null, O.value = null, k.value = [], T.value = null, S.value = !1, C.value = !1, ue = null, de = null, le.clear();
4947
4957
  }
4948
4958
  async function Ct(e) {
4949
- if (B) return B;
4959
+ if (ie) return ie;
4950
4960
  let t = e?.includeThread ?? !0;
4951
- B = (async () => {
4952
- P.value && await rt(), t && E.value && await at(E.value.id);
4961
+ ie = (async () => {
4962
+ I.value && await rt(), t && E.value && await at(E.value.id);
4953
4963
  })();
4954
4964
  try {
4955
- await B;
4965
+ await ie;
4956
4966
  } finally {
4957
- B = null;
4967
+ ie = null;
4958
4968
  }
4959
4969
  }
4960
4970
  function wt(e) {
@@ -5001,13 +5011,13 @@ function cc({ environment: e }) {
5001
5011
  y.value = Sc(y.value, r), E.value?.id === e && (E.value = r);
5002
5012
  }
5003
5013
  function kt() {
5004
- T.value && V?.setMessages(T.value, y.value), E.value && V?.setThreadMessages(E.value.id, b.value);
5014
+ T.value && U?.setMessages(T.value, y.value), E.value && U?.setThreadMessages(E.value.id, b.value);
5005
5015
  }
5006
5016
  function At(e) {
5007
- if (e.parentMessageId ? (b.value = b.value.filter((t) => t.id !== e.id), V?.setThreadMessages(e.parentMessageId, b.value)) : (y.value = y.value.filter((t) => t.id !== e.id), T.value && V?.setMessages(T.value, y.value)), e.muid) {
5017
+ if (e.parentMessageId ? (b.value = b.value.filter((t) => t.id !== e.id), U?.setThreadMessages(e.parentMessageId, b.value)) : (y.value = y.value.filter((t) => t.id !== e.id), T.value && U?.setMessages(T.value, y.value)), e.muid) {
5008
5018
  k.value = k.value.filter((t) => t.muid !== e.muid);
5009
- let t = V?.getQueue().filter((t) => t.muid === e.muid) ?? [];
5010
- for (let e of t) V?.dequeue(e.id), se.delete(e.id), e.kind === "attachment" && V?.deleteQueuedAttachment(e.id);
5019
+ let t = U?.getQueue().filter((t) => t.muid === e.muid) ?? [];
5020
+ for (let e of t) U?.dequeue(e.id), ce.delete(e.id), e.kind === "attachment" && U?.deleteQueuedAttachment(e.id);
5011
5021
  }
5012
5022
  e.parentMessageId || Mt(e.conversationId);
5013
5023
  }
@@ -5034,7 +5044,7 @@ function cc({ environment: e }) {
5034
5044
  ...e,
5035
5045
  subtitle: "No messages yet",
5036
5046
  lastMessageAt: void 0
5037
- } : e : e)), V?.setConversations(v.value);
5047
+ } : e : e)), U?.setConversations(v.value);
5038
5048
  }
5039
5049
  function Mt(e, t) {
5040
5050
  let n = y.value.length > 0 ? y.value[y.value.length - 1] : null, r = t ?? n;
@@ -5043,7 +5053,7 @@ function cc({ environment: e }) {
5043
5053
  subtitle: r ? Oc(r) : "No messages yet",
5044
5054
  lastMessageAt: r?.sentAt,
5045
5055
  lastMessage: r
5046
- } : t)), V?.setConversations(v.value);
5056
+ } : t)), U?.setConversations(v.value);
5047
5057
  }
5048
5058
  function Nt(e) {
5049
5059
  v.value = bc(v.value.map((t) => t.id === e.conversationId ? {
@@ -5052,7 +5062,7 @@ function cc({ environment: e }) {
5052
5062
  lastMessageAt: e.sentAt,
5053
5063
  lastMessage: e,
5054
5064
  unreadCount: 0
5055
- } : t)), V?.setConversations(v.value);
5065
+ } : t)), U?.setConversations(v.value);
5056
5066
  }
5057
5067
  function Pt(e) {
5058
5068
  let t = /* @__PURE__ */ new Date(), n = It(e.metadata);
@@ -5110,7 +5120,7 @@ function cc({ environment: e }) {
5110
5120
  };
5111
5121
  }
5112
5122
  function Lt(e) {
5113
- if (typeof navigator < "u" && !navigator.onLine) return !0;
5123
+ if (M() || m.value) return !0;
5114
5124
  let t = Z(e, "").toLowerCase();
5115
5125
  return t.includes("network") || t.includes("failed to fetch") || t.includes("socket") || t.includes("offline");
5116
5126
  }
@@ -5203,14 +5213,14 @@ function cc({ environment: e }) {
5203
5213
  parentMessageId: r,
5204
5214
  createdAt: o.sentAt.toISOString()
5205
5215
  };
5206
- se.set(s.id, t.file);
5216
+ ce.set(s.id, t.file);
5207
5217
  try {
5208
- await V?.storeQueuedAttachment(s.id, t.file);
5218
+ await U?.storeQueuedAttachment(s.id, t.file);
5209
5219
  } catch {}
5210
5220
  Ut(o, s);
5211
5221
  }
5212
5222
  function Ut(e, t) {
5213
- k.value = [...k.value, t], V?.enqueue(t), Wt(e);
5223
+ k.value = [...k.value, t], U?.enqueue(t), Wt(e);
5214
5224
  }
5215
5225
  function Wt(e) {
5216
5226
  e.parentMessageId ? (E.value?.id === e.parentMessageId && (b.value = Sc(b.value, e)), Ot(e.parentMessageId)) : y.value = Sc(y.value, e), Nt(e), kt();
@@ -5238,14 +5248,14 @@ function cc({ environment: e }) {
5238
5248
  if (!(f.value || k.value.length === 0 || !h.value || m.value)) {
5239
5249
  f.value = !0;
5240
5250
  try {
5241
- let e = [...k.value].filter((e) => !ce.has(e.id)).sort((e, t) => e.createdAt.localeCompare(t.createdAt));
5242
- for (let t of e) if (!ce.has(t.id)) {
5243
- ce.add(t.id);
5251
+ let e = [...k.value].filter((e) => !le.has(e.id)).sort((e, t) => e.createdAt.localeCompare(t.createdAt));
5252
+ for (let t of e) if (!le.has(t.id)) {
5253
+ le.add(t.id);
5244
5254
  try {
5245
5255
  let e = await Jt(t);
5246
- k.value = k.value.filter((e) => e.id !== t.id), V?.dequeue(t.id), se.delete(t.id), t.kind === "attachment" && await V?.deleteQueuedAttachment(t.id), Kt(t.muid), e ? wt(N(e, _.value?.uid)) : await Ct();
5256
+ k.value = k.value.filter((e) => e.id !== t.id), U?.dequeue(t.id), ce.delete(t.id), t.kind === "attachment" && await U?.deleteQueuedAttachment(t.id), Kt(t.muid), e ? wt(F(e, _.value?.uid)) : await Ct();
5247
5257
  } finally {
5248
- ce.delete(t.id);
5258
+ le.delete(t.id);
5249
5259
  }
5250
5260
  }
5251
5261
  } catch (e) {
@@ -5269,7 +5279,7 @@ function cc({ environment: e }) {
5269
5279
  return r?.message ?? r?.custom_message ?? r?.data?.message ?? null;
5270
5280
  }
5271
5281
  if (e.kind === "attachment" && e.attachment) {
5272
- let n = se.get(e.id) ?? await V?.getQueuedAttachment(e.id) ?? null;
5282
+ let n = ce.get(e.id) ?? await U?.getQueuedAttachment(e.id) ?? null;
5273
5283
  if (!n) throw Error(`Queued attachment ${e.attachment.name} is no longer available for upload.`);
5274
5284
  let r = new H.MediaMessage(e.targetId, n, e.attachment.kind, t);
5275
5285
  return r.setMuid?.(e.muid), e.metadata && Object.keys(e.metadata).length > 0 && r.setMetadata?.(e.metadata), e.parentMessageId && r.setParentMessageId?.(Number(e.parentMessageId)), e.attachment.caption && r.setCaption?.(e.attachment.caption), H.sendMediaMessage(r);
@@ -5302,15 +5312,15 @@ function cc({ environment: e }) {
5302
5312
  hasOlderThreadMessages: C,
5303
5313
  pendingQueueCount: j,
5304
5314
  activeConversationId: T,
5305
- activeConversation: P,
5315
+ activeConversation: I,
5306
5316
  activeThreadParentMessage: E,
5307
5317
  replyToMessage: D,
5308
5318
  editingMessage: O,
5309
- init: de,
5319
+ init: pe,
5310
5320
  connectRealtime: De,
5311
5321
  disconnectRealtime: Oe,
5312
- login: fe,
5313
- logout: pe,
5322
+ login: me,
5323
+ logout: he,
5314
5324
  fetchConversations: ke,
5315
5325
  selectConversation: Ae,
5316
5326
  sendTextMessage: Fe,
@@ -5335,7 +5345,7 @@ function cc({ environment: e }) {
5335
5345
  toggleReaction: Be,
5336
5346
  translateMessage: Ue,
5337
5347
  mentionDisplayNamesByUid: A,
5338
- rememberMentionDisplayNames: M
5348
+ rememberMentionDisplayNames: ee
5339
5349
  };
5340
5350
  }
5341
5351
  async function lc(e) {
@@ -7057,7 +7067,7 @@ function ud(e, t, r, i) {
7057
7067
  e.key === "Escape" && (O(), g());
7058
7068
  }
7059
7069
  }
7060
- function ee(e) {
7070
+ function N(e) {
7061
7071
  e.preventDefault();
7062
7072
  let t = e.clipboardData?.getData("text/html") ?? "", n = e.clipboardData?.getData("text/plain") ?? "";
7063
7073
  if (document.execCommand("styleWithCSS", !1, "false"), t) {
@@ -7069,7 +7079,7 @@ function ud(e, t, r, i) {
7069
7079
  }
7070
7080
  n && (document.execCommand("insertText", !1, n), E());
7071
7081
  }
7072
- function N(e) {
7082
+ function ee(e) {
7073
7083
  if (!k()) {
7074
7084
  O();
7075
7085
  return;
@@ -7106,10 +7116,10 @@ function ud(e, t, r, i) {
7106
7116
  editorKey: o,
7107
7117
  focusEditor: D,
7108
7118
  formatMenuPosition: c,
7109
- handleContextMenu: N,
7119
+ handleContextMenu: ee,
7110
7120
  handleInput: j,
7111
7121
  handleKeydown: M,
7112
- handlePaste: ee,
7122
+ handlePaste: N,
7113
7123
  hideFormatMenu: O,
7114
7124
  resetEditor: L,
7115
7125
  showFormatMenu: s,
@@ -7148,7 +7158,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7148
7158
  {
7149
7159
  kind: "file",
7150
7160
  label: "attachFile",
7151
- icon: le,
7161
+ icon: ce,
7152
7162
  testId: "composer-attach-file"
7153
7163
  }
7154
7164
  ];
@@ -7192,7 +7202,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7192
7202
  class: "composer-actions-menu__item",
7193
7203
  "data-testid": "composer-create-poll",
7194
7204
  onClick: g
7195
- }, [o("span", pd, [(S(), r(D(j(U)), { class: "size-5" }))]), o("span", null, k(j(u)("createPoll")), 1)])], 512)), [[P, c.value]]);
7205
+ }, [o("span", pd, [(S(), r(D(j(le)), { class: "size-5" }))]), o("span", null, k(j(u)("createPoll")), 1)])], 512)), [[P, c.value]]);
7196
7206
  }
7197
7207
  }), $ = (e, t) => {
7198
7208
  let n = e.__vccOpts || e;
@@ -7342,7 +7352,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7342
7352
  ])]))), 128)),
7343
7353
  l(j(z), {
7344
7354
  label: j(d)("addOption"),
7345
- icon: j(ce),
7355
+ icon: j(U),
7346
7356
  text: "",
7347
7357
  onClick: h
7348
7358
  }, null, 8, ["label", "icon"])
@@ -7516,31 +7526,31 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7516
7526
  video: "video/*",
7517
7527
  audio: "audio/*",
7518
7528
  file: "*/*"
7519
- }, u = e, d = s, f = w(null), m = w(null), _ = w(null), v = w("file"), y = w(!1), b = w(!1), x = w(!1), { t: C } = K(), T = null, E = w(null), D = w(null), O = w(null), { applyFormat: A, editorKey: M, formatMenuPosition: ee, focusEditor: N, handleContextMenu: P, handleInput: I, handleKeydown: te, handlePaste: R, hideFormatMenu: ne, resetEditor: B, showFormatMenu: re, triggerCandidates: ie, triggerMenuPosition: ae, highlightedTriggerIndex: oe, showTriggerMenu: V, selectTriggerCandidate: H } = ud(E, D, O, {
7529
+ }, u = e, d = s, f = w(null), m = w(null), _ = w(null), v = w("file"), y = w(!1), b = w(!1), x = w(!1), { t: C } = K(), T = null, E = w(null), D = w(null), O = w(null), { applyFormat: A, editorKey: M, formatMenuPosition: N, focusEditor: ee, handleContextMenu: P, handleInput: I, handleKeydown: te, handlePaste: R, hideFormatMenu: ne, resetEditor: B, showFormatMenu: re, triggerCandidates: ie, triggerMenuPosition: ae, highlightedTriggerIndex: oe, showTriggerMenu: se, selectTriggerCandidate: H } = ud(E, D, O, {
7520
7530
  getModelValue: () => u.modelValue,
7521
7531
  updateModelValue: (e) => d("update:modelValue", e),
7522
7532
  submit: () => Te(),
7523
7533
  getMentionCandidates: () => u.mentionCandidates ?? [],
7524
7534
  getMentionNameByUid: () => u.mentionNameByUid ?? {},
7525
7535
  mentionsEnabled: () => u.mentionsEnabled ?? (u.mentionCandidates?.length ?? 0) > 0
7526
- }), le = n(() => c[v.value]), U = n(() => {
7536
+ }), ce = n(() => c[v.value]), le = n(() => {
7527
7537
  if (!_.value) return null;
7528
7538
  let e = _.value.type;
7529
7539
  return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
7530
7540
  }), ue = n(() => {
7531
- switch (U.value) {
7541
+ switch (le.value) {
7532
7542
  case "image": return C("image");
7533
7543
  case "video": return C("video");
7534
7544
  case "audio": return C("audio");
7535
7545
  case "file": return C("file");
7536
7546
  default: return C("attachment");
7537
7547
  }
7538
- }), pe = n(() => !u.editingMessage && !u.replyToMessage ? "" : u.compact ? "pt-1" : "pt-1.5"), me = n(() => Hs(u.modelValue) || !!_.value), he = n(() => me.value && U.value !== "file"), ge = n(() => _.value ? C("attachmentSummary", { name: _.value.name }) : Us(u.modelValue) || C("currentDraftWillBeScheduled"));
7548
+ }), pe = n(() => !u.editingMessage && !u.replyToMessage ? "" : u.compact ? "pt-1" : "pt-1.5"), me = n(() => Hs(u.modelValue) || !!_.value), he = n(() => me.value && le.value !== "file"), ge = n(() => _.value ? C("attachmentSummary", { name: _.value.name }) : Us(u.modelValue) || C("currentDraftWillBeScheduled"));
7539
7549
  F(() => u.resetSignal, () => {
7540
7550
  B(), _.value = null, y.value = !1, b.value = !1, f.value && (f.value.value = "");
7541
7551
  });
7542
7552
  async function _e() {
7543
- await h(), N();
7553
+ await h(), ee();
7544
7554
  }
7545
7555
  function ye() {
7546
7556
  m.value?.hide();
@@ -7622,7 +7632,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7622
7632
  ref: f,
7623
7633
  type: "file",
7624
7634
  class: "hidden",
7625
- accept: le.value,
7635
+ accept: ce.value,
7626
7636
  disabled: e.disabled,
7627
7637
  onChange: xe,
7628
7638
  onCancel: ye
@@ -7668,7 +7678,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7668
7678
  disabled: e.disabled || !!e.editingMessage,
7669
7679
  "aria-label": j(C)("addToMessage"),
7670
7680
  "data-testid": "composer-actions-button",
7671
- icon: j(ce),
7681
+ icon: j(U),
7672
7682
  onClick: we
7673
7683
  }, null, 8, [
7674
7684
  "class",
@@ -7693,7 +7703,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7693
7703
  onContextmenu: n[7] ||= (...e) => j(P) && j(P)(...e)
7694
7704
  }, null, 42, Gd)),
7695
7705
  _.value || e.editingMessage || e.contextLabel || e.offlineMode ? (S(), a("div", Kd, [
7696
- e.editingMessage ? (S(), r(j(se), {
7706
+ e.editingMessage ? (S(), r(j(V), {
7697
7707
  key: 0,
7698
7708
  text: j(C)("editing"),
7699
7709
  context: "info",
@@ -7701,7 +7711,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7701
7711
  size: "sm",
7702
7712
  class: "composer-meta-tag"
7703
7713
  }, null, 8, ["text"])) : i("", !0),
7704
- e.contextLabel ? (S(), r(j(se), {
7714
+ e.contextLabel ? (S(), r(j(V), {
7705
7715
  key: 1,
7706
7716
  text: e.contextLabel,
7707
7717
  context: "contrast",
@@ -7751,7 +7761,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7751
7761
  ], 2),
7752
7762
  l(xd, {
7753
7763
  visible: j(re),
7754
- position: j(ee),
7764
+ position: j(N),
7755
7765
  onFormat: n[9] ||= (e) => j(A)(e)
7756
7766
  }, null, 8, ["visible", "position"]),
7757
7767
  l(zd, {
@@ -7759,7 +7769,7 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7759
7769
  ref: O,
7760
7770
  "highlighted-index": j(oe),
7761
7771
  "onUpdate:highlightedIndex": n[10] ||= (e) => p(oe) ? oe.value = e : null,
7762
- visible: j(V),
7772
+ visible: j(se),
7763
7773
  position: j(ae),
7764
7774
  candidates: j(ie),
7765
7775
  onSelect: n[11] ||= (e) => j(H)(e)
@@ -7840,10 +7850,10 @@ var dd = ["data-testid", "onClick"], fd = { class: "composer-actions-menu__icon"
7840
7850
  Zu(f, "ui:closeComposerActions", () => {
7841
7851
  M.value?.hideComposerActions();
7842
7852
  });
7843
- async function ee() {
7853
+ async function N() {
7844
7854
  await M.value?.focusEditor();
7845
7855
  }
7846
- return t({ focusEditor: ee }), (e, t) => y.value ? (S(), r(Yd, {
7856
+ return t({ focusEditor: N }), (e, t) => y.value ? (S(), r(Yd, {
7847
7857
  key: 0,
7848
7858
  ref_key: "composerRef",
7849
7859
  ref: M,
@@ -8309,7 +8319,7 @@ var uf = { class: "w-full" }, df = {
8309
8319
  props: { attachment: {} },
8310
8320
  emits: ["close"],
8311
8321
  setup(t, { emit: s }) {
8312
- let c = t, l = s, u = w(null), d = w(null), f = n(() => !!c.attachment?.url), p = n(() => c.attachment?.kind === "image"), m = n(() => c.attachment?.kind === "video"), h = n(() => c.attachment?.kind === "audio"), { t: _ } = K(), { scale: y, translateX: b, translateY: x, isDragging: C, resetTransform: T, handlePointerDown: E, handlePointerMove: O, handlePointerUp: A, handlePointerCancel: M, handleWheel: ee, handleDoubleClick: N } = lf({
8322
+ let c = t, l = s, u = w(null), d = w(null), f = n(() => !!c.attachment?.url), p = n(() => c.attachment?.kind === "image"), m = n(() => c.attachment?.kind === "video"), h = n(() => c.attachment?.kind === "audio"), { t: _ } = K(), { scale: y, translateX: b, translateY: x, isDragging: C, resetTransform: T, handlePointerDown: E, handlePointerMove: O, handlePointerUp: A, handlePointerCancel: M, handleWheel: N, handleDoubleClick: ee } = lf({
8313
8323
  viewportRef: u,
8314
8324
  imageRef: d,
8315
8325
  isImage: () => p.value
@@ -8349,8 +8359,8 @@ var uf = { class: "w-full" }, df = {
8349
8359
  onPointerup: s[2] ||= (...e) => j(A) && j(A)(...e),
8350
8360
  onPointercancel: s[3] ||= (...e) => j(M) && j(M)(...e),
8351
8361
  onPointerleave: s[4] ||= (...e) => j(A) && j(A)(...e),
8352
- onWheel: s[5] ||= (...e) => j(ee) && j(ee)(...e),
8353
- onDblclick: s[6] ||= (...e) => j(N) && j(N)(...e)
8362
+ onWheel: s[5] ||= (...e) => j(N) && j(N)(...e),
8363
+ onDblclick: s[6] ||= (...e) => j(ee) && j(ee)(...e)
8354
8364
  }, [o("img", {
8355
8365
  ref_key: "imageRef",
8356
8366
  ref: d,
@@ -8712,7 +8722,7 @@ var uf = { class: "w-full" }, df = {
8712
8722
  function l() {
8713
8723
  return t.message.senderName?.trim() || (t.message.isOwn ? s("you") : s("system"));
8714
8724
  }
8715
- return (t, n) => (S(), a("div", fp, [o("span", pp, k(l()), 1), e.message.scheduled?.scheduleDate ? (S(), r(j(se), {
8725
+ return (t, n) => (S(), a("div", fp, [o("span", pp, k(l()), 1), e.message.scheduled?.scheduleDate ? (S(), r(j(V), {
8716
8726
  key: 0,
8717
8727
  text: j(s)("scheduledDateLabel", { date: c(e.message.scheduled.scheduleDate) }),
8718
8728
  context: "warn",
@@ -9089,7 +9099,7 @@ var uf = { class: "w-full" }, df = {
9089
9099
  label: t.conversation.avatar ? void 0 : t.conversation.title.slice(0, 1).toUpperCase(),
9090
9100
  shape: "circle",
9091
9101
  class: "chat-header__avatar shrink-0"
9092
- }, null, 8, ["image", "label"]), o("div", Yp, [o("p", Xp, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", Zp, [t.parentMessage ? (S(), a("span", Qp, k(t.parentMessage.senderName), 1)) : (S(), a("span", $p, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", em, [t.conversation?.tags?.length ? (S(), a("div", tm, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(se), {
9102
+ }, null, 8, ["image", "label"]), o("div", Yp, [o("p", Xp, k(t.parentMessage ? j(n)("thread") : t.conversation.title), 1), o("p", Zp, [t.parentMessage ? (S(), a("span", Qp, k(t.parentMessage.senderName), 1)) : (S(), a("span", $p, k(t.conversation.memberCount ? j(n)("members", { count: t.conversation.memberCount }) : j(n)("groupChat")), 1))])])])) : i("", !0), o("div", em, [t.conversation?.tags?.length ? (S(), a("div", tm, [(S(!0), a(e, null, T(t.conversation.tags.slice(0, 3), (e) => (S(), r(j(V), {
9093
9103
  key: e,
9094
9104
  text: e,
9095
9105
  context: "secondary",
@@ -9122,7 +9132,7 @@ var uf = { class: "w-full" }, df = {
9122
9132
  }), O = n(() => {
9123
9133
  let e = u.conversation.value;
9124
9134
  return e ? _.value ? _.value.senderName : e.memberCount ? c("members", { count: e.memberCount }) : c("groupChat") : "";
9125
- }), A = n(() => u.conversation.value?.memberCount ?? 0), M = w(null), N = w(null), P = n(() => !!_.value), F = n(() => P.value && !y.value), I = n(() => Eu(u.conversation.value)), te = ee("threadRef"), { handleThreadScroll: L } = of({
9135
+ }), A = n(() => u.conversation.value?.memberCount ?? 0), M = w(null), ee = w(null), P = n(() => !!_.value), F = n(() => P.value && !y.value), I = n(() => Eu(u.conversation.value)), te = N("threadRef"), { handleThreadScroll: L } = of({
9126
9136
  getConversation: () => u.conversation.value,
9127
9137
  getParentMessage: () => _.value,
9128
9138
  getMessages: () => m.value,
@@ -9131,7 +9141,7 @@ var uf = { class: "w-full" }, df = {
9131
9141
  canLoadOlder: () => b.value,
9132
9142
  onLoadOlder: () => f.emit("list:loadOlder", { target: s.target }),
9133
9143
  threadRef: te
9134
- }), R = ee("actionMenuRef"), { activeActionMessage: z, handleMessageContextMenu: ne, handleMessageTap: B, resetActionMenuState: re, reactToMessage: ie, toggleInlineReaction: ae, getActionItems: oe } = $d({
9144
+ }), R = N("actionMenuRef"), { activeActionMessage: z, handleMessageContextMenu: ne, handleMessageTap: B, resetActionMenuState: re, reactToMessage: ie, toggleInlineReaction: ae, getActionItems: oe } = $d({
9135
9145
  canUseMessageActions: () => u.canUseMessageActions.value,
9136
9146
  canReact: () => u.canReact.value,
9137
9147
  canReply: () => u.canReply.value,
@@ -9153,21 +9163,21 @@ var uf = { class: "w-full" }, df = {
9153
9163
  },
9154
9164
  onMenuOpen: () => f.emit("ui:closeComposerActions")
9155
9165
  });
9156
- function V(e) {
9166
+ function se(e) {
9157
9167
  return !!e.url && [
9158
9168
  "image",
9159
9169
  "video",
9160
9170
  "audio"
9161
9171
  ].includes(e.kind);
9162
9172
  }
9163
- function se(e) {
9164
- V(e) && (M.value = e);
9173
+ function V(e) {
9174
+ se(e) && (M.value = e);
9165
9175
  }
9166
9176
  function H() {
9167
9177
  M.value = null;
9168
9178
  }
9169
- async function ce(e, t) {
9170
- N.value = `${e.id}:${t}`;
9179
+ async function U(e, t) {
9180
+ ee.value = `${e.id}:${t}`;
9171
9181
  try {
9172
9182
  f.emit("message:votePoll", {
9173
9183
  message: e,
@@ -9175,19 +9185,19 @@ var uf = { class: "w-full" }, df = {
9175
9185
  });
9176
9186
  } finally {
9177
9187
  window.setTimeout(() => {
9178
- N.value === `${e.id}:${t}` && (N.value = null);
9188
+ ee.value === `${e.id}:${t}` && (ee.value = null);
9179
9189
  }, 300);
9180
9190
  }
9181
9191
  }
9182
- function le(e) {
9192
+ function ce(e) {
9183
9193
  v.value && f.emit("message:openThread", e);
9184
9194
  }
9185
- function U(e, t) {
9195
+ function le(e, t) {
9186
9196
  return e.getFullYear() !== t.getFullYear() || e.getMonth() !== t.getMonth() || e.getDate() !== t.getDate();
9187
9197
  }
9188
9198
  function ue(e) {
9189
9199
  let t = m.value;
9190
- return e === 0 ? !0 : U(t[e].sentAt, t[e - 1].sentAt);
9200
+ return e === 0 ? !0 : le(t[e].sentAt, t[e - 1].sentAt);
9191
9201
  }
9192
9202
  return (t, n) => (S(), a(e, null, [
9193
9203
  o("section", { class: g(["message-list-root", [t.$attrs.class, F.value ? "message-list--embedded-thread" : P.value ? "message-list--thread" : "message-list--main"]]) }, [y.value ? E(t.$slots, "header", {
@@ -9220,15 +9230,15 @@ var uf = { class: "w-full" }, df = {
9220
9230
  "can-react": j(u).canReact.value,
9221
9231
  "can-open-thread": !_.value && v.value,
9222
9232
  "can-show-sender-avatar": I.value,
9223
- "pending-option-key": N.value,
9233
+ "pending-option-key": ee.value,
9224
9234
  "action-message-class": s.actionMessageClass,
9225
9235
  "action-message-row-class": s.actionMessageRowClass,
9226
9236
  onContextmenu: (e) => j(ne)(o, e),
9227
9237
  onTap: (e) => j(B)(o, e),
9228
- onOpenMedia: se,
9229
- onVotePoll: (e) => ce(o, e),
9238
+ onOpenMedia: V,
9239
+ onVotePoll: (e) => U(o, e),
9230
9240
  onToggleReaction: (e) => j(ae)(o, e),
9231
- onOpenThread: (e) => le(o),
9241
+ onOpenThread: (e) => ce(o),
9232
9242
  onOpenReferencedMessage: n[0] ||= (e) => j(f).emit("message:openReference", e),
9233
9243
  onAnchorclick: n[1] ||= (e, n) => t.$emit("anchorclick", e, n)
9234
9244
  }, null, 8, [
@@ -9336,19 +9346,19 @@ var uf = { class: "w-full" }, df = {
9336
9346
  }, {
9337
9347
  default: I(() => [e.message ? (S(), a("div", Sm, [o("div", Cm, [o("p", wm, k(j(Ws)(e.message, j(d)("message"), j(f).mentionNameByUid.value)), 1), o("div", Tm, [
9338
9348
  o("div", Em, [o("p", Dm, k(j(d)("sent")), 1), o("p", Om, k(g(e.message.sentAt)), 1)]),
9339
- o("div", km, [o("div", Am, [o("p", jm, k(j(d)("deliveredToAll")), 1), h.value.length ? (S(), r(j(se), {
9349
+ o("div", km, [o("div", Am, [o("p", jm, k(j(d)("deliveredToAll")), 1), h.value.length ? (S(), r(j(V), {
9340
9350
  key: 0,
9341
9351
  text: String(h.value.length),
9342
9352
  context: "secondary",
9343
9353
  rounded: ""
9344
9354
  }, null, 8, ["text"])) : i("", !0)]), o("p", Mm, k(_(e.message.receipts.deliveredAt, h.value.length)), 1)]),
9345
- o("div", Nm, [o("div", Pm, [o("p", Fm, k(j(d)("readByAll")), 1), m.value.length ? (S(), r(j(se), {
9355
+ o("div", Nm, [o("div", Pm, [o("p", Fm, k(j(d)("readByAll")), 1), m.value.length ? (S(), r(j(V), {
9346
9356
  key: 0,
9347
9357
  text: String(m.value.length),
9348
9358
  context: "success",
9349
9359
  rounded: ""
9350
9360
  }, null, 8, ["text"])) : i("", !0)]), o("p", Im, k(_(e.message.receipts.readAt, m.value.length)), 1)])
9351
- ])]), e.loading ? (S(), a("div", Lm, [l(j(V), {
9361
+ ])]), e.loading ? (S(), a("div", Lm, [l(j(se), {
9352
9362
  style: {
9353
9363
  width: "2.5rem",
9354
9364
  height: "2.5rem"
@@ -9454,7 +9464,7 @@ var uf = { class: "w-full" }, df = {
9454
9464
  function M() {
9455
9465
  d.value = null, f.value = null, p.value = !1, m.value = "", h.value = "", g.value = "";
9456
9466
  }
9457
- function ee(e) {
9467
+ function N(e) {
9458
9468
  return {
9459
9469
  ...e,
9460
9470
  text: ""
@@ -9497,7 +9507,7 @@ var uf = { class: "w-full" }, df = {
9497
9507
  "close-label": j(v)("close"),
9498
9508
  onClose: s[3] ||= (e) => u("close")
9499
9509
  }, {
9500
- default: I(() => [o("div", Vm, [t.loading ? (S(), a("div", Hm, [l(j(V), {
9510
+ default: I(() => [o("div", Vm, [t.loading ? (S(), a("div", Hm, [l(j(se), {
9501
9511
  style: {
9502
9512
  width: "2.75rem",
9503
9513
  height: "2.75rem"
@@ -9507,17 +9517,17 @@ var uf = { class: "w-full" }, df = {
9507
9517
  key: e.id,
9508
9518
  class: "border-default rounded-lg border px-4 py-3"
9509
9519
  }, [o("div", Gm, [o("div", Km, [
9510
- o("div", qm, [o("div", Jm, [e.kind === "poll" ? (S(), r(j(se), {
9520
+ o("div", qm, [o("div", Jm, [e.kind === "poll" ? (S(), r(j(V), {
9511
9521
  key: 0,
9512
9522
  text: j(v)("poll"),
9513
9523
  context: "info",
9514
9524
  rounded: ""
9515
- }, null, 8, ["text"])) : e.attachments.length ? (S(), r(j(se), {
9525
+ }, null, 8, ["text"])) : e.attachments.length ? (S(), r(j(V), {
9516
9526
  key: 1,
9517
9527
  text: D(e.attachments[0].kind),
9518
9528
  context: "info",
9519
9529
  rounded: ""
9520
- }, null, 8, ["text"])) : (S(), r(j(se), {
9530
+ }, null, 8, ["text"])) : (S(), r(j(V), {
9521
9531
  key: 2,
9522
9532
  text: j(v)("message"),
9523
9533
  context: "info",
@@ -9529,7 +9539,7 @@ var uf = { class: "w-full" }, df = {
9529
9539
  onClick: (t) => B(e)
9530
9540
  }, null, 8, ["icon", "onClick"])]),
9531
9541
  o("div", Ym, [o("p", Xm, k(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (S(), a("p", Zm, k(e.poll.question), 1)) : (S(), a("p", Qm, k(j(Ws)(e, j(v)("attachment"))), 1))]),
9532
- L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", $m, [l(cp, { message: ee(e) }, null, 8, ["message"])])) : i("", !0)
9542
+ L(e) && !(d.value === e.id && f.value === "text") ? (S(), a("div", $m, [l(cp, { message: N(e) }, null, 8, ["message"])])) : i("", !0)
9533
9543
  ]), o("div", eh, [e.kind === "poll" ? i("", !0) : (S(), r(j(z), {
9534
9544
  key: 0,
9535
9545
  label: j(v)("edit"),
@@ -9556,7 +9566,7 @@ var uf = { class: "w-full" }, df = {
9556
9566
  "onUpdate:modelValue": s[0] ||= (e) => m.value = e,
9557
9567
  type: "date",
9558
9568
  class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
9559
- }, null, 512), [[N, m.value]]), te(o("input", {
9569
+ }, null, 512), [[ee, m.value]]), te(o("input", {
9560
9570
  "onUpdate:modelValue": s[1] ||= (e) => h.value = e,
9561
9571
  type: "time",
9562
9572
  inputmode: "numeric",
@@ -9564,7 +9574,7 @@ var uf = { class: "w-full" }, df = {
9564
9574
  pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
9565
9575
  "aria-label": "Time (24-hour)",
9566
9576
  class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
9567
- }, null, 512), [[N, h.value]])]), o("div", rh, [l(j(z), {
9577
+ }, null, 512), [[ee, h.value]])]), o("div", rh, [l(j(z), {
9568
9578
  label: j(v)("save"),
9569
9579
  size: "small",
9570
9580
  disabled: !m.value || !b.value,
@@ -9579,7 +9589,7 @@ var uf = { class: "w-full" }, df = {
9579
9589
  text: "",
9580
9590
  onClick: M
9581
9591
  }, null, 8, ["label"])])])) : d.value === e.id && f.value === "text" ? (S(), a("div", ih, [
9582
- L(e) ? (S(), a("div", ah, [l(cp, { message: ee(e) }, null, 8, ["message"]), o("div", oh, [l(j(z), {
9592
+ L(e) ? (S(), a("div", ah, [l(cp, { message: N(e) }, null, 8, ["message"]), o("div", oh, [l(j(z), {
9583
9593
  icon: j(fe),
9584
9594
  "aria-label": j(v)("remove"),
9585
9595
  text: "",
@@ -9593,7 +9603,7 @@ var uf = { class: "w-full" }, df = {
9593
9603
  rows: "3",
9594
9604
  class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none",
9595
9605
  placeholder: j(v)("writeMessage")
9596
- }, null, 8, sh), [[N, g.value]]),
9606
+ }, null, 8, sh), [[ee, g.value]]),
9597
9607
  o("div", ch, [l(j(z), {
9598
9608
  label: j(v)("cancel"),
9599
9609
  size: "small",
@@ -9711,7 +9721,7 @@ var uf = { class: "w-full" }, df = {
9711
9721
  onMembersChanged: (e) => {
9712
9722
  p("chatMembersFetched", e), T.value?.rememberMentionDisplayNames(e);
9713
9723
  }
9714
- }), N = Ou({
9724
+ }), ee = Ou({
9715
9725
  chatClient: T,
9716
9726
  selectedConversation: O,
9717
9727
  getPropIsReadOnly: () => f.isReadOnly,
@@ -9723,7 +9733,7 @@ var uf = { class: "w-full" }, df = {
9723
9733
  currentUserId: T.value?.currentUser.value?.uid
9724
9734
  })
9725
9735
  });
9726
- Au(N);
9736
+ Au(ee);
9727
9737
  let P = Mu({
9728
9738
  chatClient: T,
9729
9739
  selectedConversation: O,
@@ -9744,10 +9754,10 @@ var uf = { class: "w-full" }, df = {
9744
9754
  fetchErrorFallback: m("loadMessageReceiptsError")
9745
9755
  });
9746
9756
  Wu(R);
9747
- let z = ee("mainComposerRef"), ne = ee("threadComposerRef"), B = Lu({
9757
+ let z = N("mainComposerRef"), ne = N("threadComposerRef"), B = Lu({
9748
9758
  chatClient: T,
9749
- sendOptions: N.sendOptions,
9750
- mentionNameByUid: N.mentionNameByUid,
9759
+ sendOptions: ee.sendOptions,
9760
+ mentionNameByUid: ee.mentionNameByUid,
9751
9761
  afterSchedule: () => R.openScheduledMessages(),
9752
9762
  mainComposerRef: z,
9753
9763
  threadComposerRef: ne
@@ -9755,7 +9765,7 @@ var uf = { class: "w-full" }, df = {
9755
9765
  zu(B);
9756
9766
  let re = Ju();
9757
9767
  Yu(re), Ku({
9758
- conversation: N,
9768
+ conversation: ee,
9759
9769
  composer: B,
9760
9770
  dialogs: R,
9761
9771
  bus: re
@@ -9798,7 +9808,7 @@ var uf = { class: "w-full" }, df = {
9798
9808
  e.conversations.value.length === 0 && await e.fetchConversations();
9799
9809
  let t = e.conversations.value.find((e) => e.targetId === f.chatUid || e.id === f.chatUid) ?? null;
9800
9810
  if (!t) try {
9801
- t = await V(f.chatUid, e);
9811
+ t = await se(f.chatUid, e);
9802
9812
  } catch (e) {
9803
9813
  if (e && typeof e == "object" && "code" in e && e.code === "ERR_NOT_A_MEMBER") {
9804
9814
  v.value = !1, C.value = !0, p("chatMembersFetched", []);
@@ -9815,7 +9825,7 @@ var uf = { class: "w-full" }, df = {
9815
9825
  }
9816
9826
  }
9817
9827
  }
9818
- async function V(e, t) {
9828
+ async function se(e, t) {
9819
9829
  let n = await gu.getGroup(e, !0);
9820
9830
  if (!n || typeof n != "object") return null;
9821
9831
  let r = String(n.getGuid());
@@ -9834,7 +9844,7 @@ var uf = { class: "w-full" }, df = {
9834
9844
  };
9835
9845
  return t.conversations.value = [i, ...t.conversations.value.filter((e) => e.id !== i.id && e.targetId !== r)], i;
9836
9846
  }
9837
- function se(e, t) {
9847
+ function V(e, t) {
9838
9848
  p("linkClicked", e, t);
9839
9849
  }
9840
9850
  let H = w(!1);
@@ -9846,11 +9856,11 @@ var uf = { class: "w-full" }, df = {
9846
9856
  let e = T.value;
9847
9857
  e && e.activeConversation.value === O.value && e.selectConversation(null);
9848
9858
  });
9849
- async function ce(e) {
9850
- return await new Promise((e) => setTimeout(e, 100)), H.value ? ie(e) : (await new Promise((e) => setTimeout(e, 110)), ce(e));
9859
+ async function U(e) {
9860
+ return await new Promise((e) => setTimeout(e, 100)), H.value ? ie(e) : (await new Promise((e) => setTimeout(e, 110)), U(e));
9851
9861
  }
9852
9862
  return r({
9853
- scrollToMessage: ce,
9863
+ scrollToMessage: U,
9854
9864
  groupMembers: n(() => A.value)
9855
9865
  }), (n, r) => (S(), a("div", {
9856
9866
  ref_key: "chatRootRef",
@@ -9876,7 +9886,7 @@ var uf = { class: "w-full" }, df = {
9876
9886
  "show-header": L.value,
9877
9887
  "action-message-class": t.actionMessageClass,
9878
9888
  "action-message-row-class": t.actionMessageRowClass,
9879
- onAnchorclick: se
9889
+ onAnchorclick: V
9880
9890
  }, s({
9881
9891
  composer: I(() => [l(Zd, {
9882
9892
  ref_key: "mainComposerRef",