@linktr.ee/messaging-react 2.5.1 → 2.5.2

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 (28) hide show
  1. package/dist/{Card-Dppew_bA.cjs → Card-Bp3XzYXV.cjs} +2 -2
  2. package/dist/{Card-Dppew_bA.cjs.map → Card-Bp3XzYXV.cjs.map} +1 -1
  3. package/dist/{Card-BwEzhUW6.cjs → Card-C8C9ZL55.cjs} +2 -2
  4. package/dist/{Card-BwEzhUW6.cjs.map → Card-C8C9ZL55.cjs.map} +1 -1
  5. package/dist/{Card-BpVephnj.js → Card-CBeF7eUm.js} +2 -2
  6. package/dist/{Card-BpVephnj.js.map → Card-CBeF7eUm.js.map} +1 -1
  7. package/dist/{Card-CYLat33l.js → Card-CSvw2WUm.js} +2 -2
  8. package/dist/{Card-CYLat33l.js.map → Card-CSvw2WUm.js.map} +1 -1
  9. package/dist/{Card-d6L08Luf.cjs → Card-Obhvbcgk.cjs} +2 -2
  10. package/dist/{Card-d6L08Luf.cjs.map → Card-Obhvbcgk.cjs.map} +1 -1
  11. package/dist/{Card-bUYvpOEI.js → Card-cl8fYGrO.js} +3 -3
  12. package/dist/{Card-bUYvpOEI.js.map → Card-cl8fYGrO.js.map} +1 -1
  13. package/dist/{LockedThumbnail-BvYmQvT2.js → LockedThumbnail-BQ5gB3Gj.js} +2 -2
  14. package/dist/{LockedThumbnail-BvYmQvT2.js.map → LockedThumbnail-BQ5gB3Gj.js.map} +1 -1
  15. package/dist/{LockedThumbnail-CuCWVcEL.cjs → LockedThumbnail-DR1i_N1L.cjs} +2 -2
  16. package/dist/{LockedThumbnail-CuCWVcEL.cjs.map → LockedThumbnail-DR1i_N1L.cjs.map} +1 -1
  17. package/dist/{index-CxKVYxq6.js → index-BGwytfkX.js} +379 -377
  18. package/dist/index-BGwytfkX.js.map +1 -0
  19. package/dist/index-Dgh0_9UW.cjs +2 -0
  20. package/dist/index-Dgh0_9UW.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +1 -1
  24. package/src/components/ChannelList/CustomChannelPreview.stories.tsx +43 -1
  25. package/src/components/ChannelList/CustomChannelPreview.tsx +8 -3
  26. package/dist/index-BQv7yPeG.cjs +0 -2
  27. package/dist/index-BQv7yPeG.cjs.map +0 -1
  28. package/dist/index-CxKVYxq6.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { jsx as n, jsxs as m, Fragment as ie } from "react/jsx-runtime";
2
2
  import y from "classnames";
3
- import B, { createContext as Ze, useContext as Ke, useCallback as U, useState as z, useRef as Z, useEffect as X, useMemo as re, Suspense as Je } from "react";
3
+ import $, { createContext as Ze, useContext as Ke, useCallback as V, useState as z, useRef as Z, useEffect as X, useMemo as re, Suspense as Je } from "react";
4
4
  import { StreamChatService as In } from "@linktr.ee/messaging-core";
5
- import { Chat as Sn, ChannelList as Tn, DateSeparator as Mn, useChannelStateContext as me, useChatContext as Qe, areMessageUIPropsEqual as An, useMessageReminder as Dn, useComponentContext as Gt, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Fn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as Pn, MessageRepliesCountButton as Bn, ReminderNotification as $n, StreamedMessageText as jn, messageHasAttachments as Un, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as Wn, MessageText as Dt, Poll as qn, MessageErrorIcon as Xn, useMessageContext as Le, useTranslationContext as Zn, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, SimpleAttachmentSelector as ns, QuotedMessagePreview as ss, AttachmentPreviewList as as, TextareaComposer as rs, MessageTimestamp as ze, AIStates as Pe, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us } from "stream-chat-react";
6
- import { StarIcon as Ge, GiftIcon as ms, XIcon as xe, SpinnerGapIcon as Be, SignOutIcon as hs, ProhibitInsetIcon as Rt, FlagIcon as fs, FileIcon as Ht, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Yt, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as ys, FileDocIcon as _s, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as He, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, ThumbsUpIcon as Is, ThumbsDownIcon as Ss, ArrowUpIcon as Ts, SparkleIcon as Ye, ProhibitIcon as Ms, ArrowLeftIcon as Lt, CaretRightIcon as We, DotsThreeIcon as Ft, PencilSimpleIcon as As, CaretLeftIcon as Ds } from "@phosphor-icons/react";
5
+ import { Chat as Sn, ChannelList as Tn, DateSeparator as An, useChannelStateContext as me, useChatContext as Qe, areMessageUIPropsEqual as Mn, useMessageReminder as Dn, useComponentContext as Gt, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Fn, MessageBouncePrompt as On, MessageDeleted as zn, MessageIsThreadReplyInChannelButtonIndicator as Pn, MessageRepliesCountButton as Bn, ReminderNotification as $n, StreamedMessageText as jn, messageHasAttachments as Un, messageHasReactions as Vn, isDateSeparatorMessage as Gn, isMessageBlocked as Hn, isMessageBounced as Yn, MessageBounceModal as Wn, MessageText as Dt, Poll as qn, MessageErrorIcon as Xn, useMessageContext as Le, useTranslationContext as Zn, useMessageComposer as Kn, useStateStore as Jn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, SimpleAttachmentSelector as ns, QuotedMessagePreview as ss, AttachmentPreviewList as as, TextareaComposer as rs, MessageTimestamp as ze, AIStates as Pe, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us } from "stream-chat-react";
6
+ import { StarIcon as Ge, GiftIcon as ms, XIcon as xe, SpinnerGapIcon as Be, SignOutIcon as hs, ProhibitInsetIcon as Rt, FlagIcon as fs, FileIcon as Ht, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Yt, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as Ns, FileXlsIcon as ys, FileDocIcon as _s, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as He, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, ThumbsUpIcon as Is, ThumbsDownIcon as Ss, ArrowUpIcon as Ts, SparkleIcon as Ye, ProhibitIcon as As, ArrowLeftIcon as Lt, CaretRightIcon as We, DotsThreeIcon as Ft, PencilSimpleIcon as Ms, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
7
  import { MessageActions as Rs, DefaultDropdownActionButton as Wt } from "stream-chat-react/experimental";
8
8
  import { LinkPreviewsManager as Ot } from "stream-chat";
9
9
  const qt = Ze({
@@ -24,9 +24,9 @@ const qt = Ze({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- const l = U(
28
- (T, ...O) => {
29
- i && console.log(`🔥 [MessagingProvider] ${T}`, ...O);
27
+ const l = V(
28
+ (A, ...O) => {
29
+ i && console.log(`🔥 [MessagingProvider] ${A}`, ...O);
30
30
  },
31
31
  [i]
32
32
  );
@@ -41,9 +41,9 @@ const qt = Ze({
41
41
  apiKey: a,
42
42
  serviceConfig: s,
43
43
  capabilities: r
44
- }), E = Z(0);
45
- E.current++, l("📊 RENDER INFO", {
46
- renderCount: E.current,
44
+ }), I = Z(0);
45
+ I.current++, l("📊 RENDER INFO", {
46
+ renderCount: I.current,
47
47
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
48
48
  propChanges: {
49
49
  userChanged: w.current.userId !== (t == null ? void 0 : t.id),
@@ -57,9 +57,9 @@ const qt = Ze({
57
57
  serviceConfig: s,
58
58
  capabilities: r
59
59
  }, X(() => {
60
- const T = E.current;
60
+ const A = I.current;
61
61
  if (l("🔧 SERVICE INIT EFFECT TRIGGERED", {
62
- renderCount: T,
62
+ renderCount: A,
63
63
  apiKey: !!a,
64
64
  serviceConfig: !!s,
65
65
  dependencies: {
@@ -70,13 +70,13 @@ const qt = Ze({
70
70
  }
71
71
  }), !a || !s) {
72
72
  l("⚠️ SERVICE INIT SKIPPED", {
73
- renderCount: T,
73
+ renderCount: A,
74
74
  reason: "Missing apiKey or serviceConfig"
75
75
  });
76
76
  return;
77
77
  }
78
78
  l("🚀 CREATING NEW SERVICE", {
79
- renderCount: T,
79
+ renderCount: A,
80
80
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
81
81
  serviceConfigChanged: w.current.serviceConfig !== s
82
82
  });
@@ -86,18 +86,18 @@ const qt = Ze({
86
86
  debug: i
87
87
  });
88
88
  return d(O), l("✅ SERVICE SET", {
89
- renderCount: T,
89
+ renderCount: A,
90
90
  serviceInstance: !!O
91
91
  }), () => {
92
92
  l("🧹 SERVICE CLEANUP", {
93
- renderCount: T,
93
+ renderCount: A,
94
94
  reason: "Effect cleanup"
95
95
  }), O.disconnectUser().catch(console.error);
96
96
  };
97
97
  }, [a, s, i, l]);
98
- const I = Z(null);
98
+ const S = Z(null);
99
99
  X(() => {
100
- var O, M;
100
+ var O, E;
101
101
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
102
102
  hasService: !!o,
103
103
  hasUser: !!t,
@@ -113,7 +113,7 @@ const qt = Ze({
113
113
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
114
114
  return;
115
115
  }
116
- if (((O = I.current) == null ? void 0 : O.serviceId) === o && ((M = I.current) == null ? void 0 : M.userId) === t.id) {
116
+ if (((O = S.current) == null ? void 0 : O.serviceId) === o && ((E = S.current) == null ? void 0 : E.userId) === t.id) {
117
117
  l(
118
118
  "⚠️ USER CONNECTION SKIPPED",
119
119
  "Already connected this user with this service"
@@ -124,16 +124,16 @@ const qt = Ze({
124
124
  l("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, b(!0), v(null);
125
125
  try {
126
126
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
127
- const L = await o.connectUser(t);
128
- g(L), f(!0), I.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
127
+ const R = await o.connectUser(t);
128
+ g(R), f(!0), S.current = { serviceId: o, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
129
  userId: t.id,
130
- clientId: L.userID
130
+ clientId: R.userID
131
131
  });
132
- } catch (L) {
133
- const A = L instanceof Error ? L.message : "Connection failed";
134
- v(A), l("❌ USER CONNECTION ERROR", {
132
+ } catch (R) {
133
+ const P = R instanceof Error ? R.message : "Connection failed";
134
+ v(P), l("❌ USER CONNECTION ERROR", {
135
135
  userId: t.id,
136
- error: A
136
+ error: P
137
137
  });
138
138
  } finally {
139
139
  b(!1), N.current = !1, l("🔄 USER CONNECTION FINISHED", {
@@ -149,12 +149,12 @@ const qt = Ze({
149
149
  o && u ? (l(
150
150
  "🧹 CLEANUP EFFECT TRIGGERED",
151
151
  "Cleaning up connection on unmount"
152
- ), I.current = null, o.disconnectUser().catch(console.error)) : l("🔇 CLEANUP EFFECT SKIPPED", {
152
+ ), S.current = null, o.disconnectUser().catch(console.error)) : l("🔇 CLEANUP EFFECT SKIPPED", {
153
153
  hasService: !!o,
154
154
  isConnected: u
155
155
  });
156
156
  }), [o, u, l]);
157
- const S = U(async () => {
157
+ const T = V(async () => {
158
158
  if (l("🔄 REFRESH CONNECTION CALLED", {
159
159
  hasService: !!o,
160
160
  hasUser: !!t
@@ -165,10 +165,10 @@ const qt = Ze({
165
165
  l("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
166
166
  try {
167
167
  l("🔌 DISCONNECTING FOR REFRESH"), await o.disconnectUser(), l("📞 RECONNECTING FOR REFRESH");
168
- const T = await o.connectUser(t);
169
- g(T), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
- } catch (T) {
171
- const O = T instanceof Error ? T.message : "Refresh failed";
168
+ const A = await o.connectUser(t);
169
+ g(A), f(!0), v(null), l("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
170
+ } catch (A) {
171
+ const O = A instanceof Error ? A.message : "Refresh failed";
172
172
  v(O), l("❌ CONNECTION REFRESH ERROR", {
173
173
  userId: t.id,
174
174
  error: O
@@ -176,7 +176,7 @@ const qt = Ze({
176
176
  } finally {
177
177
  b(!1), l("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
178
178
  }
179
- }, [o, t, l]), R = B.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
179
+ }, [o, t, l]), D = $.useMemo(() => (l("💫 CONTEXT VALUE MEMOIZATION", {
180
180
  hasService: !!o,
181
181
  hasClient: !!h,
182
182
  isConnected: u,
@@ -190,7 +190,7 @@ const qt = Ze({
190
190
  isLoading: c,
191
191
  error: x,
192
192
  capabilities: r,
193
- refreshConnection: S,
193
+ refreshConnection: T,
194
194
  debug: i
195
195
  }), [
196
196
  o,
@@ -199,15 +199,15 @@ const qt = Ze({
199
199
  c,
200
200
  x,
201
201
  r,
202
- S,
202
+ T,
203
203
  i,
204
204
  l
205
205
  ]);
206
206
  return l("🔄 RENDER END", {
207
- renderCount: E.current,
207
+ renderCount: I.current,
208
208
  willRenderChat: !!(h && u),
209
- contextValueReady: !!R
210
- }), /* @__PURE__ */ n(qt.Provider, { value: R, children: h && u ? /* @__PURE__ */ n(
209
+ contextValueReady: !!D
210
+ }), /* @__PURE__ */ n(qt.Provider, { value: D, children: h && u ? /* @__PURE__ */ n(
211
211
  Sn,
212
212
  {
213
213
  client: h,
@@ -224,14 +224,14 @@ function Fs(e) {
224
224
  for (const s of t)
225
225
  e.state.addMessageSorted(s.message);
226
226
  }
227
- const Xt = B.createContext({
227
+ const Xt = $.createContext({
228
228
  selectedChannel: void 0,
229
229
  onChannelSelect: () => {
230
230
  },
231
231
  debug: !1,
232
232
  renderMessagePreview: void 0,
233
233
  viewerLanguage: void 0
234
- }), Os = Xt.Provider, zs = () => B.useContext(Xt), Zt = (e) => {
234
+ }), Os = Xt.Provider, zs = () => $.useContext(Xt), Zt = (e) => {
235
235
  var a, r;
236
236
  const [t, s] = z(
237
237
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -434,7 +434,7 @@ const oe = ({
434
434
  }, Ws = (e) => {
435
435
  var t;
436
436
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
437
- }, Me = (e) => {
437
+ }, Ae = (e) => {
438
438
  var t;
439
439
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
440
440
  }, qs = (e) => {
@@ -450,7 +450,7 @@ const oe = ({
450
450
  hasAttachment: a = !1
451
451
  }) => {
452
452
  var u;
453
- const r = Jt(e), i = Me(e);
453
+ const r = Jt(e), i = Ae(e);
454
454
  if (!r && !i)
455
455
  return null;
456
456
  if (r) {
@@ -474,9 +474,9 @@ const oe = ({
474
474
  g,
475
475
  h
476
476
  ] }) });
477
- }, Qt = B.memo(
477
+ }, Qt = $.memo(
478
478
  ({ channel: e, unread: t }) => {
479
- var R, T, O;
479
+ var D, A, O;
480
480
  const {
481
481
  selectedChannel: s,
482
482
  onChannelSelect: a,
@@ -485,37 +485,39 @@ const oe = ({
485
485
  viewerLanguage: l
486
486
  } = zs(), o = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
487
487
  e && a(e);
488
- }, h = (M) => {
489
- const L = M.key === "Enter" || M.key === " ", A = M.repeat;
490
- !L || A || (M.preventDefault(), d());
491
- }, u = Object.values(((R = e == null ? void 0 : e.state) == null ? void 0 : R.members) || {}).find(
492
- (M) => {
493
- var L, A;
494
- return ((L = M.user) == null ? void 0 : L.id) && M.user.id !== ((A = e == null ? void 0 : e._client) == null ? void 0 : A.userID);
488
+ }, h = (E) => {
489
+ const R = E.key === "Enter" || E.key === " ", P = E.repeat;
490
+ !R || P || (E.preventDefault(), d());
491
+ }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
492
+ (E) => {
493
+ var R, P;
494
+ return ((R = E.user) == null ? void 0 : R.id) && E.user.id !== ((P = e == null ? void 0 : e._client) == null ? void 0 : P.userID);
495
495
  }
496
- ), f = tt(u == null ? void 0 : u.user), c = (T = u == null ? void 0 : u.user) == null ? void 0 : T.image, b = (() => {
497
- var L;
498
- const M = (L = e == null ? void 0 : e.state) == null ? void 0 : L.messages;
499
- if (M != null && M.length) {
500
- for (let A = M.length - 1; A >= 0; A--)
501
- if (M[A].type !== "system") return M[A];
496
+ ), f = tt(u == null ? void 0 : u.user), c = (A = u == null ? void 0 : u.user) == null ? void 0 : A.image, b = (() => {
497
+ var R;
498
+ const E = (R = e == null ? void 0 : e.state) == null ? void 0 : R.messages;
499
+ if (E != null && E.length) {
500
+ for (let P = E.length - 1; P >= 0; P--)
501
+ if (E[P].type !== "system") return E[P];
502
502
  }
503
503
  })(), v = (() => {
504
- var H, k;
505
- const M = Kt({
504
+ var B, H, U, L;
505
+ const E = Kt({
506
506
  message: b,
507
507
  viewerLanguage: l
508
508
  });
509
- if (M) return M;
510
- if (((H = b == null ? void 0 : b.metadata) == null ? void 0 : H.custom_type) === "MESSAGE_TIP") return "💵 Sent a tip";
511
- const A = (k = b == null ? void 0 : b.attachments) == null ? void 0 : k[0];
512
- return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
513
- })(), N = b != null && b.created_at ? Bs(new Date(b.created_at)) : "", w = b ? Me(b) : !1, E = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, I = Zt(e), S = t ?? 0;
509
+ if (((B = b == null ? void 0 : b.metadata) == null ? void 0 : B.custom_type) === "MESSAGE_TIP") return E ? `💵 ${E}` : "💵 Sent a tip";
510
+ if (((H = b == null ? void 0 : b.metadata) == null ? void 0 : H.custom_type) === "MESSAGE_PAID") return E ? `💰 ${E}` : "💰 Sent a message";
511
+ if (((U = b == null ? void 0 : b.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_ATTACHMENT") return E ? `📎 ${E}` : "📎 Sent an attachment";
512
+ if (E) return E;
513
+ const C = (L = b == null ? void 0 : b.attachments) == null ? void 0 : L[0];
514
+ 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";
515
+ })(), N = b != null && b.created_at ? Bs(new Date(b.created_at)) : "", w = b ? Ae(b) : !1, I = i ? i(b, v) : `${w ? "✨ " : ""}${v}`, S = Zt(e), T = t ?? 0;
514
516
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
515
517
  channelId: e == null ? void 0 : e.id,
516
518
  isSelected: o,
517
519
  participantName: f,
518
- unreadCount: S,
520
+ unreadCount: T,
519
521
  hasTimestamp: !!N
520
522
  }), /* @__PURE__ */ n(
521
523
  "div",
@@ -539,7 +541,7 @@ const oe = ({
539
541
  name: f,
540
542
  image: c,
541
543
  size: 44,
542
- starred: I,
544
+ starred: S,
543
545
  className: "[&_.avatar-fallback]:group-hover:bg-[#eeeeee]"
544
546
  }
545
547
  ),
@@ -553,7 +555,7 @@ const oe = ({
553
555
  o ? "text-primary" : "text-charcoal"
554
556
  ),
555
557
  children: [
556
- I && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
558
+ S && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
557
559
  f
558
560
  ]
559
561
  }
@@ -561,8 +563,8 @@ const oe = ({
561
563
  N && /* @__PURE__ */ n("span", { className: "text-xs text-stone flex-shrink-0", children: N })
562
564
  ] }),
563
565
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
564
- /* @__PURE__ */ n("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: E }),
565
- S > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: S > 99 ? "99+" : S })
566
+ /* @__PURE__ */ n("p", { className: "text-xs text-stone flex-1 line-clamp-1", children: I }),
567
+ T > 0 && /* @__PURE__ */ n("span", { className: "bg-[#7f22fe] text-white text-xs px-2 py-0.5 rounded-full min-w-[20px] text-center flex-shrink-0", children: T > 99 ? "99+" : T })
566
568
  ] })
567
569
  ] })
568
570
  ] })
@@ -571,7 +573,7 @@ const oe = ({
571
573
  }
572
574
  );
573
575
  Qt.displayName = "CustomChannelPreview";
574
- const Zs = { last_message_at: -1 }, en = B.memo(
576
+ const Zs = { last_message_at: -1 }, en = $.memo(
575
577
  ({
576
578
  onChannelSelect: e,
577
579
  selectedChannel: t,
@@ -586,9 +588,9 @@ const Zs = { last_message_at: -1 }, en = B.memo(
586
588
  renderMessagePreview: g,
587
589
  viewerLanguage: u
588
590
  }) => {
589
- const f = B.useRef(0);
591
+ const f = $.useRef(0);
590
592
  f.current++;
591
- const { debug: c = !1 } = et(), b = B.useCallback(
593
+ const { debug: c = !1 } = et(), b = $.useCallback(
592
594
  (v) => {
593
595
  for (const N of v)
594
596
  Fs(N);
@@ -601,7 +603,7 @@ const Zs = { last_message_at: -1 }, en = B.memo(
601
603
  selectedChannelId: t == null ? void 0 : t.id,
602
604
  filters: s
603
605
  });
604
- const x = B.useMemo(
606
+ const x = $.useMemo(
605
607
  () => ({
606
608
  selectedChannel: t,
607
609
  onChannelSelect: e,
@@ -702,66 +704,66 @@ const Qs = ({
702
704
  customProfileContent: f,
703
705
  customChannelActions: c
704
706
  }) => {
705
- var V, P, F, G;
706
- const { service: b, debug: x } = et(), [v, N] = z(!1), [w, E] = z(!1), [I, S] = z(!1), R = U(async () => {
707
+ var U, L, F, G;
708
+ const { service: b, debug: x } = et(), [v, N] = z(!1), [w, I] = z(!1), [S, T] = z(!1), D = V(async () => {
707
709
  var _;
708
710
  if (!(!b || !((_ = s == null ? void 0 : s.user) != null && _.id)))
709
711
  try {
710
712
  const p = (await b.getBlockedUsers()).some(
711
- (C) => {
713
+ (k) => {
712
714
  var Y;
713
- return C.blocked_user_id === ((Y = s == null ? void 0 : s.user) == null ? void 0 : Y.id);
715
+ return k.blocked_user_id === ((Y = s == null ? void 0 : s.user) == null ? void 0 : Y.id);
714
716
  }
715
717
  );
716
718
  N(p);
717
- } catch (D) {
719
+ } catch (M) {
718
720
  console.error(
719
721
  "[ChannelInfoDialog] Failed to check blocked status:",
720
- D
722
+ M
721
723
  );
722
724
  }
723
- }, [b, (V = s == null ? void 0 : s.user) == null ? void 0 : V.id]);
725
+ }, [b, (U = s == null ? void 0 : s.user) == null ? void 0 : U.id]);
724
726
  X(() => {
725
- R();
726
- }, [R]);
727
- const T = async () => {
727
+ D();
728
+ }, [D]);
729
+ const A = async () => {
728
730
  var _;
729
731
  if (!w) {
730
- h == null || h(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), E(!0);
732
+ h == null || h(), x && console.log("[ChannelInfoDialog] Leave conversation", r.cid), I(!0);
731
733
  try {
732
- const D = ((_ = r._client) == null ? void 0 : _.userID) ?? null;
733
- await r.hide(D, !1), l && await l(r), t();
734
- } catch (D) {
735
- console.error("[ChannelInfoDialog] Failed to leave conversation", D);
734
+ const M = ((_ = r._client) == null ? void 0 : _.userID) ?? null;
735
+ await r.hide(M, !1), l && await l(r), t();
736
+ } catch (M) {
737
+ console.error("[ChannelInfoDialog] Failed to leave conversation", M);
736
738
  } finally {
737
- E(!1);
739
+ I(!1);
738
740
  }
739
741
  }
740
742
  }, O = async () => {
741
- var _, D, p;
742
- if (!(I || !b)) {
743
- g == null || g(), x && console.log("[ChannelInfoDialog] Block member", (_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), S(!0);
743
+ var _, M, p;
744
+ if (!(S || !b)) {
745
+ g == null || g(), x && console.log("[ChannelInfoDialog] Block member", (_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), T(!0);
744
746
  try {
745
- await b.blockUser((D = s == null ? void 0 : s.user) == null ? void 0 : D.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
746
- } catch (C) {
747
- console.error("[ChannelInfoDialog] Failed to block member", C);
747
+ await b.blockUser((M = s == null ? void 0 : s.user) == null ? void 0 : M.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
748
+ } catch (k) {
749
+ console.error("[ChannelInfoDialog] Failed to block member", k);
748
750
  } finally {
749
- S(!1);
751
+ T(!1);
750
752
  }
751
753
  }
752
- }, M = async () => {
753
- var _, D, p;
754
- if (!(I || !b)) {
755
- g == null || g(), x && console.log("[ChannelInfoDialog] Unblock member", (_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), S(!0);
754
+ }, E = async () => {
755
+ var _, M, p;
756
+ if (!(S || !b)) {
757
+ g == null || g(), x && console.log("[ChannelInfoDialog] Unblock member", (_ = s == null ? void 0 : s.user) == null ? void 0 : _.id), T(!0);
756
758
  try {
757
- await b.unBlockUser((D = s == null ? void 0 : s.user) == null ? void 0 : D.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
758
- } catch (C) {
759
- console.error("[ChannelInfoDialog] Failed to unblock member", C);
759
+ await b.unBlockUser((M = s == null ? void 0 : s.user) == null ? void 0 : M.id), o && await o((p = s == null ? void 0 : s.user) == null ? void 0 : p.id), t();
760
+ } catch (k) {
761
+ console.error("[ChannelInfoDialog] Failed to unblock member", k);
760
762
  } finally {
761
- S(!1);
763
+ T(!1);
762
764
  }
763
765
  }
764
- }, L = () => {
766
+ }, R = () => {
765
767
  u == null || u(), t(), window.open(
766
768
  "https://linktr.ee/s/about/trust-center/report",
767
769
  "_blank",
@@ -769,7 +771,7 @@ const Qs = ({
769
771
  );
770
772
  };
771
773
  if (!s) return null;
772
- const A = a ?? tt(s.user), H = (P = s.user) == null ? void 0 : P.image, k = (F = s.user) == null ? void 0 : F.username, j = k ? `linktr.ee/${k}` : void 0, W = ((G = s.user) == null ? void 0 : G.id) || "unknown";
774
+ const P = a ?? tt(s.user), W = (L = s.user) == null ? void 0 : L.image, C = (F = s.user) == null ? void 0 : F.username, B = C ? `linktr.ee/${C}` : void 0, H = ((G = s.user) == null ? void 0 : G.id) || "unknown";
773
775
  return (
774
776
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
775
777
  /* @__PURE__ */ n(
@@ -797,16 +799,16 @@ const Qs = ({
797
799
  /* @__PURE__ */ n(
798
800
  oe,
799
801
  {
800
- id: W,
801
- name: A,
802
- image: H,
802
+ id: H,
803
+ name: P,
804
+ image: W,
803
805
  size: 88,
804
806
  shape: "circle"
805
807
  }
806
808
  ),
807
809
  /* @__PURE__ */ m("div", { className: "flex flex-col min-w-0 flex-1", children: [
808
- /* @__PURE__ */ n("p", { className: "truncate text-base font-semibold text-charcoal", children: A }),
809
- j && /* @__PURE__ */ n("p", { className: "truncate text-sm text-[#00000055]", children: j }),
810
+ /* @__PURE__ */ n("p", { className: "truncate text-base font-semibold text-charcoal", children: P }),
811
+ B && /* @__PURE__ */ n("p", { className: "truncate text-sm text-[#00000055]", children: B }),
810
812
  i && !f && /* @__PURE__ */ n(
811
813
  "span",
812
814
  {
@@ -831,7 +833,7 @@ const Qs = ({
831
833
  d && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(
832
834
  Se,
833
835
  {
834
- onClick: T,
836
+ onClick: A,
835
837
  disabled: w,
836
838
  "aria-busy": w,
837
839
  children: [
@@ -843,11 +845,11 @@ const Qs = ({
843
845
  /* @__PURE__ */ n("li", { children: v ? /* @__PURE__ */ m(
844
846
  Se,
845
847
  {
846
- onClick: M,
847
- disabled: I,
848
- "aria-busy": I,
848
+ onClick: E,
849
+ disabled: S,
850
+ "aria-busy": S,
849
851
  children: [
850
- I ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
852
+ S ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
851
853
  /* @__PURE__ */ n("span", { children: "Unblock" })
852
854
  ]
853
855
  }
@@ -855,15 +857,15 @@ const Qs = ({
855
857
  Se,
856
858
  {
857
859
  onClick: O,
858
- disabled: I,
859
- "aria-busy": I,
860
+ disabled: S,
861
+ "aria-busy": S,
860
862
  children: [
861
- I ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
863
+ S ? /* @__PURE__ */ n(Be, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
862
864
  /* @__PURE__ */ n("span", { children: "Block" })
863
865
  ]
864
866
  }
865
867
  ) }),
866
- /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(Se, { variant: "danger", onClick: L, children: [
868
+ /* @__PURE__ */ n("li", { children: /* @__PURE__ */ m(Se, { variant: "danger", onClick: R, children: [
867
869
  /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
868
870
  /* @__PURE__ */ n("span", { children: "Report" })
869
871
  ] }) }),
@@ -874,7 +876,7 @@ const Qs = ({
874
876
  }
875
877
  )
876
878
  );
877
- }, ea = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), qe = "vote_up", Xe = "vote_down";
879
+ }, ea = (e) => /* @__PURE__ */ n(An, { ...e, position: "center" }), qe = "vote_up", Xe = "vote_down";
878
880
  function ta(e) {
879
881
  return e != null && e.length ? e.some((t) => t.type === Xe) ? "down" : e.some((t) => t.type === qe) ? "up" : null : null;
880
882
  }
@@ -882,7 +884,7 @@ function na(e) {
882
884
  const { channel: t } = me(), { client: s } = Qe("useMessageVote"), a = re(
883
885
  () => ta(e.own_reactions),
884
886
  [e.own_reactions]
885
- ), r = U(async () => {
887
+ ), r = V(async () => {
886
888
  if (s != null && s.userID)
887
889
  try {
888
890
  a === "up" ? await t.deleteReaction(e.id, qe) : await t.sendReaction(
@@ -892,7 +894,7 @@ function na(e) {
892
894
  );
893
895
  } catch {
894
896
  }
895
- }, [t, s == null ? void 0 : s.userID, e.id, a]), i = U(async () => {
897
+ }, [t, s == null ? void 0 : s.userID, e.id, a]), i = V(async () => {
896
898
  if (s != null && s.userID)
897
899
  try {
898
900
  a === "down" ? await t.deleteReaction(e.id, Xe) : await t.sendReaction(
@@ -905,7 +907,7 @@ function na(e) {
905
907
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
906
908
  return { selected: a, voteUp: r, voteDown: i };
907
909
  }
908
- const sa = B.lazy(() => import("./Card-BpVephnj.js")), aa = B.lazy(() => import("./Card-CYLat33l.js")), ra = B.lazy(() => import("./Card-bUYvpOEI.js")), nt = () => /* @__PURE__ */ n(
910
+ const sa = $.lazy(() => import("./Card-CBeF7eUm.js")), aa = $.lazy(() => import("./Card-CSvw2WUm.js")), ra = $.lazy(() => import("./Card-cl8fYGrO.js")), nt = () => /* @__PURE__ */ n(
909
911
  "div",
910
912
  {
911
913
  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)]",
@@ -951,7 +953,7 @@ function ma(e) {
951
953
  return t !== "document" ? da[t] : ua[sn(e)];
952
954
  }
953
955
  function ge(e, t) {
954
- return B.createElement(ma(e), t);
956
+ return $.createElement(ma(e), t);
955
957
  }
956
958
  const ha = (e) => {
957
959
  var t, s;
@@ -968,23 +970,23 @@ const ha = (e) => {
968
970
  muted: d = !1,
969
971
  onContainerClick: h
970
972
  }) => {
971
- const g = le(t), u = Z(null), f = Z(null), c = Z(null), b = Z(r), [x, v] = z(a), [N, w] = z(0), [E, I] = z(!1), [S, R] = z(!1), [T, O] = z(!1), [M, L] = z(!1), [A, H] = z(!0), [k, j] = z(null), W = U(() => {
973
+ const g = le(t), u = Z(null), f = Z(null), c = Z(null), b = Z(r), [x, v] = z(a), [N, w] = z(0), [I, S] = z(!1), [T, D] = z(!1), [A, O] = z(!1), [E, R] = z(!1), [P, W] = z(!0), [C, B] = z(null), H = V(() => {
972
974
  O(!1), v(!0);
973
- }, []), V = U((p) => {
974
- const C = f.current;
975
- if (!C) return 0;
976
- const Y = C.getBoundingClientRect();
975
+ }, []), U = V((p) => {
976
+ const k = f.current;
977
+ if (!k) return 0;
978
+ const Y = k.getBoundingClientRect();
977
979
  return Math.max(
978
980
  0,
979
981
  Math.min(1, (ha(p) - Y.left) / Y.width)
980
982
  );
981
- }, []), P = U((p) => {
982
- const C = u.current;
983
- C && C.duration && (C.currentTime = p * C.duration);
983
+ }, []), L = V((p) => {
984
+ const k = u.current;
985
+ k && k.duration && (k.currentTime = p * k.duration);
984
986
  }, []), F = (p) => {
985
- p.stopPropagation(), I(!0);
986
- const C = V(p);
987
- w(C), P(C);
987
+ p.stopPropagation(), S(!0);
988
+ const k = U(p);
989
+ w(k), L(k);
988
990
  };
989
991
  X(() => {
990
992
  r !== void 0 && r !== b.current && (b.current = r, v(r));
@@ -994,27 +996,27 @@ const ha = (e) => {
994
996
  return;
995
997
  }
996
998
  const p = () => {
997
- const C = u.current;
998
- C && C.duration && !E && w(C.currentTime / C.duration), c.current = requestAnimationFrame(p);
999
+ const k = u.current;
1000
+ k && k.duration && !I && w(k.currentTime / k.duration), c.current = requestAnimationFrame(p);
999
1001
  };
1000
1002
  return c.current = requestAnimationFrame(p), () => {
1001
1003
  c.current !== null && cancelAnimationFrame(c.current);
1002
1004
  };
1003
- }, [x, E]), X(() => {
1005
+ }, [x, I]), X(() => {
1004
1006
  const p = u.current;
1005
- p && (x ? p.play().catch((C) => {
1007
+ p && (x ? p.play().catch((k) => {
1006
1008
  v(!1), O(!0);
1007
1009
  }) : p.pause());
1008
1010
  }, [x]), X(() => {
1009
- if (!E) return;
1010
- const p = (Y) => w(V(Y)), C = (Y) => {
1011
- I(!1), P(V(Y));
1011
+ if (!I) return;
1012
+ const p = (Y) => w(U(Y)), k = (Y) => {
1013
+ S(!1), L(U(Y));
1012
1014
  };
1013
- return window.addEventListener("mousemove", p), window.addEventListener("mouseup", C), window.addEventListener("touchmove", p, { passive: !0 }), window.addEventListener("touchend", C), () => {
1014
- window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", p), window.removeEventListener("touchend", C);
1015
+ return window.addEventListener("mousemove", p), window.addEventListener("mouseup", k), window.addEventListener("touchmove", p, { passive: !0 }), window.addEventListener("touchend", k), () => {
1016
+ window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", p), window.removeEventListener("touchend", k);
1015
1017
  };
1016
- }, [E, V, P]);
1017
- const G = k ? { aspectRatio: String(k) } : void 0, _ = k ? "" : " aspect-video", D = Math.round(N * 100);
1018
+ }, [I, U, L]);
1019
+ const G = C ? { aspectRatio: String(C) } : void 0, _ = C ? "" : " aspect-video", M = Math.round(N * 100);
1018
1020
  return /* @__PURE__ */ m(
1019
1021
  "div",
1020
1022
  {
@@ -1027,7 +1029,7 @@ const ha = (e) => {
1027
1029
  h(p);
1028
1030
  return;
1029
1031
  }
1030
- T || l && v((C) => !C);
1032
+ A || l && v((k) => !k);
1031
1033
  },
1032
1034
  onKeyDown: (p) => {
1033
1035
  if (!(p.key !== "Enter" && p.key !== " ")) {
@@ -1035,11 +1037,11 @@ const ha = (e) => {
1035
1037
  h(p);
1036
1038
  return;
1037
1039
  }
1038
- T || l && v((C) => !C);
1040
+ A || l && v((k) => !k);
1039
1041
  }
1040
1042
  },
1041
1043
  children: [
1042
- s && (g === "audio" || A) && /* @__PURE__ */ n(
1044
+ s && (g === "audio" || P) && /* @__PURE__ */ n(
1043
1045
  "img",
1044
1046
  {
1045
1047
  src: s,
@@ -1047,7 +1049,7 @@ const ha = (e) => {
1047
1049
  className: "absolute inset-0 h-full w-full object-cover"
1048
1050
  }
1049
1051
  ),
1050
- !s && (g === "audio" || A) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ge(t, {
1052
+ !s && (g === "audio" || P) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ge(t, {
1051
1053
  className: "size-12 text-black/20",
1052
1054
  weight: "regular"
1053
1055
  }) }),
@@ -1059,11 +1061,11 @@ const ha = (e) => {
1059
1061
  loop: i,
1060
1062
  muted: d,
1061
1063
  style: { width: "100%", height: "100%" },
1062
- onLoadStart: () => L(!0),
1064
+ onLoadStart: () => R(!0),
1063
1065
  onCanPlay: () => {
1064
- L(!1), H(!1);
1066
+ R(!1), W(!1);
1065
1067
  },
1066
- onWaiting: () => L(!0),
1068
+ onWaiting: () => R(!0),
1067
1069
  onPlay: () => O(!1),
1068
1070
  onEnded: () => {
1069
1071
  i || (v(!1), w(0));
@@ -1079,15 +1081,15 @@ const ha = (e) => {
1079
1081
  muted: d,
1080
1082
  playsInline: !0,
1081
1083
  style: { width: "100%", height: "100%" },
1082
- onLoadStart: () => L(!0),
1084
+ onLoadStart: () => R(!0),
1083
1085
  onCanPlay: () => {
1084
- L(!1), H(!1);
1086
+ R(!1), W(!1);
1085
1087
  },
1086
- onWaiting: () => L(!0),
1088
+ onWaiting: () => R(!0),
1087
1089
  onPlay: () => O(!1),
1088
1090
  onLoadedMetadata: () => {
1089
1091
  const p = u.current;
1090
- p instanceof HTMLVideoElement && p.videoWidth && p.videoHeight && j(p.videoWidth / p.videoHeight);
1092
+ p instanceof HTMLVideoElement && p.videoWidth && p.videoHeight && B(p.videoWidth / p.videoHeight);
1091
1093
  },
1092
1094
  onEnded: () => {
1093
1095
  i || (v(!1), w(0));
@@ -1095,14 +1097,14 @@ const ha = (e) => {
1095
1097
  children: /* @__PURE__ */ n("track", { kind: "captions" })
1096
1098
  }
1097
1099
  ) }),
1098
- M && !T && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
1100
+ E && !A && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
1099
1101
  pe,
1100
1102
  {
1101
1103
  className: "size-8 animate-spin text-white/80",
1102
1104
  weight: "bold"
1103
1105
  }
1104
1106
  ) }),
1105
- T && !l && /* @__PURE__ */ n(
1107
+ A && !l && /* @__PURE__ */ n(
1106
1108
  "div",
1107
1109
  {
1108
1110
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -1110,10 +1112,10 @@ const ha = (e) => {
1110
1112
  tabIndex: 0,
1111
1113
  "aria-label": "Play preview",
1112
1114
  onClick: (p) => {
1113
- p.stopPropagation(), W();
1115
+ p.stopPropagation(), H();
1114
1116
  },
1115
1117
  onKeyDown: (p) => {
1116
- p.key !== "Enter" && p.key !== " " || (p.preventDefault(), p.stopPropagation(), W());
1118
+ p.key !== "Enter" && p.key !== " " || (p.preventDefault(), p.stopPropagation(), H());
1117
1119
  },
1118
1120
  children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(He, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1119
1121
  }
@@ -1123,7 +1125,7 @@ const ha = (e) => {
1123
1125
  {
1124
1126
  role: "slider",
1125
1127
  "aria-label": "Playback position",
1126
- "aria-valuenow": D,
1128
+ "aria-valuenow": M,
1127
1129
  "aria-valuemin": 0,
1128
1130
  "aria-valuemax": 100,
1129
1131
  tabIndex: 0,
@@ -1133,13 +1135,13 @@ const ha = (e) => {
1133
1135
  onTouchStart: F,
1134
1136
  onClick: (p) => p.stopPropagation(),
1135
1137
  onKeyDown: (p) => {
1136
- p.key === "ArrowRight" && P(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && P(Math.max(0, N - 0.05));
1138
+ p.key === "ArrowRight" && L(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && L(Math.max(0, N - 0.05));
1137
1139
  },
1138
1140
  children: /* @__PURE__ */ n("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ n(
1139
1141
  "div",
1140
1142
  {
1141
1143
  className: "h-full rounded-full bg-white",
1142
- style: { width: `${D}%` }
1144
+ style: { width: `${M}%` }
1143
1145
  }
1144
1146
  ) })
1145
1147
  }
@@ -1150,7 +1152,7 @@ const ha = (e) => {
1150
1152
  {
1151
1153
  type: "button",
1152
1154
  onClick: (p) => {
1153
- p.stopPropagation(), v((C) => !C);
1155
+ p.stopPropagation(), v((k) => !k);
1154
1156
  },
1155
1157
  className: "shrink-0 text-white",
1156
1158
  "aria-label": x ? "Pause" : "Play",
@@ -1162,7 +1164,7 @@ const ha = (e) => {
1162
1164
  {
1163
1165
  role: "slider",
1164
1166
  "aria-label": "Playback position",
1165
- "aria-valuenow": D,
1167
+ "aria-valuenow": M,
1166
1168
  "aria-valuemin": 0,
1167
1169
  "aria-valuemax": 100,
1168
1170
  tabIndex: 0,
@@ -1171,21 +1173,21 @@ const ha = (e) => {
1171
1173
  onMouseDown: F,
1172
1174
  onTouchStart: F,
1173
1175
  onClick: (p) => p.stopPropagation(),
1174
- onMouseEnter: () => R(!0),
1175
- onMouseLeave: () => R(!1),
1176
+ onMouseEnter: () => D(!0),
1177
+ onMouseLeave: () => D(!1),
1176
1178
  onKeyDown: (p) => {
1177
- p.key === "ArrowRight" && P(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && P(Math.max(0, N - 0.05));
1179
+ p.key === "ArrowRight" && L(Math.min(1, N + 0.05)), p.key === "ArrowLeft" && L(Math.max(0, N - 0.05));
1178
1180
  },
1179
1181
  children: [
1180
1182
  /* @__PURE__ */ n(
1181
1183
  "div",
1182
1184
  {
1183
- className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${S || E ? "h-1.5" : "h-1"}`,
1185
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${T || I ? "h-1.5" : "h-1"}`,
1184
1186
  children: /* @__PURE__ */ n(
1185
1187
  "div",
1186
1188
  {
1187
1189
  className: "h-full rounded-full bg-white",
1188
- style: { width: `${D}%` }
1190
+ style: { width: `${M}%` }
1189
1191
  }
1190
1192
  )
1191
1193
  }
@@ -1193,8 +1195,8 @@ const ha = (e) => {
1193
1195
  /* @__PURE__ */ n(
1194
1196
  "div",
1195
1197
  {
1196
- className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${S || E ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1197
- style: { left: `${D}%` }
1198
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${T || I ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
1199
+ style: { left: `${M}%` }
1198
1200
  }
1199
1201
  )
1200
1202
  ]
@@ -1372,7 +1374,7 @@ function wa(e) {
1372
1374
  return e ? "text-white/20" : "text-black/20";
1373
1375
  }
1374
1376
  const at = ({ attachment: e, isMyMessage: t }) => {
1375
- 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, h = /* @__PURE__ */ m(B.Fragment, { children: [
1377
+ 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, h = /* @__PURE__ */ m($.Fragment, { children: [
1376
1378
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1377
1379
  "img",
1378
1380
  {
@@ -1434,7 +1436,7 @@ const ya = ({
1434
1436
  },
1435
1437
  disabled: s,
1436
1438
  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",
1437
- children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(B.Fragment, { children: [
1439
+ children: s ? /* @__PURE__ */ n(pe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m($.Fragment, { children: [
1438
1440
  /* @__PURE__ */ n(ve, { className: "size-4 text-white", weight: "bold" }),
1439
1441
  "Download"
1440
1442
  ] })
@@ -1610,7 +1612,7 @@ const Ta = ({
1610
1612
  children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "down" ? "fill" : "regular" })
1611
1613
  }
1612
1614
  )
1613
- ] }), Ma = (e) => {
1615
+ ] }), Aa = (e) => {
1614
1616
  var bt, pt, vt, xt, wt, Nt, yt, _t, Ct, kt, Et, It, St, Tt;
1615
1617
  const {
1616
1618
  additionalMessageInputProps: t,
@@ -1629,26 +1631,26 @@ const Ta = ({
1629
1631
  renderText: b,
1630
1632
  threadList: x,
1631
1633
  viewerLanguage: v
1632
- } = e, { client: N } = Qe("CustomMessage"), { channel: w } = me("CustomMessage"), { isUnlocking: E, onUnlockClick: I, onFetchSource: S, onDownloadClick: R } = Sa("LockedAttachment"), [T, O] = z(!1), M = Dn(c.id), { selected: L, voteUp: A, voteDown: H } = na(c), {
1633
- Attachment: k = Rn,
1634
- EditMessageModal: j = Ln,
1635
- MessageActions: W,
1636
- MessageBlocked: V = Fn,
1637
- MessageBouncePrompt: P = On,
1634
+ } = e, { client: N } = Qe("CustomMessage"), { channel: w } = me("CustomMessage"), { isUnlocking: I, onUnlockClick: S, onFetchSource: T, onDownloadClick: D } = Sa("LockedAttachment"), [A, O] = z(!1), E = Dn(c.id), { selected: R, voteUp: P, voteDown: W } = na(c), {
1635
+ Attachment: C = Rn,
1636
+ EditMessageModal: B = Ln,
1637
+ MessageActions: H,
1638
+ MessageBlocked: U = Fn,
1639
+ MessageBouncePrompt: L = On,
1638
1640
  MessageDeleted: F = zn,
1639
1641
  MessageIsThreadReplyInChannelButtonIndicator: G = Pn,
1640
1642
  MessageRepliesCountButton: _ = Bn,
1641
- ReminderNotification: D = $n,
1643
+ ReminderNotification: M = $n,
1642
1644
  StreamedMessageText: p = jn,
1643
- PinIndicator: C
1645
+ PinIndicator: k
1644
1646
  } = Gt("CustomMessage"), Y = Un(c), q = Vn(c), he = re(
1645
1647
  () => u == null ? void 0 : u(c),
1646
1648
  [u, c]
1647
1649
  ), J = re(() => {
1648
1650
  const be = c.attachments ?? [], Ie = c.shared_location ? [c.shared_location, ...be] : be;
1649
- if (!Me(c)) return Ie;
1650
- const Mt = Ie.filter((At) => !("type" in At) || !ln(At));
1651
- return Mt.length === Ie.length ? Ie : Mt;
1651
+ if (!Ae(c)) return Ie;
1652
+ const At = Ie.filter((Mt) => !("type" in Mt) || !ln(Mt));
1653
+ return At.length === Ie.length ? Ie : At;
1652
1654
  }, [c]), ee = re(() => {
1653
1655
  const be = Kt({ message: c, viewerLanguage: v });
1654
1656
  return be === c.text ? c : { ...c, text: be };
@@ -1658,7 +1660,7 @@ const Ta = ({
1658
1660
  if (c.deleted_at || c.type === "deleted")
1659
1661
  return /* @__PURE__ */ n(F, { message: c });
1660
1662
  if (Hn(c))
1661
- return /* @__PURE__ */ n(V, {});
1663
+ return /* @__PURE__ */ n(U, {});
1662
1664
  const Ce = !x && !!c.reply_count, ke = !x && c.show_in_channel && c.parent_id, ce = c.status === "failed" && ((bt = c.error) == null ? void 0 : bt.status) !== 403, te = Yn(c);
1663
1665
  let se;
1664
1666
  ce ? se = () => h(c) : te && (se = () => O(!0));
@@ -1679,25 +1681,25 @@ const Ta = ({
1679
1681
  "str-chat__virtual-message__wrapper--first": i,
1680
1682
  "str-chat__virtual-message__wrapper--group": l
1681
1683
  }
1682
- ), Ee = c.poll_id && N.polls.fromState(c.poll_id), ue = Xs(c), $ = Me(c), K = qs(c), Q = !!(J != null && J.length && !c.quoted_message), ae = $ && de && Q;
1684
+ ), Ee = c.poll_id && N.polls.fromState(c.poll_id), ue = Xs(c), j = Ae(c), K = qs(c), Q = !!(J != null && J.length && !c.quoted_message), ae = j && de && Q;
1683
1685
  return /* @__PURE__ */ m(ie, { children: [
1684
1686
  a && /* @__PURE__ */ n(
1685
- j,
1687
+ B,
1686
1688
  {
1687
1689
  additionalMessageInputProps: t
1688
1690
  }
1689
1691
  ),
1690
- T && /* @__PURE__ */ n(
1692
+ A && /* @__PURE__ */ n(
1691
1693
  Wn,
1692
1694
  {
1693
- MessageBouncePrompt: P,
1695
+ MessageBouncePrompt: L,
1694
1696
  onClose: () => O(!1),
1695
- open: T
1697
+ open: A
1696
1698
  }
1697
1699
  ),
1698
1700
  /* @__PURE__ */ m("div", { className: Oe, "data-message-id": c.id, children: [
1699
- C && /* @__PURE__ */ n(C, {}),
1700
- !!M && /* @__PURE__ */ n(D, { reminder: M }),
1701
+ k && /* @__PURE__ */ n(k, {}),
1702
+ !!E && /* @__PURE__ */ n(M, { reminder: E }),
1701
1703
  c.user && /* @__PURE__ */ n(
1702
1704
  oe,
1703
1705
  {
@@ -1705,9 +1707,9 @@ const Ta = ({
1705
1707
  id: c.user.id,
1706
1708
  image: c.user.image,
1707
1709
  name: c.user.name || c.user.id,
1708
- size: $ ? 24 : 28,
1710
+ size: j ? 24 : 28,
1709
1711
  shape: "circle",
1710
- dmAgentEnabled: $
1712
+ dmAgentEnabled: j
1711
1713
  }
1712
1714
  ),
1713
1715
  /* @__PURE__ */ m(
@@ -1738,8 +1740,8 @@ const Ta = ({
1738
1740
  amountText: (Nt = c.metadata) == null ? void 0 : Nt.amount_text,
1739
1741
  detail: (yt = c.metadata) == null ? void 0 : yt.attachment_detail,
1740
1742
  paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1741
- onPreviewClick: () => I == null ? void 0 : I(c, w),
1742
- onFetchSource: async () => await (S == null ? void 0 : S(c, w))
1743
+ onPreviewClick: () => S == null ? void 0 : S(c, w),
1744
+ onFetchSource: async () => await (T == null ? void 0 : T(c, w))
1743
1745
  }
1744
1746
  ) : /* @__PURE__ */ n(
1745
1747
  Bt.Received,
@@ -1750,10 +1752,10 @@ const Ta = ({
1750
1752
  amountText: (It = c.metadata) == null ? void 0 : It.amount_text,
1751
1753
  detail: (St = c.metadata) == null ? void 0 : St.attachment_detail,
1752
1754
  paymentStatus: (Tt = c.metadata) == null ? void 0 : Tt.payment_status,
1753
- isUnlocking: E(c.id),
1754
- onUnlockClick: () => I == null ? void 0 : I(c, w),
1755
- onFetchSource: async () => await (S == null ? void 0 : S(c, w)),
1756
- onDownloadClick: () => R == null ? void 0 : R(c, w)
1755
+ isUnlocking: I(c.id),
1756
+ onUnlockClick: () => S == null ? void 0 : S(c, w),
1757
+ onFetchSource: async () => await (T == null ? void 0 : T(c, w)),
1758
+ onDownloadClick: () => D == null ? void 0 : D(c, w)
1757
1759
  }
1758
1760
  ),
1759
1761
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
@@ -1767,7 +1769,7 @@ const Ta = ({
1767
1769
  /* Tip-only messages render as a standalone bubble */
1768
1770
  /* @__PURE__ */ n($e, { message: c, standalone: !0 })
1769
1771
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
1770
- $ && !ae && /* @__PURE__ */ n(
1772
+ j && !ae && /* @__PURE__ */ n(
1771
1773
  $e,
1772
1774
  {
1773
1775
  message: c,
@@ -1777,7 +1779,7 @@ const Ta = ({
1777
1779
  ),
1778
1780
  Ee && /* @__PURE__ */ n(qn, { poll: Ee }),
1779
1781
  J != null && J.length && !c.quoted_message ? /* @__PURE__ */ n(
1780
- k,
1782
+ C,
1781
1783
  {
1782
1784
  actionHandler: o,
1783
1785
  attachments: J
@@ -1798,12 +1800,12 @@ const Ta = ({
1798
1800
  ),
1799
1801
  /* @__PURE__ */ n(Xn, {})
1800
1802
  ] }) }),
1801
- W && /* @__PURE__ */ n(W, {})
1803
+ H && /* @__PURE__ */ n(H, {})
1802
1804
  ]
1803
1805
  }
1804
1806
  ),
1805
1807
  !K && !ue && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
1806
- (!$ || ae) && /* @__PURE__ */ n(
1808
+ (!j || ae) && /* @__PURE__ */ n(
1807
1809
  $e,
1808
1810
  {
1809
1811
  message: c,
@@ -1811,12 +1813,12 @@ const Ta = ({
1811
1813
  isMyMessage: de
1812
1814
  }
1813
1815
  ),
1814
- s && $ && /* @__PURE__ */ n(
1816
+ s && j && /* @__PURE__ */ n(
1815
1817
  Ta,
1816
1818
  {
1817
- selected: L,
1818
- onVoteUp: A,
1819
- onVoteDown: H
1819
+ selected: R,
1820
+ onVoteUp: P,
1821
+ onVoteDown: W
1820
1822
  }
1821
1823
  )
1822
1824
  ] }),
@@ -1830,12 +1832,12 @@ const Ta = ({
1830
1832
  ke && /* @__PURE__ */ n(G, {})
1831
1833
  ] }, c.id)
1832
1834
  ] });
1833
- }, Aa = B.memo(
1834
- Ma,
1835
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
1835
+ }, Ma = $.memo(
1836
+ Aa,
1837
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Mn(e, t)
1836
1838
  ), Da = (e) => {
1837
1839
  const t = Le("CustomMessage");
1838
- return /* @__PURE__ */ n(Aa, { ...t, ...e });
1840
+ return /* @__PURE__ */ n(Ma, { ...t, ...e });
1839
1841
  }, Ra = () => {
1840
1842
  const { handleDelete: e } = Le("CustomMessageActions"), { t } = Zn("CustomMessageActions");
1841
1843
  return /* @__PURE__ */ n(Wt, { onClick: e, children: t("Delete") });
@@ -2056,7 +2058,7 @@ const Ta = ({
2056
2058
  "data-age-safety-system-type": s.type,
2057
2059
  children: [
2058
2060
  /* @__PURE__ */ n(
2059
- Ms,
2061
+ As,
2060
2062
  {
2061
2063
  size: 24,
2062
2064
  weight: "duotone",
@@ -2227,11 +2229,11 @@ const tr = () => null, nr = ({ className: e, message: t }) => /* @__PURE__ */ m(
2227
2229
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2228
2230
  ]
2229
2231
  }
2230
- ), Ae = B.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
2232
+ ), Me = $.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
2231
2233
  /* @__PURE__ */ n(nr, { className: "w-6 h-6" }),
2232
2234
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2233
2235
  ] }) }));
2234
- Ae.displayName = "LoadingState";
2236
+ Me.displayName = "LoadingState";
2235
2237
  const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Vt = "Replies instantly with AI assistant", sr = ({
2236
2238
  onBack: e,
2237
2239
  showBackButton: t,
@@ -2242,13 +2244,13 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2242
2244
  getParticipantDisplayName: l
2243
2245
  }) => {
2244
2246
  var c, b, x, v, N;
2245
- const { channel: o } = me(), d = B.useMemo(() => {
2246
- var I, S;
2247
- const w = (I = o._client) == null ? void 0 : I.userID;
2248
- return w ? Object.values(((S = o.state) == null ? void 0 : S.members) || {}).find(
2249
- (R) => {
2250
- var T;
2251
- return ((T = R.user) == null ? void 0 : T.id) && R.user.id !== w;
2247
+ const { channel: o } = me(), d = $.useMemo(() => {
2248
+ var S, T;
2249
+ const w = (S = o._client) == null ? void 0 : S.userID;
2250
+ return w ? Object.values(((T = o.state) == null ? void 0 : T.members) || {}).find(
2251
+ (D) => {
2252
+ var A;
2253
+ return ((A = D.user) == null ? void 0 : A.id) && D.user.id !== w;
2252
2254
  }
2253
2255
  ) : void 0;
2254
2256
  }, [(c = o._client) == null ? void 0 : c.userID, (b = o.state) == null ? void 0 : b.members]), h = l(d), g = (x = d == null ? void 0 : d.user) == null ? void 0 : x.image, u = Zt(o), f = async () => {
@@ -2439,38 +2441,38 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2439
2441
  viewerLanguage: N,
2440
2442
  getParticipantDisplayName: w
2441
2443
  }) => {
2442
- var j, W, V, P, F, G;
2443
- const { channel: E } = me(), I = Z(null), S = B.useMemo(() => {
2444
- var p, C;
2445
- const _ = (p = E._client) == null ? void 0 : p.userID;
2446
- return _ ? Object.values(((C = E.state) == null ? void 0 : C.members) || {}).find(
2444
+ var B, H, U, L, F, G;
2445
+ const { channel: I } = me(), S = Z(null), T = $.useMemo(() => {
2446
+ var p, k;
2447
+ const _ = (p = I._client) == null ? void 0 : p.userID;
2448
+ return _ ? Object.values(((k = I.state) == null ? void 0 : k.members) || {}).find(
2447
2449
  (Y) => {
2448
2450
  var q;
2449
2451
  return ((q = Y.user) == null ? void 0 : q.id) && Y.user.id !== _;
2450
2452
  }
2451
2453
  ) : void 0;
2452
- }, [(j = E._client) == null ? void 0 : j.userID, (W = E.state) == null ? void 0 : W.members]), R = B.useMemo(() => {
2453
- var p, C;
2454
- const _ = (p = E._client) == null ? void 0 : p.userID;
2455
- return _ ? Object.values(((C = E.state) == null ? void 0 : C.members) || {}).find((Y) => {
2454
+ }, [(B = I._client) == null ? void 0 : B.userID, (H = I.state) == null ? void 0 : H.members]), D = $.useMemo(() => {
2455
+ var p, k;
2456
+ const _ = (p = I._client) == null ? void 0 : p.userID;
2457
+ return _ ? Object.values(((k = I.state) == null ? void 0 : k.members) || {}).find((Y) => {
2456
2458
  var q;
2457
2459
  return ((q = Y.user) == null ? void 0 : q.id) === _;
2458
2460
  }) : void 0;
2459
- }, [(V = E._client) == null ? void 0 : V.userID, (P = E.state) == null ? void 0 : P.members]), T = ((F = R == null ? void 0 : R.user) == null ? void 0 : F.is_account) ?? (R == null ? void 0 : R.is_account), O = ((G = S == null ? void 0 : S.user) == null ? void 0 : G.is_account) ?? (S == null ? void 0 : S.is_account), M = v && T === !1 && O === !0, L = B.useMemo(() => {
2460
- const _ = E.data ?? {};
2461
+ }, [(U = I._client) == null ? void 0 : U.userID, (L = I.state) == null ? void 0 : L.members]), A = ((F = D == null ? void 0 : D.user) == null ? void 0 : F.is_account) ?? (D == null ? void 0 : D.is_account), O = ((G = T == null ? void 0 : T.user) == null ? void 0 : G.is_account) ?? (T == null ? void 0 : T.is_account), E = v && A === !1 && O === !0, R = $.useMemo(() => {
2462
+ const _ = I.data ?? {};
2461
2463
  if (_.followerStatus)
2462
2464
  return String(_.followerStatus);
2463
2465
  if (_.isFollower !== void 0)
2464
2466
  return _.isFollower ? "Subscribed to you" : "Not subscribed";
2465
- }, [E.data]), A = U(() => {
2467
+ }, [I.data]), P = V(() => {
2466
2468
  var _;
2467
- (_ = I.current) == null || _.showModal();
2468
- }, []), H = U(() => {
2469
+ (_ = S.current) == null || _.showModal();
2470
+ }, []), W = V(() => {
2469
2471
  var _;
2470
- (_ = I.current) == null || _.close();
2471
- }, []), k = U(
2472
+ (_ = S.current) == null || _.close();
2473
+ }, []), C = V(
2472
2474
  (_) => {
2473
- const { message: D } = Le("ChannelView"), p = /* @__PURE__ */ n(
2475
+ const { message: M } = Le("ChannelView"), p = /* @__PURE__ */ n(
2474
2476
  Da,
2475
2477
  {
2476
2478
  ..._,
@@ -2478,7 +2480,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2478
2480
  viewerLanguage: N
2479
2481
  }
2480
2482
  );
2481
- return !x || !D ? p : x(p, D);
2483
+ return !x || !M ? p : x(p, M);
2482
2484
  },
2483
2485
  [u, x, N]
2484
2486
  );
@@ -2487,7 +2489,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2487
2489
  cs,
2488
2490
  {
2489
2491
  overrides: {
2490
- Message: k,
2492
+ Message: C,
2491
2493
  MessageActions: Oa
2492
2494
  },
2493
2495
  children: /* @__PURE__ */ m(ds, { children: [
@@ -2496,14 +2498,14 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2496
2498
  {
2497
2499
  onBack: e,
2498
2500
  showBackButton: t,
2499
- onShowInfo: A,
2500
- canShowInfo: !!S,
2501
+ onShowInfo: P,
2502
+ canShowInfo: !!T,
2501
2503
  showStarButton: g,
2502
- dmAgentEnabled: M,
2504
+ dmAgentEnabled: E,
2503
2505
  getParticipantDisplayName: w
2504
2506
  }
2505
2507
  ) }, "lt-channel-header"),
2506
- f ? /* @__PURE__ */ n(B.Fragment, { children: f() }, "lt-channel-banner") : null,
2508
+ f ? /* @__PURE__ */ n($.Fragment, { children: f() }, "lt-channel-banner") : null,
2507
2509
  /* @__PURE__ */ n(
2508
2510
  "div",
2509
2511
  {
@@ -2518,11 +2520,11 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2518
2520
  },
2519
2521
  "lt-channel-message-list"
2520
2522
  ),
2521
- a ? /* @__PURE__ */ n(B.Fragment, { children: a(E) }, "lt-channel-conversation-footer") : null,
2523
+ a ? /* @__PURE__ */ n($.Fragment, { children: a(I) }, "lt-channel-conversation-footer") : null,
2522
2524
  /* @__PURE__ */ n(
2523
2525
  Ua,
2524
2526
  {
2525
- renderActions: () => s == null ? void 0 : s(E)
2527
+ renderActions: () => s == null ? void 0 : s(I)
2526
2528
  },
2527
2529
  "lt-channel-message-input"
2528
2530
  )
@@ -2532,12 +2534,12 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2532
2534
  /* @__PURE__ */ n(
2533
2535
  Qs,
2534
2536
  {
2535
- dialogRef: I,
2536
- onClose: H,
2537
- participant: S,
2538
- participantDisplayName: w(S),
2539
- channel: E,
2540
- followerStatusLabel: L,
2537
+ dialogRef: S,
2538
+ onClose: W,
2539
+ participant: T,
2540
+ participantDisplayName: w(T),
2541
+ channel: I,
2542
+ followerStatusLabel: R,
2541
2543
  onLeaveConversation: r,
2542
2544
  onBlockParticipant: i,
2543
2545
  showDeleteConversation: l,
@@ -2549,7 +2551,7 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2549
2551
  }
2550
2552
  )
2551
2553
  ] });
2552
- }, hn = B.memo(
2554
+ }, hn = $.memo(
2553
2555
  ({
2554
2556
  channel: e,
2555
2557
  onBack: t,
@@ -2570,52 +2572,52 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2570
2572
  showStarButton: v = !1,
2571
2573
  chatbotVotingEnabled: N = !1,
2572
2574
  renderChannelBanner: w,
2573
- customProfileContent: E,
2574
- customChannelActions: I,
2575
- renderMessage: S,
2576
- onMessageLinkClick: R,
2577
- sendButton: T,
2575
+ customProfileContent: I,
2576
+ customChannelActions: S,
2577
+ renderMessage: T,
2578
+ onMessageLinkClick: D,
2579
+ sendButton: A,
2578
2580
  viewerLanguage: O,
2579
- getParticipantDisplayName: M
2581
+ getParticipantDisplayName: E
2580
2582
  }) => {
2581
- const L = U(
2582
- (k) => (M == null ? void 0 : M(k)) ?? tt(k == null ? void 0 : k.user),
2583
- [M]
2584
- ), A = U(
2585
- async (k, j, W) => {
2586
- var D;
2587
- const V = ((D = e.data) == null ? void 0 : D.chatbot_paused) === !0, P = c && !V, F = {
2588
- ...j,
2589
- ...P && { silent: !0 },
2583
+ const R = V(
2584
+ (C) => (E == null ? void 0 : E(C)) ?? tt(C == null ? void 0 : C.user),
2585
+ [E]
2586
+ ), P = V(
2587
+ async (C, B, H) => {
2588
+ var M;
2589
+ const U = ((M = e.data) == null ? void 0 : M.chatbot_paused) === !0, L = c && !U, F = {
2590
+ ...B,
2591
+ ...L && { silent: !0 },
2590
2592
  ...b && {
2591
2593
  metadata: {
2592
- ...j.metadata ?? {},
2594
+ ...B.metadata ?? {},
2593
2595
  ...b
2594
2596
  }
2595
2597
  }
2596
2598
  }, G = {
2597
- ...W,
2598
- ...P && { skip_push: !0 }
2599
+ ...H,
2600
+ ...L && { skip_push: !0 }
2599
2601
  }, _ = await e.sendMessage(F, G);
2600
2602
  return x == null || x(_), _;
2601
2603
  },
2602
2604
  [e, c, b, x]
2603
- ), H = Z(null);
2605
+ ), W = Z(null);
2604
2606
  return X(() => {
2605
- if (!R) return;
2606
- const k = H.current;
2607
- if (!k) return;
2608
- const j = (W) => {
2609
- const V = W.target, P = V == null ? void 0 : V.closest("a[href]"), F = P == null ? void 0 : P.getAttribute("href");
2607
+ if (!D) return;
2608
+ const C = W.current;
2609
+ if (!C) return;
2610
+ const B = (H) => {
2611
+ const U = H.target, L = U == null ? void 0 : U.closest("a[href]"), F = L == null ? void 0 : L.getAttribute("href");
2610
2612
  if (!F) return;
2611
- const G = P == null ? void 0 : P.closest("[data-message-id]"), _ = G == null ? void 0 : G.getAttribute("data-message-id"), D = _ ? e.state.messages.find((p) => p.id === _) : void 0;
2612
- R(F, D);
2613
+ const G = L == null ? void 0 : L.closest("[data-message-id]"), _ = G == null ? void 0 : G.getAttribute("data-message-id"), M = _ ? e.state.messages.find((p) => p.id === _) : void 0;
2614
+ D(F, M);
2613
2615
  };
2614
- return k.addEventListener("click", j), () => k.removeEventListener("click", j);
2615
- }, [R, e]), /* @__PURE__ */ n(
2616
+ return C.addEventListener("click", B), () => C.removeEventListener("click", B);
2617
+ }, [D, e]), /* @__PURE__ */ n(
2616
2618
  "div",
2617
2619
  {
2618
- ref: H,
2620
+ ref: W,
2619
2621
  className: y(
2620
2622
  "messaging-channel-view h-full flex flex-col",
2621
2623
  o
@@ -2626,11 +2628,11 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2626
2628
  channel: e,
2627
2629
  MessageSystem: Ka,
2628
2630
  EmptyStateIndicator: d,
2629
- LoadingIndicator: Ae,
2631
+ LoadingIndicator: Me,
2630
2632
  DateSeparator: ea,
2631
2633
  TypingIndicator: Qa,
2632
- doSendMessageRequest: A,
2633
- ...T ? { SendButton: T } : {},
2634
+ doSendMessageRequest: P,
2635
+ ...A ? { SendButton: A } : {},
2634
2636
  children: /* @__PURE__ */ n(
2635
2637
  ar,
2636
2638
  {
@@ -2649,11 +2651,11 @@ const fe = "size-10 rounded-full bg-[#F1F0EE] hover:bg-[#E5E4E1] flex items-cent
2649
2651
  dmAgentEnabled: c,
2650
2652
  chatbotVotingEnabled: N,
2651
2653
  renderChannelBanner: w,
2652
- customProfileContent: E,
2653
- customChannelActions: I,
2654
- renderMessage: S,
2654
+ customProfileContent: I,
2655
+ customChannelActions: S,
2656
+ renderMessage: T,
2655
2657
  viewerLanguage: O,
2656
- getParticipantDisplayName: L
2658
+ getParticipantDisplayName: R
2657
2659
  }
2658
2660
  )
2659
2661
  }
@@ -2797,7 +2799,7 @@ const rr = ({ className: e }) => /* @__PURE__ */ m(
2797
2799
  ] })
2798
2800
  ]
2799
2801
  }
2800
- ), fn = B.memo(
2802
+ ), fn = $.memo(
2801
2803
  ({ hasChannels: e, channelsLoaded: t }) => /* @__PURE__ */ n("div", { className: "messaging-empty-state flex items-center justify-center h-full p-8 text-balance", children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center max-w-sm text-center", children: [
2802
2804
  /* @__PURE__ */ n(rr, {}),
2803
2805
  t && !e && /* @__PURE__ */ m("div", { className: "mt-8", children: [
@@ -2807,7 +2809,7 @@ const rr = ({ className: e }) => /* @__PURE__ */ m(
2807
2809
  ] }) })
2808
2810
  );
2809
2811
  fn.displayName = "EmptyState";
2810
- const Te = B.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
2812
+ const Te = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
2811
2813
  /* @__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: "⚠️" }) }),
2812
2814
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2813
2815
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2842,73 +2844,73 @@ const ki = ({
2842
2844
  messageMetadata: v,
2843
2845
  onMessageSent: N,
2844
2846
  showStarButton: w = !1,
2845
- chatbotVotingEnabled: E = !1,
2846
- viewerLanguage: I,
2847
- renderMessagePreview: S,
2848
- renderChannelBanner: R,
2849
- customProfileContent: T,
2847
+ chatbotVotingEnabled: I = !1,
2848
+ viewerLanguage: S,
2849
+ renderMessagePreview: T,
2850
+ renderChannelBanner: D,
2851
+ customProfileContent: A,
2850
2852
  customChannelActions: O,
2851
- renderMessage: M,
2852
- onMessageLinkClick: L,
2853
- sendButton: A
2853
+ renderMessage: E,
2854
+ onMessageLinkClick: R,
2855
+ sendButton: P
2854
2856
  }) => {
2855
2857
  const {
2856
- service: H,
2857
- client: k,
2858
- isConnected: j,
2859
- isLoading: W,
2860
- error: V,
2861
- refreshConnection: P,
2858
+ service: W,
2859
+ client: C,
2860
+ isConnected: B,
2861
+ isLoading: H,
2862
+ error: U,
2863
+ refreshConnection: L,
2862
2864
  debug: F
2863
- } = Ls(), [G, _] = z(null), [D, p] = z(!1), [C, Y] = z(!1), [q, he] = z(!1), [J, ee] = z(null), { showDeleteConversation: Ce = !0 } = e, ke = B.useMemo(() => {
2864
- const $ = k == null ? void 0 : k.userID;
2865
+ } = Ls(), [G, _] = z(null), [M, p] = z(!1), [k, Y] = z(!1), [q, he] = z(!1), [J, ee] = z(null), { showDeleteConversation: Ce = !0 } = e, ke = $.useMemo(() => {
2866
+ const j = C == null ? void 0 : C.userID;
2865
2867
  return {
2866
2868
  ...{
2867
2869
  type: "messaging",
2868
2870
  last_message_at: { $exists: !0 },
2869
- ...$ && {
2870
- members: { $in: [$] },
2871
+ ...j && {
2872
+ members: { $in: [j] },
2871
2873
  hidden: !1
2872
2874
  }
2873
2875
  },
2874
2876
  ...h
2875
2877
  };
2876
- }, [h, k == null ? void 0 : k.userID]), ce = Z(null), te = U(async () => {
2877
- if (!k || !j) return;
2878
- const $ = k.userID;
2879
- if ($)
2878
+ }, [h, C == null ? void 0 : C.userID]), ce = Z(null), te = V(async () => {
2879
+ if (!C || !B) return;
2880
+ const j = C.userID;
2881
+ if (j)
2880
2882
  try {
2881
- F && console.log("[MessagingShell] Syncing channels for user:", $);
2882
- const K = await k.queryChannels(
2883
+ F && console.log("[MessagingShell] Syncing channels for user:", j);
2884
+ const K = await C.queryChannels(
2883
2885
  {
2884
2886
  type: "messaging",
2885
- members: { $in: [$] }
2887
+ members: { $in: [j] }
2886
2888
  },
2887
2889
  {},
2888
2890
  { limit: 100 }
2889
2891
  );
2890
- p(K.length > 0), Y(!0), ce.current = $, F && console.log("[MessagingShell] Channels synced successfully:", {
2892
+ p(K.length > 0), Y(!0), ce.current = j, F && console.log("[MessagingShell] Channels synced successfully:", {
2891
2893
  channelCount: K.length
2892
2894
  });
2893
2895
  } catch (K) {
2894
2896
  console.error("[MessagingShell] Failed to sync channels:", K);
2895
2897
  }
2896
- }, [k, j, F]);
2898
+ }, [C, B, F]);
2897
2899
  X(() => {
2898
- if (!k || !j) return;
2899
- const $ = k.userID;
2900
- $ && ce.current !== $ && te();
2901
- }, [k, j, te]), X(() => {
2902
- if (!i || !k || !j) return;
2900
+ if (!C || !B) return;
2901
+ const j = C.userID;
2902
+ j && ce.current !== j && te();
2903
+ }, [C, B, te]), X(() => {
2904
+ if (!i || !C || !B) return;
2903
2905
  (async () => {
2904
- const K = k.userID;
2906
+ const K = C.userID;
2905
2907
  if (K)
2906
2908
  try {
2907
2909
  F && console.log(
2908
2910
  "[MessagingShell] Loading initial conversation with:",
2909
2911
  i
2910
2912
  );
2911
- const Q = await k.queryChannels(
2913
+ const Q = await C.queryChannels(
2912
2914
  {
2913
2915
  type: "messaging",
2914
2916
  members: { $eq: [K, i] }
@@ -2921,13 +2923,13 @@ const ki = ({
2921
2923
  "[MessagingShell] Initial conversation loaded:",
2922
2924
  Q[0].id
2923
2925
  );
2924
- else if (l && H) {
2926
+ else if (l && W) {
2925
2927
  F && console.log(
2926
2928
  "[MessagingShell] No conversation found, creating one for:",
2927
2929
  l
2928
2930
  );
2929
2931
  try {
2930
- const ae = await H.startChannelWithParticipant({
2932
+ const ae = await W.startChannelWithParticipant({
2931
2933
  id: l.id,
2932
2934
  name: l.name,
2933
2935
  phone: l.phone
@@ -2959,35 +2961,35 @@ const ki = ({
2959
2961
  }, [
2960
2962
  i,
2961
2963
  l,
2962
- k,
2963
- j,
2964
- H,
2964
+ C,
2965
+ B,
2966
+ W,
2965
2967
  F,
2966
2968
  r
2967
2969
  ]);
2968
- const se = U(
2969
- ($) => {
2970
- _($), r == null || r($);
2970
+ const se = V(
2971
+ (j) => {
2972
+ _(j), r == null || r(j);
2971
2973
  },
2972
2974
  [r]
2973
- ), de = U(() => {
2975
+ ), de = V(() => {
2974
2976
  q || _(null);
2975
- }, [q]), Oe = U(
2976
- async ($) => {
2977
- F && console.log("[MessagingShell] Leaving conversation:", $.id), _(null), he(!1), ce.current = null, await te();
2977
+ }, [q]), Oe = V(
2978
+ async (j) => {
2979
+ F && console.log("[MessagingShell] Leaving conversation:", j.id), _(null), he(!1), ce.current = null, await te();
2978
2980
  },
2979
2981
  [te, F]
2980
- ), Ee = U(
2981
- async ($) => {
2982
- F && console.log("[MessagingShell] Blocking participant:", $), _(null), he(!1), ce.current = null, await te();
2982
+ ), Ee = V(
2983
+ async (j) => {
2984
+ F && console.log("[MessagingShell] Blocking participant:", j), _(null), he(!1), ce.current = null, await te();
2983
2985
  },
2984
2986
  [te, F]
2985
2987
  ), ue = !!G;
2986
- return W ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Ae, {}) }) : V ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Te, { message: V, onBack: P }) }) : !j || !k ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(
2988
+ return H ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Me, {}) }) : U ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Te, { message: U, onBack: L }) }) : !B || !C ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(
2987
2989
  Te,
2988
2990
  {
2989
2991
  message: "Not connected to messaging service",
2990
- onBack: P
2992
+ onBack: L
2991
2993
  }
2992
2994
  ) }) : J ? /* @__PURE__ */ n("div", { className: y("h-full", t), children: /* @__PURE__ */ n(Te, { message: J }) }) : /* @__PURE__ */ n(
2993
2995
  "div",
@@ -3018,8 +3020,8 @@ const ki = ({
3018
3020
  filters: ke,
3019
3021
  channelRenderFilterFn: g,
3020
3022
  customEmptyStateIndicator: u,
3021
- renderMessagePreview: S,
3022
- viewerLanguage: I
3023
+ renderMessagePreview: T,
3024
+ viewerLanguage: S
3023
3025
  }
3024
3026
  )
3025
3027
  }
@@ -3044,7 +3046,7 @@ const ki = ({
3044
3046
  showBackButton: !q,
3045
3047
  renderMessageInputActions: s,
3046
3048
  renderConversationFooter: a,
3047
- renderChannelBanner: R,
3049
+ renderChannelBanner: D,
3048
3050
  onLeaveConversation: Oe,
3049
3051
  onBlockParticipant: Ee,
3050
3052
  CustomChannelEmptyState: o,
@@ -3056,23 +3058,23 @@ const ki = ({
3056
3058
  messageMetadata: v,
3057
3059
  onMessageSent: N,
3058
3060
  showStarButton: w,
3059
- chatbotVotingEnabled: E,
3060
- viewerLanguage: I,
3061
- customProfileContent: T,
3061
+ chatbotVotingEnabled: I,
3062
+ viewerLanguage: S,
3063
+ customProfileContent: A,
3062
3064
  customChannelActions: O,
3063
- renderMessage: M,
3064
- onMessageLinkClick: L,
3065
- sendButton: A
3065
+ renderMessage: E,
3066
+ onMessageLinkClick: R,
3067
+ sendButton: P
3066
3068
  },
3067
3069
  G.id
3068
3070
  ) }) : i ? (
3069
3071
  // Show loading while creating/loading direct conversation channel
3070
- /* @__PURE__ */ n(Ae, {})
3072
+ /* @__PURE__ */ n(Me, {})
3071
3073
  ) : /* @__PURE__ */ n(
3072
3074
  fn,
3073
3075
  {
3074
- hasChannels: D,
3075
- channelsLoaded: C
3076
+ hasChannels: M,
3077
+ channelsLoaded: k
3076
3078
  }
3077
3079
  )
3078
3080
  }
@@ -3337,7 +3339,7 @@ const lr = {
3337
3339
  onClick: u,
3338
3340
  "aria-label": "Edit attachment",
3339
3341
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3340
- children: /* @__PURE__ */ n(As, { className: "size-5", weight: "regular" })
3342
+ children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
3341
3343
  }
3342
3344
  ) : void 0;
3343
3345
  return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: ct, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3643,10 +3645,10 @@ const lr = {
3643
3645
  Sent: Ir,
3644
3646
  Received: Sr
3645
3647
  };
3646
- function Mr(e) {
3648
+ function Ar(e) {
3647
3649
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
3648
3650
  }
3649
- const Ar = {
3651
+ const Mr = {
3650
3652
  pdf: "PDF",
3651
3653
  doc: "DOC",
3652
3654
  xls: "XLS",
@@ -3666,7 +3668,7 @@ function Dr(e, t) {
3666
3668
  }
3667
3669
  if (!e) return;
3668
3670
  if (le(e) === "document") {
3669
- const r = sn(e), i = Ar[r];
3671
+ const r = sn(e), i = Mr[r];
3670
3672
  if (i) return i;
3671
3673
  if (e === "application/octet-stream") return;
3672
3674
  }
@@ -3675,7 +3677,7 @@ function Dr(e, t) {
3675
3677
  return a.toUpperCase();
3676
3678
  }
3677
3679
  function Rr(e, t, s) {
3678
- const a = Dr(e, t), r = typeof s == "number" && s > 0 ? Mr(s) : void 0;
3680
+ const a = Dr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3679
3681
  return [a, r].filter(Boolean).join(" · ") || void 0;
3680
3682
  }
3681
3683
  function ne(e) {
@@ -3895,7 +3897,7 @@ const zr = ({
3895
3897
  tone: i = "dark",
3896
3898
  onTriggered: l
3897
3899
  }) => {
3898
- const [o, d] = z(!1), h = U(
3900
+ const [o, d] = z(!1), h = V(
3899
3901
  (c) => {
3900
3902
  c.stopPropagation(), !o && (d(!0), pn(e, t).catch(() => {
3901
3903
  }).finally(() => {
@@ -3982,9 +3984,9 @@ const zr = ({
3982
3984
  }, [s, t, e]), X(() => {
3983
3985
  i((d) => Ve(d, 0, Math.max(e - 1, 0)));
3984
3986
  }, [e]);
3985
- const l = U(() => {
3987
+ const l = V(() => {
3986
3988
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
3987
- }, [e]), o = U(() => {
3989
+ }, [e]), o = V(() => {
3988
3990
  e <= 1 || i((d) => d >= e - 1 ? 0 : d + 1);
3989
3991
  }, [e]);
3990
3992
  return X(() => {
@@ -4213,12 +4215,12 @@ const zr = ({
4213
4215
  }
4214
4216
  );
4215
4217
  }, _e = (e) => {
4216
- const [t, s] = z(!1), [a, r] = z(0), i = U(
4218
+ const [t, s] = z(!1), [a, r] = z(0), i = V(
4217
4219
  (o) => {
4218
4220
  (e == null ? void 0 : e(o)) !== !1 && (r(o), s(!0));
4219
4221
  },
4220
4222
  [e]
4221
- ), l = U(() => s(!1), []);
4223
+ ), l = V(() => s(!1), []);
4222
4224
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
4223
4225
  }, Gr = (e, t, s, a) => ({
4224
4226
  ariaLabel: `Open image ${t + 1} of ${s}`,
@@ -4430,14 +4432,14 @@ const zr = ({
4430
4432
  groupPosition: o,
4431
4433
  "data-testid": "pdf-attachment",
4432
4434
  children: [
4433
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, E) => {
4434
- const I = w.filename ?? ne(w.src), S = v && E === 0 ? /* @__PURE__ */ n(Ne, { onClick: h, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4435
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((w, I) => {
4436
+ const S = w.filename ?? ne(w.src), T = v && I === 0 ? /* @__PURE__ */ n(Ne, { onClick: h, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4435
4437
  vn,
4436
4438
  {
4437
4439
  url: w.src,
4438
- filename: I,
4440
+ filename: S,
4439
4441
  variant: "inline",
4440
- label: `Download ${I}`,
4442
+ label: `Download ${S}`,
4441
4443
  tone: g
4442
4444
  }
4443
4445
  );
@@ -4446,11 +4448,11 @@ const zr = ({
4446
4448
  {
4447
4449
  variant: g,
4448
4450
  item: w,
4449
- index: E,
4451
+ index: I,
4450
4452
  onActivate: b,
4451
- trailingAction: S
4453
+ trailingAction: T
4452
4454
  },
4453
- `${w.src}-${E}`
4455
+ `${w.src}-${I}`
4454
4456
  );
4455
4457
  }) }),
4456
4458
  /* @__PURE__ */ n(
@@ -4729,7 +4731,7 @@ export {
4729
4731
  yi as k,
4730
4732
  ki as l,
4731
4733
  Rr as m,
4732
- Mr as n,
4734
+ Ar as n,
4733
4735
  Bs as o,
4734
4736
  Dr as p,
4735
4737
  Kt as q,
@@ -4743,4 +4745,4 @@ export {
4743
4745
  tt as y,
4744
4746
  Sa as z
4745
4747
  };
4746
- //# sourceMappingURL=index-CxKVYxq6.js.map
4748
+ //# sourceMappingURL=index-BGwytfkX.js.map