@linktr.ee/messaging-react 3.4.0 → 3.4.1

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 (29) hide show
  1. package/dist/{Card-Cbw4GBkm.js → Card-BKd0E-B9.js} +3 -3
  2. package/dist/{Card-Cbw4GBkm.js.map → Card-BKd0E-B9.js.map} +1 -1
  3. package/dist/{Card-6snF25TP.cjs → Card-CdaZxDEx.cjs} +2 -2
  4. package/dist/{Card-6snF25TP.cjs.map → Card-CdaZxDEx.cjs.map} +1 -1
  5. package/dist/{Card-D3-jTRWp.js → Card-CrTBu2I6.js} +2 -2
  6. package/dist/{Card-D3-jTRWp.js.map → Card-CrTBu2I6.js.map} +1 -1
  7. package/dist/{Card-DdK8Vv7y.cjs → Card-DXWp0uwi.cjs} +2 -2
  8. package/dist/{Card-DdK8Vv7y.cjs.map → Card-DXWp0uwi.cjs.map} +1 -1
  9. package/dist/{Card-BTbz8XCg.cjs → Card-DaalkoQW.cjs} +2 -2
  10. package/dist/{Card-BTbz8XCg.cjs.map → Card-DaalkoQW.cjs.map} +1 -1
  11. package/dist/{Card-CBi3z_Wt.js → Card-XVTz8IYz.js} +2 -2
  12. package/dist/{Card-CBi3z_Wt.js.map → Card-XVTz8IYz.js.map} +1 -1
  13. package/dist/{LockedThumbnail-Cih__olI.cjs → LockedThumbnail-D3Xwdb5_.cjs} +2 -2
  14. package/dist/{LockedThumbnail-Cih__olI.cjs.map → LockedThumbnail-D3Xwdb5_.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-qPBaTZon.js → LockedThumbnail-D_44b-Uy.js} +2 -2
  16. package/dist/{LockedThumbnail-qPBaTZon.js.map → LockedThumbnail-D_44b-Uy.js.map} +1 -1
  17. package/dist/index-Cds2w5zi.cjs +2 -0
  18. package/dist/index-Cds2w5zi.cjs.map +1 -0
  19. package/dist/{index-BOsrtjME.js → index-DPGZRLRM.js} +509 -507
  20. package/dist/index-DPGZRLRM.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +1 -1
  25. package/src/components/MessagingShell/index.tsx +2 -0
  26. package/src/types.ts +1 -0
  27. package/dist/index-BOsrtjME.js.map +0 -1
  28. package/dist/index-DQk6hOJg.cjs +0 -2
  29. package/dist/index-DQk6hOJg.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
- import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import U, { createContext as Ye, useContext as Ae, useCallback as K, useState as z, useRef as H, useEffect as X, useId as Sn, useMemo as ne, Suspense as qe } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
2
+ import j, { createContext as Ye, useContext as Ae, useCallback as K, useState as $, useRef as G, useEffect as X, useId as Sn, useMemo as se, Suspense as qe } from "react";
3
3
  import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Tn, LinkPreviewsManager as At } from "stream-chat";
5
- import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as De, AIStates as Oe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
5
+ import { Chat as An, DateSeparator as Mn, useChannelStateContext as ce, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as De, AIStates as Oe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
6
  import { StarIcon as Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs, ArrowLeftIcon as Lt, CaretRightIcon as Ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
- import y from "classnames";
7
+ import N from "classnames";
8
8
  import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
9
9
  const qt = Ye({
10
10
  service: null,
@@ -24,10 +24,10 @@ const qt = Ye({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var D, I;
27
+ var D, C;
28
28
  const o = K(
29
- (T, ...S) => {
30
- i && console.log(`🔥 [MessagingProvider] ${T}`, ...S);
29
+ (I, ...T) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${I}`, ...T);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,61 +37,61 @@ const qt = Ye({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [_, v] = z(null), p = H(!1), x = H(null), A = H(s);
40
+ const [l, d] = $(null), [m, g] = $(null), [u, f] = $(!1), [c, b] = $(!1), [_, v] = $(null), p = G(!1), x = G(null), A = G(s);
41
41
  A.current = s;
42
- const M = H(i);
42
+ const M = G(i);
43
43
  M.current = i;
44
- const N = H({
44
+ const y = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), L = H(0);
50
- L.current++, o("📊 RENDER INFO", {
51
- renderCount: L.current,
49
+ }), R = G(0);
50
+ R.current++, o("📊 RENDER INFO", {
51
+ renderCount: R.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: N.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: N.current.apiKey !== a,
56
- serviceConfigChanged: N.current.serviceConfig !== s,
57
- capabilitiesChanged: N.current.capabilities !== r
54
+ userChanged: y.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: y.current.apiKey !== a,
56
+ serviceConfigChanged: y.current.serviceConfig !== s,
57
+ capabilitiesChanged: y.current.capabilities !== r
58
58
  }
59
- }), N.current = {
59
+ }), y.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const $ = H(null);
66
- a && ((D = $.current) == null ? void 0 : D.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
67
- const O = a ? ((I = $.current) == null ? void 0 : I.client) ?? null : null;
65
+ const z = G(null);
66
+ a && ((D = z.current) == null ? void 0 : D.apiKey) !== a && (z.current = { apiKey: a, client: new Tn(a) });
67
+ const P = a ? ((C = z.current) == null ? void 0 : C.client) ?? null : null;
68
68
  X(() => {
69
- const T = L.current, S = A.current;
70
- if (!a || !O || !S) {
69
+ const I = R.current, T = A.current;
70
+ if (!a || !P || !T) {
71
71
  o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: T,
72
+ renderCount: I,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  o("🚀 CREATING SERVICE", {
78
- renderCount: T,
78
+ renderCount: I,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const P = new In({
82
- ...S,
81
+ const O = new In({
82
+ ...T,
83
83
  apiKey: a,
84
84
  debug: M.current,
85
- client: O
85
+ client: P
86
86
  });
87
- x.current = P, d(P), o("✅ SERVICE SET", {
88
- renderCount: T,
89
- serviceInstance: !!P
87
+ x.current = O, d(O), o("✅ SERVICE SET", {
88
+ renderCount: I,
89
+ serviceInstance: !!O
90
90
  });
91
- }, [a, O]);
92
- const E = H(null);
91
+ }, [a, P]);
92
+ const S = G(null);
93
93
  X(() => {
94
- var S, P;
94
+ var T, O;
95
95
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!l,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const qt = Ye({
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((S = E.current) == null ? void 0 : S.serviceId) === l && ((P = E.current) == null ? void 0 : P.userId) === t.id) {
110
+ if (((T = S.current) == null ? void 0 : T.serviceId) === l && ((O = S.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"
@@ -119,7 +119,7 @@ const qt = Ye({
119
119
  try {
120
120
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
121
  const F = await l.connectUser(t);
122
- g(F), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
122
+ g(F), f(!0), S.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
124
  clientId: F.userID
125
125
  });
@@ -137,13 +137,13 @@ const qt = Ye({
137
137
  }
138
138
  })();
139
139
  }, [l, t, o, u]), X(() => {
140
- const T = O;
140
+ const I = P;
141
141
  return () => {
142
- var S;
143
- T && (E.current = null, (S = x.current) == null || S.disconnectUser().catch(console.error));
142
+ var T;
143
+ I && (S.current = null, (T = x.current) == null || T.disconnectUser().catch(console.error));
144
144
  };
145
- }, [O]);
146
- const k = K(async () => {
145
+ }, [P]);
146
+ const E = K(async () => {
147
147
  if (o("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!l,
149
149
  hasUser: !!t
@@ -154,18 +154,18 @@ const qt = Ye({
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 T = await l.connectUser(t);
158
- g(T), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (T) {
160
- const S = T instanceof Error ? T.message : "Refresh failed";
161
- v(S), o("❌ CONNECTION REFRESH ERROR", {
157
+ const I = await l.connectUser(t);
158
+ g(I), f(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (I) {
160
+ const T = I instanceof Error ? I.message : "Refresh failed";
161
+ v(T), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: S
163
+ error: T
164
164
  });
165
165
  } finally {
166
166
  b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), R = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [l, t, o]), L = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!l,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
@@ -179,7 +179,7 @@ const qt = Ye({
179
179
  isLoading: c,
180
180
  error: _,
181
181
  capabilities: r,
182
- refreshConnection: k,
182
+ refreshConnection: E,
183
183
  debug: i
184
184
  }), [
185
185
  l,
@@ -188,18 +188,18 @@ const qt = Ye({
188
188
  c,
189
189
  _,
190
190
  r,
191
- k,
191
+ E,
192
192
  i,
193
193
  o
194
194
  ]);
195
195
  return o("🔄 RENDER END", {
196
- renderCount: L.current,
197
- willRenderChat: !!O,
198
- contextValueReady: !!R
199
- }), /* @__PURE__ */ n(qt.Provider, { value: R, children: O ? /* @__PURE__ */ n(
196
+ renderCount: R.current,
197
+ willRenderChat: !!P,
198
+ contextValueReady: !!L
199
+ }), /* @__PURE__ */ n(qt.Provider, { value: L, children: P ? /* @__PURE__ */ n(
200
200
  An,
201
201
  {
202
- client: O,
202
+ client: P,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
@@ -208,7 +208,7 @@ const qt = Ye({
208
208
  ) : e });
209
209
  }, Ps = () => Xe(), Wt = (e) => {
210
210
  var a, r;
211
- const [t, s] = z(
211
+ const [t, s] = $(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
214
  return X(() => {
@@ -279,7 +279,7 @@ function Bs(e) {
279
279
  const s = Fs(e) % Ot.length;
280
280
  return Ot[s];
281
281
  }
282
- const oe = ({
282
+ const ie = ({
283
283
  id: e,
284
284
  image: t,
285
285
  size: s = 40,
@@ -299,7 +299,7 @@ const oe = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: y(
302
+ className: N(
303
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
304
304
  m
305
305
  ),
@@ -309,7 +309,7 @@ const oe = ({
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: y(
312
+ className: N(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -331,7 +331,7 @@ const oe = ({
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: y(
334
+ className: N(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
@@ -364,72 +364,72 @@ const oe = ({
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
366
  var D;
367
- const { service: u, debug: f } = Xe(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [_, v] = z(!1), [p, x] = z(null), [A, M] = z(!1), [N, L] = z(!1), $ = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
367
+ const { service: u, debug: f } = Xe(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, b = !!(a && s && u && c), [_, v] = $(!1), [p, x] = $(null), [A, M] = $(!1), [y, R] = $(!1), z = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
368
368
  return X(() => {
369
369
  if (!b || !u || !c) {
370
370
  v(!1), x(null);
371
371
  return;
372
372
  }
373
- let I = !1;
373
+ let C = !1;
374
374
  return (async () => {
375
375
  try {
376
- const T = await u.getBlockedUsers();
377
- if (I) return;
376
+ const I = await u.getBlockedUsers();
377
+ if (C) return;
378
378
  v(
379
- T.some(
380
- (S) => S.blocked_user_id === c
379
+ I.some(
380
+ (T) => T.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (T) {
384
- I || console.error(`[${g}] Failed to check blocked status:`, T);
383
+ } catch (I) {
384
+ C || console.error(`[${g}] Failed to check blocked status:`, I);
385
385
  } finally {
386
- I || x({ participantId: c, service: u });
386
+ C || x({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- I = !0;
389
+ C = !0;
390
390
  };
391
391
  }, [b, u, c, g]), {
392
392
  isParticipantBlocked: _,
393
- isCheckingBlockedStatus: $,
393
+ isCheckingBlockedStatus: z,
394
394
  isLeaving: A,
395
- isUpdatingBlockStatus: N,
395
+ isUpdatingBlockStatus: y,
396
396
  handleLeaveConversation: async () => {
397
- var I;
397
+ var C;
398
398
  if (!A) {
399
399
  o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
400
400
  try {
401
- const T = ((I = e._client) == null ? void 0 : I.userID) ?? null;
402
- await e.hide(T, !1), r && await r(e), m == null || m();
403
- } catch (T) {
404
- console.error(`[${g}] Failed to leave conversation`, T);
401
+ const I = ((C = e._client) == null ? void 0 : C.userID) ?? null;
402
+ await e.hide(I, !1), r && await r(e), m == null || m();
403
+ } catch (I) {
404
+ console.error(`[${g}] Failed to leave conversation`, I);
405
405
  } finally {
406
406
  M(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var I, T, S;
412
- if (!(N || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), L(!0);
411
+ var C, I, T;
412
+ if (!(y || !u)) {
413
+ l == null || l(), f && console.log(`[${g}] Block member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), R(!0);
414
414
  try {
415
- await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
416
- } catch (P) {
417
- console.error(`[${g}] Failed to block member`, P);
415
+ await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
416
+ } catch (O) {
417
+ console.error(`[${g}] Failed to block member`, O);
418
418
  } finally {
419
- L(!1);
419
+ R(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var I, T, S;
425
- if (!(N || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (I = t == null ? void 0 : t.user) == null ? void 0 : I.id), L(!0);
424
+ var C, I, T;
425
+ if (!(y || !u)) {
426
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), R(!0);
427
427
  try {
428
- await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
429
- } catch (P) {
430
- console.error(`[${g}] Failed to unblock member`, P);
428
+ await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), m == null || m();
429
+ } catch (O) {
430
+ console.error(`[${g}] Failed to unblock member`, O);
431
431
  } finally {
432
- L(!1);
432
+ R(!1);
433
433
  }
434
434
  }
435
435
  },
@@ -446,7 +446,7 @@ const oe = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: y(
449
+ className: N(
450
450
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
451
451
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
452
452
  t
@@ -468,15 +468,15 @@ const oe = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = z(!1), b = H(null), _ = Sn(), v = K(() => c(!1), []), {
471
+ const [f, c] = $(!1), b = G(null), _ = Sn(), v = K(() => c(!1), []), {
472
472
  isParticipantBlocked: p,
473
473
  isCheckingBlockedStatus: x,
474
474
  isLeaving: A,
475
475
  isUpdatingBlockStatus: M,
476
- handleLeaveConversation: N,
477
- handleBlockUser: L,
478
- handleUnblockUser: $,
479
- handleReportUser: O
476
+ handleLeaveConversation: y,
477
+ handleBlockUser: R,
478
+ handleUnblockUser: z,
479
+ handleReportUser: P
480
480
  } = js({
481
481
  channel: e,
482
482
  participant: t,
@@ -492,13 +492,13 @@ const oe = ({
492
492
  });
493
493
  return X(() => {
494
494
  if (!f) return;
495
- const k = (D) => {
495
+ const E = (D) => {
496
496
  b.current && !b.current.contains(D.target) && c(!1);
497
- }, R = (D) => {
497
+ }, L = (D) => {
498
498
  D.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", k), document.addEventListener("keydown", R), () => {
501
- document.removeEventListener("mousedown", k), document.removeEventListener("keydown", R);
500
+ return document.addEventListener("mousedown", E), document.addEventListener("keydown", L), () => {
501
+ document.removeEventListener("mousedown", E), document.removeEventListener("keydown", L);
502
502
  };
503
503
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
@@ -509,7 +509,7 @@ const oe = ({
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
511
  "aria-controls": f ? _ : void 0,
512
- onClick: () => c((k) => !k),
512
+ onClick: () => c((E) => !E),
513
513
  children: [
514
514
  /* @__PURE__ */ n(hs, { className: "size-5 text-black/90" }),
515
515
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
@@ -521,7 +521,7 @@ const oe = ({
521
521
  {
522
522
  id: _,
523
523
  "aria-label": "Conversation options",
524
- className: y(
524
+ className: N(
525
525
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
526
526
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
527
527
  ),
@@ -529,7 +529,7 @@ const oe = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  ge,
531
531
  {
532
- onClick: N,
532
+ onClick: y,
533
533
  disabled: A,
534
534
  "aria-busy": A,
535
535
  children: [
@@ -548,7 +548,7 @@ const oe = ({
548
548
  ) : p ? /* @__PURE__ */ h(
549
549
  ge,
550
550
  {
551
- onClick: $,
551
+ onClick: z,
552
552
  disabled: M,
553
553
  "aria-busy": M,
554
554
  children: [
@@ -559,7 +559,7 @@ const oe = ({
559
559
  ) : /* @__PURE__ */ h(
560
560
  ge,
561
561
  {
562
- onClick: L,
562
+ onClick: R,
563
563
  disabled: M,
564
564
  "aria-busy": M,
565
565
  children: [
@@ -568,7 +568,7 @@ const oe = ({
568
568
  ]
569
569
  }
570
570
  ) }),
571
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: O, children: [
571
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: P, children: [
572
572
  /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
573
573
  /* @__PURE__ */ n("span", { children: "Report" })
574
574
  ] }) }),
@@ -582,7 +582,7 @@ function Gs(e) {
582
582
  return e != null && e.length ? e.some((t) => t.type === He) ? "down" : e.some((t) => t.type === Ge) ? "up" : null : null;
583
583
  }
584
584
  function Hs(e) {
585
- const { channel: t } = de(), { client: s } = We("useMessageVote"), a = ne(
585
+ const { channel: t } = ce(), { client: s } = We("useMessageVote"), a = se(
586
586
  () => Gs(e.own_reactions),
587
587
  [e.own_reactions]
588
588
  ), r = K(async () => {
@@ -619,7 +619,7 @@ function Kt({
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-CBi3z_Wt.js")), Ws = U.lazy(() => import("./Card-D3-jTRWp.js")), Xs = U.lazy(() => import("./Card-Cbw4GBkm.js")), Ke = () => /* @__PURE__ */ n(
622
+ const qs = j.lazy(() => import("./Card-XVTz8IYz.js")), Ws = j.lazy(() => import("./Card-CrTBu2I6.js")), Xs = j.lazy(() => import("./Card-BKd0E-B9.js")), Ke = () => /* @__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)]",
@@ -635,7 +635,7 @@ const qs = U.lazy(() => import("./Card-CBi3z_Wt.js")), Ws = U.lazy(() => import(
635
635
  [/plain|rtf/, "text"],
636
636
  [/markdown/, "markdown"]
637
637
  ];
638
- function ae(e) {
638
+ function re(e) {
639
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
640
  }
641
641
  function Qt(e) {
@@ -661,11 +661,11 @@ const ea = {
661
661
  generic: Gt
662
662
  };
663
663
  function na(e) {
664
- const t = ae(e);
664
+ const t = re(e);
665
665
  return t !== "document" ? ea[t] : ta[Qt(e)];
666
666
  }
667
- function ce(e, t) {
668
- return U.createElement(na(e), t);
667
+ function le(e, t) {
668
+ return j.createElement(na(e), t);
669
669
  }
670
670
  const sa = (e) => {
671
671
  var t, s;
@@ -682,23 +682,23 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = ae(t), u = H(null), f = H(null), c = H(null), b = H(r), [_, v] = z(a), [p, x] = z(0), [A, M] = z(!1), [N, L] = z(!1), [$, O] = z(!1), [E, k] = z(!1), [R, D] = z(!0), [I, T] = z(null), S = K(() => {
686
- O(!1), v(!0);
687
- }, []), P = K((w) => {
688
- const C = f.current;
689
- if (!C) return 0;
690
- const B = C.getBoundingClientRect();
685
+ const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [_, v] = $(a), [p, x] = $(0), [A, M] = $(!1), [y, R] = $(!1), [z, P] = $(!1), [S, E] = $(!1), [L, D] = $(!0), [C, I] = $(null), T = K(() => {
686
+ P(!1), v(!0);
687
+ }, []), O = K((w) => {
688
+ const k = f.current;
689
+ if (!k) return 0;
690
+ const B = k.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
693
  Math.min(1, (sa(w) - B.left) / B.width)
694
694
  );
695
695
  }, []), F = K((w) => {
696
- const C = u.current;
697
- C && C.duration && (C.currentTime = w * C.duration);
696
+ const k = u.current;
697
+ k && k.duration && (k.currentTime = w * k.duration);
698
698
  }, []), Y = (w) => {
699
699
  w.stopPropagation(), M(!0);
700
- const C = P(w);
701
- x(C), F(C);
700
+ const k = O(w);
701
+ x(k), F(k);
702
702
  };
703
703
  X(() => {
704
704
  r !== void 0 && r !== b.current && (b.current = r, v(r));
@@ -708,40 +708,40 @@ const sa = (e) => {
708
708
  return;
709
709
  }
710
710
  const w = () => {
711
- const C = u.current;
712
- C && C.duration && !A && x(C.currentTime / C.duration), c.current = requestAnimationFrame(w);
711
+ const k = u.current;
712
+ k && k.duration && !A && x(k.currentTime / k.duration), c.current = requestAnimationFrame(w);
713
713
  };
714
714
  return c.current = requestAnimationFrame(w), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
717
  }, [_, A]), X(() => {
718
718
  const w = u.current;
719
- w && (_ ? w.play().catch((C) => {
720
- v(!1), O(!0);
719
+ w && (_ ? w.play().catch((k) => {
720
+ v(!1), P(!0);
721
721
  }) : w.pause());
722
722
  }, [_]), X(() => {
723
723
  if (!A) return;
724
- const w = (B) => x(P(B)), C = (B) => {
725
- M(!1), F(P(B));
724
+ const w = (B) => x(O(B)), k = (B) => {
725
+ M(!1), F(O(B));
726
726
  };
727
- return window.addEventListener("mousemove", w), window.addEventListener("mouseup", C), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", C), () => {
728
- window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", C);
727
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", k), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", k), () => {
728
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", k);
729
729
  };
730
- }, [A, P, F]);
731
- const Z = I ? { aspectRatio: String(I) } : void 0, q = I ? "" : " aspect-video", G = Math.round(p * 100);
730
+ }, [A, O, F]);
731
+ const Z = C ? { aspectRatio: String(C) } : void 0, J = C ? "" : " aspect-video", U = Math.round(p * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${q}`,
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${J}`,
738
738
  style: Z,
739
739
  onClick: (w) => {
740
740
  if (m) {
741
741
  m(w);
742
742
  return;
743
743
  }
744
- $ || o && v((C) => !C);
744
+ z || o && v((k) => !k);
745
745
  },
746
746
  onKeyDown: (w) => {
747
747
  if (!(w.key !== "Enter" && w.key !== " ")) {
@@ -749,11 +749,11 @@ const sa = (e) => {
749
749
  m(w);
750
750
  return;
751
751
  }
752
- $ || o && v((C) => !C);
752
+ z || o && v((k) => !k);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || R) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || L) && /* @__PURE__ */ n(
757
757
  "img",
758
758
  {
759
759
  src: s,
@@ -761,7 +761,7 @@ const sa = (e) => {
761
761
  className: "absolute inset-0 h-full w-full object-cover"
762
762
  }
763
763
  ),
764
- !s && (g === "audio" || R) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || L) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
@@ -773,12 +773,12 @@ const sa = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => k(!0),
776
+ onLoadStart: () => E(!0),
777
777
  onCanPlay: () => {
778
- k(!1), D(!1);
778
+ E(!1), D(!1);
779
779
  },
780
- onWaiting: () => k(!0),
781
- onPlay: () => O(!1),
780
+ onWaiting: () => E(!0),
781
+ onPlay: () => P(!1),
782
782
  onEnded: () => {
783
783
  i || (v(!1), x(0));
784
784
  },
@@ -793,15 +793,15 @@ const sa = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => k(!0),
796
+ onLoadStart: () => E(!0),
797
797
  onCanPlay: () => {
798
- k(!1), D(!1);
798
+ E(!1), D(!1);
799
799
  },
800
- onWaiting: () => k(!0),
801
- onPlay: () => O(!1),
800
+ onWaiting: () => E(!0),
801
+ onPlay: () => P(!1),
802
802
  onLoadedMetadata: () => {
803
803
  const w = u.current;
804
- w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && T(w.videoWidth / w.videoHeight);
804
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && I(w.videoWidth / w.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
807
  i || (v(!1), x(0));
@@ -809,14 +809,14 @@ const sa = (e) => {
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- E && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ S && !z && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
813
  pe,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
817
817
  }
818
818
  ) }),
819
- $ && !o && /* @__PURE__ */ n(
819
+ z && !o && /* @__PURE__ */ n(
820
820
  "div",
821
821
  {
822
822
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -824,10 +824,10 @@ const sa = (e) => {
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
826
  onClick: (w) => {
827
- w.stopPropagation(), S();
827
+ w.stopPropagation(), T();
828
828
  },
829
829
  onKeyDown: (w) => {
830
- w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), S());
830
+ w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), T());
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
  }
@@ -837,7 +837,7 @@ const sa = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": G,
840
+ "aria-valuenow": U,
841
841
  "aria-valuemin": 0,
842
842
  "aria-valuemax": 100,
843
843
  tabIndex: 0,
@@ -853,7 +853,7 @@ const sa = (e) => {
853
853
  "div",
854
854
  {
855
855
  className: "h-full rounded-full bg-white",
856
- style: { width: `${G}%` }
856
+ style: { width: `${U}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -864,7 +864,7 @@ const sa = (e) => {
864
864
  {
865
865
  type: "button",
866
866
  onClick: (w) => {
867
- w.stopPropagation(), v((C) => !C);
867
+ w.stopPropagation(), v((k) => !k);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
870
  "aria-label": _ ? "Pause" : "Play",
@@ -876,7 +876,7 @@ const sa = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": G,
879
+ "aria-valuenow": U,
880
880
  "aria-valuemin": 0,
881
881
  "aria-valuemax": 100,
882
882
  tabIndex: 0,
@@ -885,8 +885,8 @@ const sa = (e) => {
885
885
  onMouseDown: Y,
886
886
  onTouchStart: Y,
887
887
  onClick: (w) => w.stopPropagation(),
888
- onMouseEnter: () => L(!0),
889
- onMouseLeave: () => L(!1),
888
+ onMouseEnter: () => R(!0),
889
+ onMouseLeave: () => R(!1),
890
890
  onKeyDown: (w) => {
891
891
  w.key === "ArrowRight" && F(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && F(Math.max(0, p - 0.05));
892
892
  },
@@ -894,12 +894,12 @@ 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 ${N || A ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y || A ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
901
901
  className: "h-full rounded-full bg-white",
902
- style: { width: `${G}%` }
902
+ style: { width: `${U}%` }
903
903
  }
904
904
  )
905
905
  }
@@ -907,8 +907,8 @@ 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 ${N || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${G}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${y || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${U}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -927,7 +927,7 @@ const sa = (e) => {
927
927
  mediaPlayerProps: i,
928
928
  containedImage: o = !1
929
929
  }) => {
930
- const l = ae(e), [d, m] = z(!1);
930
+ const l = re(e), [d, m] = $(!1);
931
931
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
932
932
  aa,
933
933
  {
@@ -975,7 +975,7 @@ const sa = (e) => {
975
975
  "div",
976
976
  {
977
977
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
978
- children: ce(e, {
978
+ children: le(e, {
979
979
  className: $t(r),
980
980
  weight: "regular"
981
981
  })
@@ -992,7 +992,7 @@ const sa = (e) => {
992
992
  "div",
993
993
  {
994
994
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
995
- children: ce(e, {
995
+ children: le(e, {
996
996
  className: $t(r),
997
997
  weight: "regular"
998
998
  })
@@ -1018,7 +1018,7 @@ const sa = (e) => {
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": u,
1021
- className: y(
1021
+ className: N(
1022
1022
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1023
1023
  f ? "bg-[#121110]" : "bg-white"
1024
1024
  ),
@@ -1030,7 +1030,7 @@ const sa = (e) => {
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: y("mb-0.5 truncate text-base font-medium", {
1033
+ className: N("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
1035
  "text-white/30": f && b,
1036
1036
  "text-white": f && !b
@@ -1039,8 +1039,8 @@ const sa = (e) => {
1039
1039
  }
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
- ce(r, {
1043
- className: y(
1042
+ le(r, {
1043
+ className: N(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,7 +1049,7 @@ const sa = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: y(
1052
+ className: N(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
@@ -1086,7 +1086,7 @@ function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
1088
  const Ze = ({ attachment: e, isMyMessage: t }) => {
1089
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(U.Fragment, { children: [
1089
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, m = /* @__PURE__ */ h(j.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1132,7 +1132,7 @@ const ma = ({
1132
1132
  url: e,
1133
1133
  filename: t
1134
1134
  }) => {
1135
- const [s, a] = z(!1);
1135
+ const [s, a] = $(!1);
1136
1136
  return /* @__PURE__ */ n(
1137
1137
  "button",
1138
1138
  {
@@ -1148,7 +1148,7 @@ const ma = ({
1148
1148
  },
1149
1149
  disabled: s,
1150
1150
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1151
- children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(U.Fragment, { children: [
1151
+ children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1152
1152
  /* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
@@ -1211,7 +1211,7 @@ const an = ({
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = ae(t), o = a !== void 0 ? nn(a) : void 0;
1214
+ const i = re(t), o = a !== void 0 ? nn(a) : void 0;
1215
1215
  return /* @__PURE__ */ n(
1216
1216
  tn,
1217
1217
  {
@@ -1240,7 +1240,7 @@ const an = ({
1240
1240
  const s = Qe(e), a = et(e);
1241
1241
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1242
1242
  !t && e.user && /* @__PURE__ */ n(
1243
- oe,
1243
+ ie,
1244
1244
  {
1245
1245
  className: "str-chat__avatar str-chat__message-sender-avatar",
1246
1246
  id: e.user.id,
@@ -1347,10 +1347,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1347
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
1348
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
1349
  ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
1350
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ae, { children: [
1351
1351
  m,
1352
1352
  g
1353
- ] }) : /* @__PURE__ */ h(se, { children: [
1353
+ ] }) : /* @__PURE__ */ h(ae, { children: [
1354
1354
  g,
1355
1355
  m
1356
1356
  ] }) });
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: y("message-vote-button focus-ring", {
1366
+ className: N("message-vote-button focus-ring", {
1367
1367
  "message-vote-button--selected": e === "up"
1368
1368
  }),
1369
1369
  onClick: t,
@@ -1377,7 +1377,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
- className: y("message-vote-button focus-ring", {
1380
+ className: N("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1406,27 +1406,27 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1406
1406
  renderText: b,
1407
1407
  threadList: _,
1408
1408
  viewerLanguage: v
1409
- } = e, { client: p } = We("CustomMessage"), { channel: x } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: N, onDownloadClick: L } = va("LockedAttachment"), [$, O] = z(!1), E = Ln(c.id), { selected: k, voteUp: R, voteDown: D } = Hs(c), {
1410
- Attachment: I = Dn,
1411
- EditMessageModal: T = On,
1412
- MessageActions: S,
1413
- MessageBlocked: P = Pn,
1409
+ } = e, { client: p } = We("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: y, onDownloadClick: R } = va("LockedAttachment"), [z, P] = $(!1), S = Ln(c.id), { selected: E, voteUp: L, voteDown: D } = Hs(c), {
1410
+ Attachment: C = Dn,
1411
+ EditMessageModal: I = On,
1412
+ MessageActions: T,
1413
+ MessageBlocked: O = Pn,
1414
1414
  MessageBouncePrompt: F = zn,
1415
1415
  MessageDeleted: Y = $n,
1416
1416
  MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
1417
- MessageRepliesCountButton: q = Bn,
1418
- ReminderNotification: G = Un,
1417
+ MessageRepliesCountButton: J = Bn,
1418
+ ReminderNotification: U = Un,
1419
1419
  StreamedMessageText: w = jn,
1420
- PinIndicator: C
1421
- } = jt("CustomMessage"), B = Vn(c), j = Gn(c), W = ne(
1420
+ PinIndicator: k
1421
+ } = jt("CustomMessage"), B = Vn(c), q = Gn(c), H = se(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
- ), V = ne(() => {
1424
+ ), V = se(() => {
1425
1425
  const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
1426
1426
  if (!Ee(c)) return Ce;
1427
1427
  const It = Ce.filter((Tt) => !("type" in Tt) || !sn(Tt));
1428
1428
  return It.length === Ce.length ? Ce : It;
1429
- }, [c]), J = ne(() => {
1429
+ }, [c]), W = se(() => {
1430
1430
  const fe = Kt({ message: c, viewerLanguage: v });
1431
1431
  return fe === c.text ? c : { ...c, text: fe };
1432
1432
  }, [c, v]);
@@ -1435,41 +1435,41 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
1436
  return /* @__PURE__ */ n(Y, { message: c });
1437
1437
  if (Yn(c))
1438
- return /* @__PURE__ */ n(P, {});
1439
- const re = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, ee = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ie = qn(c);
1438
+ return /* @__PURE__ */ n(O, {});
1439
+ const de = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, te = qn(c);
1440
1440
  let Q;
1441
- ee ? Q = () => m(c) : ie && (Q = () => O(!0));
1442
- const me = f(), En = y(
1441
+ me ? Q = () => m(c) : te && (Q = () => P(!0));
1442
+ const ee = f(), En = N(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
- me ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1446
+ ee ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1447
1447
  c.text ? "str-chat__message--has-text" : "has-no-text",
1448
1448
  {
1449
1449
  "str-chat__message--has-attachment": B,
1450
1450
  "str-chat__message--highlighted": g,
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
- "str-chat__message--with-reactions": j,
1452
+ "str-chat__message--with-reactions": q,
1453
1453
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
1454
- "str-chat__message-with-thread-link": re || ue,
1454
+ "str-chat__message-with-thread-link": de || ue,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
1457
  "str-chat__virtual-message__wrapper--group": o
1458
1458
  }
1459
- ), dt = c.poll_id && p.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && me && Le;
1460
- return /* @__PURE__ */ h(se, { children: [
1459
+ ), dt = c.poll_id && p.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && ee && Le;
1460
+ return /* @__PURE__ */ h(ae, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- T,
1462
+ I,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- $ && /* @__PURE__ */ n(
1467
+ z && /* @__PURE__ */ n(
1468
1468
  Wn,
1469
1469
  {
1470
1470
  MessageBouncePrompt: F,
1471
- onClose: () => O(!1),
1472
- open: $
1471
+ onClose: () => P(!1),
1472
+ open: z
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
@@ -1478,10 +1478,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1478
1478
  className: En,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
- C && /* @__PURE__ */ n(C, {}),
1482
- !!E && /* @__PURE__ */ n(G, { reminder: E }),
1481
+ k && /* @__PURE__ */ n(k, {}),
1482
+ !!S && /* @__PURE__ */ n(U, { reminder: S }),
1483
1483
  c.user && /* @__PURE__ */ n(
1484
- oe,
1484
+ ie,
1485
1485
  {
1486
1486
  className: "str-chat__avatar str-chat__message-sender-avatar",
1487
1487
  id: c.user.id,
@@ -1495,8 +1495,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1495
1495
  /* @__PURE__ */ n(
1496
1496
  "div",
1497
1497
  {
1498
- className: y("str-chat__message-inner", {
1499
- "str-chat__simple-message--error-failed": ee || ie
1498
+ className: N("str-chat__message-inner", {
1499
+ "str-chat__simple-message--error-failed": me || te
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
1502
  onClick: Q,
@@ -1510,8 +1510,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1510
1510
  marginInlineStart: 0
1511
1511
  },
1512
1512
  children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
- me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
- S && /* @__PURE__ */ n(S, {}),
1513
+ ee ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
+ T && /* @__PURE__ */ n(T, {}),
1515
1515
  /* @__PURE__ */ n(
1516
1516
  zt.Sent,
1517
1517
  {
@@ -1522,7 +1522,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1522
1522
  detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
1523
1523
  paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1524
1524
  onPreviewClick: () => M == null ? void 0 : M(c, x),
1525
- onFetchSource: async () => await (N == null ? void 0 : N(c, x))
1525
+ onFetchSource: async () => await (y == null ? void 0 : y(c, x))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1537,16 +1537,16 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1537
1537
  paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
1538
1538
  isUnlocking: A(c.id),
1539
1539
  onUnlockClick: () => M == null ? void 0 : M(c, x),
1540
- onFetchSource: async () => await (N == null ? void 0 : N(c, x)),
1541
- onDownloadClick: () => L == null ? void 0 : L(c, x)
1540
+ onFetchSource: async () => await (y == null ? void 0 : y(c, x)),
1541
+ onDownloadClick: () => R == null ? void 0 : R(c, x)
1542
1542
  }
1543
1543
  ),
1544
- S && /* @__PURE__ */ n(S, {})
1544
+ T && /* @__PURE__ */ n(T, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
1547
  Mt,
1548
1548
  {
1549
- message: J,
1549
+ message: W,
1550
1550
  renderText: b
1551
1551
  }
1552
1552
  ) })
@@ -1559,27 +1559,27 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1559
1559
  {
1560
1560
  message: c,
1561
1561
  hasAttachment: Le,
1562
- isMyMessage: me
1562
+ isMyMessage: ee
1563
1563
  }
1564
1564
  ),
1565
1565
  dt && /* @__PURE__ */ n(Xn, { poll: dt }),
1566
1566
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- I,
1567
+ C,
1568
1568
  {
1569
1569
  actionHandler: l,
1570
1570
  attachments: V
1571
1571
  }
1572
1572
  ) : null,
1573
- W ? /* @__PURE__ */ n(
1573
+ H ? /* @__PURE__ */ n(
1574
1574
  w,
1575
1575
  {
1576
- message: J,
1576
+ message: W,
1577
1577
  renderText: b
1578
1578
  }
1579
1579
  ) : /* @__PURE__ */ n(
1580
1580
  Mt,
1581
1581
  {
1582
- message: J,
1582
+ message: W,
1583
1583
  renderText: b
1584
1584
  }
1585
1585
  ),
@@ -1593,20 +1593,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1593
1593
  {
1594
1594
  message: c,
1595
1595
  hasAttachment: Le,
1596
- isMyMessage: me
1596
+ isMyMessage: ee
1597
1597
  }
1598
1598
  ),
1599
1599
  s && he && /* @__PURE__ */ n(
1600
1600
  Ca,
1601
1601
  {
1602
- selected: k,
1603
- onVoteUp: R,
1602
+ selected: E,
1603
+ onVoteUp: L,
1604
1604
  onVoteDown: D
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
- re && /* @__PURE__ */ n(
1609
- q,
1608
+ de && /* @__PURE__ */ n(
1609
+ J,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
@@ -1618,7 +1618,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1618
1618
  c.id
1619
1619
  )
1620
1620
  ] });
1621
- }, Ea = U.memo(
1621
+ }, Ea = j.memo(
1622
1622
  ka,
1623
1623
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1624
1624
  ), Sa = (e) => {
@@ -1720,7 +1720,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, cn = U.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, cn = j.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1771,8 +1771,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1771
1771
  disabledReason: a
1772
1772
  }) => {
1773
1773
  var o;
1774
- const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1775
- return s ? /* @__PURE__ */ h(se, { children: [
1774
+ const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1775
+ return s ? /* @__PURE__ */ h(ae, { children: [
1776
1776
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1777
1777
  t == null ? void 0 : t()
1778
1778
  ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -1824,7 +1824,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1824
1824
  if (t === -1)
1825
1825
  return e;
1826
1826
  const s = t + ze.length;
1827
- return /* @__PURE__ */ h(se, { children: [
1827
+ return /* @__PURE__ */ h(ae, { children: [
1828
1828
  e.slice(0, t),
1829
1829
  /* @__PURE__ */ n(
1830
1830
  "a",
@@ -1920,7 +1920,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1920
1920
  Oe.ExternalSources
1921
1921
  ]), qa = ({ threadList: e }) => {
1922
1922
  var b, _;
1923
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
1923
+ const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
1924
1924
  if (!e && l && Ya.has(o)) {
1925
1925
  const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
1926
1926
  return /* @__PURE__ */ n(
@@ -1973,7 +1973,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1973
1973
  },
1974
1974
  children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
1975
1975
  /* @__PURE__ */ n(
1976
- oe,
1976
+ ie,
1977
1977
  {
1978
1978
  className: "str-chat__avatar str-chat__message-sender-avatar",
1979
1979
  id: e,
@@ -2014,7 +2014,7 @@ function Wa(e, t) {
2014
2014
  const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2015
2015
  "div",
2016
2016
  {
2017
- className: y("flex items-center justify-center h-full", e),
2017
+ className: N("flex items-center justify-center h-full", e),
2018
2018
  children: [
2019
2019
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2020
2020
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2054,12 +2054,12 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2054
2054
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2055
2055
  ]
2056
2056
  }
2057
- ), Se = U.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2057
+ ), Se = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2058
2058
  /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2059
2059
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2060
2060
  ] }) }));
2061
2061
  Se.displayName = "LoadingState";
2062
- const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Ja = ({
2062
+ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Ja = ({
2063
2063
  onBack: e,
2064
2064
  showBackButton: t,
2065
2065
  showStarButton: s = !1,
@@ -2078,26 +2078,26 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2078
2078
  onParticipantNameClick: _,
2079
2079
  renderHeaderTitleBadges: v
2080
2080
  }) => {
2081
- var O, E, k, R, D;
2082
- const { channel: p } = de(), x = U.useMemo(() => {
2083
- var S, P;
2084
- const I = (S = p._client) == null ? void 0 : S.userID;
2085
- return I ? Object.values(((P = p.state) == null ? void 0 : P.members) || {}).find(
2081
+ var P, S, E, L, D;
2082
+ const { channel: p } = ce(), x = j.useMemo(() => {
2083
+ var T, O;
2084
+ const C = (T = p._client) == null ? void 0 : T.userID;
2085
+ return C ? Object.values(((O = p.state) == null ? void 0 : O.members) || {}).find(
2086
2086
  (F) => {
2087
2087
  var Y;
2088
- return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== I;
2088
+ return ((Y = F.user) == null ? void 0 : Y.id) && F.user.id !== C;
2089
2089
  }
2090
2090
  ) : void 0;
2091
- }, [(O = p._client) == null ? void 0 : O.userID, (E = p.state) == null ? void 0 : E.members]), A = Xt(x == null ? void 0 : x.user), M = (k = x == null ? void 0 : x.user) == null ? void 0 : k.image, N = Wt(p), L = v == null ? void 0 : v({
2091
+ }, [(P = p._client) == null ? void 0 : P.userID, (S = p.state) == null ? void 0 : S.members]), A = Xt(x == null ? void 0 : x.user), M = (E = x == null ? void 0 : x.user) == null ? void 0 : E.image, y = Wt(p), R = v == null ? void 0 : v({
2092
2092
  channel: p,
2093
2093
  participant: x
2094
- }), $ = async () => {
2094
+ }), z = async () => {
2095
2095
  try {
2096
- N ? await p.unpin() : await p.pin();
2097
- } catch (I) {
2096
+ y ? await p.unpin() : await p.pin();
2097
+ } catch (C) {
2098
2098
  console.error(
2099
2099
  "[CustomChannelHeader] Failed to update pinned status:",
2100
- I
2100
+ C
2101
2101
  );
2102
2102
  }
2103
2103
  };
@@ -2106,8 +2106,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2106
2106
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2107
2107
  "button",
2108
2108
  {
2109
- className: y(
2110
- le,
2109
+ className: N(
2110
+ oe,
2111
2111
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2112
2112
  ),
2113
2113
  onClick: e || (() => {
@@ -2119,12 +2119,12 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2119
2119
  ) }),
2120
2120
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2121
2121
  /* @__PURE__ */ n(
2122
- oe,
2122
+ ie,
2123
2123
  {
2124
- id: ((R = x == null ? void 0 : x.user) == null ? void 0 : R.id) || p.id || "unknown",
2124
+ id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || p.id || "unknown",
2125
2125
  name: A,
2126
2126
  image: M,
2127
- starred: s && N,
2127
+ starred: s && y,
2128
2128
  dmAgentEnabled: a,
2129
2129
  size: 48
2130
2130
  }
@@ -2138,13 +2138,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2138
2138
  className: "flex max-w-full items-center gap-0.5 rounded text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70",
2139
2139
  children: [
2140
2140
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2141
- L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
2141
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
2142
2142
  /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
2143
2143
  ]
2144
2144
  }
2145
2145
  ) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2146
2146
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2147
- L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2147
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
2148
2148
  ] }),
2149
2149
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2150
2150
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
@@ -2155,18 +2155,18 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2155
2155
  s && /* @__PURE__ */ n(
2156
2156
  "button",
2157
2157
  {
2158
- className: le,
2159
- onClick: $,
2158
+ className: oe,
2159
+ onClick: z,
2160
2160
  type: "button",
2161
- "aria-label": N ? "Unstar conversation" : "Star conversation",
2161
+ "aria-label": y ? "Unstar conversation" : "Star conversation",
2162
2162
  children: /* @__PURE__ */ n(
2163
2163
  Be,
2164
2164
  {
2165
- className: y("size-5", {
2166
- "text-yellow-600": N,
2167
- "text-black/90": !N
2165
+ className: N("size-5", {
2166
+ "text-yellow-600": y,
2167
+ "text-black/90": !y
2168
2168
  }),
2169
- weight: N ? "duotone" : "regular"
2169
+ weight: y ? "duotone" : "regular"
2170
2170
  }
2171
2171
  )
2172
2172
  }
@@ -2185,7 +2185,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2185
2185
  onBlockParticipantClick: g,
2186
2186
  onReportParticipantClick: u,
2187
2187
  customChannelActions: f,
2188
- triggerClassName: y(le, "bg-[#F1F0EE]")
2188
+ triggerClassName: N(oe, "bg-[#F1F0EE]")
2189
2189
  }
2190
2190
  ))
2191
2191
  ] })
@@ -2195,8 +2195,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2195
2195
  t && e && /* @__PURE__ */ n(
2196
2196
  "button",
2197
2197
  {
2198
- className: y(
2199
- le,
2198
+ className: N(
2199
+ oe,
2200
2200
  "messaging-channel-view-back-button-desktop"
2201
2201
  ),
2202
2202
  type: "button",
@@ -2206,12 +2206,12 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2206
2206
  }
2207
2207
  ),
2208
2208
  /* @__PURE__ */ n(
2209
- oe,
2209
+ ie,
2210
2210
  {
2211
2211
  id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || p.id || "unknown",
2212
2212
  name: A,
2213
2213
  image: M,
2214
- starred: s && N,
2214
+ starred: s && y,
2215
2215
  dmAgentEnabled: a,
2216
2216
  size: 48
2217
2217
  }
@@ -2226,13 +2226,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2226
2226
  className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2227
2227
  children: [
2228
2228
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2229
- L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L }),
2229
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
2230
2230
  /* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
2231
2231
  ]
2232
2232
  }
2233
2233
  ) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2234
2234
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2235
- L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2235
+ R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
2236
2236
  ] }),
2237
2237
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2238
2238
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
@@ -2244,18 +2244,18 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2244
2244
  s && /* @__PURE__ */ n(
2245
2245
  "button",
2246
2246
  {
2247
- className: le,
2248
- onClick: $,
2247
+ className: oe,
2248
+ onClick: z,
2249
2249
  type: "button",
2250
- "aria-label": N ? "Unstar conversation" : "Star conversation",
2250
+ "aria-label": y ? "Unstar conversation" : "Star conversation",
2251
2251
  children: /* @__PURE__ */ n(
2252
2252
  Be,
2253
2253
  {
2254
- className: y("size-6", {
2255
- "text-yellow-600": N,
2256
- "text-black/90": !N
2254
+ className: N("size-6", {
2255
+ "text-yellow-600": y,
2256
+ "text-black/90": !y
2257
2257
  }),
2258
- weight: N ? "duotone" : "regular"
2258
+ weight: y ? "duotone" : "regular"
2259
2259
  }
2260
2260
  )
2261
2261
  }
@@ -2274,7 +2274,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2274
2274
  onBlockParticipantClick: g,
2275
2275
  onReportParticipantClick: u,
2276
2276
  customChannelActions: f,
2277
- triggerClassName: le
2277
+ triggerClassName: oe
2278
2278
  }
2279
2279
  ))
2280
2280
  ] })
@@ -2302,48 +2302,48 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2302
2302
  renderHeaderTitleBadges: x,
2303
2303
  customChannelActions: A,
2304
2304
  renderChannelActions: M,
2305
- renderMessage: N,
2306
- dmAgentEnabled: L = !1,
2307
- viewerLanguage: $,
2308
- showChannelInfo: O = !0,
2309
- onParticipantNameClick: E
2305
+ renderMessage: y,
2306
+ dmAgentEnabled: R = !1,
2307
+ viewerLanguage: z,
2308
+ showChannelInfo: P = !0,
2309
+ onParticipantNameClick: S
2310
2310
  }) => {
2311
- var F, Y, Z, q, G, w;
2312
- const { channel: k } = de(), R = U.useMemo(() => {
2313
- var j, W;
2314
- const C = (j = k._client) == null ? void 0 : j.userID;
2315
- return C ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find(
2311
+ var F, Y, Z, J, U, w;
2312
+ const { channel: E } = ce(), L = j.useMemo(() => {
2313
+ var q, H;
2314
+ const k = (q = E._client) == null ? void 0 : q.userID;
2315
+ return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find(
2316
2316
  (V) => {
2317
- var J;
2318
- return ((J = V.user) == null ? void 0 : J.id) && V.user.id !== C;
2317
+ var W;
2318
+ return ((W = V.user) == null ? void 0 : W.id) && V.user.id !== k;
2319
2319
  }
2320
2320
  ) : void 0;
2321
- }, [(F = k._client) == null ? void 0 : F.userID, (Y = k.state) == null ? void 0 : Y.members]), D = U.useMemo(() => {
2322
- var j, W;
2323
- const C = (j = k._client) == null ? void 0 : j.userID;
2324
- return C ? Object.values(((W = k.state) == null ? void 0 : W.members) || {}).find((V) => {
2325
- var J;
2326
- return ((J = V.user) == null ? void 0 : J.id) === C;
2321
+ }, [(F = E._client) == null ? void 0 : F.userID, (Y = E.state) == null ? void 0 : Y.members]), D = j.useMemo(() => {
2322
+ var q, H;
2323
+ const k = (q = E._client) == null ? void 0 : q.userID;
2324
+ return k ? Object.values(((H = E.state) == null ? void 0 : H.members) || {}).find((V) => {
2325
+ var W;
2326
+ return ((W = V.user) == null ? void 0 : W.id) === k;
2327
2327
  }) : void 0;
2328
- }, [(Z = k._client) == null ? void 0 : Z.userID, (q = k.state) == null ? void 0 : q.members]), I = ((G = D == null ? void 0 : D.user) == null ? void 0 : G.is_account) ?? (D == null ? void 0 : D.is_account), T = ((w = R == null ? void 0 : R.user) == null ? void 0 : w.is_account) ?? (R == null ? void 0 : R.is_account), S = L && I === !1 && T === !0, P = K(
2329
- (C) => {
2330
- const { message: B } = xe("ChannelView"), j = /* @__PURE__ */ n(
2328
+ }, [(Z = E._client) == null ? void 0 : Z.userID, (J = E.state) == null ? void 0 : J.members]), C = ((U = D == null ? void 0 : D.user) == null ? void 0 : U.is_account) ?? (D == null ? void 0 : D.is_account), I = ((w = L == null ? void 0 : L.user) == null ? void 0 : w.is_account) ?? (L == null ? void 0 : L.is_account), T = R && C === !1 && I === !0, O = K(
2329
+ (k) => {
2330
+ const { message: B } = xe("ChannelView"), q = /* @__PURE__ */ n(
2331
2331
  Sa,
2332
2332
  {
2333
- ...C,
2333
+ ...k,
2334
2334
  chatbotVotingEnabled: v,
2335
- viewerLanguage: $
2335
+ viewerLanguage: z
2336
2336
  }
2337
2337
  );
2338
- return !N || !B ? j : N(j, B);
2338
+ return !y || !B ? q : y(q, B);
2339
2339
  },
2340
- [v, N, $]
2340
+ [v, y, z]
2341
2341
  );
2342
- return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2342
+ return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
2343
2343
  ls,
2344
2344
  {
2345
2345
  overrides: {
2346
- Message: P,
2346
+ Message: O,
2347
2347
  MessageActions: Aa
2348
2348
  },
2349
2349
  children: /* @__PURE__ */ h(cs, { children: [
@@ -2352,9 +2352,9 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2352
2352
  {
2353
2353
  onBack: e,
2354
2354
  showBackButton: t,
2355
- showChannelInfo: O,
2355
+ showChannelInfo: P,
2356
2356
  showStarButton: _,
2357
- dmAgentEnabled: S,
2357
+ dmAgentEnabled: T,
2358
2358
  onLeaveConversation: i,
2359
2359
  onBlockParticipant: o,
2360
2360
  showDeleteConversation: l,
@@ -2365,11 +2365,11 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2365
2365
  onReportParticipantClick: g,
2366
2366
  customChannelActions: A,
2367
2367
  renderChannelActions: M,
2368
- onParticipantNameClick: E,
2368
+ onParticipantNameClick: S,
2369
2369
  renderHeaderTitleBadges: x
2370
2370
  }
2371
2371
  ) }, "lt-channel-header"),
2372
- p ? /* @__PURE__ */ n(U.Fragment, { children: p() }, "lt-channel-banner") : null,
2372
+ p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null,
2373
2373
  /* @__PURE__ */ n(
2374
2374
  "div",
2375
2375
  {
@@ -2378,14 +2378,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2378
2378
  },
2379
2379
  "lt-channel-message-list"
2380
2380
  ),
2381
- r ? /* @__PURE__ */ n(U.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
2381
+ r ? /* @__PURE__ */ n(j.Fragment, { children: r(E) }, "lt-channel-conversation-footer") : null,
2382
2382
  /* @__PURE__ */ n(
2383
2383
  Pa,
2384
2384
  {
2385
2385
  ...s && {
2386
- renderActions: () => s == null ? void 0 : s(k)
2386
+ renderActions: () => s == null ? void 0 : s(E)
2387
2387
  },
2388
- renderFooter: () => a == null ? void 0 : a(k),
2388
+ renderFooter: () => a == null ? void 0 : a(E),
2389
2389
  disabled: c,
2390
2390
  disabledReason: b
2391
2391
  },
@@ -2394,7 +2394,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2394
2394
  ] })
2395
2395
  }
2396
2396
  ) });
2397
- }, un = U.memo(
2397
+ }, un = j.memo(
2398
2398
  ({
2399
2399
  channel: e,
2400
2400
  onBack: t,
@@ -2417,56 +2417,56 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2417
2417
  dmAgentEnabled: x,
2418
2418
  messageMetadata: A,
2419
2419
  onMessageSent: M,
2420
- showStarButton: N = !1,
2421
- chatbotVotingEnabled: L = !1,
2422
- renderChannelBanner: $,
2423
- renderHeaderTitleBadges: O,
2424
- customChannelActions: E,
2425
- renderChannelActions: k,
2426
- renderMessage: R,
2420
+ showStarButton: y = !1,
2421
+ chatbotVotingEnabled: R = !1,
2422
+ renderChannelBanner: z,
2423
+ renderHeaderTitleBadges: P,
2424
+ customChannelActions: S,
2425
+ renderChannelActions: E,
2426
+ renderMessage: L,
2427
2427
  onMessageLinkClick: D,
2428
- sendButton: I,
2429
- attachmentPreviewList: T,
2430
- viewerLanguage: S,
2431
- showChannelInfo: P = !0,
2428
+ sendButton: C,
2429
+ attachmentPreviewList: I,
2430
+ viewerLanguage: T,
2431
+ showChannelInfo: O = !0,
2432
2432
  onParticipantNameClick: F
2433
2433
  }) => {
2434
2434
  const Y = K(
2435
- async (q, G, w) => {
2436
- var J;
2437
- const C = ((J = e.data) == null ? void 0 : J.chatbot_paused) === !0, B = x && !C, j = {
2438
- ...G,
2435
+ async (J, U, w) => {
2436
+ var W;
2437
+ const k = ((W = e.data) == null ? void 0 : W.chatbot_paused) === !0, B = x && !k, q = {
2438
+ ...U,
2439
2439
  ...B && { silent: !0 },
2440
2440
  ...A && {
2441
2441
  metadata: {
2442
- ...G.metadata ?? {},
2442
+ ...U.metadata ?? {},
2443
2443
  ...A
2444
2444
  }
2445
2445
  }
2446
- }, W = {
2446
+ }, H = {
2447
2447
  ...w,
2448
2448
  ...B && { skip_push: !0 }
2449
- }, V = await e.sendMessage(j, W);
2449
+ }, V = await e.sendMessage(q, H);
2450
2450
  return M == null || M(V), V;
2451
2451
  },
2452
2452
  [e, x, A, M]
2453
- ), Z = H(null);
2453
+ ), Z = G(null);
2454
2454
  return X(() => {
2455
2455
  if (!D) return;
2456
- const q = Z.current;
2457
- if (!q) return;
2458
- const G = (w) => {
2459
- const C = w.target, B = C == null ? void 0 : C.closest("a[href]"), j = B == null ? void 0 : B.getAttribute("href");
2460
- if (!j) return;
2461
- const W = B == null ? void 0 : B.closest("[data-message-id]"), V = W == null ? void 0 : W.getAttribute("data-message-id"), J = V ? e.state.messages.find((re) => re.id === V) : void 0;
2462
- D(j, J);
2456
+ const J = Z.current;
2457
+ if (!J) return;
2458
+ const U = (w) => {
2459
+ const k = w.target, B = k == null ? void 0 : k.closest("a[href]"), q = B == null ? void 0 : B.getAttribute("href");
2460
+ if (!q) return;
2461
+ const H = B == null ? void 0 : B.closest("[data-message-id]"), V = H == null ? void 0 : H.getAttribute("data-message-id"), W = V ? e.state.messages.find((de) => de.id === V) : void 0;
2462
+ D(q, W);
2463
2463
  };
2464
- return q.addEventListener("click", G), () => q.removeEventListener("click", G);
2464
+ return J.addEventListener("click", U), () => J.removeEventListener("click", U);
2465
2465
  }, [D, e]), /* @__PURE__ */ n(
2466
2466
  "div",
2467
2467
  {
2468
2468
  ref: Z,
2469
- className: y(
2469
+ className: N(
2470
2470
  "messaging-channel-view h-full flex flex-col",
2471
2471
  d
2472
2472
  ),
@@ -2480,8 +2480,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2480
2480
  DateSeparator: Vs,
2481
2481
  TypingIndicator: qa,
2482
2482
  doSendMessageRequest: Y,
2483
- ...I ? { SendButton: I } : {},
2484
- ...T ? { AttachmentPreviewList: T } : {},
2483
+ ...C ? { SendButton: C } : {},
2484
+ ...I ? { AttachmentPreviewList: I } : {},
2485
2485
  children: /* @__PURE__ */ n(
2486
2486
  Za,
2487
2487
  {
@@ -2501,16 +2501,16 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2501
2501
  showReportParticipant: _,
2502
2502
  composerDisabled: v,
2503
2503
  composerDisabledReason: p,
2504
- showStarButton: N,
2504
+ showStarButton: y,
2505
2505
  dmAgentEnabled: x,
2506
- chatbotVotingEnabled: L,
2507
- renderChannelBanner: $,
2508
- renderHeaderTitleBadges: O,
2509
- customChannelActions: E,
2510
- renderChannelActions: k,
2511
- renderMessage: R,
2512
- viewerLanguage: S,
2513
- showChannelInfo: P,
2506
+ chatbotVotingEnabled: R,
2507
+ renderChannelBanner: z,
2508
+ renderHeaderTitleBadges: P,
2509
+ customChannelActions: S,
2510
+ renderChannelActions: E,
2511
+ renderMessage: L,
2512
+ viewerLanguage: T,
2513
+ showChannelInfo: O,
2514
2514
  onParticipantNameClick: F
2515
2515
  }
2516
2516
  )
@@ -2521,7 +2521,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2521
2521
  }
2522
2522
  );
2523
2523
  un.displayName = "ChannelView";
2524
- const be = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2524
+ const be = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2525
2525
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
2526
2526
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2527
2527
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2555,112 +2555,113 @@ const ki = ({
2555
2555
  renderChannelBanner: _,
2556
2556
  customChannelActions: v,
2557
2557
  renderChannelActions: p,
2558
- renderMessage: x,
2559
- onMessageLinkClick: A,
2560
- showChannelInfo: M
2558
+ onParticipantNameClick: x,
2559
+ renderMessage: A,
2560
+ onMessageLinkClick: M,
2561
+ showChannelInfo: y
2561
2562
  }) => {
2562
2563
  const {
2563
- client: N,
2564
- isConnected: L,
2565
- isLoading: $,
2566
- error: O,
2564
+ client: R,
2565
+ isConnected: z,
2566
+ isLoading: P,
2567
+ error: S,
2567
2568
  refreshConnection: E,
2568
- service: k,
2569
- debug: R
2570
- } = Ps(), [D, I] = z(null), [T, S] = z(null), [P, F] = z(!1), { showDeleteConversation: Y = !0 } = e, Z = H(o);
2571
- Z.current = o;
2572
- const q = H(a);
2573
- q.current = a;
2574
- const G = H(null), w = H(null);
2569
+ service: L,
2570
+ debug: D
2571
+ } = Ps(), [C, I] = $(null), [T, O] = $(null), [F, Y] = $(!1), { showDeleteConversation: Z = !0 } = e, J = G(o);
2572
+ J.current = o;
2573
+ const U = G(a);
2574
+ U.current = a;
2575
+ const w = G(null), k = G(null);
2575
2576
  X(() => {
2576
- w.current = D;
2577
- }, [D]), X(() => {
2578
- if (!N || !L) return;
2579
- const j = N.userID;
2580
- if (!j) return;
2581
- const W = `${j}::${i}`;
2582
- if (G.current === W) return;
2583
- G.current = W;
2584
- const V = () => {
2585
- G.current === W && (G.current = null);
2577
+ k.current = C;
2578
+ }, [C]), X(() => {
2579
+ if (!R || !z) return;
2580
+ const H = R.userID;
2581
+ if (!H) return;
2582
+ const V = `${H}::${i}`;
2583
+ if (w.current === V) return;
2584
+ w.current = V;
2585
+ const W = () => {
2586
+ w.current === V && (w.current = null);
2586
2587
  };
2587
2588
  (async () => {
2588
- var re, ue;
2589
+ var ue, me;
2589
2590
  try {
2590
- R && console.log(
2591
+ D && console.log(
2591
2592
  "[MessagingShell] Loading initial conversation with:",
2592
2593
  i
2593
2594
  );
2594
- const ee = await N.queryChannels(
2595
+ const te = await R.queryChannels(
2595
2596
  {
2596
2597
  type: "messaging",
2597
- members: { $eq: [j, i] }
2598
+ members: { $eq: [H, i] }
2598
2599
  },
2599
2600
  {},
2600
2601
  { limit: 1 }
2601
2602
  );
2602
- if (ee.length > 0) {
2603
- I(ee[0]), S(null), (re = q.current) == null || re.call(q, ee[0]), R && console.log(
2603
+ if (te.length > 0) {
2604
+ I(te[0]), O(null), (ue = U.current) == null || ue.call(U, te[0]), D && console.log(
2604
2605
  "[MessagingShell] Initial conversation loaded:",
2605
- ee[0].id
2606
+ te[0].id
2606
2607
  );
2607
2608
  return;
2608
2609
  }
2609
- const ie = Z.current;
2610
- if (!ie || !k) {
2611
- V(), S("No conversation found with this account"), R && console.log(
2610
+ const Q = J.current;
2611
+ if (!Q || !L) {
2612
+ W(), O("No conversation found with this account"), D && console.log(
2612
2613
  "[MessagingShell] No conversation found for:",
2613
2614
  i
2614
2615
  );
2615
2616
  return;
2616
2617
  }
2617
2618
  try {
2618
- const Q = await k.startChannelWithParticipant({
2619
- id: ie.id,
2620
- name: ie.name,
2621
- phone: ie.phone
2619
+ const ee = await L.startChannelWithParticipant({
2620
+ id: Q.id,
2621
+ name: Q.name,
2622
+ phone: Q.phone
2622
2623
  });
2623
- I(Q), S(null), (ue = q.current) == null || ue.call(q, Q), R && console.log(
2624
+ I(ee), O(null), (me = U.current) == null || me.call(U, ee), D && console.log(
2624
2625
  "[MessagingShell] Channel created and loaded:",
2625
- Q.id
2626
+ ee.id
2626
2627
  );
2627
- } catch (Q) {
2628
+ } catch (ee) {
2628
2629
  console.error(
2629
2630
  "[MessagingShell] Failed to create conversation:",
2630
- Q
2631
- ), V(), S("Failed to create conversation");
2631
+ ee
2632
+ ), W(), O("Failed to create conversation");
2632
2633
  }
2633
- } catch (ee) {
2634
+ } catch (te) {
2634
2635
  console.error(
2635
2636
  "[MessagingShell] Failed to load initial conversation:",
2636
- ee
2637
- ), V(), w.current || S("Failed to load conversation");
2637
+ te
2638
+ ), W(), k.current || O("Failed to load conversation");
2638
2639
  }
2639
2640
  })();
2640
- }, [i, N, L, k, R]);
2641
- const C = H(r);
2642
- C.current = r;
2643
- const B = K(() => {
2644
- var j;
2645
- I(null), F(!0), (j = C.current) == null || j.call(C);
2641
+ }, [i, R, z, L, D]);
2642
+ const B = G(r);
2643
+ B.current = r;
2644
+ const q = K(() => {
2645
+ var H;
2646
+ I(null), Y(!0), (H = B.current) == null || H.call(B);
2646
2647
  }, []);
2647
- return $ ? /* @__PURE__ */ n(Se, {}) : O ? /* @__PURE__ */ n(be, { message: O, onBack: E }) : !L || !N ? /* @__PURE__ */ n(
2648
+ return P ? /* @__PURE__ */ n(Se, {}) : S ? /* @__PURE__ */ n(be, { message: S, onBack: E }) : !z || !R ? /* @__PURE__ */ n(
2648
2649
  be,
2649
2650
  {
2650
2651
  message: "Not connected to messaging service",
2651
2652
  onBack: E
2652
2653
  }
2653
- ) : T ? /* @__PURE__ */ n(be, { message: T }) : P && !D ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : D ? /* @__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(
2654
+ ) : T ? /* @__PURE__ */ n(be, { message: T }) : F && !C ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : C ? /* @__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(
2654
2655
  un,
2655
2656
  {
2656
- channel: D,
2657
+ channel: C,
2657
2658
  renderMessageInputActions: t,
2658
2659
  renderConversationFooter: s,
2659
2660
  renderChannelBanner: _,
2660
- onLeaveConversation: B,
2661
- onBlockParticipant: B,
2661
+ onLeaveConversation: q,
2662
+ onBlockParticipant: q,
2662
2663
  CustomChannelEmptyState: l,
2663
- showDeleteConversation: Y,
2664
+ showDeleteConversation: Z,
2664
2665
  onBlockParticipantClick: d,
2665
2666
  onReportParticipantClick: m,
2666
2667
  dmAgentEnabled: g,
@@ -2670,11 +2671,12 @@ const ki = ({
2670
2671
  renderHeaderTitleBadges: b,
2671
2672
  customChannelActions: v,
2672
2673
  renderChannelActions: p,
2673
- renderMessage: x,
2674
- onMessageLinkClick: A,
2675
- showChannelInfo: M
2674
+ onParticipantNameClick: x,
2675
+ renderMessage: A,
2676
+ onMessageLinkClick: M,
2677
+ showChannelInfo: y
2676
2678
  },
2677
- D.id
2679
+ C.id
2678
2680
  ) }) }) : /* @__PURE__ */ n(Se, {});
2679
2681
  };
2680
2682
  function Qa(e) {
@@ -2683,14 +2685,14 @@ function Qa(e) {
2683
2685
  for (const s of t)
2684
2686
  e.state.addMessageSorted(s.message);
2685
2687
  }
2686
- const mn = U.createContext({
2688
+ const mn = j.createContext({
2687
2689
  selectedChannel: void 0,
2688
2690
  onChannelSelect: () => {
2689
2691
  },
2690
2692
  debug: !1,
2691
2693
  renderMessagePreview: void 0,
2692
2694
  viewerLanguage: void 0
2693
- }), er = mn.Provider, tr = () => U.useContext(mn), nr = (e, t) => {
2695
+ }), er = mn.Provider, tr = () => j.useContext(mn), nr = (e, t) => {
2694
2696
  const s = new Date(
2695
2697
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2696
2698
  ), r = new Date(
@@ -2711,9 +2713,9 @@ const mn = U.createContext({
2711
2713
  day: "numeric",
2712
2714
  year: "2-digit"
2713
2715
  });
2714
- }, hn = U.memo(
2716
+ }, hn = j.memo(
2715
2717
  ({ channel: e, unread: t }) => {
2716
- var L, $, O;
2718
+ var R, z, P;
2717
2719
  const {
2718
2720
  selectedChannel: s,
2719
2721
  onChannelSelect: a,
@@ -2722,39 +2724,39 @@ const mn = U.createContext({
2722
2724
  viewerLanguage: o
2723
2725
  } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2724
2726
  e && a(e);
2725
- }, m = (E) => {
2726
- const k = E.key === "Enter" || E.key === " ", R = E.repeat;
2727
- !k || R || (E.preventDefault(), d());
2728
- }, u = Object.values(((L = e == null ? void 0 : e.state) == null ? void 0 : L.members) || {}).find(
2729
- (E) => {
2730
- var k, R;
2731
- return ((k = E.user) == null ? void 0 : k.id) && E.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
2727
+ }, m = (S) => {
2728
+ const E = S.key === "Enter" || S.key === " ", L = S.repeat;
2729
+ !E || L || (S.preventDefault(), d());
2730
+ }, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
2731
+ (S) => {
2732
+ var E, L;
2733
+ return ((E = S.user) == null ? void 0 : E.id) && S.user.id !== ((L = e == null ? void 0 : e._client) == null ? void 0 : L.userID);
2732
2734
  }
2733
- ), f = Xt(u == null ? void 0 : u.user), c = ($ = u == null ? void 0 : u.user) == null ? void 0 : $.image, b = (() => {
2734
- var k;
2735
- const E = (k = e == null ? void 0 : e.state) == null ? void 0 : k.messages;
2736
- if (E != null && E.length) {
2737
- for (let R = E.length - 1; R >= 0; R--)
2738
- if (E[R].type !== "system") return E[R];
2735
+ ), f = Xt(u == null ? void 0 : u.user), c = (z = u == null ? void 0 : u.user) == null ? void 0 : z.image, b = (() => {
2736
+ var E;
2737
+ const S = (E = e == null ? void 0 : e.state) == null ? void 0 : E.messages;
2738
+ if (S != null && S.length) {
2739
+ for (let L = S.length - 1; L >= 0; L--)
2740
+ if (S[L].type !== "system") return S[L];
2739
2741
  }
2740
2742
  })(), v = (() => {
2741
- var T, S, P, F;
2742
- const E = Kt({
2743
+ var I, T, O, F;
2744
+ const S = Kt({
2743
2745
  message: b,
2744
2746
  viewerLanguage: o
2745
2747
  });
2746
- if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
2747
- if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
2748
- if (((P = b == null ? void 0 : b.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
2749
- if (E) return E;
2750
- const I = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
2751
- return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2752
- })(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", x = b ? Ee(b) : !1, A = i ? i(b, v) : `${x ? "✨ " : ""}${v}`, M = Wt(e), N = t ?? 0;
2748
+ if (((I = b == null ? void 0 : b.metadata) == null ? void 0 : I.custom_type) === "MESSAGE_TIP") return S ? `💵 ${S}` : "💵 Sent a tip";
2749
+ if (((T = b == null ? void 0 : b.metadata) == null ? void 0 : T.custom_type) === "MESSAGE_PAID") return S ? `💰 ${S}` : "💰 Sent a message";
2750
+ if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_ATTACHMENT") return S ? `📎 ${S}` : "📎 Sent an attachment";
2751
+ if (S) return S;
2752
+ const C = (F = b == null ? void 0 : b.attachments) == null ? void 0 : F[0];
2753
+ return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2754
+ })(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", x = b ? Ee(b) : !1, A = i ? i(b, v) : `${x ? "✨ " : ""}${v}`, M = Wt(e), y = t ?? 0;
2753
2755
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2754
2756
  channelId: e == null ? void 0 : e.id,
2755
2757
  isSelected: l,
2756
2758
  participantName: f,
2757
- unreadCount: N,
2759
+ unreadCount: y,
2758
2760
  hasTimestamp: !!p
2759
2761
  }), /* @__PURE__ */ n(
2760
2762
  "div",
@@ -2763,7 +2765,7 @@ const mn = U.createContext({
2763
2765
  tabIndex: 0,
2764
2766
  onClick: d,
2765
2767
  onKeyDown: m,
2766
- className: y(
2768
+ className: N(
2767
2769
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2768
2770
  {
2769
2771
  "bg-black/[0.04]": l,
@@ -2772,9 +2774,9 @@ const mn = U.createContext({
2772
2774
  ),
2773
2775
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2774
2776
  /* @__PURE__ */ n(
2775
- oe,
2777
+ ie,
2776
2778
  {
2777
- id: ((O = u == null ? void 0 : u.user) == null ? void 0 : O.id) || e.id || "unknown",
2779
+ id: ((P = u == null ? void 0 : u.user) == null ? void 0 : P.id) || e.id || "unknown",
2778
2780
  name: f,
2779
2781
  image: c,
2780
2782
  size: 48,
@@ -2786,7 +2788,7 @@ const mn = U.createContext({
2786
2788
  /* @__PURE__ */ h(
2787
2789
  "h3",
2788
2790
  {
2789
- className: y(
2791
+ className: N(
2790
2792
  "text-sm font-medium truncate text-[#191918]"
2791
2793
  ),
2792
2794
  children: [
@@ -2799,7 +2801,7 @@ const mn = U.createContext({
2799
2801
  ] }),
2800
2802
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2801
2803
  /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
2802
- N > 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: N > 99 ? "99+" : N })
2804
+ y > 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: y > 99 ? "99+" : y })
2803
2805
  ] })
2804
2806
  ] })
2805
2807
  ] })
@@ -2808,7 +2810,7 @@ const mn = U.createContext({
2808
2810
  }
2809
2811
  );
2810
2812
  hn.displayName = "CustomChannelPreview";
2811
- const ar = { last_message_at: -1 }, rr = U.memo(
2813
+ const ar = { last_message_at: -1 }, rr = j.memo(
2812
2814
  ({
2813
2815
  onChannelSelect: e,
2814
2816
  selectedChannel: t,
@@ -2821,9 +2823,9 @@ const ar = { last_message_at: -1 }, rr = U.memo(
2821
2823
  renderMessagePreview: d,
2822
2824
  viewerLanguage: m
2823
2825
  }) => {
2824
- const g = U.useRef(0);
2826
+ const g = j.useRef(0);
2825
2827
  g.current++;
2826
- const { debug: u = !1 } = Xe(), f = U.useCallback(
2828
+ const { debug: u = !1 } = Xe(), f = j.useCallback(
2827
2829
  (b) => {
2828
2830
  for (const _ of b)
2829
2831
  Qa(_);
@@ -2836,7 +2838,7 @@ const ar = { last_message_at: -1 }, rr = U.memo(
2836
2838
  selectedChannelId: t == null ? void 0 : t.id,
2837
2839
  filters: s
2838
2840
  });
2839
- const c = U.useMemo(
2841
+ const c = j.useMemo(
2840
2842
  () => ({
2841
2843
  selectedChannel: t,
2842
2844
  onChannelSelect: e,
@@ -2855,7 +2857,7 @@ const ar = { last_message_at: -1 }, rr = U.memo(
2855
2857
  return /* @__PURE__ */ n(
2856
2858
  "div",
2857
2859
  {
2858
- className: y(
2860
+ className: N(
2859
2861
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2860
2862
  o
2861
2863
  ),
@@ -2894,7 +2896,7 @@ const lr = {
2894
2896
  dark: "bg-white text-[#121110] hover:bg-white/90",
2895
2897
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2896
2898
  }, cr = ({ variant: e, cta: t }) => {
2897
- const s = y(
2899
+ const s = N(
2898
2900
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2899
2901
  lr[e]
2900
2902
  ), a = tt(t.href);
@@ -2941,10 +2943,10 @@ const lr = {
2941
2943
  }) => {
2942
2944
  const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2943
2945
  if (!g && !u && !c && !b) return null;
2944
- const v = y(
2946
+ const v = N(
2945
2947
  "truncate text-base font-medium leading-6",
2946
2948
  d && !t ? ur : dr[e]
2947
- ), p = y(
2949
+ ), p = N(
2948
2950
  "truncate text-xs leading-4",
2949
2951
  mr[e]
2950
2952
  );
@@ -2954,7 +2956,7 @@ const lr = {
2954
2956
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2955
2957
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2956
2958
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2957
- /* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
2959
+ /* @__PURE__ */ n("p", { className: N("min-w-0", v), children: m })
2958
2960
  ] }),
2959
2961
  u && /* @__PURE__ */ n("p", { className: p, children: a })
2960
2962
  ] }),
@@ -2964,7 +2966,7 @@ const lr = {
2964
2966
  ] }),
2965
2967
  o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
2966
2968
  ] });
2967
- }, hr = y(
2969
+ }, hr = N(
2968
2970
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2969
2971
  // 1px hairline border that sits flush with the card chrome — matches
2970
2972
  // the messaging design system's "small border around link attachments"
@@ -2982,7 +2984,7 @@ const lr = {
2982
2984
  bgClassName: l,
2983
2985
  "data-testid": d
2984
2986
  }) => {
2985
- const m = s != null || a != null, g = y(
2987
+ const m = s != null || a != null, g = N(
2986
2988
  hr,
2987
2989
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2988
2990
  // `focus-ring` is a design-system utility from the component-library
@@ -3013,7 +3015,7 @@ const lr = {
3013
3015
  onClick: a,
3014
3016
  "aria-label": r,
3015
3017
  "data-testid": d,
3016
- className: y(g, "text-left"),
3018
+ className: N(g, "text-left"),
3017
3019
  children: [
3018
3020
  t,
3019
3021
  u
@@ -3037,9 +3039,9 @@ const lr = {
3037
3039
  }, gr = {
3038
3040
  dark: "size-16 text-white/25",
3039
3041
  light: "size-16 text-black/25"
3040
- }, Re = (e, t) => !!t && !!e && ae(e) === "audio", fn = (e, t) => {
3042
+ }, Re = (e, t) => !!t && !!e && re(e) === "audio", fn = (e, t) => {
3041
3043
  if (!t || !e) return !1;
3042
- const s = ae(e);
3044
+ const s = re(e);
3043
3045
  return s === "video" || s === "audio";
3044
3046
  }, st = "bg-[#F2F3F4]", Te = ({
3045
3047
  variant: e,
@@ -3050,7 +3052,7 @@ const lr = {
3050
3052
  topLeft: i,
3051
3053
  topRight: o
3052
3054
  }) => {
3053
- const l = ae(r), d = !!s && l === "video";
3055
+ const l = re(r), d = !!s && l === "video";
3054
3056
  return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3055
3057
  "audio",
3056
3058
  {
@@ -3063,7 +3065,7 @@ const lr = {
3063
3065
  ) }) : /* @__PURE__ */ h(
3064
3066
  "div",
3065
3067
  {
3066
- className: y(
3068
+ className: N(
3067
3069
  "relative h-[180px] w-full overflow-hidden",
3068
3070
  d && "bg-black"
3069
3071
  ),
@@ -3090,11 +3092,11 @@ const lr = {
3090
3092
  ) : /* @__PURE__ */ n(
3091
3093
  "div",
3092
3094
  {
3093
- className: y(
3095
+ className: N(
3094
3096
  "flex h-full w-full items-center justify-center",
3095
3097
  fr[e]
3096
3098
  ),
3097
- children: ce(r, {
3099
+ children: le(r, {
3098
3100
  className: gr[e],
3099
3101
  weight: "regular"
3100
3102
  })
@@ -3323,7 +3325,7 @@ const lr = {
3323
3325
  {
3324
3326
  "data-testid": o,
3325
3327
  "data-group-position": a,
3326
- className: y(
3328
+ className: N(
3327
3329
  // 280px-wide bubble — matches the mobile chat attachment width
3328
3330
  // and keeps the document / image / audio bubbles visually
3329
3331
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3343,7 +3345,7 @@ const lr = {
3343
3345
  l ? /* @__PURE__ */ n(
3344
3346
  "p",
3345
3347
  {
3346
- className: y(
3348
+ className: N(
3347
3349
  // No `text-*` / `font-*` overrides here — caption inherits
3348
3350
  // the same font family + size as `.str-chat__message-text`
3349
3351
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3372,7 +3374,7 @@ const lr = {
3372
3374
  a.stopPropagation(), e();
3373
3375
  },
3374
3376
  "aria-label": s,
3375
- className: y(
3377
+ className: N(
3376
3378
  "flex size-6 items-center justify-center rounded-full text-white",
3377
3379
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3378
3380
  ),
@@ -3463,7 +3465,7 @@ function Rr(e, t) {
3463
3465
  }
3464
3466
  }
3465
3467
  if (!e) return;
3466
- if (ae(e) === "document") {
3468
+ if (re(e) === "document") {
3467
3469
  const r = Qt(e), i = Mr[r];
3468
3470
  if (i) return i;
3469
3471
  if (e === "application/octet-stream") return;
@@ -3476,7 +3478,7 @@ function Lr(e, t, s) {
3476
3478
  const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3477
3479
  return [a, r].filter(Boolean).join(" · ") || void 0;
3478
3480
  }
3479
- function te(e) {
3481
+ function ne(e) {
3480
3482
  try {
3481
3483
  const s = new URL(e).pathname.split("/").pop();
3482
3484
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3506,13 +3508,13 @@ const Dr = {
3506
3508
  const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3507
3509
  "div",
3508
3510
  {
3509
- className: y(
3511
+ className: N(
3510
3512
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3511
3513
  Or[e]
3512
3514
  ),
3513
3515
  "aria-hidden": !0,
3514
- children: ce(a, {
3515
- className: y("size-6", Pr[e]),
3516
+ children: le(a, {
3517
+ className: N("size-6", Pr[e]),
3516
3518
  weight: "regular"
3517
3519
  })
3518
3520
  }
@@ -3521,7 +3523,7 @@ const Dr = {
3521
3523
  m ? /* @__PURE__ */ n(
3522
3524
  "p",
3523
3525
  {
3524
- className: y(
3526
+ className: N(
3525
3527
  "truncate text-xs leading-4",
3526
3528
  Dr[e]
3527
3529
  ),
@@ -3534,7 +3536,7 @@ const Dr = {
3534
3536
  type: "button",
3535
3537
  onClick: i,
3536
3538
  "aria-label": o,
3537
- className: y(
3539
+ className: N(
3538
3540
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3539
3541
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3540
3542
  ),
@@ -3543,7 +3545,7 @@ const Dr = {
3543
3545
  u
3544
3546
  ]
3545
3547
  }
3546
- ) : /* @__PURE__ */ h(se, { children: [
3548
+ ) : /* @__PURE__ */ h(ae, { children: [
3547
3549
  g,
3548
3550
  u
3549
3551
  ] });
@@ -3553,7 +3555,7 @@ const Dr = {
3553
3555
  ] });
3554
3556
  };
3555
3557
  async function bn(e, t) {
3556
- const s = t ?? te(e);
3558
+ const s = t ?? ne(e);
3557
3559
  try {
3558
3560
  const a = await fetch(e, { mode: "cors" });
3559
3561
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3580,7 +3582,7 @@ const zr = ({
3580
3582
  onActivate: a,
3581
3583
  trailingAction: r
3582
3584
  }) => {
3583
- const i = t.filename ?? te(t.src);
3585
+ const i = t.filename ?? ne(t.src);
3584
3586
  return /* @__PURE__ */ n(
3585
3587
  gn,
3586
3588
  {
@@ -3618,7 +3620,7 @@ const zr = ({
3618
3620
  if ((m == null ? void 0 : m(v)) === !1) return;
3619
3621
  const p = c[v];
3620
3622
  if (!p) return;
3621
- const x = p.filename ?? te(p.src);
3623
+ const x = p.filename ?? ne(p.src);
3622
3624
  bn(p.src, x);
3623
3625
  };
3624
3626
  if (c.length === 0)
@@ -3626,7 +3628,7 @@ const zr = ({
3626
3628
  const _ = /* @__PURE__ */ n(
3627
3629
  "span",
3628
3630
  {
3629
- className: y(
3631
+ className: N(
3630
3632
  "flex size-8 items-center justify-center rounded-full",
3631
3633
  u === "dark" ? "text-white/70" : "text-black/70"
3632
3634
  ),
@@ -3663,7 +3665,7 @@ const zr = ({
3663
3665
  onNext: t,
3664
3666
  prevLabel: s = "Previous",
3665
3667
  nextLabel: a = "Next"
3666
- }) => /* @__PURE__ */ h(se, { children: [
3668
+ }) => /* @__PURE__ */ h(ae, { children: [
3667
3669
  /* @__PURE__ */ n(
3668
3670
  "button",
3669
3671
  {
@@ -3693,7 +3695,7 @@ const zr = ({
3693
3695
  tone: i = "dark",
3694
3696
  onTriggered: o
3695
3697
  }) => {
3696
- const [l, d] = z(!1), m = K(
3698
+ const [l, d] = $(!1), m = K(
3697
3699
  (c) => {
3698
3700
  c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3699
3701
  }).finally(() => {
@@ -3701,7 +3703,7 @@ const zr = ({
3701
3703
  }));
3702
3704
  },
3703
3705
  [l, e, t, o]
3704
- ), g = r ?? s !== "pill", f = { className: y(
3706
+ ), g = r ?? s !== "pill", f = { className: N(
3705
3707
  s === "pill" ? "size-4" : "size-5",
3706
3708
  "shrink-0"
3707
3709
  ), weight: "bold" };
@@ -3712,7 +3714,7 @@ const zr = ({
3712
3714
  onClick: m,
3713
3715
  disabled: l,
3714
3716
  "aria-label": a,
3715
- className: y(
3717
+ className: N(
3716
3718
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3717
3719
  {
3718
3720
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3752,7 +3754,7 @@ const zr = ({
3752
3754
  onClick: m,
3753
3755
  disabled: l,
3754
3756
  "aria-label": g ? a : void 0,
3755
- className: y(
3757
+ className: N(
3756
3758
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
3757
3759
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3758
3760
  ),
@@ -3774,7 +3776,7 @@ const zr = ({
3774
3776
  initialIndex: t,
3775
3777
  open: s
3776
3778
  }) => {
3777
- const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = z(a);
3779
+ const a = Fe(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3778
3780
  X(() => {
3779
3781
  s && i(Fe(t, 0, Math.max(e - 1, 0)));
3780
3782
  }, [s, t, e]), X(() => {
@@ -3803,7 +3805,7 @@ const zr = ({
3803
3805
  children: i,
3804
3806
  "data-testid": o
3805
3807
  }) => {
3806
- const l = H(null), d = H(null);
3808
+ const l = G(null), d = G(null);
3807
3809
  return X(() => {
3808
3810
  var f;
3809
3811
  const u = l.current;
@@ -3894,8 +3896,8 @@ const zr = ({
3894
3896
  length: t.length,
3895
3897
  initialIndex: s,
3896
3898
  open: e
3897
- }), l = t[r], d = ne(
3898
- () => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "image"),
3899
+ }), l = t[r], d = se(
3900
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "image"),
3899
3901
  [l]
3900
3902
  );
3901
3903
  return l ? /* @__PURE__ */ h(
@@ -3949,14 +3951,14 @@ const zr = ({
3949
3951
  const r = e.length;
3950
3952
  if (r === 0) return null;
3951
3953
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3952
- const u = y(Vr, "h-full w-full");
3954
+ const u = N(Vr, "h-full w-full");
3953
3955
  return t ? /* @__PURE__ */ h(
3954
3956
  "button",
3955
3957
  {
3956
3958
  type: "button",
3957
3959
  onClick: () => t(m),
3958
3960
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3959
- className: y(u, "cursor-zoom-in"),
3961
+ className: N(u, "cursor-zoom-in"),
3960
3962
  children: [
3961
3963
  d.content,
3962
3964
  g
@@ -3968,10 +3970,10 @@ const zr = ({
3968
3970
  g
3969
3971
  ] }, m);
3970
3972
  };
3971
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: y("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3973
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: N("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3972
3974
  "div",
3973
3975
  {
3974
- className: y(
3976
+ className: N(
3975
3977
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3976
3978
  a
3977
3979
  ),
@@ -3980,7 +3982,7 @@ const zr = ({
3980
3982
  ) : i.length === 3 ? /* @__PURE__ */ h(
3981
3983
  "div",
3982
3984
  {
3983
- className: y(
3985
+ className: N(
3984
3986
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3985
3987
  a
3986
3988
  ),
@@ -3993,7 +3995,7 @@ const zr = ({
3993
3995
  ) : /* @__PURE__ */ n(
3994
3996
  "div",
3995
3997
  {
3996
- className: y(
3998
+ className: N(
3997
3999
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3998
4000
  a
3999
4001
  ),
@@ -4011,7 +4013,7 @@ const zr = ({
4011
4013
  }
4012
4014
  );
4013
4015
  }, ye = (e) => {
4014
- const [t, s] = z(!1), [a, r] = z(0), i = K(
4016
+ const [t, s] = $(!1), [a, r] = $(0), i = K(
4015
4017
  (l) => {
4016
4018
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4017
4019
  },
@@ -4131,10 +4133,10 @@ const zr = ({
4131
4133
  length: t.length,
4132
4134
  initialIndex: s,
4133
4135
  open: e
4134
- }), l = t[r], d = ne(
4135
- () => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "document"),
4136
+ }), l = t[r], d = se(
4137
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "document"),
4136
4138
  [l]
4137
- ), m = ne(
4139
+ ), m = se(
4138
4140
  () => l ? Zr(l.src) : void 0,
4139
4141
  [l]
4140
4142
  );
@@ -4185,7 +4187,7 @@ const zr = ({
4185
4187
  onActivate: a,
4186
4188
  trailingAction: r
4187
4189
  }) => {
4188
- const i = t.filename ?? te(t.src);
4190
+ const i = t.filename ?? ne(t.src);
4189
4191
  return /* @__PURE__ */ n(
4190
4192
  gn,
4191
4193
  {
@@ -4218,7 +4220,7 @@ const zr = ({
4218
4220
  return null;
4219
4221
  const p = u.map((x) => ({
4220
4222
  src: x.src,
4221
- filename: x.filename ?? te(x.src)
4223
+ filename: x.filename ?? ne(x.src)
4222
4224
  }));
4223
4225
  return /* @__PURE__ */ h(
4224
4226
  we,
@@ -4229,7 +4231,7 @@ const zr = ({
4229
4231
  "data-testid": "pdf-attachment",
4230
4232
  children: [
4231
4233
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, A) => {
4232
- const M = x.filename ?? te(x.src), N = v && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4234
+ const M = x.filename ?? ne(x.src), y = v && A === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4233
4235
  pn,
4234
4236
  {
4235
4237
  url: x.src,
@@ -4246,7 +4248,7 @@ const zr = ({
4246
4248
  item: x,
4247
4249
  index: A,
4248
4250
  onActivate: b,
4249
- trailingAction: N
4251
+ trailingAction: y
4250
4252
  },
4251
4253
  `${x.src}-${A}`
4252
4254
  );
@@ -4277,8 +4279,8 @@ const zr = ({
4277
4279
  length: t.length,
4278
4280
  initialIndex: s,
4279
4281
  open: e
4280
- }), l = t[r], d = ne(
4281
- () => (l == null ? void 0 : l.filename) ?? (l ? te(l.src) : "video"),
4282
+ }), l = t[r], d = se(
4283
+ () => (l == null ? void 0 : l.filename) ?? (l ? ne(l.src) : "video"),
4282
4284
  [l]
4283
4285
  );
4284
4286
  return l ? /* @__PURE__ */ h(
@@ -4454,7 +4456,7 @@ const zr = ({
4454
4456
  onClick: t,
4455
4457
  disabled: s,
4456
4458
  style: { backgroundColor: "#E6E5E3" },
4457
- className: y(
4459
+ className: N(
4458
4460
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4459
4461
  {
4460
4462
  "hover:brightness-95 active:brightness-90": !s,
@@ -4476,7 +4478,7 @@ const zr = ({
4476
4478
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4477
4479
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4478
4480
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4479
- oe,
4481
+ ie,
4480
4482
  {
4481
4483
  id: o || "account",
4482
4484
  name: o || "Account",
@@ -4515,12 +4517,12 @@ export {
4515
4517
  Ei as L,
4516
4518
  yi as M,
4517
4519
  ge as a,
4518
- oe as b,
4520
+ ie as b,
4519
4521
  rr as c,
4520
4522
  un as d,
4521
4523
  Ci as e,
4522
4524
  hi as f,
4523
- ae as g,
4525
+ re as g,
4524
4526
  zt as h,
4525
4527
  Ii as i,
4526
4528
  Ca as j,
@@ -4531,7 +4533,7 @@ export {
4531
4533
  sr as o,
4532
4534
  Rr as p,
4533
4535
  Kt as q,
4534
- ce as r,
4536
+ le as r,
4535
4537
  sn as s,
4536
4538
  $s as t,
4537
4539
  Si as u,
@@ -4541,4 +4543,4 @@ export {
4541
4543
  Xt as y,
4542
4544
  va as z
4543
4545
  };
4544
- //# sourceMappingURL=index-BOsrtjME.js.map
4546
+ //# sourceMappingURL=index-DPGZRLRM.js.map