@linktr.ee/messaging-react 3.3.14-rc-1782376133 → 3.3.14-rc-1782376280

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.
Files changed (27) hide show
  1. package/dist/{Card-UNYUEkhB.cjs → Card-CFUCIIeg.cjs} +2 -2
  2. package/dist/{Card-UNYUEkhB.cjs.map → Card-CFUCIIeg.cjs.map} +1 -1
  3. package/dist/{Card-QGq8FOuB.js → Card-CJOTI1nq.js} +3 -3
  4. package/dist/{Card-QGq8FOuB.js.map → Card-CJOTI1nq.js.map} +1 -1
  5. package/dist/{Card-Bfigt254.cjs → Card-CYn6AjJ6.cjs} +2 -2
  6. package/dist/{Card-Bfigt254.cjs.map → Card-CYn6AjJ6.cjs.map} +1 -1
  7. package/dist/{Card-C_dE3Qu1.cjs → Card-CoIh1GTY.cjs} +2 -2
  8. package/dist/{Card-C_dE3Qu1.cjs.map → Card-CoIh1GTY.cjs.map} +1 -1
  9. package/dist/{Card-Cj77HUEV.js → Card-DQ_M_wfB.js} +2 -2
  10. package/dist/{Card-Cj77HUEV.js.map → Card-DQ_M_wfB.js.map} +1 -1
  11. package/dist/{Card-Ch_mEI0W.js → Card-Dv1yewnX.js} +2 -2
  12. package/dist/{Card-Ch_mEI0W.js.map → Card-Dv1yewnX.js.map} +1 -1
  13. package/dist/{LockedThumbnail-BhRg8vCA.cjs → LockedThumbnail-DXpNaRMq.cjs} +2 -2
  14. package/dist/{LockedThumbnail-BhRg8vCA.cjs.map → LockedThumbnail-DXpNaRMq.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-DpBD4eNW.js → LockedThumbnail-QOIi6LjV.js} +2 -2
  16. package/dist/{LockedThumbnail-DpBD4eNW.js.map → LockedThumbnail-QOIi6LjV.js.map} +1 -1
  17. package/dist/index-D3iEHy6I.cjs +2 -0
  18. package/dist/index-D3iEHy6I.cjs.map +1 -0
  19. package/dist/{index-BS5mKzxR.js → index-DNIsGhY_.js} +103 -103
  20. package/dist/index-DNIsGhY_.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelView.tsx +6 -14
  25. package/dist/index-BS5mKzxR.js.map +0 -1
  26. package/dist/index-BpVRd7bJ.cjs +0 -2
  27. package/dist/index-BpVRd7bJ.cjs.map +0 -1
@@ -26,8 +26,8 @@ const Yt = He({
26
26
  }) => {
27
27
  var L, M;
28
28
  const o = K(
29
- (S, ...I) => {
30
- i && console.log(`🔥 [MessagingProvider] ${S}`, ...I);
29
+ (E, ...S) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${E}`, ...S);
31
31
  },
32
32
  [i]
33
33
  );
@@ -41,7 +41,7 @@ const Yt = He({
41
41
  R.current = s;
42
42
  const k = V(i);
43
43
  k.current = i;
44
- const E = V({
44
+ const I = V({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
@@ -51,12 +51,12 @@ const Yt = He({
51
51
  renderCount: D.current,
52
52
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
53
53
  propChanges: {
54
- userChanged: E.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: E.current.apiKey !== a,
56
- serviceConfigChanged: E.current.serviceConfig !== s,
57
- capabilitiesChanged: E.current.capabilities !== r
54
+ userChanged: I.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: I.current.apiKey !== a,
56
+ serviceConfigChanged: I.current.serviceConfig !== s,
57
+ capabilitiesChanged: I.current.capabilities !== r
58
58
  }
59
- }), E.current = {
59
+ }), I.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
@@ -66,32 +66,32 @@ const Yt = He({
66
66
  a && ((L = $.current) == null ? void 0 : L.apiKey) !== a && ($.current = { apiKey: a, client: new In(a) });
67
67
  const P = a ? ((M = $.current) == null ? void 0 : M.client) ?? null : null;
68
68
  W(() => {
69
- const S = D.current, I = R.current;
70
- if (!a || !P || !I) {
69
+ const E = D.current, S = R.current;
70
+ if (!a || !P || !S) {
71
71
  o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: S,
72
+ renderCount: E,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  o("🚀 CREATING SERVICE", {
78
- renderCount: S,
78
+ renderCount: E,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
81
  const O = new Sn({
82
- ...I,
82
+ ...S,
83
83
  apiKey: a,
84
84
  debug: k.current,
85
85
  client: P
86
86
  });
87
87
  _.current = O, d(O), o("✅ SERVICE SET", {
88
- renderCount: S,
88
+ renderCount: E,
89
89
  serviceInstance: !!O
90
90
  });
91
91
  }, [a, P]);
92
92
  const N = V(null);
93
93
  W(() => {
94
- var I, O;
94
+ var S, O;
95
95
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!l,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const Yt = He({
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((I = N.current) == null ? void 0 : I.serviceId) === l && ((O = N.current) == null ? void 0 : O.userId) === t.id) {
110
+ if (((S = N.current) == null ? void 0 : S.serviceId) === l && ((O = N.current) == null ? void 0 : O.userId) === t.id) {
111
111
  o(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -137,10 +137,10 @@ const Yt = He({
137
137
  }
138
138
  })();
139
139
  }, [l, t, o, u]), W(() => {
140
- const S = P;
140
+ const E = P;
141
141
  return () => {
142
- var I;
143
- S && (N.current = null, (I = _.current) == null || I.disconnectUser().catch(console.error));
142
+ var S;
143
+ E && (N.current = null, (S = _.current) == null || S.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [P]);
146
146
  const T = K(async () => {
@@ -154,13 +154,13 @@ const Yt = He({
154
154
  o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
156
  o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
- const S = await l.connectUser(t);
158
- g(S), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (S) {
160
- const I = S instanceof Error ? S.message : "Refresh failed";
161
- p(I), o("❌ CONNECTION REFRESH ERROR", {
157
+ const E = await l.connectUser(t);
158
+ g(E), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (E) {
160
+ const S = E instanceof Error ? E.message : "Refresh failed";
161
+ p(S), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: I
163
+ error: S
164
164
  });
165
165
  } finally {
166
166
  b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
@@ -364,7 +364,7 @@ const re = ({
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
366
  var L;
367
- const { service: u, debug: f } = We(), c = (L = t == null ? void 0 : t.user) == null ? void 0 : L.id, b = !!(a && s && u && c), [w, p] = z(!1), [v, _] = z(null), [R, k] = z(!1), [E, D] = z(!1), $ = b && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
367
+ const { service: u, debug: f } = We(), c = (L = t == null ? void 0 : t.user) == null ? void 0 : L.id, b = !!(a && s && u && c), [w, p] = z(!1), [v, _] = z(null), [R, k] = z(!1), [I, D] = z(!1), $ = b && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
368
368
  return W(() => {
369
369
  if (!b || !u || !c) {
370
370
  p(!1), _(null);
@@ -373,15 +373,15 @@ const re = ({
373
373
  let M = !1;
374
374
  return (async () => {
375
375
  try {
376
- const S = await u.getBlockedUsers();
376
+ const E = await u.getBlockedUsers();
377
377
  if (M) return;
378
378
  p(
379
- S.some(
380
- (I) => I.blocked_user_id === c
379
+ E.some(
380
+ (S) => S.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (S) {
384
- M || console.error(`[${g}] Failed to check blocked status:`, S);
383
+ } catch (E) {
384
+ M || console.error(`[${g}] Failed to check blocked status:`, E);
385
385
  } finally {
386
386
  M || _({ participantId: c, service: u });
387
387
  }
@@ -392,27 +392,27 @@ const re = ({
392
392
  isParticipantBlocked: w,
393
393
  isCheckingBlockedStatus: $,
394
394
  isLeaving: R,
395
- isUpdatingBlockStatus: E,
395
+ isUpdatingBlockStatus: I,
396
396
  handleLeaveConversation: async () => {
397
397
  var M;
398
398
  if (!R) {
399
399
  o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), k(!0);
400
400
  try {
401
- const S = ((M = e._client) == null ? void 0 : M.userID) ?? null;
402
- await e.hide(S, !1), r && await r(e), m == null || m();
403
- } catch (S) {
404
- console.error(`[${g}] Failed to leave conversation`, S);
401
+ const E = ((M = e._client) == null ? void 0 : M.userID) ?? null;
402
+ await e.hide(E, !1), r && await r(e), m == null || m();
403
+ } catch (E) {
404
+ console.error(`[${g}] Failed to leave conversation`, E);
405
405
  } finally {
406
406
  k(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var M, S, I;
412
- if (!(E || !u)) {
411
+ var M, E, S;
412
+ if (!(I || !u)) {
413
413
  l == null || l(), f && console.log(`[${g}] Block member`, (M = t == null ? void 0 : t.user) == null ? void 0 : M.id), D(!0);
414
414
  try {
415
- await u.blockUser((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), m == null || m();
415
+ await u.blockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
416
416
  } catch (O) {
417
417
  console.error(`[${g}] Failed to block member`, O);
418
418
  } finally {
@@ -421,11 +421,11 @@ const re = ({
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var M, S, I;
425
- if (!(E || !u)) {
424
+ var M, E, S;
425
+ if (!(I || !u)) {
426
426
  l == null || l(), f && console.log(`[${g}] Unblock member`, (M = t == null ? void 0 : t.user) == null ? void 0 : M.id), D(!0);
427
427
  try {
428
- await u.unBlockUser((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), m == null || m();
428
+ await u.unBlockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
429
429
  } catch (O) {
430
430
  console.error(`[${g}] Failed to unblock member`, O);
431
431
  } finally {
@@ -473,7 +473,7 @@ const re = ({
473
473
  isCheckingBlockedStatus: _,
474
474
  isLeaving: R,
475
475
  isUpdatingBlockStatus: k,
476
- handleLeaveConversation: E,
476
+ handleLeaveConversation: I,
477
477
  handleBlockUser: D,
478
478
  handleUnblockUser: $,
479
479
  handleReportUser: P
@@ -529,7 +529,7 @@ const re = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  ge,
531
531
  {
532
- onClick: E,
532
+ onClick: I,
533
533
  disabled: R,
534
534
  "aria-busy": R,
535
535
  children: [
@@ -619,7 +619,7 @@ function Xt({
619
619
  const s = e == null ? void 0 : e.text, a = Ys(t);
620
620
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
621
621
  }
622
- const qs = U.lazy(() => import("./Card-Cj77HUEV.js")), Ws = U.lazy(() => import("./Card-Ch_mEI0W.js")), Xs = U.lazy(() => import("./Card-QGq8FOuB.js")), Xe = () => /* @__PURE__ */ n(
622
+ const qs = U.lazy(() => import("./Card-DQ_M_wfB.js")), Ws = U.lazy(() => import("./Card-Dv1yewnX.js")), Xs = U.lazy(() => import("./Card-CJOTI1nq.js")), Xe = () => /* @__PURE__ */ n(
623
623
  "div",
624
624
  {
625
625
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
@@ -682,7 +682,7 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = se(t), u = V(null), f = V(null), c = V(null), b = V(r), [w, p] = z(a), [v, _] = z(0), [R, k] = z(!1), [E, D] = z(!1), [$, P] = z(!1), [N, T] = z(!1), [A, L] = z(!0), [M, S] = z(null), I = K(() => {
685
+ const g = se(t), u = V(null), f = V(null), c = V(null), b = V(r), [w, p] = z(a), [v, _] = z(0), [R, k] = z(!1), [I, D] = z(!1), [$, P] = z(!1), [N, T] = z(!1), [A, L] = z(!0), [M, E] = z(null), S = K(() => {
686
686
  P(!1), p(!0);
687
687
  }, []), O = K((x) => {
688
688
  const y = f.current;
@@ -801,7 +801,7 @@ const sa = (e) => {
801
801
  onPlay: () => P(!1),
802
802
  onLoadedMetadata: () => {
803
803
  const x = u.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && S(x.videoWidth / x.videoHeight);
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && E(x.videoWidth / x.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
807
  i || (p(!1), _(0));
@@ -824,10 +824,10 @@ const sa = (e) => {
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
826
  onClick: (x) => {
827
- x.stopPropagation(), I();
827
+ x.stopPropagation(), S();
828
828
  },
829
829
  onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), I());
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), S());
831
831
  },
832
832
  children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Ue, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
@@ -894,7 +894,7 @@ const sa = (e) => {
894
894
  /* @__PURE__ */ n(
895
895
  "div",
896
896
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${E || R ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${I || R ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
@@ -907,7 +907,7 @@ const sa = (e) => {
907
907
  /* @__PURE__ */ n(
908
908
  "div",
909
909
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${E || R ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${I || R ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
911
  style: { left: `${Y}%` }
912
912
  }
913
913
  )
@@ -1406,10 +1406,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1406
1406
  renderText: b,
1407
1407
  threadList: w,
1408
1408
  viewerLanguage: p
1409
- } = e, { client: v } = qe("CustomMessage"), { channel: _ } = ce("CustomMessage"), { isUnlocking: R, onUnlockClick: k, onFetchSource: E, onDownloadClick: D } = va("LockedAttachment"), [$, P] = z(!1), N = Rn(c.id), { selected: T, voteUp: A, voteDown: L } = Hs(c), {
1409
+ } = e, { client: v } = qe("CustomMessage"), { channel: _ } = ce("CustomMessage"), { isUnlocking: R, onUnlockClick: k, onFetchSource: I, onDownloadClick: D } = va("LockedAttachment"), [$, P] = z(!1), N = Rn(c.id), { selected: T, voteUp: A, voteDown: L } = Hs(c), {
1410
1410
  Attachment: M = Ln,
1411
- EditMessageModal: S = Dn,
1412
- MessageActions: I,
1411
+ EditMessageModal: E = Dn,
1412
+ MessageActions: S,
1413
1413
  MessageBlocked: O = Pn,
1414
1414
  MessageBouncePrompt: F = On,
1415
1415
  MessageDeleted: q = zn,
@@ -1459,7 +1459,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1459
1459
  ), ct = c.poll_id && v.polls.fromState(c.poll_id), dt = ya(c), he = Ee(c), ut = Na(c), Le = !!(j != null && j.length && !c.quoted_message), mt = he && me && Le;
1460
1460
  return /* @__PURE__ */ h(ne, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- S,
1462
+ E,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
@@ -1511,7 +1511,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1511
1511
  },
1512
1512
  children: ut ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
1513
  me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
- I && /* @__PURE__ */ n(I, {}),
1514
+ S && /* @__PURE__ */ n(S, {}),
1515
1515
  /* @__PURE__ */ n(
1516
1516
  Ot.Sent,
1517
1517
  {
@@ -1522,7 +1522,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1522
1522
  detail: (xt = c.metadata) == null ? void 0 : xt.attachment_detail,
1523
1523
  paymentStatus: (wt = c.metadata) == null ? void 0 : wt.payment_status,
1524
1524
  onPreviewClick: () => k == null ? void 0 : k(c, _),
1525
- onFetchSource: async () => await (E == null ? void 0 : E(c, _))
1525
+ onFetchSource: async () => await (I == null ? void 0 : I(c, _))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1537,11 +1537,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1537
1537
  paymentStatus: (Et = c.metadata) == null ? void 0 : Et.payment_status,
1538
1538
  isUnlocking: R(c.id),
1539
1539
  onUnlockClick: () => k == null ? void 0 : k(c, _),
1540
- onFetchSource: async () => await (E == null ? void 0 : E(c, _)),
1540
+ onFetchSource: async () => await (I == null ? void 0 : I(c, _)),
1541
1541
  onDownloadClick: () => D == null ? void 0 : D(c, _)
1542
1542
  }
1543
1543
  ),
1544
- I && /* @__PURE__ */ n(I, {})
1544
+ S && /* @__PURE__ */ n(S, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
1547
  At,
@@ -2079,15 +2079,15 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2079
2079
  }) => {
2080
2080
  var $, P, N, T, A;
2081
2081
  const { channel: p } = ce(), v = U.useMemo(() => {
2082
- var S, I;
2083
- const L = (S = p._client) == null ? void 0 : S.userID;
2084
- return L ? Object.values(((I = p.state) == null ? void 0 : I.members) || {}).find(
2082
+ var E, S;
2083
+ const L = (E = p._client) == null ? void 0 : E.userID;
2084
+ return L ? Object.values(((S = p.state) == null ? void 0 : S.members) || {}).find(
2085
2085
  (O) => {
2086
2086
  var F;
2087
2087
  return ((F = O.user) == null ? void 0 : F.id) && O.user.id !== L;
2088
2088
  }
2089
2089
  ) : void 0;
2090
- }, [($ = p._client) == null ? void 0 : $.userID, (P = p.state) == null ? void 0 : P.members]), _ = Wt(v == null ? void 0 : v.user), R = (N = v == null ? void 0 : v.user) == null ? void 0 : N.image, k = qt(p), E = w == null ? void 0 : w({
2090
+ }, [($ = p._client) == null ? void 0 : $.userID, (P = p.state) == null ? void 0 : P.members]), _ = Wt(v == null ? void 0 : v.user), R = (N = v == null ? void 0 : v.user) == null ? void 0 : N.image, k = qt(p), I = w == null ? void 0 : w({
2091
2091
  channel: p,
2092
2092
  participant: v
2093
2093
  }), D = async () => {
@@ -2128,9 +2128,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2128
2128
  size: 48
2129
2129
  }
2130
2130
  ),
2131
- /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2132
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: _ }),
2133
- E && /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center", children: E })
2131
+ /* @__PURE__ */ h("p", { className: "text-center text-xs font-medium text-black/90 truncate", children: [
2132
+ _,
2133
+ I
2134
2134
  ] }),
2135
2135
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2136
2136
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
@@ -2203,9 +2203,9 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2203
2203
  }
2204
2204
  ),
2205
2205
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2206
- /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2207
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: _ }),
2208
- E && /* @__PURE__ */ n("span", { className: "flex shrink-0 items-center", children: E })
2206
+ /* @__PURE__ */ h("h1", { className: "font-medium text-black/90 truncate", children: [
2207
+ _,
2208
+ I
2209
2209
  ] }),
2210
2210
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2211
2211
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
@@ -2275,7 +2275,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2275
2275
  renderHeaderTitleBadges: _,
2276
2276
  customChannelActions: R,
2277
2277
  renderChannelActions: k,
2278
- renderMessage: E,
2278
+ renderMessage: I,
2279
2279
  dmAgentEnabled: D = !1,
2280
2280
  viewerLanguage: $,
2281
2281
  showChannelInfo: P = !0
@@ -2297,7 +2297,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2297
2297
  var j;
2298
2298
  return ((j = X.user) == null ? void 0 : j.id) === x;
2299
2299
  }) : void 0;
2300
- }, [(q = N._client) == null ? void 0 : q.userID, (J = N.state) == null ? void 0 : J.members]), L = ((G = A == null ? void 0 : A.user) == null ? void 0 : G.is_account) ?? (A == null ? void 0 : A.is_account), M = ((Y = T == null ? void 0 : T.user) == null ? void 0 : Y.is_account) ?? (T == null ? void 0 : T.is_account), S = D && L === !1 && M === !0, I = K(
2300
+ }, [(q = N._client) == null ? void 0 : q.userID, (J = N.state) == null ? void 0 : J.members]), L = ((G = A == null ? void 0 : A.user) == null ? void 0 : G.is_account) ?? (A == null ? void 0 : A.is_account), M = ((Y = T == null ? void 0 : T.user) == null ? void 0 : Y.is_account) ?? (T == null ? void 0 : T.is_account), E = D && L === !1 && M === !0, S = K(
2301
2301
  (x) => {
2302
2302
  const { message: y } = xe("ChannelView"), B = /* @__PURE__ */ n(
2303
2303
  Sa,
@@ -2307,15 +2307,15 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2307
2307
  viewerLanguage: $
2308
2308
  }
2309
2309
  );
2310
- return !E || !y ? B : E(B, y);
2310
+ return !I || !y ? B : I(B, y);
2311
2311
  },
2312
- [p, E, $]
2312
+ [p, I, $]
2313
2313
  );
2314
2314
  return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2315
2315
  os,
2316
2316
  {
2317
2317
  overrides: {
2318
- Message: I,
2318
+ Message: S,
2319
2319
  MessageActions: Aa
2320
2320
  },
2321
2321
  children: /* @__PURE__ */ h(ls, { children: [
@@ -2326,7 +2326,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2326
2326
  showBackButton: t,
2327
2327
  showChannelInfo: P,
2328
2328
  showStarButton: w,
2329
- dmAgentEnabled: S,
2329
+ dmAgentEnabled: E,
2330
2330
  onLeaveConversation: i,
2331
2331
  onBlockParticipant: o,
2332
2332
  showDeleteConversation: l,
@@ -2388,7 +2388,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2388
2388
  dmAgentEnabled: _,
2389
2389
  messageMetadata: R,
2390
2390
  onMessageSent: k,
2391
- showStarButton: E = !1,
2391
+ showStarButton: I = !1,
2392
2392
  chatbotVotingEnabled: D = !1,
2393
2393
  renderChannelBanner: $,
2394
2394
  renderHeaderTitleBadges: P,
@@ -2397,8 +2397,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2397
2397
  renderMessage: A,
2398
2398
  onMessageLinkClick: L,
2399
2399
  sendButton: M,
2400
- attachmentPreviewList: S,
2401
- viewerLanguage: I,
2400
+ attachmentPreviewList: E,
2401
+ viewerLanguage: S,
2402
2402
  showChannelInfo: O = !0
2403
2403
  }) => {
2404
2404
  const F = K(
@@ -2451,7 +2451,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2451
2451
  TypingIndicator: qa,
2452
2452
  doSendMessageRequest: F,
2453
2453
  ...M ? { SendButton: M } : {},
2454
- ...S ? { AttachmentPreviewList: S } : {},
2454
+ ...E ? { AttachmentPreviewList: E } : {},
2455
2455
  children: /* @__PURE__ */ n(
2456
2456
  Za,
2457
2457
  {
@@ -2471,7 +2471,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2471
2471
  showReportParticipant: w,
2472
2472
  composerDisabled: p,
2473
2473
  composerDisabledReason: v,
2474
- showStarButton: E,
2474
+ showStarButton: I,
2475
2475
  dmAgentEnabled: _,
2476
2476
  chatbotVotingEnabled: D,
2477
2477
  renderChannelBanner: $,
@@ -2479,7 +2479,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2479
2479
  customChannelActions: N,
2480
2480
  renderChannelActions: T,
2481
2481
  renderMessage: A,
2482
- viewerLanguage: I,
2482
+ viewerLanguage: S,
2483
2483
  showChannelInfo: O
2484
2484
  }
2485
2485
  )
@@ -2529,14 +2529,14 @@ const ki = ({
2529
2529
  showChannelInfo: k
2530
2530
  }) => {
2531
2531
  const {
2532
- client: E,
2532
+ client: I,
2533
2533
  isConnected: D,
2534
2534
  isLoading: $,
2535
2535
  error: P,
2536
2536
  refreshConnection: N,
2537
2537
  service: T,
2538
2538
  debug: A
2539
- } = Os(), [L, M] = z(null), [S, I] = z(null), [O, F] = z(!1), { showDeleteConversation: q = !0 } = e, J = V(o);
2539
+ } = Os(), [L, M] = z(null), [E, S] = z(null), [O, F] = z(!1), { showDeleteConversation: q = !0 } = e, J = V(o);
2540
2540
  J.current = o;
2541
2541
  const G = V(a);
2542
2542
  G.current = a;
@@ -2544,8 +2544,8 @@ const ki = ({
2544
2544
  W(() => {
2545
2545
  x.current = L;
2546
2546
  }, [L]), W(() => {
2547
- if (!E || !D) return;
2548
- const H = E.userID;
2547
+ if (!I || !D) return;
2548
+ const H = I.userID;
2549
2549
  if (!H) return;
2550
2550
  const X = `${H}::${i}`;
2551
2551
  if (Y.current === X) return;
@@ -2560,7 +2560,7 @@ const ki = ({
2560
2560
  "[MessagingShell] Loading initial conversation with:",
2561
2561
  i
2562
2562
  );
2563
- const Q = await E.queryChannels(
2563
+ const Q = await I.queryChannels(
2564
2564
  {
2565
2565
  type: "messaging",
2566
2566
  members: { $eq: [H, i] }
@@ -2569,7 +2569,7 @@ const ki = ({
2569
2569
  { limit: 1 }
2570
2570
  );
2571
2571
  if (Q.length > 0) {
2572
- M(Q[0]), I(null), (de = G.current) == null || de.call(G, Q[0]), A && console.log(
2572
+ M(Q[0]), S(null), (de = G.current) == null || de.call(G, Q[0]), A && console.log(
2573
2573
  "[MessagingShell] Initial conversation loaded:",
2574
2574
  Q[0].id
2575
2575
  );
@@ -2577,7 +2577,7 @@ const ki = ({
2577
2577
  }
2578
2578
  const ae = J.current;
2579
2579
  if (!ae || !T) {
2580
- j(), I("No conversation found with this account"), A && console.log(
2580
+ j(), S("No conversation found with this account"), A && console.log(
2581
2581
  "[MessagingShell] No conversation found for:",
2582
2582
  i
2583
2583
  );
@@ -2589,7 +2589,7 @@ const ki = ({
2589
2589
  name: ae.name,
2590
2590
  phone: ae.phone
2591
2591
  });
2592
- M(Z), I(null), (ue = G.current) == null || ue.call(G, Z), A && console.log(
2592
+ M(Z), S(null), (ue = G.current) == null || ue.call(G, Z), A && console.log(
2593
2593
  "[MessagingShell] Channel created and loaded:",
2594
2594
  Z.id
2595
2595
  );
@@ -2597,29 +2597,29 @@ const ki = ({
2597
2597
  console.error(
2598
2598
  "[MessagingShell] Failed to create conversation:",
2599
2599
  Z
2600
- ), j(), I("Failed to create conversation");
2600
+ ), j(), S("Failed to create conversation");
2601
2601
  }
2602
2602
  } catch (Q) {
2603
2603
  console.error(
2604
2604
  "[MessagingShell] Failed to load initial conversation:",
2605
2605
  Q
2606
- ), j(), x.current || I("Failed to load conversation");
2606
+ ), j(), x.current || S("Failed to load conversation");
2607
2607
  }
2608
2608
  })();
2609
- }, [i, E, D, T, A]);
2609
+ }, [i, I, D, T, A]);
2610
2610
  const y = V(r);
2611
2611
  y.current = r;
2612
2612
  const B = K(() => {
2613
2613
  var H;
2614
2614
  M(null), F(!0), (H = y.current) == null || H.call(y);
2615
2615
  }, []);
2616
- return $ ? /* @__PURE__ */ n(Se, {}) : P ? /* @__PURE__ */ n(be, { message: P, onBack: N }) : !D || !E ? /* @__PURE__ */ n(
2616
+ return $ ? /* @__PURE__ */ n(Se, {}) : P ? /* @__PURE__ */ n(be, { message: P, onBack: N }) : !D || !I ? /* @__PURE__ */ n(
2617
2617
  be,
2618
2618
  {
2619
2619
  message: "Not connected to messaging service",
2620
2620
  onBack: N
2621
2621
  }
2622
- ) : S ? /* @__PURE__ */ n(be, { message: S }) : O && !L ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : L ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2622
+ ) : E ? /* @__PURE__ */ n(be, { message: E }) : O && !L ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : L ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
2623
2623
  dn,
2624
2624
  {
2625
2625
  channel: L,
@@ -2707,23 +2707,23 @@ const un = U.createContext({
2707
2707
  if (N[A].type !== "system") return N[A];
2708
2708
  }
2709
2709
  })(), p = (() => {
2710
- var S, I, O, F;
2710
+ var E, S, O, F;
2711
2711
  const N = Xt({
2712
2712
  message: b,
2713
2713
  viewerLanguage: o
2714
2714
  });
2715
- if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2716
- if (((I = b == null ? void 0 : b.metadata) == null ? void 0 : I.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2715
+ if (((E = b == null ? void 0 : b.metadata) == null ? void 0 : E.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2716
+ if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2717
2717
  if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2718
2718
  if (N) return N;
2719
2719
  const M = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
2720
2720
  return M ? M.og_scrape_url ? M.og_scrape_url : M.type === "image" ? "📷 Sent an image" : M.type === "video" ? "🎥 Sent a video" : M.type === "audio" ? "🎵 Sent audio" : M.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2721
- })(), v = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? Ee(b) : !1, R = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, k = qt(e), E = t ?? 0;
2721
+ })(), v = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? Ee(b) : !1, R = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, k = qt(e), I = t ?? 0;
2722
2722
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2723
2723
  channelId: e == null ? void 0 : e.id,
2724
2724
  isSelected: l,
2725
2725
  participantName: f,
2726
- unreadCount: E,
2726
+ unreadCount: I,
2727
2727
  hasTimestamp: !!v
2728
2728
  }), /* @__PURE__ */ n(
2729
2729
  "div",
@@ -2768,7 +2768,7 @@ const un = U.createContext({
2768
2768
  ] }),
2769
2769
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2770
2770
  /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
2771
- E > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: E > 99 ? "99+" : E })
2771
+ I > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: I > 99 ? "99+" : I })
2772
2772
  ] })
2773
2773
  ] })
2774
2774
  ] })
@@ -4198,7 +4198,7 @@ const zr = ({
4198
4198
  "data-testid": "pdf-attachment",
4199
4199
  children: [
4200
4200
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, R) => {
4201
- const k = _.filename ?? ee(_.src), E = p && R === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4201
+ const k = _.filename ?? ee(_.src), I = p && R === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4202
4202
  bn,
4203
4203
  {
4204
4204
  url: _.src,
@@ -4215,7 +4215,7 @@ const zr = ({
4215
4215
  item: _,
4216
4216
  index: R,
4217
4217
  onActivate: b,
4218
- trailingAction: E
4218
+ trailingAction: I
4219
4219
  },
4220
4220
  `${_.src}-${R}`
4221
4221
  );
@@ -4510,4 +4510,4 @@ export {
4510
4510
  Wt as y,
4511
4511
  va as z
4512
4512
  };
4513
- //# sourceMappingURL=index-BS5mKzxR.js.map
4513
+ //# sourceMappingURL=index-DNIsGhY_.js.map