@linktr.ee/messaging-react 3.5.0-rc-1782793261 → 3.5.0-rc-1782802201

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 (33) hide show
  1. package/dist/{Card-49AvU29H.js → Card-B4Pl1YDS.js} +2 -2
  2. package/dist/{Card-49AvU29H.js.map → Card-B4Pl1YDS.js.map} +1 -1
  3. package/dist/{Card-Cse19FAO.cjs → Card-BN8zZir8.cjs} +2 -2
  4. package/dist/{Card-Cse19FAO.cjs.map → Card-BN8zZir8.cjs.map} +1 -1
  5. package/dist/{Card-q0zqEbga.js → Card-BP5tTT6R.js} +3 -3
  6. package/dist/{Card-q0zqEbga.js.map → Card-BP5tTT6R.js.map} +1 -1
  7. package/dist/{Card-DS8zNUkL.js → Card-BS-w4E4s.js} +2 -2
  8. package/dist/{Card-DS8zNUkL.js.map → Card-BS-w4E4s.js.map} +1 -1
  9. package/dist/{Card-DBIVUdM5.cjs → Card-Dc-vSe7n.cjs} +2 -2
  10. package/dist/{Card-DBIVUdM5.cjs.map → Card-Dc-vSe7n.cjs.map} +1 -1
  11. package/dist/{Card-DgPx-6aq.cjs → Card-UOf2uGf-.cjs} +2 -2
  12. package/dist/{Card-DgPx-6aq.cjs.map → Card-UOf2uGf-.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-BFgw9F0g.cjs → LockedThumbnail-CUC76ycd.cjs} +2 -2
  14. package/dist/{LockedThumbnail-BFgw9F0g.cjs.map → LockedThumbnail-CUC76ycd.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-CRBDhB49.js → LockedThumbnail-nUEb_HRw.js} +2 -2
  16. package/dist/{LockedThumbnail-CRBDhB49.js.map → LockedThumbnail-nUEb_HRw.js.map} +1 -1
  17. package/dist/{index-DxzkXLSW.js → index-CghCKfXq.js} +945 -930
  18. package/dist/{index-DxzkXLSW.js.map → index-CghCKfXq.js.map} +1 -1
  19. package/dist/index-DPP8cBmP.cjs +2 -0
  20. package/dist/{index-BcmwckcI.cjs.map → index-DPP8cBmP.cjs.map} +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +9 -2
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/ChannelList/ChannelList.stories.tsx +13 -9
  26. package/src/components/ChannelList/ChannelListContext.tsx +4 -0
  27. package/src/components/ChannelList/CustomChannelPreview.test.tsx +46 -1
  28. package/src/components/ChannelList/CustomChannelPreview.tsx +17 -2
  29. package/src/components/ChannelList/index.test.tsx +20 -3
  30. package/src/components/ChannelList/index.tsx +3 -1
  31. package/src/index.ts +1 -0
  32. package/src/types.ts +9 -2
  33. package/dist/index-BcmwckcI.cjs +0 -2
@@ -1,10 +1,10 @@
1
1
  import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import j, { createContext as We, useContext as _e, useCallback as J, useState as F, useRef as Y, useEffect as K, useId as In, useMemo as re, Suspense as Xe } from "react";
2
+ import V, { createContext as We, useContext as _e, useCallback as J, useState as $, useRef as Y, useEffect as K, useId as In, useMemo as re, Suspense as Xe } from "react";
3
3
  import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
5
5
  import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Ke, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as zn, MessageBouncePrompt as On, 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 Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as ye, 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 $e, AIStates as Fe, useTypingContext as rs, useAIState as is, Channel as ls, WithComponents as os, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
6
  import { StarIcon as Ge, DotsThreeIcon as hs, SpinnerGapIcon as Te, SignOutIcon as fs, ProhibitInsetIcon as Pt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as ps, VideoCameraIcon as qt, FileMdIcon as bs, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as _s, FileDocIcon as ys, FilePdfIcon as ks, CircleNotchIcon as we, PlayIcon as He, PauseIcon as Cs, LinkIcon as Es, DownloadSimpleIcon as Ne, GiftIcon as Is, ThumbsUpIcon as Ss, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Pe, ArrowUpIcon as Ms, SparkleIcon as be, ProhibitIcon as Rs, ArrowLeftIcon as zt, CaretRightIcon as ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
- import _ from "classnames";
7
+ import k from "classnames";
8
8
  import { MessageActions as Ps, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
9
9
  const Xt = We({
10
10
  service: null,
@@ -24,179 +24,179 @@ const Xt = We({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var D, k;
28
- const o = J(
29
- (C, ...S) => {
30
- i && console.log(`🔥 [MessagingProvider] ${C}`, ...S);
27
+ var M, y;
28
+ const l = J(
29
+ (I, ...C) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${I}`, ...C);
31
31
  },
32
32
  [i]
33
33
  );
34
- o("🔄 RENDER START", {
34
+ l("🔄 RENDER START", {
35
35
  userId: t == null ? void 0 : t.id,
36
36
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c, p] = F(!1), [N, w] = F(null), b = Y(!1), v = Y(null), M = Y(s);
41
- M.current = s;
40
+ const [o, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [N, w] = $(null), p = Y(!1), v = Y(null), A = Y(s);
41
+ A.current = s;
42
42
  const T = Y(i);
43
43
  T.current = i;
44
- const y = Y({
44
+ const E = Y({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
49
  }), O = Y(0);
50
- O.current++, o("📊 RENDER INFO", {
50
+ O.current++, l("📊 RENDER INFO", {
51
51
  renderCount: O.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: 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
54
+ userChanged: E.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: E.current.apiKey !== a,
56
+ serviceConfigChanged: E.current.serviceConfig !== s,
57
+ capabilitiesChanged: E.current.capabilities !== r
58
58
  }
59
- }), y.current = {
59
+ }), E.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 P = Y(null);
66
- a && ((D = P.current) == null ? void 0 : D.apiKey) !== a && (P.current = { apiKey: a, client: new Tn(a) });
67
- const L = a ? ((k = P.current) == null ? void 0 : k.client) ?? null : null;
65
+ const R = Y(null);
66
+ a && ((M = R.current) == null ? void 0 : M.apiKey) !== a && (R.current = { apiKey: a, client: new Tn(a) });
67
+ const L = a ? ((y = R.current) == null ? void 0 : y.client) ?? null : null;
68
68
  K(() => {
69
- const C = O.current, S = M.current;
70
- if (!a || !L || !S) {
71
- o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: C,
69
+ const I = O.current, C = A.current;
70
+ if (!a || !L || !C) {
71
+ l("⚠️ SERVICE INIT SKIPPED", {
72
+ renderCount: I,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
- o("🚀 CREATING SERVICE", {
78
- renderCount: C,
77
+ l("🚀 CREATING SERVICE", {
78
+ renderCount: I,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Sn({
82
- ...S,
81
+ const z = new Sn({
82
+ ...C,
83
83
  apiKey: a,
84
84
  debug: T.current,
85
85
  client: L
86
86
  });
87
- v.current = $, d($), o("✅ SERVICE SET", {
88
- renderCount: C,
89
- serviceInstance: !!$
87
+ v.current = z, d(z), l("✅ SERVICE SET", {
88
+ renderCount: I,
89
+ serviceInstance: !!z
90
90
  });
91
91
  }, [a, L]);
92
- const E = Y(null);
92
+ const B = Y(null);
93
93
  K(() => {
94
- var S, $;
95
- if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
- hasService: !!l,
94
+ var C, z;
95
+ if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
+ hasService: !!o,
97
97
  hasUser: !!t,
98
98
  userId: t == null ? void 0 : t.id,
99
- isConnecting: b.current,
100
- isConnected: u,
101
- dependencies: { service: !!l, userId: t == null ? void 0 : t.id }
102
- }), !l || !t) {
103
- o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
99
+ isConnecting: p.current,
100
+ isConnected: m,
101
+ dependencies: { service: !!o, userId: t == null ? void 0 : t.id }
102
+ }), !o || !t) {
103
+ l("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
104
104
  return;
105
105
  }
106
- if (b.current) {
107
- o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
106
+ if (p.current) {
107
+ l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((S = E.current) == null ? void 0 : S.serviceId) === l && (($ = E.current) == null ? void 0 : $.userId) === t.id) {
111
- o(
110
+ if (((C = B.current) == null ? void 0 : C.serviceId) === o && ((z = B.current) == null ? void 0 : z.userId) === t.id) {
111
+ l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
114
114
  );
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, p(!0), w(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), w(null);
119
119
  try {
120
- o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const z = await l.connectUser(t);
122
- g(z), f(!0), E.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
120
+ l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
+ const D = await o.connectUser(t);
122
+ g(D), f(!0), B.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: z.userID
124
+ clientId: D.userID
125
125
  });
126
- } catch (z) {
127
- const V = z instanceof Error ? z.message : "Connection failed";
128
- w(V), o("❌ USER CONNECTION ERROR", {
126
+ } catch (D) {
127
+ const j = D instanceof Error ? D.message : "Connection failed";
128
+ w(j), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: V
130
+ error: j
131
131
  });
132
132
  } finally {
133
- p(!1), b.current = !1, o("🔄 USER CONNECTION FINISHED", {
133
+ b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
- isConnected: u
135
+ isConnected: m
136
136
  });
137
137
  }
138
138
  })();
139
- }, [l, t, o, u]), K(() => {
140
- const C = L;
139
+ }, [o, t, l, m]), K(() => {
140
+ const I = L;
141
141
  return () => {
142
- var S;
143
- C && (E.current = null, (S = v.current) == null || S.disconnectUser().catch(console.error));
142
+ var C;
143
+ I && (B.current = null, (C = v.current) == null || C.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [L]);
146
- const R = J(async () => {
147
- if (o("🔄 REFRESH CONNECTION CALLED", {
148
- hasService: !!l,
146
+ const P = J(async () => {
147
+ if (l("🔄 REFRESH CONNECTION CALLED", {
148
+ hasService: !!o,
149
149
  hasUser: !!t
150
- }), !l || !t) {
151
- o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
150
+ }), !o || !t) {
151
+ l("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), p(!0);
154
+ l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
155
155
  try {
156
- o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
- const C = await l.connectUser(t);
158
- g(C), f(!0), w(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (C) {
160
- const S = C instanceof Error ? C.message : "Refresh failed";
161
- w(S), o("❌ CONNECTION REFRESH ERROR", {
156
+ l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
+ const I = await o.connectUser(t);
158
+ g(I), f(!0), w(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (I) {
160
+ const C = I instanceof Error ? I.message : "Refresh failed";
161
+ w(C), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: S
163
+ error: C
164
164
  });
165
165
  } finally {
166
- p(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), A = j.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
- hasService: !!l,
170
- hasClient: !!m,
171
- isConnected: u,
168
+ }, [o, t, l]), _ = V.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
+ hasService: !!o,
170
+ hasClient: !!u,
171
+ isConnected: m,
172
172
  isLoading: c,
173
173
  hasError: !!N,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
- service: l,
177
- client: m,
178
- isConnected: u,
176
+ service: o,
177
+ client: u,
178
+ isConnected: m,
179
179
  isLoading: c,
180
180
  error: N,
181
181
  capabilities: r,
182
- refreshConnection: R,
182
+ refreshConnection: P,
183
183
  debug: i
184
184
  }), [
185
- l,
186
- m,
185
+ o,
187
186
  u,
187
+ m,
188
188
  c,
189
189
  N,
190
190
  r,
191
- R,
191
+ P,
192
192
  i,
193
- o
193
+ l
194
194
  ]);
195
- return o("🔄 RENDER END", {
195
+ return l("🔄 RENDER END", {
196
196
  renderCount: O.current,
197
197
  willRenderChat: !!L,
198
- contextValueReady: !!A
199
- }), /* @__PURE__ */ n(Xt.Provider, { value: A, children: L ? /* @__PURE__ */ n(
198
+ contextValueReady: !!_
199
+ }), /* @__PURE__ */ n(Xt.Provider, { value: _, children: L ? /* @__PURE__ */ n(
200
200
  An,
201
201
  {
202
202
  client: L,
@@ -208,20 +208,20 @@ const Xt = We({
208
208
  ) : e });
209
209
  }, zs = () => Je(), Kt = (e) => {
210
210
  var a, r;
211
- const [t, s] = F(
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 K(() => {
215
- var o;
215
+ var l;
216
216
  if (!e) {
217
217
  s(!1);
218
218
  return;
219
219
  }
220
- s(!!((o = e.state.membership) != null && o.pinned_at));
221
- const i = (l) => {
220
+ s(!!((l = e.state.membership) != null && l.pinned_at));
221
+ const i = (o) => {
222
222
  var d;
223
223
  s(
224
- l != null && l.member ? !!l.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
224
+ o != null && o.member ? !!o.member.pinned_at : !!((d = e.state.membership) != null && d.pinned_at)
225
225
  );
226
226
  };
227
227
  return e.on("member.updated", i), () => {
@@ -286,9 +286,9 @@ const ne = ({
286
286
  className: a,
287
287
  starred: r = !1,
288
288
  shape: i = "squircle",
289
- dmAgentEnabled: o = !1
289
+ dmAgentEnabled: l = !1
290
290
  }) => {
291
- const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
291
+ const o = Bs(e), u = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, m = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: m, children: t ? /* @__PURE__ */ n(
292
292
  "img",
293
293
  {
294
294
  src: t,
@@ -299,17 +299,17 @@ const ne = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: _(
302
+ className: k(
303
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
304
- m
304
+ u
305
305
  ),
306
- children: l
306
+ children: o
307
307
  }
308
308
  ) });
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: _(
312
+ className: k(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -331,13 +331,13 @@ const ne = ({
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: _(
334
+ className: k(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
338
338
  style: {
339
- ...u,
340
- ...o && {
339
+ ...m,
340
+ ...l && {
341
341
  borderWidth: `${g}px`,
342
342
  borderStyle: "solid",
343
343
  borderColor: "var(--AI-Gradient, #7F22FE)",
@@ -357,84 +357,84 @@ const ne = ({
357
357
  enabled: a = !0,
358
358
  onLeaveConversation: r,
359
359
  onBlockParticipant: i,
360
- onDeleteConversationClick: o,
361
- onBlockParticipantClick: l,
360
+ onDeleteConversationClick: l,
361
+ onBlockParticipantClick: o,
362
362
  onReportParticipantClick: d,
363
- onActionComplete: m,
363
+ onActionComplete: u,
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
- var D;
367
- const { service: u, debug: f } = Je(), c = (D = t == null ? void 0 : t.user) == null ? void 0 : D.id, p = !!(a && s && u && c), [N, w] = F(!1), [b, v] = F(null), [M, T] = F(!1), [y, O] = F(!1), P = p && ((b == null ? void 0 : b.participantId) !== c || (b == null ? void 0 : b.service) !== u);
366
+ var M;
367
+ const { service: m, debug: f } = Je(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, b = !!(a && s && m && c), [N, w] = $(!1), [p, v] = $(null), [A, T] = $(!1), [E, O] = $(!1), R = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
368
368
  return K(() => {
369
- if (!p || !u || !c) {
369
+ if (!b || !m || !c) {
370
370
  w(!1), v(null);
371
371
  return;
372
372
  }
373
- let k = !1;
373
+ let y = !1;
374
374
  return (async () => {
375
375
  try {
376
- const C = await u.getBlockedUsers();
377
- if (k) return;
376
+ const I = await m.getBlockedUsers();
377
+ if (y) return;
378
378
  w(
379
- C.some(
380
- (S) => S.blocked_user_id === c
379
+ I.some(
380
+ (C) => C.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (C) {
384
- k || console.error(`[${g}] Failed to check blocked status:`, C);
383
+ } catch (I) {
384
+ y || console.error(`[${g}] Failed to check blocked status:`, I);
385
385
  } finally {
386
- k || v({ participantId: c, service: u });
386
+ y || v({ participantId: c, service: m });
387
387
  }
388
388
  })(), () => {
389
- k = !0;
389
+ y = !0;
390
390
  };
391
- }, [p, u, c, g]), {
391
+ }, [b, m, c, g]), {
392
392
  isParticipantBlocked: N,
393
- isCheckingBlockedStatus: P,
394
- isLeaving: M,
395
- isUpdatingBlockStatus: y,
393
+ isCheckingBlockedStatus: R,
394
+ isLeaving: A,
395
+ isUpdatingBlockStatus: E,
396
396
  handleLeaveConversation: async () => {
397
- var k;
398
- if (!M) {
399
- o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
397
+ var y;
398
+ if (!A) {
399
+ l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
400
400
  try {
401
- const C = ((k = e._client) == null ? void 0 : k.userID) ?? null;
402
- await e.hide(C, !1), r && await r(e), m == null || m();
403
- } catch (C) {
404
- console.error(`[${g}] Failed to leave conversation`, C);
401
+ const I = ((y = e._client) == null ? void 0 : y.userID) ?? null;
402
+ await e.hide(I, !1), r && await r(e), u == null || u();
403
+ } catch (I) {
404
+ console.error(`[${g}] Failed to leave conversation`, I);
405
405
  } finally {
406
406
  T(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var k, C, S;
412
- if (!(y || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), O(!0);
411
+ var y, I, C;
412
+ if (!(E || !m)) {
413
+ o == null || o(), f && console.log(`[${g}] Block member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
414
414
  try {
415
- await u.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
416
- } catch ($) {
417
- console.error(`[${g}] Failed to block member`, $);
415
+ await m.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
416
+ } catch (z) {
417
+ console.error(`[${g}] Failed to block member`, z);
418
418
  } finally {
419
419
  O(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var k, C, S;
425
- if (!(y || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (k = t == null ? void 0 : t.user) == null ? void 0 : k.id), O(!0);
424
+ var y, I, C;
425
+ if (!(E || !m)) {
426
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (y = t == null ? void 0 : t.user) == null ? void 0 : y.id), O(!0);
427
427
  try {
428
- await u.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((S = t == null ? void 0 : t.user) == null ? void 0 : S.id), m == null || m();
429
- } catch ($) {
430
- console.error(`[${g}] Failed to unblock member`, $);
428
+ await m.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), u == null || u();
429
+ } catch (z) {
430
+ console.error(`[${g}] Failed to unblock member`, z);
431
431
  } finally {
432
432
  O(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleReportUser: () => {
437
- d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
437
+ d == null || d(), u == null || u(), window.open(Us, "_blank", "noopener,noreferrer");
438
438
  }
439
439
  };
440
440
  }, pe = ({
@@ -446,7 +446,7 @@ const ne = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: _(
449
+ className: k(
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
@@ -461,21 +461,21 @@ const ne = ({
461
461
  showBlockParticipant: a = !0,
462
462
  showReportParticipant: r = !0,
463
463
  onLeaveConversation: i,
464
- onBlockParticipant: o,
465
- onDeleteConversationClick: l,
464
+ onBlockParticipant: l,
465
+ onDeleteConversationClick: o,
466
466
  onBlockParticipantClick: d,
467
- onReportParticipantClick: m,
467
+ onReportParticipantClick: u,
468
468
  customChannelActions: g,
469
- triggerClassName: u
469
+ triggerClassName: m
470
470
  }) => {
471
- const [f, c] = F(!1), p = Y(null), N = In(), w = J(() => c(!1), []), {
472
- isParticipantBlocked: b,
471
+ const [f, c] = $(!1), b = Y(null), N = In(), w = J(() => c(!1), []), {
472
+ isParticipantBlocked: p,
473
473
  isCheckingBlockedStatus: v,
474
- isLeaving: M,
474
+ isLeaving: A,
475
475
  isUpdatingBlockStatus: T,
476
- handleLeaveConversation: y,
476
+ handleLeaveConversation: E,
477
477
  handleBlockUser: O,
478
- handleUnblockUser: P,
478
+ handleUnblockUser: R,
479
479
  handleReportUser: L
480
480
  } = js({
481
481
  channel: e,
@@ -483,33 +483,33 @@ const ne = ({
483
483
  showBlockParticipant: a,
484
484
  enabled: f,
485
485
  onLeaveConversation: i,
486
- onBlockParticipant: o,
487
- onDeleteConversationClick: l,
486
+ onBlockParticipant: l,
487
+ onDeleteConversationClick: o,
488
488
  onBlockParticipantClick: d,
489
- onReportParticipantClick: m,
489
+ onReportParticipantClick: u,
490
490
  onActionComplete: w,
491
491
  logLabel: "ChannelActionsMenu"
492
492
  });
493
493
  return K(() => {
494
494
  if (!f) return;
495
- const R = (D) => {
496
- p.current && !p.current.contains(D.target) && c(!1);
497
- }, A = (D) => {
498
- D.key === "Escape" && c(!1);
495
+ const P = (M) => {
496
+ b.current && !b.current.contains(M.target) && c(!1);
497
+ }, _ = (M) => {
498
+ M.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", R), document.addEventListener("keydown", A), () => {
501
- document.removeEventListener("mousedown", R), document.removeEventListener("keydown", A);
500
+ return document.addEventListener("mousedown", P), document.addEventListener("keydown", _), () => {
501
+ document.removeEventListener("mousedown", P), document.removeEventListener("keydown", _);
502
502
  };
503
- }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: p, className: "relative", children: [
503
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
505
505
  "button",
506
506
  {
507
- className: u,
507
+ className: m,
508
508
  type: "button",
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
511
  "aria-controls": f ? N : void 0,
512
- onClick: () => c((R) => !R),
512
+ onClick: () => c((P) => !P),
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 ne = ({
521
521
  {
522
522
  id: N,
523
523
  "aria-label": "Conversation options",
524
- className: _(
524
+ className: k(
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,11 +529,11 @@ const ne = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  pe,
531
531
  {
532
- onClick: y,
533
- disabled: M,
534
- "aria-busy": M,
532
+ onClick: E,
533
+ disabled: A,
534
+ "aria-busy": A,
535
535
  children: [
536
- M ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
536
+ A ? /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
537
537
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
538
538
  ]
539
539
  }
@@ -545,10 +545,10 @@ const ne = ({
545
545
  /* @__PURE__ */ n(Te, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
- ) : b ? /* @__PURE__ */ h(
548
+ ) : p ? /* @__PURE__ */ h(
549
549
  pe,
550
550
  {
551
- onClick: P,
551
+ onClick: R,
552
552
  disabled: T,
553
553
  "aria-busy": T,
554
554
  children: [
@@ -619,7 +619,7 @@ function Zt({
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 = j.lazy(() => import("./Card-DS8zNUkL.js")), Ws = j.lazy(() => import("./Card-49AvU29H.js")), Xs = j.lazy(() => import("./Card-q0zqEbga.js")), Ze = () => /* @__PURE__ */ n(
622
+ const qs = V.lazy(() => import("./Card-BS-w4E4s.js")), Ws = V.lazy(() => import("./Card-B4Pl1YDS.js")), Xs = V.lazy(() => import("./Card-BP5tTT6R.js")), Ze = () => /* @__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)]",
@@ -665,7 +665,7 @@ function na(e) {
665
665
  return t !== "document" ? ea[t] : ta[tn(e)];
666
666
  }
667
667
  function ce(e, t) {
668
- return j.createElement(na(e), t);
668
+ return V.createElement(na(e), t);
669
669
  }
670
670
  const sa = (e) => {
671
671
  var t, s;
@@ -677,83 +677,83 @@ const sa = (e) => {
677
677
  autoPlay: a = !1,
678
678
  playing: r,
679
679
  loop: i = !1,
680
- controls: o = !0,
681
- showProgress: l = !1,
680
+ controls: l = !0,
681
+ showProgress: o = !1,
682
682
  muted: d = !1,
683
- onContainerClick: m
683
+ onContainerClick: u
684
684
  }) => {
685
- const g = ie(t), u = Y(null), f = Y(null), c = Y(null), p = Y(r), [N, w] = F(a), [b, v] = F(0), [M, T] = F(!1), [y, O] = F(!1), [P, L] = F(!1), [E, R] = F(!1), [A, D] = F(!0), [k, C] = F(null), S = J(() => {
685
+ const g = ie(t), m = Y(null), f = Y(null), c = Y(null), b = Y(r), [N, w] = $(a), [p, v] = $(0), [A, T] = $(!1), [E, O] = $(!1), [R, L] = $(!1), [B, P] = $(!1), [_, M] = $(!0), [y, I] = $(null), C = J(() => {
686
686
  L(!1), w(!0);
687
- }, []), $ = J((x) => {
688
- const I = f.current;
689
- if (!I) return 0;
690
- const U = I.getBoundingClientRect();
687
+ }, []), z = J((x) => {
688
+ const S = f.current;
689
+ if (!S) return 0;
690
+ const U = S.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
693
  Math.min(1, (sa(x) - U.left) / U.width)
694
694
  );
695
- }, []), z = J((x) => {
696
- const I = u.current;
697
- I && I.duration && (I.currentTime = x * I.duration);
698
- }, []), V = (x) => {
695
+ }, []), D = J((x) => {
696
+ const S = m.current;
697
+ S && S.duration && (S.currentTime = x * S.duration);
698
+ }, []), j = (x) => {
699
699
  x.stopPropagation(), T(!0);
700
- const I = $(x);
701
- v(I), z(I);
700
+ const S = z(x);
701
+ v(S), D(S);
702
702
  };
703
703
  K(() => {
704
- r !== void 0 && r !== p.current && (p.current = r, w(r));
704
+ r !== void 0 && r !== b.current && (b.current = r, w(r));
705
705
  }, [r]), K(() => {
706
706
  if (!N) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
710
  const x = () => {
711
- const I = u.current;
712
- I && I.duration && !M && v(I.currentTime / I.duration), c.current = requestAnimationFrame(x);
711
+ const S = m.current;
712
+ S && S.duration && !A && v(S.currentTime / S.duration), c.current = requestAnimationFrame(x);
713
713
  };
714
714
  return c.current = requestAnimationFrame(x), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [N, M]), K(() => {
718
- const x = u.current;
719
- x && (N ? x.play().catch((I) => {
717
+ }, [N, A]), K(() => {
718
+ const x = m.current;
719
+ x && (N ? x.play().catch((S) => {
720
720
  w(!1), L(!0);
721
721
  }) : x.pause());
722
722
  }, [N]), K(() => {
723
- if (!M) return;
724
- const x = (U) => v($(U)), I = (U) => {
725
- T(!1), z($(U));
723
+ if (!A) return;
724
+ const x = (U) => v(z(U)), S = (U) => {
725
+ T(!1), D(z(U));
726
726
  };
727
- return window.addEventListener("mousemove", x), window.addEventListener("mouseup", I), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", I), () => {
728
- window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", I);
727
+ return window.addEventListener("mousemove", x), window.addEventListener("mouseup", S), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", S), () => {
728
+ window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", S), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", S);
729
729
  };
730
- }, [M, $, z]);
731
- const ee = k ? { aspectRatio: String(k) } : void 0, Z = k ? "" : " aspect-video", G = Math.round(b * 100);
730
+ }, [A, z, D]);
731
+ const Z = y ? { aspectRatio: String(y) } : void 0, Q = y ? "" : " aspect-video", G = 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 ${Z}`,
738
- style: ee,
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
738
+ style: Z,
739
739
  onClick: (x) => {
740
- if (m) {
741
- m(x);
740
+ if (u) {
741
+ u(x);
742
742
  return;
743
743
  }
744
- P || o && w((I) => !I);
744
+ R || l && w((S) => !S);
745
745
  },
746
746
  onKeyDown: (x) => {
747
747
  if (!(x.key !== "Enter" && x.key !== " ")) {
748
- if (x.preventDefault(), m) {
749
- m(x);
748
+ if (x.preventDefault(), u) {
749
+ u(x);
750
750
  return;
751
751
  }
752
- P || o && w((I) => !I);
752
+ R || l && w((S) => !S);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || A) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || _) && /* @__PURE__ */ n(
757
757
  "img",
758
758
  {
759
759
  src: s,
@@ -761,23 +761,23 @@ const sa = (e) => {
761
761
  className: "absolute inset-0 h-full w-full object-cover"
762
762
  }
763
763
  ),
764
- !s && (g === "audio" || A) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || _) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
768
768
  /* @__PURE__ */ n("div", { className: "absolute inset-0", children: g === "audio" ? /* @__PURE__ */ n(
769
769
  "audio",
770
770
  {
771
- ref: u,
771
+ ref: m,
772
772
  src: e,
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => R(!0),
776
+ onLoadStart: () => P(!0),
777
777
  onCanPlay: () => {
778
- R(!1), D(!1);
778
+ P(!1), M(!1);
779
779
  },
780
- onWaiting: () => R(!0),
780
+ onWaiting: () => P(!0),
781
781
  onPlay: () => L(!1),
782
782
  onEnded: () => {
783
783
  i || (w(!1), v(0));
@@ -787,21 +787,21 @@ const sa = (e) => {
787
787
  ) : /* @__PURE__ */ n(
788
788
  "video",
789
789
  {
790
- ref: u,
790
+ ref: m,
791
791
  src: e,
792
792
  loop: i,
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => R(!0),
796
+ onLoadStart: () => P(!0),
797
797
  onCanPlay: () => {
798
- R(!1), D(!1);
798
+ P(!1), M(!1);
799
799
  },
800
- onWaiting: () => R(!0),
800
+ onWaiting: () => P(!0),
801
801
  onPlay: () => L(!1),
802
802
  onLoadedMetadata: () => {
803
- const x = u.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && C(x.videoWidth / x.videoHeight);
803
+ const x = m.current;
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && I(x.videoWidth / x.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
807
  i || (w(!1), v(0));
@@ -809,14 +809,14 @@ const sa = (e) => {
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- E && !P && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ B && !R && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
813
  we,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
817
817
  }
818
818
  ) }),
819
- P && !o && /* @__PURE__ */ n(
819
+ R && !l && /* @__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,15 +824,15 @@ const sa = (e) => {
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
826
  onClick: (x) => {
827
- x.stopPropagation(), S();
827
+ x.stopPropagation(), C();
828
828
  },
829
829
  onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), S());
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), C());
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(He, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
834
834
  ),
835
- l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
835
+ o && !l && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
836
836
  "div",
837
837
  {
838
838
  role: "slider",
@@ -843,11 +843,11 @@ const sa = (e) => {
843
843
  tabIndex: 0,
844
844
  ref: f,
845
845
  className: "relative flex h-4 w-full cursor-pointer items-center",
846
- onMouseDown: V,
847
- onTouchStart: V,
846
+ onMouseDown: j,
847
+ onTouchStart: j,
848
848
  onClick: (x) => x.stopPropagation(),
849
849
  onKeyDown: (x) => {
850
- x.key === "ArrowRight" && z(Math.min(1, b + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, b - 0.05));
850
+ x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
851
851
  },
852
852
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
853
853
  "div",
@@ -858,13 +858,13 @@ const sa = (e) => {
858
858
  ) })
859
859
  }
860
860
  ) }),
861
- o && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
861
+ l && /* @__PURE__ */ h("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
862
862
  /* @__PURE__ */ n(
863
863
  "button",
864
864
  {
865
865
  type: "button",
866
866
  onClick: (x) => {
867
- x.stopPropagation(), w((I) => !I);
867
+ x.stopPropagation(), w((S) => !S);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
870
  "aria-label": N ? "Pause" : "Play",
@@ -882,19 +882,19 @@ const sa = (e) => {
882
882
  tabIndex: 0,
883
883
  ref: f,
884
884
  className: "relative flex h-4 w-full cursor-pointer items-center",
885
- onMouseDown: V,
886
- onTouchStart: V,
885
+ onMouseDown: j,
886
+ onTouchStart: j,
887
887
  onClick: (x) => x.stopPropagation(),
888
888
  onMouseEnter: () => O(!0),
889
889
  onMouseLeave: () => O(!1),
890
890
  onKeyDown: (x) => {
891
- x.key === "ArrowRight" && z(Math.min(1, b + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, b - 0.05));
891
+ x.key === "ArrowRight" && D(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && D(Math.max(0, p - 0.05));
892
892
  },
893
893
  children: [
894
894
  /* @__PURE__ */ n(
895
895
  "div",
896
896
  {
897
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y || M ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${E || A ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
@@ -907,7 +907,7 @@ const sa = (e) => {
907
907
  /* @__PURE__ */ n(
908
908
  "div",
909
909
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${y || M ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${E || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
911
  style: { left: `${G}%` }
912
912
  }
913
913
  )
@@ -925,10 +925,10 @@ const sa = (e) => {
925
925
  title: a,
926
926
  variant: r,
927
927
  mediaPlayerProps: i,
928
- containedImage: o = !1
928
+ containedImage: l = !1
929
929
  }) => {
930
- const l = ie(e), [d, m] = F(!1);
931
- return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
930
+ const o = ie(e), [d, u] = $(!1);
931
+ return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
932
932
  aa,
933
933
  {
934
934
  source: t,
@@ -937,14 +937,14 @@ const sa = (e) => {
937
937
  controls: !0,
938
938
  ...i
939
939
  }
940
- ) : t && l === "image" ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
940
+ ) : t && o === "image" ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
941
941
  "img",
942
942
  {
943
943
  src: t,
944
944
  alt: a ?? "",
945
945
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
946
946
  draggable: !1,
947
- onLoad: () => m(!0)
947
+ onLoad: () => u(!0)
948
948
  }
949
949
  ) }) : /* @__PURE__ */ n(
950
950
  "img",
@@ -954,14 +954,14 @@ const sa = (e) => {
954
954
  className: "block w-full",
955
955
  draggable: !1
956
956
  }
957
- ) : t && l === "document" ? s ? o ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
957
+ ) : t && o === "document" ? s ? l ? /* @__PURE__ */ n("div", { className: "relative aspect-video overflow-hidden bg-black/5", children: /* @__PURE__ */ n(
958
958
  "img",
959
959
  {
960
960
  src: s,
961
961
  alt: a ?? "",
962
962
  className: `absolute inset-0 h-full w-full object-contain transition-opacity duration-300 ${d ? "opacity-100" : "opacity-0"}`,
963
963
  draggable: !1,
964
- onLoad: () => m(!0)
964
+ onLoad: () => u(!0)
965
965
  }
966
966
  ) }) : /* @__PURE__ */ n(
967
967
  "img",
@@ -1005,42 +1005,42 @@ const sa = (e) => {
1005
1005
  placeholderTitle: a = "Attachment title",
1006
1006
  mimeType: r,
1007
1007
  detail: i,
1008
- statusBadge: o,
1009
- action: l,
1008
+ statusBadge: l,
1009
+ action: o,
1010
1010
  topLeft: d,
1011
- topRight: m,
1011
+ topRight: u,
1012
1012
  rootRef: g,
1013
- "data-testid": u
1013
+ "data-testid": m
1014
1014
  }) => {
1015
- const f = e === "dark", c = f ? s ?? a : s ?? "", p = f && !s;
1015
+ const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
1016
1016
  return /* @__PURE__ */ h(
1017
1017
  "div",
1018
1018
  {
1019
1019
  ref: g,
1020
- "data-testid": u,
1021
- className: _(
1020
+ "data-testid": m,
1021
+ className: k(
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
  ),
1025
1025
  children: [
1026
1026
  d ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1027
- m ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
1027
+ u ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: u }) : null,
1028
1028
  t,
1029
1029
  /* @__PURE__ */ h("div", { className: "px-4 pb-3 pt-3", children: [
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: _("mb-0.5 truncate text-base font-medium", {
1033
+ className: k("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
- "text-white/30": f && p,
1036
- "text-white": f && !p
1035
+ "text-white/30": f && b,
1036
+ "text-white": f && !b
1037
1037
  }),
1038
1038
  children: c
1039
1039
  }
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
1042
  ce(r, {
1043
- className: _(
1043
+ className: k(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,16 +1049,16 @@ const sa = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: _(
1052
+ className: k(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
1056
1056
  children: i
1057
1057
  }
1058
1058
  ),
1059
- o
1059
+ l
1060
1060
  ] }),
1061
- l
1061
+ o
1062
1062
  ] })
1063
1063
  ]
1064
1064
  }
@@ -1086,7 +1086,7 @@ function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
1088
  const et = ({ 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(j.Fragment, { children: [
1089
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ h(V.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
1092
1092
  {
@@ -1107,7 +1107,7 @@ const et = ({ attachment: e, isMyMessage: t }) => {
1107
1107
  d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1108
1108
  ] })
1109
1109
  ] });
1110
- return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
1110
+ return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
1111
1111
  };
1112
1112
  function rn(e) {
1113
1113
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
@@ -1125,30 +1125,30 @@ async function ua(e, t) {
1125
1125
  }
1126
1126
  const a = await fetch(e, { mode: "cors" });
1127
1127
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
1128
- const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1129
- o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1128
+ const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1129
+ l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1130
1130
  }
1131
1131
  const ma = ({
1132
1132
  url: e,
1133
1133
  filename: t
1134
1134
  }) => {
1135
- const [s, a] = F(!1);
1135
+ const [s, a] = $(!1);
1136
1136
  return /* @__PURE__ */ n(
1137
1137
  "button",
1138
1138
  {
1139
1139
  type: "button",
1140
1140
  onClick: (i) => {
1141
1141
  i.stopPropagation();
1142
- const o = window.open("", "_blank", "noopener,noreferrer");
1142
+ const l = window.open("", "_blank", "noopener,noreferrer");
1143
1143
  a(!0), ua(e, t).then(() => {
1144
- o == null || o.close();
1144
+ l == null || l.close();
1145
1145
  }).catch(() => {
1146
- o && (o.location.href = e);
1146
+ l && (l.location.href = e);
1147
1147
  }).finally(() => a(!1));
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(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1151
+ children: s ? /* @__PURE__ */ n(we, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(V.Fragment, { children: [
1152
1152
  /* @__PURE__ */ n(Ne, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
@@ -1156,23 +1156,23 @@ const ma = ({
1156
1156
  );
1157
1157
  };
1158
1158
  function nt(e) {
1159
- var u, f, c, p;
1160
- const t = (u = e.attachments) == null ? void 0 : u.find(
1159
+ var m, f, c, b;
1160
+ const t = (m = e.attachments) == null ? void 0 : m.find(
1161
1161
  (N) => N.type === "video" && N.asset_url
1162
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
1163
  (N) => N.type === "image" && N.image_url
1164
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
1165
  (N) => N.type === "audio" && N.asset_url
1166
- ), r = (p = e.attachments) == null ? void 0 : p.find(
1166
+ ), r = (b = e.attachments) == null ? void 0 : b.find(
1167
1167
  (N) => N.type === "file" && N.asset_url
1168
- ), i = t ?? s ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
- if (!o) return null;
1170
- const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1168
+ ), i = t ?? s ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
+ if (!l) return null;
1170
+ const o = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, u = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
1171
1171
  return {
1172
- resolvedUrl: o,
1173
- resolvedType: l,
1172
+ resolvedUrl: l,
1173
+ resolvedType: o,
1174
1174
  title: d,
1175
- fileSize: m,
1175
+ fileSize: u,
1176
1176
  thumbnailUrl: g
1177
1177
  };
1178
1178
  }
@@ -1211,14 +1211,14 @@ const ln = ({
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = ie(t), o = a !== void 0 ? an(a) : void 0;
1214
+ const i = ie(t), l = a !== void 0 ? an(a) : void 0;
1215
1215
  return /* @__PURE__ */ n(
1216
1216
  sn,
1217
1217
  {
1218
1218
  variant: "light",
1219
1219
  title: s,
1220
1220
  mimeType: t,
1221
- detail: o,
1221
+ detail: l,
1222
1222
  thumbnail: /* @__PURE__ */ n(
1223
1223
  nn,
1224
1224
  {
@@ -1329,30 +1329,30 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1329
1329
  isMyMessage: s = !1,
1330
1330
  hasAttachment: a = !1
1331
1331
  }) => {
1332
- var u;
1332
+ var m;
1333
1333
  const r = dn(e), i = Me(e);
1334
1334
  if (!r && !i)
1335
1335
  return null;
1336
1336
  if (r) {
1337
- const f = (u = e.metadata) == null ? void 0 : u.amount_text;
1337
+ const f = (m = e.metadata) == null ? void 0 : m.amount_text;
1338
1338
  if (!f) return null;
1339
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", p = t ? `${f} tip` : `Delivered with ${f} tip`;
1339
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1340
1340
  return /* @__PURE__ */ h("div", { className: c, children: [
1341
1341
  /* @__PURE__ */ n(Is, { size: t ? 14 : 12 }),
1342
- /* @__PURE__ */ n("span", { children: p })
1342
+ /* @__PURE__ */ n("span", { children: b })
1343
1343
  ] });
1344
1344
  }
1345
- const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
1345
+ const l = s && a, o = l ? "Sent with AI" : "Sent by AI Assistant", d = [
1346
1346
  "message-chatbot-indicator",
1347
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
- o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
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: [
1351
- m,
1348
+ l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
+ ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: o }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: l ? 12 : 15 }) });
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(se, { children: [
1351
+ u,
1352
1352
  g
1353
1353
  ] }) : /* @__PURE__ */ h(se, { children: [
1354
1354
  g,
1355
- m
1355
+ u
1356
1356
  ] }) });
1357
1357
  }, ka = ({
1358
1358
  selected: e,
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: _("message-vote-button focus-ring", {
1366
+ className: k("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: _("message-vote-button focus-ring", {
1380
+ className: k("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1395,33 +1395,33 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1395
1395
  editing: a,
1396
1396
  endOfGroup: r,
1397
1397
  firstOfGroup: i,
1398
- groupedByUser: o,
1399
- handleAction: l,
1398
+ groupedByUser: l,
1399
+ handleAction: o,
1400
1400
  handleOpenThread: d,
1401
- handleRetry: m,
1401
+ handleRetry: u,
1402
1402
  highlighted: g,
1403
- isMessageAIGenerated: u,
1403
+ isMessageAIGenerated: m,
1404
1404
  isMyMessage: f,
1405
1405
  message: c,
1406
- renderText: p,
1406
+ renderText: b,
1407
1407
  threadList: N,
1408
1408
  viewerLanguage: w
1409
- } = e, { client: b } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: M, onUnlockClick: T, onFetchSource: y, onDownloadClick: O } = va("LockedAttachment"), [P, L] = F(!1), E = Ln(c.id), { selected: R, voteUp: A, voteDown: D } = Hs(c), {
1410
- Attachment: k = Dn,
1411
- EditMessageModal: C = Pn,
1412
- MessageActions: S,
1413
- MessageBlocked: $ = zn,
1414
- MessageBouncePrompt: z = On,
1415
- MessageDeleted: V = $n,
1416
- MessageIsThreadReplyInChannelButtonIndicator: ee = Fn,
1417
- MessageRepliesCountButton: Z = Bn,
1409
+ } = e, { client: p } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: T, onFetchSource: E, onDownloadClick: O } = va("LockedAttachment"), [R, L] = $(!1), B = Ln(c.id), { selected: P, voteUp: _, voteDown: M } = Hs(c), {
1410
+ Attachment: y = Dn,
1411
+ EditMessageModal: I = Pn,
1412
+ MessageActions: C,
1413
+ MessageBlocked: z = zn,
1414
+ MessageBouncePrompt: D = On,
1415
+ MessageDeleted: j = $n,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: Z = Fn,
1417
+ MessageRepliesCountButton: Q = Bn,
1418
1418
  ReminderNotification: G = Un,
1419
1419
  StreamedMessageText: x = jn,
1420
- PinIndicator: I
1420
+ PinIndicator: S
1421
1421
  } = Gt("CustomMessage"), U = Vn(c), H = Gn(c), q = re(
1422
- () => u == null ? void 0 : u(c),
1423
- [u, c]
1424
- ), B = re(() => {
1422
+ () => m == null ? void 0 : m(c),
1423
+ [m, c]
1424
+ ), F = re(() => {
1425
1425
  const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
1426
1426
  if (!Me(c)) return Se;
1427
1427
  const Mt = Se.filter((Rt) => !("type" in Rt) || !rn(Rt));
@@ -1433,13 +1433,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1433
1433
  if (Hn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
- return /* @__PURE__ */ n(V, { message: c });
1436
+ return /* @__PURE__ */ n(j, { message: c });
1437
1437
  if (Yn(c))
1438
- return /* @__PURE__ */ n($, {});
1438
+ return /* @__PURE__ */ n(z, {});
1439
1439
  const X = !N && !!c.reply_count, ue = !N && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, he = qn(c);
1440
- let Q;
1441
- me ? Q = () => m(c) : he && (Q = () => L(!0));
1442
- const te = f(), le = _(
1440
+ let ee;
1441
+ me ? ee = () => u(c) : he && (ee = () => L(!0));
1442
+ const te = f(), le = k(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
@@ -1454,22 +1454,22 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1454
1454
  "str-chat__message-with-thread-link": X || ue,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
- "str-chat__virtual-message__wrapper--group": o
1457
+ "str-chat__virtual-message__wrapper--group": l
1458
1458
  }
1459
- ), ht = c.poll_id && b.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(B != null && B.length && !c.quoted_message), pt = fe && te && Oe;
1459
+ ), ht = c.poll_id && p.polls.fromState(c.poll_id), ft = ya(c), fe = Me(c), gt = _a(c), Oe = !!(F != null && F.length && !c.quoted_message), pt = fe && te && Oe;
1460
1460
  return /* @__PURE__ */ h(se, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- C,
1462
+ I,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- P && /* @__PURE__ */ n(
1467
+ R && /* @__PURE__ */ n(
1468
1468
  Wn,
1469
1469
  {
1470
- MessageBouncePrompt: z,
1470
+ MessageBouncePrompt: D,
1471
1471
  onClose: () => L(!1),
1472
- open: P
1472
+ open: R
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
@@ -1479,8 +1479,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1479
1479
  "data-message-id": c.id,
1480
1480
  "data-dd-privacy": "mask",
1481
1481
  children: [
1482
- I && /* @__PURE__ */ n(I, {}),
1483
- !!E && /* @__PURE__ */ n(G, { reminder: E }),
1482
+ S && /* @__PURE__ */ n(S, {}),
1483
+ !!B && /* @__PURE__ */ n(G, { reminder: B }),
1484
1484
  c.user && /* @__PURE__ */ n(
1485
1485
  ne,
1486
1486
  {
@@ -1496,14 +1496,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1496
1496
  /* @__PURE__ */ n(
1497
1497
  "div",
1498
1498
  {
1499
- className: _("str-chat__message-inner", {
1499
+ className: k("str-chat__message-inner", {
1500
1500
  "str-chat__simple-message--error-failed": me || he
1501
1501
  }),
1502
1502
  "data-testid": "message-inner",
1503
- onClick: Q,
1504
- onKeyDown: Q,
1505
- role: Q ? "button" : void 0,
1506
- tabIndex: Q ? 0 : void 0,
1503
+ onClick: ee,
1504
+ onKeyDown: ee,
1505
+ role: ee ? "button" : void 0,
1506
+ tabIndex: ee ? 0 : void 0,
1507
1507
  style: {
1508
1508
  // Force margins to 0 to prevent hover layout shift
1509
1509
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
@@ -1512,7 +1512,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1512
1512
  },
1513
1513
  children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1514
1514
  te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1515
- S && /* @__PURE__ */ n(S, {}),
1515
+ C && /* @__PURE__ */ n(C, {}),
1516
1516
  /* @__PURE__ */ n(
1517
1517
  Bt.Sent,
1518
1518
  {
@@ -1523,7 +1523,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1523
1523
  detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1524
1524
  paymentStatus: (kt = c.metadata) == null ? void 0 : kt.payment_status,
1525
1525
  onPreviewClick: () => T == null ? void 0 : T(c, v),
1526
- onFetchSource: async () => await (y == null ? void 0 : y(c, v))
1526
+ onFetchSource: async () => await (E == null ? void 0 : E(c, v))
1527
1527
  }
1528
1528
  )
1529
1529
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1536,19 +1536,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1536
1536
  amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
1537
1537
  detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1538
1538
  paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1539
- isUnlocking: M(c.id),
1539
+ isUnlocking: A(c.id),
1540
1540
  onUnlockClick: () => T == null ? void 0 : T(c, v),
1541
- onFetchSource: async () => await (y == null ? void 0 : y(c, v)),
1541
+ onFetchSource: async () => await (E == null ? void 0 : E(c, v)),
1542
1542
  onDownloadClick: () => O == null ? void 0 : O(c, v)
1543
1543
  }
1544
1544
  ),
1545
- S && /* @__PURE__ */ n(S, {})
1545
+ C && /* @__PURE__ */ n(C, {})
1546
1546
  ] }),
1547
1547
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1548
1548
  Dt,
1549
1549
  {
1550
1550
  message: W,
1551
- renderText: p
1551
+ renderText: b
1552
1552
  }
1553
1553
  ) })
1554
1554
  ] }) : ft ? (
@@ -1564,24 +1564,24 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1564
1564
  }
1565
1565
  ),
1566
1566
  ht && /* @__PURE__ */ n(Xn, { poll: ht }),
1567
- B != null && B.length && !c.quoted_message ? /* @__PURE__ */ n(
1568
- k,
1567
+ F != null && F.length && !c.quoted_message ? /* @__PURE__ */ n(
1568
+ y,
1569
1569
  {
1570
- actionHandler: l,
1571
- attachments: B
1570
+ actionHandler: o,
1571
+ attachments: F
1572
1572
  }
1573
1573
  ) : null,
1574
1574
  q ? /* @__PURE__ */ n(
1575
1575
  x,
1576
1576
  {
1577
1577
  message: W,
1578
- renderText: p
1578
+ renderText: b
1579
1579
  }
1580
1580
  ) : /* @__PURE__ */ n(
1581
1581
  Dt,
1582
1582
  {
1583
1583
  message: W,
1584
- renderText: p
1584
+ renderText: b
1585
1585
  }
1586
1586
  ),
1587
1587
  /* @__PURE__ */ n(Kn, {})
@@ -1600,26 +1600,26 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1600
1600
  s && fe && /* @__PURE__ */ n(
1601
1601
  ka,
1602
1602
  {
1603
- selected: R,
1604
- onVoteUp: A,
1605
- onVoteDown: D
1603
+ selected: P,
1604
+ onVoteUp: _,
1605
+ onVoteDown: M
1606
1606
  }
1607
1607
  )
1608
1608
  ] }),
1609
1609
  X && /* @__PURE__ */ n(
1610
- Z,
1610
+ Q,
1611
1611
  {
1612
1612
  onClick: d,
1613
1613
  reply_count: c.reply_count
1614
1614
  }
1615
1615
  ),
1616
- ue && /* @__PURE__ */ n(ee, {})
1616
+ ue && /* @__PURE__ */ n(Z, {})
1617
1617
  ]
1618
1618
  },
1619
1619
  c.id
1620
1620
  )
1621
1621
  ] });
1622
- }, Ea = j.memo(
1622
+ }, Ea = V.memo(
1623
1623
  Ca,
1624
1624
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1625
1625
  ), Ia = (e) => {
@@ -1687,8 +1687,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1687
1687
  "button",
1688
1688
  {
1689
1689
  type: "button",
1690
- onClick: (o) => {
1691
- o.preventDefault(), t(s);
1690
+ onClick: (l) => {
1691
+ l.preventDefault(), t(s);
1692
1692
  },
1693
1693
  className: "absolute right-4 top-4 flex size-6 items-center justify-center rounded-full border border-white/40 bg-white/70 backdrop-blur-2xl focus-ring",
1694
1694
  "aria-label": "Close link preview",
@@ -1721,7 +1721,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1721
1721
  },
1722
1722
  r.og_scrape_url
1723
1723
  )) }) : null;
1724
- }, st = j.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
+ }, st = V.createContext(!1), Ci = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1725
1725
  "button",
1726
1726
  {
1727
1727
  ...s,
@@ -1779,8 +1779,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1779
1779
  disabledReason: a,
1780
1780
  composerInput: r
1781
1781
  }) => {
1782
- var l;
1783
- const { channel: i } = de(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
1782
+ var o;
1783
+ const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1784
1784
  return s ? /* @__PURE__ */ h(se, { children: [
1785
1785
  /* @__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 }),
1786
1786
  t == null ? void 0 : t()
@@ -1788,12 +1788,12 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1788
1788
  /* @__PURE__ */ h(
1789
1789
  "div",
1790
1790
  {
1791
- inert: o ? "" : void 0,
1792
- "aria-disabled": o || void 0,
1791
+ inert: l ? "" : void 0,
1792
+ "aria-disabled": l || void 0,
1793
1793
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1794
1794
  children: [
1795
1795
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1796
- /* @__PURE__ */ n(st.Provider, { value: o, children: /* @__PURE__ */ n(Qn, { Input: r ?? Pa }) })
1796
+ /* @__PURE__ */ n(st.Provider, { value: l, children: /* @__PURE__ */ n(Qn, { Input: r ?? Pa }) })
1797
1797
  ]
1798
1798
  }
1799
1799
  ),
@@ -1928,10 +1928,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1928
1928
  Fe.Generating,
1929
1929
  Fe.ExternalSources
1930
1930
  ]), qa = ({ threadList: e }) => {
1931
- var p, N;
1932
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = _e(un);
1933
- if (!e && l && Ya.has(o)) {
1934
- const w = Wa(t, (p = r.user) == null ? void 0 : p.id);
1931
+ var b, N;
1932
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = _e(un);
1933
+ if (!e && o && Ya.has(l)) {
1934
+ const w = Wa(t, (b = r.user) == null ? void 0 : b.id);
1935
1935
  return /* @__PURE__ */ n(
1936
1936
  Vt,
1937
1937
  {
@@ -1944,20 +1944,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1944
1944
  }
1945
1945
  if ((s == null ? void 0 : s.typing_events) === !1)
1946
1946
  return null;
1947
- const m = e ? [] : Object.values(i).filter(
1948
- ({ parent_id: w, user: b }) => {
1947
+ const u = e ? [] : Object.values(i).filter(
1948
+ ({ parent_id: w, user: p }) => {
1949
1949
  var v;
1950
- return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
1950
+ return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !w;
1951
1951
  }
1952
1952
  ), g = e ? Object.values(i).filter(
1953
- ({ parent_id: w, user: b }) => {
1953
+ ({ parent_id: w, user: p }) => {
1954
1954
  var v;
1955
- return (b == null ? void 0 : b.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
1955
+ return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && w === (a == null ? void 0 : a.id);
1956
1956
  }
1957
- ) : [], u = e ? g : m;
1958
- if (!u.length)
1957
+ ) : [], m = e ? g : u;
1958
+ if (!m.length)
1959
1959
  return null;
1960
- const f = (N = u[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1960
+ const f = (N = m[0]) == null ? void 0 : N.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1961
1961
  return /* @__PURE__ */ n(
1962
1962
  Vt,
1963
1963
  {
@@ -2023,7 +2023,7 @@ function Wa(e, t) {
2023
2023
  const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2024
2024
  "div",
2025
2025
  {
2026
- className: _("flex items-center justify-center h-full", e),
2026
+ className: k("flex items-center justify-center h-full", e),
2027
2027
  children: [
2028
2028
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2029
2029
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2063,7 +2063,7 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2063
2063
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2064
2064
  ]
2065
2065
  }
2066
- ), Re = 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: [
2066
+ ), Re = V.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2067
2067
  /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2068
2068
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2069
2069
  ] }) }));
@@ -2075,41 +2075,41 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2075
2075
  dmAgentEnabled: a = !1,
2076
2076
  onLeaveConversation: r,
2077
2077
  onBlockParticipant: i,
2078
- showDeleteConversation: o = !0,
2079
- showBlockParticipant: l = !0,
2078
+ showDeleteConversation: l = !0,
2079
+ showBlockParticipant: o = !0,
2080
2080
  showReportParticipant: d = !0,
2081
- onDeleteConversationClick: m,
2081
+ onDeleteConversationClick: u,
2082
2082
  onBlockParticipantClick: g,
2083
- onReportParticipantClick: u,
2083
+ onReportParticipantClick: m,
2084
2084
  customChannelActions: f,
2085
2085
  renderChannelActions: c,
2086
- showChannelInfo: p = !0,
2086
+ showChannelInfo: b = !0,
2087
2087
  onParticipantNameClick: N,
2088
2088
  renderHeaderTitleBadges: w
2089
2089
  }) => {
2090
- var A, D, k, C, S, $, z;
2091
- const { channel: b } = de(), v = j.useMemo(() => {
2092
- var Z, G;
2093
- const V = (Z = b._client) == null ? void 0 : Z.userID;
2094
- return V ? Object.values(((G = b.state) == null ? void 0 : G.members) || {}).find(
2090
+ var _, M, y, I, C, z, D;
2091
+ const { channel: p } = de(), v = V.useMemo(() => {
2092
+ var Q, G;
2093
+ const j = (Q = p._client) == null ? void 0 : Q.userID;
2094
+ return j ? Object.values(((G = p.state) == null ? void 0 : G.members) || {}).find(
2095
2095
  (x) => {
2096
- var I;
2097
- return ((I = x.user) == null ? void 0 : I.id) && x.user.id !== V;
2096
+ var S;
2097
+ return ((S = x.user) == null ? void 0 : S.id) && x.user.id !== j;
2098
2098
  }
2099
2099
  ) : void 0;
2100
- }, [(A = b._client) == null ? void 0 : A.userID, (D = b.state) == null ? void 0 : D.members]), M = Jt(v == null ? void 0 : v.user), T = (k = v == null ? void 0 : v.user) == null ? void 0 : k.image, y = Kt(b), O = w == null ? void 0 : w({
2101
- channel: b,
2100
+ }, [(_ = p._client) == null ? void 0 : _.userID, (M = p.state) == null ? void 0 : M.members]), A = Jt(v == null ? void 0 : v.user), T = (y = v == null ? void 0 : v.user) == null ? void 0 : y.image, E = Kt(p), O = w == null ? void 0 : w({
2101
+ channel: p,
2102
2102
  participant: v
2103
- }), P = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", E = /* @__PURE__ */ h(se, { children: [
2104
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: M }),
2103
+ }), R = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", L = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", B = /* @__PURE__ */ h(se, { children: [
2104
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2105
2105
  O && /* @__PURE__ */ n("span", { className: "shrink-0", children: O })
2106
- ] }), R = async () => {
2106
+ ] }), P = async () => {
2107
2107
  try {
2108
- y ? await b.unpin() : await b.pin();
2109
- } catch (V) {
2108
+ E ? await p.unpin() : await p.pin();
2109
+ } catch (j) {
2110
2110
  console.error(
2111
2111
  "[CustomChannelHeader] Failed to update pinned status:",
2112
- V
2112
+ j
2113
2113
  );
2114
2114
  }
2115
2115
  };
@@ -2118,7 +2118,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2118
2118
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2119
2119
  "button",
2120
2120
  {
2121
- className: _(
2121
+ className: k(
2122
2122
  oe,
2123
2123
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2124
2124
  ),
@@ -2139,25 +2139,25 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2139
2139
  {
2140
2140
  type: "button",
2141
2141
  onClick: N,
2142
- "aria-label": `View details for ${M}`,
2143
- className: _(
2144
- P,
2142
+ "aria-label": `View details for ${A}`,
2143
+ className: k(
2144
+ R,
2145
2145
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2146
2146
  ),
2147
2147
  children: [
2148
2148
  /* @__PURE__ */ n(
2149
2149
  ne,
2150
2150
  {
2151
- id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || b.id || "unknown",
2152
- name: M,
2151
+ id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || p.id || "unknown",
2152
+ name: A,
2153
2153
  image: T,
2154
- starred: s && y,
2154
+ starred: s && E,
2155
2155
  dmAgentEnabled: a,
2156
2156
  size: 48
2157
2157
  }
2158
2158
  ),
2159
2159
  /* @__PURE__ */ h("span", { className: "flex max-w-full items-center gap-0.5", children: [
2160
- E,
2160
+ B,
2161
2161
  /* @__PURE__ */ n(ve, { className: "size-3 shrink-0", weight: "bold" })
2162
2162
  ] }),
2163
2163
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
@@ -2166,20 +2166,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2166
2166
  ] })
2167
2167
  ]
2168
2168
  }
2169
- ) : /* @__PURE__ */ h("div", { className: P, children: [
2169
+ ) : /* @__PURE__ */ h("div", { className: R, children: [
2170
2170
  /* @__PURE__ */ n(
2171
2171
  ne,
2172
2172
  {
2173
- id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) || b.id || "unknown",
2174
- name: M,
2173
+ id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || p.id || "unknown",
2174
+ name: A,
2175
2175
  image: T,
2176
- starred: s && y,
2176
+ starred: s && E,
2177
2177
  dmAgentEnabled: a,
2178
2178
  size: 48
2179
2179
  }
2180
2180
  ),
2181
2181
  /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
2182
- E,
2182
+ B,
2183
2183
  /* @__PURE__ */ n(
2184
2184
  ve,
2185
2185
  {
@@ -2200,36 +2200,36 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2200
2200
  "button",
2201
2201
  {
2202
2202
  className: oe,
2203
- onClick: R,
2203
+ onClick: P,
2204
2204
  type: "button",
2205
- "aria-label": y ? "Unstar conversation" : "Star conversation",
2205
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
2206
2206
  children: /* @__PURE__ */ n(
2207
2207
  Ge,
2208
2208
  {
2209
- className: _("size-5", {
2210
- "text-yellow-600": y,
2211
- "text-black/90": !y
2209
+ className: k("size-5", {
2210
+ "text-yellow-600": E,
2211
+ "text-black/90": !E
2212
2212
  }),
2213
- weight: y ? "duotone" : "regular"
2213
+ weight: E ? "duotone" : "regular"
2214
2214
  }
2215
2215
  )
2216
2216
  }
2217
2217
  ),
2218
- p && (c !== void 0 ? c : /* @__PURE__ */ n(
2218
+ b && (c !== void 0 ? c : /* @__PURE__ */ n(
2219
2219
  Ft,
2220
2220
  {
2221
- channel: b,
2221
+ channel: p,
2222
2222
  participant: v,
2223
- showDeleteConversation: o,
2224
- showBlockParticipant: l,
2223
+ showDeleteConversation: l,
2224
+ showBlockParticipant: o,
2225
2225
  showReportParticipant: d,
2226
2226
  onLeaveConversation: r,
2227
2227
  onBlockParticipant: i,
2228
- onDeleteConversationClick: m,
2228
+ onDeleteConversationClick: u,
2229
2229
  onBlockParticipantClick: g,
2230
- onReportParticipantClick: u,
2230
+ onReportParticipantClick: m,
2231
2231
  customChannelActions: f,
2232
- triggerClassName: _(oe, "bg-[#F1F0EE]")
2232
+ triggerClassName: k(oe, "bg-[#F1F0EE]")
2233
2233
  }
2234
2234
  ))
2235
2235
  ] })
@@ -2239,7 +2239,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2239
2239
  t && e && /* @__PURE__ */ n(
2240
2240
  "button",
2241
2241
  {
2242
- className: _(
2242
+ className: k(
2243
2243
  oe,
2244
2244
  "messaging-channel-view-back-button-desktop"
2245
2245
  ),
@@ -2254,8 +2254,8 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2254
2254
  {
2255
2255
  type: "button",
2256
2256
  onClick: N,
2257
- "aria-label": `View details for ${M}`,
2258
- className: _(
2257
+ "aria-label": `View details for ${A}`,
2258
+ className: k(
2259
2259
  L,
2260
2260
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2261
2261
  ),
@@ -2263,17 +2263,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2263
2263
  /* @__PURE__ */ n(
2264
2264
  ne,
2265
2265
  {
2266
- id: (($ = v == null ? void 0 : v.user) == null ? void 0 : $.id) || b.id || "unknown",
2267
- name: M,
2266
+ id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || p.id || "unknown",
2267
+ name: A,
2268
2268
  image: T,
2269
- starred: s && y,
2269
+ starred: s && E,
2270
2270
  dmAgentEnabled: a,
2271
2271
  size: 48
2272
2272
  }
2273
2273
  ),
2274
2274
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2275
2275
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2276
- E,
2276
+ B,
2277
2277
  /* @__PURE__ */ n(ve, { className: "size-4 shrink-0", weight: "bold" })
2278
2278
  ] }),
2279
2279
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
@@ -2287,17 +2287,17 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2287
2287
  /* @__PURE__ */ n(
2288
2288
  ne,
2289
2289
  {
2290
- id: ((z = v == null ? void 0 : v.user) == null ? void 0 : z.id) || b.id || "unknown",
2291
- name: M,
2290
+ id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || p.id || "unknown",
2291
+ name: A,
2292
2292
  image: T,
2293
- starred: s && y,
2293
+ starred: s && E,
2294
2294
  dmAgentEnabled: a,
2295
2295
  size: 48
2296
2296
  }
2297
2297
  ),
2298
2298
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2299
2299
  /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2300
- E,
2300
+ B,
2301
2301
  /* @__PURE__ */ n(
2302
2302
  ve,
2303
2303
  {
@@ -2318,34 +2318,34 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2318
2318
  "button",
2319
2319
  {
2320
2320
  className: oe,
2321
- onClick: R,
2321
+ onClick: P,
2322
2322
  type: "button",
2323
- "aria-label": y ? "Unstar conversation" : "Star conversation",
2323
+ "aria-label": E ? "Unstar conversation" : "Star conversation",
2324
2324
  children: /* @__PURE__ */ n(
2325
2325
  Ge,
2326
2326
  {
2327
- className: _("size-6", {
2328
- "text-yellow-600": y,
2329
- "text-black/90": !y
2327
+ className: k("size-6", {
2328
+ "text-yellow-600": E,
2329
+ "text-black/90": !E
2330
2330
  }),
2331
- weight: y ? "duotone" : "regular"
2331
+ weight: E ? "duotone" : "regular"
2332
2332
  }
2333
2333
  )
2334
2334
  }
2335
2335
  ),
2336
- p && (c !== void 0 ? c : /* @__PURE__ */ n(
2336
+ b && (c !== void 0 ? c : /* @__PURE__ */ n(
2337
2337
  Ft,
2338
2338
  {
2339
- channel: b,
2339
+ channel: p,
2340
2340
  participant: v,
2341
- showDeleteConversation: o,
2342
- showBlockParticipant: l,
2341
+ showDeleteConversation: l,
2342
+ showBlockParticipant: o,
2343
2343
  showReportParticipant: d,
2344
2344
  onLeaveConversation: r,
2345
2345
  onBlockParticipant: i,
2346
- onDeleteConversationClick: m,
2346
+ onDeleteConversationClick: u,
2347
2347
  onBlockParticipantClick: g,
2348
- onReportParticipantClick: u,
2348
+ onReportParticipantClick: m,
2349
2349
  customChannelActions: f,
2350
2350
  triggerClassName: oe
2351
2351
  }
@@ -2360,64 +2360,64 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2360
2360
  renderMessageInputFooter: a,
2361
2361
  renderConversationFooter: r,
2362
2362
  onLeaveConversation: i,
2363
- onBlockParticipant: o,
2364
- showDeleteConversation: l = !0,
2363
+ onBlockParticipant: l,
2364
+ showDeleteConversation: o = !0,
2365
2365
  onDeleteConversationClick: d,
2366
- onBlockParticipantClick: m,
2366
+ onBlockParticipantClick: u,
2367
2367
  onReportParticipantClick: g,
2368
- showBlockParticipant: u = !0,
2368
+ showBlockParticipant: m = !0,
2369
2369
  showReportParticipant: f = !0,
2370
2370
  composerDisabled: c = !1,
2371
- composerDisabledReason: p,
2371
+ composerDisabledReason: b,
2372
2372
  showStarButton: N = !1,
2373
2373
  chatbotVotingEnabled: w = !1,
2374
- renderChannelBanner: b,
2374
+ renderChannelBanner: p,
2375
2375
  renderHeaderTitleBadges: v,
2376
- customChannelActions: M,
2376
+ customChannelActions: A,
2377
2377
  renderChannelActions: T,
2378
- renderMessage: y,
2378
+ renderMessage: E,
2379
2379
  dmAgentEnabled: O = !1,
2380
- viewerLanguage: P,
2380
+ viewerLanguage: R,
2381
2381
  showChannelInfo: L = !0,
2382
- onParticipantNameClick: E,
2383
- composerInput: R
2382
+ onParticipantNameClick: B,
2383
+ composerInput: P
2384
2384
  }) => {
2385
- var V, ee, Z, G, x, I;
2386
- const { channel: A } = de(), D = j.useMemo(() => {
2387
- var q, B;
2388
- const U = (q = A._client) == null ? void 0 : q.userID;
2389
- return U ? Object.values(((B = A.state) == null ? void 0 : B.members) || {}).find(
2385
+ var j, Z, Q, G, x, S;
2386
+ const { channel: _ } = de(), M = V.useMemo(() => {
2387
+ var q, F;
2388
+ const U = (q = _._client) == null ? void 0 : q.userID;
2389
+ return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find(
2390
2390
  (W) => {
2391
2391
  var X;
2392
2392
  return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
2393
2393
  }
2394
2394
  ) : void 0;
2395
- }, [(V = A._client) == null ? void 0 : V.userID, (ee = A.state) == null ? void 0 : ee.members]), k = j.useMemo(() => {
2396
- var q, B;
2397
- const U = (q = A._client) == null ? void 0 : q.userID;
2398
- return U ? Object.values(((B = A.state) == null ? void 0 : B.members) || {}).find((W) => {
2395
+ }, [(j = _._client) == null ? void 0 : j.userID, (Z = _.state) == null ? void 0 : Z.members]), y = V.useMemo(() => {
2396
+ var q, F;
2397
+ const U = (q = _._client) == null ? void 0 : q.userID;
2398
+ return U ? Object.values(((F = _.state) == null ? void 0 : F.members) || {}).find((W) => {
2399
2399
  var X;
2400
2400
  return ((X = W.user) == null ? void 0 : X.id) === U;
2401
2401
  }) : void 0;
2402
- }, [(Z = A._client) == null ? void 0 : Z.userID, (G = A.state) == null ? void 0 : G.members]), C = ((x = k == null ? void 0 : k.user) == null ? void 0 : x.is_account) ?? (k == null ? void 0 : k.is_account), S = ((I = D == null ? void 0 : D.user) == null ? void 0 : I.is_account) ?? (D == null ? void 0 : D.is_account), $ = O && C === !1 && S === !0, z = J(
2402
+ }, [(Q = _._client) == null ? void 0 : Q.userID, (G = _.state) == null ? void 0 : G.members]), I = ((x = y == null ? void 0 : y.user) == null ? void 0 : x.is_account) ?? (y == null ? void 0 : y.is_account), C = ((S = M == null ? void 0 : M.user) == null ? void 0 : S.is_account) ?? (M == null ? void 0 : M.is_account), z = O && I === !1 && C === !0, D = J(
2403
2403
  (U) => {
2404
2404
  const { message: H } = ye("ChannelView"), q = /* @__PURE__ */ n(
2405
2405
  Ia,
2406
2406
  {
2407
2407
  ...U,
2408
2408
  chatbotVotingEnabled: w,
2409
- viewerLanguage: P
2409
+ viewerLanguage: R
2410
2410
  }
2411
2411
  );
2412
- return !y || !H ? q : y(q, H);
2412
+ return !E || !H ? q : E(q, H);
2413
2413
  },
2414
- [w, y, P]
2414
+ [w, E, R]
2415
2415
  );
2416
2416
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2417
2417
  os,
2418
2418
  {
2419
2419
  overrides: {
2420
- Message: z,
2420
+ Message: D,
2421
2421
  MessageActions: Aa
2422
2422
  },
2423
2423
  children: /* @__PURE__ */ h(cs, { children: [
@@ -2428,22 +2428,22 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2428
2428
  showBackButton: t,
2429
2429
  showChannelInfo: L,
2430
2430
  showStarButton: N,
2431
- dmAgentEnabled: $,
2431
+ dmAgentEnabled: z,
2432
2432
  onLeaveConversation: i,
2433
- onBlockParticipant: o,
2434
- showDeleteConversation: l,
2435
- showBlockParticipant: u,
2433
+ onBlockParticipant: l,
2434
+ showDeleteConversation: o,
2435
+ showBlockParticipant: m,
2436
2436
  showReportParticipant: f,
2437
2437
  onDeleteConversationClick: d,
2438
- onBlockParticipantClick: m,
2438
+ onBlockParticipantClick: u,
2439
2439
  onReportParticipantClick: g,
2440
- customChannelActions: M,
2440
+ customChannelActions: A,
2441
2441
  renderChannelActions: T,
2442
- onParticipantNameClick: E,
2442
+ onParticipantNameClick: B,
2443
2443
  renderHeaderTitleBadges: v
2444
2444
  }
2445
2445
  ) }, "lt-channel-header"),
2446
- b ? /* @__PURE__ */ n(j.Fragment, { children: b() }, "lt-channel-banner") : null,
2446
+ p ? /* @__PURE__ */ n(V.Fragment, { children: p() }, "lt-channel-banner") : null,
2447
2447
  /* @__PURE__ */ n(
2448
2448
  "div",
2449
2449
  {
@@ -2452,24 +2452,24 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2452
2452
  },
2453
2453
  "lt-channel-message-list"
2454
2454
  ),
2455
- r ? /* @__PURE__ */ n(j.Fragment, { children: r(A) }, "lt-channel-conversation-footer") : null,
2455
+ r ? /* @__PURE__ */ n(V.Fragment, { children: r(_) }, "lt-channel-conversation-footer") : null,
2456
2456
  /* @__PURE__ */ n(
2457
2457
  za,
2458
2458
  {
2459
2459
  ...s && {
2460
- renderActions: () => s == null ? void 0 : s(A)
2460
+ renderActions: () => s == null ? void 0 : s(_)
2461
2461
  },
2462
- renderFooter: () => a == null ? void 0 : a(A),
2462
+ renderFooter: () => a == null ? void 0 : a(_),
2463
2463
  disabled: c,
2464
- disabledReason: p,
2465
- composerInput: R
2464
+ disabledReason: b,
2465
+ composerInput: P
2466
2466
  },
2467
2467
  "lt-channel-message-input"
2468
2468
  )
2469
2469
  ] })
2470
2470
  }
2471
2471
  ) });
2472
- }, mn = j.memo(
2472
+ }, mn = V.memo(
2473
2473
  ({
2474
2474
  channel: e,
2475
2475
  onBack: t,
@@ -2477,72 +2477,72 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2477
2477
  renderMessageInputActions: a,
2478
2478
  renderMessageInputFooter: r,
2479
2479
  renderConversationFooter: i,
2480
- onLeaveConversation: o,
2481
- onBlockParticipant: l,
2480
+ onLeaveConversation: l,
2481
+ onBlockParticipant: o,
2482
2482
  className: d,
2483
- CustomChannelEmptyState: m = Xa,
2483
+ CustomChannelEmptyState: u = Xa,
2484
2484
  showDeleteConversation: g = !0,
2485
- onDeleteConversationClick: u,
2485
+ onDeleteConversationClick: m,
2486
2486
  onBlockParticipantClick: f,
2487
2487
  onReportParticipantClick: c,
2488
- showBlockParticipant: p = !0,
2488
+ showBlockParticipant: b = !0,
2489
2489
  showReportParticipant: N = !0,
2490
2490
  composerDisabled: w = !1,
2491
- composerDisabledReason: b,
2491
+ composerDisabledReason: p,
2492
2492
  dmAgentEnabled: v,
2493
- messageMetadata: M,
2493
+ messageMetadata: A,
2494
2494
  onMessageSent: T,
2495
- showStarButton: y = !1,
2495
+ showStarButton: E = !1,
2496
2496
  chatbotVotingEnabled: O = !1,
2497
- renderChannelBanner: P,
2497
+ renderChannelBanner: R,
2498
2498
  renderHeaderTitleBadges: L,
2499
- customChannelActions: E,
2500
- renderChannelActions: R,
2501
- renderMessage: A,
2502
- onMessageLinkClick: D,
2503
- sendButton: k,
2504
- attachmentPreviewList: C,
2505
- viewerLanguage: S,
2506
- showChannelInfo: $ = !0,
2507
- onParticipantNameClick: z,
2508
- composerInput: V
2499
+ customChannelActions: B,
2500
+ renderChannelActions: P,
2501
+ renderMessage: _,
2502
+ onMessageLinkClick: M,
2503
+ sendButton: y,
2504
+ attachmentPreviewList: I,
2505
+ viewerLanguage: C,
2506
+ showChannelInfo: z = !0,
2507
+ onParticipantNameClick: D,
2508
+ composerInput: j
2509
2509
  }) => {
2510
- const ee = J(
2511
- async (G, x, I) => {
2510
+ const Z = J(
2511
+ async (G, x, S) => {
2512
2512
  var X;
2513
2513
  const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, H = v && !U, q = {
2514
2514
  ...x,
2515
2515
  ...H && { silent: !0 },
2516
- ...M && {
2516
+ ...A && {
2517
2517
  metadata: {
2518
2518
  ...x.metadata ?? {},
2519
- ...M
2519
+ ...A
2520
2520
  }
2521
2521
  }
2522
- }, B = {
2523
- ...I,
2522
+ }, F = {
2523
+ ...S,
2524
2524
  ...H && { skip_push: !0 }
2525
- }, W = await e.sendMessage(q, B);
2525
+ }, W = await e.sendMessage(q, F);
2526
2526
  return T == null || T(W), W;
2527
2527
  },
2528
- [e, v, M, T]
2529
- ), Z = Y(null);
2528
+ [e, v, A, T]
2529
+ ), Q = Y(null);
2530
2530
  return K(() => {
2531
- if (!D) return;
2532
- const G = Z.current;
2531
+ if (!M) return;
2532
+ const G = Q.current;
2533
2533
  if (!G) return;
2534
- const x = (I) => {
2535
- const U = I.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
2534
+ const x = (S) => {
2535
+ const U = S.target, H = U == null ? void 0 : U.closest("a[href]"), q = H == null ? void 0 : H.getAttribute("href");
2536
2536
  if (!q) return;
2537
- const B = H == null ? void 0 : H.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2538
- D(q, X);
2537
+ const F = H == null ? void 0 : H.closest("[data-message-id]"), W = F == null ? void 0 : F.getAttribute("data-message-id"), X = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
2538
+ M(q, X);
2539
2539
  };
2540
2540
  return G.addEventListener("click", x), () => G.removeEventListener("click", x);
2541
- }, [D, e]), /* @__PURE__ */ n(
2541
+ }, [M, e]), /* @__PURE__ */ n(
2542
2542
  "div",
2543
2543
  {
2544
- ref: Z,
2545
- className: _(
2544
+ ref: Q,
2545
+ className: k(
2546
2546
  "messaging-channel-view h-full flex flex-col",
2547
2547
  d
2548
2548
  ),
@@ -2551,13 +2551,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2551
2551
  {
2552
2552
  channel: e,
2553
2553
  MessageSystem: Ha,
2554
- EmptyStateIndicator: m,
2554
+ EmptyStateIndicator: u,
2555
2555
  LoadingIndicator: Re,
2556
2556
  DateSeparator: Vs,
2557
2557
  TypingIndicator: qa,
2558
- doSendMessageRequest: ee,
2559
- ...k ? { SendButton: k } : {},
2560
- ...C ? { AttachmentPreviewList: C } : {},
2558
+ doSendMessageRequest: Z,
2559
+ ...y ? { SendButton: y } : {},
2560
+ ...I ? { AttachmentPreviewList: I } : {},
2561
2561
  children: /* @__PURE__ */ n(
2562
2562
  Za,
2563
2563
  {
@@ -2566,29 +2566,29 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2566
2566
  renderMessageInputActions: a,
2567
2567
  renderMessageInputFooter: r,
2568
2568
  renderConversationFooter: i,
2569
- onLeaveConversation: o,
2570
- onBlockParticipant: l,
2571
- CustomChannelEmptyState: m,
2569
+ onLeaveConversation: l,
2570
+ onBlockParticipant: o,
2571
+ CustomChannelEmptyState: u,
2572
2572
  showDeleteConversation: g,
2573
- onDeleteConversationClick: u,
2573
+ onDeleteConversationClick: m,
2574
2574
  onBlockParticipantClick: f,
2575
2575
  onReportParticipantClick: c,
2576
- showBlockParticipant: p,
2576
+ showBlockParticipant: b,
2577
2577
  showReportParticipant: N,
2578
2578
  composerDisabled: w,
2579
- composerDisabledReason: b,
2580
- showStarButton: y,
2579
+ composerDisabledReason: p,
2580
+ showStarButton: E,
2581
2581
  dmAgentEnabled: v,
2582
2582
  chatbotVotingEnabled: O,
2583
- renderChannelBanner: P,
2583
+ renderChannelBanner: R,
2584
2584
  renderHeaderTitleBadges: L,
2585
- customChannelActions: E,
2586
- renderChannelActions: R,
2587
- renderMessage: A,
2588
- viewerLanguage: S,
2589
- showChannelInfo: $,
2590
- onParticipantNameClick: z,
2591
- composerInput: V
2585
+ customChannelActions: B,
2586
+ renderChannelActions: P,
2587
+ renderMessage: _,
2588
+ viewerLanguage: C,
2589
+ showChannelInfo: z,
2590
+ onParticipantNameClick: D,
2591
+ composerInput: j
2592
2592
  }
2593
2593
  )
2594
2594
  }
@@ -2598,7 +2598,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2598
2598
  }
2599
2599
  );
2600
2600
  mn.displayName = "ChannelView";
2601
- const xe = 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: [
2601
+ const xe = V.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: [
2602
2602
  /* @__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: "⚠️" }) }),
2603
2603
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2604
2604
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2620,86 +2620,86 @@ const Ei = ({
2620
2620
  onChannelSelect: a,
2621
2621
  onExitConversation: r,
2622
2622
  initialParticipantFilter: i,
2623
- initialParticipantData: o,
2624
- CustomChannelEmptyState: l,
2623
+ initialParticipantData: l,
2624
+ CustomChannelEmptyState: o,
2625
2625
  onBlockParticipantClick: d,
2626
- onReportParticipantClick: m,
2626
+ onReportParticipantClick: u,
2627
2627
  dmAgentEnabled: g,
2628
- onMessageSent: u,
2628
+ onMessageSent: m,
2629
2629
  chatbotVotingEnabled: f = !1,
2630
2630
  viewerLanguage: c,
2631
- renderHeaderTitleBadges: p,
2631
+ renderHeaderTitleBadges: b,
2632
2632
  renderChannelBanner: N,
2633
2633
  customChannelActions: w,
2634
- renderChannelActions: b,
2634
+ renderChannelActions: p,
2635
2635
  onParticipantNameClick: v,
2636
- renderMessage: M,
2636
+ renderMessage: A,
2637
2637
  onMessageLinkClick: T,
2638
- showChannelInfo: y,
2638
+ showChannelInfo: E,
2639
2639
  composerInput: O
2640
2640
  }) => {
2641
2641
  const {
2642
- client: P,
2642
+ client: R,
2643
2643
  isConnected: L,
2644
- isLoading: E,
2645
- error: R,
2646
- refreshConnection: A,
2647
- service: D,
2648
- debug: k
2649
- } = zs(), [C, S] = F(null), [$, z] = F(null), [V, ee] = F(!1), { showDeleteConversation: Z = !0 } = e, G = Y(o);
2650
- G.current = o;
2644
+ isLoading: B,
2645
+ error: P,
2646
+ refreshConnection: _,
2647
+ service: M,
2648
+ debug: y
2649
+ } = zs(), [I, C] = $(null), [z, D] = $(null), [j, Z] = $(!1), { showDeleteConversation: Q = !0 } = e, G = Y(l);
2650
+ G.current = l;
2651
2651
  const x = Y(a);
2652
2652
  x.current = a;
2653
- const I = Y(null), U = Y(null);
2653
+ const S = Y(null), U = Y(null);
2654
2654
  K(() => {
2655
- U.current = C;
2656
- }, [C]), K(() => {
2657
- if (!P || !L) return;
2658
- const B = P.userID;
2659
- if (!B) return;
2660
- const W = `${B}::${i}`;
2661
- if (I.current === W) return;
2662
- I.current = W;
2655
+ U.current = I;
2656
+ }, [I]), K(() => {
2657
+ if (!R || !L) return;
2658
+ const F = R.userID;
2659
+ if (!F) return;
2660
+ const W = `${F}::${i}`;
2661
+ if (S.current === W) return;
2662
+ S.current = W;
2663
2663
  const X = () => {
2664
- I.current === W && (I.current = null);
2664
+ S.current === W && (S.current = null);
2665
2665
  };
2666
2666
  (async () => {
2667
2667
  var me, he;
2668
2668
  try {
2669
- k && console.log(
2669
+ y && console.log(
2670
2670
  "[MessagingShell] Loading initial conversation with:",
2671
2671
  i
2672
2672
  );
2673
- const Q = await P.queryChannels(
2673
+ const ee = await R.queryChannels(
2674
2674
  {
2675
2675
  type: "messaging",
2676
- members: { $eq: [B, i] }
2676
+ members: { $eq: [F, i] }
2677
2677
  },
2678
2678
  {},
2679
2679
  { limit: 1 }
2680
2680
  );
2681
- if (Q.length > 0) {
2682
- S(Q[0]), z(null), (me = x.current) == null || me.call(x, Q[0]), k && console.log(
2681
+ if (ee.length > 0) {
2682
+ C(ee[0]), D(null), (me = x.current) == null || me.call(x, ee[0]), y && console.log(
2683
2683
  "[MessagingShell] Initial conversation loaded:",
2684
- Q[0].id
2684
+ ee[0].id
2685
2685
  );
2686
2686
  return;
2687
2687
  }
2688
2688
  const te = G.current;
2689
- if (!te || !D) {
2690
- X(), z("No conversation found with this account"), k && console.log(
2689
+ if (!te || !M) {
2690
+ X(), D("No conversation found with this account"), y && console.log(
2691
2691
  "[MessagingShell] No conversation found for:",
2692
2692
  i
2693
2693
  );
2694
2694
  return;
2695
2695
  }
2696
2696
  try {
2697
- const le = await D.startChannelWithParticipant({
2697
+ const le = await M.startChannelWithParticipant({
2698
2698
  id: te.id,
2699
2699
  name: te.name,
2700
2700
  phone: te.phone
2701
2701
  });
2702
- S(le), z(null), (he = x.current) == null || he.call(x, le), k && console.log(
2702
+ C(le), D(null), (he = x.current) == null || he.call(x, le), y && console.log(
2703
2703
  "[MessagingShell] Channel created and loaded:",
2704
2704
  le.id
2705
2705
  );
@@ -2707,55 +2707,55 @@ const Ei = ({
2707
2707
  console.error(
2708
2708
  "[MessagingShell] Failed to create conversation:",
2709
2709
  le
2710
- ), X(), z("Failed to create conversation");
2710
+ ), X(), D("Failed to create conversation");
2711
2711
  }
2712
- } catch (Q) {
2712
+ } catch (ee) {
2713
2713
  console.error(
2714
2714
  "[MessagingShell] Failed to load initial conversation:",
2715
- Q
2716
- ), X(), U.current || z("Failed to load conversation");
2715
+ ee
2716
+ ), X(), U.current || D("Failed to load conversation");
2717
2717
  }
2718
2718
  })();
2719
- }, [i, P, L, D, k]);
2719
+ }, [i, R, L, M, y]);
2720
2720
  const H = Y(r);
2721
2721
  H.current = r;
2722
2722
  const q = J(() => {
2723
- var B;
2724
- S(null), ee(!0), (B = H.current) == null || B.call(H);
2723
+ var F;
2724
+ C(null), Z(!0), (F = H.current) == null || F.call(H);
2725
2725
  }, []);
2726
- return E ? /* @__PURE__ */ n(Re, {}) : R ? /* @__PURE__ */ n(xe, { message: R, onBack: A }) : !L || !P ? /* @__PURE__ */ n(
2726
+ return B ? /* @__PURE__ */ n(Re, {}) : P ? /* @__PURE__ */ n(xe, { message: P, onBack: _ }) : !L || !R ? /* @__PURE__ */ n(
2727
2727
  xe,
2728
2728
  {
2729
2729
  message: "Not connected to messaging service",
2730
- onBack: A
2730
+ onBack: _
2731
2731
  }
2732
- ) : $ ? /* @__PURE__ */ n(xe, { message: $ }) : V && !C ? /* @__PURE__ */ n(xe, { 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(
2732
+ ) : z ? /* @__PURE__ */ n(xe, { message: z }) : j && !I ? /* @__PURE__ */ n(xe, { message: "Conversation ended" }) : I ? /* @__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(
2733
2733
  mn,
2734
2734
  {
2735
- channel: C,
2735
+ channel: I,
2736
2736
  renderMessageInputActions: t,
2737
2737
  renderConversationFooter: s,
2738
2738
  renderChannelBanner: N,
2739
2739
  onLeaveConversation: q,
2740
2740
  onBlockParticipant: q,
2741
- CustomChannelEmptyState: l,
2742
- showDeleteConversation: Z,
2741
+ CustomChannelEmptyState: o,
2742
+ showDeleteConversation: Q,
2743
2743
  onBlockParticipantClick: d,
2744
- onReportParticipantClick: m,
2744
+ onReportParticipantClick: u,
2745
2745
  dmAgentEnabled: g,
2746
- onMessageSent: u,
2746
+ onMessageSent: m,
2747
2747
  chatbotVotingEnabled: f,
2748
2748
  viewerLanguage: c,
2749
- renderHeaderTitleBadges: p,
2749
+ renderHeaderTitleBadges: b,
2750
2750
  customChannelActions: w,
2751
- renderChannelActions: b,
2751
+ renderChannelActions: p,
2752
2752
  onParticipantNameClick: v,
2753
- renderMessage: M,
2753
+ renderMessage: A,
2754
2754
  onMessageLinkClick: T,
2755
- showChannelInfo: y,
2755
+ showChannelInfo: E,
2756
2756
  composerInput: O
2757
2757
  },
2758
- C.id
2758
+ I.id
2759
2759
  ) }) }) : /* @__PURE__ */ n(Re, {});
2760
2760
  };
2761
2761
  function Qa(e) {
@@ -2764,14 +2764,15 @@ function Qa(e) {
2764
2764
  for (const s of t)
2765
2765
  e.state.addMessageSorted(s.message);
2766
2766
  }
2767
- const hn = j.createContext({
2767
+ const hn = V.createContext({
2768
2768
  selectedChannel: void 0,
2769
2769
  onChannelSelect: () => {
2770
2770
  },
2771
2771
  debug: !1,
2772
2772
  renderMessagePreview: void 0,
2773
+ channelPreview: void 0,
2773
2774
  viewerLanguage: void 0
2774
- }), er = hn.Provider, tr = () => j.useContext(hn), nr = (e, t) => {
2775
+ }), er = hn.Provider, tr = () => V.useContext(hn), nr = (e, t) => {
2775
2776
  const s = new Date(
2776
2777
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2777
2778
  ), r = new Date(
@@ -2792,64 +2793,76 @@ const hn = j.createContext({
2792
2793
  day: "numeric",
2793
2794
  year: "2-digit"
2794
2795
  });
2795
- }, fn = j.memo(
2796
- ({ channel: e, unread: t }) => {
2797
- var O, P, L;
2798
- const {
2799
- selectedChannel: s,
2800
- onChannelSelect: a,
2801
- debug: r,
2802
- renderMessagePreview: i,
2803
- viewerLanguage: o
2804
- } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2805
- e && a(e);
2806
- }, m = (E) => {
2807
- const R = E.key === "Enter" || E.key === " ", A = E.repeat;
2808
- !R || A || (E.preventDefault(), d());
2809
- }, u = Object.values(((O = e == null ? void 0 : e.state) == null ? void 0 : O.members) || {}).find(
2810
- (E) => {
2811
- var R, A;
2812
- return ((R = E.user) == null ? void 0 : R.id) && E.user.id !== ((A = e == null ? void 0 : e._client) == null ? void 0 : A.userID);
2796
+ }, fn = V.memo(
2797
+ (e) => {
2798
+ var L, B, P;
2799
+ const { channel: t, unread: s } = e, {
2800
+ selectedChannel: a,
2801
+ onChannelSelect: r,
2802
+ debug: i,
2803
+ channelPreview: l,
2804
+ renderMessagePreview: o,
2805
+ viewerLanguage: d
2806
+ } = tr(), u = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), g = Kt(t);
2807
+ if (l)
2808
+ return /* @__PURE__ */ n(
2809
+ l,
2810
+ {
2811
+ ...e,
2812
+ isSelected: u,
2813
+ selectedChannel: a,
2814
+ onChannelSelect: r
2815
+ }
2816
+ );
2817
+ const m = () => {
2818
+ t && r(t);
2819
+ }, f = (_) => {
2820
+ const M = _.key === "Enter" || _.key === " ", y = _.repeat;
2821
+ !M || y || (_.preventDefault(), m());
2822
+ }, b = Object.values(((L = t == null ? void 0 : t.state) == null ? void 0 : L.members) || {}).find(
2823
+ (_) => {
2824
+ var M, y;
2825
+ return ((M = _.user) == null ? void 0 : M.id) && _.user.id !== ((y = t == null ? void 0 : t._client) == null ? void 0 : y.userID);
2813
2826
  }
2814
- ), f = Jt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, p = (() => {
2815
- var R;
2816
- const E = (R = e == null ? void 0 : e.state) == null ? void 0 : R.messages;
2817
- if (E != null && E.length) {
2818
- for (let A = E.length - 1; A >= 0; A--)
2819
- if (E[A].type !== "system") return E[A];
2827
+ ), N = Jt(b == null ? void 0 : b.user), w = (B = b == null ? void 0 : b.user) == null ? void 0 : B.image, p = (() => {
2828
+ var M;
2829
+ const _ = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
2830
+ if (_ != null && _.length) {
2831
+ for (let y = _.length - 1; y >= 0; y--)
2832
+ if (_[y].type !== "system") return _[y];
2820
2833
  }
2821
- })(), w = (() => {
2822
- var C, S, $, z;
2823
- const E = Zt({
2834
+ })(), A = (() => {
2835
+ var z, D, j, Z;
2836
+ const _ = Zt({
2824
2837
  message: p,
2825
- viewerLanguage: o
2838
+ viewerLanguage: d
2826
2839
  });
2827
- if (((C = p == null ? void 0 : p.metadata) == null ? void 0 : C.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
2828
- if (((S = p == null ? void 0 : p.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
2829
- if ((($ = p == null ? void 0 : p.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_ATTACHMENT")
2830
- return E ? `📎 ${E}` : "📎 Sent an attachment";
2831
- if (E) return E;
2832
- const k = (z = p == null ? void 0 : p.attachments) == null ? void 0 : z[0];
2833
- return k ? k.og_scrape_url ? k.og_scrape_url : k.type === "image" ? "📷 Sent an image" : k.type === "video" ? "🎥 Sent a video" : k.type === "audio" ? "🎵 Sent audio" : k.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2834
- })(), b = p != null && p.created_at ? sr(new Date(p.created_at)) : "", v = p ? Me(p) : !1, M = i ? i(p, w) : `${v ? "✨ " : ""}${w}`, T = Kt(e), y = t ?? 0;
2835
- return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2836
- channelId: e == null ? void 0 : e.id,
2837
- isSelected: l,
2838
- participantName: f,
2839
- unreadCount: y,
2840
- hasTimestamp: !!b
2840
+ if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return _ ? `💵 ${_}` : "💵 Sent a tip";
2841
+ if (((D = p == null ? void 0 : p.metadata) == null ? void 0 : D.custom_type) === "MESSAGE_PAID") return _ ? `💰 ${_}` : "💰 Sent a message";
2842
+ if (((j = p == null ? void 0 : p.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
2843
+ return _ ? `📎 ${_}` : "📎 Sent an attachment";
2844
+ if (_) return _;
2845
+ const C = (Z = p == null ? void 0 : p.attachments) == null ? void 0 : Z[0];
2846
+ 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";
2847
+ })(), T = p != null && p.created_at ? sr(new Date(p.created_at)) : "", E = p ? Me(p) : !1, O = o ? o(p, A) : `${E ? "✨ " : ""}${A}`, R = s ?? 0;
2848
+ return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2849
+ channelId: t == null ? void 0 : t.id,
2850
+ isSelected: u,
2851
+ participantName: N,
2852
+ unreadCount: R,
2853
+ hasTimestamp: !!T
2841
2854
  }), /* @__PURE__ */ n(
2842
2855
  "div",
2843
2856
  {
2844
2857
  role: "button",
2845
2858
  tabIndex: 0,
2846
- onClick: d,
2847
- onKeyDown: m,
2848
- className: _(
2859
+ onClick: m,
2860
+ onKeyDown: f,
2861
+ className: k(
2849
2862
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2850
2863
  {
2851
- "bg-black/[0.04]": l,
2852
- "hover:bg-black/[0.02]": !l
2864
+ "bg-black/[0.04]": u,
2865
+ "hover:bg-black/[0.02]": !u
2853
2866
  }
2854
2867
  ),
2855
2868
  "data-dd-privacy": "mask",
@@ -2857,11 +2870,11 @@ const hn = j.createContext({
2857
2870
  /* @__PURE__ */ n(
2858
2871
  ne,
2859
2872
  {
2860
- id: ((L = u == null ? void 0 : u.user) == null ? void 0 : L.id) || e.id || "unknown",
2861
- name: f,
2862
- image: c,
2873
+ id: ((P = b == null ? void 0 : b.user) == null ? void 0 : P.id) || t.id || "unknown",
2874
+ name: N,
2875
+ image: w,
2863
2876
  size: 48,
2864
- starred: T
2877
+ starred: g
2865
2878
  }
2866
2879
  ),
2867
2880
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2869,20 +2882,20 @@ const hn = j.createContext({
2869
2882
  /* @__PURE__ */ h(
2870
2883
  "h3",
2871
2884
  {
2872
- className: _(
2885
+ className: k(
2873
2886
  "text-sm font-medium truncate text-[#191918]"
2874
2887
  ),
2875
2888
  children: [
2876
- T && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2877
- f
2889
+ g && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2890
+ N
2878
2891
  ]
2879
2892
  }
2880
2893
  ),
2881
- b && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: b })
2894
+ T && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: T })
2882
2895
  ] }),
2883
2896
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2884
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
2885
- 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 })
2897
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: O }),
2898
+ R > 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: R > 99 ? "99+" : R })
2886
2899
  ] })
2887
2900
  ] })
2888
2901
  ] })
@@ -2891,7 +2904,7 @@ const hn = j.createContext({
2891
2904
  }
2892
2905
  );
2893
2906
  fn.displayName = "CustomChannelPreview";
2894
- const ar = { last_message_at: -1 }, rr = j.memo(
2907
+ const ar = { last_message_at: -1 }, rr = V.memo(
2895
2908
  ({
2896
2909
  onChannelSelect: e,
2897
2910
  selectedChannel: t,
@@ -2899,15 +2912,15 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2899
2912
  allowNewMessagesFromUnfilteredChannels: a = !1,
2900
2913
  channelRenderFilterFn: r,
2901
2914
  sort: i = ar,
2902
- className: o,
2903
- customEmptyStateIndicator: l,
2915
+ className: l,
2916
+ customEmptyStateIndicator: o,
2904
2917
  channelPreview: d,
2905
- renderMessagePreview: m,
2918
+ renderMessagePreview: u,
2906
2919
  viewerLanguage: g
2907
2920
  }) => {
2908
- const u = j.useRef(0);
2909
- u.current++;
2910
- const { debug: f = !1 } = Je(), c = j.useCallback(
2921
+ const m = V.useRef(0);
2922
+ m.current++;
2923
+ const { debug: f = !1 } = Je(), c = V.useCallback(
2911
2924
  (N) => {
2912
2925
  for (const w of N)
2913
2926
  Qa(w);
@@ -2916,34 +2929,36 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2916
2929
  [r]
2917
2930
  );
2918
2931
  f && console.log("📺 [ChannelList] 🔄 RENDER START", {
2919
- renderCount: u.current,
2932
+ renderCount: m.current,
2920
2933
  selectedChannelId: t == null ? void 0 : t.id,
2921
2934
  filters: s
2922
2935
  });
2923
- const p = j.useMemo(
2936
+ const b = V.useMemo(
2924
2937
  () => ({
2925
2938
  selectedChannel: t,
2926
2939
  onChannelSelect: e,
2927
2940
  debug: f,
2928
- renderMessagePreview: m,
2941
+ channelPreview: d,
2942
+ renderMessagePreview: u,
2929
2943
  viewerLanguage: g
2930
2944
  }),
2931
2945
  [
2932
2946
  t,
2933
2947
  e,
2934
2948
  f,
2935
- m,
2949
+ d,
2950
+ u,
2936
2951
  g
2937
2952
  ]
2938
2953
  );
2939
2954
  return /* @__PURE__ */ n(
2940
2955
  "div",
2941
2956
  {
2942
- className: _(
2957
+ className: k(
2943
2958
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2944
- o
2959
+ l
2945
2960
  ),
2946
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: p, children: /* @__PURE__ */ n(
2961
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: b, children: /* @__PURE__ */ n(
2947
2962
  us,
2948
2963
  {
2949
2964
  filters: s,
@@ -2952,8 +2967,8 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2952
2967
  allowNewMessagesFromUnfilteredChannels: a,
2953
2968
  channelRenderFilterFn: c,
2954
2969
  Paginator: ms,
2955
- Preview: d ?? fn,
2956
- EmptyStateIndicator: l
2970
+ Preview: fn,
2971
+ EmptyStateIndicator: o
2957
2972
  },
2958
2973
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
2959
2974
  ) }) })
@@ -2978,7 +2993,7 @@ const or = {
2978
2993
  dark: "bg-white text-[#121110] hover:bg-white/90",
2979
2994
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2980
2995
  }, cr = ({ variant: e, cta: t }) => {
2981
- const s = _(
2996
+ const s = k(
2982
2997
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2983
2998
  or[e]
2984
2999
  ), a = at(t.href);
@@ -3020,15 +3035,15 @@ const or = {
3020
3035
  description: a,
3021
3036
  url: r,
3022
3037
  appIcon: i,
3023
- cta: o,
3024
- trailingAction: l
3038
+ cta: l,
3039
+ trailingAction: o
3025
3040
  }) => {
3026
- 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 !== "", p = o != null;
3027
- if (!g && !u && !c && !p) return null;
3028
- const w = _(
3041
+ const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
3042
+ if (!g && !m && !c && !b) return null;
3043
+ const w = k(
3029
3044
  "truncate text-base font-medium leading-6",
3030
3045
  d && !t ? ur : dr[e]
3031
- ), b = _(
3046
+ ), p = k(
3032
3047
  "truncate text-xs leading-4",
3033
3048
  mr[e]
3034
3049
  );
@@ -3038,17 +3053,17 @@ const or = {
3038
3053
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
3039
3054
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3040
3055
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
3041
- /* @__PURE__ */ n("p", { className: _("min-w-0", w), children: m })
3056
+ /* @__PURE__ */ n("p", { className: k("min-w-0", w), children: u })
3042
3057
  ] }),
3043
- u && /* @__PURE__ */ n("p", { className: b, children: a })
3058
+ m && /* @__PURE__ */ n("p", { className: p, children: a })
3044
3059
  ] }),
3045
- !p && c && /* @__PURE__ */ n("p", { className: b, children: f })
3060
+ !b && c && /* @__PURE__ */ n("p", { className: p, children: f })
3046
3061
  ] }),
3047
- l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
3062
+ o && /* @__PURE__ */ n("div", { className: "shrink-0", children: o })
3048
3063
  ] }),
3049
- o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
3064
+ l && /* @__PURE__ */ n(cr, { variant: e, cta: l })
3050
3065
  ] });
3051
- }, hr = _(
3066
+ }, hr = k(
3052
3067
  "relative block w-[280px] select-none overflow-hidden rounded-md",
3053
3068
  // 1px hairline border that sits flush with the card chrome — matches
3054
3069
  // the messaging design system's "small border around link attachments"
@@ -3062,18 +3077,18 @@ const or = {
3062
3077
  onClick: a,
3063
3078
  ariaLabel: r,
3064
3079
  rootRef: i,
3065
- topRight: o,
3066
- bgClassName: l,
3080
+ topRight: l,
3081
+ bgClassName: o,
3067
3082
  "data-testid": d
3068
3083
  }) => {
3069
- const m = s != null || a != null, g = _(
3084
+ const u = s != null || a != null, g = k(
3070
3085
  hr,
3071
- l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3086
+ o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3072
3087
  // `focus-ring` is a design-system utility from the component-library
3073
3088
  // tailwind preset — outline-none + a black 2px focus-visible ring
3074
3089
  // with offset, so keyboard users can see the focused card.
3075
- m ? "cursor-pointer no-underline focus-ring" : null
3076
- ), u = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
3090
+ u ? "cursor-pointer no-underline focus-ring" : null
3091
+ ), m = l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3077
3092
  return s ? /* @__PURE__ */ h(
3078
3093
  "a",
3079
3094
  {
@@ -3086,7 +3101,7 @@ const or = {
3086
3101
  className: g,
3087
3102
  children: [
3088
3103
  t,
3089
- u
3104
+ m
3090
3105
  ]
3091
3106
  }
3092
3107
  ) : a ? /* @__PURE__ */ h(
@@ -3097,10 +3112,10 @@ const or = {
3097
3112
  onClick: a,
3098
3113
  "aria-label": r,
3099
3114
  "data-testid": d,
3100
- className: _(g, "text-left"),
3115
+ className: k(g, "text-left"),
3101
3116
  children: [
3102
3117
  t,
3103
- u
3118
+ m
3104
3119
  ]
3105
3120
  }
3106
3121
  ) : /* @__PURE__ */ h(
@@ -3111,7 +3126,7 @@ const or = {
3111
3126
  className: g,
3112
3127
  children: [
3113
3128
  t,
3114
- u
3129
+ m
3115
3130
  ]
3116
3131
  }
3117
3132
  );
@@ -3132,9 +3147,9 @@ const or = {
3132
3147
  title: a,
3133
3148
  mimeType: r = "image/*",
3134
3149
  topLeft: i,
3135
- topRight: o
3150
+ topRight: l
3136
3151
  }) => {
3137
- const l = ie(r), d = !!s && l === "video";
3152
+ const o = ie(r), d = !!s && o === "video";
3138
3153
  return ze(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3139
3154
  "audio",
3140
3155
  {
@@ -3147,7 +3162,7 @@ const or = {
3147
3162
  ) }) : /* @__PURE__ */ h(
3148
3163
  "div",
3149
3164
  {
3150
- className: _(
3165
+ className: k(
3151
3166
  "relative h-[180px] w-full overflow-hidden",
3152
3167
  d && "bg-black"
3153
3168
  ),
@@ -3174,7 +3189,7 @@ const or = {
3174
3189
  ) : /* @__PURE__ */ n(
3175
3190
  "div",
3176
3191
  {
3177
- className: _(
3192
+ className: k(
3178
3193
  "flex h-full w-full items-center justify-center",
3179
3194
  fr[e]
3180
3195
  ),
@@ -3185,7 +3200,7 @@ const or = {
3185
3200
  }
3186
3201
  ),
3187
3202
  i ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-10", children: i }) : null,
3188
- o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null
3203
+ l ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null
3189
3204
  ]
3190
3205
  }
3191
3206
  );
@@ -3196,14 +3211,14 @@ const or = {
3196
3211
  url: a,
3197
3212
  mimeType: r,
3198
3213
  thumbnailUrl: i,
3199
- sourceUrl: o,
3200
- layout: l = "featured",
3214
+ sourceUrl: l,
3215
+ layout: o = "featured",
3201
3216
  appIcon: d,
3202
- cta: m,
3217
+ cta: u,
3203
3218
  onDismiss: g,
3204
- onEditClick: u
3219
+ onEditClick: m
3205
3220
  }) => {
3206
- const f = l === "classic", c = ze(r, o), p = g ? /* @__PURE__ */ n(
3221
+ const f = o === "classic", c = ze(r, l), b = g ? /* @__PURE__ */ n(
3207
3222
  "button",
3208
3223
  {
3209
3224
  type: "button",
@@ -3212,11 +3227,11 @@ const or = {
3212
3227
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3213
3228
  children: /* @__PURE__ */ n(Pe, { className: "size-3", weight: "bold" })
3214
3229
  }
3215
- ) : void 0, N = u ? /* @__PURE__ */ n(
3230
+ ) : void 0, N = m ? /* @__PURE__ */ n(
3216
3231
  "button",
3217
3232
  {
3218
3233
  type: "button",
3219
- onClick: u,
3234
+ onClick: m,
3220
3235
  "aria-label": "Edit attachment",
3221
3236
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3222
3237
  children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
@@ -3227,27 +3242,27 @@ const or = {
3227
3242
  De,
3228
3243
  {
3229
3244
  variant: "dark",
3230
- sourceUrl: o,
3245
+ sourceUrl: l,
3231
3246
  title: e,
3232
3247
  mimeType: r
3233
3248
  }
3234
3249
  ) }),
3235
- p && /* @__PURE__ */ n("div", { className: "shrink-0", children: p })
3250
+ b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3236
3251
  ] }) }) : /* @__PURE__ */ h(
3237
3252
  Le,
3238
3253
  {
3239
3254
  variant: "dark",
3240
- topRight: f ? p : void 0,
3255
+ topRight: f ? b : void 0,
3241
3256
  children: [
3242
3257
  !f && /* @__PURE__ */ n(
3243
3258
  De,
3244
3259
  {
3245
3260
  variant: "dark",
3246
3261
  thumbnailUrl: i,
3247
- sourceUrl: o,
3262
+ sourceUrl: l,
3248
3263
  title: e,
3249
3264
  mimeType: r,
3250
- topRight: p
3265
+ topRight: b
3251
3266
  }
3252
3267
  ),
3253
3268
  /* @__PURE__ */ n(
@@ -3259,7 +3274,7 @@ const or = {
3259
3274
  description: s,
3260
3275
  url: a,
3261
3276
  appIcon: d,
3262
- cta: m,
3277
+ cta: u,
3263
3278
  trailingAction: N
3264
3279
  }
3265
3280
  )
@@ -3273,16 +3288,16 @@ const or = {
3273
3288
  mimeType: a,
3274
3289
  thumbnailUrl: r,
3275
3290
  sourceUrl: i,
3276
- layout: o = "featured",
3277
- appIcon: l,
3291
+ layout: l = "featured",
3292
+ appIcon: o,
3278
3293
  cta: d,
3279
- onClick: m
3294
+ onClick: u
3280
3295
  }) => {
3281
- const g = gn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, p = ze(a, i) ? it : void 0, N = d && m ? {
3296
+ const g = gn(a, i), m = at(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? it : void 0, N = d && u ? {
3282
3297
  ...d,
3283
3298
  onClick: () => {
3284
3299
  var w;
3285
- m(), (w = d.onClick) == null || w.call(d);
3300
+ u(), (w = d.onClick) == null || w.call(d);
3286
3301
  }
3287
3302
  } : d;
3288
3303
  return /* @__PURE__ */ h(
@@ -3292,10 +3307,10 @@ const or = {
3292
3307
  href: f,
3293
3308
  onClick: c,
3294
3309
  ariaLabel: e ?? "Open attachment preview",
3295
- bgClassName: p,
3310
+ bgClassName: b,
3296
3311
  "data-testid": "link-attachment",
3297
3312
  children: [
3298
- o === "featured" && /* @__PURE__ */ n(
3313
+ l === "featured" && /* @__PURE__ */ n(
3299
3314
  De,
3300
3315
  {
3301
3316
  variant: "light",
@@ -3312,7 +3327,7 @@ const or = {
3312
3327
  title: e,
3313
3328
  description: t,
3314
3329
  url: s,
3315
- appIcon: l,
3330
+ appIcon: o,
3316
3331
  cta: N
3317
3332
  }
3318
3333
  )
@@ -3326,27 +3341,27 @@ const or = {
3326
3341
  url: a,
3327
3342
  mimeType: r,
3328
3343
  thumbnailUrl: i,
3329
- sourceUrl: o,
3330
- layout: l = "featured",
3344
+ sourceUrl: l,
3345
+ layout: o = "featured",
3331
3346
  appIcon: d,
3332
- cta: m,
3347
+ cta: u,
3333
3348
  onClick: g
3334
3349
  }) => {
3335
- const u = gn(r, o), f = at(a), c = m == null && f != null && !u ? f : void 0, p = m == null && !u && c != null ? g : void 0;
3350
+ const m = gn(r, l), f = at(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3336
3351
  return /* @__PURE__ */ h(
3337
3352
  Le,
3338
3353
  {
3339
3354
  variant: "dark",
3340
3355
  href: c,
3341
- onClick: p,
3342
- bgClassName: ze(r, o) ? it : void 0,
3356
+ onClick: b,
3357
+ bgClassName: ze(r, l) ? it : void 0,
3343
3358
  children: [
3344
- l === "featured" && /* @__PURE__ */ n(
3359
+ o === "featured" && /* @__PURE__ */ n(
3345
3360
  De,
3346
3361
  {
3347
3362
  variant: "dark",
3348
3363
  thumbnailUrl: i,
3349
- sourceUrl: o,
3364
+ sourceUrl: l,
3350
3365
  title: e,
3351
3366
  mimeType: r
3352
3367
  }
@@ -3360,7 +3375,7 @@ const or = {
3360
3375
  description: s,
3361
3376
  url: a,
3362
3377
  appIcon: d,
3363
- cta: m
3378
+ cta: u
3364
3379
  }
3365
3380
  )
3366
3381
  ]
@@ -3399,15 +3414,15 @@ const or = {
3399
3414
  groupPosition: a = "single",
3400
3415
  className: r,
3401
3416
  children: i,
3402
- "data-testid": o
3417
+ "data-testid": l
3403
3418
  }) => {
3404
- const l = t != null && t !== "", d = yr[_r(e)][a];
3419
+ const o = t != null && t !== "", d = yr[_r(e)][a];
3405
3420
  return /* @__PURE__ */ h(
3406
3421
  "div",
3407
3422
  {
3408
- "data-testid": o,
3423
+ "data-testid": l,
3409
3424
  "data-group-position": a,
3410
- className: _(
3425
+ className: k(
3411
3426
  // 280px-wide bubble — matches the mobile chat attachment width
3412
3427
  // and keeps the document / image / audio bubbles visually
3413
3428
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3424,10 +3439,10 @@ const or = {
3424
3439
  ),
3425
3440
  children: [
3426
3441
  i,
3427
- l ? /* @__PURE__ */ n(
3442
+ o ? /* @__PURE__ */ n(
3428
3443
  "p",
3429
3444
  {
3430
- className: _(
3445
+ className: k(
3431
3446
  // No `text-*` / `font-*` overrides here — caption inherits
3432
3447
  // the same font family + size as `.str-chat__message-text`
3433
3448
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3456,7 +3471,7 @@ const or = {
3456
3471
  a.stopPropagation(), e();
3457
3472
  },
3458
3473
  "aria-label": s,
3459
- className: _(
3474
+ className: k(
3460
3475
  "flex size-6 items-center justify-center rounded-full text-white",
3461
3476
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3462
3477
  ),
@@ -3490,22 +3505,22 @@ const or = {
3490
3505
  filename: a,
3491
3506
  items: r,
3492
3507
  text: i,
3493
- groupPosition: o,
3494
- preload: l,
3508
+ groupPosition: l,
3509
+ preload: o,
3495
3510
  onDismiss: d
3496
3511
  }) => {
3497
- const m = Ee(e), g = e === "composer" && !!d, u = kr({ src: t, mimeType: s, filename: a, items: r });
3498
- if (u.length === 0)
3512
+ const u = Ee(e), g = e === "composer" && !!d, m = kr({ src: t, mimeType: s, filename: a, items: r });
3513
+ if (m.length === 0)
3499
3514
  return null;
3500
- const f = l ?? (u.length > 1 ? "none" : "metadata");
3515
+ const f = o ?? (m.length > 1 ? "none" : "metadata");
3501
3516
  return /* @__PURE__ */ n(
3502
3517
  ke,
3503
3518
  {
3504
- variant: m,
3519
+ variant: u,
3505
3520
  text: i,
3506
- groupPosition: o,
3521
+ groupPosition: l,
3507
3522
  "data-testid": "audio-attachment",
3508
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, p) => /* @__PURE__ */ n(
3523
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
3509
3524
  Cr,
3510
3525
  {
3511
3526
  item: c,
@@ -3513,10 +3528,10 @@ const or = {
3513
3528
  trailingAction: (
3514
3529
  // Composer only supports a single attachment, so the
3515
3530
  // dismiss control sits on the only player.
3516
- g && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3531
+ g && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3517
3532
  )
3518
3533
  },
3519
- `${c.src}-${p}`
3534
+ `${c.src}-${b}`
3520
3535
  )) })
3521
3536
  }
3522
3537
  );
@@ -3584,32 +3599,32 @@ const Dr = {
3584
3599
  mimeType: a = "application/octet-stream",
3585
3600
  fileSize: r,
3586
3601
  onActivate: i,
3587
- activateLabel: o,
3588
- trailingAction: l
3602
+ activateLabel: l,
3603
+ trailingAction: o
3589
3604
  }) => {
3590
- const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3605
+ const d = s ?? t ?? "File", u = Lr(a, t, r), g = /* @__PURE__ */ n(
3591
3606
  "div",
3592
3607
  {
3593
- className: _(
3608
+ className: k(
3594
3609
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3595
3610
  Pr[e]
3596
3611
  ),
3597
3612
  "aria-hidden": !0,
3598
3613
  children: ce(a, {
3599
- className: _("size-6", zr[e]),
3614
+ className: k("size-6", zr[e]),
3600
3615
  weight: "regular"
3601
3616
  })
3602
3617
  }
3603
- ), u = /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
3618
+ ), m = /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
3604
3619
  /* @__PURE__ */ n("p", { className: "truncate font-medium leading-snug", children: d }),
3605
- m ? /* @__PURE__ */ n(
3620
+ u ? /* @__PURE__ */ n(
3606
3621
  "p",
3607
3622
  {
3608
- className: _(
3623
+ className: k(
3609
3624
  "truncate text-xs leading-4",
3610
3625
  Dr[e]
3611
3626
  ),
3612
- children: m
3627
+ children: u
3613
3628
  }
3614
3629
  ) : null
3615
3630
  ] }), f = i ? /* @__PURE__ */ h(
@@ -3617,23 +3632,23 @@ const Dr = {
3617
3632
  {
3618
3633
  type: "button",
3619
3634
  onClick: i,
3620
- "aria-label": o,
3621
- className: _(
3635
+ "aria-label": l,
3636
+ className: k(
3622
3637
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3623
3638
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3624
3639
  ),
3625
3640
  children: [
3626
3641
  g,
3627
- u
3642
+ m
3628
3643
  ]
3629
3644
  }
3630
3645
  ) : /* @__PURE__ */ h(se, { children: [
3631
3646
  g,
3632
- u
3647
+ m
3633
3648
  ] });
3634
3649
  return /* @__PURE__ */ h("div", { className: "flex items-center gap-3 px-3 py-2", children: [
3635
3650
  f,
3636
- l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3651
+ o ? /* @__PURE__ */ n("div", { className: "shrink-0", children: o }) : null
3637
3652
  ] });
3638
3653
  };
3639
3654
  async function bn(e, t) {
@@ -3641,8 +3656,8 @@ async function bn(e, t) {
3641
3656
  try {
3642
3657
  const a = await fetch(e, { mode: "cors" });
3643
3658
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
3644
- const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
3645
- o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
3659
+ const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
3660
+ l.href = i, l.download = s, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
3646
3661
  } catch {
3647
3662
  if (!window.open(e, "_blank", "noopener,noreferrer")) {
3648
3663
  const r = document.createElement("a");
@@ -3685,34 +3700,34 @@ const Or = ({
3685
3700
  fileSize: a,
3686
3701
  mimeType: r,
3687
3702
  title: i,
3688
- items: o,
3689
- text: l,
3703
+ items: l,
3704
+ text: o,
3690
3705
  groupPosition: d,
3691
- onClick: m,
3706
+ onClick: u,
3692
3707
  onDismiss: g
3693
3708
  }) => {
3694
- const u = Ee(e), f = e === "composer" && !!g, c = Or({
3709
+ const m = Ee(e), f = e === "composer" && !!g, c = Or({
3695
3710
  src: t,
3696
3711
  filename: s,
3697
3712
  fileSize: a,
3698
3713
  mimeType: r,
3699
3714
  title: i,
3700
- items: o
3701
- }), p = (w) => {
3702
- if ((m == null ? void 0 : m(w)) === !1) return;
3703
- const b = c[w];
3704
- if (!b) return;
3705
- const v = b.filename ?? ae(b.src);
3706
- bn(b.src, v);
3715
+ items: l
3716
+ }), b = (w) => {
3717
+ if ((u == null ? void 0 : u(w)) === !1) return;
3718
+ const p = c[w];
3719
+ if (!p) return;
3720
+ const v = p.filename ?? ae(p.src);
3721
+ bn(p.src, v);
3707
3722
  };
3708
3723
  if (c.length === 0)
3709
3724
  return null;
3710
3725
  const N = /* @__PURE__ */ n(
3711
3726
  "span",
3712
3727
  {
3713
- className: _(
3728
+ className: k(
3714
3729
  "flex size-8 items-center justify-center rounded-full",
3715
- u === "dark" ? "text-white/70" : "text-black/70"
3730
+ m === "dark" ? "text-white/70" : "text-black/70"
3716
3731
  ),
3717
3732
  "aria-hidden": !0,
3718
3733
  children: /* @__PURE__ */ n(Ne, { className: "size-5", weight: "bold" })
@@ -3721,20 +3736,20 @@ const Or = ({
3721
3736
  return /* @__PURE__ */ n(
3722
3737
  ke,
3723
3738
  {
3724
- variant: u,
3725
- text: l,
3739
+ variant: m,
3740
+ text: o,
3726
3741
  groupPosition: d,
3727
3742
  "data-testid": "file-attachment",
3728
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, b) => /* @__PURE__ */ n(
3743
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((w, p) => /* @__PURE__ */ n(
3729
3744
  $r,
3730
3745
  {
3731
- variant: u,
3746
+ variant: m,
3732
3747
  item: w,
3733
- index: b,
3734
- onActivate: p,
3735
- trailingAction: f && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
3748
+ index: p,
3749
+ onActivate: b,
3750
+ trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : N
3736
3751
  },
3737
- `${w.src}-${b}`
3752
+ `${w.src}-${p}`
3738
3753
  )) })
3739
3754
  }
3740
3755
  );
@@ -3775,17 +3790,17 @@ const Or = ({
3775
3790
  label: a = "Download",
3776
3791
  iconOnly: r,
3777
3792
  tone: i = "dark",
3778
- onTriggered: o
3793
+ onTriggered: l
3779
3794
  }) => {
3780
- const [l, d] = F(!1), m = J(
3795
+ const [o, d] = $(!1), u = J(
3781
3796
  (c) => {
3782
- c.stopPropagation(), !l && (d(!0), bn(e, t).catch(() => {
3797
+ c.stopPropagation(), !o && (d(!0), bn(e, t).catch(() => {
3783
3798
  }).finally(() => {
3784
- d(!1), o == null || o();
3799
+ d(!1), l == null || l();
3785
3800
  }));
3786
3801
  },
3787
- [l, e, t, o]
3788
- ), g = r ?? s !== "pill", f = { className: _(
3802
+ [o, e, t, l]
3803
+ ), g = r ?? s !== "pill", f = { className: k(
3789
3804
  s === "pill" ? "size-4" : "size-5",
3790
3805
  "shrink-0"
3791
3806
  ), weight: "bold" };
@@ -3793,17 +3808,17 @@ const Or = ({
3793
3808
  "button",
3794
3809
  {
3795
3810
  type: "button",
3796
- onClick: m,
3797
- disabled: l,
3811
+ onClick: u,
3812
+ disabled: o,
3798
3813
  "aria-label": a,
3799
- className: _(
3814
+ className: k(
3800
3815
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3801
3816
  {
3802
3817
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
3803
3818
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
3804
3819
  }[i]
3805
3820
  ),
3806
- children: l ? /* @__PURE__ */ n(
3821
+ children: o ? /* @__PURE__ */ n(
3807
3822
  we,
3808
3823
  {
3809
3824
  className: "size-4 animate-spin",
@@ -3823,25 +3838,25 @@ const Or = ({
3823
3838
  "button",
3824
3839
  {
3825
3840
  type: "button",
3826
- onClick: m,
3827
- disabled: l,
3841
+ onClick: u,
3842
+ disabled: o,
3828
3843
  "aria-label": a,
3829
3844
  className: "mes-media-viewer__action",
3830
- children: l ? /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
3845
+ children: o ? /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ne, { size: 20, weight: "bold", "aria-hidden": !0 })
3831
3846
  }
3832
3847
  ) : /* @__PURE__ */ h(
3833
3848
  "button",
3834
3849
  {
3835
3850
  type: "button",
3836
- onClick: m,
3837
- disabled: l,
3851
+ onClick: u,
3852
+ disabled: o,
3838
3853
  "aria-label": g ? a : void 0,
3839
- className: _(
3854
+ className: k(
3840
3855
  "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",
3841
3856
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3842
3857
  ),
3843
3858
  children: [
3844
- l ? /* @__PURE__ */ n(
3859
+ o ? /* @__PURE__ */ n(
3845
3860
  we,
3846
3861
  {
3847
3862
  className: "size-4 animate-spin",
@@ -3858,26 +3873,26 @@ const Or = ({
3858
3873
  initialIndex: t,
3859
3874
  open: s
3860
3875
  }) => {
3861
- const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
3876
+ const a = Ve(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3862
3877
  K(() => {
3863
3878
  s && i(Ve(t, 0, Math.max(e - 1, 0)));
3864
3879
  }, [s, t, e]), K(() => {
3865
3880
  i((d) => Ve(d, 0, Math.max(e - 1, 0)));
3866
3881
  }, [e]);
3867
- const o = J(() => {
3882
+ const l = J(() => {
3868
3883
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3869
- }, [e]), l = J(() => {
3884
+ }, [e]), o = J(() => {
3870
3885
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3871
3886
  }, [e]);
3872
3887
  return K(() => {
3873
3888
  if (!s || e <= 1) return;
3874
- const d = (m) => {
3875
- if (m.key !== "ArrowLeft" && m.key !== "ArrowRight") return;
3889
+ const d = (u) => {
3890
+ if (u.key !== "ArrowLeft" && u.key !== "ArrowRight") return;
3876
3891
  const g = document.activeElement;
3877
- g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (m.preventDefault(), m.key === "ArrowLeft" ? o() : l());
3892
+ g && (g.tagName === "VIDEO" || g.tagName === "AUDIO") || (u.preventDefault(), u.key === "ArrowLeft" ? l() : o());
3878
3893
  };
3879
3894
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3880
- }, [s, e, o, l]), { index: r, prev: o, next: l };
3895
+ }, [s, e, l, o]), { index: r, prev: l, next: o };
3881
3896
  }, ut = ({
3882
3897
  open: e,
3883
3898
  onClose: t,
@@ -3885,46 +3900,46 @@ const Or = ({
3885
3900
  counter: a,
3886
3901
  actions: r,
3887
3902
  children: i,
3888
- "data-testid": o
3903
+ "data-testid": l
3889
3904
  }) => {
3890
- const l = Y(null), d = Y(null);
3905
+ const o = Y(null), d = Y(null);
3891
3906
  return K(() => {
3892
3907
  var f;
3893
- const u = l.current;
3894
- if (u) {
3908
+ const m = o.current;
3909
+ if (m) {
3895
3910
  if (e) {
3896
- if (!u.open)
3897
- if (typeof u.showModal == "function")
3911
+ if (!m.open)
3912
+ if (typeof m.showModal == "function")
3898
3913
  try {
3899
- u.showModal();
3914
+ m.showModal();
3900
3915
  } catch {
3901
- u.setAttribute("open", "");
3916
+ m.setAttribute("open", "");
3902
3917
  }
3903
3918
  else
3904
- u.setAttribute("open", "");
3919
+ m.setAttribute("open", "");
3905
3920
  const c = typeof document < "u" ? document.activeElement : null;
3906
3921
  return (f = d.current) == null || f.focus(), () => {
3907
- if (u.open)
3908
- if (typeof u.close == "function")
3922
+ if (m.open)
3923
+ if (typeof m.close == "function")
3909
3924
  try {
3910
- u.close();
3925
+ m.close();
3911
3926
  } catch {
3912
- u.removeAttribute("open");
3927
+ m.removeAttribute("open");
3913
3928
  }
3914
3929
  else
3915
- u.removeAttribute("open");
3930
+ m.removeAttribute("open");
3916
3931
  c && document.body.contains(c) && c.focus();
3917
3932
  };
3918
3933
  }
3919
- if (u.open)
3920
- if (typeof u.close == "function")
3934
+ if (m.open)
3935
+ if (typeof m.close == "function")
3921
3936
  try {
3922
- u.close();
3937
+ m.close();
3923
3938
  } catch {
3924
- u.removeAttribute("open");
3939
+ m.removeAttribute("open");
3925
3940
  }
3926
3941
  else
3927
- u.removeAttribute("open");
3942
+ m.removeAttribute("open");
3928
3943
  }
3929
3944
  }, [e]), // The native `<dialog>` element ships its own keyboard dismissal
3930
3945
  // (Escape, handled by the platform and surfaced through `onClose`),
@@ -3936,15 +3951,15 @@ const Or = ({
3936
3951
  /* @__PURE__ */ h(
3937
3952
  "dialog",
3938
3953
  {
3939
- ref: l,
3954
+ ref: o,
3940
3955
  className: "mes-media-viewer",
3941
3956
  "aria-label": s ?? "Attachment viewer",
3942
- "data-testid": o,
3957
+ "data-testid": l,
3943
3958
  onClose: () => {
3944
3959
  t();
3945
3960
  },
3946
- onClick: (u) => {
3947
- u.target === l.current && t();
3961
+ onClick: (m) => {
3962
+ m.target === o.current && t();
3948
3963
  },
3949
3964
  children: [
3950
3965
  /* @__PURE__ */ h("div", { className: "mes-media-viewer__chrome", children: [
@@ -3974,15 +3989,15 @@ const Or = ({
3974
3989
  initialIndex: s = 0,
3975
3990
  onClose: a
3976
3991
  }) => {
3977
- const { index: r, prev: i, next: o } = dt({
3992
+ const { index: r, prev: i, next: l } = dt({
3978
3993
  length: t.length,
3979
3994
  initialIndex: s,
3980
3995
  open: e
3981
- }), l = t[r], d = re(
3982
- () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "image"),
3983
- [l]
3996
+ }), o = t[r], d = re(
3997
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
3998
+ [o]
3984
3999
  );
3985
- return l ? /* @__PURE__ */ h(
4000
+ return o ? /* @__PURE__ */ h(
3986
4001
  ut,
3987
4002
  {
3988
4003
  open: e,
@@ -3992,7 +4007,7 @@ const Or = ({
3992
4007
  actions: /* @__PURE__ */ n(
3993
4008
  vn,
3994
4009
  {
3995
- url: l.src,
4010
+ url: o.src,
3996
4011
  filename: d,
3997
4012
  variant: "viewer",
3998
4013
  label: `Download ${d}`
@@ -4003,20 +4018,20 @@ const Or = ({
4003
4018
  /* @__PURE__ */ n(
4004
4019
  "img",
4005
4020
  {
4006
- src: l.src,
4007
- alt: l.alt ?? d,
4021
+ src: o.src,
4022
+ alt: o.alt ?? d,
4008
4023
  draggable: !1,
4009
4024
  loading: "eager",
4010
4025
  decoding: "async",
4011
4026
  className: "mes-media-viewer__image"
4012
4027
  },
4013
- `${r}:${l.src}`
4028
+ `${r}:${o.src}`
4014
4029
  ),
4015
4030
  t.length > 1 ? /* @__PURE__ */ n(
4016
4031
  ct,
4017
4032
  {
4018
4033
  onPrev: i,
4019
- onNext: o,
4034
+ onNext: l,
4020
4035
  prevLabel: "Previous image",
4021
4036
  nextLabel: "Next image"
4022
4037
  }
@@ -4032,76 +4047,76 @@ const Or = ({
4032
4047
  }) => {
4033
4048
  const r = e.length;
4034
4049
  if (r === 0) return null;
4035
- const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
4036
- const u = _(Vr, "h-full w-full");
4050
+ const i = e.slice(0, Math.min(r, s)), l = r - i.length, o = (d, u, g) => {
4051
+ const m = k(Vr, "h-full w-full");
4037
4052
  return t ? /* @__PURE__ */ h(
4038
4053
  "button",
4039
4054
  {
4040
4055
  type: "button",
4041
- onClick: () => t(m),
4042
- "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
4043
- className: _(u, "cursor-zoom-in"),
4056
+ onClick: () => t(u),
4057
+ "aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
4058
+ className: k(m, "cursor-zoom-in"),
4044
4059
  children: [
4045
4060
  d.content,
4046
4061
  g
4047
4062
  ]
4048
4063
  },
4049
- m
4050
- ) : /* @__PURE__ */ h("div", { className: u, children: [
4064
+ u
4065
+ ) : /* @__PURE__ */ h("div", { className: m, children: [
4051
4066
  d.content,
4052
4067
  g
4053
- ] }, m);
4068
+ ] }, u);
4054
4069
  };
4055
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: _("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4070
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: o(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4056
4071
  "div",
4057
4072
  {
4058
- className: _(
4073
+ className: k(
4059
4074
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
4060
4075
  a
4061
4076
  ),
4062
- children: i.map((d, m) => l(d, m))
4077
+ children: i.map((d, u) => o(d, u))
4063
4078
  }
4064
4079
  ) : i.length === 3 ? /* @__PURE__ */ h(
4065
4080
  "div",
4066
4081
  {
4067
- className: _(
4082
+ className: k(
4068
4083
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4069
4084
  a
4070
4085
  ),
4071
4086
  children: [
4072
- /* @__PURE__ */ n("div", { className: "row-span-2", children: l(i[0], 0) }),
4073
- l(i[1], 1),
4074
- l(i[2], 2)
4087
+ /* @__PURE__ */ n("div", { className: "row-span-2", children: o(i[0], 0) }),
4088
+ o(i[1], 1),
4089
+ o(i[2], 2)
4075
4090
  ]
4076
4091
  }
4077
4092
  ) : /* @__PURE__ */ n(
4078
4093
  "div",
4079
4094
  {
4080
- className: _(
4095
+ className: k(
4081
4096
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4082
4097
  a
4083
4098
  ),
4084
- children: i.map((d, m) => {
4085
- const g = o > 0 && m === i.length - 1;
4086
- return l(
4099
+ children: i.map((d, u) => {
4100
+ const g = l > 0 && u === i.length - 1;
4101
+ return o(
4087
4102
  d,
4088
- m,
4103
+ u,
4089
4104
  g ? /* @__PURE__ */ h("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
4090
4105
  "+",
4091
- o
4106
+ l
4092
4107
  ] }) : null
4093
4108
  );
4094
4109
  })
4095
4110
  }
4096
4111
  );
4097
4112
  }, Ie = (e) => {
4098
- const [t, s] = F(!1), [a, r] = F(0), i = J(
4099
- (l) => {
4100
- (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4113
+ const [t, s] = $(!1), [a, r] = $(0), i = J(
4114
+ (o) => {
4115
+ (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4101
4116
  },
4102
4117
  [e]
4103
- ), o = J(() => s(!1), []);
4104
- return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4118
+ ), l = J(() => s(!1), []);
4119
+ return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4105
4120
  }, Gr = (e, t, s, a) => ({
4106
4121
  ariaLabel: `Open image ${t + 1} of ${s}`,
4107
4122
  content: /* @__PURE__ */ n(
@@ -4126,7 +4141,7 @@ const Or = ({
4126
4141
  alt: s.alt,
4127
4142
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4128
4143
  })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4129
- const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = Ie(
4144
+ const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Ie(
4130
4145
  r
4131
4146
  );
4132
4147
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4154,10 +4169,10 @@ const Or = ({
4154
4169
  /* @__PURE__ */ n(
4155
4170
  xn,
4156
4171
  {
4157
- open: o,
4172
+ open: l,
4158
4173
  items: Nn([{ src: e, alt: t }], s),
4159
- initialIndex: l,
4160
- onClose: m
4174
+ initialIndex: o,
4175
+ onClose: u
4161
4176
  }
4162
4177
  )
4163
4178
  ] });
@@ -4168,34 +4183,34 @@ const Or = ({
4168
4183
  filename: a,
4169
4184
  items: r,
4170
4185
  text: i,
4171
- groupPosition: o,
4172
- loading: l = "lazy",
4186
+ groupPosition: l,
4187
+ loading: o = "lazy",
4173
4188
  onClick: d
4174
4189
  }) => {
4175
- const m = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: p } = Ie(
4190
+ const u = Hr({ src: t, alt: s, items: r }), g = Ee(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Ie(
4176
4191
  d
4177
4192
  );
4178
- if (m.length === 0)
4193
+ if (u.length === 0)
4179
4194
  return null;
4180
- const N = m.map(
4181
- (w, b) => Gr(w, b, m.length, l)
4195
+ const N = u.map(
4196
+ (w, p) => Gr(w, p, u.length, o)
4182
4197
  );
4183
4198
  return /* @__PURE__ */ h(
4184
4199
  ke,
4185
4200
  {
4186
4201
  variant: g,
4187
4202
  text: i,
4188
- groupPosition: o,
4203
+ groupPosition: l,
4189
4204
  "data-testid": "image-attachment",
4190
4205
  children: [
4191
4206
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(wn, { tiles: N, onTileActivate: c }) }),
4192
4207
  /* @__PURE__ */ n(
4193
4208
  xn,
4194
4209
  {
4195
- open: u,
4196
- items: Nn(m, a),
4210
+ open: m,
4211
+ items: Nn(u, a),
4197
4212
  initialIndex: f,
4198
- onClose: p
4213
+ onClose: b
4199
4214
  }
4200
4215
  )
4201
4216
  ]
@@ -4211,18 +4226,18 @@ const Or = ({
4211
4226
  initialIndex: s = 0,
4212
4227
  onClose: a
4213
4228
  }) => {
4214
- const { index: r, prev: i, next: o } = dt({
4229
+ const { index: r, prev: i, next: l } = dt({
4215
4230
  length: t.length,
4216
4231
  initialIndex: s,
4217
4232
  open: e
4218
- }), l = t[r], d = re(
4219
- () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
4220
- [l]
4221
- ), m = re(
4222
- () => l ? Zr(l.src) : void 0,
4223
- [l]
4233
+ }), o = t[r], d = re(
4234
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
4235
+ [o]
4236
+ ), u = re(
4237
+ () => o ? Zr(o.src) : void 0,
4238
+ [o]
4224
4239
  );
4225
- return !l || !m ? null : /* @__PURE__ */ h(
4240
+ return !o || !u ? null : /* @__PURE__ */ h(
4226
4241
  ut,
4227
4242
  {
4228
4243
  open: e,
@@ -4234,18 +4249,18 @@ const Or = ({
4234
4249
  /* @__PURE__ */ n(
4235
4250
  "iframe",
4236
4251
  {
4237
- src: m,
4252
+ src: u,
4238
4253
  title: d,
4239
4254
  className: "mes-media-viewer__iframe",
4240
4255
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
4241
4256
  },
4242
- `${r}:${l.src}`
4257
+ `${r}:${o.src}`
4243
4258
  ),
4244
4259
  t.length > 1 ? /* @__PURE__ */ n(
4245
4260
  ct,
4246
4261
  {
4247
4262
  onPrev: i,
4248
- onNext: o,
4263
+ onNext: l,
4249
4264
  prevLabel: "Previous document",
4250
4265
  nextLabel: "Next document"
4251
4266
  }
@@ -4290,17 +4305,17 @@ const Or = ({
4290
4305
  fileSize: a,
4291
4306
  title: r,
4292
4307
  items: i,
4293
- text: o,
4294
- groupPosition: l,
4308
+ text: l,
4309
+ groupPosition: o,
4295
4310
  onClick: d,
4296
- onDismiss: m
4311
+ onDismiss: u
4297
4312
  }) => {
4298
- const g = Ee(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ie(
4313
+ const g = Ee(e), m = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4299
4314
  d
4300
- ), w = e === "composer" && !!m;
4301
- if (u.length === 0)
4315
+ ), w = e === "composer" && !!u;
4316
+ if (m.length === 0)
4302
4317
  return null;
4303
- const b = u.map((v) => ({
4318
+ const p = m.map((v) => ({
4304
4319
  src: v.src,
4305
4320
  filename: v.filename ?? ae(v.src)
4306
4321
  }));
@@ -4308,12 +4323,12 @@ const Or = ({
4308
4323
  ke,
4309
4324
  {
4310
4325
  variant: g,
4311
- text: o,
4312
- groupPosition: l,
4326
+ text: l,
4327
+ groupPosition: o,
4313
4328
  "data-testid": "pdf-attachment",
4314
4329
  children: [
4315
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((v, M) => {
4316
- const T = v.filename ?? ae(v.src), y = w && M === 0 ? /* @__PURE__ */ n(Ce, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4330
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((v, A) => {
4331
+ const T = v.filename ?? ae(v.src), E = w && A === 0 ? /* @__PURE__ */ n(Ce, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4317
4332
  vn,
4318
4333
  {
4319
4334
  url: v.src,
@@ -4328,18 +4343,18 @@ const Or = ({
4328
4343
  {
4329
4344
  variant: g,
4330
4345
  item: v,
4331
- index: M,
4332
- onActivate: p,
4333
- trailingAction: y
4346
+ index: A,
4347
+ onActivate: b,
4348
+ trailingAction: E
4334
4349
  },
4335
- `${v.src}-${M}`
4350
+ `${v.src}-${A}`
4336
4351
  );
4337
4352
  }) }),
4338
4353
  /* @__PURE__ */ n(
4339
4354
  Jr,
4340
4355
  {
4341
4356
  open: f,
4342
- items: b,
4357
+ items: p,
4343
4358
  initialIndex: c,
4344
4359
  onClose: N
4345
4360
  }
@@ -4357,15 +4372,15 @@ const Or = ({
4357
4372
  initialIndex: s = 0,
4358
4373
  onClose: a
4359
4374
  }) => {
4360
- const { index: r, prev: i, next: o } = dt({
4375
+ const { index: r, prev: i, next: l } = dt({
4361
4376
  length: t.length,
4362
4377
  initialIndex: s,
4363
4378
  open: e
4364
- }), l = t[r], d = re(
4365
- () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "video"),
4366
- [l]
4379
+ }), o = t[r], d = re(
4380
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
4381
+ [o]
4367
4382
  );
4368
- return l ? /* @__PURE__ */ h(
4383
+ return o ? /* @__PURE__ */ h(
4369
4384
  ut,
4370
4385
  {
4371
4386
  open: e,
@@ -4377,23 +4392,23 @@ const Or = ({
4377
4392
  /* @__PURE__ */ n(
4378
4393
  "video",
4379
4394
  {
4380
- src: l.src,
4381
- poster: l.poster,
4395
+ src: o.src,
4396
+ poster: o.poster,
4382
4397
  controls: !0,
4383
4398
  autoPlay: !0,
4384
4399
  muted: !0,
4385
4400
  playsInline: !0,
4386
- preload: l.preload ?? "metadata",
4401
+ preload: o.preload ?? "metadata",
4387
4402
  className: "mes-media-viewer__video",
4388
- children: l.mimeType ? /* @__PURE__ */ n("source", { src: l.src, type: l.mimeType }) : null
4403
+ children: o.mimeType ? /* @__PURE__ */ n("source", { src: o.src, type: o.mimeType }) : null
4389
4404
  },
4390
- `${r}:${l.src}`
4405
+ `${r}:${o.src}`
4391
4406
  ),
4392
4407
  t.length > 1 ? /* @__PURE__ */ n(
4393
4408
  ct,
4394
4409
  {
4395
4410
  onPrev: i,
4396
- onNext: o,
4411
+ onNext: l,
4397
4412
  prevLabel: "Previous video",
4398
4413
  nextLabel: "Next video"
4399
4414
  }
@@ -4439,8 +4454,8 @@ const Or = ({
4439
4454
  mimeType: s.mimeType,
4440
4455
  preload: s.preload,
4441
4456
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4442
- })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4443
- const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = Ie(
4457
+ })), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4458
+ const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: g } = Ie(
4444
4459
  i
4445
4460
  );
4446
4461
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4448,17 +4463,17 @@ const Or = ({
4448
4463
  "button",
4449
4464
  {
4450
4465
  type: "button",
4451
- onClick: () => m(0),
4466
+ onClick: () => u(0),
4452
4467
  "aria-label": "Play video",
4453
4468
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4454
4469
  children: /* @__PURE__ */ n(kn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4455
4470
  }
4456
4471
  ),
4457
- o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: o }) }) : null,
4472
+ l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: l }) }) : null,
4458
4473
  /* @__PURE__ */ n(
4459
4474
  yn,
4460
4475
  {
4461
- open: l,
4476
+ open: o,
4462
4477
  items: Cn(
4463
4478
  [{ src: e, poster: t, mimeType: s, preload: r }],
4464
4479
  a
@@ -4475,32 +4490,32 @@ const Or = ({
4475
4490
  mimeType: a,
4476
4491
  filename: r,
4477
4492
  items: i,
4478
- text: o,
4479
- groupPosition: l,
4493
+ text: l,
4494
+ groupPosition: o,
4480
4495
  preload: d,
4481
- onClick: m
4496
+ onClick: u
4482
4497
  }) => {
4483
- const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: p, closeViewer: N } = Ie(
4484
- m
4498
+ const g = li({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ee(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: N } = Ie(
4499
+ u
4485
4500
  );
4486
4501
  if (g.length === 0)
4487
4502
  return null;
4488
4503
  const w = g.map(
4489
- (b, v) => ii(b, v, g.length)
4504
+ (p, v) => ii(p, v, g.length)
4490
4505
  );
4491
4506
  return /* @__PURE__ */ h(
4492
4507
  ke,
4493
4508
  {
4494
- variant: u,
4495
- text: o,
4496
- groupPosition: l,
4509
+ variant: m,
4510
+ text: l,
4511
+ groupPosition: o,
4497
4512
  "data-testid": "video-attachment",
4498
4513
  children: [
4499
4514
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4500
4515
  wn,
4501
4516
  {
4502
4517
  tiles: w,
4503
- onTileActivate: p,
4518
+ onTileActivate: b,
4504
4519
  className: "overflow-hidden rounded-md"
4505
4520
  }
4506
4521
  ) }),
@@ -4538,7 +4553,7 @@ const Or = ({
4538
4553
  onClick: t,
4539
4554
  disabled: s,
4540
4555
  style: { backgroundColor: "#E6E5E3" },
4541
- className: _(
4556
+ className: k(
4542
4557
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4543
4558
  {
4544
4559
  "hover:brightness-95 active:brightness-90": !s,
@@ -4555,15 +4570,15 @@ const Or = ({
4555
4570
  headerText: a,
4556
4571
  className: r,
4557
4572
  avatarImage: i,
4558
- avatarName: o
4573
+ avatarName: l
4559
4574
  }) => {
4560
- const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4561
- return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4562
- (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4575
+ const o = e.filter((d) => d.enabled).sort((d, u) => (d.order ?? 0) - (u.order ?? 0));
4576
+ return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4577
+ (i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4563
4578
  ne,
4564
4579
  {
4565
- id: o || "account",
4566
- name: o || "Account",
4580
+ id: l || "account",
4581
+ name: l || "Account",
4567
4582
  image: i,
4568
4583
  size: 24,
4569
4584
  shape: "circle"
@@ -4576,7 +4591,7 @@ const Or = ({
4576
4591
  style: { backgroundColor: "#F1F0EE" },
4577
4592
  children: [
4578
4593
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4579
- l.map((d) => /* @__PURE__ */ n(
4594
+ o.map((d) => /* @__PURE__ */ n(
4580
4595
  hi,
4581
4596
  {
4582
4597
  question: d.question,
@@ -4626,4 +4641,4 @@ export {
4626
4641
  Jt as y,
4627
4642
  Ci as z
4628
4643
  };
4629
- //# sourceMappingURL=index-DxzkXLSW.js.map
4644
+ //# sourceMappingURL=index-CghCKfXq.js.map