@linktr.ee/messaging-react 3.23.0-rc-1785426600 → 3.24.0

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,5 +1,5 @@
1
- import { jsx as s, jsxs as h, Fragment as Z } from "react/jsx-runtime";
2
- import F, { createContext as lt, useContext as ke, useCallback as q, useState as B, useRef as j, useEffect as G, useId as en, useMemo as se, Suspense as tn } from "react";
1
+ import { jsx as s, jsxs as h, Fragment as J } from "react/jsx-runtime";
2
+ import F, { createContext as lt, useContext as ke, useCallback as W, useState as B, useRef as H, useEffect as Y, useId as en, useMemo as ne, Suspense as tn } from "react";
3
3
  import { StreamChatService as sn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as nn, LinkPreviewsManager as et } from "stream-chat";
5
5
  import { Chat as an, useChannelStateContext as he, useChatContext as Se, DateSeparator as rn, useMessageContext as fe, MessageStatus as on, MessageErrorIcon as tt, MessageText as ze, areMessageUIPropsEqual as ln, useMessageReminder as cn, useComponentContext as ds, Attachment as dn, EditMessageModal as un, MessageBlocked as mn, MessageBouncePrompt as hn, MessageDeleted as fn, MessageIsThreadReplyInChannelButtonIndicator as gn, MessageRepliesCountButton as pn, ReminderNotification as bn, StreamedMessageText as vn, messageHasAttachments as xn, messageHasReactions as _n, isDateSeparatorMessage as wn, isMessageBlocked as Nn, isMessageBounced as yn, MessageBounceModal as Cn, Poll as kn, useMessageComposer as Sn, useStateStore as En, MessageInput as Yt, useMessageInputContext as In, useMessageComposerHasSendableData as Tn, AttachmentPreviewList as An, QuotedMessagePreview as Ln, TextareaComposer as Mn, MessageTimestamp as Ge, AIStates as Ye, useTypingContext as Rn, useAIState as Dn, Channel as Pn, WithComponents as On, Window as zn, MessageList as Wt, ChannelList as Bn, InfiniteScroll as Fn } from "stream-chat-react";
@@ -26,10 +26,10 @@ const ps = lt({
26
26
  debug: i = !1,
27
27
  client: l
28
28
  }) => {
29
- var k, T;
30
- const o = q(
31
- (E, ...L) => {
32
- i && console.log(`🔥 [MessagingProvider] ${E}`, ...L);
29
+ var k, E;
30
+ const o = W(
31
+ (I, ...A) => {
32
+ i && console.log(`🔥 [MessagingProvider] ${I}`, ...A);
33
33
  },
34
34
  [i]
35
35
  );
@@ -39,18 +39,18 @@ const ps = lt({
39
39
  serviceConfig: !!n,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, m] = B(null), [f, u] = B(null), [g, c] = B(!1), [x, _] = B(!1), [b, p] = B(null), v = j(!1), w = j(null), C = j(n);
42
+ const [d, m] = B(null), [f, u] = B(null), [g, c] = B(!1), [x, _] = B(!1), [b, p] = B(null), v = H(!1), w = H(null), C = H(n);
43
43
  C.current = n;
44
- const I = j(i);
45
- I.current = i;
46
- const O = j({
44
+ const T = H(i);
45
+ T.current = i;
46
+ const O = H({
47
47
  userId: t == null ? void 0 : t.id,
48
48
  apiKey: a,
49
49
  serviceConfig: n,
50
50
  capabilities: r
51
- }), D = j(0);
52
- D.current++, o("📊 RENDER INFO", {
53
- renderCount: D.current,
51
+ }), R = H(0);
52
+ R.current++, o("📊 RENDER INFO", {
53
+ renderCount: R.current,
54
54
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
55
55
  propChanges: {
56
56
  userChanged: O.current.userId !== (t == null ? void 0 : t.id),
@@ -64,40 +64,40 @@ const ps = lt({
64
64
  serviceConfig: n,
65
65
  capabilities: r
66
66
  };
67
- const z = j(null);
67
+ const z = H(null);
68
68
  !l && a && ((k = z.current) == null ? void 0 : k.apiKey) !== a && (z.current = { apiKey: a, client: new nn(a) });
69
- const $ = l || (a ? ((T = z.current) == null ? void 0 : T.client) ?? null : null);
70
- G(() => {
71
- const E = D.current, L = C.current;
69
+ const $ = l || (a ? ((E = z.current) == null ? void 0 : E.client) ?? null : null);
70
+ Y(() => {
71
+ const I = R.current, A = C.current;
72
72
  if (l) {
73
73
  w.current = null, m(null), u(null), c(!1), p(null), _(!1);
74
74
  return;
75
75
  }
76
- if (!a || !$ || !L) {
76
+ if (!a || !$ || !A) {
77
77
  o("⚠️ SERVICE INIT SKIPPED", {
78
- renderCount: E,
78
+ renderCount: I,
79
79
  reason: "Missing apiKey, client, or serviceConfig"
80
80
  });
81
81
  return;
82
82
  }
83
83
  o("🚀 CREATING SERVICE", {
84
- renderCount: E,
84
+ renderCount: I,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
87
  const U = new sn({
88
- ...L,
88
+ ...A,
89
89
  apiKey: a,
90
- debug: I.current,
90
+ debug: T.current,
91
91
  client: $
92
92
  });
93
93
  w.current = U, m(U), o("✅ SERVICE SET", {
94
- renderCount: E,
94
+ renderCount: I,
95
95
  serviceInstance: !!U
96
96
  });
97
97
  }, [a, $, l]);
98
- const A = j(null);
99
- G(() => {
100
- var L, U;
98
+ const L = H(null);
99
+ Y(() => {
100
+ var A, U;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!d,
103
103
  hasUser: !!t,
@@ -115,7 +115,7 @@ const ps = lt({
115
115
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
116
116
  return;
117
117
  }
118
- if (((L = A.current) == null ? void 0 : L.serviceId) === d && ((U = A.current) == null ? void 0 : U.userId) === t.id) {
118
+ if (((A = L.current) == null ? void 0 : A.serviceId) === d && ((U = L.current) == null ? void 0 : U.userId) === t.id) {
119
119
  o(
120
120
  "⚠️ USER CONNECTION SKIPPED",
121
121
  "Already connected this user with this service"
@@ -126,16 +126,16 @@ const ps = lt({
126
126
  o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, _(!0), p(null);
127
127
  try {
128
128
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
- const Y = await d.connectUser(t);
130
- u(Y), c(!0), A.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
129
+ const j = await d.connectUser(t);
130
+ u(j), c(!0), L.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
131
131
  userId: t.id,
132
- clientId: Y.userID
132
+ clientId: j.userID
133
133
  });
134
- } catch (Y) {
135
- const ee = Y instanceof Error ? Y.message : "Connection failed";
136
- p(ee), o("❌ USER CONNECTION ERROR", {
134
+ } catch (j) {
135
+ const q = j instanceof Error ? j.message : "Connection failed";
136
+ p(q), o("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
- error: ee
138
+ error: q
139
139
  });
140
140
  } finally {
141
141
  _(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
@@ -144,14 +144,14 @@ const ps = lt({
144
144
  });
145
145
  }
146
146
  })();
147
- }, [d, t, o, g, l]), G(() => {
148
- const E = $;
147
+ }, [d, t, o, g, l]), Y(() => {
148
+ const I = $;
149
149
  return () => {
150
- var L;
151
- E && (A.current = null, (L = w.current) == null || L.disconnectUser().catch(console.error));
150
+ var A;
151
+ I && (L.current = null, (A = w.current) == null || A.disconnectUser().catch(console.error));
152
152
  };
153
153
  }, [$]);
154
- const S = q(async () => {
154
+ const S = W(async () => {
155
155
  if (o("🔄 REFRESH CONNECTION CALLED", {
156
156
  hasService: !!d,
157
157
  hasUser: !!t
@@ -163,19 +163,19 @@ const ps = lt({
163
163
  o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), _(!0);
164
164
  try {
165
165
  o("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
166
- const E = await d.connectUser(t);
167
- u(E), c(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
- } catch (E) {
169
- const L = E instanceof Error ? E.message : "Refresh failed";
170
- p(L), o("❌ CONNECTION REFRESH ERROR", {
166
+ const I = await d.connectUser(t);
167
+ u(I), c(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
+ } catch (I) {
169
+ const A = I instanceof Error ? I.message : "Refresh failed";
170
+ p(A), o("❌ CONNECTION REFRESH ERROR", {
171
171
  userId: t.id,
172
- error: L
172
+ error: A
173
173
  });
174
174
  } finally {
175
175
  _(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
176
176
  }
177
177
  }
178
- }, [d, t, o, l]), M = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
178
+ }, [d, t, o, l]), P = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!d,
180
180
  hasClient: !!f,
181
181
  isConnected: g,
@@ -212,10 +212,10 @@ const ps = lt({
212
212
  o
213
213
  ]);
214
214
  return o("🔄 RENDER END", {
215
- renderCount: D.current,
215
+ renderCount: R.current,
216
216
  willRenderChat: !!$,
217
- contextValueReady: !!M
218
- }), /* @__PURE__ */ s(ps.Provider, { value: M, children: $ ? /* @__PURE__ */ s(
217
+ contextValueReady: !!P
218
+ }), /* @__PURE__ */ s(ps.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
219
  an,
220
220
  {
221
221
  client: $,
@@ -230,7 +230,7 @@ const ps = lt({
230
230
  const [t, n] = B(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
232
232
  );
233
- return G(() => {
233
+ return Y(() => {
234
234
  var l;
235
235
  if (!e) {
236
236
  n(!1);
@@ -408,9 +408,9 @@ const _e = ({
408
408
  onActionComplete: m,
409
409
  logLabel: f = "useChannelModerationActions"
410
410
  }) => {
411
- var M;
412
- const { service: u, debug: g } = dt(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, x = !!(a && n && u && c), [_, b] = B(!1), [p, v] = B(null), [w, C] = B(!1), [I, O] = B(!1), D = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
413
- return G(() => {
411
+ var P;
412
+ const { service: u, debug: g } = dt(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [_, b] = B(!1), [p, v] = B(null), [w, C] = B(!1), [T, O] = B(!1), R = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
413
+ return Y(() => {
414
414
  if (!x || !u || !c) {
415
415
  b(!1), v(null);
416
416
  return;
@@ -418,15 +418,15 @@ const _e = ({
418
418
  let k = !1;
419
419
  return (async () => {
420
420
  try {
421
- const T = await u.getBlockedUsers();
421
+ const E = await u.getBlockedUsers();
422
422
  if (k) return;
423
423
  b(
424
- T.some(
425
- (E) => E.blocked_user_id === c
424
+ E.some(
425
+ (I) => I.blocked_user_id === c
426
426
  )
427
427
  );
428
- } catch (T) {
429
- k || console.error(`[${f}] Failed to check blocked status:`, T);
428
+ } catch (E) {
429
+ k || console.error(`[${f}] Failed to check blocked status:`, E);
430
430
  } finally {
431
431
  k || v({ participantId: c, service: u });
432
432
  }
@@ -435,44 +435,44 @@ const _e = ({
435
435
  };
436
436
  }, [x, u, c, f]), {
437
437
  isParticipantBlocked: _,
438
- isCheckingBlockedStatus: D,
438
+ isCheckingBlockedStatus: R,
439
439
  isLeaving: w,
440
- isUpdatingBlockStatus: I,
440
+ isUpdatingBlockStatus: T,
441
441
  handleLeaveConversation: async () => {
442
442
  var k;
443
443
  if (!w) {
444
444
  l == null || l(), g && console.log(`[${f}] Leave conversation`, e.cid), C(!0);
445
445
  try {
446
- const T = ((k = e._client) == null ? void 0 : k.userID) ?? null;
447
- await e.hide(T, !1), r && await r(e), m == null || m();
448
- } catch (T) {
449
- console.error(`[${f}] Failed to leave conversation`, T);
446
+ const E = ((k = e._client) == null ? void 0 : k.userID) ?? null;
447
+ await e.hide(E, !1), r && await r(e), m == null || m();
448
+ } catch (E) {
449
+ console.error(`[${f}] Failed to leave conversation`, E);
450
450
  } finally {
451
451
  C(!1);
452
452
  }
453
453
  }
454
454
  },
455
455
  handleBlockUser: async () => {
456
- var k, T, E;
457
- if (!(I || !u)) {
456
+ var k, E, I;
457
+ if (!(T || !u)) {
458
458
  o == null || o(), g && console.log(`[${f}] Block member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), O(!0);
459
459
  try {
460
- await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
461
- } catch (L) {
462
- console.error(`[${f}] Failed to block member`, L);
460
+ await u.blockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), m == null || m();
461
+ } catch (A) {
462
+ console.error(`[${f}] Failed to block member`, A);
463
463
  } finally {
464
464
  O(!1);
465
465
  }
466
466
  }
467
467
  },
468
468
  handleUnblockUser: async () => {
469
- var k, T, E;
470
- if (!(I || !u)) {
469
+ var k, E, I;
470
+ if (!(T || !u)) {
471
471
  o == null || o(), g && console.log(`[${f}] Unblock member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), O(!0);
472
472
  try {
473
- await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
474
- } catch (L) {
475
- console.error(`[${f}] Failed to unblock member`, L);
473
+ await u.unBlockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), m == null || m();
474
+ } catch (A) {
475
+ console.error(`[${f}] Failed to unblock member`, A);
476
476
  } finally {
477
477
  O(!1);
478
478
  }
@@ -513,14 +513,14 @@ const _e = ({
513
513
  customChannelActions: f,
514
514
  triggerClassName: u
515
515
  }) => {
516
- const [g, c] = B(!1), x = j(null), _ = en(), b = q(() => c(!1), []), {
516
+ const [g, c] = B(!1), x = H(null), _ = en(), b = W(() => c(!1), []), {
517
517
  isParticipantBlocked: p,
518
518
  isCheckingBlockedStatus: v,
519
519
  isLeaving: w,
520
520
  isUpdatingBlockStatus: C,
521
- handleLeaveConversation: I,
521
+ handleLeaveConversation: T,
522
522
  handleBlockUser: O,
523
- handleUnblockUser: D,
523
+ handleUnblockUser: R,
524
524
  handleReportUser: z
525
525
  } = Sa({
526
526
  channel: e,
@@ -535,15 +535,15 @@ const _e = ({
535
535
  onActionComplete: b,
536
536
  logLabel: "ChannelActionsMenu"
537
537
  });
538
- return G(() => {
538
+ return Y(() => {
539
539
  if (!g) return;
540
- const A = (M) => {
541
- x.current && !x.current.contains(M.target) && c(!1);
542
- }, S = (M) => {
543
- M.key === "Escape" && c(!1);
540
+ const L = (P) => {
541
+ x.current && !x.current.contains(P.target) && c(!1);
542
+ }, S = (P) => {
543
+ P.key === "Escape" && c(!1);
544
544
  };
545
- return document.addEventListener("mousedown", A), document.addEventListener("keydown", S), () => {
546
- document.removeEventListener("mousedown", A), document.removeEventListener("keydown", S);
545
+ return document.addEventListener("mousedown", L), document.addEventListener("keydown", S), () => {
546
+ document.removeEventListener("mousedown", L), document.removeEventListener("keydown", S);
547
547
  };
548
548
  }, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ h("div", { ref: x, className: "relative", children: [
549
549
  /* @__PURE__ */ h(
@@ -554,7 +554,7 @@ const _e = ({
554
554
  "aria-haspopup": "true",
555
555
  "aria-expanded": g,
556
556
  "aria-controls": g ? _ : void 0,
557
- onClick: () => c((A) => !A),
557
+ onClick: () => c((L) => !L),
558
558
  children: [
559
559
  /* @__PURE__ */ s($n, { className: "size-5 text-black/90" }),
560
560
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
@@ -574,7 +574,7 @@ const _e = ({
574
574
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(
575
575
  we,
576
576
  {
577
- onClick: I,
577
+ onClick: T,
578
578
  disabled: w,
579
579
  "aria-busy": w,
580
580
  children: [
@@ -593,7 +593,7 @@ const _e = ({
593
593
  ) : p ? /* @__PURE__ */ h(
594
594
  we,
595
595
  {
596
- onClick: D,
596
+ onClick: R,
597
597
  disabled: C,
598
598
  "aria-busy": C,
599
599
  children: [
@@ -640,31 +640,31 @@ const _e = ({
640
640
  showChannelInfo: x = !0,
641
641
  onParticipantNameClick: _
642
642
  }) => {
643
- var S, M, k, T;
643
+ var S, P, k, E;
644
644
  const { channel: b } = he(), { client: p } = Se(), v = F.useMemo(
645
645
  () => {
646
- var E;
646
+ var I;
647
647
  return vs(
648
- (E = b.state) == null ? void 0 : E.members,
648
+ (I = b.state) == null ? void 0 : I.members,
649
649
  p == null ? void 0 : p.userID,
650
650
  b.type
651
651
  );
652
652
  },
653
653
  [(S = b.state) == null ? void 0 : S.members, p == null ? void 0 : p.userID, b.type]
654
- ), w = xs(v == null ? void 0 : v.user), C = (M = v == null ? void 0 : v.user) == null ? void 0 : M.image, I = bs(b), O = Ta((k = b.data) == null ? void 0 : k.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, D = a && I, z = O || D || !!_, $ = async () => {
654
+ ), w = xs(v == null ? void 0 : v.user), C = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, T = bs(b), O = Ta((k = b.data) == null ? void 0 : k.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, R = a && T, z = O || R || !!_, $ = async () => {
655
655
  try {
656
- I ? await b.unpin() : await b.pin();
657
- } catch (E) {
656
+ T ? await b.unpin() : await b.pin();
657
+ } catch (I) {
658
658
  console.error(
659
659
  "[ChannelHeaderRedesign] Failed to update pinned status:",
660
- E
660
+ I
661
661
  );
662
662
  }
663
- }, A = /* @__PURE__ */ h(Z, { children: [
663
+ }, L = /* @__PURE__ */ h(J, { children: [
664
664
  /* @__PURE__ */ s(
665
665
  _e,
666
666
  {
667
- id: ((T = v == null ? void 0 : v.user) == null ? void 0 : T.id) || b.id || "unknown",
667
+ id: ((E = v == null ? void 0 : v.user) == null ? void 0 : E.id) || b.id || "unknown",
668
668
  name: w,
669
669
  image: C,
670
670
  shape: "circle",
@@ -690,7 +690,7 @@ const _e = ({
690
690
  children: /* @__PURE__ */ s(Vn, { className: "size-2.5", weight: "bold" })
691
691
  }
692
692
  ),
693
- D && /* @__PURE__ */ s(
693
+ R && /* @__PURE__ */ s(
694
694
  "span",
695
695
  {
696
696
  "aria-label": "Starred conversation",
@@ -740,9 +740,9 @@ const _e = ({
740
740
  onClick: _,
741
741
  "aria-label": `View details for ${w}`,
742
742
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
743
- children: A
743
+ children: L
744
744
  }
745
- ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: A }) }),
745
+ ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: L }) }),
746
746
  /* @__PURE__ */ h("div", { className: "flex items-start justify-end gap-2", children: [
747
747
  a && /* @__PURE__ */ s(
748
748
  "button",
@@ -750,16 +750,16 @@ const _e = ({
750
750
  className: We,
751
751
  onClick: $,
752
752
  type: "button",
753
- "aria-pressed": I,
754
- "aria-label": I ? "Unstar conversation" : "Star conversation",
753
+ "aria-pressed": T,
754
+ "aria-label": T ? "Unstar conversation" : "Star conversation",
755
755
  children: /* @__PURE__ */ s(
756
756
  st,
757
757
  {
758
758
  className: y("size-5", {
759
- "text-[#FFD60A]": I,
760
- "text-black/90": !I
759
+ "text-[#FFD60A]": T,
760
+ "text-black/90": !T
761
761
  }),
762
- weight: I ? "fill" : "regular"
762
+ weight: T ? "fill" : "regular"
763
763
  }
764
764
  )
765
765
  }
@@ -790,10 +790,10 @@ function Ma(e) {
790
790
  return e != null && e.length ? e.some((t) => t.type === rt) ? "down" : e.some((t) => t.type === at) ? "up" : null : null;
791
791
  }
792
792
  function Ra(e) {
793
- const { channel: t } = he(), { client: n } = Se("useMessageVote"), a = se(
793
+ const { channel: t } = he(), { client: n } = Se("useMessageVote"), a = ne(
794
794
  () => Ma(e.own_reactions),
795
795
  [e.own_reactions]
796
- ), r = q(async () => {
796
+ ), r = W(async () => {
797
797
  if (n != null && n.userID)
798
798
  try {
799
799
  a === "up" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
@@ -803,7 +803,7 @@ function Ra(e) {
803
803
  );
804
804
  } catch {
805
805
  }
806
- }, [t, n == null ? void 0 : n.userID, e.id, a]), i = q(async () => {
806
+ }, [t, n == null ? void 0 : n.userID, e.id, a]), i = W(async () => {
807
807
  if (n != null && n.userID)
808
808
  try {
809
809
  a === "down" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
@@ -905,66 +905,66 @@ const Va = (e) => {
905
905
  muted: d = !1,
906
906
  onContainerClick: m
907
907
  }) => {
908
- const f = ce(t), u = j(null), g = j(null), c = j(null), x = j(r), [_, b] = B(a), [p, v] = B(0), [w, C] = B(!1), [I, O] = B(!1), [D, z] = B(!1), [$, A] = B(!1), [S, M] = B(!0), [k, T] = B(null), E = q(() => {
908
+ const f = ce(t), u = H(null), g = H(null), c = H(null), x = H(r), [_, b] = B(a), [p, v] = B(0), [w, C] = B(!1), [T, O] = B(!1), [R, z] = B(!1), [$, L] = B(!1), [S, P] = B(!0), [k, E] = B(null), I = W(() => {
909
909
  z(!1), b(!0);
910
- }, []), L = q((N) => {
911
- const R = g.current;
912
- if (!R) return 0;
913
- const H = R.getBoundingClientRect();
910
+ }, []), A = W((N) => {
911
+ const M = g.current;
912
+ if (!M) return 0;
913
+ const G = M.getBoundingClientRect();
914
914
  return Math.max(
915
915
  0,
916
- Math.min(1, (Va(N) - H.left) / H.width)
916
+ Math.min(1, (Va(N) - G.left) / G.width)
917
917
  );
918
- }, []), U = q((N) => {
919
- const R = u.current;
920
- R && R.duration && (R.currentTime = N * R.duration);
921
- }, []), Y = (N) => {
918
+ }, []), U = W((N) => {
919
+ const M = u.current;
920
+ M && M.duration && (M.currentTime = N * M.duration);
921
+ }, []), j = (N) => {
922
922
  N.stopPropagation(), C(!0);
923
- const R = L(N);
924
- v(R), U(R);
923
+ const M = A(N);
924
+ v(M), U(M);
925
925
  };
926
- G(() => {
926
+ Y(() => {
927
927
  r !== void 0 && r !== x.current && (x.current = r, b(r));
928
- }, [r]), G(() => {
928
+ }, [r]), Y(() => {
929
929
  if (!_) {
930
930
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
931
931
  return;
932
932
  }
933
933
  const N = () => {
934
- const R = u.current;
935
- R && R.duration && !w && v(R.currentTime / R.duration), c.current = requestAnimationFrame(N);
934
+ const M = u.current;
935
+ M && M.duration && !w && v(M.currentTime / M.duration), c.current = requestAnimationFrame(N);
936
936
  };
937
937
  return c.current = requestAnimationFrame(N), () => {
938
938
  c.current !== null && cancelAnimationFrame(c.current);
939
939
  };
940
- }, [_, w]), G(() => {
940
+ }, [_, w]), Y(() => {
941
941
  const N = u.current;
942
- N && (_ ? N.play().catch((R) => {
942
+ N && (_ ? N.play().catch((M) => {
943
943
  b(!1), z(!0);
944
944
  }) : N.pause());
945
- }, [_]), G(() => {
945
+ }, [_]), Y(() => {
946
946
  if (!w) return;
947
- const N = (H) => v(L(H)), R = (H) => {
948
- C(!1), U(L(H));
947
+ const N = (G) => v(A(G)), M = (G) => {
948
+ C(!1), U(A(G));
949
949
  };
950
- return window.addEventListener("mousemove", N), window.addEventListener("mouseup", R), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", R), () => {
951
- window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", R);
950
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", M), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", M), () => {
951
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", M);
952
952
  };
953
- }, [w, L, U]);
954
- const ee = k ? { aspectRatio: String(k) } : void 0, ae = k ? "" : " aspect-video", X = Math.round(p * 100);
953
+ }, [w, A, U]);
954
+ const q = k ? { aspectRatio: String(k) } : void 0, Q = k ? "" : " aspect-video", K = Math.round(p * 100);
955
955
  return /* @__PURE__ */ h(
956
956
  "div",
957
957
  {
958
958
  role: "button",
959
959
  tabIndex: 0,
960
- className: `relative cursor-pointer overflow-hidden bg-black ${ae}`,
961
- style: ee,
960
+ className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
961
+ style: q,
962
962
  onClick: (N) => {
963
963
  if (m) {
964
964
  m(N);
965
965
  return;
966
966
  }
967
- D || l && b((R) => !R);
967
+ R || l && b((M) => !M);
968
968
  },
969
969
  onKeyDown: (N) => {
970
970
  if (!(N.key !== "Enter" && N.key !== " ")) {
@@ -972,7 +972,7 @@ const Va = (e) => {
972
972
  m(N);
973
973
  return;
974
974
  }
975
- D || l && b((R) => !R);
975
+ R || l && b((M) => !M);
976
976
  }
977
977
  },
978
978
  children: [
@@ -996,11 +996,11 @@ const Va = (e) => {
996
996
  loop: i,
997
997
  muted: d,
998
998
  style: { width: "100%", height: "100%" },
999
- onLoadStart: () => A(!0),
999
+ onLoadStart: () => L(!0),
1000
1000
  onCanPlay: () => {
1001
- A(!1), M(!1);
1001
+ L(!1), P(!1);
1002
1002
  },
1003
- onWaiting: () => A(!0),
1003
+ onWaiting: () => L(!0),
1004
1004
  onPlay: () => z(!1),
1005
1005
  onEnded: () => {
1006
1006
  i || (b(!1), v(0));
@@ -1016,15 +1016,15 @@ const Va = (e) => {
1016
1016
  muted: d,
1017
1017
  playsInline: !0,
1018
1018
  style: { width: "100%", height: "100%" },
1019
- onLoadStart: () => A(!0),
1019
+ onLoadStart: () => L(!0),
1020
1020
  onCanPlay: () => {
1021
- A(!1), M(!1);
1021
+ L(!1), P(!1);
1022
1022
  },
1023
- onWaiting: () => A(!0),
1023
+ onWaiting: () => L(!0),
1024
1024
  onPlay: () => z(!1),
1025
1025
  onLoadedMetadata: () => {
1026
1026
  const N = u.current;
1027
- N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && T(N.videoWidth / N.videoHeight);
1027
+ N instanceof HTMLVideoElement && N.videoWidth && N.videoHeight && E(N.videoWidth / N.videoHeight);
1028
1028
  },
1029
1029
  onEnded: () => {
1030
1030
  i || (b(!1), v(0));
@@ -1032,14 +1032,14 @@ const Va = (e) => {
1032
1032
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1033
1033
  }
1034
1034
  ) }),
1035
- $ && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1035
+ $ && !R && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1036
1036
  ve,
1037
1037
  {
1038
1038
  className: "size-8 animate-spin text-white/80",
1039
1039
  weight: "bold"
1040
1040
  }
1041
1041
  ) }),
1042
- D && !l && /* @__PURE__ */ s(
1042
+ R && !l && /* @__PURE__ */ s(
1043
1043
  "div",
1044
1044
  {
1045
1045
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -1047,10 +1047,10 @@ const Va = (e) => {
1047
1047
  tabIndex: 0,
1048
1048
  "aria-label": "Play preview",
1049
1049
  onClick: (N) => {
1050
- N.stopPropagation(), E();
1050
+ N.stopPropagation(), I();
1051
1051
  },
1052
1052
  onKeyDown: (N) => {
1053
- N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), E());
1053
+ N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), I());
1054
1054
  },
1055
1055
  children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(nt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1056
1056
  }
@@ -1060,14 +1060,14 @@ const Va = (e) => {
1060
1060
  {
1061
1061
  role: "slider",
1062
1062
  "aria-label": "Playback position",
1063
- "aria-valuenow": X,
1063
+ "aria-valuenow": K,
1064
1064
  "aria-valuemin": 0,
1065
1065
  "aria-valuemax": 100,
1066
1066
  tabIndex: 0,
1067
1067
  ref: g,
1068
1068
  className: "relative flex h-4 w-full cursor-pointer items-center",
1069
- onMouseDown: Y,
1070
- onTouchStart: Y,
1069
+ onMouseDown: j,
1070
+ onTouchStart: j,
1071
1071
  onClick: (N) => N.stopPropagation(),
1072
1072
  onKeyDown: (N) => {
1073
1073
  N.key === "ArrowRight" && U(Math.min(1, p + 0.05)), N.key === "ArrowLeft" && U(Math.max(0, p - 0.05));
@@ -1076,7 +1076,7 @@ const Va = (e) => {
1076
1076
  "div",
1077
1077
  {
1078
1078
  className: "h-full rounded-full bg-white",
1079
- style: { width: `${X}%` }
1079
+ style: { width: `${K}%` }
1080
1080
  }
1081
1081
  ) })
1082
1082
  }
@@ -1087,7 +1087,7 @@ const Va = (e) => {
1087
1087
  {
1088
1088
  type: "button",
1089
1089
  onClick: (N) => {
1090
- N.stopPropagation(), b((R) => !R);
1090
+ N.stopPropagation(), b((M) => !M);
1091
1091
  },
1092
1092
  className: "shrink-0 text-white",
1093
1093
  "aria-label": _ ? "Pause" : "Play",
@@ -1099,14 +1099,14 @@ const Va = (e) => {
1099
1099
  {
1100
1100
  role: "slider",
1101
1101
  "aria-label": "Playback position",
1102
- "aria-valuenow": X,
1102
+ "aria-valuenow": K,
1103
1103
  "aria-valuemin": 0,
1104
1104
  "aria-valuemax": 100,
1105
1105
  tabIndex: 0,
1106
1106
  ref: g,
1107
1107
  className: "relative flex h-4 w-full cursor-pointer items-center",
1108
- onMouseDown: Y,
1109
- onTouchStart: Y,
1108
+ onMouseDown: j,
1109
+ onTouchStart: j,
1110
1110
  onClick: (N) => N.stopPropagation(),
1111
1111
  onMouseEnter: () => O(!0),
1112
1112
  onMouseLeave: () => O(!1),
@@ -1117,12 +1117,12 @@ const Va = (e) => {
1117
1117
  /* @__PURE__ */ s(
1118
1118
  "div",
1119
1119
  {
1120
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${I || w ? "h-1.5" : "h-1"}`,
1120
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || w ? "h-1.5" : "h-1"}`,
1121
1121
  children: /* @__PURE__ */ s(
1122
1122
  "div",
1123
1123
  {
1124
1124
  className: "h-full rounded-full bg-white",
1125
- style: { width: `${X}%` }
1125
+ style: { width: `${K}%` }
1126
1126
  }
1127
1127
  )
1128
1128
  }
@@ -1130,8 +1130,8 @@ const Va = (e) => {
1130
1130
  /* @__PURE__ */ s(
1131
1131
  "div",
1132
1132
  {
1133
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${I || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1134
- style: { left: `${X}%` }
1133
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || w ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1134
+ style: { left: `${K}%` }
1135
1135
  }
1136
1136
  )
1137
1137
  ]
@@ -1717,7 +1717,7 @@ function pr(e, t, n) {
1717
1717
  const a = gr(e, t), r = typeof n == "number" && n > 0 ? hr(n) : void 0;
1718
1718
  return [a, r].filter(Boolean).join(" · ") || void 0;
1719
1719
  }
1720
- function ne(e) {
1720
+ function ae(e) {
1721
1721
  try {
1722
1722
  const n = new URL(e).pathname.split("/").pop();
1723
1723
  return n && n.length > 0 ? decodeURIComponent(n) : "download";
@@ -1784,7 +1784,7 @@ const br = {
1784
1784
  u
1785
1785
  ]
1786
1786
  }
1787
- ) : /* @__PURE__ */ h(Z, { children: [
1787
+ ) : /* @__PURE__ */ h(J, { children: [
1788
1788
  f,
1789
1789
  u
1790
1790
  ] });
@@ -1794,7 +1794,7 @@ const br = {
1794
1794
  ] });
1795
1795
  };
1796
1796
  async function As(e, t) {
1797
- const n = t ?? ne(e);
1797
+ const n = t ?? ae(e);
1798
1798
  try {
1799
1799
  const a = await fetch(e, { mode: "cors" });
1800
1800
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -1821,7 +1821,7 @@ const _r = ({
1821
1821
  onActivate: a,
1822
1822
  trailingAction: r
1823
1823
  }) => {
1824
- const i = t.filename ?? ne(t.src);
1824
+ const i = t.filename ?? ae(t.src);
1825
1825
  return /* @__PURE__ */ s(
1826
1826
  Ts,
1827
1827
  {
@@ -1859,7 +1859,7 @@ const _r = ({
1859
1859
  if ((m == null ? void 0 : m(b)) === !1) return;
1860
1860
  const p = c[b];
1861
1861
  if (!p) return;
1862
- const v = p.filename ?? ne(p.src);
1862
+ const v = p.filename ?? ae(p.src);
1863
1863
  As(p.src, v);
1864
1864
  };
1865
1865
  if (c.length === 0)
@@ -1904,7 +1904,7 @@ const _r = ({
1904
1904
  onNext: t,
1905
1905
  prevLabel: n = "Previous",
1906
1906
  nextLabel: a = "Next"
1907
- }) => /* @__PURE__ */ h(Z, { children: [
1907
+ }) => /* @__PURE__ */ h(J, { children: [
1908
1908
  /* @__PURE__ */ s(
1909
1909
  "button",
1910
1910
  {
@@ -1934,7 +1934,7 @@ const _r = ({
1934
1934
  tone: i = "dark",
1935
1935
  onTriggered: l
1936
1936
  }) => {
1937
- const [o, d] = B(!1), m = q(
1937
+ const [o, d] = B(!1), m = W(
1938
1938
  (c) => {
1939
1939
  c.stopPropagation(), !o && (d(!0), As(e, t).catch(() => {
1940
1940
  }).finally(() => {
@@ -2016,17 +2016,17 @@ const _r = ({
2016
2016
  open: n
2017
2017
  }) => {
2018
2018
  const a = qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2019
- G(() => {
2019
+ Y(() => {
2020
2020
  n && i(qe(t, 0, Math.max(e - 1, 0)));
2021
- }, [n, t, e]), G(() => {
2021
+ }, [n, t, e]), Y(() => {
2022
2022
  i((d) => qe(d, 0, Math.max(e - 1, 0)));
2023
2023
  }, [e]);
2024
- const l = q(() => {
2024
+ const l = W(() => {
2025
2025
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
2026
- }, [e]), o = q(() => {
2026
+ }, [e]), o = W(() => {
2027
2027
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
2028
2028
  }, [e]);
2029
- return G(() => {
2029
+ return Y(() => {
2030
2030
  if (!n || e <= 1) return;
2031
2031
  const d = (m) => {
2032
2032
  if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
@@ -2044,8 +2044,8 @@ const _r = ({
2044
2044
  children: i,
2045
2045
  "data-testid": l
2046
2046
  }) => {
2047
- const o = j(null), d = j(null);
2048
- return G(() => {
2047
+ const o = H(null), d = H(null);
2048
+ return Y(() => {
2049
2049
  var g;
2050
2050
  const u = o.current;
2051
2051
  if (u) {
@@ -2135,8 +2135,8 @@ const _r = ({
2135
2135
  length: t.length,
2136
2136
  initialIndex: n,
2137
2137
  open: e
2138
- }), o = t[r], d = se(
2139
- () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "image"),
2138
+ }), o = t[r], d = ne(
2139
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
2140
2140
  [o]
2141
2141
  );
2142
2142
  return o ? /* @__PURE__ */ h(
@@ -2293,12 +2293,12 @@ const _r = ({
2293
2293
  }
2294
2294
  );
2295
2295
  }, Ae = (e) => {
2296
- const [t, n] = B(!1), [a, r] = B(0), i = q(
2296
+ const [t, n] = B(!1), [a, r] = B(0), i = W(
2297
2297
  (o) => {
2298
2298
  (e == null ? void 0 : e(o)) !== !1 && (r(o), n(!0));
2299
2299
  },
2300
2300
  [e]
2301
- ), l = q(() => n(!1), []);
2301
+ ), l = W(() => n(!1), []);
2302
2302
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2303
2303
  }, Lr = ({
2304
2304
  item: e,
@@ -2463,10 +2463,10 @@ const _r = ({
2463
2463
  length: t.length,
2464
2464
  initialIndex: n,
2465
2465
  open: e
2466
- }), o = t[r], d = se(
2467
- () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
2466
+ }), o = t[r], d = ne(
2467
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
2468
2468
  [o]
2469
- ), m = se(
2469
+ ), m = ne(
2470
2470
  () => o ? Ur(o.src) : void 0,
2471
2471
  [o]
2472
2472
  );
@@ -2517,7 +2517,7 @@ const _r = ({
2517
2517
  onActivate: a,
2518
2518
  trailingAction: r
2519
2519
  }) => {
2520
- const i = t.filename ?? ne(t.src);
2520
+ const i = t.filename ?? ae(t.src);
2521
2521
  return /* @__PURE__ */ s(
2522
2522
  Ts,
2523
2523
  {
@@ -2550,7 +2550,7 @@ const _r = ({
2550
2550
  return null;
2551
2551
  const p = u.map((v) => ({
2552
2552
  src: v.src,
2553
- filename: v.filename ?? ne(v.src)
2553
+ filename: v.filename ?? ae(v.src)
2554
2554
  }));
2555
2555
  return /* @__PURE__ */ h(
2556
2556
  Ee,
@@ -2561,7 +2561,7 @@ const _r = ({
2561
2561
  "data-testid": "pdf-attachment",
2562
2562
  children: [
2563
2563
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((v, w) => {
2564
- const C = v.filename ?? ne(v.src), I = b && w === 0 ? /* @__PURE__ */ s(Ie, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2564
+ const C = v.filename ?? ae(v.src), T = b && w === 0 ? /* @__PURE__ */ s(Ie, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2565
2565
  Ls,
2566
2566
  {
2567
2567
  url: v.src,
@@ -2578,7 +2578,7 @@ const _r = ({
2578
2578
  item: v,
2579
2579
  index: w,
2580
2580
  onActivate: x,
2581
- trailingAction: I
2581
+ trailingAction: T
2582
2582
  },
2583
2583
  `${v.src}-${w}`
2584
2584
  );
@@ -2609,8 +2609,8 @@ const _r = ({
2609
2609
  length: t.length,
2610
2610
  initialIndex: n,
2611
2611
  open: e
2612
- }), o = t[r], d = se(
2613
- () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "video"),
2612
+ }), o = t[r], d = ne(
2613
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
2614
2614
  [o]
2615
2615
  );
2616
2616
  return o ? /* @__PURE__ */ h(
@@ -2775,7 +2775,7 @@ const _r = ({
2775
2775
  function ai(e) {
2776
2776
  return ke($s)[e] ?? ni[e];
2777
2777
  }
2778
- const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import("./Card-G28kYBkV.js")), oi = () => /* @__PURE__ */ s(
2778
+ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import("./Card-Cgn2G-VJ.js")), oi = () => /* @__PURE__ */ s(
2779
2779
  "div",
2780
2780
  {
2781
2781
  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)]",
@@ -2843,10 +2843,10 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2843
2843
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2844
2844
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2845
2845
  ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(li, { size: l ? 12 : 15 }) });
2846
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(Z, { children: [
2846
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(J, { children: [
2847
2847
  m,
2848
2848
  f
2849
- ] }) : /* @__PURE__ */ h(Z, { children: [
2849
+ ] }) : /* @__PURE__ */ h(J, { children: [
2850
2850
  f,
2851
2851
  m
2852
2852
  ] }) });
@@ -2893,10 +2893,10 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2893
2893
  }
2894
2894
  })();
2895
2895
  return e.id === n;
2896
- }, Ke = () => Nt() ? /* @__PURE__ */ h(Z, { children: [
2896
+ }, Ke = () => Nt() ? /* @__PURE__ */ h(J, { children: [
2897
2897
  /* @__PURE__ */ s(la, { weight: "bold", "aria-hidden": "true" }),
2898
2898
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2899
- ] }) : null, fi = () => Nt() ? /* @__PURE__ */ h(Z, { children: [
2899
+ ] }) : null, fi = () => Nt() ? /* @__PURE__ */ h(J, { children: [
2900
2900
  /* @__PURE__ */ s(
2901
2901
  ve,
2902
2902
  {
@@ -2911,7 +2911,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2911
2911
  broadcastName: t,
2912
2912
  onBroadcastClick: n
2913
2913
  }) => {
2914
- const a = t || "Broadcast", r = /* @__PURE__ */ h(Z, { children: [
2914
+ const a = t || "Broadcast", r = /* @__PURE__ */ h(J, { children: [
2915
2915
  /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(oa, { weight: "fill" }) }),
2916
2916
  /* @__PURE__ */ s(
2917
2917
  "span",
@@ -3056,13 +3056,13 @@ const _i = {
3056
3056
  d == null && Ci[e]
3057
3057
  ), C = d ? { color: d } : void 0;
3058
3058
  if (m) {
3059
- const I = y(
3059
+ const T = y(
3060
3060
  "animate-pulse rounded",
3061
3061
  ki[e]
3062
3062
  );
3063
3063
  return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
3064
- /* @__PURE__ */ s("div", { className: y("h-5 w-3/4", I), "aria-hidden": !0 }),
3065
- /* @__PURE__ */ s("div", { className: y("h-4 w-1/2", I), "aria-hidden": !0 })
3064
+ /* @__PURE__ */ s("div", { className: y("h-5 w-3/4", T), "aria-hidden": !0 }),
3065
+ /* @__PURE__ */ s("div", { className: y("h-4 w-1/2", T), "aria-hidden": !0 })
3066
3066
  ] }) });
3067
3067
  }
3068
3068
  return /* @__PURE__ */ h("div", { className: "shrink-0 px-4 py-3", children: [
@@ -3222,7 +3222,7 @@ const _i = {
3222
3222
  "aria-hidden": !0
3223
3223
  }
3224
3224
  )
3225
- ) : f ? /* @__PURE__ */ h(Z, { children: [
3225
+ ) : f ? /* @__PURE__ */ h(J, { children: [
3226
3226
  /* @__PURE__ */ s(
3227
3227
  "video",
3228
3228
  {
@@ -3459,7 +3459,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3459
3459
  }
3460
3460
  )
3461
3461
  ] })
3462
- ) : /* @__PURE__ */ s(Z, { children: a }), $i = ({
3462
+ ) : /* @__PURE__ */ s(J, { children: a }), $i = ({
3463
3463
  title: e,
3464
3464
  description: t,
3465
3465
  url: n,
@@ -3616,7 +3616,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3616
3616
  Sent: Ui,
3617
3617
  Received: $i
3618
3618
  };
3619
- function P(e) {
3619
+ function D(e) {
3620
3620
  const t = e == null ? void 0 : e.trim();
3621
3621
  return t || void 0;
3622
3622
  }
@@ -3635,10 +3635,10 @@ function Vi(e, t) {
3635
3635
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3636
3636
  }
3637
3637
  function as(e) {
3638
- const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
3638
+ const t = D(e.og_scrape_url) ?? D(e.title_link), n = D(e.image_url) ?? D(e.thumb_url), a = D(e.asset_url), r = D(e.mime_type);
3639
3639
  return {
3640
- title: P(e.title),
3641
- description: P(e.text),
3640
+ title: D(e.title),
3641
+ description: D(e.text),
3642
3642
  url: t,
3643
3643
  thumbnailUrl: me(n),
3644
3644
  // Playable clip embedded in a link preview — lets LinkAttachment render its
@@ -3651,7 +3651,7 @@ function as(e) {
3651
3651
  // paints an identical chin without re-extracting — visitors in
3652
3652
  // linktr.ee-profiles cannot call the extraction query at all. Absent on
3653
3653
  // messages sent before MES-1349, which render the fallback chin.
3654
- accentColor: P(e.accent_color),
3654
+ accentColor: D(e.accent_color),
3655
3655
  // A persisted attachment is by definition fully scraped.
3656
3656
  status: "ready"
3657
3657
  };
@@ -3661,7 +3661,7 @@ function ji(e) {
3661
3661
  return Hs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3662
3662
  }
3663
3663
  function Hs(e) {
3664
- const t = P(e.og_scrape_url);
3664
+ const t = D(e.og_scrape_url);
3665
3665
  return e.type === "link" || !!t && !e.asset_url;
3666
3666
  }
3667
3667
  function Gs(e) {
@@ -3698,7 +3698,7 @@ function Gi(e, t, n) {
3698
3698
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3699
3699
  }
3700
3700
  function rs(e) {
3701
- return P(e.image_url) ?? P(e.asset_url) ?? "";
3701
+ return D(e.image_url) ?? D(e.asset_url) ?? "";
3702
3702
  }
3703
3703
  function Yi(e) {
3704
3704
  switch (e) {
@@ -3721,42 +3721,42 @@ function Wi(e, t) {
3721
3721
  return {
3722
3722
  items: t.map((a) => ({
3723
3723
  src: rs(a),
3724
- alt: P(a.title)
3724
+ alt: D(a.title)
3725
3725
  }))
3726
3726
  };
3727
3727
  case "video":
3728
3728
  return {
3729
3729
  items: t.map((a) => ({
3730
- src: P(a.asset_url) ?? "",
3731
- poster: P(
3730
+ src: D(a.asset_url) ?? "",
3731
+ poster: D(
3732
3732
  a.thumb_url
3733
3733
  ),
3734
- mimeType: P(a.mime_type)
3734
+ mimeType: D(a.mime_type)
3735
3735
  }))
3736
3736
  };
3737
3737
  case "audio":
3738
3738
  return {
3739
3739
  items: t.map((a) => ({
3740
- src: P(a.asset_url) ?? "",
3741
- mimeType: P(a.mime_type) ?? "audio/mpeg",
3742
- filename: P(a.title)
3740
+ src: D(a.asset_url) ?? "",
3741
+ mimeType: D(a.mime_type) ?? "audio/mpeg",
3742
+ filename: D(a.title)
3743
3743
  }))
3744
3744
  };
3745
3745
  case "pdf":
3746
3746
  return {
3747
3747
  items: t.map((a) => ({
3748
- src: P(a.asset_url) ?? "",
3749
- filename: P(a.title),
3748
+ src: D(a.asset_url) ?? "",
3749
+ filename: D(a.title),
3750
3750
  fileSize: a.file_size
3751
3751
  }))
3752
3752
  };
3753
3753
  case "file":
3754
3754
  return {
3755
3755
  items: t.map((a) => ({
3756
- src: P(a.asset_url) ?? "",
3757
- filename: P(a.title),
3756
+ src: D(a.asset_url) ?? "",
3757
+ filename: D(a.title),
3758
3758
  fileSize: a.file_size,
3759
- mimeType: P(a.mime_type) ?? "application/octet-stream"
3759
+ mimeType: D(a.mime_type) ?? "application/octet-stream"
3760
3760
  }))
3761
3761
  };
3762
3762
  }
@@ -3766,34 +3766,34 @@ function Wi(e, t) {
3766
3766
  case "image":
3767
3767
  return {
3768
3768
  src: rs(n),
3769
- alt: P(n.title)
3769
+ alt: D(n.title)
3770
3770
  };
3771
3771
  case "video":
3772
3772
  return {
3773
- src: P(n.asset_url) ?? "",
3774
- poster: P(
3773
+ src: D(n.asset_url) ?? "",
3774
+ poster: D(
3775
3775
  n.thumb_url
3776
3776
  ),
3777
- mimeType: P(n.mime_type)
3777
+ mimeType: D(n.mime_type)
3778
3778
  };
3779
3779
  case "audio":
3780
3780
  return {
3781
- src: P(n.asset_url) ?? "",
3782
- mimeType: P(n.mime_type) ?? "audio/mpeg",
3783
- filename: P(n.title)
3781
+ src: D(n.asset_url) ?? "",
3782
+ mimeType: D(n.mime_type) ?? "audio/mpeg",
3783
+ filename: D(n.title)
3784
3784
  };
3785
3785
  case "pdf":
3786
3786
  return {
3787
- src: P(n.asset_url) ?? "",
3788
- filename: P(n.title),
3787
+ src: D(n.asset_url) ?? "",
3788
+ filename: D(n.title),
3789
3789
  fileSize: n.file_size
3790
3790
  };
3791
3791
  case "file":
3792
3792
  return {
3793
- src: P(n.asset_url) ?? "",
3794
- filename: P(n.title),
3793
+ src: D(n.asset_url) ?? "",
3794
+ filename: D(n.title),
3795
3795
  fileSize: n.file_size,
3796
- mimeType: P(n.mime_type) ?? "application/octet-stream"
3796
+ mimeType: D(n.mime_type) ?? "application/octet-stream"
3797
3797
  };
3798
3798
  }
3799
3799
  }
@@ -3905,33 +3905,33 @@ const Xi = ({
3905
3905
  threadList: _,
3906
3906
  viewerLanguage: b,
3907
3907
  onBroadcastClick: p
3908
- } = e, { client: v } = Se("CustomMessage"), { channel: w } = he("CustomMessage"), { isUnlocking: C, onUnlockClick: I, onFetchSource: O, onDownloadClick: D } = ai("LockedAttachment"), [z, $] = B(!1), A = cn(c.id), { selected: S, voteUp: M, voteDown: k } = Ra(c), {
3909
- Attachment: T = dn,
3910
- EditMessageModal: E = un,
3911
- MessageActions: L,
3908
+ } = e, { client: v } = Se("CustomMessage"), { channel: w } = he("CustomMessage"), { isUnlocking: C, onUnlockClick: T, onFetchSource: O, onDownloadClick: R } = ai("LockedAttachment"), [z, $] = B(!1), L = cn(c.id), { selected: S, voteUp: P, voteDown: k } = Ra(c), {
3909
+ Attachment: E = dn,
3910
+ EditMessageModal: I = un,
3911
+ MessageActions: A,
3912
3912
  MessageBlocked: U = mn,
3913
- MessageBouncePrompt: Y = hn,
3914
- MessageDeleted: ee = fn,
3915
- MessageIsThreadReplyInChannelButtonIndicator: ae = gn,
3916
- MessageRepliesCountButton: X = pn,
3913
+ MessageBouncePrompt: j = hn,
3914
+ MessageDeleted: q = fn,
3915
+ MessageIsThreadReplyInChannelButtonIndicator: Q = gn,
3916
+ MessageRepliesCountButton: K = pn,
3917
3917
  ReminderNotification: N = bn,
3918
- StreamedMessageText: R = vn,
3919
- PinIndicator: H
3920
- } = ds("CustomMessage"), W = xn(c), te = _n(c), K = se(
3918
+ StreamedMessageText: M = vn,
3919
+ PinIndicator: G
3920
+ } = ds("CustomMessage"), X = xn(c), se = _n(c), Z = ne(
3921
3921
  () => u == null ? void 0 : u(c),
3922
3922
  [u, c]
3923
- ), V = se(() => {
3923
+ ), V = ne(() => {
3924
3924
  const ue = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...ue] : ue;
3925
3925
  if (!Be(c)) return be;
3926
3926
  const Ht = be.filter((Gt) => !("type" in Gt) || !Ss(Gt));
3927
3927
  return Ht.length === be.length ? be : Ht;
3928
- }, [c]), J = se(
3928
+ }, [c]), ee = ne(
3929
3929
  () => Gs(V),
3930
3930
  [V]
3931
- ), re = se(() => {
3931
+ ), re = ne(() => {
3932
3932
  const ue = ws({ message: c, viewerLanguage: b });
3933
3933
  return ue === c.text ? c : { ...c, text: ue };
3934
- }, [c, b]), Me = J.length > 0, Re = J.reduce(
3934
+ }, [c, b]), Me = ee.length > 0, Re = ee.reduce(
3935
3935
  (ue, be) => ue + be.attachments.length,
3936
3936
  0
3937
3937
  ) === ((V == null ? void 0 : V.length) ?? 0), ie = ir({
@@ -3942,30 +3942,30 @@ const Xi = ({
3942
3942
  if (wn(c))
3943
3943
  return null;
3944
3944
  if (c.deleted_at || c.type === "deleted")
3945
- return /* @__PURE__ */ s(ee, { message: c });
3945
+ return /* @__PURE__ */ s(q, { message: c });
3946
3946
  if (Nn(c))
3947
3947
  return /* @__PURE__ */ s(U, {});
3948
3948
  const de = !_ && !!c.reply_count, oe = !_ && c.show_in_channel && c.parent_id, It = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = yn(c);
3949
3949
  let ge;
3950
3950
  It ? ge = () => m(c) : Tt && (ge = () => $(!0));
3951
- const Q = g(), Zs = y(
3951
+ const te = g(), Zs = y(
3952
3952
  "str-chat__message str-chat__message-simple",
3953
3953
  `str-chat__message--${c.type}`,
3954
3954
  `str-chat__message--${c.status}`,
3955
- Q ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3955
+ te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3956
3956
  c.text ? "str-chat__message--has-text" : "has-no-text",
3957
3957
  {
3958
- "str-chat__message--has-attachment": W,
3958
+ "str-chat__message--has-attachment": X,
3959
3959
  "str-chat__message--highlighted": f,
3960
3960
  "str-chat__message--pinned pinned-message": c.pinned,
3961
- "str-chat__message--with-reactions": te,
3961
+ "str-chat__message--with-reactions": se,
3962
3962
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Pt = c == null ? void 0 : c.error) == null ? void 0 : Pt.status) !== 403,
3963
3963
  "str-chat__message-with-thread-link": de || oe,
3964
3964
  "str-chat__virtual-message__wrapper--end": r,
3965
3965
  "str-chat__virtual-message__wrapper--first": i,
3966
3966
  "str-chat__virtual-message__wrapper--group": l
3967
3967
  }
3968
- ), je = c.poll_id && v.polls.fromState(c.poll_id), At = mi(c), pe = Be(c), Js = wt(c), He = !!(V != null && V.length && !c.quoted_message), Lt = pe && Q && He, Qs = Me && Re && !c.quoted_message && !je && !K && !pe, Mt = {
3968
+ ), je = c.poll_id && v.polls.fromState(c.poll_id), At = mi(c), pe = Be(c), Js = wt(c), He = !!(V != null && V.length && !c.quoted_message), Lt = pe && te && He, Qs = Me && Re && !c.quoted_message && !je && !Z && !pe, Mt = {
3969
3969
  contentType: "text",
3970
3970
  amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
3971
3971
  paymentStatus: (zt = c.metadata) == null ? void 0 : zt.payment_status,
@@ -3980,9 +3980,9 @@ const Xi = ({
3980
3980
  paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
3981
3981
  onFetchSource: O ? () => O(c, w) : void 0
3982
3982
  };
3983
- return /* @__PURE__ */ h(Z, { children: [
3983
+ return /* @__PURE__ */ h(J, { children: [
3984
3984
  a && /* @__PURE__ */ s(
3985
- E,
3985
+ I,
3986
3986
  {
3987
3987
  additionalMessageInputProps: t
3988
3988
  }
@@ -3990,7 +3990,7 @@ const Xi = ({
3990
3990
  z && /* @__PURE__ */ s(
3991
3991
  Cn,
3992
3992
  {
3993
- MessageBouncePrompt: Y,
3993
+ MessageBouncePrompt: j,
3994
3994
  onClose: () => $(!1),
3995
3995
  open: z
3996
3996
  }
@@ -4002,8 +4002,8 @@ const Xi = ({
4002
4002
  "data-message-id": c.id,
4003
4003
  "data-dd-privacy": "mask",
4004
4004
  children: [
4005
- H && /* @__PURE__ */ s(H, {}),
4006
- !!A && /* @__PURE__ */ s(N, { reminder: A }),
4005
+ G && /* @__PURE__ */ s(G, {}),
4006
+ !!L && /* @__PURE__ */ s(N, { reminder: L }),
4007
4007
  c.user && /* @__PURE__ */ s(
4008
4008
  _e,
4009
4009
  {
@@ -4034,8 +4034,8 @@ const Xi = ({
4034
4034
  marginInlineStart: 0
4035
4035
  },
4036
4036
  children: At ? /* @__PURE__ */ s(Xe, { message: c, standalone: !0 }) : di(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4037
- Q && L && /* @__PURE__ */ s(L, {}),
4038
- Q ? /* @__PURE__ */ s(
4037
+ te && A && /* @__PURE__ */ s(A, {}),
4038
+ te ? /* @__PURE__ */ s(
4039
4039
  Pe,
4040
4040
  {
4041
4041
  ...Mt,
@@ -4047,19 +4047,19 @@ const Xi = ({
4047
4047
  ...Mt,
4048
4048
  isMine: !1,
4049
4049
  isUnlocking: C(c.id),
4050
- onUnlockClick: () => I == null ? void 0 : I(c, w)
4050
+ onUnlockClick: () => T == null ? void 0 : T(c, w)
4051
4051
  }
4052
4052
  ),
4053
- !Q && L && /* @__PURE__ */ s(L, {})
4053
+ !te && A && /* @__PURE__ */ s(A, {})
4054
4054
  ] }) }) : ui(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
4055
4055
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4056
- Q && L && /* @__PURE__ */ s(L, {}),
4057
- Q ? /* @__PURE__ */ s(
4056
+ te && A && /* @__PURE__ */ s(A, {}),
4057
+ te ? /* @__PURE__ */ s(
4058
4058
  Pe,
4059
4059
  {
4060
4060
  ...Rt,
4061
4061
  isMine: !0,
4062
- onPreviewClick: () => I ? I(c, w) : void 0
4062
+ onPreviewClick: () => T ? T(c, w) : void 0
4063
4063
  }
4064
4064
  ) : /* @__PURE__ */ s(
4065
4065
  Pe,
@@ -4067,11 +4067,11 @@ const Xi = ({
4067
4067
  ...Rt,
4068
4068
  isMine: !1,
4069
4069
  isUnlocking: C(c.id),
4070
- onUnlockClick: () => I ? I(c, w) : void 0,
4071
- onDownloadClick: () => D ? D(c, w) : void 0
4070
+ onUnlockClick: () => T ? T(c, w) : void 0,
4071
+ onDownloadClick: () => R ? R(c, w) : void 0
4072
4072
  }
4073
4073
  ),
4074
- !Q && L && /* @__PURE__ */ s(L, {})
4074
+ !te && A && /* @__PURE__ */ s(A, {})
4075
4075
  ] }),
4076
4076
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
4077
4077
  ze,
@@ -4084,7 +4084,7 @@ const Xi = ({
4084
4084
  Xi,
4085
4085
  {
4086
4086
  groupPosition: ie,
4087
- isMyMessage: Q,
4087
+ isMyMessage: te,
4088
4088
  message: {
4089
4089
  ...re,
4090
4090
  attachments: V,
@@ -4101,19 +4101,19 @@ const Xi = ({
4101
4101
  {
4102
4102
  message: c,
4103
4103
  hasAttachment: He,
4104
- isMyMessage: Q
4104
+ isMyMessage: te
4105
4105
  }
4106
4106
  ),
4107
4107
  je && /* @__PURE__ */ s(kn, { poll: je }),
4108
4108
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ s(
4109
- T,
4109
+ E,
4110
4110
  {
4111
4111
  actionHandler: o,
4112
4112
  attachments: V
4113
4113
  }
4114
4114
  ) : null,
4115
- K ? /* @__PURE__ */ s(
4116
- R,
4115
+ Z ? /* @__PURE__ */ s(
4116
+ M,
4117
4117
  {
4118
4118
  message: re,
4119
4119
  renderText: x
@@ -4135,27 +4135,27 @@ const Xi = ({
4135
4135
  {
4136
4136
  message: c,
4137
4137
  hasAttachment: He,
4138
- isMyMessage: Q
4138
+ isMyMessage: te
4139
4139
  }
4140
4140
  ),
4141
4141
  n && pe && /* @__PURE__ */ s(
4142
4142
  hi,
4143
4143
  {
4144
4144
  selected: S,
4145
- onVoteUp: M,
4145
+ onVoteUp: P,
4146
4146
  onVoteDown: k
4147
4147
  }
4148
4148
  )
4149
4149
  ] }),
4150
4150
  /* @__PURE__ */ s(bi, { onBroadcastClick: p }),
4151
4151
  de && /* @__PURE__ */ s(
4152
- X,
4152
+ K,
4153
4153
  {
4154
4154
  onClick: d,
4155
4155
  reply_count: c.reply_count
4156
4156
  }
4157
4157
  ),
4158
- oe && /* @__PURE__ */ s(ae, {})
4158
+ oe && /* @__PURE__ */ s(Q, {})
4159
4159
  ]
4160
4160
  },
4161
4161
  c.id
@@ -4407,7 +4407,7 @@ const Xi = ({
4407
4407
  ] })
4408
4408
  ]
4409
4409
  }
4410
- ) : /* @__PURE__ */ h(Z, { children: [
4410
+ ) : /* @__PURE__ */ h(J, { children: [
4411
4411
  t == null ? void 0 : t(),
4412
4412
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
4413
4413
  n == null ? void 0 : n()
@@ -4495,7 +4495,7 @@ const Xi = ({
4495
4495
  if (t === -1)
4496
4496
  return e;
4497
4497
  const n = t + Je.length;
4498
- return /* @__PURE__ */ h(Z, { children: [
4498
+ return /* @__PURE__ */ h(J, { children: [
4499
4499
  e.slice(0, t),
4500
4500
  /* @__PURE__ */ s(
4501
4501
  "a",
@@ -4752,15 +4752,22 @@ const wo = ({
4752
4752
  customChannelActions: v,
4753
4753
  renderChannelActions: w,
4754
4754
  renderMessage: C,
4755
- viewerLanguage: I,
4755
+ viewerLanguage: T,
4756
4756
  showChannelInfo: O = !0,
4757
- onParticipantNameClick: D,
4757
+ onParticipantNameClick: R,
4758
4758
  onBroadcastClick: z,
4759
4759
  composerInput: $
4760
4760
  }) => {
4761
- const { channel: A } = he(), S = A.state.messages.some(
4762
- (E) => E.type !== "deleted"
4763
- ), M = p ? /* @__PURE__ */ s(F.Fragment, { children: p() }, "lt-channel-banner") : null, k = /* @__PURE__ */ s(
4761
+ const { channel: L } = he(), S = H(z);
4762
+ Y(() => {
4763
+ S.current = z;
4764
+ }, [z]);
4765
+ const P = W((j) => {
4766
+ var q;
4767
+ (q = S.current) == null || q.call(S, j);
4768
+ }, []), k = z ? P : void 0, E = L.state.messages.some(
4769
+ (j) => j.type !== "deleted"
4770
+ ), I = p ? /* @__PURE__ */ s(F.Fragment, { children: p() }, "lt-channel-banner") : null, A = /* @__PURE__ */ s(
4764
4771
  Aa,
4765
4772
  {
4766
4773
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
@@ -4778,28 +4785,28 @@ const wo = ({
4778
4785
  onReportParticipantClick: f,
4779
4786
  customChannelActions: v,
4780
4787
  renderChannelActions: w,
4781
- onParticipantNameClick: D
4788
+ onParticipantNameClick: R
4782
4789
  }
4783
- ), T = q(
4784
- (E) => {
4785
- const { message: L } = fe("ChannelView"), U = /* @__PURE__ */ s(
4790
+ ), U = W(
4791
+ (j) => {
4792
+ const { message: q } = fe("ChannelView"), Q = /* @__PURE__ */ s(
4786
4793
  Ji,
4787
4794
  {
4788
- ...E,
4795
+ ...j,
4789
4796
  chatbotVotingEnabled: b,
4790
- viewerLanguage: I,
4791
- onBroadcastClick: z
4797
+ viewerLanguage: T,
4798
+ onBroadcastClick: k
4792
4799
  }
4793
4800
  );
4794
- return !C || !L ? U : C(U, L);
4801
+ return !C || !q ? Q : C(Q, q);
4795
4802
  },
4796
- [b, z, C, I]
4803
+ [b, k, C, T]
4797
4804
  );
4798
- return /* @__PURE__ */ s(Z, { children: /* @__PURE__ */ s(
4805
+ return /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(
4799
4806
  On,
4800
4807
  {
4801
4808
  overrides: {
4802
- Message: T,
4809
+ Message: U,
4803
4810
  MessageActions: to,
4804
4811
  UnreadMessagesNotification: () => null,
4805
4812
  UnreadMessagesSeparator: () => null
@@ -4810,16 +4817,16 @@ const wo = ({
4810
4817
  {
4811
4818
  className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
4812
4819
  children: [
4813
- !S && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ h("div", { className: "str-chat__message-list-scroll", children: [
4814
- k,
4815
- M
4820
+ !E && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ h("div", { className: "str-chat__message-list-scroll", children: [
4821
+ A,
4822
+ I
4816
4823
  ] }) }),
4817
4824
  /* @__PURE__ */ s(
4818
4825
  Wt,
4819
4826
  {
4820
- head: S ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4821
- k,
4822
- M
4827
+ head: E ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4828
+ A,
4829
+ I
4823
4830
  ] }) : void 0,
4824
4831
  hideDeletedMessages: !0,
4825
4832
  hideNewMessageSeparator: !1
@@ -4833,34 +4840,34 @@ const wo = ({
4833
4840
  os,
4834
4841
  {
4835
4842
  ...n && {
4836
- renderActions: () => n == null ? void 0 : n(A)
4843
+ renderActions: () => n == null ? void 0 : n(L)
4837
4844
  },
4838
4845
  ...r && {
4839
- renderHeader: () => r(A)
4846
+ renderHeader: () => r(L)
4840
4847
  },
4841
- renderFooter: () => a == null ? void 0 : a(A),
4848
+ renderFooter: () => a == null ? void 0 : a(L),
4842
4849
  disabled: c,
4843
4850
  disabledReason: x,
4844
4851
  composerInput: $
4845
4852
  },
4846
4853
  "lt-channel-message-input"
4847
4854
  )
4848
- ] }) : /* @__PURE__ */ h(Z, { children: [
4855
+ ] }) : /* @__PURE__ */ h(J, { children: [
4849
4856
  /* @__PURE__ */ h(
4850
4857
  "div",
4851
4858
  {
4852
4859
  className: "flex-1 overflow-hidden relative",
4853
4860
  children: [
4854
- !S && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ h("div", { className: "str-chat__message-list-scroll", children: [
4855
- k,
4856
- M
4861
+ !E && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ h("div", { className: "str-chat__message-list-scroll", children: [
4862
+ A,
4863
+ I
4857
4864
  ] }) }),
4858
4865
  /* @__PURE__ */ s(
4859
4866
  Wt,
4860
4867
  {
4861
- head: S ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4862
- k,
4863
- M
4868
+ head: E ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4869
+ A,
4870
+ I
4864
4871
  ] }) : void 0,
4865
4872
  hideDeletedMessages: !0,
4866
4873
  hideNewMessageSeparator: !1
@@ -4870,14 +4877,14 @@ const wo = ({
4870
4877
  },
4871
4878
  "lt-channel-message-list"
4872
4879
  ),
4873
- r ? /* @__PURE__ */ s(F.Fragment, { children: r(A) }, "lt-channel-conversation-footer") : null,
4880
+ r ? /* @__PURE__ */ s(F.Fragment, { children: r(L) }, "lt-channel-conversation-footer") : null,
4874
4881
  /* @__PURE__ */ s(
4875
4882
  os,
4876
4883
  {
4877
4884
  ...n && {
4878
- renderActions: () => n == null ? void 0 : n(A)
4885
+ renderActions: () => n == null ? void 0 : n(L)
4879
4886
  },
4880
- renderFooter: () => a == null ? void 0 : a(A),
4887
+ renderFooter: () => a == null ? void 0 : a(L),
4881
4888
  disabled: c,
4882
4889
  disabledReason: x,
4883
4890
  composerInput: $
@@ -4910,56 +4917,56 @@ const wo = ({
4910
4917
  dmAgentEnabled: v,
4911
4918
  messageMetadata: w,
4912
4919
  onMessageSent: C,
4913
- showStarButton: I = !1,
4920
+ showStarButton: T = !1,
4914
4921
  chatbotVotingEnabled: O = !1,
4915
- renderChannelBanner: D,
4922
+ renderChannelBanner: R,
4916
4923
  customChannelActions: z,
4917
4924
  renderChannelActions: $,
4918
- renderMessage: A,
4925
+ renderMessage: L,
4919
4926
  onMessageLinkClick: S,
4920
- sendButton: M,
4927
+ sendButton: P,
4921
4928
  attachmentPreviewList: k,
4922
- viewerLanguage: T,
4923
- showChannelInfo: E = !0,
4924
- onParticipantNameClick: L,
4929
+ viewerLanguage: E,
4930
+ showChannelInfo: I = !0,
4931
+ onParticipantNameClick: A,
4925
4932
  onBroadcastClick: U,
4926
- composerInput: Y
4933
+ composerInput: j
4927
4934
  }) => {
4928
- const ee = q(
4929
- async (X, N, R) => {
4930
- var J;
4931
- const H = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, W = v && !H, te = {
4935
+ const q = W(
4936
+ async (K, N, M) => {
4937
+ var ee;
4938
+ const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, X = v && !G, se = {
4932
4939
  ...N,
4933
- ...W && { silent: !0 },
4940
+ ...X && { silent: !0 },
4934
4941
  ...w && {
4935
4942
  metadata: {
4936
4943
  ...N.metadata ?? {},
4937
4944
  ...w
4938
4945
  }
4939
4946
  }
4940
- }, K = {
4941
- ...R,
4942
- ...W && { skip_push: !0 }
4943
- }, V = await e.sendMessage(te, K);
4947
+ }, Z = {
4948
+ ...M,
4949
+ ...X && { skip_push: !0 }
4950
+ }, V = await e.sendMessage(se, Z);
4944
4951
  return C == null || C(V), V;
4945
4952
  },
4946
4953
  [e, v, w, C]
4947
- ), ae = j(null);
4948
- return G(() => {
4954
+ ), Q = H(null);
4955
+ return Y(() => {
4949
4956
  if (!S) return;
4950
- const X = ae.current;
4951
- if (!X) return;
4952
- const N = (R) => {
4953
- const H = R.target, W = H == null ? void 0 : H.closest("a[href]"), te = W == null ? void 0 : W.getAttribute("href");
4954
- if (!te) return;
4955
- const K = W == null ? void 0 : W.closest("[data-message-id]"), V = K == null ? void 0 : K.getAttribute("data-message-id"), J = V ? e.state.messages.find((re) => re.id === V) : void 0;
4956
- S(te, J);
4957
+ const K = Q.current;
4958
+ if (!K) return;
4959
+ const N = (M) => {
4960
+ const G = M.target, X = G == null ? void 0 : G.closest("a[href]"), se = X == null ? void 0 : X.getAttribute("href");
4961
+ if (!se) return;
4962
+ const Z = X == null ? void 0 : X.closest("[data-message-id]"), V = Z == null ? void 0 : Z.getAttribute("data-message-id"), ee = V ? e.state.messages.find((re) => re.id === V) : void 0;
4963
+ S(se, ee);
4957
4964
  };
4958
- return X.addEventListener("click", N), () => X.removeEventListener("click", N);
4965
+ return K.addEventListener("click", N), () => K.removeEventListener("click", N);
4959
4966
  }, [S, e]), /* @__PURE__ */ s(
4960
4967
  "div",
4961
4968
  {
4962
- ref: ae,
4969
+ ref: Q,
4963
4970
  className: y(
4964
4971
  "messaging-channel-view h-full flex flex-col",
4965
4972
  d
@@ -4973,8 +4980,8 @@ const wo = ({
4973
4980
  LoadingIndicator: Ve,
4974
4981
  DateSeparator: La,
4975
4982
  TypingIndicator: bo,
4976
- doSendMessageRequest: ee,
4977
- ...M ? { SendButton: M } : {},
4983
+ doSendMessageRequest: q,
4984
+ ...P ? { SendButton: P } : {},
4978
4985
  ...k ? { AttachmentPreviewList: k } : {},
4979
4986
  children: /* @__PURE__ */ s(
4980
4987
  wo,
@@ -4995,17 +5002,17 @@ const wo = ({
4995
5002
  showReportParticipant: _,
4996
5003
  composerDisabled: b,
4997
5004
  composerDisabledReason: p,
4998
- showStarButton: I,
5005
+ showStarButton: T,
4999
5006
  chatbotVotingEnabled: O,
5000
- renderChannelBanner: D,
5007
+ renderChannelBanner: R,
5001
5008
  customChannelActions: z,
5002
5009
  renderChannelActions: $,
5003
- renderMessage: A,
5004
- viewerLanguage: T,
5005
- showChannelInfo: E,
5006
- onParticipantNameClick: L,
5010
+ renderMessage: L,
5011
+ viewerLanguage: E,
5012
+ showChannelInfo: I,
5013
+ onParticipantNameClick: A,
5007
5014
  onBroadcastClick: U,
5008
- composerInput: Y
5015
+ composerInput: j
5009
5016
  }
5010
5017
  )
5011
5018
  }
@@ -5052,33 +5059,33 @@ const qo = ({
5052
5059
  onBroadcastClick: v,
5053
5060
  renderMessage: w,
5054
5061
  onMessageLinkClick: C,
5055
- showChannelInfo: I,
5062
+ showChannelInfo: T,
5056
5063
  composerInput: O
5057
5064
  }) => {
5058
5065
  const {
5059
- client: D,
5066
+ client: R,
5060
5067
  isConnected: z,
5061
5068
  isLoading: $,
5062
- error: A,
5069
+ error: L,
5063
5070
  refreshConnection: S,
5064
- service: M,
5071
+ service: P,
5065
5072
  debug: k
5066
- } = xa(), [T, E] = B(null), [L, U] = B(null), [Y, ee] = B(!1), { showDeleteConversation: ae = !0 } = e, X = j(l);
5067
- X.current = l;
5068
- const N = j(a);
5073
+ } = xa(), [E, I] = B(null), [A, U] = B(null), [j, q] = B(!1), { showDeleteConversation: Q = !0 } = e, K = H(l);
5074
+ K.current = l;
5075
+ const N = H(a);
5069
5076
  N.current = a;
5070
- const R = j(null), H = j(null);
5071
- G(() => {
5072
- H.current = T;
5073
- }, [T]), G(() => {
5074
- if (!D || !z) return;
5075
- const K = D.userID;
5076
- if (!K) return;
5077
- const V = `${K}::${i}`;
5078
- if (R.current === V) return;
5079
- R.current = V;
5080
- const J = () => {
5081
- R.current === V && (R.current = null);
5077
+ const M = H(null), G = H(null);
5078
+ Y(() => {
5079
+ G.current = E;
5080
+ }, [E]), Y(() => {
5081
+ if (!R || !z) return;
5082
+ const Z = R.userID;
5083
+ if (!Z) return;
5084
+ const V = `${Z}::${i}`;
5085
+ if (M.current === V) return;
5086
+ M.current = V;
5087
+ const ee = () => {
5088
+ M.current === V && (M.current = null);
5082
5089
  };
5083
5090
  (async () => {
5084
5091
  var Me, Re;
@@ -5087,36 +5094,36 @@ const qo = ({
5087
5094
  "[MessagingShell] Loading initial conversation with:",
5088
5095
  i
5089
5096
  );
5090
- const ie = await D.queryChannels(
5097
+ const ie = await R.queryChannels(
5091
5098
  {
5092
5099
  type: "messaging",
5093
- members: { $eq: [K, i] }
5100
+ members: { $eq: [Z, i] }
5094
5101
  },
5095
5102
  {},
5096
5103
  { limit: 1 }
5097
5104
  );
5098
5105
  if (ie.length > 0) {
5099
- E(ie[0]), U(null), (Me = N.current) == null || Me.call(N, ie[0]), k && console.log(
5106
+ I(ie[0]), U(null), (Me = N.current) == null || Me.call(N, ie[0]), k && console.log(
5100
5107
  "[MessagingShell] Initial conversation loaded:",
5101
5108
  ie[0].id
5102
5109
  );
5103
5110
  return;
5104
5111
  }
5105
- const de = X.current;
5106
- if (!de || !M) {
5107
- J(), U("No conversation found with this account"), k && console.log(
5112
+ const de = K.current;
5113
+ if (!de || !P) {
5114
+ ee(), U("No conversation found with this account"), k && console.log(
5108
5115
  "[MessagingShell] No conversation found for:",
5109
5116
  i
5110
5117
  );
5111
5118
  return;
5112
5119
  }
5113
5120
  try {
5114
- const oe = await M.startChannelWithParticipant({
5121
+ const oe = await P.startChannelWithParticipant({
5115
5122
  id: de.id,
5116
5123
  name: de.name,
5117
5124
  phone: de.phone
5118
5125
  });
5119
- E(oe), U(null), (Re = N.current) == null || Re.call(N, oe), k && console.log(
5126
+ I(oe), U(null), (Re = N.current) == null || Re.call(N, oe), k && console.log(
5120
5127
  "[MessagingShell] Channel created and loaded:",
5121
5128
  oe.id
5122
5129
  );
@@ -5124,39 +5131,39 @@ const qo = ({
5124
5131
  console.error(
5125
5132
  "[MessagingShell] Failed to create conversation:",
5126
5133
  oe
5127
- ), J(), U("Failed to create conversation");
5134
+ ), ee(), U("Failed to create conversation");
5128
5135
  }
5129
5136
  } catch (ie) {
5130
5137
  console.error(
5131
5138
  "[MessagingShell] Failed to load initial conversation:",
5132
5139
  ie
5133
- ), J(), H.current || U("Failed to load conversation");
5140
+ ), ee(), G.current || U("Failed to load conversation");
5134
5141
  }
5135
5142
  })();
5136
- }, [i, D, z, M, k]);
5137
- const W = j(r);
5138
- W.current = r;
5139
- const te = q(() => {
5140
- var K;
5141
- E(null), ee(!0), (K = W.current) == null || K.call(W);
5143
+ }, [i, R, z, P, k]);
5144
+ const X = H(r);
5145
+ X.current = r;
5146
+ const se = W(() => {
5147
+ var Z;
5148
+ I(null), q(!0), (Z = X.current) == null || Z.call(X);
5142
5149
  }, []);
5143
- return $ ? /* @__PURE__ */ s(Ve, {}) : A ? /* @__PURE__ */ s(ye, { message: A, onBack: S }) : !z || !D ? /* @__PURE__ */ s(
5150
+ return $ ? /* @__PURE__ */ s(Ve, {}) : L ? /* @__PURE__ */ s(ye, { message: L, onBack: S }) : !z || !R ? /* @__PURE__ */ s(
5144
5151
  ye,
5145
5152
  {
5146
5153
  message: "Not connected to messaging service",
5147
5154
  onBack: S
5148
5155
  }
5149
- ) : L ? /* @__PURE__ */ s(ye, { message: L }) : Y && !T ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : T ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
5156
+ ) : A ? /* @__PURE__ */ s(ye, { message: A }) : j && !E ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : E ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
5150
5157
  Ws,
5151
5158
  {
5152
- channel: T,
5159
+ channel: E,
5153
5160
  renderMessageInputActions: t,
5154
5161
  renderConversationFooter: n,
5155
5162
  renderChannelBanner: x,
5156
- onLeaveConversation: te,
5157
- onBlockParticipant: te,
5163
+ onLeaveConversation: se,
5164
+ onBlockParticipant: se,
5158
5165
  CustomChannelEmptyState: o,
5159
- showDeleteConversation: ae,
5166
+ showDeleteConversation: Q,
5160
5167
  onBlockParticipantClick: d,
5161
5168
  onReportParticipantClick: m,
5162
5169
  dmAgentEnabled: f,
@@ -5169,10 +5176,10 @@ const qo = ({
5169
5176
  onBroadcastClick: v,
5170
5177
  renderMessage: w,
5171
5178
  onMessageLinkClick: C,
5172
- showChannelInfo: I,
5179
+ showChannelInfo: T,
5173
5180
  composerInput: O
5174
5181
  },
5175
- T.id
5182
+ E.id
5176
5183
  ) }) }) : /* @__PURE__ */ s(Ve, {});
5177
5184
  };
5178
5185
  function No(e) {
@@ -5212,7 +5219,7 @@ const qs = F.createContext({
5212
5219
  });
5213
5220
  }, Xs = F.memo(
5214
5221
  (e) => {
5215
- var z, $, A;
5222
+ var z, $, L;
5216
5223
  const { channel: t, unread: n } = e, {
5217
5224
  selectedChannel: a,
5218
5225
  onChannelSelect: r,
@@ -5235,44 +5242,44 @@ const qs = F.createContext({
5235
5242
  const g = () => {
5236
5243
  t && r(t);
5237
5244
  }, c = (S) => {
5238
- const M = S.key === "Enter" || S.key === " ", k = S.repeat;
5239
- !M || k || (S.preventDefault(), g());
5245
+ const P = S.key === "Enter" || S.key === " ", k = S.repeat;
5246
+ !P || k || (S.preventDefault(), g());
5240
5247
  }, x = vs(
5241
5248
  (z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
5242
5249
  m == null ? void 0 : m.userID,
5243
5250
  t == null ? void 0 : t.type
5244
5251
  ), _ = xs(x == null ? void 0 : x.user), b = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, p = (() => {
5245
- var M;
5246
- const S = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
5252
+ var P;
5253
+ const S = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages;
5247
5254
  if (S != null && S.length) {
5248
5255
  for (let k = S.length - 1; k >= 0; k--)
5249
5256
  if (S[k].type !== "system") return S[k];
5250
5257
  }
5251
5258
  })(), w = (() => {
5252
- var E;
5259
+ var I;
5253
5260
  const S = ws({
5254
5261
  message: p,
5255
5262
  viewerLanguage: d
5256
- }), { custom_type: M, attachment_content_type: k } = (p == null ? void 0 : p.metadata) || {};
5257
- if (M === le.TIP)
5263
+ }), { custom_type: P, attachment_content_type: k } = (p == null ? void 0 : p.metadata) || {};
5264
+ if (P === le.TIP)
5258
5265
  return S || "Sent a tip";
5259
- if (M === le.PAID)
5266
+ if (P === le.PAID)
5260
5267
  return S || "Sent a message";
5261
- if (M === le.ATTACHMENT) {
5268
+ if (P === le.ATTACHMENT) {
5262
5269
  if (k === "text")
5263
5270
  return "🔒 Sent a locked message";
5264
5271
  if (k === "media")
5265
5272
  return "🔒 Sent a locked attachment";
5266
5273
  }
5267
5274
  if (S) return S;
5268
- const T = (E = p == null ? void 0 : p.attachments) == null ? void 0 : E[0];
5269
- return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5270
- })(), C = p != null && p.created_at ? So(new Date(p.created_at)) : "", I = p ? Be(p) : !1, O = o ? o(p, w) : `${I ? "✨ " : ""}${w}`, D = n ?? 0;
5275
+ const E = (I = p == null ? void 0 : p.attachments) == null ? void 0 : I[0];
5276
+ return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5277
+ })(), C = p != null && p.created_at ? So(new Date(p.created_at)) : "", T = p ? Be(p) : !1, O = o ? o(p, w) : `${T ? "✨ " : ""}${w}`, R = n ?? 0;
5271
5278
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5272
5279
  channelId: t == null ? void 0 : t.id,
5273
5280
  isSelected: f,
5274
5281
  participantName: _,
5275
- unreadCount: D,
5282
+ unreadCount: R,
5276
5283
  hasTimestamp: !!C
5277
5284
  }), /* @__PURE__ */ s(
5278
5285
  "div",
@@ -5293,7 +5300,7 @@ const qs = F.createContext({
5293
5300
  /* @__PURE__ */ s(
5294
5301
  _e,
5295
5302
  {
5296
- id: ((A = x == null ? void 0 : x.user) == null ? void 0 : A.id) || t.id || "unknown",
5303
+ id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || t.id || "unknown",
5297
5304
  name: _,
5298
5305
  image: b,
5299
5306
  size: 48,
@@ -5318,7 +5325,7 @@ const qs = F.createContext({
5318
5325
  ] }),
5319
5326
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5320
5327
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: O }),
5321
- D > 0 && /* @__PURE__ */ s("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: D > 99 ? "99+" : D })
5328
+ R > 0 && /* @__PURE__ */ s("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: R > 99 ? "99+" : R })
5322
5329
  ] })
5323
5330
  ] })
5324
5331
  ] })
@@ -5352,8 +5359,8 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5352
5359
  v.current++;
5353
5360
  const { debug: w = !1 } = dt(), C = F.useCallback(
5354
5361
  (O) => {
5355
- for (const D of O)
5356
- No(D);
5362
+ for (const R of O)
5363
+ No(R);
5357
5364
  return r ? r(O) : O;
5358
5365
  },
5359
5366
  [r]
@@ -5363,7 +5370,7 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5363
5370
  selectedChannelId: t == null ? void 0 : t.id,
5364
5371
  filters: n
5365
5372
  });
5366
- const I = F.useMemo(
5373
+ const T = F.useMemo(
5367
5374
  () => ({
5368
5375
  selectedChannel: t,
5369
5376
  onChannelSelect: e,
@@ -5388,7 +5395,7 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5388
5395
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5389
5396
  l
5390
5397
  ),
5391
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(yo, { value: I, children: /* @__PURE__ */ s(
5398
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(yo, { value: T, children: /* @__PURE__ */ s(
5392
5399
  Bn,
5393
5400
  {
5394
5401
  filters: n,
@@ -5586,4 +5593,4 @@ export {
5586
5593
  vs as y,
5587
5594
  ht as z
5588
5595
  };
5589
- //# sourceMappingURL=index-DIKyFjPC.js.map
5596
+ //# sourceMappingURL=index-Daw6ObfN.js.map