@linktr.ee/messaging-react 3.4.2 → 3.4.3-rc-1782553322

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{Card-DxroYNrS.cjs → Card-1oglowd2.cjs} +2 -2
  2. package/dist/{Card-DxroYNrS.cjs.map → Card-1oglowd2.cjs.map} +1 -1
  3. package/dist/{Card-CphU_jG-.js → Card-BmVutVEt.js} +2 -2
  4. package/dist/{Card-CphU_jG-.js.map → Card-BmVutVEt.js.map} +1 -1
  5. package/dist/{Card-BKalDyyu.js → Card-CKn-iPjf.js} +2 -2
  6. package/dist/{Card-BKalDyyu.js.map → Card-CKn-iPjf.js.map} +1 -1
  7. package/dist/{Card-V-bNUxcw.cjs → Card-DEEK3wsC.cjs} +2 -2
  8. package/dist/{Card-V-bNUxcw.cjs.map → Card-DEEK3wsC.cjs.map} +1 -1
  9. package/dist/{Card-mpVcQ8-W.js → Card-DoBWURRU.js} +3 -3
  10. package/dist/{Card-mpVcQ8-W.js.map → Card-DoBWURRU.js.map} +1 -1
  11. package/dist/{Card-DFy_ZvFH.cjs → Card-DwaOIthl.cjs} +2 -2
  12. package/dist/{Card-DFy_ZvFH.cjs.map → Card-DwaOIthl.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-B3W7upHs.cjs → LockedThumbnail-B59cJFsF.cjs} +2 -2
  14. package/dist/{LockedThumbnail-B3W7upHs.cjs.map → LockedThumbnail-B59cJFsF.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-BD7qtcso.js → LockedThumbnail-DI-aReA7.js} +2 -2
  16. package/dist/{LockedThumbnail-BD7qtcso.js.map → LockedThumbnail-DI-aReA7.js.map} +1 -1
  17. package/dist/index-12HxQ_GM.cjs +2 -0
  18. package/dist/index-12HxQ_GM.cjs.map +1 -0
  19. package/dist/{index-CjwQ2Hj3.js → index-Dv13-2iu.js} +773 -740
  20. package/dist/index-Dv13-2iu.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/ChannelView.stories.tsx +7 -5
  25. package/src/components/ChannelView.test.tsx +10 -0
  26. package/src/components/ChannelView.tsx +95 -59
  27. package/dist/index-CjwQ2Hj3.js.map +0 -1
  28. package/dist/index-tI-4cxV1.cjs +0 -2
  29. package/dist/index-tI-4cxV1.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as n, jsxs as h, Fragment as ae } from "react/jsx-runtime";
2
- import j, { createContext as qe, useContext as we, useCallback as J, useState as F, useRef as G, useEffect as K, useId as Sn, useMemo as se, Suspense as We } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
2
+ import j, { createContext as We, useContext as _e, useCallback as J, useState as F, useRef as H, useEffect as K, useId as Sn, useMemo as re, Suspense as Xe } from "react";
3
3
  import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Tn, LinkPreviewsManager as Rt } from "stream-chat";
5
- import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as Xe, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as Gt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Lt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as _e, 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 Oe, AIStates as Pe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
- import { StarIcon as Ue, DotsThreeIcon as hs, SpinnerGapIcon as Se, SignOutIcon as fs, ProhibitInsetIcon as Dt, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as qt, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as ve, PlayIcon as je, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as xe, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Re, ArrowUpIcon as Ms, SparkleIcon as Ve, ProhibitIcon as Rs, ArrowLeftIcon as Ot, CaretRightIcon as Ge, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
4
+ import { StreamChat as Tn, LinkPreviewsManager as Lt } from "stream-chat";
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 On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Dt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as Ne, 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 ze, AIStates as $e, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
+ import { StarIcon as Ve, DotsThreeIcon as hs, SpinnerGapIcon as Ie, SignOutIcon as fs, ProhibitInsetIcon as Ot, FlagIcon as Ht, FileIcon as Yt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as qt, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as xe, PlayIcon as Ge, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as we, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as De, ArrowUpIcon as Ms, SparkleIcon as pe, ProhibitIcon as Rs, ArrowLeftIcon as Pt, CaretRightIcon as He, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
7
  import y from "classnames";
8
8
  import { MessageActions as Os, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
9
- const Xt = qe({
9
+ const Xt = We({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const Xt = qe({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Ke = () => we(Xt), Ni = ({
19
+ }), Je = () => _e(Xt), Ni = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,7 +24,7 @@ const Xt = qe({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var O, N;
27
+ var O, C;
28
28
  const l = J(
29
29
  (k, ...S) => {
30
30
  i && console.log(`🔥 [MessagingProvider] ${k}`, ...S);
@@ -37,36 +37,36 @@ const Xt = qe({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [o, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c, b] = F(!1), [_, v] = F(null), p = G(!1), w = G(null), A = G(s);
41
- A.current = s;
42
- const M = G(i);
43
- M.current = i;
44
- const C = G({
40
+ const [o, d] = F(null), [m, g] = F(null), [u, f] = F(!1), [c, b] = F(!1), [_, x] = F(null), p = H(!1), v = H(null), M = H(s);
41
+ M.current = s;
42
+ const I = H(i);
43
+ I.current = i;
44
+ const N = H({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), R = G(0);
50
- R.current++, l("📊 RENDER INFO", {
51
- renderCount: R.current,
49
+ }), z = H(0);
50
+ z.current++, l("📊 RENDER INFO", {
51
+ renderCount: z.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: C.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: C.current.apiKey !== a,
56
- serviceConfigChanged: C.current.serviceConfig !== s,
57
- capabilitiesChanged: C.current.capabilities !== r
54
+ userChanged: N.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: N.current.apiKey !== a,
56
+ serviceConfigChanged: N.current.serviceConfig !== s,
57
+ capabilitiesChanged: N.current.capabilities !== r
58
58
  }
59
- }), C.current = {
59
+ }), N.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 = G(null);
66
- a && ((O = P.current) == null ? void 0 : O.apiKey) !== a && (P.current = { apiKey: a, client: new Tn(a) });
67
- const D = a ? ((N = P.current) == null ? void 0 : N.client) ?? null : null;
65
+ const L = H(null);
66
+ a && ((O = L.current) == null ? void 0 : O.apiKey) !== a && (L.current = { apiKey: a, client: new Tn(a) });
67
+ const D = a ? ((C = L.current) == null ? void 0 : C.client) ?? null : null;
68
68
  K(() => {
69
- const k = R.current, S = A.current;
69
+ const k = z.current, S = M.current;
70
70
  if (!a || !D || !S) {
71
71
  l("⚠️ SERVICE INIT SKIPPED", {
72
72
  renderCount: k,
@@ -78,20 +78,20 @@ const Xt = qe({
78
78
  renderCount: k,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new In({
81
+ const P = new In({
82
82
  ...S,
83
83
  apiKey: a,
84
- debug: M.current,
84
+ debug: I.current,
85
85
  client: D
86
86
  });
87
- w.current = $, d($), l("✅ SERVICE SET", {
87
+ v.current = P, d(P), l("✅ SERVICE SET", {
88
88
  renderCount: k,
89
- serviceInstance: !!$
89
+ serviceInstance: !!P
90
90
  });
91
91
  }, [a, D]);
92
- const E = G(null);
92
+ const E = H(null);
93
93
  K(() => {
94
- var S, $;
94
+ var S, P;
95
95
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!o,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const Xt = qe({
107
107
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((S = E.current) == null ? void 0 : S.serviceId) === o && (($ = E.current) == null ? void 0 : $.userId) === t.id) {
110
+ if (((S = E.current) == null ? void 0 : S.serviceId) === o && ((P = E.current) == null ? void 0 : P.userId) === t.id) {
111
111
  l(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,19 +115,19 @@ const Xt = qe({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), v(null);
118
+ l("🚀 STARTING USER CONNECTION", { userId: t.id }), p.current = !0, b(!0), x(null);
119
119
  try {
120
120
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const z = await o.connectUser(t);
122
- g(z), f(!0), E.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
121
+ const $ = await o.connectUser(t);
122
+ g($), f(!0), E.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: z.userID
124
+ clientId: $.userID
125
125
  });
126
- } catch (z) {
127
- const H = z instanceof Error ? z.message : "Connection failed";
128
- v(H), l("❌ USER CONNECTION ERROR", {
126
+ } catch ($) {
127
+ const Y = $ instanceof Error ? $.message : "Connection failed";
128
+ x(Y), l("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: H
130
+ error: Y
131
131
  });
132
132
  } finally {
133
133
  b(!1), p.current = !1, l("🔄 USER CONNECTION FINISHED", {
@@ -140,10 +140,10 @@ const Xt = qe({
140
140
  const k = D;
141
141
  return () => {
142
142
  var S;
143
- k && (E.current = null, (S = w.current) == null || S.disconnectUser().catch(console.error));
143
+ k && (E.current = null, (S = v.current) == null || S.disconnectUser().catch(console.error));
144
144
  };
145
145
  }, [D]);
146
- const L = J(async () => {
146
+ const R = J(async () => {
147
147
  if (l("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!o,
149
149
  hasUser: !!t
@@ -155,17 +155,17 @@ const Xt = qe({
155
155
  try {
156
156
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
157
157
  const k = await o.connectUser(t);
158
- g(k), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
158
+ g(k), f(!0), x(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
159
  } catch (k) {
160
160
  const S = k instanceof Error ? k.message : "Refresh failed";
161
- v(S), l("❌ CONNECTION REFRESH ERROR", {
161
+ x(S), l("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
163
  error: S
164
164
  });
165
165
  } finally {
166
166
  b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [o, t, l]), I = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [o, t, l]), T = j.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!o,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
@@ -179,7 +179,7 @@ const Xt = qe({
179
179
  isLoading: c,
180
180
  error: _,
181
181
  capabilities: r,
182
- refreshConnection: L,
182
+ refreshConnection: R,
183
183
  debug: i
184
184
  }), [
185
185
  o,
@@ -188,15 +188,15 @@ const Xt = qe({
188
188
  c,
189
189
  _,
190
190
  r,
191
- L,
191
+ R,
192
192
  i,
193
193
  l
194
194
  ]);
195
195
  return l("🔄 RENDER END", {
196
- renderCount: R.current,
196
+ renderCount: z.current,
197
197
  willRenderChat: !!D,
198
- contextValueReady: !!I
199
- }), /* @__PURE__ */ n(Xt.Provider, { value: I, children: D ? /* @__PURE__ */ n(
198
+ contextValueReady: !!T
199
+ }), /* @__PURE__ */ n(Xt.Provider, { value: T, children: D ? /* @__PURE__ */ n(
200
200
  An,
201
201
  {
202
202
  client: D,
@@ -206,7 +206,7 @@ const Xt = qe({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, Ps = () => Ke(), Kt = (e) => {
209
+ }, Ps = () => Je(), Kt = (e) => {
210
210
  var a, r;
211
211
  const [t, s] = F(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -232,14 +232,14 @@ const Xt = qe({
232
232
  function $s(e) {
233
233
  return zs.test(e.trim());
234
234
  }
235
- function Pt(e, t) {
235
+ function zt(e, t) {
236
236
  const s = e == null ? void 0 : e.trim();
237
237
  return !s || t && s === t ? !1 : !$s(s);
238
238
  }
239
239
  function Jt(e) {
240
- return Pt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Pt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
240
+ return zt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : zt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
241
241
  }
242
- const zt = [
242
+ const $t = [
243
243
  "🍎",
244
244
  // Apple
245
245
  "🍌",
@@ -276,10 +276,10 @@ function Fs(e) {
276
276
  return Math.abs(t);
277
277
  }
278
278
  function Bs(e) {
279
- const s = Fs(e) % zt.length;
280
- return zt[s];
279
+ const s = Fs(e) % $t.length;
280
+ return $t[s];
281
281
  }
282
- const oe = ({
282
+ const se = ({
283
283
  id: e,
284
284
  image: t,
285
285
  size: s = 40,
@@ -324,7 +324,7 @@ const oe = ({
324
324
  {
325
325
  "aria-hidden": "true",
326
326
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
327
- children: /* @__PURE__ */ n(Ue, { className: "size-3 text-yellow-600", weight: "duotone" })
327
+ children: /* @__PURE__ */ n(Ve, { className: "size-3 text-yellow-600", weight: "duotone" })
328
328
  }
329
329
  ),
330
330
  /* @__PURE__ */ n(
@@ -364,72 +364,72 @@ const oe = ({
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
366
  var O;
367
- const { service: u, debug: f } = Ke(), c = (O = t == null ? void 0 : t.user) == null ? void 0 : O.id, b = !!(a && s && u && c), [_, v] = F(!1), [p, w] = F(null), [A, M] = F(!1), [C, R] = F(!1), P = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
367
+ const { service: u, debug: f } = Je(), c = (O = t == null ? void 0 : t.user) == null ? void 0 : O.id, b = !!(a && s && u && c), [_, x] = F(!1), [p, v] = F(null), [M, I] = F(!1), [N, z] = F(!1), L = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
368
368
  return K(() => {
369
369
  if (!b || !u || !c) {
370
- v(!1), w(null);
370
+ x(!1), v(null);
371
371
  return;
372
372
  }
373
- let N = !1;
373
+ let C = !1;
374
374
  return (async () => {
375
375
  try {
376
376
  const k = await u.getBlockedUsers();
377
- if (N) return;
378
- v(
377
+ if (C) return;
378
+ x(
379
379
  k.some(
380
380
  (S) => S.blocked_user_id === c
381
381
  )
382
382
  );
383
383
  } catch (k) {
384
- N || console.error(`[${g}] Failed to check blocked status:`, k);
384
+ C || console.error(`[${g}] Failed to check blocked status:`, k);
385
385
  } finally {
386
- N || w({ participantId: c, service: u });
386
+ C || v({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- N = !0;
389
+ C = !0;
390
390
  };
391
391
  }, [b, u, c, g]), {
392
392
  isParticipantBlocked: _,
393
- isCheckingBlockedStatus: P,
394
- isLeaving: A,
395
- isUpdatingBlockStatus: C,
393
+ isCheckingBlockedStatus: L,
394
+ isLeaving: M,
395
+ isUpdatingBlockStatus: N,
396
396
  handleLeaveConversation: async () => {
397
- var N;
398
- if (!A) {
399
- l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), M(!0);
397
+ var C;
398
+ if (!M) {
399
+ l == null || l(), f && console.log(`[${g}] Leave conversation`, e.cid), I(!0);
400
400
  try {
401
- const k = ((N = e._client) == null ? void 0 : N.userID) ?? null;
401
+ const k = ((C = e._client) == null ? void 0 : C.userID) ?? null;
402
402
  await e.hide(k, !1), r && await r(e), m == null || m();
403
403
  } catch (k) {
404
404
  console.error(`[${g}] Failed to leave conversation`, k);
405
405
  } finally {
406
- M(!1);
406
+ I(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var N, k, S;
412
- if (!(C || !u)) {
413
- o == null || o(), f && console.log(`[${g}] Block member`, (N = t == null ? void 0 : t.user) == null ? void 0 : N.id), R(!0);
411
+ var C, k, S;
412
+ if (!(N || !u)) {
413
+ o == null || o(), f && console.log(`[${g}] Block member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), z(!0);
414
414
  try {
415
415
  await u.blockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.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`, $);
416
+ } catch (P) {
417
+ console.error(`[${g}] Failed to block member`, P);
418
418
  } finally {
419
- R(!1);
419
+ z(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var N, k, S;
425
- if (!(C || !u)) {
426
- o == null || o(), f && console.log(`[${g}] Unblock member`, (N = t == null ? void 0 : t.user) == null ? void 0 : N.id), R(!0);
424
+ var C, k, S;
425
+ if (!(N || !u)) {
426
+ o == null || o(), f && console.log(`[${g}] Unblock member`, (C = t == null ? void 0 : t.user) == null ? void 0 : C.id), z(!0);
427
427
  try {
428
428
  await u.unBlockUser((k = t == null ? void 0 : t.user) == null ? void 0 : k.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`, $);
429
+ } catch (P) {
430
+ console.error(`[${g}] Failed to unblock member`, P);
431
431
  } finally {
432
- R(!1);
432
+ z(!1);
433
433
  }
434
434
  }
435
435
  },
@@ -454,7 +454,7 @@ const oe = ({
454
454
  ...a,
455
455
  children: s
456
456
  }
457
- ), $t = ({
457
+ ), Ft = ({
458
458
  channel: e,
459
459
  participant: t,
460
460
  showDeleteConversation: s = !0,
@@ -468,14 +468,14 @@ const oe = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = F(!1), b = G(null), _ = Sn(), v = J(() => c(!1), []), {
471
+ const [f, c] = F(!1), b = H(null), _ = Sn(), x = J(() => c(!1), []), {
472
472
  isParticipantBlocked: p,
473
- isCheckingBlockedStatus: w,
474
- isLeaving: A,
475
- isUpdatingBlockStatus: M,
476
- handleLeaveConversation: C,
477
- handleBlockUser: R,
478
- handleUnblockUser: P,
473
+ isCheckingBlockedStatus: v,
474
+ isLeaving: M,
475
+ isUpdatingBlockStatus: I,
476
+ handleLeaveConversation: N,
477
+ handleBlockUser: z,
478
+ handleUnblockUser: L,
479
479
  handleReportUser: D
480
480
  } = js({
481
481
  channel: e,
@@ -487,18 +487,18 @@ const oe = ({
487
487
  onDeleteConversationClick: o,
488
488
  onBlockParticipantClick: d,
489
489
  onReportParticipantClick: m,
490
- onActionComplete: v,
490
+ onActionComplete: x,
491
491
  logLabel: "ChannelActionsMenu"
492
492
  });
493
493
  return K(() => {
494
494
  if (!f) return;
495
- const L = (O) => {
495
+ const R = (O) => {
496
496
  b.current && !b.current.contains(O.target) && c(!1);
497
- }, I = (O) => {
497
+ }, T = (O) => {
498
498
  O.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", I), () => {
501
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", I);
500
+ return document.addEventListener("mousedown", R), document.addEventListener("keydown", T), () => {
501
+ document.removeEventListener("mousedown", R), document.removeEventListener("keydown", T);
502
502
  };
503
503
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
@@ -509,7 +509,7 @@ const oe = ({
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
511
  "aria-controls": f ? _ : void 0,
512
- onClick: () => c((L) => !L),
512
+ onClick: () => c((R) => !R),
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" })
@@ -529,41 +529,41 @@ const oe = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  be,
531
531
  {
532
- onClick: C,
533
- disabled: A,
534
- "aria-busy": A,
532
+ onClick: N,
533
+ disabled: M,
534
+ "aria-busy": M,
535
535
  children: [
536
- A ? /* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
536
+ M ? /* @__PURE__ */ n(Ie, { 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
  }
540
540
  ) }),
541
- a && /* @__PURE__ */ n("li", { children: w ? (
541
+ a && /* @__PURE__ */ n("li", { children: v ? (
542
542
  // Block status not yet resolved — show a disabled placeholder
543
543
  // so a premature click can't act on a stale block state.
544
544
  /* @__PURE__ */ h(be, { disabled: !0, "aria-busy": !0, children: [
545
- /* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }),
545
+ /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }),
546
546
  /* @__PURE__ */ n("span", { children: "Block" })
547
547
  ] })
548
548
  ) : p ? /* @__PURE__ */ h(
549
549
  be,
550
550
  {
551
- onClick: P,
552
- disabled: M,
553
- "aria-busy": M,
551
+ onClick: L,
552
+ disabled: I,
553
+ "aria-busy": I,
554
554
  children: [
555
- M ? /* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
555
+ I ? /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Ot, { className: "h-5 w-5" }),
556
556
  /* @__PURE__ */ n("span", { children: "Unblock" })
557
557
  ]
558
558
  }
559
559
  ) : /* @__PURE__ */ h(
560
560
  be,
561
561
  {
562
- onClick: R,
563
- disabled: M,
564
- "aria-busy": M,
562
+ onClick: z,
563
+ disabled: I,
564
+ "aria-busy": I,
565
565
  children: [
566
- M ? /* @__PURE__ */ n(Se, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Dt, { className: "h-5 w-5" }),
566
+ I ? /* @__PURE__ */ n(Ie, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Ot, { className: "h-5 w-5" }),
567
567
  /* @__PURE__ */ n("span", { children: "Block" })
568
568
  ]
569
569
  }
@@ -577,20 +577,20 @@ const oe = ({
577
577
  }
578
578
  )
579
579
  ] });
580
- }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), He = "vote_up", Ye = "vote_down";
580
+ }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ye = "vote_up", qe = "vote_down";
581
581
  function Gs(e) {
582
- return e != null && e.length ? e.some((t) => t.type === Ye) ? "down" : e.some((t) => t.type === He) ? "up" : null : null;
582
+ return e != null && e.length ? e.some((t) => t.type === qe) ? "down" : e.some((t) => t.type === Ye) ? "up" : null : null;
583
583
  }
584
584
  function Hs(e) {
585
- const { channel: t } = de(), { client: s } = Xe("useMessageVote"), a = se(
585
+ const { channel: t } = de(), { client: s } = Ke("useMessageVote"), a = re(
586
586
  () => Gs(e.own_reactions),
587
587
  [e.own_reactions]
588
588
  ), r = J(async () => {
589
589
  if (s != null && s.userID)
590
590
  try {
591
- a === "up" ? await t.deleteReaction(e.id, He) : await t.sendReaction(
591
+ a === "up" ? await t.deleteReaction(e.id, Ye) : await t.sendReaction(
592
592
  e.id,
593
- { type: He },
593
+ { type: Ye },
594
594
  { enforce_unique: !0, skip_push: !0 }
595
595
  );
596
596
  } catch {
@@ -598,9 +598,9 @@ function Hs(e) {
598
598
  }, [t, s == null ? void 0 : s.userID, e.id, a]), i = J(async () => {
599
599
  if (s != null && s.userID)
600
600
  try {
601
- a === "down" ? await t.deleteReaction(e.id, Ye) : await t.sendReaction(
601
+ a === "down" ? await t.deleteReaction(e.id, qe) : await t.sendReaction(
602
602
  e.id,
603
- { type: Ye },
603
+ { type: qe },
604
604
  { enforce_unique: !0, skip_push: !0 }
605
605
  );
606
606
  } catch {
@@ -619,13 +619,13 @@ 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-CphU_jG-.js")), Ws = j.lazy(() => import("./Card-BKalDyyu.js")), Xs = j.lazy(() => import("./Card-mpVcQ8-W.js")), Je = () => /* @__PURE__ */ n(
622
+ const qs = j.lazy(() => import("./Card-BmVutVEt.js")), Ws = j.lazy(() => import("./Card-CKn-iPjf.js")), Xs = j.lazy(() => import("./Card-DoBWURRU.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)]",
626
626
  "aria-hidden": !0
627
627
  }
628
- ), Ks = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), en = (e) => /* @__PURE__ */ n(We, { fallback: /* @__PURE__ */ n(Je, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Qt, Zs = en, Ft = { Composer: Ks, Sent: Qt, Received: en, Creator: Js, Visitor: Zs }, Qs = [
628
+ ), Ks = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Qt = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), en = (e) => /* @__PURE__ */ n(Xe, { fallback: /* @__PURE__ */ n(Ze, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Qt, Zs = en, Bt = { Composer: Ks, Sent: Qt, Received: en, Creator: Js, Visitor: Zs }, Qs = [
629
629
  [/pdf/, "pdf"],
630
630
  [/wordprocessingml|msword|\.doc/, "doc"],
631
631
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -635,7 +635,7 @@ const qs = j.lazy(() => import("./Card-CphU_jG-.js")), Ws = j.lazy(() => import(
635
635
  [/plain|rtf/, "text"],
636
636
  [/markdown/, "markdown"]
637
637
  ];
638
- function re(e) {
638
+ function ie(e) {
639
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
640
  }
641
641
  function tn(e) {
@@ -661,7 +661,7 @@ const ea = {
661
661
  generic: Yt
662
662
  };
663
663
  function na(e) {
664
- const t = re(e);
664
+ const t = ie(e);
665
665
  return t !== "document" ? ea[t] : ta[tn(e)];
666
666
  }
667
667
  function ce(e, t) {
@@ -682,78 +682,78 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = re(t), u = G(null), f = G(null), c = G(null), b = G(r), [_, v] = F(a), [p, w] = F(0), [A, M] = F(!1), [C, R] = F(!1), [P, D] = F(!1), [E, L] = F(!1), [I, O] = F(!0), [N, k] = F(null), S = J(() => {
686
- D(!1), v(!0);
687
- }, []), $ = J((x) => {
688
- const T = f.current;
689
- if (!T) return 0;
690
- const U = T.getBoundingClientRect();
685
+ const g = ie(t), u = H(null), f = H(null), c = H(null), b = H(r), [_, x] = F(a), [p, v] = F(0), [M, I] = F(!1), [N, z] = F(!1), [L, D] = F(!1), [E, R] = F(!1), [T, O] = F(!0), [C, k] = F(null), S = J(() => {
686
+ D(!1), x(!0);
687
+ }, []), P = J((w) => {
688
+ const A = f.current;
689
+ if (!A) return 0;
690
+ const U = A.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
- Math.min(1, (sa(x) - U.left) / U.width)
693
+ Math.min(1, (sa(w) - U.left) / U.width)
694
694
  );
695
- }, []), z = J((x) => {
696
- const T = u.current;
697
- T && T.duration && (T.currentTime = x * T.duration);
698
- }, []), H = (x) => {
699
- x.stopPropagation(), M(!0);
700
- const T = $(x);
701
- w(T), z(T);
695
+ }, []), $ = J((w) => {
696
+ const A = u.current;
697
+ A && A.duration && (A.currentTime = w * A.duration);
698
+ }, []), Y = (w) => {
699
+ w.stopPropagation(), I(!0);
700
+ const A = P(w);
701
+ v(A), $(A);
702
702
  };
703
703
  K(() => {
704
- r !== void 0 && r !== b.current && (b.current = r, v(r));
704
+ r !== void 0 && r !== b.current && (b.current = r, x(r));
705
705
  }, [r]), K(() => {
706
706
  if (!_) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
- const x = () => {
711
- const T = u.current;
712
- T && T.duration && !A && w(T.currentTime / T.duration), c.current = requestAnimationFrame(x);
710
+ const w = () => {
711
+ const A = u.current;
712
+ A && A.duration && !M && v(A.currentTime / A.duration), c.current = requestAnimationFrame(w);
713
713
  };
714
- return c.current = requestAnimationFrame(x), () => {
714
+ return c.current = requestAnimationFrame(w), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [_, A]), K(() => {
718
- const x = u.current;
719
- x && (_ ? x.play().catch((T) => {
720
- v(!1), D(!0);
721
- }) : x.pause());
717
+ }, [_, M]), K(() => {
718
+ const w = u.current;
719
+ w && (_ ? w.play().catch((A) => {
720
+ x(!1), D(!0);
721
+ }) : w.pause());
722
722
  }, [_]), K(() => {
723
- if (!A) return;
724
- const x = (U) => w($(U)), T = (U) => {
725
- M(!1), z($(U));
723
+ if (!M) return;
724
+ const w = (U) => v(P(U)), A = (U) => {
725
+ I(!1), $(P(U));
726
726
  };
727
- return window.addEventListener("mousemove", x), window.addEventListener("mouseup", T), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", T), () => {
728
- window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", T), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", T);
727
+ return window.addEventListener("mousemove", w), window.addEventListener("mouseup", A), window.addEventListener("touchmove", w, { passive: !0 }), window.addEventListener("touchend", A), () => {
728
+ window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", A), window.removeEventListener("touchmove", w), window.removeEventListener("touchend", A);
729
729
  };
730
- }, [A, $, z]);
731
- const ee = N ? { aspectRatio: String(N) } : void 0, Q = N ? "" : " aspect-video", Y = Math.round(p * 100);
730
+ }, [M, P, $]);
731
+ const Q = C ? { aspectRatio: String(C) } : void 0, Z = C ? "" : " aspect-video", V = Math.round(p * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
- className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
738
- style: ee,
739
- onClick: (x) => {
737
+ className: `relative cursor-pointer overflow-hidden bg-black ${Z}`,
738
+ style: Q,
739
+ onClick: (w) => {
740
740
  if (m) {
741
- m(x);
741
+ m(w);
742
742
  return;
743
743
  }
744
- P || l && v((T) => !T);
744
+ L || l && x((A) => !A);
745
745
  },
746
- onKeyDown: (x) => {
747
- if (!(x.key !== "Enter" && x.key !== " ")) {
748
- if (x.preventDefault(), m) {
749
- m(x);
746
+ onKeyDown: (w) => {
747
+ if (!(w.key !== "Enter" && w.key !== " ")) {
748
+ if (w.preventDefault(), m) {
749
+ m(w);
750
750
  return;
751
751
  }
752
- P || l && v((T) => !T);
752
+ L || l && x((A) => !A);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || I) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || T) && /* @__PURE__ */ n(
757
757
  "img",
758
758
  {
759
759
  src: s,
@@ -761,7 +761,7 @@ const sa = (e) => {
761
761
  className: "absolute inset-0 h-full w-full object-cover"
762
762
  }
763
763
  ),
764
- !s && (g === "audio" || I) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || T) && /* @__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
  }) }),
@@ -773,14 +773,14 @@ const sa = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => L(!0),
776
+ onLoadStart: () => R(!0),
777
777
  onCanPlay: () => {
778
- L(!1), O(!1);
778
+ R(!1), O(!1);
779
779
  },
780
- onWaiting: () => L(!0),
780
+ onWaiting: () => R(!0),
781
781
  onPlay: () => D(!1),
782
782
  onEnded: () => {
783
- i || (v(!1), w(0));
783
+ i || (x(!1), v(0));
784
784
  },
785
785
  children: /* @__PURE__ */ n("track", { kind: "captions" })
786
786
  }
@@ -793,43 +793,43 @@ const sa = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => L(!0),
796
+ onLoadStart: () => R(!0),
797
797
  onCanPlay: () => {
798
- L(!1), O(!1);
798
+ R(!1), O(!1);
799
799
  },
800
- onWaiting: () => L(!0),
800
+ onWaiting: () => R(!0),
801
801
  onPlay: () => D(!1),
802
802
  onLoadedMetadata: () => {
803
- const x = u.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && k(x.videoWidth / x.videoHeight);
803
+ const w = u.current;
804
+ w instanceof HTMLVideoElement && w.videoWidth && w.videoHeight && k(w.videoWidth / w.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
- i || (v(!1), w(0));
807
+ i || (x(!1), v(0));
808
808
  },
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(
813
- ve,
812
+ E && !L && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
+ xe,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
816
816
  weight: "bold"
817
817
  }
818
818
  ) }),
819
- P && !l && /* @__PURE__ */ n(
819
+ L && !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",
823
823
  role: "button",
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
- onClick: (x) => {
827
- x.stopPropagation(), S();
826
+ onClick: (w) => {
827
+ w.stopPropagation(), S();
828
828
  },
829
- onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), S());
829
+ onKeyDown: (w) => {
830
+ w.key !== "Enter" && w.key !== " " || (w.preventDefault(), w.stopPropagation(), S());
831
831
  },
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(je, { className: "size-9 translate-x-0.5", weight: "fill" }) })
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(Ge, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
834
834
  ),
835
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(
@@ -837,23 +837,23 @@ const sa = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": Y,
840
+ "aria-valuenow": V,
841
841
  "aria-valuemin": 0,
842
842
  "aria-valuemax": 100,
843
843
  tabIndex: 0,
844
844
  ref: f,
845
845
  className: "relative flex h-4 w-full cursor-pointer items-center",
846
- onMouseDown: H,
847
- onTouchStart: H,
848
- onClick: (x) => x.stopPropagation(),
849
- onKeyDown: (x) => {
850
- x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, p - 0.05));
846
+ onMouseDown: Y,
847
+ onTouchStart: Y,
848
+ onClick: (w) => w.stopPropagation(),
849
+ onKeyDown: (w) => {
850
+ w.key === "ArrowRight" && $(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && $(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",
854
854
  {
855
855
  className: "h-full rounded-full bg-white",
856
- style: { width: `${Y}%` }
856
+ style: { width: `${V}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -863,12 +863,12 @@ const sa = (e) => {
863
863
  "button",
864
864
  {
865
865
  type: "button",
866
- onClick: (x) => {
867
- x.stopPropagation(), v((T) => !T);
866
+ onClick: (w) => {
867
+ w.stopPropagation(), x((A) => !A);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
870
  "aria-label": _ ? "Pause" : "Play",
871
- children: _ ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(je, { className: "size-5 translate-x-px", weight: "fill" })
871
+ children: _ ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ge, { className: "size-5 translate-x-px", weight: "fill" })
872
872
  }
873
873
  ),
874
874
  /* @__PURE__ */ h(
@@ -876,30 +876,30 @@ const sa = (e) => {
876
876
  {
877
877
  role: "slider",
878
878
  "aria-label": "Playback position",
879
- "aria-valuenow": Y,
879
+ "aria-valuenow": V,
880
880
  "aria-valuemin": 0,
881
881
  "aria-valuemax": 100,
882
882
  tabIndex: 0,
883
883
  ref: f,
884
884
  className: "relative flex h-4 w-full cursor-pointer items-center",
885
- onMouseDown: H,
886
- onTouchStart: H,
887
- onClick: (x) => x.stopPropagation(),
888
- onMouseEnter: () => R(!0),
889
- onMouseLeave: () => R(!1),
890
- onKeyDown: (x) => {
891
- x.key === "ArrowRight" && z(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && z(Math.max(0, p - 0.05));
885
+ onMouseDown: Y,
886
+ onTouchStart: Y,
887
+ onClick: (w) => w.stopPropagation(),
888
+ onMouseEnter: () => z(!0),
889
+ onMouseLeave: () => z(!1),
890
+ onKeyDown: (w) => {
891
+ w.key === "ArrowRight" && $(Math.min(1, p + 0.05)), w.key === "ArrowLeft" && $(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 ${C || A ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${N || M ? "h-1.5" : "h-1"}`,
898
898
  children: /* @__PURE__ */ n(
899
899
  "div",
900
900
  {
901
901
  className: "h-full rounded-full bg-white",
902
- style: { width: `${Y}%` }
902
+ style: { width: `${V}%` }
903
903
  }
904
904
  )
905
905
  }
@@ -907,8 +907,8 @@ const sa = (e) => {
907
907
  /* @__PURE__ */ n(
908
908
  "div",
909
909
  {
910
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${C || A ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${Y}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${N || M ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${V}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -918,7 +918,7 @@ const sa = (e) => {
918
918
  ]
919
919
  }
920
920
  );
921
- }, Bt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", nn = ({
921
+ }, Ut = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", nn = ({
922
922
  mimeType: e,
923
923
  sourceUrl: t,
924
924
  thumbnailUrl: s,
@@ -927,7 +927,7 @@ const sa = (e) => {
927
927
  mediaPlayerProps: i,
928
928
  containedImage: l = !1
929
929
  }) => {
930
- const o = re(e), [d, m] = F(!1);
930
+ const o = ie(e), [d, m] = F(!1);
931
931
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ n(
932
932
  aa,
933
933
  {
@@ -976,7 +976,7 @@ const sa = (e) => {
976
976
  {
977
977
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
978
978
  children: ce(e, {
979
- className: Bt(r),
979
+ className: Ut(r),
980
980
  weight: "regular"
981
981
  })
982
982
  }
@@ -993,7 +993,7 @@ const sa = (e) => {
993
993
  {
994
994
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
995
995
  children: ce(e, {
996
- className: Bt(r),
996
+ className: Ut(r),
997
997
  weight: "regular"
998
998
  })
999
999
  }
@@ -1067,7 +1067,7 @@ const sa = (e) => {
1067
1067
  function an(e) {
1068
1068
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1069
1069
  }
1070
- function Ze(e) {
1070
+ function Qe(e) {
1071
1071
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1072
1072
  }
1073
1073
  function ia(e) {
@@ -1085,7 +1085,7 @@ function ca(e) {
1085
1085
  function da(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
- const Qe = ({ attachment: e, isMyMessage: t }) => {
1088
+ const et = ({ attachment: e, isMyMessage: t }) => {
1089
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, m = /* @__PURE__ */ h(j.Fragment, { children: [
1090
1090
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1091
1091
  "img",
@@ -1112,7 +1112,7 @@ const Qe = ({ attachment: e, isMyMessage: t }) => {
1112
1112
  function rn(e) {
1113
1113
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1114
1114
  }
1115
- function et(e) {
1115
+ function tt(e) {
1116
1116
  var t;
1117
1117
  return (t = e.attachments) == null ? void 0 : t.find(rn);
1118
1118
  }
@@ -1148,14 +1148,14 @@ const ma = ({
1148
1148
  },
1149
1149
  disabled: s,
1150
1150
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1151
- children: s ? /* @__PURE__ */ n(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1152
- /* @__PURE__ */ n(xe, { className: "size-4 text-white", weight: "bold" }),
1151
+ children: s ? /* @__PURE__ */ n(xe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(j.Fragment, { children: [
1152
+ /* @__PURE__ */ n(we, { className: "size-4 text-white", weight: "bold" }),
1153
1153
  "Download"
1154
1154
  ] })
1155
1155
  }
1156
1156
  );
1157
1157
  };
1158
- function tt(e) {
1158
+ function nt(e) {
1159
1159
  var u, f, c, b;
1160
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1161
1161
  (_) => _.type === "video" && _.asset_url
@@ -1211,7 +1211,7 @@ const on = ({
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = re(t), l = 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
  {
@@ -1237,10 +1237,10 @@ const on = ({
1237
1237
  message: e,
1238
1238
  isMyMessage: t = !1
1239
1239
  }) => {
1240
- const s = et(e), a = tt(e);
1240
+ const s = tt(e), a = nt(e);
1241
1241
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1242
1242
  !t && e.user && /* @__PURE__ */ n(
1243
- oe,
1243
+ se,
1244
1244
  {
1245
1245
  className: "str-chat__avatar str-chat__message-sender-avatar",
1246
1246
  id: e.user.id,
@@ -1258,7 +1258,7 @@ const on = ({
1258
1258
  {
1259
1259
  className: "str-chat__message-bubble",
1260
1260
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1261
- children: s ? /* @__PURE__ */ n("div", { className: Ze(t), children: /* @__PURE__ */ n(Qe, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(on, { ...a }) : /* @__PURE__ */ n(ln, { ...a })
1261
+ children: s ? /* @__PURE__ */ n("div", { className: Qe(t), children: /* @__PURE__ */ n(et, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(on, { ...a }) : /* @__PURE__ */ n(ln, { ...a })
1262
1262
  }
1263
1263
  ) })
1264
1264
  }
@@ -1267,18 +1267,18 @@ const on = ({
1267
1267
  }, fa = ({
1268
1268
  message: e
1269
1269
  }) => {
1270
- const t = et(e);
1270
+ const t = tt(e);
1271
1271
  if (t)
1272
- return /* @__PURE__ */ n("div", { className: Ze(!0), children: /* @__PURE__ */ n(Qe, { attachment: t, isMyMessage: !0 }) });
1273
- const s = tt(e);
1272
+ return /* @__PURE__ */ n("div", { className: Qe(!0), children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !0 }) });
1273
+ const s = nt(e);
1274
1274
  return s ? /* @__PURE__ */ n(on, { ...s }) : null;
1275
1275
  }, ga = ({
1276
1276
  message: e
1277
1277
  }) => {
1278
- const t = et(e);
1278
+ const t = tt(e);
1279
1279
  if (t)
1280
- return /* @__PURE__ */ n("div", { className: Ze(!1), children: /* @__PURE__ */ n(Qe, { attachment: t, isMyMessage: !1 }) });
1281
- const s = tt(e);
1280
+ return /* @__PURE__ */ n("div", { className: Qe(!1), children: /* @__PURE__ */ n(et, { attachment: t, isMyMessage: !1 }) });
1281
+ const s = nt(e);
1282
1282
  return s ? /* @__PURE__ */ n(ln, { ...s }) : null;
1283
1283
  }, yi = Object.assign(ha, {
1284
1284
  Creator: fa,
@@ -1287,9 +1287,9 @@ const on = ({
1287
1287
  isUnlocking: () => !1
1288
1288
  }, pa = {
1289
1289
  LockedAttachment: ba
1290
- }, cn = qe({}), Ci = cn.Provider;
1290
+ }, cn = We({}), Ci = cn.Provider;
1291
1291
  function va(e) {
1292
- return we(cn)[e] ?? pa[e];
1292
+ return _e(cn)[e] ?? pa[e];
1293
1293
  }
1294
1294
  const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1295
  "svg",
@@ -1314,7 +1314,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1314
1314
  }, _a = (e) => {
1315
1315
  var t;
1316
1316
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1317
- }, Ie = (e) => {
1317
+ }, Ae = (e) => {
1318
1318
  var t;
1319
1319
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1320
1320
  }, Na = (e) => {
@@ -1323,14 +1323,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1323
1323
  }, dn = (e) => wa(e) || _a(e), ya = (e) => {
1324
1324
  var t;
1325
1325
  return dn(e) && !((t = e.text) != null && t.trim());
1326
- }, ze = ({
1326
+ }, Fe = ({
1327
1327
  message: e,
1328
1328
  standalone: t = !1,
1329
1329
  isMyMessage: s = !1,
1330
1330
  hasAttachment: a = !1
1331
1331
  }) => {
1332
1332
  var u;
1333
- const r = dn(e), i = Ie(e);
1333
+ const r = dn(e), i = Ae(e);
1334
1334
  if (!r && !i)
1335
1335
  return null;
1336
1336
  if (r) {
@@ -1347,10 +1347,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1347
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
1348
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
1349
  ].join(" "), m = /* @__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(ae, { children: [
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !l ? /* @__PURE__ */ h(te, { children: [
1351
1351
  m,
1352
1352
  g
1353
- ] }) : /* @__PURE__ */ h(ae, { children: [
1353
+ ] }) : /* @__PURE__ */ h(te, { children: [
1354
1354
  g,
1355
1355
  m
1356
1356
  ] }) });
@@ -1388,7 +1388,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1388
1388
  }
1389
1389
  )
1390
1390
  ] }), ka = (e) => {
1391
- var bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St, It, Tt;
1391
+ var pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St, It, Tt, At;
1392
1392
  const {
1393
1393
  additionalMessageInputProps: t,
1394
1394
  chatbotVotingEnabled: s,
@@ -1405,83 +1405,83 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1405
1405
  message: c,
1406
1406
  renderText: b,
1407
1407
  threadList: _,
1408
- viewerLanguage: v
1409
- } = e, { client: p } = Xe("CustomMessage"), { channel: w } = de("CustomMessage"), { isUnlocking: A, onUnlockClick: M, onFetchSource: C, onDownloadClick: R } = va("LockedAttachment"), [P, D] = F(!1), E = Ln(c.id), { selected: L, voteUp: I, voteDown: O } = Hs(c), {
1410
- Attachment: N = Dn,
1408
+ viewerLanguage: x
1409
+ } = e, { client: p } = Ke("CustomMessage"), { channel: v } = de("CustomMessage"), { isUnlocking: M, onUnlockClick: I, onFetchSource: N, onDownloadClick: z } = va("LockedAttachment"), [L, D] = F(!1), E = Ln(c.id), { selected: R, voteUp: T, voteDown: O } = Hs(c), {
1410
+ Attachment: C = Dn,
1411
1411
  EditMessageModal: k = On,
1412
1412
  MessageActions: S,
1413
- MessageBlocked: $ = Pn,
1414
- MessageBouncePrompt: z = zn,
1415
- MessageDeleted: H = $n,
1416
- MessageIsThreadReplyInChannelButtonIndicator: ee = Fn,
1417
- MessageRepliesCountButton: Q = Bn,
1418
- ReminderNotification: Y = Un,
1419
- StreamedMessageText: x = jn,
1420
- PinIndicator: T
1421
- } = Gt("CustomMessage"), U = Vn(c), V = Gn(c), q = se(
1413
+ MessageBlocked: P = Pn,
1414
+ MessageBouncePrompt: $ = zn,
1415
+ MessageDeleted: Y = $n,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: Q = Fn,
1417
+ MessageRepliesCountButton: Z = Bn,
1418
+ ReminderNotification: V = Un,
1419
+ StreamedMessageText: w = jn,
1420
+ PinIndicator: A
1421
+ } = Gt("CustomMessage"), U = Vn(c), G = Gn(c), q = re(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
- ), B = se(() => {
1425
- const ge = c.attachments ?? [], Ee = c.shared_location ? [c.shared_location, ...ge] : ge;
1426
- if (!Ie(c)) return Ee;
1427
- const At = Ee.filter((Mt) => !("type" in Mt) || !rn(Mt));
1428
- return At.length === Ee.length ? Ee : At;
1429
- }, [c]), W = se(() => {
1430
- const ge = Zt({ message: c, viewerLanguage: v });
1424
+ ), B = re(() => {
1425
+ const ge = c.attachments ?? [], Se = c.shared_location ? [c.shared_location, ...ge] : ge;
1426
+ if (!Ae(c)) return Se;
1427
+ const Mt = Se.filter((Rt) => !("type" in Rt) || !rn(Rt));
1428
+ return Mt.length === Se.length ? Se : Mt;
1429
+ }, [c]), W = re(() => {
1430
+ const ge = Zt({ message: c, viewerLanguage: x });
1431
1431
  return ge === c.text ? c : { ...c, text: ge };
1432
- }, [c, v]);
1432
+ }, [c, x]);
1433
1433
  if (Hn(c))
1434
1434
  return null;
1435
1435
  if (c.deleted_at || c.type === "deleted")
1436
- return /* @__PURE__ */ n(H, { message: c });
1436
+ return /* @__PURE__ */ n(Y, { message: c });
1437
1437
  if (Yn(c))
1438
- return /* @__PURE__ */ n($, {});
1439
- const X = !_ && !!c.reply_count, ue = !_ && 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 Z;
1441
- me ? Z = () => m(c) : he && (Z = () => D(!0));
1442
- const te = f(), ie = y(
1438
+ return /* @__PURE__ */ n(P, {});
1439
+ const X = !_ && !!c.reply_count, ue = !_ && c.show_in_channel && c.parent_id, me = c.status === "failed" && ((pt = c.error) == null ? void 0 : pt.status) !== 403, he = qn(c);
1440
+ let ee;
1441
+ me ? ee = () => m(c) : he && (ee = () => D(!0));
1442
+ const ne = f(), oe = y(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
- te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1446
+ ne ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
1447
1447
  c.text ? "str-chat__message--has-text" : "has-no-text",
1448
1448
  {
1449
1449
  "str-chat__message--has-attachment": U,
1450
1450
  "str-chat__message--highlighted": g,
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
- "str-chat__message--with-reactions": V,
1453
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((pt = c == null ? void 0 : c.error) == null ? void 0 : pt.status) !== 403,
1452
+ "str-chat__message--with-reactions": G,
1453
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((vt = c == null ? void 0 : c.error) == null ? void 0 : vt.status) !== 403,
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
1457
  "str-chat__virtual-message__wrapper--group": l
1458
1458
  }
1459
- ), mt = c.poll_id && p.polls.fromState(c.poll_id), ht = ya(c), fe = Ie(c), ft = Na(c), De = !!(B != null && B.length && !c.quoted_message), gt = fe && te && De;
1460
- return /* @__PURE__ */ h(ae, { children: [
1459
+ ), ht = c.poll_id && p.polls.fromState(c.poll_id), ft = ya(c), fe = Ae(c), gt = Na(c), Pe = !!(B != null && B.length && !c.quoted_message), bt = fe && ne && Pe;
1460
+ return /* @__PURE__ */ h(te, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
1462
  k,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
1466
1466
  ),
1467
- P && /* @__PURE__ */ n(
1467
+ L && /* @__PURE__ */ n(
1468
1468
  Wn,
1469
1469
  {
1470
- MessageBouncePrompt: z,
1470
+ MessageBouncePrompt: $,
1471
1471
  onClose: () => D(!1),
1472
- open: P
1472
+ open: L
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ h(
1476
1476
  "div",
1477
1477
  {
1478
- className: ie,
1478
+ className: oe,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
- T && /* @__PURE__ */ n(T, {}),
1482
- !!E && /* @__PURE__ */ n(Y, { reminder: E }),
1481
+ A && /* @__PURE__ */ n(A, {}),
1482
+ !!E && /* @__PURE__ */ n(V, { reminder: E }),
1483
1483
  c.user && /* @__PURE__ */ n(
1484
- oe,
1484
+ se,
1485
1485
  {
1486
1486
  className: "str-chat__avatar str-chat__message-sender-avatar",
1487
1487
  id: c.user.id,
@@ -1499,85 +1499,85 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1499
1499
  "str-chat__simple-message--error-failed": me || he
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
- onClick: Z,
1503
- onKeyDown: Z,
1504
- role: Z ? "button" : void 0,
1505
- tabIndex: Z ? 0 : void 0,
1502
+ onClick: ee,
1503
+ onKeyDown: ee,
1504
+ role: ee ? "button" : void 0,
1505
+ tabIndex: ee ? 0 : void 0,
1506
1506
  style: {
1507
1507
  // Force margins to 0 to prevent hover layout shift
1508
1508
  // Stream Chat CSS sets margin-inline-end/start to 78px, then 0 on hover
1509
1509
  marginInlineEnd: 0,
1510
1510
  marginInlineStart: 0
1511
1511
  },
1512
- children: ft ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
- te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1512
+ children: gt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
+ ne ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
1514
  S && /* @__PURE__ */ n(S, {}),
1515
1515
  /* @__PURE__ */ n(
1516
- Ft.Sent,
1516
+ Bt.Sent,
1517
1517
  {
1518
- title: (vt = c.metadata) == null ? void 0 : vt.attachment_title,
1519
- mimeType: (xt = c.metadata) == null ? void 0 : xt.attachment_mime_type,
1520
- thumbnailUrl: (wt = c.metadata) == null ? void 0 : wt.attachment_thumbnail,
1521
- amountText: (_t = c.metadata) == null ? void 0 : _t.amount_text,
1522
- detail: (Nt = c.metadata) == null ? void 0 : Nt.attachment_detail,
1523
- paymentStatus: (yt = c.metadata) == null ? void 0 : yt.payment_status,
1524
- onPreviewClick: () => M == null ? void 0 : M(c, w),
1525
- onFetchSource: async () => await (C == null ? void 0 : C(c, w))
1518
+ title: (xt = c.metadata) == null ? void 0 : xt.attachment_title,
1519
+ mimeType: (wt = c.metadata) == null ? void 0 : wt.attachment_mime_type,
1520
+ thumbnailUrl: (_t = c.metadata) == null ? void 0 : _t.attachment_thumbnail,
1521
+ amountText: (Nt = c.metadata) == null ? void 0 : Nt.amount_text,
1522
+ detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1523
+ paymentStatus: (Ct = c.metadata) == null ? void 0 : Ct.payment_status,
1524
+ onPreviewClick: () => I == null ? void 0 : I(c, v),
1525
+ onFetchSource: async () => await (N == null ? void 0 : N(c, v))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1529
1529
  /* @__PURE__ */ n(
1530
- Ft.Received,
1530
+ Bt.Received,
1531
1531
  {
1532
- title: (Ct = c.metadata) == null ? void 0 : Ct.attachment_title,
1533
- mimeType: (kt = c.metadata) == null ? void 0 : kt.attachment_mime_type,
1534
- thumbnailUrl: (Et = c.metadata) == null ? void 0 : Et.attachment_thumbnail,
1535
- amountText: (St = c.metadata) == null ? void 0 : St.amount_text,
1536
- detail: (It = c.metadata) == null ? void 0 : It.attachment_detail,
1537
- paymentStatus: (Tt = c.metadata) == null ? void 0 : Tt.payment_status,
1538
- isUnlocking: A(c.id),
1539
- onUnlockClick: () => M == null ? void 0 : M(c, w),
1540
- onFetchSource: async () => await (C == null ? void 0 : C(c, w)),
1541
- onDownloadClick: () => R == null ? void 0 : R(c, w)
1532
+ title: (kt = c.metadata) == null ? void 0 : kt.attachment_title,
1533
+ mimeType: (Et = c.metadata) == null ? void 0 : Et.attachment_mime_type,
1534
+ thumbnailUrl: (St = c.metadata) == null ? void 0 : St.attachment_thumbnail,
1535
+ amountText: (It = c.metadata) == null ? void 0 : It.amount_text,
1536
+ detail: (Tt = c.metadata) == null ? void 0 : Tt.attachment_detail,
1537
+ paymentStatus: (At = c.metadata) == null ? void 0 : At.payment_status,
1538
+ isUnlocking: M(c.id),
1539
+ onUnlockClick: () => I == null ? void 0 : I(c, v),
1540
+ onFetchSource: async () => await (N == null ? void 0 : N(c, v)),
1541
+ onDownloadClick: () => z == null ? void 0 : z(c, v)
1542
1542
  }
1543
1543
  ),
1544
1544
  S && /* @__PURE__ */ n(S, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
- Lt,
1547
+ Dt,
1548
1548
  {
1549
1549
  message: W,
1550
1550
  renderText: b
1551
1551
  }
1552
1552
  ) })
1553
- ] }) : ht ? (
1553
+ ] }) : ft ? (
1554
1554
  /* Tip-only messages render as a standalone bubble */
1555
- /* @__PURE__ */ n(ze, { message: c, standalone: !0 })
1555
+ /* @__PURE__ */ n(Fe, { message: c, standalone: !0 })
1556
1556
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1557
- fe && !gt && /* @__PURE__ */ n(
1558
- ze,
1557
+ fe && !bt && /* @__PURE__ */ n(
1558
+ Fe,
1559
1559
  {
1560
1560
  message: c,
1561
- hasAttachment: De,
1562
- isMyMessage: te
1561
+ hasAttachment: Pe,
1562
+ isMyMessage: ne
1563
1563
  }
1564
1564
  ),
1565
- mt && /* @__PURE__ */ n(Xn, { poll: mt }),
1565
+ ht && /* @__PURE__ */ n(Xn, { poll: ht }),
1566
1566
  B != null && B.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- N,
1567
+ C,
1568
1568
  {
1569
1569
  actionHandler: o,
1570
1570
  attachments: B
1571
1571
  }
1572
1572
  ) : null,
1573
1573
  q ? /* @__PURE__ */ n(
1574
- x,
1574
+ w,
1575
1575
  {
1576
1576
  message: W,
1577
1577
  renderText: b
1578
1578
  }
1579
1579
  ) : /* @__PURE__ */ n(
1580
- Lt,
1580
+ Dt,
1581
1581
  {
1582
1582
  message: W,
1583
1583
  renderText: b
@@ -1587,32 +1587,32 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1587
1587
  ] }) })
1588
1588
  }
1589
1589
  ),
1590
- !ft && !ht && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
- (!fe || gt) && /* @__PURE__ */ n(
1592
- ze,
1590
+ !gt && !ft && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
+ (!fe || bt) && /* @__PURE__ */ n(
1592
+ Fe,
1593
1593
  {
1594
1594
  message: c,
1595
- hasAttachment: De,
1596
- isMyMessage: te
1595
+ hasAttachment: Pe,
1596
+ isMyMessage: ne
1597
1597
  }
1598
1598
  ),
1599
1599
  s && fe && /* @__PURE__ */ n(
1600
1600
  Ca,
1601
1601
  {
1602
- selected: L,
1603
- onVoteUp: I,
1602
+ selected: R,
1603
+ onVoteUp: T,
1604
1604
  onVoteDown: O
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
1608
  X && /* @__PURE__ */ n(
1609
- Q,
1609
+ Z,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
1613
1613
  }
1614
1614
  ),
1615
- ue && /* @__PURE__ */ n(ee, {})
1615
+ ue && /* @__PURE__ */ n(Q, {})
1616
1616
  ]
1617
1617
  },
1618
1618
  c.id
@@ -1622,11 +1622,11 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1622
1622
  ka,
1623
1623
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1624
1624
  ), Sa = (e) => {
1625
- const t = _e("CustomMessage");
1625
+ const t = Ne("CustomMessage");
1626
1626
  return /* @__PURE__ */ n(Ea, { ...t, ...e });
1627
1627
  }, Ia = () => {
1628
1628
  var s;
1629
- const { handleDelete: e, message: t } = _e("CustomMessageActions");
1629
+ const { handleDelete: e, message: t } = Ne("CustomMessageActions");
1630
1630
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1631
1631
  Wt,
1632
1632
  {
@@ -1638,7 +1638,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1638
1638
  }
1639
1639
  );
1640
1640
  }, Ta = () => {
1641
- const { handleFlag: e } = _e("CustomMessageActions");
1641
+ const { handleFlag: e } = Ne("CustomMessageActions");
1642
1642
  return /* @__PURE__ */ n(
1643
1643
  Wt,
1644
1644
  {
@@ -1651,7 +1651,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1651
1651
  );
1652
1652
  }, Aa = () => {
1653
1653
  var t;
1654
- const { message: e } = _e("CustomMessageActions");
1654
+ const { message: e } = Ne("CustomMessageActions");
1655
1655
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1656
1656
  Os,
1657
1657
  {
@@ -1691,7 +1691,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1691
1691
  },
1692
1692
  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",
1693
1693
  "aria-label": "Close link preview",
1694
- children: /* @__PURE__ */ n(Re, { className: "size-4 text-black/90" })
1694
+ children: /* @__PURE__ */ n(De, { className: "size-4 text-black/90" })
1695
1695
  }
1696
1696
  ),
1697
1697
  /* @__PURE__ */ h("div", { className: "p-2", children: [
@@ -1703,7 +1703,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1703
1703
  );
1704
1704
  }, Ra = (e) => ({
1705
1705
  linkPreviews: Array.from(e.previews.values()).filter(
1706
- (t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
1706
+ (t) => Lt.previewIsLoaded(t) || Lt.previewIsLoading(t)
1707
1707
  )
1708
1708
  }), La = () => {
1709
1709
  const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
@@ -1720,7 +1720,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, nt = j.createContext(!1), ki = () => we(nt), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, st = j.createContext(!1), ki = () => _e(st), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1731,7 +1731,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1731
1731
  children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
1732
1732
  }
1733
1733
  ), Oa = () => {
1734
- const e = we(nt), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1734
+ const e = _e(st), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1735
1735
  SendButton: r = Da,
1736
1736
  AttachmentPreviewList: i = ns
1737
1737
  } = Gt("CustomMessageInput");
@@ -1773,7 +1773,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1773
1773
  }) => {
1774
1774
  var o;
1775
1775
  const { channel: i } = de(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
1776
- return s ? /* @__PURE__ */ h(ae, { children: [
1776
+ return s ? /* @__PURE__ */ h(te, { children: [
1777
1777
  /* @__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 }),
1778
1778
  t == null ? void 0 : t()
1779
1779
  ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -1785,7 +1785,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1785
1785
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1786
1786
  children: [
1787
1787
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1788
- /* @__PURE__ */ n(nt.Provider, { value: l, children: /* @__PURE__ */ n(Qn, { Input: r ?? Oa }) })
1788
+ /* @__PURE__ */ n(st.Provider, { value: l, children: /* @__PURE__ */ n(Qn, { Input: r ?? Oa }) })
1789
1789
  ]
1790
1790
  }
1791
1791
  ),
@@ -1801,10 +1801,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1801
1801
  "SYSTEM_AGE_SAFETY_BLOCKED"
1802
1802
  ], Ba = {
1803
1803
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1804
- }, $e = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", Ut = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1804
+ }, Be = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", jt = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1805
1805
  var a;
1806
1806
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1807
- if (Ut(t))
1807
+ if (jt(t))
1808
1808
  return {
1809
1809
  kind: "dm-agent",
1810
1810
  type: t
@@ -1815,17 +1815,17 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1815
1815
  type: t
1816
1816
  };
1817
1817
  const s = e.dm_agent_system_type;
1818
- if (Ut(s))
1818
+ if (jt(s))
1819
1819
  return {
1820
1820
  kind: "dm-agent",
1821
1821
  type: s
1822
1822
  };
1823
1823
  }, Ga = (e) => {
1824
- const t = e.indexOf($e);
1824
+ const t = e.indexOf(Be);
1825
1825
  if (t === -1)
1826
1826
  return e;
1827
- const s = t + $e.length;
1828
- return /* @__PURE__ */ h(ae, { children: [
1827
+ const s = t + Be.length;
1828
+ return /* @__PURE__ */ h(te, { children: [
1829
1829
  e.slice(0, t),
1830
1830
  /* @__PURE__ */ n(
1831
1831
  "a",
@@ -1834,7 +1834,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1834
1834
  target: "_blank",
1835
1835
  rel: "noopener noreferrer",
1836
1836
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1837
- children: $e
1837
+ children: Be
1838
1838
  }
1839
1839
  ),
1840
1840
  e.slice(s)
@@ -1855,7 +1855,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1855
1855
  "data-dm-agent-system-type": s.type,
1856
1856
  children: [
1857
1857
  /* @__PURE__ */ n(
1858
- Ve,
1858
+ pe,
1859
1859
  {
1860
1860
  size: 16,
1861
1861
  weight: "regular",
@@ -1867,7 +1867,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1867
1867
  ]
1868
1868
  }
1869
1869
  ),
1870
- !t && /* @__PURE__ */ n(Oe, { message: e.message })
1870
+ !t && /* @__PURE__ */ n(ze, { message: e.message })
1871
1871
  ] });
1872
1872
  }
1873
1873
  if ((s == null ? void 0 : s.kind) === "age-safety") {
@@ -1894,7 +1894,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1894
1894
  ]
1895
1895
  }
1896
1896
  ),
1897
- !t && /* @__PURE__ */ n(Oe, { message: e.message })
1897
+ !t && /* @__PURE__ */ n(ze, { message: e.message })
1898
1898
  ] });
1899
1899
  }
1900
1900
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1903,9 +1903,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1903
1903
  /* @__PURE__ */ n("p", { children: e.message.text }),
1904
1904
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1905
1905
  ] }),
1906
- !t && /* @__PURE__ */ n(Oe, { message: e.message })
1906
+ !t && /* @__PURE__ */ n(ze, { message: e.message })
1907
1907
  ] });
1908
- }, un = qe(!1), Fe = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1908
+ }, un = We(!1), Ue = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1909
1909
  "animateTransform",
1910
1910
  {
1911
1911
  attributeName: "transform",
@@ -1916,20 +1916,20 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1916
1916
  repeatCount: "indefinite"
1917
1917
  }
1918
1918
  ) }), Ya = /* @__PURE__ */ new Set([
1919
- Pe.Thinking,
1920
- Pe.Generating,
1921
- Pe.ExternalSources
1919
+ $e.Thinking,
1920
+ $e.Generating,
1921
+ $e.ExternalSources
1922
1922
  ]), qa = ({ threadList: e }) => {
1923
1923
  var b, _;
1924
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Xe(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = we(un);
1924
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = Ke(), { typing: i = {} } = rs(), { aiState: l } = is(t), o = _e(un);
1925
1925
  if (!e && o && Ya.has(l)) {
1926
- const v = Wa(t, (b = r.user) == null ? void 0 : b.id);
1926
+ const x = Wa(t, (b = r.user) == null ? void 0 : b.id);
1927
1927
  return /* @__PURE__ */ n(
1928
- jt,
1928
+ Vt,
1929
1929
  {
1930
- avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
1931
- avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
1932
- avatarImage: v == null ? void 0 : v.image,
1930
+ avatarId: (x == null ? void 0 : x.id) ?? "ai-agent",
1931
+ avatarName: (x == null ? void 0 : x.name) ?? (x == null ? void 0 : x.id) ?? "Agent",
1932
+ avatarImage: x == null ? void 0 : x.image,
1933
1933
  testId: "typing-indicator-ai"
1934
1934
  }
1935
1935
  );
@@ -1937,21 +1937,21 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1937
1937
  if ((s == null ? void 0 : s.typing_events) === !1)
1938
1938
  return null;
1939
1939
  const m = e ? [] : Object.values(i).filter(
1940
- ({ parent_id: v, user: p }) => {
1941
- var w;
1942
- return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && !v;
1940
+ ({ parent_id: x, user: p }) => {
1941
+ var v;
1942
+ return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && !x;
1943
1943
  }
1944
1944
  ), g = e ? Object.values(i).filter(
1945
- ({ parent_id: v, user: p }) => {
1946
- var w;
1947
- return (p == null ? void 0 : p.id) !== ((w = r.user) == null ? void 0 : w.id) && v === (a == null ? void 0 : a.id);
1945
+ ({ parent_id: x, user: p }) => {
1946
+ var v;
1947
+ return (p == null ? void 0 : p.id) !== ((v = r.user) == null ? void 0 : v.id) && x === (a == null ? void 0 : a.id);
1948
1948
  }
1949
1949
  ) : [], u = e ? g : m;
1950
1950
  if (!u.length)
1951
1951
  return null;
1952
1952
  const f = (_ = u[0]) == null ? void 0 : _.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1953
1953
  return /* @__PURE__ */ n(
1954
- jt,
1954
+ Vt,
1955
1955
  {
1956
1956
  avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
1957
1957
  avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
@@ -1959,7 +1959,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1959
1959
  testId: "typing-indicator"
1960
1960
  }
1961
1961
  );
1962
- }, jt = ({
1962
+ }, Vt = ({
1963
1963
  avatarId: e,
1964
1964
  avatarName: t,
1965
1965
  avatarImage: s,
@@ -1974,7 +1974,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1974
1974
  },
1975
1975
  children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
1976
1976
  /* @__PURE__ */ n(
1977
- oe,
1977
+ se,
1978
1978
  {
1979
1979
  className: "str-chat__avatar str-chat__message-sender-avatar",
1980
1980
  id: e,
@@ -1994,9 +1994,9 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1994
1994
  height: "13",
1995
1995
  overflow: "visible",
1996
1996
  children: [
1997
- /* @__PURE__ */ n(Fe, { cx: "4", index: 0 }),
1998
- /* @__PURE__ */ n(Fe, { cx: "16", index: 1 }),
1999
- /* @__PURE__ */ n(Fe, { cx: "28", index: 2 })
1997
+ /* @__PURE__ */ n(Ue, { cx: "4", index: 0 }),
1998
+ /* @__PURE__ */ n(Ue, { cx: "16", index: 1 }),
1999
+ /* @__PURE__ */ n(Ue, { cx: "28", index: 2 })
2000
2000
  ]
2001
2001
  }
2002
2002
  ) }) }) }) }) })
@@ -2055,12 +2055,12 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2055
2055
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2056
2056
  ]
2057
2057
  }
2058
- ), Te = j.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2058
+ ), Me = 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: [
2059
2059
  /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2060
2060
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2061
2061
  ] }) }));
2062
- Te.displayName = "LoadingState";
2063
- const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", Ja = ({
2062
+ Me.displayName = "LoadingState";
2063
+ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Te = "Replies instantly with AI assistant", Ja = ({
2064
2064
  onBack: e,
2065
2065
  showBackButton: t,
2066
2066
  showStarButton: s = !1,
@@ -2077,28 +2077,31 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2077
2077
  renderChannelActions: c,
2078
2078
  showChannelInfo: b = !0,
2079
2079
  onParticipantNameClick: _,
2080
- renderHeaderTitleBadges: v
2080
+ renderHeaderTitleBadges: x
2081
2081
  }) => {
2082
- var D, E, L, I, O;
2083
- const { channel: p } = de(), w = j.useMemo(() => {
2084
- var S, $;
2085
- const N = (S = p._client) == null ? void 0 : S.userID;
2086
- return N ? Object.values((($ = p.state) == null ? void 0 : $.members) || {}).find(
2087
- (z) => {
2088
- var H;
2089
- return ((H = z.user) == null ? void 0 : H.id) && z.user.id !== N;
2082
+ var E, R, T, O, C, k, S;
2083
+ const { channel: p } = de(), v = j.useMemo(() => {
2084
+ var Y, Q;
2085
+ const P = (Y = p._client) == null ? void 0 : Y.userID;
2086
+ return P ? Object.values(((Q = p.state) == null ? void 0 : Q.members) || {}).find(
2087
+ (Z) => {
2088
+ var V;
2089
+ return ((V = Z.user) == null ? void 0 : V.id) && Z.user.id !== P;
2090
2090
  }
2091
2091
  ) : void 0;
2092
- }, [(D = p._client) == null ? void 0 : D.userID, (E = p.state) == null ? void 0 : E.members]), A = Jt(w == null ? void 0 : w.user), M = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, C = Kt(p), R = v == null ? void 0 : v({
2092
+ }, [(E = p._client) == null ? void 0 : E.userID, (R = p.state) == null ? void 0 : R.members]), M = Jt(v == null ? void 0 : v.user), I = (T = v == null ? void 0 : v.user) == null ? void 0 : T.image, N = Kt(p), z = x == null ? void 0 : x({
2093
2093
  channel: p,
2094
- participant: w
2095
- }), P = async () => {
2094
+ participant: v
2095
+ }), L = /* @__PURE__ */ h(te, { children: [
2096
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: M }),
2097
+ z && /* @__PURE__ */ n("span", { className: "shrink-0", children: z })
2098
+ ] }), D = async () => {
2096
2099
  try {
2097
- C ? await p.unpin() : await p.pin();
2098
- } catch (N) {
2100
+ N ? await p.unpin() : await p.pin();
2101
+ } catch (P) {
2099
2102
  console.error(
2100
2103
  "[CustomChannelHeader] Failed to update pinned status:",
2101
- N
2104
+ P
2102
2105
  );
2103
2106
  }
2104
2107
  };
@@ -2115,68 +2118,81 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2115
2118
  }),
2116
2119
  type: "button",
2117
2120
  "aria-label": "Back to conversations",
2118
- children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2121
+ children: /* @__PURE__ */ n(Pt, { className: "size-5 text-black/90" })
2119
2122
  }
2120
2123
  ) }),
2121
- /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2124
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-1 items-center", children: _ ? /* @__PURE__ */ h(
2125
+ "button",
2126
+ {
2127
+ type: "button",
2128
+ onClick: _,
2129
+ "aria-label": `View details for ${M}`,
2130
+ className: "flex max-w-full flex-col items-center gap-1 appearance-none rounded border-0 bg-transparent p-0 text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none",
2131
+ children: [
2132
+ /* @__PURE__ */ n(
2133
+ se,
2134
+ {
2135
+ id: ((O = v == null ? void 0 : v.user) == null ? void 0 : O.id) || p.id || "unknown",
2136
+ name: M,
2137
+ image: I,
2138
+ starred: s && N,
2139
+ dmAgentEnabled: a,
2140
+ size: 48
2141
+ }
2142
+ ),
2143
+ /* @__PURE__ */ h("span", { className: "flex max-w-full items-center gap-0.5", children: [
2144
+ L,
2145
+ /* @__PURE__ */ n(He, { className: "size-3 shrink-0", weight: "bold" })
2146
+ ] }),
2147
+ a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2148
+ /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2149
+ /* @__PURE__ */ n("span", { children: Te })
2150
+ ] })
2151
+ ]
2152
+ }
2153
+ ) : /* @__PURE__ */ h(te, { children: [
2122
2154
  /* @__PURE__ */ n(
2123
- oe,
2155
+ se,
2124
2156
  {
2125
- id: ((I = w == null ? void 0 : w.user) == null ? void 0 : I.id) || p.id || "unknown",
2126
- name: A,
2127
- image: M,
2128
- starred: s && C,
2157
+ id: ((C = v == null ? void 0 : v.user) == null ? void 0 : C.id) || p.id || "unknown",
2158
+ name: M,
2159
+ image: I,
2160
+ starred: s && N,
2129
2161
  dmAgentEnabled: a,
2130
2162
  size: 48
2131
2163
  }
2132
2164
  ),
2133
- _ ? /* @__PURE__ */ h(
2134
- "button",
2135
- {
2136
- type: "button",
2137
- onClick: _,
2138
- "aria-label": `View details for ${A}`,
2139
- className: "flex max-w-full items-center gap-0.5 rounded text-center text-xs font-medium text-black/90 transition-opacity hover:opacity-70",
2140
- children: [
2141
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2142
- R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
2143
- /* @__PURE__ */ n(Ge, { className: "size-3 shrink-0", weight: "bold" })
2144
- ]
2145
- }
2146
- ) : /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2147
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2148
- R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
2149
- ] }),
2165
+ /* @__PURE__ */ n("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: L }),
2150
2166
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2151
- /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
2152
- /* @__PURE__ */ n("span", { children: Vt })
2167
+ /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2168
+ /* @__PURE__ */ n("span", { children: Te })
2153
2169
  ] })
2154
- ] }),
2170
+ ] }) }),
2155
2171
  /* @__PURE__ */ h("div", { className: "flex justify-end items-center gap-2", children: [
2156
2172
  s && /* @__PURE__ */ n(
2157
2173
  "button",
2158
2174
  {
2159
2175
  className: le,
2160
- onClick: P,
2176
+ onClick: D,
2161
2177
  type: "button",
2162
- "aria-label": C ? "Unstar conversation" : "Star conversation",
2178
+ "aria-label": N ? "Unstar conversation" : "Star conversation",
2163
2179
  children: /* @__PURE__ */ n(
2164
- Ue,
2180
+ Ve,
2165
2181
  {
2166
2182
  className: y("size-5", {
2167
- "text-yellow-600": C,
2168
- "text-black/90": !C
2183
+ "text-yellow-600": N,
2184
+ "text-black/90": !N
2169
2185
  }),
2170
- weight: C ? "duotone" : "regular"
2186
+ weight: N ? "duotone" : "regular"
2171
2187
  }
2172
2188
  )
2173
2189
  }
2174
2190
  ),
2175
2191
  b && (c !== void 0 ? c : /* @__PURE__ */ n(
2176
- $t,
2192
+ Ft,
2177
2193
  {
2178
2194
  channel: p,
2179
- participant: w,
2195
+ participant: v,
2180
2196
  showDeleteConversation: l,
2181
2197
  showBlockParticipant: o,
2182
2198
  showReportParticipant: d,
@@ -2203,41 +2219,58 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2203
2219
  type: "button",
2204
2220
  onClick: e,
2205
2221
  "aria-label": "Back to conversations",
2206
- children: /* @__PURE__ */ n(Ot, { className: "size-5 text-black/90" })
2222
+ children: /* @__PURE__ */ n(Pt, { className: "size-5 text-black/90" })
2207
2223
  }
2208
2224
  ),
2209
- /* @__PURE__ */ n(
2210
- oe,
2225
+ _ ? /* @__PURE__ */ h(
2226
+ "button",
2211
2227
  {
2212
- id: ((O = w == null ? void 0 : w.user) == null ? void 0 : O.id) || p.id || "unknown",
2213
- name: A,
2214
- image: M,
2215
- starred: s && C,
2216
- dmAgentEnabled: a,
2217
- size: 48
2228
+ type: "button",
2229
+ onClick: _,
2230
+ "aria-label": `View details for ${M}`,
2231
+ className: "flex min-w-0 max-w-full items-center gap-4 appearance-none rounded border-0 bg-transparent p-0 text-left text-black/90 transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none",
2232
+ children: [
2233
+ /* @__PURE__ */ n(
2234
+ se,
2235
+ {
2236
+ id: ((k = v == null ? void 0 : v.user) == null ? void 0 : k.id) || p.id || "unknown",
2237
+ name: M,
2238
+ image: I,
2239
+ starred: s && N,
2240
+ dmAgentEnabled: a,
2241
+ size: 48
2242
+ }
2243
+ ),
2244
+ /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2245
+ /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2246
+ L,
2247
+ /* @__PURE__ */ n(He, { className: "size-4 shrink-0", weight: "bold" })
2248
+ ] }),
2249
+ a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2250
+ /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2251
+ /* @__PURE__ */ n("span", { className: "truncate", children: Te })
2252
+ ] })
2253
+ ] })
2254
+ ]
2218
2255
  }
2219
- ),
2220
- /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2221
- _ ? /* @__PURE__ */ h(
2222
- "button",
2256
+ ) : /* @__PURE__ */ h(te, { children: [
2257
+ /* @__PURE__ */ n(
2258
+ se,
2223
2259
  {
2224
- type: "button",
2225
- onClick: _,
2226
- "aria-label": `View details for ${A}`,
2227
- className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2228
- children: [
2229
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2230
- R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R }),
2231
- /* @__PURE__ */ n(Ge, { className: "size-4 shrink-0", weight: "bold" })
2232
- ]
2260
+ id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) || p.id || "unknown",
2261
+ name: M,
2262
+ image: I,
2263
+ starred: s && N,
2264
+ dmAgentEnabled: a,
2265
+ size: 48
2233
2266
  }
2234
- ) : /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2235
- /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: A }),
2236
- R && /* @__PURE__ */ n("span", { className: "shrink-0", children: R })
2237
- ] }),
2238
- a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2239
- /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0 text-black/55" }),
2240
- /* @__PURE__ */ n("span", { className: "truncate", children: Vt })
2267
+ ),
2268
+ /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2269
+ /* @__PURE__ */ n("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: L }),
2270
+ a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2271
+ /* @__PURE__ */ n(pe, { className: "size-3 shrink-0 text-black/55" }),
2272
+ /* @__PURE__ */ n("span", { className: "truncate", children: Te })
2273
+ ] })
2241
2274
  ] })
2242
2275
  ] })
2243
2276
  ] }),
@@ -2246,26 +2279,26 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2246
2279
  "button",
2247
2280
  {
2248
2281
  className: le,
2249
- onClick: P,
2282
+ onClick: D,
2250
2283
  type: "button",
2251
- "aria-label": C ? "Unstar conversation" : "Star conversation",
2284
+ "aria-label": N ? "Unstar conversation" : "Star conversation",
2252
2285
  children: /* @__PURE__ */ n(
2253
- Ue,
2286
+ Ve,
2254
2287
  {
2255
2288
  className: y("size-6", {
2256
- "text-yellow-600": C,
2257
- "text-black/90": !C
2289
+ "text-yellow-600": N,
2290
+ "text-black/90": !N
2258
2291
  }),
2259
- weight: C ? "duotone" : "regular"
2292
+ weight: N ? "duotone" : "regular"
2260
2293
  }
2261
2294
  )
2262
2295
  }
2263
2296
  ),
2264
2297
  b && (c !== void 0 ? c : /* @__PURE__ */ n(
2265
- $t,
2298
+ Ft,
2266
2299
  {
2267
2300
  channel: p,
2268
- participant: w,
2301
+ participant: v,
2269
2302
  showDeleteConversation: l,
2270
2303
  showBlockParticipant: o,
2271
2304
  showReportParticipant: d,
@@ -2298,54 +2331,54 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2298
2331
  composerDisabled: c = !1,
2299
2332
  composerDisabledReason: b,
2300
2333
  showStarButton: _ = !1,
2301
- chatbotVotingEnabled: v = !1,
2334
+ chatbotVotingEnabled: x = !1,
2302
2335
  renderChannelBanner: p,
2303
- renderHeaderTitleBadges: w,
2304
- customChannelActions: A,
2305
- renderChannelActions: M,
2306
- renderMessage: C,
2307
- dmAgentEnabled: R = !1,
2308
- viewerLanguage: P,
2336
+ renderHeaderTitleBadges: v,
2337
+ customChannelActions: M,
2338
+ renderChannelActions: I,
2339
+ renderMessage: N,
2340
+ dmAgentEnabled: z = !1,
2341
+ viewerLanguage: L,
2309
2342
  showChannelInfo: D = !0,
2310
2343
  onParticipantNameClick: E,
2311
- composerInput: L
2344
+ composerInput: R
2312
2345
  }) => {
2313
- var H, ee, Q, Y, x, T;
2314
- const { channel: I } = de(), O = j.useMemo(() => {
2346
+ var Y, Q, Z, V, w, A;
2347
+ const { channel: T } = de(), O = j.useMemo(() => {
2315
2348
  var q, B;
2316
- const U = (q = I._client) == null ? void 0 : q.userID;
2317
- return U ? Object.values(((B = I.state) == null ? void 0 : B.members) || {}).find(
2349
+ const U = (q = T._client) == null ? void 0 : q.userID;
2350
+ return U ? Object.values(((B = T.state) == null ? void 0 : B.members) || {}).find(
2318
2351
  (W) => {
2319
2352
  var X;
2320
2353
  return ((X = W.user) == null ? void 0 : X.id) && W.user.id !== U;
2321
2354
  }
2322
2355
  ) : void 0;
2323
- }, [(H = I._client) == null ? void 0 : H.userID, (ee = I.state) == null ? void 0 : ee.members]), N = j.useMemo(() => {
2356
+ }, [(Y = T._client) == null ? void 0 : Y.userID, (Q = T.state) == null ? void 0 : Q.members]), C = j.useMemo(() => {
2324
2357
  var q, B;
2325
- const U = (q = I._client) == null ? void 0 : q.userID;
2326
- return U ? Object.values(((B = I.state) == null ? void 0 : B.members) || {}).find((W) => {
2358
+ const U = (q = T._client) == null ? void 0 : q.userID;
2359
+ return U ? Object.values(((B = T.state) == null ? void 0 : B.members) || {}).find((W) => {
2327
2360
  var X;
2328
2361
  return ((X = W.user) == null ? void 0 : X.id) === U;
2329
2362
  }) : void 0;
2330
- }, [(Q = I._client) == null ? void 0 : Q.userID, (Y = I.state) == null ? void 0 : Y.members]), k = ((x = N == null ? void 0 : N.user) == null ? void 0 : x.is_account) ?? (N == null ? void 0 : N.is_account), S = ((T = O == null ? void 0 : O.user) == null ? void 0 : T.is_account) ?? (O == null ? void 0 : O.is_account), $ = R && k === !1 && S === !0, z = J(
2363
+ }, [(Z = T._client) == null ? void 0 : Z.userID, (V = T.state) == null ? void 0 : V.members]), k = ((w = C == null ? void 0 : C.user) == null ? void 0 : w.is_account) ?? (C == null ? void 0 : C.is_account), S = ((A = O == null ? void 0 : O.user) == null ? void 0 : A.is_account) ?? (O == null ? void 0 : O.is_account), P = z && k === !1 && S === !0, $ = J(
2331
2364
  (U) => {
2332
- const { message: V } = _e("ChannelView"), q = /* @__PURE__ */ n(
2365
+ const { message: G } = Ne("ChannelView"), q = /* @__PURE__ */ n(
2333
2366
  Sa,
2334
2367
  {
2335
2368
  ...U,
2336
- chatbotVotingEnabled: v,
2337
- viewerLanguage: P
2369
+ chatbotVotingEnabled: x,
2370
+ viewerLanguage: L
2338
2371
  }
2339
2372
  );
2340
- return !C || !V ? q : C(q, V);
2373
+ return !N || !G ? q : N(q, G);
2341
2374
  },
2342
- [v, C, P]
2375
+ [x, N, L]
2343
2376
  );
2344
- return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ n(
2377
+ return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
2345
2378
  ls,
2346
2379
  {
2347
2380
  overrides: {
2348
- Message: z,
2381
+ Message: $,
2349
2382
  MessageActions: Aa
2350
2383
  },
2351
2384
  children: /* @__PURE__ */ h(cs, { children: [
@@ -2356,7 +2389,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2356
2389
  showBackButton: t,
2357
2390
  showChannelInfo: D,
2358
2391
  showStarButton: _,
2359
- dmAgentEnabled: $,
2392
+ dmAgentEnabled: P,
2360
2393
  onLeaveConversation: i,
2361
2394
  onBlockParticipant: l,
2362
2395
  showDeleteConversation: o,
@@ -2365,10 +2398,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2365
2398
  onDeleteConversationClick: d,
2366
2399
  onBlockParticipantClick: m,
2367
2400
  onReportParticipantClick: g,
2368
- customChannelActions: A,
2369
- renderChannelActions: M,
2401
+ customChannelActions: M,
2402
+ renderChannelActions: I,
2370
2403
  onParticipantNameClick: E,
2371
- renderHeaderTitleBadges: w
2404
+ renderHeaderTitleBadges: v
2372
2405
  }
2373
2406
  ) }, "lt-channel-header"),
2374
2407
  p ? /* @__PURE__ */ n(j.Fragment, { children: p() }, "lt-channel-banner") : null,
@@ -2380,17 +2413,17 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2380
2413
  },
2381
2414
  "lt-channel-message-list"
2382
2415
  ),
2383
- r ? /* @__PURE__ */ n(j.Fragment, { children: r(I) }, "lt-channel-conversation-footer") : null,
2416
+ r ? /* @__PURE__ */ n(j.Fragment, { children: r(T) }, "lt-channel-conversation-footer") : null,
2384
2417
  /* @__PURE__ */ n(
2385
2418
  Pa,
2386
2419
  {
2387
2420
  ...s && {
2388
- renderActions: () => s == null ? void 0 : s(I)
2421
+ renderActions: () => s == null ? void 0 : s(T)
2389
2422
  },
2390
- renderFooter: () => a == null ? void 0 : a(I),
2423
+ renderFooter: () => a == null ? void 0 : a(T),
2391
2424
  disabled: c,
2392
2425
  disabledReason: b,
2393
- composerInput: L
2426
+ composerInput: R
2394
2427
  },
2395
2428
  "lt-channel-message-input"
2396
2429
  )
@@ -2415,76 +2448,76 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2415
2448
  onReportParticipantClick: c,
2416
2449
  showBlockParticipant: b = !0,
2417
2450
  showReportParticipant: _ = !0,
2418
- composerDisabled: v = !1,
2451
+ composerDisabled: x = !1,
2419
2452
  composerDisabledReason: p,
2420
- dmAgentEnabled: w,
2421
- messageMetadata: A,
2422
- onMessageSent: M,
2423
- showStarButton: C = !1,
2424
- chatbotVotingEnabled: R = !1,
2425
- renderChannelBanner: P,
2453
+ dmAgentEnabled: v,
2454
+ messageMetadata: M,
2455
+ onMessageSent: I,
2456
+ showStarButton: N = !1,
2457
+ chatbotVotingEnabled: z = !1,
2458
+ renderChannelBanner: L,
2426
2459
  renderHeaderTitleBadges: D,
2427
2460
  customChannelActions: E,
2428
- renderChannelActions: L,
2429
- renderMessage: I,
2461
+ renderChannelActions: R,
2462
+ renderMessage: T,
2430
2463
  onMessageLinkClick: O,
2431
- sendButton: N,
2464
+ sendButton: C,
2432
2465
  attachmentPreviewList: k,
2433
2466
  viewerLanguage: S,
2434
- showChannelInfo: $ = !0,
2435
- onParticipantNameClick: z,
2436
- composerInput: H
2467
+ showChannelInfo: P = !0,
2468
+ onParticipantNameClick: $,
2469
+ composerInput: Y
2437
2470
  }) => {
2438
- const ee = J(
2439
- async (Y, x, T) => {
2471
+ const Q = J(
2472
+ async (V, w, A) => {
2440
2473
  var X;
2441
- const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, V = w && !U, q = {
2442
- ...x,
2443
- ...V && { silent: !0 },
2444
- ...A && {
2474
+ const U = ((X = e.data) == null ? void 0 : X.chatbot_paused) === !0, G = v && !U, q = {
2475
+ ...w,
2476
+ ...G && { silent: !0 },
2477
+ ...M && {
2445
2478
  metadata: {
2446
- ...x.metadata ?? {},
2447
- ...A
2479
+ ...w.metadata ?? {},
2480
+ ...M
2448
2481
  }
2449
2482
  }
2450
2483
  }, B = {
2451
- ...T,
2452
- ...V && { skip_push: !0 }
2484
+ ...A,
2485
+ ...G && { skip_push: !0 }
2453
2486
  }, W = await e.sendMessage(q, B);
2454
- return M == null || M(W), W;
2487
+ return I == null || I(W), W;
2455
2488
  },
2456
- [e, w, A, M]
2457
- ), Q = G(null);
2489
+ [e, v, M, I]
2490
+ ), Z = H(null);
2458
2491
  return K(() => {
2459
2492
  if (!O) return;
2460
- const Y = Q.current;
2461
- if (!Y) return;
2462
- const x = (T) => {
2463
- const U = T.target, V = U == null ? void 0 : U.closest("a[href]"), q = V == null ? void 0 : V.getAttribute("href");
2493
+ const V = Z.current;
2494
+ if (!V) return;
2495
+ const w = (A) => {
2496
+ const U = A.target, G = U == null ? void 0 : U.closest("a[href]"), q = G == null ? void 0 : G.getAttribute("href");
2464
2497
  if (!q) return;
2465
- const B = V == null ? void 0 : V.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;
2498
+ const B = G == null ? void 0 : G.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;
2466
2499
  O(q, X);
2467
2500
  };
2468
- return Y.addEventListener("click", x), () => Y.removeEventListener("click", x);
2501
+ return V.addEventListener("click", w), () => V.removeEventListener("click", w);
2469
2502
  }, [O, e]), /* @__PURE__ */ n(
2470
2503
  "div",
2471
2504
  {
2472
- ref: Q,
2505
+ ref: Z,
2473
2506
  className: y(
2474
2507
  "messaging-channel-view h-full flex flex-col",
2475
2508
  d
2476
2509
  ),
2477
- children: /* @__PURE__ */ n(un.Provider, { value: w ?? !1, children: /* @__PURE__ */ n(
2510
+ children: /* @__PURE__ */ n(un.Provider, { value: v ?? !1, children: /* @__PURE__ */ n(
2478
2511
  os,
2479
2512
  {
2480
2513
  channel: e,
2481
2514
  MessageSystem: Ha,
2482
2515
  EmptyStateIndicator: m,
2483
- LoadingIndicator: Te,
2516
+ LoadingIndicator: Me,
2484
2517
  DateSeparator: Vs,
2485
2518
  TypingIndicator: qa,
2486
- doSendMessageRequest: ee,
2487
- ...N ? { SendButton: N } : {},
2519
+ doSendMessageRequest: Q,
2520
+ ...C ? { SendButton: C } : {},
2488
2521
  ...k ? { AttachmentPreviewList: k } : {},
2489
2522
  children: /* @__PURE__ */ n(
2490
2523
  Za,
@@ -2503,20 +2536,20 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2503
2536
  onReportParticipantClick: c,
2504
2537
  showBlockParticipant: b,
2505
2538
  showReportParticipant: _,
2506
- composerDisabled: v,
2539
+ composerDisabled: x,
2507
2540
  composerDisabledReason: p,
2508
- showStarButton: C,
2509
- dmAgentEnabled: w,
2510
- chatbotVotingEnabled: R,
2511
- renderChannelBanner: P,
2541
+ showStarButton: N,
2542
+ dmAgentEnabled: v,
2543
+ chatbotVotingEnabled: z,
2544
+ renderChannelBanner: L,
2512
2545
  renderHeaderTitleBadges: D,
2513
2546
  customChannelActions: E,
2514
- renderChannelActions: L,
2515
- renderMessage: I,
2547
+ renderChannelActions: R,
2548
+ renderMessage: T,
2516
2549
  viewerLanguage: S,
2517
- showChannelInfo: $,
2518
- onParticipantNameClick: z,
2519
- composerInput: H
2550
+ showChannelInfo: P,
2551
+ onParticipantNameClick: $,
2552
+ composerInput: Y
2520
2553
  }
2521
2554
  )
2522
2555
  }
@@ -2526,7 +2559,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2526
2559
  }
2527
2560
  );
2528
2561
  mn.displayName = "ChannelView";
2529
- const pe = 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: [
2562
+ const ve = 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: [
2530
2563
  /* @__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: "⚠️" }) }),
2531
2564
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2532
2565
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2540,7 +2573,7 @@ const pe = j.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2540
2573
  }
2541
2574
  )
2542
2575
  ] }) }));
2543
- pe.displayName = "ErrorState";
2576
+ ve.displayName = "ErrorState";
2544
2577
  const Ei = ({
2545
2578
  capabilities: e = {},
2546
2579
  renderMessageInputActions: t,
@@ -2558,47 +2591,47 @@ const Ei = ({
2558
2591
  viewerLanguage: c,
2559
2592
  renderHeaderTitleBadges: b,
2560
2593
  renderChannelBanner: _,
2561
- customChannelActions: v,
2594
+ customChannelActions: x,
2562
2595
  renderChannelActions: p,
2563
- onParticipantNameClick: w,
2564
- renderMessage: A,
2565
- onMessageLinkClick: M,
2566
- showChannelInfo: C,
2567
- composerInput: R
2596
+ onParticipantNameClick: v,
2597
+ renderMessage: M,
2598
+ onMessageLinkClick: I,
2599
+ showChannelInfo: N,
2600
+ composerInput: z
2568
2601
  }) => {
2569
2602
  const {
2570
- client: P,
2603
+ client: L,
2571
2604
  isConnected: D,
2572
2605
  isLoading: E,
2573
- error: L,
2574
- refreshConnection: I,
2606
+ error: R,
2607
+ refreshConnection: T,
2575
2608
  service: O,
2576
- debug: N
2577
- } = Ps(), [k, S] = F(null), [$, z] = F(null), [H, ee] = F(!1), { showDeleteConversation: Q = !0 } = e, Y = G(l);
2578
- Y.current = l;
2579
- const x = G(a);
2580
- x.current = a;
2581
- const T = G(null), U = G(null);
2609
+ debug: C
2610
+ } = Ps(), [k, S] = F(null), [P, $] = F(null), [Y, Q] = F(!1), { showDeleteConversation: Z = !0 } = e, V = H(l);
2611
+ V.current = l;
2612
+ const w = H(a);
2613
+ w.current = a;
2614
+ const A = H(null), U = H(null);
2582
2615
  K(() => {
2583
2616
  U.current = k;
2584
2617
  }, [k]), K(() => {
2585
- if (!P || !D) return;
2586
- const B = P.userID;
2618
+ if (!L || !D) return;
2619
+ const B = L.userID;
2587
2620
  if (!B) return;
2588
2621
  const W = `${B}::${i}`;
2589
- if (T.current === W) return;
2590
- T.current = W;
2622
+ if (A.current === W) return;
2623
+ A.current = W;
2591
2624
  const X = () => {
2592
- T.current === W && (T.current = null);
2625
+ A.current === W && (A.current = null);
2593
2626
  };
2594
2627
  (async () => {
2595
2628
  var me, he;
2596
2629
  try {
2597
- N && console.log(
2630
+ C && console.log(
2598
2631
  "[MessagingShell] Loading initial conversation with:",
2599
2632
  i
2600
2633
  );
2601
- const Z = await P.queryChannels(
2634
+ const ee = await L.queryChannels(
2602
2635
  {
2603
2636
  type: "messaging",
2604
2637
  members: { $eq: [B, i] }
@@ -2606,58 +2639,58 @@ const Ei = ({
2606
2639
  {},
2607
2640
  { limit: 1 }
2608
2641
  );
2609
- if (Z.length > 0) {
2610
- S(Z[0]), z(null), (me = x.current) == null || me.call(x, Z[0]), N && console.log(
2642
+ if (ee.length > 0) {
2643
+ S(ee[0]), $(null), (me = w.current) == null || me.call(w, ee[0]), C && console.log(
2611
2644
  "[MessagingShell] Initial conversation loaded:",
2612
- Z[0].id
2645
+ ee[0].id
2613
2646
  );
2614
2647
  return;
2615
2648
  }
2616
- const te = Y.current;
2617
- if (!te || !O) {
2618
- X(), z("No conversation found with this account"), N && console.log(
2649
+ const ne = V.current;
2650
+ if (!ne || !O) {
2651
+ X(), $("No conversation found with this account"), C && console.log(
2619
2652
  "[MessagingShell] No conversation found for:",
2620
2653
  i
2621
2654
  );
2622
2655
  return;
2623
2656
  }
2624
2657
  try {
2625
- const ie = await O.startChannelWithParticipant({
2626
- id: te.id,
2627
- name: te.name,
2628
- phone: te.phone
2658
+ const oe = await O.startChannelWithParticipant({
2659
+ id: ne.id,
2660
+ name: ne.name,
2661
+ phone: ne.phone
2629
2662
  });
2630
- S(ie), z(null), (he = x.current) == null || he.call(x, ie), N && console.log(
2663
+ S(oe), $(null), (he = w.current) == null || he.call(w, oe), C && console.log(
2631
2664
  "[MessagingShell] Channel created and loaded:",
2632
- ie.id
2665
+ oe.id
2633
2666
  );
2634
- } catch (ie) {
2667
+ } catch (oe) {
2635
2668
  console.error(
2636
2669
  "[MessagingShell] Failed to create conversation:",
2637
- ie
2638
- ), X(), z("Failed to create conversation");
2670
+ oe
2671
+ ), X(), $("Failed to create conversation");
2639
2672
  }
2640
- } catch (Z) {
2673
+ } catch (ee) {
2641
2674
  console.error(
2642
2675
  "[MessagingShell] Failed to load initial conversation:",
2643
- Z
2644
- ), X(), U.current || z("Failed to load conversation");
2676
+ ee
2677
+ ), X(), U.current || $("Failed to load conversation");
2645
2678
  }
2646
2679
  })();
2647
- }, [i, P, D, O, N]);
2648
- const V = G(r);
2649
- V.current = r;
2680
+ }, [i, L, D, O, C]);
2681
+ const G = H(r);
2682
+ G.current = r;
2650
2683
  const q = J(() => {
2651
2684
  var B;
2652
- S(null), ee(!0), (B = V.current) == null || B.call(V);
2685
+ S(null), Q(!0), (B = G.current) == null || B.call(G);
2653
2686
  }, []);
2654
- return E ? /* @__PURE__ */ n(Te, {}) : L ? /* @__PURE__ */ n(pe, { message: L, onBack: I }) : !D || !P ? /* @__PURE__ */ n(
2655
- pe,
2687
+ return E ? /* @__PURE__ */ n(Me, {}) : R ? /* @__PURE__ */ n(ve, { message: R, onBack: T }) : !D || !L ? /* @__PURE__ */ n(
2688
+ ve,
2656
2689
  {
2657
2690
  message: "Not connected to messaging service",
2658
- onBack: I
2691
+ onBack: T
2659
2692
  }
2660
- ) : $ ? /* @__PURE__ */ n(pe, { message: $ }) : H && !k ? /* @__PURE__ */ n(pe, { message: "Conversation ended" }) : k ? /* @__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(
2693
+ ) : P ? /* @__PURE__ */ n(ve, { message: P }) : Y && !k ? /* @__PURE__ */ n(ve, { message: "Conversation ended" }) : k ? /* @__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(
2661
2694
  mn,
2662
2695
  {
2663
2696
  channel: k,
@@ -2667,7 +2700,7 @@ const Ei = ({
2667
2700
  onLeaveConversation: q,
2668
2701
  onBlockParticipant: q,
2669
2702
  CustomChannelEmptyState: o,
2670
- showDeleteConversation: Q,
2703
+ showDeleteConversation: Z,
2671
2704
  onBlockParticipantClick: d,
2672
2705
  onReportParticipantClick: m,
2673
2706
  dmAgentEnabled: g,
@@ -2675,16 +2708,16 @@ const Ei = ({
2675
2708
  chatbotVotingEnabled: f,
2676
2709
  viewerLanguage: c,
2677
2710
  renderHeaderTitleBadges: b,
2678
- customChannelActions: v,
2711
+ customChannelActions: x,
2679
2712
  renderChannelActions: p,
2680
- onParticipantNameClick: w,
2681
- renderMessage: A,
2682
- onMessageLinkClick: M,
2683
- showChannelInfo: C,
2684
- composerInput: R
2713
+ onParticipantNameClick: v,
2714
+ renderMessage: M,
2715
+ onMessageLinkClick: I,
2716
+ showChannelInfo: N,
2717
+ composerInput: z
2685
2718
  },
2686
2719
  k.id
2687
- ) }) }) : /* @__PURE__ */ n(Te, {});
2720
+ ) }) }) : /* @__PURE__ */ n(Me, {});
2688
2721
  };
2689
2722
  function Qa(e) {
2690
2723
  const t = e.state.pending_messages;
@@ -2722,7 +2755,7 @@ const hn = j.createContext({
2722
2755
  });
2723
2756
  }, fn = j.memo(
2724
2757
  ({ channel: e, unread: t }) => {
2725
- var R, P, D;
2758
+ var z, L, D;
2726
2759
  const {
2727
2760
  selectedChannel: s,
2728
2761
  onChannelSelect: a,
@@ -2732,38 +2765,38 @@ const hn = j.createContext({
2732
2765
  } = tr(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2733
2766
  e && a(e);
2734
2767
  }, m = (E) => {
2735
- const L = E.key === "Enter" || E.key === " ", I = E.repeat;
2736
- !L || I || (E.preventDefault(), d());
2737
- }, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
2768
+ const R = E.key === "Enter" || E.key === " ", T = E.repeat;
2769
+ !R || T || (E.preventDefault(), d());
2770
+ }, u = Object.values(((z = e == null ? void 0 : e.state) == null ? void 0 : z.members) || {}).find(
2738
2771
  (E) => {
2739
- var L, I;
2740
- return ((L = E.user) == null ? void 0 : L.id) && E.user.id !== ((I = e == null ? void 0 : e._client) == null ? void 0 : I.userID);
2772
+ var R, T;
2773
+ return ((R = E.user) == null ? void 0 : R.id) && E.user.id !== ((T = e == null ? void 0 : e._client) == null ? void 0 : T.userID);
2741
2774
  }
2742
- ), f = Jt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, b = (() => {
2743
- var L;
2744
- const E = (L = e == null ? void 0 : e.state) == null ? void 0 : L.messages;
2775
+ ), f = Jt(u == null ? void 0 : u.user), c = (L = u == null ? void 0 : u.user) == null ? void 0 : L.image, b = (() => {
2776
+ var R;
2777
+ const E = (R = e == null ? void 0 : e.state) == null ? void 0 : R.messages;
2745
2778
  if (E != null && E.length) {
2746
- for (let I = E.length - 1; I >= 0; I--)
2747
- if (E[I].type !== "system") return E[I];
2779
+ for (let T = E.length - 1; T >= 0; T--)
2780
+ if (E[T].type !== "system") return E[T];
2748
2781
  }
2749
- })(), v = (() => {
2750
- var k, S, $, z;
2782
+ })(), x = (() => {
2783
+ var k, S, P, $;
2751
2784
  const E = Zt({
2752
2785
  message: b,
2753
2786
  viewerLanguage: l
2754
2787
  });
2755
2788
  if (((k = b == null ? void 0 : b.metadata) == null ? void 0 : k.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
2756
2789
  if (((S = b == null ? void 0 : b.metadata) == null ? void 0 : S.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
2757
- if ((($ = b == null ? void 0 : b.metadata) == null ? void 0 : $.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
2790
+ if (((P = b == null ? void 0 : b.metadata) == null ? void 0 : P.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
2758
2791
  if (E) return E;
2759
- const N = (z = b == null ? void 0 : b.attachments) == null ? void 0 : z[0];
2760
- return N ? N.og_scrape_url ? N.og_scrape_url : N.type === "image" ? "📷 Sent an image" : N.type === "video" ? "🎥 Sent a video" : N.type === "audio" ? "🎵 Sent audio" : N.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2761
- })(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", w = b ? Ie(b) : !1, A = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, M = Kt(e), C = t ?? 0;
2792
+ const C = ($ = b == null ? void 0 : b.attachments) == null ? void 0 : $[0];
2793
+ 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";
2794
+ })(), p = b != null && b.created_at ? sr(new Date(b.created_at)) : "", v = b ? Ae(b) : !1, M = i ? i(b, x) : `${v ? "✨ " : ""}${x}`, I = Kt(e), N = t ?? 0;
2762
2795
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2763
2796
  channelId: e == null ? void 0 : e.id,
2764
2797
  isSelected: o,
2765
2798
  participantName: f,
2766
- unreadCount: C,
2799
+ unreadCount: N,
2767
2800
  hasTimestamp: !!p
2768
2801
  }), /* @__PURE__ */ n(
2769
2802
  "div",
@@ -2781,13 +2814,13 @@ const hn = j.createContext({
2781
2814
  ),
2782
2815
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2783
2816
  /* @__PURE__ */ n(
2784
- oe,
2817
+ se,
2785
2818
  {
2786
2819
  id: ((D = u == null ? void 0 : u.user) == null ? void 0 : D.id) || e.id || "unknown",
2787
2820
  name: f,
2788
2821
  image: c,
2789
2822
  size: 48,
2790
- starred: M
2823
+ starred: I
2791
2824
  }
2792
2825
  ),
2793
2826
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
@@ -2799,7 +2832,7 @@ const hn = j.createContext({
2799
2832
  "text-sm font-medium truncate text-[#191918]"
2800
2833
  ),
2801
2834
  children: [
2802
- M && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2835
+ I && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2803
2836
  f
2804
2837
  ]
2805
2838
  }
@@ -2807,8 +2840,8 @@ const hn = j.createContext({
2807
2840
  p && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: p })
2808
2841
  ] }),
2809
2842
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2810
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
2811
- C > 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: C > 99 ? "99+" : C })
2843
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
2844
+ N > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: N > 99 ? "99+" : N })
2812
2845
  ] })
2813
2846
  ] })
2814
2847
  ] })
@@ -2832,7 +2865,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2832
2865
  }) => {
2833
2866
  const g = j.useRef(0);
2834
2867
  g.current++;
2835
- const { debug: u = !1 } = Ke(), f = j.useCallback(
2868
+ const { debug: u = !1 } = Je(), f = j.useCallback(
2836
2869
  (b) => {
2837
2870
  for (const _ of b)
2838
2871
  Qa(_);
@@ -2888,7 +2921,7 @@ const ar = { last_message_at: -1 }, rr = j.memo(
2888
2921
  );
2889
2922
  rr.displayName = "ChannelList";
2890
2923
  const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2891
- function st(e) {
2924
+ function at(e) {
2892
2925
  if (typeof e != "string") return;
2893
2926
  const t = e.trim();
2894
2927
  if (t === "") return;
@@ -2906,7 +2939,7 @@ const lr = {
2906
2939
  const s = y(
2907
2940
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2908
2941
  lr[e]
2909
- ), a = st(t.href);
2942
+ ), a = at(t.href);
2910
2943
  return a ? /* @__PURE__ */ n(
2911
2944
  "a",
2912
2945
  {
@@ -2938,7 +2971,7 @@ const lr = {
2938
2971
  }, ur = "text-white/30", mr = {
2939
2972
  dark: "text-white/55",
2940
2973
  light: "text-black/55"
2941
- }, at = ({
2974
+ }, rt = ({
2942
2975
  variant: e,
2943
2976
  title: t,
2944
2977
  placeholderTitle: s,
@@ -2950,7 +2983,7 @@ const lr = {
2950
2983
  }) => {
2951
2984
  const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = l != null;
2952
2985
  if (!g && !u && !c && !b) return null;
2953
- const v = y(
2986
+ const x = y(
2954
2987
  "truncate text-base font-medium leading-6",
2955
2988
  d && !t ? ur : dr[e]
2956
2989
  ), p = y(
@@ -2963,7 +2996,7 @@ const lr = {
2963
2996
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2964
2997
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2965
2998
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2966
- /* @__PURE__ */ n("p", { className: y("min-w-0", v), children: m })
2999
+ /* @__PURE__ */ n("p", { className: y("min-w-0", x), children: m })
2967
3000
  ] }),
2968
3001
  u && /* @__PURE__ */ n("p", { className: p, children: a })
2969
3002
  ] }),
@@ -2980,7 +3013,7 @@ const lr = {
2980
3013
  // treatment from the mobile spec. The drop shadow remains for depth.
2981
3014
  "border border-black/[0.08]",
2982
3015
  "shadow-[0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]"
2983
- ), Ae = ({
3016
+ ), Re = ({
2984
3017
  variant: e,
2985
3018
  children: t,
2986
3019
  href: s,
@@ -3046,11 +3079,11 @@ const lr = {
3046
3079
  }, gr = {
3047
3080
  dark: "size-16 text-white/25",
3048
3081
  light: "size-16 text-black/25"
3049
- }, Le = (e, t) => !!t && !!e && re(e) === "audio", gn = (e, t) => {
3082
+ }, Oe = (e, t) => !!t && !!e && ie(e) === "audio", gn = (e, t) => {
3050
3083
  if (!t || !e) return !1;
3051
- const s = re(e);
3084
+ const s = ie(e);
3052
3085
  return s === "video" || s === "audio";
3053
- }, rt = "bg-[#F2F3F4]", Me = ({
3086
+ }, it = "bg-[#F2F3F4]", Le = ({
3054
3087
  variant: e,
3055
3088
  thumbnailUrl: t,
3056
3089
  sourceUrl: s,
@@ -3059,8 +3092,8 @@ const lr = {
3059
3092
  topLeft: i,
3060
3093
  topRight: l
3061
3094
  }) => {
3062
- const o = re(r), d = !!s && o === "video";
3063
- return Le(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3095
+ const o = ie(r), d = !!s && o === "video";
3096
+ return Oe(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3064
3097
  "audio",
3065
3098
  {
3066
3099
  src: s,
@@ -3128,14 +3161,14 @@ const lr = {
3128
3161
  onDismiss: g,
3129
3162
  onEditClick: u
3130
3163
  }) => {
3131
- const f = o === "classic", c = Le(r, l), b = g ? /* @__PURE__ */ n(
3164
+ const f = o === "classic", c = Oe(r, l), b = g ? /* @__PURE__ */ n(
3132
3165
  "button",
3133
3166
  {
3134
3167
  type: "button",
3135
3168
  onClick: g,
3136
3169
  "aria-label": "Dismiss attachment",
3137
3170
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3138
- children: /* @__PURE__ */ n(Re, { className: "size-3", weight: "bold" })
3171
+ children: /* @__PURE__ */ n(De, { className: "size-3", weight: "bold" })
3139
3172
  }
3140
3173
  ) : void 0, _ = u ? /* @__PURE__ */ n(
3141
3174
  "button",
@@ -3147,9 +3180,9 @@ const lr = {
3147
3180
  children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
3148
3181
  }
3149
3182
  ) : void 0;
3150
- return c ? /* @__PURE__ */ n(Ae, { variant: "dark", bgClassName: rt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3183
+ return c ? /* @__PURE__ */ n(Re, { variant: "dark", bgClassName: it, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3151
3184
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
3152
- Me,
3185
+ Le,
3153
3186
  {
3154
3187
  variant: "dark",
3155
3188
  sourceUrl: l,
@@ -3159,13 +3192,13 @@ const lr = {
3159
3192
  ) }),
3160
3193
  b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3161
3194
  ] }) }) : /* @__PURE__ */ h(
3162
- Ae,
3195
+ Re,
3163
3196
  {
3164
3197
  variant: "dark",
3165
3198
  topRight: f ? b : void 0,
3166
3199
  children: [
3167
3200
  !f && /* @__PURE__ */ n(
3168
- Me,
3201
+ Le,
3169
3202
  {
3170
3203
  variant: "dark",
3171
3204
  thumbnailUrl: i,
@@ -3176,7 +3209,7 @@ const lr = {
3176
3209
  }
3177
3210
  ),
3178
3211
  /* @__PURE__ */ n(
3179
- at,
3212
+ rt,
3180
3213
  {
3181
3214
  variant: "dark",
3182
3215
  title: e,
@@ -3203,15 +3236,15 @@ const lr = {
3203
3236
  cta: d,
3204
3237
  onClick: m
3205
3238
  }) => {
3206
- const g = gn(a, i), u = st(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Le(a, i) ? rt : void 0, _ = d && m ? {
3239
+ const g = gn(a, i), u = at(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Oe(a, i) ? it : void 0, _ = d && m ? {
3207
3240
  ...d,
3208
3241
  onClick: () => {
3209
- var v;
3210
- m(), (v = d.onClick) == null || v.call(d);
3242
+ var x;
3243
+ m(), (x = d.onClick) == null || x.call(d);
3211
3244
  }
3212
3245
  } : d;
3213
3246
  return /* @__PURE__ */ h(
3214
- Ae,
3247
+ Re,
3215
3248
  {
3216
3249
  variant: "light",
3217
3250
  href: f,
@@ -3221,7 +3254,7 @@ const lr = {
3221
3254
  "data-testid": "link-attachment",
3222
3255
  children: [
3223
3256
  l === "featured" && /* @__PURE__ */ n(
3224
- Me,
3257
+ Le,
3225
3258
  {
3226
3259
  variant: "light",
3227
3260
  thumbnailUrl: r,
@@ -3231,7 +3264,7 @@ const lr = {
3231
3264
  }
3232
3265
  ),
3233
3266
  /* @__PURE__ */ n(
3234
- at,
3267
+ rt,
3235
3268
  {
3236
3269
  variant: "light",
3237
3270
  title: e,
@@ -3257,17 +3290,17 @@ const lr = {
3257
3290
  cta: m,
3258
3291
  onClick: g
3259
3292
  }) => {
3260
- const u = gn(r, l), f = st(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3293
+ const u = gn(r, l), f = at(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3261
3294
  return /* @__PURE__ */ h(
3262
- Ae,
3295
+ Re,
3263
3296
  {
3264
3297
  variant: "dark",
3265
3298
  href: c,
3266
3299
  onClick: b,
3267
- bgClassName: Le(r, l) ? rt : void 0,
3300
+ bgClassName: Oe(r, l) ? it : void 0,
3268
3301
  children: [
3269
3302
  o === "featured" && /* @__PURE__ */ n(
3270
- Me,
3303
+ Le,
3271
3304
  {
3272
3305
  variant: "dark",
3273
3306
  thumbnailUrl: i,
@@ -3277,7 +3310,7 @@ const lr = {
3277
3310
  }
3278
3311
  ),
3279
3312
  /* @__PURE__ */ n(
3280
- at,
3313
+ rt,
3281
3314
  {
3282
3315
  variant: "dark",
3283
3316
  title: e,
@@ -3317,7 +3350,7 @@ const lr = {
3317
3350
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3318
3351
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3319
3352
  }
3320
- }, Ne = ({
3353
+ }, ye = ({
3321
3354
  variant: e,
3322
3355
  text: t,
3323
3356
  bordered: s = !0,
@@ -3369,7 +3402,7 @@ const lr = {
3369
3402
  ]
3370
3403
  }
3371
3404
  );
3372
- }, ye = ({
3405
+ }, Ce = ({
3373
3406
  onClick: e,
3374
3407
  variant: t = "overlay",
3375
3408
  ariaLabel: s = "Dismiss attachment"
@@ -3385,9 +3418,9 @@ const lr = {
3385
3418
  "flex size-6 items-center justify-center rounded-full text-white",
3386
3419
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3387
3420
  ),
3388
- children: /* @__PURE__ */ n(Re, { className: "size-3", weight: "bold" })
3421
+ children: /* @__PURE__ */ n(De, { className: "size-3", weight: "bold" })
3389
3422
  }
3390
- ), Ce = (e) => e === "received" ? "light" : "dark", Ii = ({
3423
+ ), ke = (e) => e === "received" ? "light" : "dark", Ii = ({
3391
3424
  firstOfGroup: e,
3392
3425
  endOfGroup: t,
3393
3426
  groupedByUser: s
@@ -3408,7 +3441,7 @@ const lr = {
3408
3441
  }
3409
3442
  ),
3410
3443
  s ?? null
3411
- ] }), it = ({
3444
+ ] }), ot = ({
3412
3445
  state: e,
3413
3446
  src: t,
3414
3447
  mimeType: s,
@@ -3419,12 +3452,12 @@ const lr = {
3419
3452
  preload: o,
3420
3453
  onDismiss: d
3421
3454
  }) => {
3422
- const m = Ce(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3455
+ const m = ke(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3423
3456
  if (u.length === 0)
3424
3457
  return null;
3425
3458
  const f = o ?? (u.length > 1 ? "none" : "metadata");
3426
3459
  return /* @__PURE__ */ n(
3427
- Ne,
3460
+ ye,
3428
3461
  {
3429
3462
  variant: m,
3430
3463
  text: i,
@@ -3438,14 +3471,14 @@ const lr = {
3438
3471
  trailingAction: (
3439
3472
  // Composer only supports a single attachment, so the
3440
3473
  // dismiss control sits on the only player.
3441
- g && b === 0 ? /* @__PURE__ */ n(ye, { onClick: d, variant: "inline" }) : void 0
3474
+ g && b === 0 ? /* @__PURE__ */ n(Ce, { onClick: d, variant: "inline" }) : void 0
3442
3475
  )
3443
3476
  },
3444
3477
  `${c.src}-${b}`
3445
3478
  )) })
3446
3479
  }
3447
3480
  );
3448
- }, Er = (e) => /* @__PURE__ */ n(it, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(it, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(it, { ...e, state: "received" }), Tr = {
3481
+ }, Er = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), Tr = {
3449
3482
  Composer: Er,
3450
3483
  Sent: Sr,
3451
3484
  Received: Ir
@@ -3472,7 +3505,7 @@ function Rr(e, t) {
3472
3505
  }
3473
3506
  }
3474
3507
  if (!e) return;
3475
- if (re(e) === "document") {
3508
+ if (ie(e) === "document") {
3476
3509
  const r = tn(e), i = Mr[r];
3477
3510
  if (i) return i;
3478
3511
  if (e === "application/octet-stream") return;
@@ -3485,7 +3518,7 @@ function Lr(e, t, s) {
3485
3518
  const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3486
3519
  return [a, r].filter(Boolean).join(" · ") || void 0;
3487
3520
  }
3488
- function ne(e) {
3521
+ function ae(e) {
3489
3522
  try {
3490
3523
  const s = new URL(e).pathname.split("/").pop();
3491
3524
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3552,7 +3585,7 @@ const Dr = {
3552
3585
  u
3553
3586
  ]
3554
3587
  }
3555
- ) : /* @__PURE__ */ h(ae, { children: [
3588
+ ) : /* @__PURE__ */ h(te, { children: [
3556
3589
  g,
3557
3590
  u
3558
3591
  ] });
@@ -3562,7 +3595,7 @@ const Dr = {
3562
3595
  ] });
3563
3596
  };
3564
3597
  async function pn(e, t) {
3565
- const s = t ?? ne(e);
3598
+ const s = t ?? ae(e);
3566
3599
  try {
3567
3600
  const a = await fetch(e, { mode: "cors" });
3568
3601
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3589,7 +3622,7 @@ const zr = ({
3589
3622
  onActivate: a,
3590
3623
  trailingAction: r
3591
3624
  }) => {
3592
- const i = t.filename ?? ne(t.src);
3625
+ const i = t.filename ?? ae(t.src);
3593
3626
  return /* @__PURE__ */ n(
3594
3627
  bn,
3595
3628
  {
@@ -3603,7 +3636,7 @@ const zr = ({
3603
3636
  trailingAction: r
3604
3637
  }
3605
3638
  );
3606
- }, ot = ({
3639
+ }, lt = ({
3607
3640
  state: e,
3608
3641
  src: t,
3609
3642
  filename: s,
@@ -3616,19 +3649,19 @@ const zr = ({
3616
3649
  onClick: m,
3617
3650
  onDismiss: g
3618
3651
  }) => {
3619
- const u = Ce(e), f = e === "composer" && !!g, c = zr({
3652
+ const u = ke(e), f = e === "composer" && !!g, c = zr({
3620
3653
  src: t,
3621
3654
  filename: s,
3622
3655
  fileSize: a,
3623
3656
  mimeType: r,
3624
3657
  title: i,
3625
3658
  items: l
3626
- }), b = (v) => {
3627
- if ((m == null ? void 0 : m(v)) === !1) return;
3628
- const p = c[v];
3659
+ }), b = (x) => {
3660
+ if ((m == null ? void 0 : m(x)) === !1) return;
3661
+ const p = c[x];
3629
3662
  if (!p) return;
3630
- const w = p.filename ?? ne(p.src);
3631
- pn(p.src, w);
3663
+ const v = p.filename ?? ae(p.src);
3664
+ pn(p.src, v);
3632
3665
  };
3633
3666
  if (c.length === 0)
3634
3667
  return null;
@@ -3640,39 +3673,39 @@ const zr = ({
3640
3673
  u === "dark" ? "text-white/70" : "text-black/70"
3641
3674
  ),
3642
3675
  "aria-hidden": !0,
3643
- children: /* @__PURE__ */ n(xe, { className: "size-5", weight: "bold" })
3676
+ children: /* @__PURE__ */ n(we, { className: "size-5", weight: "bold" })
3644
3677
  }
3645
3678
  );
3646
3679
  return /* @__PURE__ */ n(
3647
- Ne,
3680
+ ye,
3648
3681
  {
3649
3682
  variant: u,
3650
3683
  text: o,
3651
3684
  groupPosition: d,
3652
3685
  "data-testid": "file-attachment",
3653
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
3686
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((x, p) => /* @__PURE__ */ n(
3654
3687
  $r,
3655
3688
  {
3656
3689
  variant: u,
3657
- item: v,
3690
+ item: x,
3658
3691
  index: p,
3659
3692
  onActivate: b,
3660
- trailingAction: f && p === 0 ? /* @__PURE__ */ n(ye, { onClick: g, variant: "inline" }) : _
3693
+ trailingAction: f && p === 0 ? /* @__PURE__ */ n(Ce, { onClick: g, variant: "inline" }) : _
3661
3694
  },
3662
- `${v.src}-${p}`
3695
+ `${x.src}-${p}`
3663
3696
  )) })
3664
3697
  }
3665
3698
  );
3666
- }, Fr = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), jr = {
3699
+ }, Fr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), jr = {
3667
3700
  Composer: Fr,
3668
3701
  Sent: Br,
3669
3702
  Received: Ur
3670
- }, lt = ({
3703
+ }, ct = ({
3671
3704
  onPrev: e,
3672
3705
  onNext: t,
3673
3706
  prevLabel: s = "Previous",
3674
3707
  nextLabel: a = "Next"
3675
- }) => /* @__PURE__ */ h(ae, { children: [
3708
+ }) => /* @__PURE__ */ h(te, { children: [
3676
3709
  /* @__PURE__ */ n(
3677
3710
  "button",
3678
3711
  {
@@ -3690,7 +3723,7 @@ const zr = ({
3690
3723
  onClick: t,
3691
3724
  "aria-label": a,
3692
3725
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3693
- children: /* @__PURE__ */ n(Ge, { size: 20, weight: "bold", "aria-hidden": !0 })
3726
+ children: /* @__PURE__ */ n(He, { size: 20, weight: "bold", "aria-hidden": !0 })
3694
3727
  }
3695
3728
  )
3696
3729
  ] }), vn = ({
@@ -3729,14 +3762,14 @@ const zr = ({
3729
3762
  }[i]
3730
3763
  ),
3731
3764
  children: o ? /* @__PURE__ */ n(
3732
- ve,
3765
+ xe,
3733
3766
  {
3734
3767
  className: "size-4 animate-spin",
3735
3768
  weight: "bold",
3736
3769
  "aria-hidden": !0
3737
3770
  }
3738
3771
  ) : /* @__PURE__ */ n(
3739
- xe,
3772
+ we,
3740
3773
  {
3741
3774
  className: "size-5 shrink-0",
3742
3775
  weight: "bold",
@@ -3752,7 +3785,7 @@ const zr = ({
3752
3785
  disabled: o,
3753
3786
  "aria-label": a,
3754
3787
  className: "mes-media-viewer__action",
3755
- children: o ? /* @__PURE__ */ n(ve, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
3788
+ children: o ? /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(we, { size: 20, weight: "bold", "aria-hidden": !0 })
3756
3789
  }
3757
3790
  ) : /* @__PURE__ */ h(
3758
3791
  "button",
@@ -3767,27 +3800,27 @@ const zr = ({
3767
3800
  ),
3768
3801
  children: [
3769
3802
  o ? /* @__PURE__ */ n(
3770
- ve,
3803
+ xe,
3771
3804
  {
3772
3805
  className: "size-4 animate-spin",
3773
3806
  weight: "bold",
3774
3807
  "aria-hidden": !0
3775
3808
  }
3776
- ) : /* @__PURE__ */ n(xe, { ...f, "aria-hidden": !0 }),
3809
+ ) : /* @__PURE__ */ n(we, { ...f, "aria-hidden": !0 }),
3777
3810
  g ? null : a
3778
3811
  ]
3779
3812
  }
3780
3813
  );
3781
- }, Be = (e, t, s) => Math.min(Math.max(e, t), s), ct = ({
3814
+ }, je = (e, t, s) => Math.min(Math.max(e, t), s), dt = ({
3782
3815
  length: e,
3783
3816
  initialIndex: t,
3784
3817
  open: s
3785
3818
  }) => {
3786
- const a = Be(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
3819
+ const a = je(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
3787
3820
  K(() => {
3788
- s && i(Be(t, 0, Math.max(e - 1, 0)));
3821
+ s && i(je(t, 0, Math.max(e - 1, 0)));
3789
3822
  }, [s, t, e]), K(() => {
3790
- i((d) => Be(d, 0, Math.max(e - 1, 0)));
3823
+ i((d) => je(d, 0, Math.max(e - 1, 0)));
3791
3824
  }, [e]);
3792
3825
  const l = J(() => {
3793
3826
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
@@ -3803,7 +3836,7 @@ const zr = ({
3803
3836
  };
3804
3837
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
3805
3838
  }, [s, e, l, o]), { index: r, prev: l, next: o };
3806
- }, dt = ({
3839
+ }, ut = ({
3807
3840
  open: e,
3808
3841
  onClose: t,
3809
3842
  ariaLabel: s,
@@ -3812,7 +3845,7 @@ const zr = ({
3812
3845
  children: i,
3813
3846
  "data-testid": l
3814
3847
  }) => {
3815
- const o = G(null), d = G(null);
3848
+ const o = H(null), d = H(null);
3816
3849
  return K(() => {
3817
3850
  var f;
3818
3851
  const u = o.current;
@@ -3884,7 +3917,7 @@ const zr = ({
3884
3917
  onClick: t,
3885
3918
  "aria-label": "Close viewer",
3886
3919
  className: "mes-media-viewer__action",
3887
- children: /* @__PURE__ */ n(Re, { size: 20, weight: "bold", "aria-hidden": !0 })
3920
+ children: /* @__PURE__ */ n(De, { size: 20, weight: "bold", "aria-hidden": !0 })
3888
3921
  }
3889
3922
  )
3890
3923
  ] })
@@ -3899,16 +3932,16 @@ const zr = ({
3899
3932
  initialIndex: s = 0,
3900
3933
  onClose: a
3901
3934
  }) => {
3902
- const { index: r, prev: i, next: l } = ct({
3935
+ const { index: r, prev: i, next: l } = dt({
3903
3936
  length: t.length,
3904
3937
  initialIndex: s,
3905
3938
  open: e
3906
- }), o = t[r], d = se(
3907
- () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "image"),
3939
+ }), o = t[r], d = re(
3940
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "image"),
3908
3941
  [o]
3909
3942
  );
3910
3943
  return o ? /* @__PURE__ */ h(
3911
- dt,
3944
+ ut,
3912
3945
  {
3913
3946
  open: e,
3914
3947
  onClose: a,
@@ -3938,7 +3971,7 @@ const zr = ({
3938
3971
  `${r}:${o.src}`
3939
3972
  ),
3940
3973
  t.length > 1 ? /* @__PURE__ */ n(
3941
- lt,
3974
+ ct,
3942
3975
  {
3943
3976
  onPrev: i,
3944
3977
  onNext: l,
@@ -4019,7 +4052,7 @@ const zr = ({
4019
4052
  })
4020
4053
  }
4021
4054
  );
4022
- }, ke = (e) => {
4055
+ }, Ee = (e) => {
4023
4056
  const [t, s] = F(!1), [a, r] = F(0), i = J(
4024
4057
  (o) => {
4025
4058
  (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
@@ -4051,7 +4084,7 @@ const zr = ({
4051
4084
  alt: s.alt,
4052
4085
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4053
4086
  })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4054
- const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = ke(
4087
+ const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Ee(
4055
4088
  r
4056
4089
  );
4057
4090
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4075,7 +4108,7 @@ const zr = ({
4075
4108
  )
4076
4109
  }
4077
4110
  ),
4078
- i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(ye, { onClick: i }) }) : null,
4111
+ i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: i }) }) : null,
4079
4112
  /* @__PURE__ */ n(
4080
4113
  xn,
4081
4114
  {
@@ -4097,16 +4130,16 @@ const zr = ({
4097
4130
  loading: o = "lazy",
4098
4131
  onClick: d
4099
4132
  }) => {
4100
- const m = Hr({ src: t, alt: s, items: r }), g = Ce(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ke(
4133
+ const m = Hr({ src: t, alt: s, items: r }), g = ke(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = Ee(
4101
4134
  d
4102
4135
  );
4103
4136
  if (m.length === 0)
4104
4137
  return null;
4105
4138
  const _ = m.map(
4106
- (v, p) => Gr(v, p, m.length, o)
4139
+ (x, p) => Gr(x, p, m.length, o)
4107
4140
  );
4108
4141
  return /* @__PURE__ */ h(
4109
- Ne,
4142
+ ye,
4110
4143
  {
4111
4144
  variant: g,
4112
4145
  text: i,
@@ -4136,19 +4169,19 @@ const zr = ({
4136
4169
  initialIndex: s = 0,
4137
4170
  onClose: a
4138
4171
  }) => {
4139
- const { index: r, prev: i, next: l } = ct({
4172
+ const { index: r, prev: i, next: l } = dt({
4140
4173
  length: t.length,
4141
4174
  initialIndex: s,
4142
4175
  open: e
4143
- }), o = t[r], d = se(
4144
- () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "document"),
4176
+ }), o = t[r], d = re(
4177
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
4145
4178
  [o]
4146
- ), m = se(
4179
+ ), m = re(
4147
4180
  () => o ? Zr(o.src) : void 0,
4148
4181
  [o]
4149
4182
  );
4150
4183
  return !o || !m ? null : /* @__PURE__ */ h(
4151
- dt,
4184
+ ut,
4152
4185
  {
4153
4186
  open: e,
4154
4187
  onClose: a,
@@ -4167,7 +4200,7 @@ const zr = ({
4167
4200
  `${r}:${o.src}`
4168
4201
  ),
4169
4202
  t.length > 1 ? /* @__PURE__ */ n(
4170
- lt,
4203
+ ct,
4171
4204
  {
4172
4205
  onPrev: i,
4173
4206
  onNext: l,
@@ -4194,7 +4227,7 @@ const zr = ({
4194
4227
  onActivate: a,
4195
4228
  trailingAction: r
4196
4229
  }) => {
4197
- const i = t.filename ?? ne(t.src);
4230
+ const i = t.filename ?? ae(t.src);
4198
4231
  return /* @__PURE__ */ n(
4199
4232
  bn,
4200
4233
  {
@@ -4208,7 +4241,7 @@ const zr = ({
4208
4241
  trailingAction: r
4209
4242
  }
4210
4243
  );
4211
- }, ut = ({
4244
+ }, mt = ({
4212
4245
  state: e,
4213
4246
  src: t,
4214
4247
  filename: s,
@@ -4220,31 +4253,31 @@ const zr = ({
4220
4253
  onClick: d,
4221
4254
  onDismiss: m
4222
4255
  }) => {
4223
- const g = Ce(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ke(
4256
+ const g = ke(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = Ee(
4224
4257
  d
4225
- ), v = e === "composer" && !!m;
4258
+ ), x = e === "composer" && !!m;
4226
4259
  if (u.length === 0)
4227
4260
  return null;
4228
- const p = u.map((w) => ({
4229
- src: w.src,
4230
- filename: w.filename ?? ne(w.src)
4261
+ const p = u.map((v) => ({
4262
+ src: v.src,
4263
+ filename: v.filename ?? ae(v.src)
4231
4264
  }));
4232
4265
  return /* @__PURE__ */ h(
4233
- Ne,
4266
+ ye,
4234
4267
  {
4235
4268
  variant: g,
4236
4269
  text: l,
4237
4270
  groupPosition: o,
4238
4271
  "data-testid": "pdf-attachment",
4239
4272
  children: [
4240
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, A) => {
4241
- const M = w.filename ?? ne(w.src), C = v && A === 0 ? /* @__PURE__ */ n(ye, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4273
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((v, M) => {
4274
+ const I = v.filename ?? ae(v.src), N = x && M === 0 ? /* @__PURE__ */ n(Ce, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4242
4275
  vn,
4243
4276
  {
4244
- url: w.src,
4245
- filename: M,
4277
+ url: v.src,
4278
+ filename: I,
4246
4279
  variant: "inline",
4247
- label: `Download ${M}`,
4280
+ label: `Download ${I}`,
4248
4281
  tone: g
4249
4282
  }
4250
4283
  );
@@ -4252,12 +4285,12 @@ const zr = ({
4252
4285
  ei,
4253
4286
  {
4254
4287
  variant: g,
4255
- item: w,
4256
- index: A,
4288
+ item: v,
4289
+ index: M,
4257
4290
  onActivate: b,
4258
- trailingAction: C
4291
+ trailingAction: N
4259
4292
  },
4260
- `${w.src}-${A}`
4293
+ `${v.src}-${M}`
4261
4294
  );
4262
4295
  }) }),
4263
4296
  /* @__PURE__ */ n(
@@ -4272,7 +4305,7 @@ const zr = ({
4272
4305
  ]
4273
4306
  }
4274
4307
  );
4275
- }, ti = (e) => /* @__PURE__ */ n(ut, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ut, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ut, { ...e, state: "received" }), ai = {
4308
+ }, ti = (e) => /* @__PURE__ */ n(mt, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(mt, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(mt, { ...e, state: "received" }), ai = {
4276
4309
  Composer: ti,
4277
4310
  Sent: ni,
4278
4311
  Received: si
@@ -4282,16 +4315,16 @@ const zr = ({
4282
4315
  initialIndex: s = 0,
4283
4316
  onClose: a
4284
4317
  }) => {
4285
- const { index: r, prev: i, next: l } = ct({
4318
+ const { index: r, prev: i, next: l } = dt({
4286
4319
  length: t.length,
4287
4320
  initialIndex: s,
4288
4321
  open: e
4289
- }), o = t[r], d = se(
4290
- () => (o == null ? void 0 : o.filename) ?? (o ? ne(o.src) : "video"),
4322
+ }), o = t[r], d = re(
4323
+ () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "video"),
4291
4324
  [o]
4292
4325
  );
4293
4326
  return o ? /* @__PURE__ */ h(
4294
- dt,
4327
+ ut,
4295
4328
  {
4296
4329
  open: e,
4297
4330
  onClose: a,
@@ -4315,7 +4348,7 @@ const zr = ({
4315
4348
  `${r}:${o.src}`
4316
4349
  ),
4317
4350
  t.length > 1 ? /* @__PURE__ */ n(
4318
- lt,
4351
+ ct,
4319
4352
  {
4320
4353
  onPrev: i,
4321
4354
  onNext: l,
@@ -4326,7 +4359,7 @@ const zr = ({
4326
4359
  ]
4327
4360
  }
4328
4361
  ) : null;
4329
- }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(je, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4362
+ }, ri = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Ge, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4330
4363
  item: e,
4331
4364
  index: t
4332
4365
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4365,7 +4398,7 @@ const zr = ({
4365
4398
  preload: s.preload,
4366
4399
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4367
4400
  })), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: l }) => {
4368
- const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: g } = ke(
4401
+ const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: g } = Ee(
4369
4402
  i
4370
4403
  );
4371
4404
  return /* @__PURE__ */ h("div", { className: "relative w-fit", children: [
@@ -4379,7 +4412,7 @@ const zr = ({
4379
4412
  children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4380
4413
  }
4381
4414
  ),
4382
- l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(ye, { onClick: l }) }) : null,
4415
+ l ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ce, { onClick: l }) }) : null,
4383
4416
  /* @__PURE__ */ n(
4384
4417
  yn,
4385
4418
  {
@@ -4405,16 +4438,16 @@ const zr = ({
4405
4438
  preload: d,
4406
4439
  onClick: m
4407
4440
  }) => {
4408
- const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ce(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = ke(
4441
+ const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = ke(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: _ } = Ee(
4409
4442
  m
4410
4443
  );
4411
4444
  if (g.length === 0)
4412
4445
  return null;
4413
- const v = g.map(
4414
- (p, w) => ii(p, w, g.length)
4446
+ const x = g.map(
4447
+ (p, v) => ii(p, v, g.length)
4415
4448
  );
4416
4449
  return /* @__PURE__ */ h(
4417
- Ne,
4450
+ ye,
4418
4451
  {
4419
4452
  variant: u,
4420
4453
  text: l,
@@ -4424,7 +4457,7 @@ const zr = ({
4424
4457
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4425
4458
  wn,
4426
4459
  {
4427
- tiles: v,
4460
+ tiles: x,
4428
4461
  onTileActivate: b,
4429
4462
  className: "overflow-hidden rounded-md"
4430
4463
  }
@@ -4485,7 +4518,7 @@ const zr = ({
4485
4518
  const o = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4486
4519
  return o.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4487
4520
  (i || l) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4488
- oe,
4521
+ se,
4489
4522
  {
4490
4523
  id: l || "account",
4491
4524
  name: l || "Account",
@@ -4525,13 +4558,13 @@ export {
4525
4558
  Si as L,
4526
4559
  yi as M,
4527
4560
  be as a,
4528
- oe as b,
4561
+ se as b,
4529
4562
  rr as c,
4530
4563
  mn as d,
4531
4564
  Ci as e,
4532
4565
  hi as f,
4533
- re as g,
4534
- Ft as h,
4566
+ ie as g,
4567
+ Bt as h,
4535
4568
  Ti as i,
4536
4569
  Ca as j,
4537
4570
  Ni as k,
@@ -4546,9 +4579,9 @@ export {
4546
4579
  $s as t,
4547
4580
  Ii as u,
4548
4581
  Ys as v,
4549
- et as w,
4550
- tt as x,
4582
+ tt as w,
4583
+ nt as x,
4551
4584
  Jt as y,
4552
4585
  ki as z
4553
4586
  };
4554
- //# sourceMappingURL=index-CjwQ2Hj3.js.map
4587
+ //# sourceMappingURL=index-Dv13-2iu.js.map