@ethora/chat-component 26.5.5 → 26.5.7

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.
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as g, jsxs as U, Fragment as He } from "react/jsx-runtime";
2
2
  import * as Ft from "react";
3
- import at, { useRef as ve, useState as de, useCallback as me, useEffect as ge, createContext as $u, useContext as ec, useDebugValue as L0, createElement as Xk, useMemo as Ye, Fragment as Jc, forwardRef as Kk, PureComponent as Jk } from "react";
3
+ import ot, { useRef as ve, useState as de, useCallback as me, useEffect as ge, createContext as $u, useContext as ec, useDebugValue as L0, createElement as Xk, useMemo as Ye, Fragment as Jc, forwardRef as Kk, PureComponent as Jk } from "react";
4
4
  function hi(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
6
  }
@@ -33,7 +33,7 @@ var B0;
33
33
  function $k() {
34
34
  if (B0) return Zc;
35
35
  B0 = 1;
36
- var e = at;
36
+ var e = ot;
37
37
  function t(u, c) {
38
38
  return u === c && (u !== 0 || 1 / u === 1 / c) || u !== u && c !== c;
39
39
  }
@@ -88,7 +88,7 @@ function e5() {
88
88
  return u === c && (u !== 0 || 1 / u === 1 / c) || u !== u && c !== c;
89
89
  }
90
90
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
91
- var t = at, n = typeof Object.is == "function" ? Object.is : e, i = t.useSyncExternalStore, r = t.useRef, s = t.useEffect, a = t.useMemo, o = t.useDebugValue;
91
+ var t = ot, n = typeof Object.is == "function" ? Object.is : e, i = t.useSyncExternalStore, r = t.useRef, s = t.useEffect, a = t.useMemo, o = t.useDebugValue;
92
92
  $c.useSyncExternalStoreWithSelector = function(u, c, l, d, f) {
93
93
  var h = r(null);
94
94
  if (h.current === null) {
@@ -19509,7 +19509,7 @@ function e2(e, t) {
19509
19509
  return !On(n, t);
19510
19510
  });
19511
19511
  }
19512
- var Tc = 1, Mr = 1, c4 = 0, Gt = 0, st = 0, Zr = "";
19512
+ var Tc = 1, Mr = 1, c4 = 0, Gt = 0, at = 0, Zr = "";
19513
19513
  function Sc(e, t, n, i, r, s, a, o) {
19514
19514
  return { value: e, root: t, parent: n, type: i, props: r, children: s, line: Tc, column: Mr, length: a, return: "", siblings: o };
19515
19515
  }
@@ -19522,13 +19522,13 @@ function sr(e) {
19522
19522
  Us(e, e.siblings);
19523
19523
  }
19524
19524
  function bP() {
19525
- return st;
19525
+ return at;
19526
19526
  }
19527
19527
  function yP() {
19528
- return st = Gt > 0 ? ct(Zr, --Gt) : 0, Mr--, st === 10 && (Mr = 1, Tc--), st;
19528
+ return at = Gt > 0 ? ct(Zr, --Gt) : 0, Mr--, at === 10 && (Mr = 1, Tc--), at;
19529
19529
  }
19530
19530
  function en() {
19531
- return st = Gt < c4 ? ct(Zr, Gt++) : 0, Mr++, st === 10 && (Mr = 1, Tc++), st;
19531
+ return at = Gt < c4 ? ct(Zr, Gt++) : 0, Mr++, at === 10 && (Mr = 1, Tc++), at;
19532
19532
  }
19533
19533
  function Oi() {
19534
19534
  return ct(Zr, Gt);
@@ -19587,25 +19587,25 @@ function Rd(e) {
19587
19587
  return o4(xc(Gt - 1, h1(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
19588
19588
  }
19589
19589
  function EP(e) {
19590
- for (; (st = Oi()) && st < 33; )
19590
+ for (; (at = Oi()) && at < 33; )
19591
19591
  en();
19592
- return f1(e) > 2 || f1(st) > 3 ? "" : " ";
19592
+ return f1(e) > 2 || f1(at) > 3 ? "" : " ";
19593
19593
  }
19594
19594
  function CP(e, t) {
19595
- for (; --t && en() && !(st < 48 || st > 102 || st > 57 && st < 65 || st > 70 && st < 97); )
19595
+ for (; --t && en() && !(at < 48 || at > 102 || at > 57 && at < 65 || at > 70 && at < 97); )
19596
19596
  ;
19597
19597
  return xc(e, Zo() + (t < 6 && Oi() == 32 && en() == 32));
19598
19598
  }
19599
19599
  function h1(e) {
19600
19600
  for (; en(); )
19601
- switch (st) {
19601
+ switch (at) {
19602
19602
  // ] ) " '
19603
19603
  case e:
19604
19604
  return Gt;
19605
19605
  // " '
19606
19606
  case 34:
19607
19607
  case 39:
19608
- e !== 34 && e !== 39 && h1(st);
19608
+ e !== 34 && e !== 39 && h1(at);
19609
19609
  break;
19610
19610
  // (
19611
19611
  case 40:
@@ -19619,8 +19619,8 @@ function h1(e) {
19619
19619
  return Gt;
19620
19620
  }
19621
19621
  function _P(e, t) {
19622
- for (; en() && e + st !== 57; )
19623
- if (e + st === 84 && Oi() === 47)
19622
+ for (; en() && e + at !== 57; )
19623
+ if (e + at === 84 && Oi() === 47)
19624
19624
  break;
19625
19625
  return "/*" + xc(t, Gt - 1) + "*" + Jh(e === 47 ? e : en());
19626
19626
  }
@@ -20391,9 +20391,9 @@ function lD(e) {
20391
20391
  return h.name || $r(15), Ci(f, h.name);
20392
20392
  }, h4).toString() : "", d;
20393
20393
  }
20394
- var dD = new k4(), v1 = lD(), C4 = at.createContext({ shouldForwardProp: void 0, styleSheet: dD, stylis: v1 });
20394
+ var dD = new k4(), v1 = lD(), C4 = ot.createContext({ shouldForwardProp: void 0, styleSheet: dD, stylis: v1 });
20395
20395
  C4.Consumer;
20396
- at.createContext(void 0);
20396
+ ot.createContext(void 0);
20397
20397
  function d2() {
20398
20398
  return ec(C4);
20399
20399
  }
@@ -20483,7 +20483,7 @@ var mD = m4(Ic), pD = (function() {
20483
20483
  }
20484
20484
  return r;
20485
20485
  }, e;
20486
- })(), S4 = at.createContext(void 0);
20486
+ })(), S4 = ot.createContext(void 0);
20487
20487
  S4.Consumer;
20488
20488
  var Dd = {}, h2 = /* @__PURE__ */ new Set();
20489
20489
  function AD(e, t, n) {
@@ -20507,7 +20507,7 @@ function AD(e, t, n) {
20507
20507
  var y = new pD(n, f, i ? r.componentStyle : void 0);
20508
20508
  function C(E, w) {
20509
20509
  return (function(v, _, R) {
20510
- var O = v.attrs, S = v.componentStyle, P = v.defaultProps, x = v.foldedComponentIds, I = v.styledComponentId, D = v.target, F = at.useContext(S4), W = d2(), Q = v.shouldForwardProp || W.shouldForwardProp;
20510
+ var O = v.attrs, S = v.componentStyle, P = v.defaultProps, x = v.foldedComponentIds, I = v.styledComponentId, D = v.target, F = ot.useContext(S4), W = d2(), Q = v.shouldForwardProp || W.shouldForwardProp;
20511
20511
  process.env.NODE_ENV !== "production" && L0(I);
20512
20512
  var K = LP(_, F, P) || Lr, ee = (function(ne, te, Ae) {
20513
20513
  for (var oe, fe = Rt(Rt({}, te), { className: void 0, theme: Ae }), J = 0; J < ne.length; J += 1) {
@@ -20527,7 +20527,7 @@ function AD(e, t, n) {
20527
20527
  })(k, E, w);
20528
20528
  }
20529
20529
  C.displayName = d;
20530
- var k = at.forwardRef(C);
20530
+ var k = ot.forwardRef(C);
20531
20531
  return k.attrs = h, k.componentStyle = y, k.displayName = d, k.shouldForwardProp = m, k.foldedComponentIds = i ? xi(r.foldedComponentIds, r.styledComponentId) : "", k.styledComponentId = f, k.target = i ? r.target : e, Object.defineProperty(k, "defaultProps", { get: function() {
20532
20532
  return this._foldedDefaultProps;
20533
20533
  }, set: function(E) {
@@ -21343,7 +21343,7 @@ const KD = (e) => e.length === 0 ? "" : e.length === 1 ? `${e[0]} is typing` : e
21343
21343
  roomMessages: l,
21344
21344
  usersSet: c
21345
21345
  };
21346
- }, ot = () => {
21346
+ }, it = () => {
21347
21347
  const e = we((o) => o.chatSettingStore.user), t = we(
21348
21348
  (o) => o.chatSettingStore.activeFile
21349
21349
  ), n = we(
@@ -22212,7 +22212,7 @@ const KD = (e) => e.length === 0 ? "" : e.length === 1 ? `${e[0]} is typing` : e
22212
22212
  isReply: s,
22213
22213
  activeMessage: a
22214
22214
  }) => {
22215
- const { CustomScrollableArea: o, CustomNewMessageLabel: u } = Nc(), { composing: c, messages: l, composingList: d } = sn(n).room, { user: f } = ot();
22215
+ const { CustomScrollableArea: o, CustomNewMessageLabel: u } = Nc(), { composing: c, messages: l, composingList: d } = sn(n).room, { user: f } = it();
22216
22216
  Mn("chat-room-load-more-loader", r);
22217
22217
  const [h, m] = de(!1), [A, b] = de(0), [y, C] = de(null), k = ve(l.length), E = ve(null), w = ve({}), v = ve(!0), _ = Ye(() => l.map((J) => ({
22218
22218
  ...J,
@@ -22418,7 +22418,7 @@ const KD = (e) => e.length === 0 ? "" : e.length === 1 ? `${e[0]} is typing` : e
22418
22418
  color: i?.colors?.primary,
22419
22419
  children: [
22420
22420
  r && /* @__PURE__ */ g(tn, { color: i?.colors?.primary }),
22421
- a && /* @__PURE__ */ U(at.Fragment, { children: [
22421
+ a && /* @__PURE__ */ U(ot.Fragment, { children: [
22422
22422
  /* @__PURE__ */ g(
22423
22423
  e,
22424
22424
  {
@@ -22446,9 +22446,14 @@ const KD = (e) => e.length === 0 ? "" : e.length === 1 ? `${e[0]} is typing` : e
22446
22446
  zD,
22447
22447
  {
22448
22448
  onClick: T,
22449
- color: i?.colors?.primary,
22449
+ color: i?.colors?.iconsBg || i?.colors?.primary,
22450
22450
  children: [
22451
- /* @__PURE__ */ g(B4, { color: i?.colors?.secondary || "white" }),
22451
+ /* @__PURE__ */ g(
22452
+ B4,
22453
+ {
22454
+ color: i?.colors?.icons || i?.colors?.secondary || "white"
22455
+ }
22456
+ ),
22452
22457
  A > 0 && /* @__PURE__ */ g("span", { className: "count", children: A })
22453
22458
  ]
22454
22459
  }
@@ -22647,7 +22652,7 @@ const DO = H.div`
22647
22652
  cursor: not-allowed;
22648
22653
  opacity: 0.6;
22649
22654
  }
22650
- `, Te = at.forwardRef(({
22655
+ `, Te = ot.forwardRef(({
22651
22656
  text: e,
22652
22657
  EndIcon: t,
22653
22658
  loading: n = !1,
@@ -22734,7 +22739,7 @@ const DO = H.div`
22734
22739
  isRecording: t,
22735
22740
  handleSendClick: n
22736
22741
  }) => {
22737
- const { config: i } = ot(), r = An(i), s = zs(i), [a, o] = de(null), [u, c] = de(0), l = ve(null), d = ve([]), f = ve(null), h = (E) => {
22742
+ const { config: i } = it(), r = An(i), s = zs(i), [a, o] = de(null), [u, c] = de(0), l = ve(null), d = ve([]), f = ve(null), h = (E) => {
22738
22743
  const w = Math.floor(E / 60), v = E % 60;
22739
22744
  return `${w.toString().padStart(2, "0")}:${v.toString().padStart(2, "0")}`;
22740
22745
  }, m = me(() => {
@@ -22859,14 +22864,14 @@ Dt.prototype.property = "";
22859
22864
  Dt.prototype.spaceSeparated = !1;
22860
22865
  Dt.prototype.space = void 0;
22861
22866
  let aM = 0;
22862
- const Se = $i(), it = $i(), E1 = $i(), ue = $i(), We = $i(), kr = $i(), Lt = $i();
22867
+ const Se = $i(), rt = $i(), E1 = $i(), ue = $i(), We = $i(), kr = $i(), Lt = $i();
22863
22868
  function $i() {
22864
22869
  return 2 ** ++aM;
22865
22870
  }
22866
22871
  const C1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22867
22872
  __proto__: null,
22868
22873
  boolean: Se,
22869
- booleanish: it,
22874
+ booleanish: rt,
22870
22875
  commaOrSpaceSeparated: Lt,
22871
22876
  commaSeparated: kr,
22872
22877
  number: ue,
@@ -22919,10 +22924,10 @@ function es(e) {
22919
22924
  const W4 = es({
22920
22925
  properties: {
22921
22926
  ariaActiveDescendant: null,
22922
- ariaAtomic: it,
22927
+ ariaAtomic: rt,
22923
22928
  ariaAutoComplete: null,
22924
- ariaBusy: it,
22925
- ariaChecked: it,
22929
+ ariaBusy: rt,
22930
+ ariaChecked: rt,
22926
22931
  ariaColCount: ue,
22927
22932
  ariaColIndex: ue,
22928
22933
  ariaColSpan: ue,
@@ -22930,36 +22935,36 @@ const W4 = es({
22930
22935
  ariaCurrent: null,
22931
22936
  ariaDescribedBy: We,
22932
22937
  ariaDetails: null,
22933
- ariaDisabled: it,
22938
+ ariaDisabled: rt,
22934
22939
  ariaDropEffect: We,
22935
22940
  ariaErrorMessage: null,
22936
- ariaExpanded: it,
22941
+ ariaExpanded: rt,
22937
22942
  ariaFlowTo: We,
22938
- ariaGrabbed: it,
22943
+ ariaGrabbed: rt,
22939
22944
  ariaHasPopup: null,
22940
- ariaHidden: it,
22945
+ ariaHidden: rt,
22941
22946
  ariaInvalid: null,
22942
22947
  ariaKeyShortcuts: null,
22943
22948
  ariaLabel: null,
22944
22949
  ariaLabelledBy: We,
22945
22950
  ariaLevel: ue,
22946
22951
  ariaLive: null,
22947
- ariaModal: it,
22948
- ariaMultiLine: it,
22949
- ariaMultiSelectable: it,
22952
+ ariaModal: rt,
22953
+ ariaMultiLine: rt,
22954
+ ariaMultiSelectable: rt,
22950
22955
  ariaOrientation: null,
22951
22956
  ariaOwns: We,
22952
22957
  ariaPlaceholder: null,
22953
22958
  ariaPosInSet: ue,
22954
- ariaPressed: it,
22955
- ariaReadOnly: it,
22959
+ ariaPressed: rt,
22960
+ ariaReadOnly: rt,
22956
22961
  ariaRelevant: null,
22957
- ariaRequired: it,
22962
+ ariaRequired: rt,
22958
22963
  ariaRoleDescription: We,
22959
22964
  ariaRowCount: ue,
22960
22965
  ariaRowIndex: ue,
22961
22966
  ariaRowSpan: ue,
22962
- ariaSelected: it,
22967
+ ariaSelected: rt,
22963
22968
  ariaSetSize: ue,
22964
22969
  ariaSort: null,
22965
22970
  ariaValueMax: ue,
@@ -23013,7 +23018,7 @@ const oM = es({
23013
23018
  cols: ue,
23014
23019
  colSpan: null,
23015
23020
  content: null,
23016
- contentEditable: it,
23021
+ contentEditable: rt,
23017
23022
  controls: Se,
23018
23023
  controlsList: We,
23019
23024
  coords: ue | kr,
@@ -23027,7 +23032,7 @@ const oM = es({
23027
23032
  dirName: null,
23028
23033
  disabled: Se,
23029
23034
  download: E1,
23030
- draggable: it,
23035
+ draggable: rt,
23031
23036
  encType: null,
23032
23037
  enterKeyHint: null,
23033
23038
  fetchPriority: null,
@@ -23198,7 +23203,7 @@ const oM = es({
23198
23203
  sizes: null,
23199
23204
  slot: null,
23200
23205
  span: ue,
23201
- spellCheck: it,
23206
+ spellCheck: rt,
23202
23207
  src: null,
23203
23208
  srcDoc: null,
23204
23209
  srcLang: null,
@@ -23213,7 +23218,7 @@ const oM = es({
23213
23218
  type: null,
23214
23219
  typeMustMatch: Se,
23215
23220
  useMap: null,
23216
- value: it,
23221
+ value: rt,
23217
23222
  width: ue,
23218
23223
  wrap: null,
23219
23224
  writingSuggestions: null,
@@ -23305,7 +23310,7 @@ const oM = es({
23305
23310
  // `<table>`
23306
23311
  scheme: null,
23307
23312
  // `<meta>`
23308
- scrolling: it,
23313
+ scrolling: rt,
23309
23314
  // `<frame>`. Use overflow in the child context
23310
23315
  standby: null,
23311
23316
  // `<object>`
@@ -31864,14 +31869,14 @@ Yt.prototype.commaOrSpaceSeparated = !1;
31864
31869
  Yt.prototype.mustUseProperty = !1;
31865
31870
  Yt.prototype.defined = !1;
31866
31871
  let Oj = 0;
31867
- const _e = er(), rt = er(), Z6 = er(), ce = er(), Ve = er(), Er = er(), Bt = er();
31872
+ const _e = er(), st = er(), Z6 = er(), ce = er(), Ve = er(), Er = er(), Bt = er();
31868
31873
  function er() {
31869
31874
  return 2 ** ++Oj;
31870
31875
  }
31871
31876
  const M1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31872
31877
  __proto__: null,
31873
31878
  boolean: _e,
31874
- booleanish: rt,
31879
+ booleanish: st,
31875
31880
  commaOrSpaceSeparated: Bt,
31876
31881
  commaSeparated: Er,
31877
31882
  number: ce,
@@ -31953,10 +31958,10 @@ const iw = is({
31953
31958
  },
31954
31959
  properties: {
31955
31960
  ariaActiveDescendant: null,
31956
- ariaAtomic: rt,
31961
+ ariaAtomic: st,
31957
31962
  ariaAutoComplete: null,
31958
- ariaBusy: rt,
31959
- ariaChecked: rt,
31963
+ ariaBusy: st,
31964
+ ariaChecked: st,
31960
31965
  ariaColCount: ce,
31961
31966
  ariaColIndex: ce,
31962
31967
  ariaColSpan: ce,
@@ -31964,36 +31969,36 @@ const iw = is({
31964
31969
  ariaCurrent: null,
31965
31970
  ariaDescribedBy: Ve,
31966
31971
  ariaDetails: null,
31967
- ariaDisabled: rt,
31972
+ ariaDisabled: st,
31968
31973
  ariaDropEffect: Ve,
31969
31974
  ariaErrorMessage: null,
31970
- ariaExpanded: rt,
31975
+ ariaExpanded: st,
31971
31976
  ariaFlowTo: Ve,
31972
- ariaGrabbed: rt,
31977
+ ariaGrabbed: st,
31973
31978
  ariaHasPopup: null,
31974
- ariaHidden: rt,
31979
+ ariaHidden: st,
31975
31980
  ariaInvalid: null,
31976
31981
  ariaKeyShortcuts: null,
31977
31982
  ariaLabel: null,
31978
31983
  ariaLabelledBy: Ve,
31979
31984
  ariaLevel: ce,
31980
31985
  ariaLive: null,
31981
- ariaModal: rt,
31982
- ariaMultiLine: rt,
31983
- ariaMultiSelectable: rt,
31986
+ ariaModal: st,
31987
+ ariaMultiLine: st,
31988
+ ariaMultiSelectable: st,
31984
31989
  ariaOrientation: null,
31985
31990
  ariaOwns: Ve,
31986
31991
  ariaPlaceholder: null,
31987
31992
  ariaPosInSet: ce,
31988
- ariaPressed: rt,
31989
- ariaReadOnly: rt,
31993
+ ariaPressed: st,
31994
+ ariaReadOnly: st,
31990
31995
  ariaRelevant: null,
31991
- ariaRequired: rt,
31996
+ ariaRequired: st,
31992
31997
  ariaRoleDescription: Ve,
31993
31998
  ariaRowCount: ce,
31994
31999
  ariaRowIndex: ce,
31995
32000
  ariaRowSpan: ce,
31996
- ariaSelected: rt,
32001
+ ariaSelected: st,
31997
32002
  ariaSetSize: ce,
31998
32003
  ariaSort: null,
31999
32004
  ariaValueMax: ce,
@@ -32039,7 +32044,7 @@ const iw = is({
32039
32044
  cols: ce,
32040
32045
  colSpan: null,
32041
32046
  content: null,
32042
- contentEditable: rt,
32047
+ contentEditable: st,
32043
32048
  controls: _e,
32044
32049
  controlsList: Ve,
32045
32050
  coords: ce | Er,
@@ -32053,7 +32058,7 @@ const iw = is({
32053
32058
  dirName: null,
32054
32059
  disabled: _e,
32055
32060
  download: Z6,
32056
- draggable: rt,
32061
+ draggable: st,
32057
32062
  encType: null,
32058
32063
  enterKeyHint: null,
32059
32064
  fetchPriority: null,
@@ -32224,7 +32229,7 @@ const iw = is({
32224
32229
  sizes: null,
32225
32230
  slot: null,
32226
32231
  span: ce,
32227
- spellCheck: rt,
32232
+ spellCheck: st,
32228
32233
  src: null,
32229
32234
  srcDoc: null,
32230
32235
  srcLang: null,
@@ -32239,7 +32244,7 @@ const iw = is({
32239
32244
  type: null,
32240
32245
  typeMustMatch: _e,
32241
32246
  useMap: null,
32242
- value: rt,
32247
+ value: st,
32243
32248
  width: ce,
32244
32249
  wrap: null,
32245
32250
  writingSuggestions: null,
@@ -32331,7 +32336,7 @@ const iw = is({
32331
32336
  // `<table>`
32332
32337
  scheme: null,
32333
32338
  // `<meta>`
32334
- scrolling: rt,
32339
+ scrolling: st,
32335
32340
  // `<frame>`. Use overflow in the child context
32336
32341
  standby: null,
32337
32342
  // `<object>`
@@ -39446,11 +39451,11 @@ const Fw = ({ text: e }) => e ? /* @__PURE__ */ g(
39446
39451
  };
39447
39452
  return r && document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
39448
39453
  }, [r]), /* @__PURE__ */ U(YW, { children: [
39449
- t ? at.cloneElement(t, {
39454
+ t ? ot.cloneElement(t, {
39450
39455
  ref: o,
39451
39456
  onClick: c
39452
39457
  }) : /* @__PURE__ */ g(Te, { onClick: c, children: i ?? /* @__PURE__ */ g(kO, {}) }),
39453
- r && /* @__PURE__ */ g(XW, { ref: a, style: u, children: e.map((l, d) => /* @__PURE__ */ U(at.Fragment, { children: [
39458
+ r && /* @__PURE__ */ g(XW, { ref: a, style: u, children: e.map((l, d) => /* @__PURE__ */ U(ot.Fragment, { children: [
39454
39459
  /* @__PURE__ */ U(
39455
39460
  KW,
39456
39461
  {
@@ -39720,31 +39725,34 @@ const Ki = ({
39720
39725
  placeholderIcon: o,
39721
39726
  disableOverlay: u
39722
39727
  }) => {
39723
- const { backgroundColor: c } = Ww(e), l = (m) => {
39724
- if (!m) return "";
39725
- const b = m.normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim().split(/\s+/), y = (E) => E && /^[\p{L}\p{N}\p{P}]/u.test(E[0]) ? E[0].toUpperCase() : "", C = y(b[0] || ""), k = y(b[1] || "");
39726
- return C + k;
39727
- }, d = () => !t && e ? l(e) : "", f = (m) => {
39728
- const A = m.target.files?.[0];
39729
- A && i?.onUpload && i.onUpload(A);
39730
- }, h = () => {
39728
+ const { config: c } = it(), l = c?.colors?.iconsBg, d = c?.colors?.icons, { backgroundColor: f } = Ww(e), h = l || f, m = (C) => {
39729
+ if (!C) return "";
39730
+ const E = C.normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim().split(/\s+/), w = (R) => R && /^[\p{L}\p{N}\p{P}]/u.test(R[0]) ? R[0].toUpperCase() : "", v = w(E[0] || ""), _ = w(E[1] || "");
39731
+ return v + _;
39732
+ }, A = () => !t && e ? m(e) : "", b = (C) => {
39733
+ const k = C.target.files?.[0];
39734
+ k && i?.onUpload && i.onUpload(k);
39735
+ }, y = () => {
39731
39736
  i?.active && document.getElementById("avatar-file-input")?.click();
39732
39737
  };
39733
39738
  return /* @__PURE__ */ U(
39734
39739
  LD,
39735
39740
  {
39736
- bgColor: t ? "transparent" : c,
39741
+ bgColor: t ? "transparent" : h,
39737
39742
  size: n,
39738
39743
  isClickable: a || !!i?.active,
39739
39744
  children: [
39740
39745
  /* @__PURE__ */ U(
39741
39746
  BD,
39742
39747
  {
39743
- bgColor: t ? "transparent" : c,
39748
+ bgColor: t ? "transparent" : h,
39744
39749
  size: n,
39745
39750
  isClickable: a || s === "participant" && !!i?.active,
39746
- onClick: h,
39747
- style: { fontSize: n >= 64 ? "24px" : "18px" },
39751
+ onClick: y,
39752
+ style: {
39753
+ fontSize: n >= 64 ? "24px" : "18px",
39754
+ ...d ? { color: d } : {}
39755
+ },
39748
39756
  children: [
39749
39757
  t ? /* @__PURE__ */ g(
39750
39758
  FD,
@@ -39753,7 +39761,7 @@ const Ki = ({
39753
39761
  alt: "avatar icon",
39754
39762
  size: n
39755
39763
  }
39756
- ) : o || d(),
39764
+ ) : o || A(),
39757
39765
  i?.active && /* @__PURE__ */ U(He, { children: [
39758
39766
  /* @__PURE__ */ g(
39759
39767
  UD,
@@ -39761,7 +39769,7 @@ const Ki = ({
39761
39769
  type: "file",
39762
39770
  id: "avatar-file-input",
39763
39771
  accept: "image/png, image/jpeg",
39764
- onChange: f
39772
+ onChange: b
39765
39773
  }
39766
39774
  ),
39767
39775
  !u && /* @__PURE__ */ g(jD, { children: /* @__PURE__ */ g(Pc, { style: { fontSize: n / 2 }, color: "#fff" }) })
@@ -39772,8 +39780,8 @@ const Ki = ({
39772
39780
  r?.enabled && t && s !== "participant" && /* @__PURE__ */ g(
39773
39781
  HD,
39774
39782
  {
39775
- onClick: (m) => {
39776
- m.stopPropagation(), r.onRemoveClick();
39783
+ onClick: (C) => {
39784
+ C.stopPropagation(), r.onRemoveClick();
39777
39785
  },
39778
39786
  children: "×"
39779
39787
  }
@@ -39927,7 +39935,7 @@ const Qw = ({
39927
39935
  headerElement: i,
39928
39936
  filter: r
39929
39937
  }) => {
39930
- const { usersSet: s } = sn(), { config: a } = ot(), [o, u] = de(""), [c, l] = de([]), d = (h) => {
39938
+ const { usersSet: s } = sn(), { config: a } = it(), [o, u] = de(""), [c, l] = de([]), d = (h) => {
39931
39939
  n((m) => m.some((b) => b._id === h._id) ? m.filter((b) => b._id !== h._id) : [...m, h]);
39932
39940
  }, f = Ye(
39933
39941
  () => bV((h) => {
@@ -40085,7 +40093,7 @@ const Qw = ({
40085
40093
  const e = we(
40086
40094
  (F) => F.chatSettingStore.config
40087
40095
  ), t = x0(), { client: n } = zt(), { showToast: i } = Va();
40088
- ot();
40096
+ it();
40089
40097
  const [r, s] = de(!1), [a, o] = de(!1), [u, c] = de("0"), [l, d] = de(""), [f, h] = de(""), [m, A] = de({
40090
40098
  name: "Public",
40091
40099
  id: "public"
@@ -41751,7 +41759,7 @@ function GV() {
41751
41759
  Object.prototype.hasOwnProperty.call(d, f) && (c[f] = d[f]);
41752
41760
  }
41753
41761
  return c;
41754
- }, t = /* @__PURE__ */ Zw(), n = s(t), i = at, r = s(i);
41762
+ }, t = /* @__PURE__ */ Zw(), n = s(t), i = ot, r = s(i);
41755
41763
  function s(c) {
41756
41764
  return c && c.__esModule ? c : { default: c };
41757
41765
  }
@@ -41799,7 +41807,7 @@ function YV() {
41799
41807
  Object.prototype.hasOwnProperty.call(y, C) && (A[C] = y[C]);
41800
41808
  }
41801
41809
  return A;
41802
- }, t = /* @__PURE__ */ Zw(), n = d(t), i = $w(), r = d(i), s = QV(), a = d(s), o = at, u = d(o), c = GV(), l = d(c);
41810
+ }, t = /* @__PURE__ */ Zw(), n = d(t), i = $w(), r = d(i), s = QV(), a = d(s), o = ot, u = d(o), c = GV(), l = d(c);
41803
41811
  function d(A) {
41804
41812
  return A && A.__esModule ? A : { default: A };
41805
41813
  }
@@ -41870,7 +41878,7 @@ const KV = /* @__PURE__ */ hi(XV), JV = H.div`
41870
41878
  chatJid: t,
41871
41879
  setVisible: n
41872
41880
  }) => {
41873
- const { config: i } = ot();
41881
+ const { config: i } = it();
41874
41882
  return ge(() => {
41875
41883
  const { overflow: r } = document.body.style;
41876
41884
  return e && (document.body.style.overflow = "hidden"), () => {
@@ -42106,7 +42114,7 @@ const KV = /* @__PURE__ */ hi(XV), JV = H.div`
42106
42114
  }
42107
42115
  ],
42108
42116
  []
42109
- ), c = Ue(), { client: l } = zt(), { user: d, config: f } = ot(), h = we((w) => bh(w)), m = we((w) => w.rooms.usersSet), A = Ye(() => (Array.isArray(h?.members) ? h.members : []).map((v) => {
42117
+ ), c = Ue(), { client: l } = zt(), { user: d, config: f } = it(), h = we((w) => bh(w)), m = we((w) => w.rooms.usersSet), A = Ye(() => (Array.isArray(h?.members) ? h.members : []).map((v) => {
42110
42118
  const _ = String(v?.xmppUsername || ""), R = _.split("@")[0], O = m?.[_] || m?.[R];
42111
42119
  return O ? {
42112
42120
  ...v,
@@ -43925,7 +43933,7 @@ const i3 = H.div`
43925
43933
  onRoomClick: n,
43926
43934
  isSmallScreen: i
43927
43935
  }) => {
43928
- const { client: r, setClient: s } = zt(), [a, o] = de(!1), [u, c] = de(""), l = Ue(), { config: d } = ot(), { activeRoomJID: f } = we((w) => w.rooms), h = ve(null);
43936
+ const { client: r, setClient: s } = zt(), [a, o] = de(!1), [u, c] = de(""), l = Ue(), { config: d } = it(), { activeRoomJID: f } = we((w) => w.rooms), h = ve(null);
43929
43937
  ge(() => {
43930
43938
  const w = (e || []).filter((v) => !a3(v)).map(ZQ).filter(Boolean);
43931
43939
  if (w.length && (w.forEach((v) => {
@@ -44036,7 +44044,7 @@ const i3 = H.div`
44036
44044
  "div",
44037
44045
  {
44038
44046
  style: { flexGrow: 1, overflowY: "auto", padding: "16px 0px" },
44039
- children: y.map((w, v) => /* @__PURE__ */ U(at.Fragment, { children: [
44047
+ children: y.map((w, v) => /* @__PURE__ */ U(ot.Fragment, { children: [
44040
44048
  /* @__PURE__ */ g(
44041
44049
  JQ,
44042
44050
  {
@@ -44109,7 +44117,7 @@ const ok = ({
44109
44117
  handleCloseModal: c,
44110
44118
  handleClick: l
44111
44119
  }) => {
44112
- const d = ve(null), { config: f } = ot(), h = () => {
44120
+ const d = ve(null), { config: f } = it(), h = () => {
44113
44121
  const m = d.current;
44114
44122
  m && (m.style.height = "auto", m.style.height = `${m.scrollHeight}px`);
44115
44123
  };
@@ -44164,7 +44172,7 @@ const ok = ({
44164
44172
  currentRoom: e,
44165
44173
  handleBackClick: t
44166
44174
  }) => {
44167
- const n = Ue(), { client: i } = zt(), [r, s] = de(!1), { roomsList: a, activeRoomJID: o } = sn(e.jid), { composing: u } = sn(e.jid).room, { config: c } = ot(), l = () => {
44175
+ const n = Ue(), { client: i } = zt(), [r, s] = de(!1), { roomsList: a, activeRoomJID: o } = sn(e.jid), { composing: u } = sn(e.jid).room, { config: c } = it(), l = () => {
44168
44176
  n(Mv({ isOpen: !0 }));
44169
44177
  }, d = (A) => {
44170
44178
  n(
@@ -44303,7 +44311,7 @@ const ok = ({
44303
44311
  /* @__PURE__ */ g("path", { fill: "#312f42", d: "M1635 706c2.3 2.2 4.21 4.52 6.12 7.06 4.02 5.23 8.41 10.09 12.88 14.94-2.22 4.99-5.68 8.71-10 12-2.06.56-2.06.56-4.06.69-3.99.31-4.78.63-7.75 2.93-1.05.79-2.11 1.57-3.19 2.38l-3-1c-3.15-26.78-3.15-26.78 1.23-32.52 2.47-2.44 4.9-4.53 7.77-6.48" }),
44304
44312
  /* @__PURE__ */ g("text", { x: "685", y: "640", textAnchor: "middle", fontFamily: "var(--ethora-font-family, 'Inter', system-ui, sans-serif)", fontSize: "200", fontStyle: "italic", fontWeight: "700", fill: "currentColor", children: "Hi!" })
44305
44313
  ] }), sG = () => {
44306
- const { config: e } = ot();
44314
+ const { config: e } = it();
44307
44315
  return /* @__PURE__ */ g(
44308
44316
  "div",
44309
44317
  {
@@ -44456,7 +44464,7 @@ const ok = ({
44456
44464
  font-size: var(--ethora-font-size-sm, 14px);
44457
44465
  color: #141414;
44458
44466
  `, mG = () => {
44459
- const { config: e } = ot();
44467
+ const { config: e } = it();
44460
44468
  return /* @__PURE__ */ U(lG, { children: [
44461
44469
  /* @__PURE__ */ g(ck, { width: 240, style: { color: An(e) } }),
44462
44470
  /* @__PURE__ */ U(dG, { children: [
@@ -44558,7 +44566,7 @@ const yG = (e) => {
44558
44566
  handleMessageEdited: i
44559
44567
  };
44560
44568
  }, l3 = 3e5, lk = () => {
44561
- const { config: e, langSource: t } = ot(), { client: n } = zt(), i = Ue(), { handleMessageSent: r, handleMessageFailed: s } = yG(e), a = me((x) => {
44569
+ const { config: e, langSource: t } = it(), { client: n } = zt(), i = Ue(), { handleMessageSent: r, handleMessageFailed: s } = yG(e), a = me((x) => {
44562
44570
  Promise.resolve(r(x)).catch((I) => {
44563
44571
  console.error("Error in async message sent hook:", I);
44564
44572
  });
@@ -45144,7 +45152,7 @@ const yG = (e) => {
45144
45152
  t?.[e]?.messages?.length
45145
45153
  ]);
45146
45154
  }, TG = (e) => {
45147
- const { client: t } = zt(), { activeRoomJID: n } = we((a) => a.rooms), { user: i } = ot(), r = me(() => {
45155
+ const { client: t } = zt(), { activeRoomJID: n } = we((a) => a.rooms), { user: i } = it(), r = me(() => {
45148
45156
  e?.disableTypingIndicator || t && t.sendTypingRequestStanza(
45149
45157
  n,
45150
45158
  `${i.firstName} ${i.lastName}`,
@@ -45163,9 +45171,9 @@ const yG = (e) => {
45163
45171
  }, 100);
45164
45172
  return () => clearTimeout(a);
45165
45173
  }, [s]), { sendStartComposing: r, sendEndComposing: s };
45166
- }, kf = at.memo(
45174
+ }, kf = ot.memo(
45167
45175
  ({ CustomMessageComponent: e, handleBackClick: t }) => {
45168
- const { CustomInputComponent: n } = Nc(), { client: i, providerBootstrapStatus: r, initMode: s } = zt(), a = Ue(), [o, u] = de(!1), { user: c, config: l } = ot(), {
45176
+ const { CustomInputComponent: n } = Nc(), { client: i, providerBootstrapStatus: r, initMode: s } = zt(), a = Ue(), [o, u] = de(!1), { user: c, config: l } = it(), {
45169
45177
  roomsList: d,
45170
45178
  activeRoomJID: f,
45171
45179
  editAction: h,
@@ -46486,6 +46494,7 @@ const OG = ({ src: e }) => {
46486
46494
  height: 40px;
46487
46495
  border-radius: 50%;
46488
46496
  background-color: ${({ $bgColor: e }) => e};
46497
+ ${({ $textColor: e }) => e ? `color: ${e};` : ""}
46489
46498
  display: flex;
46490
46499
  align-items: center;
46491
46500
  justify-content: center;
@@ -46504,19 +46513,21 @@ const OG = ({ src: e }) => {
46504
46513
  lastName: n,
46505
46514
  style: i
46506
46515
  }) => {
46507
- const { backgroundColor: r } = Ww(e || t);
46508
- return /* @__PURE__ */ g(LG, { style: i, $bgColor: r, children: (() => {
46509
- const a = (o) => /^[a-zA-Zа-яА-ЯёЁ]$/.test(o);
46516
+ const { config: r } = it(), s = r?.colors?.iconsBg, a = r?.colors?.icons, { backgroundColor: o } = Ww(
46517
+ e || t
46518
+ );
46519
+ return /* @__PURE__ */ g(LG, { style: i, $bgColor: s || o, $textColor: a, children: (() => {
46520
+ const l = (d) => /^[a-zA-Zа-яА-ЯёЁ]$/.test(d);
46510
46521
  if (t && n) {
46511
- const o = a(t[0]) ? t[0].toUpperCase() : "", u = a(n[0]) ? n[0].toUpperCase() : "";
46512
- return `${o}${u}`;
46522
+ const d = l(t[0]) ? t[0].toUpperCase() : "", f = l(n[0]) ? n[0].toUpperCase() : "";
46523
+ return `${d}${f}`;
46513
46524
  } else if (e) {
46514
- const o = e.split(" ");
46515
- if (o.length > 1) {
46516
- const u = a(o[0][0]) ? o[0][0].toUpperCase() : "", c = a(o[1][0]) ? o[1][0].toUpperCase() : "";
46517
- return `${u}${c}`;
46525
+ const d = e.split(" ");
46526
+ if (d.length > 1) {
46527
+ const f = l(d[0][0]) ? d[0][0].toUpperCase() : "", h = l(d[1][0]) ? d[1][0].toUpperCase() : "";
46528
+ return `${f}${h}`;
46518
46529
  } else
46519
- return `${a(o[0][0]) ? o[0][0].toUpperCase() : ""}`;
46530
+ return `${l(d[0][0]) ? d[0][0].toUpperCase() : ""}`;
46520
46531
  }
46521
46532
  return "??";
46522
46533
  })() });
@@ -49473,7 +49484,7 @@ function Hk(e) {
49473
49484
  ref: t
49474
49485
  }), () => {
49475
49486
  n.current = null;
49476
- }), []), /* @__PURE__ */ at.createElement("div", {
49487
+ }), []), /* @__PURE__ */ ot.createElement("div", {
49477
49488
  ref: t
49478
49489
  });
49479
49490
  }
@@ -49983,7 +49994,7 @@ const SY = H.div`
49983
49994
  ), t = Array.isArray(e) ? e : [], n = new Set(t.map((i) => i.id));
49984
49995
  return { queue: t, idSet: n };
49985
49996
  }, ZY = /(https?:\/\/[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+)/, $Y = Kk(({ message: e, isUser: t, isReply: n }, i) => {
49986
- const { client: r } = zt(), { user: s, config: a, langSource: o } = ot(), { idSet: u } = JY(), c = !!a?.disableInteractions, l = !!a?.disableProfilesInteractions, d = we((W) => W.rooms.usersSet), f = e.user?.id ?? "", h = f.split("@")[0], m = d[h] ?? d[f], A = m ? `${m.firstName ?? ""} ${m.lastName ?? ""}`.trim() || h : e.user?.name || h || "Unknown", b = Fu(e.mainMessage), y = Ue(), [C, k] = de(
49997
+ const { client: r } = zt(), { user: s, config: a, langSource: o } = it(), { idSet: u } = JY(), c = !!a?.disableInteractions, l = !!a?.disableProfilesInteractions, d = we((W) => W.rooms.usersSet), f = e.user?.id ?? "", h = f.split("@")[0], m = d[h] ?? d[f], A = m ? `${m.firstName ?? ""} ${m.lastName ?? ""}`.trim() || h : e.user?.name || h || "Unknown", b = Fu(e.mainMessage), y = Ue(), [C, k] = de(
49987
49998
  c ? null : {
49988
49999
  visible: !1,
49989
50000
  x: 0,
@@ -50487,7 +50498,7 @@ const SY = H.div`
50487
50498
  user: t,
50488
50499
  customMessageComponent: n
50489
50500
  }) => {
50490
- const { client: i } = zt(), r = Ue(), { loading: s, roomsList: a, editAction: o } = sn(), { config: u } = ot(), {
50501
+ const { client: i } = zt(), r = Ue(), { loading: s, roomsList: a, editAction: o } = sn(), { config: u } = it(), {
50491
50502
  sendMessage: c,
50492
50503
  sendMedia: l,
50493
50504
  sendEditMessage: d,
@@ -50657,7 +50668,7 @@ const SY = H.div`
50657
50668
  "Personal Details",
50658
50669
  "Illegal Drugs"
50659
50670
  ], aX = () => {
50660
- const { config: e } = ot(), { activeRoomJID: t } = sn(), n = Ue(), [i, r] = de(""), [s, a] = de({
50671
+ const { config: e } = it(), { activeRoomJID: t } = sn(), n = Ue(), [i, r] = de(""), [s, a] = de({
50661
50672
  name: "",
50662
50673
  isChoose: !1
50663
50674
  }), o = me(
@@ -51001,7 +51012,7 @@ const AX = ({
51001
51012
  initMode: w
51002
51013
  } = zt(), v = dk();
51003
51014
  we((T) => T.rooms.rooms);
51004
- const { roomsList: _, activeRoomJID: R } = sn(), { user: O } = ot(), S = ve({}), P = ve({}), x = (T) => {
51015
+ const { roomsList: _, activeRoomJID: R } = sn(), { user: O } = it(), S = ve({}), P = ve({}), x = (T) => {
51005
51016
  S.current[T] = Date.now();
51006
51017
  }, I = (T, z) => {
51007
51018
  const ne = S.current[z];
@@ -51398,7 +51409,7 @@ const AX = ({
51398
51409
  config: t,
51399
51410
  roomJID: n
51400
51411
  }) => {
51401
- const { CustomMessageComponent: i } = Nc(), r = i || $Y, { user: s, activeModal: a, deleteModal: o } = ot(), [u, c] = de(!1), [l, d] = de(!1), [f, h] = de(!0), m = t?.xmppSettings?.conference, A = Ue(), { wasAutoSelected: b } = uX(
51412
+ const { CustomMessageComponent: i } = Nc(), r = i || $Y, { user: s, activeModal: a, deleteModal: o } = it(), [u, c] = de(!1), [l, d] = de(!1), [f, h] = de(!0), m = t?.xmppSettings?.conference, A = Ue(), { wasAutoSelected: b } = uX(
51402
51413
  (T) => A($e(T)),
51403
51414
  m
51404
51415
  );
@@ -51949,8 +51960,8 @@ const TX = Tt`
51949
51960
  onNavigateToMessage: a,
51950
51961
  duration: o
51951
51962
  }) => {
51952
- const [u, c] = at.useState(!1);
51953
- at.useEffect(() => {
51963
+ const [u, c] = ot.useState(!1);
51964
+ ot.useEffect(() => {
51954
51965
  const m = Date.now() - r, A = Math.max(0, o - m);
51955
51966
  if (A <= 0) {
51956
51967
  c(!0), setTimeout(s, 300);
@@ -52287,7 +52298,7 @@ function iK(e) {
52287
52298
  JSON.stringify(e?.weights ?? {})
52288
52299
  ]);
52289
52300
  }
52290
- const rK = () => (KX(), null), sK = ({ config: e }) => (iK(e?.typography), null), aK = ({ config: e }) => (at.useEffect(() => {
52301
+ const rK = () => (KX(), null), sK = ({ config: e }) => (iK(e?.typography), null), aK = ({ config: e }) => (ot.useEffect(() => {
52291
52302
  $O(e);
52292
52303
  }, [
52293
52304
  e?.colors?.icons,
@@ -52305,7 +52316,7 @@ const rK = () => (KX(), null), sK = ({ config: e }) => (iK(e?.typography), null)
52305
52316
  serviceWorkerScope: e?.pushNotifications?.serviceWorkerScope,
52306
52317
  softAsk: e?.pushNotifications?.softAsk,
52307
52318
  onClick: e?.pushNotifications?.onClick
52308
- }), null), QK = at.memo(
52319
+ }), null), QK = ot.memo(
52309
52320
  ({
52310
52321
  CustomMessageComponent: e,
52311
52322
  CustomInputComponent: t,