@linktr.ee/messaging-react 3.4.0-rc-1782373728 → 3.4.0-rc-1782387968

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 (37) hide show
  1. package/dist/{Card-h43tRi_a.js → Card-BOD2Qo_b.js} +3 -3
  2. package/dist/{Card-h43tRi_a.js.map → Card-BOD2Qo_b.js.map} +1 -1
  3. package/dist/{Card-TNeK_nFK.js → Card-DcEBssw0.js} +2 -2
  4. package/dist/{Card-TNeK_nFK.js.map → Card-DcEBssw0.js.map} +1 -1
  5. package/dist/{Card-C3icBnXT.cjs → Card-DkNdLpVE.cjs} +2 -2
  6. package/dist/{Card-C3icBnXT.cjs.map → Card-DkNdLpVE.cjs.map} +1 -1
  7. package/dist/{Card-DVo2e4rF.cjs → Card-UbPYWjnX.cjs} +2 -2
  8. package/dist/{Card-DVo2e4rF.cjs.map → Card-UbPYWjnX.cjs.map} +1 -1
  9. package/dist/{Card-DGkh6_ti.js → Card-beoX9cug.js} +2 -2
  10. package/dist/{Card-DGkh6_ti.js.map → Card-beoX9cug.js.map} +1 -1
  11. package/dist/{Card-B9Z659Y-.cjs → Card-utKbCGom.cjs} +2 -2
  12. package/dist/{Card-B9Z659Y-.cjs.map → Card-utKbCGom.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-DjFuOEgv.cjs → LockedThumbnail-Bjdf-fTw.cjs} +2 -2
  14. package/dist/{LockedThumbnail-DjFuOEgv.cjs.map → LockedThumbnail-Bjdf-fTw.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-DE3KLtk1.js → LockedThumbnail-bOjjYYyV.js} +2 -2
  16. package/dist/{LockedThumbnail-DE3KLtk1.js.map → LockedThumbnail-bOjjYYyV.js.map} +1 -1
  17. package/dist/index-B3oQq9zK.cjs +2 -0
  18. package/dist/index-B3oQq9zK.cjs.map +1 -0
  19. package/dist/{index-DKq7HA0h.js → index-DG5LOHey.js} +905 -910
  20. package/dist/index-DG5LOHey.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +28 -11
  23. package/dist/index.js +20 -19
  24. package/package.json +2 -2
  25. package/src/components/ChannelList/CustomChannelPreview.test.tsx +38 -0
  26. package/src/components/ChannelList/CustomChannelPreview.tsx +5 -6
  27. package/src/components/ChannelView.stories.tsx +21 -0
  28. package/src/components/ChannelView.test.tsx +35 -20
  29. package/src/components/ChannelView.tsx +28 -43
  30. package/src/components/MessagingShell/index.tsx +2 -0
  31. package/src/components/VerifiedBadge/index.tsx +25 -0
  32. package/src/index.ts +2 -0
  33. package/src/stream-custom-data.ts +8 -0
  34. package/src/types.ts +11 -11
  35. package/dist/index--bjxhW3D.cjs +0 -2
  36. package/dist/index--bjxhW3D.cjs.map +0 -1
  37. package/dist/index-DKq7HA0h.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import U, { createContext as Ye, useContext as Ae, useCallback as J, useState as z, useRef as j, useEffect as X, useId as Sn, useMemo as ne, Suspense as qe } from "react";
1
+ import { jsx as n, jsxs as h, Fragment as ne } from "react/jsx-runtime";
2
+ import U, { createContext as Ye, useContext as Ae, useCallback as J, useState as z, useRef as G, useEffect as X, useId as Sn, useMemo as te, Suspense as qe } from "react";
3
3
  import { StreamChatService as In } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Tn, LinkPreviewsManager as At } from "stream-chat";
5
- import { Chat as An, DateSeparator as Mn, useChannelStateContext as de, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as On, MessageBlocked as Pn, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as De, AIStates as Oe, useTypingContext as rs, useAIState as is, Channel as os, WithComponents as ls, Window as cs, MessageList as ds, ChannelList as us, InfiniteScroll as ms } from "stream-chat-react";
6
- import { StarIcon as Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs, ArrowLeftIcon as Lt, CaretRightIcon as Ve, PencilSimpleIcon as Ls, CaretLeftIcon as Ds } from "@phosphor-icons/react";
7
- import C from "classnames";
8
- import { MessageActions as Os, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
5
+ import { Chat as An, DateSeparator as Mn, useChannelStateContext as ce, useChatContext as We, areMessageUIPropsEqual as Rn, useMessageReminder as Ln, useComponentContext as jt, Attachment as Dn, EditMessageModal as Pn, MessageBlocked as On, MessageBouncePrompt as zn, MessageDeleted as $n, MessageIsThreadReplyInChannelButtonIndicator as Fn, MessageRepliesCountButton as Bn, ReminderNotification as Un, StreamedMessageText as jn, messageHasAttachments as Vn, messageHasReactions as Gn, isDateSeparatorMessage as Hn, isMessageBlocked as Yn, isMessageBounced as qn, MessageBounceModal as Wn, MessageText as Mt, Poll as Xn, MessageErrorIcon as Kn, useMessageContext as xe, useMessageComposer as Jn, useStateStore as Zn, MessageInput as Qn, useMessageInputContext as es, useMessageComposerHasSendableData as ts, AttachmentPreviewList as ns, QuotedMessagePreview as ss, TextareaComposer as as, MessageTimestamp as De, AIStates as 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 Be, DotsThreeIcon as hs, SpinnerGapIcon as ke, SignOutIcon as fs, ProhibitInsetIcon as Rt, FlagIcon as Vt, FileIcon as Gt, ImageIcon as gs, SpeakerHighIcon as bs, VideoCameraIcon as Ht, FileMdIcon as ps, FileTextIcon as vs, FileZipIcon as xs, FilePptIcon as ws, FileCsvIcon as _s, FileXlsIcon as Ns, FileDocIcon as ys, FilePdfIcon as Cs, CircleNotchIcon as pe, PlayIcon as Ue, PauseIcon as ks, LinkIcon as Es, DownloadSimpleIcon as ve, GiftIcon as Ss, ThumbsUpIcon as Is, ThumbsDownIcon as Ts, TrashSimpleIcon as As, XIcon as Me, ArrowUpIcon as Ms, SparkleIcon as je, ProhibitIcon as Rs, SealCheckIcon as Ls, ArrowLeftIcon as Lt, PencilSimpleIcon as Ds, CaretLeftIcon as Ps, CaretRightIcon as Os } from "@phosphor-icons/react";
7
+ import k from "classnames";
8
+ import { MessageActions as zs, DefaultDropdownActionButton as Yt } from "stream-chat-react/experimental";
9
9
  const qt = Ye({
10
10
  service: null,
11
11
  client: null,
@@ -16,7 +16,7 @@ const qt = Ye({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Xe = () => Ae(qt), Ni = ({
19
+ }), Xe = () => Ae(qt), Ci = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -24,10 +24,10 @@ const qt = Ye({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var F, T;
27
+ var A, S;
28
28
  const o = J(
29
- (E, ...A) => {
30
- i && console.log(`🔥 [MessagingProvider] ${E}`, ...A);
29
+ (I, ...E) => {
30
+ i && console.log(`🔥 [MessagingProvider] ${I}`, ...E);
31
31
  },
32
32
  [i]
33
33
  );
@@ -37,61 +37,61 @@ const qt = Ye({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, b] = z(!1), [w, p] = z(null), v = j(!1), _ = j(null), R = j(s);
41
- R.current = s;
42
- const y = j(i);
43
- y.current = i;
44
- const M = j({
40
+ const [l, d] = z(null), [m, g] = z(null), [u, f] = z(!1), [c, w] = z(!1), [b, p] = z(null), v = G(!1), _ = G(null), L = G(s);
41
+ L.current = s;
42
+ const T = G(i);
43
+ T.current = i;
44
+ const y = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
47
47
  serviceConfig: s,
48
48
  capabilities: r
49
- }), D = j(0);
50
- D.current++, o("📊 RENDER INFO", {
51
- renderCount: D.current,
49
+ }), M = G(0);
50
+ M.current++, o("📊 RENDER INFO", {
51
+ renderCount: M.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: M.current.userId !== (t == null ? void 0 : t.id),
55
- apiKeyChanged: M.current.apiKey !== a,
56
- serviceConfigChanged: M.current.serviceConfig !== s,
57
- capabilitiesChanged: M.current.capabilities !== r
54
+ userChanged: y.current.userId !== (t == null ? void 0 : t.id),
55
+ apiKeyChanged: y.current.apiKey !== a,
56
+ serviceConfigChanged: y.current.serviceConfig !== s,
57
+ capabilitiesChanged: y.current.capabilities !== r
58
58
  }
59
- }), M.current = {
59
+ }), y.current = {
60
60
  userId: t == null ? void 0 : t.id,
61
61
  apiKey: a,
62
62
  serviceConfig: s,
63
63
  capabilities: r
64
64
  };
65
- const $ = j(null);
66
- a && ((F = $.current) == null ? void 0 : F.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
67
- const L = a ? ((T = $.current) == null ? void 0 : T.client) ?? null : null;
65
+ const $ = G(null);
66
+ a && ((A = $.current) == null ? void 0 : A.apiKey) !== a && ($.current = { apiKey: a, client: new Tn(a) });
67
+ const P = a ? ((S = $.current) == null ? void 0 : S.client) ?? null : null;
68
68
  X(() => {
69
- const E = D.current, A = R.current;
70
- if (!a || !L || !A) {
69
+ const I = M.current, E = L.current;
70
+ if (!a || !P || !E) {
71
71
  o("⚠️ SERVICE INIT SKIPPED", {
72
- renderCount: E,
72
+ renderCount: I,
73
73
  reason: "Missing apiKey, client, or serviceConfig"
74
74
  });
75
75
  return;
76
76
  }
77
77
  o("🚀 CREATING SERVICE", {
78
- renderCount: E,
78
+ renderCount: I,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
81
  const O = new In({
82
- ...A,
82
+ ...E,
83
83
  apiKey: a,
84
- debug: y.current,
85
- client: L
84
+ debug: T.current,
85
+ client: P
86
86
  });
87
87
  _.current = O, d(O), o("✅ SERVICE SET", {
88
- renderCount: E,
88
+ renderCount: I,
89
89
  serviceInstance: !!O
90
90
  });
91
- }, [a, L]);
92
- const N = j(null);
91
+ }, [a, P]);
92
+ const D = G(null);
93
93
  X(() => {
94
- var A, O;
94
+ var E, O;
95
95
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
96
96
  hasService: !!l,
97
97
  hasUser: !!t,
@@ -107,7 +107,7 @@ const qt = Ye({
107
107
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
108
108
  return;
109
109
  }
110
- if (((A = N.current) == null ? void 0 : A.serviceId) === l && ((O = N.current) == null ? void 0 : O.userId) === t.id) {
110
+ if (((E = D.current) == null ? void 0 : E.serviceId) === l && ((O = D.current) == null ? void 0 : O.userId) === t.id) {
111
111
  o(
112
112
  "⚠️ USER CONNECTION SKIPPED",
113
113
  "Already connected this user with this service"
@@ -115,35 +115,35 @@ const qt = Ye({
115
115
  return;
116
116
  }
117
117
  (async () => {
118
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, b(!0), p(null);
118
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, w(!0), p(null);
119
119
  try {
120
120
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
121
- const B = await l.connectUser(t);
122
- g(B), f(!0), N.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
121
+ const F = await l.connectUser(t);
122
+ g(F), f(!0), D.current = { serviceId: l, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
123
123
  userId: t.id,
124
- clientId: B.userID
124
+ clientId: F.userID
125
125
  });
126
- } catch (B) {
127
- const H = B instanceof Error ? B.message : "Connection failed";
128
- p(H), o("❌ USER CONNECTION ERROR", {
126
+ } catch (F) {
127
+ const j = F instanceof Error ? F.message : "Connection failed";
128
+ p(j), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: H
130
+ error: j
131
131
  });
132
132
  } finally {
133
- b(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
133
+ w(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
134
134
  userId: t.id,
135
135
  isConnected: u
136
136
  });
137
137
  }
138
138
  })();
139
139
  }, [l, t, o, u]), X(() => {
140
- const E = L;
140
+ const I = P;
141
141
  return () => {
142
- var A;
143
- E && (N.current = null, (A = _.current) == null || A.disconnectUser().catch(console.error));
142
+ var E;
143
+ I && (D.current = null, (E = _.current) == null || E.disconnectUser().catch(console.error));
144
144
  };
145
- }, [L]);
146
- const I = J(async () => {
145
+ }, [P]);
146
+ const R = J(async () => {
147
147
  if (o("🔄 REFRESH CONNECTION CALLED", {
148
148
  hasService: !!l,
149
149
  hasUser: !!t
@@ -151,62 +151,62 @@ const qt = Ye({
151
151
  o("⚠️ REFRESH CONNECTION SKIPPED", "Missing service or user");
152
152
  return;
153
153
  }
154
- o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), b(!0);
154
+ o("🚀 STARTING CONNECTION REFRESH", { userId: t.id }), w(!0);
155
155
  try {
156
156
  o("🔌 DISCONNECTING FOR REFRESH"), await l.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
157
- const E = await l.connectUser(t);
158
- g(E), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
- } catch (E) {
160
- const A = E instanceof Error ? E.message : "Refresh failed";
161
- p(A), o("❌ CONNECTION REFRESH ERROR", {
157
+ const I = await l.connectUser(t);
158
+ g(I), f(!0), p(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
159
+ } catch (I) {
160
+ const E = I instanceof Error ? I.message : "Refresh failed";
161
+ p(E), o("❌ CONNECTION REFRESH ERROR", {
162
162
  userId: t.id,
163
- error: A
163
+ error: E
164
164
  });
165
165
  } finally {
166
- b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
166
+ w(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), S = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [l, t, o]), N = U.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!l,
170
170
  hasClient: !!m,
171
171
  isConnected: u,
172
172
  isLoading: c,
173
- hasError: !!w,
173
+ hasError: !!b,
174
174
  capabilitiesKeys: Object.keys(r)
175
175
  }), {
176
176
  service: l,
177
177
  client: m,
178
178
  isConnected: u,
179
179
  isLoading: c,
180
- error: w,
180
+ error: b,
181
181
  capabilities: r,
182
- refreshConnection: I,
182
+ refreshConnection: R,
183
183
  debug: i
184
184
  }), [
185
185
  l,
186
186
  m,
187
187
  u,
188
188
  c,
189
- w,
189
+ b,
190
190
  r,
191
- I,
191
+ R,
192
192
  i,
193
193
  o
194
194
  ]);
195
195
  return o("🔄 RENDER END", {
196
- renderCount: D.current,
197
- willRenderChat: !!L,
198
- contextValueReady: !!S
199
- }), /* @__PURE__ */ n(qt.Provider, { value: S, children: L ? /* @__PURE__ */ n(
196
+ renderCount: M.current,
197
+ willRenderChat: !!P,
198
+ contextValueReady: !!N
199
+ }), /* @__PURE__ */ n(qt.Provider, { value: N, children: P ? /* @__PURE__ */ n(
200
200
  An,
201
201
  {
202
- client: L,
202
+ client: P,
203
203
  customClasses: {
204
204
  channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]"
205
205
  },
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, Ps = () => Xe(), Wt = (e) => {
209
+ }, $s = () => Xe(), Wt = (e) => {
210
210
  var a, r;
211
211
  const [t, s] = z(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -228,18 +228,18 @@ const qt = Ye({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, zs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
232
- function $s(e) {
233
- return zs.test(e.trim());
231
+ }, Fs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
232
+ function Bs(e) {
233
+ return Fs.test(e.trim());
234
234
  }
235
235
  function Dt(e, t) {
236
236
  const s = e == null ? void 0 : e.trim();
237
- return !s || t && s === t ? !1 : !$s(s);
237
+ return !s || t && s === t ? !1 : !Bs(s);
238
238
  }
239
239
  function Xt(e) {
240
240
  return Dt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Dt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
241
241
  }
242
- const Ot = [
242
+ const Pt = [
243
243
  "🍎",
244
244
  // Apple
245
245
  "🍌",
@@ -267,7 +267,7 @@ const Ot = [
267
267
  "🍈"
268
268
  // Melon
269
269
  ];
270
- function Fs(e) {
270
+ function Us(e) {
271
271
  let t = 0;
272
272
  for (let s = 0; s < e.length; s++) {
273
273
  const a = e.charCodeAt(s);
@@ -275,11 +275,11 @@ function Fs(e) {
275
275
  }
276
276
  return Math.abs(t);
277
277
  }
278
- function Bs(e) {
279
- const s = Fs(e) % Ot.length;
280
- return Ot[s];
278
+ function js(e) {
279
+ const s = Us(e) % Pt.length;
280
+ return Pt[s];
281
281
  }
282
- const ie = ({
282
+ const re = ({
283
283
  id: e,
284
284
  image: t,
285
285
  size: s = 40,
@@ -288,7 +288,7 @@ const ie = ({
288
288
  shape: i = "squircle",
289
289
  dmAgentEnabled: o = !1
290
290
  }) => {
291
- const l = Bs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
291
+ const l = js(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", g = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
292
292
  "img",
293
293
  {
294
294
  src: t,
@@ -299,7 +299,7 @@ const ie = ({
299
299
  "div",
300
300
  {
301
301
  "aria-hidden": "true",
302
- className: C(
302
+ className: k(
303
303
  "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors",
304
304
  m
305
305
  ),
@@ -309,7 +309,7 @@ const ie = ({
309
309
  return /* @__PURE__ */ h(
310
310
  "div",
311
311
  {
312
- className: C(
312
+ className: k(
313
313
  "relative flex-shrink-0 !bg-transparent",
314
314
  a
315
315
  ),
@@ -331,7 +331,7 @@ const ie = ({
331
331
  "div",
332
332
  {
333
333
  "data-testid": "avatar-ring",
334
- className: C(
334
+ className: k(
335
335
  "h-full w-full",
336
336
  "bg-transparent"
337
337
  ),
@@ -350,7 +350,7 @@ const ie = ({
350
350
  ]
351
351
  }
352
352
  );
353
- }, Us = "https://linktr.ee/s/about/trust-center/report", js = ({
353
+ }, Vs = "https://linktr.ee/s/about/trust-center/report", Gs = ({
354
354
  channel: e,
355
355
  participant: t,
356
356
  showBlockParticipant: s = !0,
@@ -363,78 +363,78 @@ const ie = ({
363
363
  onActionComplete: m,
364
364
  logLabel: g = "useChannelModerationActions"
365
365
  }) => {
366
- var F;
367
- const { service: u, debug: f } = Xe(), c = (F = t == null ? void 0 : t.user) == null ? void 0 : F.id, b = !!(a && s && u && c), [w, p] = z(!1), [v, _] = z(null), [R, y] = z(!1), [M, D] = z(!1), $ = b && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
366
+ var A;
367
+ const { service: u, debug: f } = Xe(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, w = !!(a && s && u && c), [b, p] = z(!1), [v, _] = z(null), [L, T] = z(!1), [y, M] = z(!1), $ = w && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
368
368
  return X(() => {
369
- if (!b || !u || !c) {
369
+ if (!w || !u || !c) {
370
370
  p(!1), _(null);
371
371
  return;
372
372
  }
373
- let T = !1;
373
+ let S = !1;
374
374
  return (async () => {
375
375
  try {
376
- const E = await u.getBlockedUsers();
377
- if (T) return;
376
+ const I = await u.getBlockedUsers();
377
+ if (S) return;
378
378
  p(
379
- E.some(
380
- (A) => A.blocked_user_id === c
379
+ I.some(
380
+ (E) => E.blocked_user_id === c
381
381
  )
382
382
  );
383
- } catch (E) {
384
- T || console.error(`[${g}] Failed to check blocked status:`, E);
383
+ } catch (I) {
384
+ S || console.error(`[${g}] Failed to check blocked status:`, I);
385
385
  } finally {
386
- T || _({ participantId: c, service: u });
386
+ S || _({ participantId: c, service: u });
387
387
  }
388
388
  })(), () => {
389
- T = !0;
389
+ S = !0;
390
390
  };
391
- }, [b, u, c, g]), {
392
- isParticipantBlocked: w,
391
+ }, [w, u, c, g]), {
392
+ isParticipantBlocked: b,
393
393
  isCheckingBlockedStatus: $,
394
- isLeaving: R,
395
- isUpdatingBlockStatus: M,
394
+ isLeaving: L,
395
+ isUpdatingBlockStatus: y,
396
396
  handleLeaveConversation: async () => {
397
- var T;
398
- if (!R) {
399
- o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), y(!0);
397
+ var S;
398
+ if (!L) {
399
+ o == null || o(), f && console.log(`[${g}] Leave conversation`, e.cid), T(!0);
400
400
  try {
401
- const E = ((T = e._client) == null ? void 0 : T.userID) ?? null;
402
- await e.hide(E, !1), r && await r(e), m == null || m();
403
- } catch (E) {
404
- console.error(`[${g}] Failed to leave conversation`, E);
401
+ const I = ((S = e._client) == null ? void 0 : S.userID) ?? null;
402
+ await e.hide(I, !1), r && await r(e), m == null || m();
403
+ } catch (I) {
404
+ console.error(`[${g}] Failed to leave conversation`, I);
405
405
  } finally {
406
- y(!1);
406
+ T(!1);
407
407
  }
408
408
  }
409
409
  },
410
410
  handleBlockUser: async () => {
411
- var T, E, A;
412
- if (!(M || !u)) {
413
- l == null || l(), f && console.log(`[${g}] Block member`, (T = t == null ? void 0 : t.user) == null ? void 0 : T.id), D(!0);
411
+ var S, I, E;
412
+ if (!(y || !u)) {
413
+ l == null || l(), f && console.log(`[${g}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
414
414
  try {
415
- await u.blockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
415
+ await u.blockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
416
416
  } catch (O) {
417
417
  console.error(`[${g}] Failed to block member`, O);
418
418
  } finally {
419
- D(!1);
419
+ M(!1);
420
420
  }
421
421
  }
422
422
  },
423
423
  handleUnblockUser: async () => {
424
- var T, E, A;
425
- if (!(M || !u)) {
426
- l == null || l(), f && console.log(`[${g}] Unblock member`, (T = t == null ? void 0 : t.user) == null ? void 0 : T.id), D(!0);
424
+ var S, I, E;
425
+ if (!(y || !u)) {
426
+ l == null || l(), f && console.log(`[${g}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
427
427
  try {
428
- await u.unBlockUser((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), i && await i((A = t == null ? void 0 : t.user) == null ? void 0 : A.id), m == null || m();
428
+ await u.unBlockUser((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
429
429
  } catch (O) {
430
430
  console.error(`[${g}] Failed to unblock member`, O);
431
431
  } finally {
432
- D(!1);
432
+ M(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleReportUser: () => {
437
- d == null || d(), m == null || m(), window.open(Us, "_blank", "noopener,noreferrer");
437
+ d == null || d(), m == null || m(), window.open(Vs, "_blank", "noopener,noreferrer");
438
438
  }
439
439
  };
440
440
  }, ge = ({
@@ -446,7 +446,7 @@ const ie = ({
446
446
  "button",
447
447
  {
448
448
  type: "button",
449
- className: C(
449
+ className: k(
450
450
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
451
451
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
452
452
  t
@@ -454,7 +454,7 @@ const ie = ({
454
454
  ...a,
455
455
  children: s
456
456
  }
457
- ), Pt = ({
457
+ ), Ot = ({
458
458
  channel: e,
459
459
  participant: t,
460
460
  showDeleteConversation: s = !0,
@@ -468,16 +468,16 @@ const ie = ({
468
468
  customChannelActions: g,
469
469
  triggerClassName: u
470
470
  }) => {
471
- const [f, c] = z(!1), b = j(null), w = Sn(), p = J(() => c(!1), []), {
471
+ const [f, c] = z(!1), w = G(null), b = Sn(), p = J(() => c(!1), []), {
472
472
  isParticipantBlocked: v,
473
473
  isCheckingBlockedStatus: _,
474
- isLeaving: R,
475
- isUpdatingBlockStatus: y,
476
- handleLeaveConversation: M,
477
- handleBlockUser: D,
474
+ isLeaving: L,
475
+ isUpdatingBlockStatus: T,
476
+ handleLeaveConversation: y,
477
+ handleBlockUser: M,
478
478
  handleUnblockUser: $,
479
- handleReportUser: L
480
- } = js({
479
+ handleReportUser: P
480
+ } = Gs({
481
481
  channel: e,
482
482
  participant: t,
483
483
  showBlockParticipant: a,
@@ -492,15 +492,15 @@ const ie = ({
492
492
  });
493
493
  return X(() => {
494
494
  if (!f) return;
495
- const I = (F) => {
496
- b.current && !b.current.contains(F.target) && c(!1);
497
- }, S = (F) => {
498
- F.key === "Escape" && c(!1);
495
+ const R = (A) => {
496
+ w.current && !w.current.contains(A.target) && c(!1);
497
+ }, N = (A) => {
498
+ A.key === "Escape" && c(!1);
499
499
  };
500
- return document.addEventListener("mousedown", I), document.addEventListener("keydown", S), () => {
501
- document.removeEventListener("mousedown", I), document.removeEventListener("keydown", S);
500
+ return document.addEventListener("mousedown", R), document.addEventListener("keydown", N), () => {
501
+ document.removeEventListener("mousedown", R), document.removeEventListener("keydown", N);
502
502
  };
503
- }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
503
+ }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: w, className: "relative", children: [
504
504
  /* @__PURE__ */ h(
505
505
  "button",
506
506
  {
@@ -508,8 +508,8 @@ const ie = ({
508
508
  type: "button",
509
509
  "aria-haspopup": "true",
510
510
  "aria-expanded": f,
511
- "aria-controls": f ? w : void 0,
512
- onClick: () => c((I) => !I),
511
+ "aria-controls": f ? b : void 0,
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" })
@@ -519,9 +519,9 @@ const ie = ({
519
519
  f && /* @__PURE__ */ n(
520
520
  "div",
521
521
  {
522
- id: w,
522
+ id: b,
523
523
  "aria-label": "Conversation options",
524
- className: C(
524
+ className: k(
525
525
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
526
526
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
527
527
  ),
@@ -529,11 +529,11 @@ const ie = ({
529
529
  s && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(
530
530
  ge,
531
531
  {
532
- onClick: M,
533
- disabled: R,
534
- "aria-busy": R,
532
+ onClick: y,
533
+ disabled: L,
534
+ "aria-busy": L,
535
535
  children: [
536
- R ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(fs, { className: "h-5 w-5" }),
536
+ L ? /* @__PURE__ */ n(ke, { 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
  }
@@ -549,26 +549,26 @@ const ie = ({
549
549
  ge,
550
550
  {
551
551
  onClick: $,
552
- disabled: y,
553
- "aria-busy": y,
552
+ disabled: T,
553
+ "aria-busy": T,
554
554
  children: [
555
- y ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
555
+ T ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
556
556
  /* @__PURE__ */ n("span", { children: "Unblock" })
557
557
  ]
558
558
  }
559
559
  ) : /* @__PURE__ */ h(
560
560
  ge,
561
561
  {
562
- onClick: D,
563
- disabled: y,
564
- "aria-busy": y,
562
+ onClick: M,
563
+ disabled: T,
564
+ "aria-busy": T,
565
565
  children: [
566
- y ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
566
+ T ? /* @__PURE__ */ n(ke, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Rt, { className: "h-5 w-5" }),
567
567
  /* @__PURE__ */ n("span", { children: "Block" })
568
568
  ]
569
569
  }
570
570
  ) }),
571
- r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: L, children: [
571
+ r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(ge, { variant: "danger", onClick: P, children: [
572
572
  /* @__PURE__ */ n(Vt, { className: "h-5 w-5" }),
573
573
  /* @__PURE__ */ n("span", { children: "Report" })
574
574
  ] }) }),
@@ -577,20 +577,20 @@ const ie = ({
577
577
  }
578
578
  )
579
579
  ] });
580
- }, Vs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ge = "vote_up", He = "vote_down";
581
- function Gs(e) {
582
- return e != null && e.length ? e.some((t) => t.type === He) ? "down" : e.some((t) => t.type === Ge) ? "up" : null : null;
580
+ }, Hs = (e) => /* @__PURE__ */ n(Mn, { ...e, position: "center" }), Ve = "vote_up", Ge = "vote_down";
581
+ function Ys(e) {
582
+ return e != null && e.length ? e.some((t) => t.type === Ge) ? "down" : e.some((t) => t.type === Ve) ? "up" : null : null;
583
583
  }
584
- function Hs(e) {
585
- const { channel: t } = de(), { client: s } = We("useMessageVote"), a = ne(
586
- () => Gs(e.own_reactions),
584
+ function qs(e) {
585
+ const { channel: t } = ce(), { client: s } = We("useMessageVote"), a = te(
586
+ () => Ys(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, Ge) : await t.sendReaction(
591
+ a === "up" ? await t.deleteReaction(e.id, Ve) : await t.sendReaction(
592
592
  e.id,
593
- { type: Ge },
593
+ { type: Ve },
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, He) : await t.sendReaction(
601
+ a === "down" ? await t.deleteReaction(e.id, Ge) : await t.sendReaction(
602
602
  e.id,
603
- { type: He },
603
+ { type: Ge },
604
604
  { enforce_unique: !0, skip_push: !0 }
605
605
  );
606
606
  } catch {
@@ -608,7 +608,7 @@ function Hs(e) {
608
608
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
609
609
  return { selected: a, voteUp: r, voteDown: i };
610
610
  }
611
- function Ys(e) {
611
+ function Ws(e) {
612
612
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
613
613
  }
614
614
  function Kt({
@@ -616,16 +616,16 @@ function Kt({
616
616
  viewerLanguage: t
617
617
  }) {
618
618
  var r;
619
- const s = e == null ? void 0 : e.text, a = Ys(t);
619
+ const s = e == null ? void 0 : e.text, a = Ws(t);
620
620
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
621
621
  }
622
- const qs = U.lazy(() => import("./Card-DGkh6_ti.js")), Ws = U.lazy(() => import("./Card-TNeK_nFK.js")), Xs = U.lazy(() => import("./Card-h43tRi_a.js")), Ke = () => /* @__PURE__ */ n(
622
+ const Xs = U.lazy(() => import("./Card-beoX9cug.js")), Ks = U.lazy(() => import("./Card-DcEBssw0.js")), Js = U.lazy(() => import("./Card-BOD2Qo_b.js")), Ke = () => /* @__PURE__ */ n(
623
623
  "div",
624
624
  {
625
625
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
626
626
  "aria-hidden": !0
627
627
  }
628
- ), Ks = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Js = Jt, Zs = Zt, zt = { Composer: Ks, Sent: Jt, Received: Zt, Creator: Js, Visitor: Zs }, Qs = [
628
+ ), Zs = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Xs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), Zt = (e) => /* @__PURE__ */ n(qe, { fallback: /* @__PURE__ */ n(Ke, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), Qs = Jt, ea = Zt, zt = { Composer: Zs, Sent: Jt, Received: Zt, Creator: Qs, Visitor: ea }, ta = [
629
629
  [/pdf/, "pdf"],
630
630
  [/wordprocessingml|msword|\.doc/, "doc"],
631
631
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -635,21 +635,21 @@ const qs = U.lazy(() => import("./Card-DGkh6_ti.js")), Ws = U.lazy(() => import(
635
635
  [/plain|rtf/, "text"],
636
636
  [/markdown/, "markdown"]
637
637
  ];
638
- function ae(e) {
638
+ function se(e) {
639
639
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
640
640
  }
641
641
  function Qt(e) {
642
- const t = Qs.find(
642
+ const t = ta.find(
643
643
  ([s]) => s.test(e)
644
644
  );
645
645
  return t ? t[1] : "generic";
646
646
  }
647
- const ea = {
647
+ const na = {
648
648
  video: Ht,
649
649
  audio: bs,
650
650
  image: gs,
651
651
  document: Gt
652
- }, ta = {
652
+ }, sa = {
653
653
  pdf: Cs,
654
654
  doc: ys,
655
655
  xls: Ns,
@@ -660,17 +660,17 @@ const ea = {
660
660
  markdown: ps,
661
661
  generic: Gt
662
662
  };
663
- function na(e) {
664
- const t = ae(e);
665
- return t !== "document" ? ea[t] : ta[Qt(e)];
663
+ function aa(e) {
664
+ const t = se(e);
665
+ return t !== "document" ? na[t] : sa[Qt(e)];
666
666
  }
667
- function ce(e, t) {
668
- return U.createElement(na(e), t);
667
+ function le(e, t) {
668
+ return U.createElement(aa(e), t);
669
669
  }
670
- const sa = (e) => {
670
+ const ra = (e) => {
671
671
  var t, s;
672
672
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
673
- }, aa = ({
673
+ }, ia = ({
674
674
  source: e,
675
675
  mimeType: t,
676
676
  poster: s,
@@ -682,66 +682,66 @@ const sa = (e) => {
682
682
  muted: d = !1,
683
683
  onContainerClick: m
684
684
  }) => {
685
- const g = ae(t), u = j(null), f = j(null), c = j(null), b = j(r), [w, p] = z(a), [v, _] = z(0), [R, y] = z(!1), [M, D] = z(!1), [$, L] = z(!1), [N, I] = z(!1), [S, F] = z(!0), [T, E] = z(null), A = J(() => {
686
- L(!1), p(!0);
685
+ const g = se(t), u = G(null), f = G(null), c = G(null), w = G(r), [b, p] = z(a), [v, _] = z(0), [L, T] = z(!1), [y, M] = z(!1), [$, P] = z(!1), [D, R] = z(!1), [N, A] = z(!0), [S, I] = z(null), E = J(() => {
686
+ P(!1), p(!0);
687
687
  }, []), O = J((x) => {
688
- const k = f.current;
689
- if (!k) return 0;
690
- const P = k.getBoundingClientRect();
688
+ const C = f.current;
689
+ if (!C) return 0;
690
+ const B = C.getBoundingClientRect();
691
691
  return Math.max(
692
692
  0,
693
- Math.min(1, (sa(x) - P.left) / P.width)
693
+ Math.min(1, (ra(x) - B.left) / B.width)
694
694
  );
695
- }, []), B = J((x) => {
696
- const k = u.current;
697
- k && k.duration && (k.currentTime = x * k.duration);
698
- }, []), H = (x) => {
699
- x.stopPropagation(), y(!0);
700
- const k = O(x);
701
- _(k), B(k);
695
+ }, []), F = J((x) => {
696
+ const C = u.current;
697
+ C && C.duration && (C.currentTime = x * C.duration);
698
+ }, []), j = (x) => {
699
+ x.stopPropagation(), T(!0);
700
+ const C = O(x);
701
+ _(C), F(C);
702
702
  };
703
703
  X(() => {
704
- r !== void 0 && r !== b.current && (b.current = r, p(r));
704
+ r !== void 0 && r !== w.current && (w.current = r, p(r));
705
705
  }, [r]), X(() => {
706
- if (!w) {
706
+ if (!b) {
707
707
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
708
708
  return;
709
709
  }
710
710
  const x = () => {
711
- const k = u.current;
712
- k && k.duration && !R && _(k.currentTime / k.duration), c.current = requestAnimationFrame(x);
711
+ const C = u.current;
712
+ C && C.duration && !L && _(C.currentTime / C.duration), c.current = requestAnimationFrame(x);
713
713
  };
714
714
  return c.current = requestAnimationFrame(x), () => {
715
715
  c.current !== null && cancelAnimationFrame(c.current);
716
716
  };
717
- }, [w, R]), X(() => {
717
+ }, [b, L]), X(() => {
718
718
  const x = u.current;
719
- x && (w ? x.play().catch((k) => {
720
- p(!1), L(!0);
719
+ x && (b ? x.play().catch((C) => {
720
+ p(!1), P(!0);
721
721
  }) : x.pause());
722
- }, [w]), X(() => {
723
- if (!R) return;
724
- const x = (P) => _(O(P)), k = (P) => {
725
- y(!1), B(O(P));
722
+ }, [b]), X(() => {
723
+ if (!L) return;
724
+ const x = (B) => _(O(B)), C = (B) => {
725
+ T(!1), F(O(B));
726
726
  };
727
- return window.addEventListener("mousemove", x), window.addEventListener("mouseup", k), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", k), () => {
728
- window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", k), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", k);
727
+ return window.addEventListener("mousemove", x), window.addEventListener("mouseup", C), window.addEventListener("touchmove", x, { passive: !0 }), window.addEventListener("touchend", C), () => {
728
+ window.removeEventListener("mousemove", x), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", x), window.removeEventListener("touchend", C);
729
729
  };
730
- }, [R, O, B]);
731
- const V = T ? { aspectRatio: String(T) } : void 0, Y = T ? "" : " aspect-video", q = Math.round(v * 100);
730
+ }, [L, O, F]);
731
+ const H = S ? { aspectRatio: String(S) } : void 0, Y = S ? "" : " aspect-video", W = Math.round(v * 100);
732
732
  return /* @__PURE__ */ h(
733
733
  "div",
734
734
  {
735
735
  role: "button",
736
736
  tabIndex: 0,
737
737
  className: `relative cursor-pointer overflow-hidden bg-black ${Y}`,
738
- style: V,
738
+ style: H,
739
739
  onClick: (x) => {
740
740
  if (m) {
741
741
  m(x);
742
742
  return;
743
743
  }
744
- $ || o && p((k) => !k);
744
+ $ || o && p((C) => !C);
745
745
  },
746
746
  onKeyDown: (x) => {
747
747
  if (!(x.key !== "Enter" && x.key !== " ")) {
@@ -749,11 +749,11 @@ const sa = (e) => {
749
749
  m(x);
750
750
  return;
751
751
  }
752
- $ || o && p((k) => !k);
752
+ $ || o && p((C) => !C);
753
753
  }
754
754
  },
755
755
  children: [
756
- s && (g === "audio" || S) && /* @__PURE__ */ n(
756
+ s && (g === "audio" || N) && /* @__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" || S) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
764
+ !s && (g === "audio" || N) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: le(t, {
765
765
  className: "size-12 text-black/20",
766
766
  weight: "regular"
767
767
  }) }),
@@ -773,12 +773,12 @@ const sa = (e) => {
773
773
  loop: i,
774
774
  muted: d,
775
775
  style: { width: "100%", height: "100%" },
776
- onLoadStart: () => I(!0),
776
+ onLoadStart: () => R(!0),
777
777
  onCanPlay: () => {
778
- I(!1), F(!1);
778
+ R(!1), A(!1);
779
779
  },
780
- onWaiting: () => I(!0),
781
- onPlay: () => L(!1),
780
+ onWaiting: () => R(!0),
781
+ onPlay: () => P(!1),
782
782
  onEnded: () => {
783
783
  i || (p(!1), _(0));
784
784
  },
@@ -793,15 +793,15 @@ const sa = (e) => {
793
793
  muted: d,
794
794
  playsInline: !0,
795
795
  style: { width: "100%", height: "100%" },
796
- onLoadStart: () => I(!0),
796
+ onLoadStart: () => R(!0),
797
797
  onCanPlay: () => {
798
- I(!1), F(!1);
798
+ R(!1), A(!1);
799
799
  },
800
- onWaiting: () => I(!0),
801
- onPlay: () => L(!1),
800
+ onWaiting: () => R(!0),
801
+ onPlay: () => P(!1),
802
802
  onLoadedMetadata: () => {
803
803
  const x = u.current;
804
- x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && E(x.videoWidth / x.videoHeight);
804
+ x instanceof HTMLVideoElement && x.videoWidth && x.videoHeight && I(x.videoWidth / x.videoHeight);
805
805
  },
806
806
  onEnded: () => {
807
807
  i || (p(!1), _(0));
@@ -809,7 +809,7 @@ const sa = (e) => {
809
809
  children: /* @__PURE__ */ n("track", { kind: "captions" })
810
810
  }
811
811
  ) }),
812
- N && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
812
+ D && !$ && /* @__PURE__ */ n("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ n(
813
813
  pe,
814
814
  {
815
815
  className: "size-8 animate-spin text-white/80",
@@ -824,10 +824,10 @@ const sa = (e) => {
824
824
  tabIndex: 0,
825
825
  "aria-label": "Play preview",
826
826
  onClick: (x) => {
827
- x.stopPropagation(), A();
827
+ x.stopPropagation(), E();
828
828
  },
829
829
  onKeyDown: (x) => {
830
- x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), A());
830
+ x.key !== "Enter" && x.key !== " " || (x.preventDefault(), x.stopPropagation(), E());
831
831
  },
832
832
  children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(Ue, { className: "size-9 translate-x-0.5", weight: "fill" }) })
833
833
  }
@@ -837,23 +837,23 @@ const sa = (e) => {
837
837
  {
838
838
  role: "slider",
839
839
  "aria-label": "Playback position",
840
- "aria-valuenow": q,
840
+ "aria-valuenow": W,
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,
846
+ onMouseDown: j,
847
+ onTouchStart: j,
848
848
  onClick: (x) => x.stopPropagation(),
849
849
  onKeyDown: (x) => {
850
- x.key === "ArrowRight" && B(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && B(Math.max(0, v - 0.05));
850
+ x.key === "ArrowRight" && F(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && F(Math.max(0, v - 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: `${q}%` }
856
+ style: { width: `${W}%` }
857
857
  }
858
858
  ) })
859
859
  }
@@ -864,11 +864,11 @@ const sa = (e) => {
864
864
  {
865
865
  type: "button",
866
866
  onClick: (x) => {
867
- x.stopPropagation(), p((k) => !k);
867
+ x.stopPropagation(), p((C) => !C);
868
868
  },
869
869
  className: "shrink-0 text-white",
870
- "aria-label": w ? "Pause" : "Play",
871
- children: w ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { className: "size-5 translate-x-px", weight: "fill" })
870
+ "aria-label": b ? "Pause" : "Play",
871
+ children: b ? /* @__PURE__ */ n(ks, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ue, { 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": q,
879
+ "aria-valuenow": W,
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,
885
+ onMouseDown: j,
886
+ onTouchStart: j,
887
887
  onClick: (x) => x.stopPropagation(),
888
- onMouseEnter: () => D(!0),
889
- onMouseLeave: () => D(!1),
888
+ onMouseEnter: () => M(!0),
889
+ onMouseLeave: () => M(!1),
890
890
  onKeyDown: (x) => {
891
- x.key === "ArrowRight" && B(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && B(Math.max(0, v - 0.05));
891
+ x.key === "ArrowRight" && F(Math.min(1, v + 0.05)), x.key === "ArrowLeft" && F(Math.max(0, v - 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 ${M || R ? "h-1.5" : "h-1"}`,
897
+ className: `w-full overflow-hidden rounded-full bg-white/30 transition-all duration-200 ${y || L ? "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: `${q}%` }
902
+ style: { width: `${W}%` }
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 ${M || R ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
- style: { left: `${q}%` }
910
+ className: `absolute size-3 -translate-x-1/2 rounded-full bg-white shadow transition-[opacity,transform] duration-200 ${y || L ? "scale-100 opacity-100" : "scale-0 opacity-0"}`,
911
+ style: { left: `${W}%` }
912
912
  }
913
913
  )
914
914
  ]
@@ -918,7 +918,7 @@ const sa = (e) => {
918
918
  ]
919
919
  }
920
920
  );
921
- }, $t = (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", en = ({
921
+ }, $t = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", oa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", en = ({
922
922
  mimeType: e,
923
923
  sourceUrl: t,
924
924
  thumbnailUrl: s,
@@ -927,9 +927,9 @@ const sa = (e) => {
927
927
  mediaPlayerProps: i,
928
928
  containedImage: o = !1
929
929
  }) => {
930
- const l = ae(e), [d, m] = z(!1);
930
+ const l = se(e), [d, m] = z(!1);
931
931
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
932
- aa,
932
+ ia,
933
933
  {
934
934
  source: t,
935
935
  mimeType: e,
@@ -975,12 +975,12 @@ const sa = (e) => {
975
975
  "div",
976
976
  {
977
977
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
978
- children: ce(e, {
978
+ children: le(e, {
979
979
  className: $t(r),
980
980
  weight: "regular"
981
981
  })
982
982
  }
983
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${ra(r)}`, children: /* @__PURE__ */ n(
983
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${oa(r)}`, children: /* @__PURE__ */ n(
984
984
  "img",
985
985
  {
986
986
  src: s,
@@ -992,7 +992,7 @@ const sa = (e) => {
992
992
  "div",
993
993
  {
994
994
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
995
- children: ce(e, {
995
+ children: le(e, {
996
996
  className: $t(r),
997
997
  weight: "regular"
998
998
  })
@@ -1012,13 +1012,13 @@ const sa = (e) => {
1012
1012
  rootRef: g,
1013
1013
  "data-testid": u
1014
1014
  }) => {
1015
- const f = e === "dark", c = f ? s ?? a : s ?? "", b = f && !s;
1015
+ const f = e === "dark", c = f ? s ?? a : s ?? "", w = f && !s;
1016
1016
  return /* @__PURE__ */ h(
1017
1017
  "div",
1018
1018
  {
1019
1019
  ref: g,
1020
1020
  "data-testid": u,
1021
- className: C(
1021
+ className: k(
1022
1022
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1023
1023
  f ? "bg-[#121110]" : "bg-white"
1024
1024
  ),
@@ -1030,17 +1030,17 @@ const sa = (e) => {
1030
1030
  c.trim() !== "" && /* @__PURE__ */ n(
1031
1031
  "p",
1032
1032
  {
1033
- className: C("mb-0.5 truncate text-base font-medium", {
1033
+ className: k("mb-0.5 truncate text-base font-medium", {
1034
1034
  "text-black": !f,
1035
- "text-white/30": f && b,
1036
- "text-white": f && !b
1035
+ "text-white/30": f && w,
1036
+ "text-white": f && !w
1037
1037
  }),
1038
1038
  children: c
1039
1039
  }
1040
1040
  ),
1041
1041
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1042
- ce(r, {
1043
- className: C(
1042
+ le(r, {
1043
+ className: k(
1044
1044
  "size-5 shrink-0",
1045
1045
  f ? "text-white/55" : "text-black/55"
1046
1046
  ),
@@ -1049,7 +1049,7 @@ const sa = (e) => {
1049
1049
  i != null && i !== "" && /* @__PURE__ */ n(
1050
1050
  "span",
1051
1051
  {
1052
- className: C(
1052
+ className: k(
1053
1053
  "text-xs font-medium",
1054
1054
  f ? "text-white/55" : "text-black/55"
1055
1055
  ),
@@ -1070,19 +1070,19 @@ function nn(e) {
1070
1070
  function Je(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
- function ia(e) {
1073
+ function la(e) {
1074
1074
  return e ? "bg-white/10" : "bg-black/5";
1075
1075
  }
1076
- function oa(e) {
1076
+ function ca(e) {
1077
1077
  return e ? "text-white" : "text-black";
1078
1078
  }
1079
- function la(e) {
1079
+ function da(e) {
1080
1080
  return e ? "text-white/55" : "text-black/55";
1081
1081
  }
1082
- function ca(e) {
1082
+ function ua(e) {
1083
1083
  return e ? "text-white/40" : "text-black/40";
1084
1084
  }
1085
- function da(e) {
1085
+ function ma(e) {
1086
1086
  return e ? "text-white/20" : "text-black/20";
1087
1087
  }
1088
1088
  const Ze = ({ attachment: e, isMyMessage: t }) => {
@@ -1097,14 +1097,14 @@ const Ze = ({ attachment: e, isMyMessage: t }) => {
1097
1097
  ) : /* @__PURE__ */ n(
1098
1098
  "div",
1099
1099
  {
1100
- className: `aspect-video w-full rounded-[20px] ${ia(t)} flex items-center justify-center`,
1101
- children: /* @__PURE__ */ n(Es, { className: `size-12 ${da(t)}` })
1100
+ className: `aspect-video w-full rounded-[20px] ${la(t)} flex items-center justify-center`,
1101
+ children: /* @__PURE__ */ n(Es, { className: `size-12 ${ma(t)}` })
1102
1102
  }
1103
1103
  ) }),
1104
1104
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1105
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${oa(t)}`, children: s }),
1106
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${la(t)}`, children: a }),
1107
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ca(t)}`, children: d })
1105
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ca(t)}`, children: s }),
1106
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${da(t)}`, children: a }),
1107
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ua(t)}`, children: d })
1108
1108
  ] })
1109
1109
  ] });
1110
1110
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
@@ -1116,7 +1116,7 @@ function Qe(e) {
1116
1116
  var t;
1117
1117
  return (t = e.attachments) == null ? void 0 : t.find(sn);
1118
1118
  }
1119
- async function ua(e, t) {
1119
+ async function ha(e, t) {
1120
1120
  let s;
1121
1121
  try {
1122
1122
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1128,7 +1128,7 @@ async function ua(e, t) {
1128
1128
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1129
1129
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1130
1130
  }
1131
- const ma = ({
1131
+ const fa = ({
1132
1132
  url: e,
1133
1133
  filename: t
1134
1134
  }) => {
@@ -1140,7 +1140,7 @@ const ma = ({
1140
1140
  onClick: (i) => {
1141
1141
  i.stopPropagation();
1142
1142
  const o = window.open("", "_blank", "noopener,noreferrer");
1143
- a(!0), ua(e, t).then(() => {
1143
+ a(!0), ha(e, t).then(() => {
1144
1144
  o == null || o.close();
1145
1145
  }).catch(() => {
1146
1146
  o && (o.location.href = e);
@@ -1156,15 +1156,15 @@ const ma = ({
1156
1156
  );
1157
1157
  };
1158
1158
  function et(e) {
1159
- var u, f, c, b;
1159
+ var u, f, c, w;
1160
1160
  const t = (u = e.attachments) == null ? void 0 : u.find(
1161
- (w) => w.type === "video" && w.asset_url
1161
+ (b) => b.type === "video" && b.asset_url
1162
1162
  ), s = (f = e.attachments) == null ? void 0 : f.find(
1163
- (w) => w.type === "image" && w.image_url
1163
+ (b) => b.type === "image" && b.image_url
1164
1164
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1165
- (w) => w.type === "audio" && w.asset_url
1166
- ), r = (b = e.attachments) == null ? void 0 : b.find(
1167
- (w) => w.type === "file" && w.asset_url
1165
+ (b) => b.type === "audio" && b.asset_url
1166
+ ), r = (w = e.attachments) == null ? void 0 : w.find(
1167
+ (b) => b.type === "file" && b.asset_url
1168
1168
  ), i = t ?? s ?? a ?? r, o = (t == null ? void 0 : t.asset_url) ?? (s == null ? void 0 : s.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1169
1169
  if (!o) return null;
1170
1170
  const l = (i == null ? void 0 : i.mime_type) ?? ((i == null ? void 0 : i.type) === "image" ? "image/jpeg" : (i == null ? void 0 : i.type) === "video" ? "video/mp4" : (i == null ? void 0 : i.type) === "audio" ? "audio/mpeg" : "application/octet-stream"), d = i == null ? void 0 : i.title, m = i == null ? void 0 : i.file_size, g = t == null ? void 0 : t.thumb_url;
@@ -1211,7 +1211,7 @@ const an = ({
1211
1211
  fileSize: a,
1212
1212
  thumbnailUrl: r
1213
1213
  }) => {
1214
- const i = ae(t), o = a !== void 0 ? nn(a) : void 0;
1214
+ const i = se(t), o = a !== void 0 ? nn(a) : void 0;
1215
1215
  return /* @__PURE__ */ n(
1216
1216
  tn,
1217
1217
  {
@@ -1230,17 +1230,17 @@ const an = ({
1230
1230
  containedImage: i === "image" || i === "document"
1231
1231
  }
1232
1232
  ),
1233
- action: /* @__PURE__ */ n(ma, { url: e, filename: s })
1233
+ action: /* @__PURE__ */ n(fa, { url: e, filename: s })
1234
1234
  }
1235
1235
  );
1236
- }, ha = ({
1236
+ }, ga = ({
1237
1237
  message: e,
1238
1238
  isMyMessage: t = !1
1239
1239
  }) => {
1240
1240
  const s = Qe(e), a = et(e);
1241
1241
  return !s && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", children: [
1242
1242
  !t && e.user && /* @__PURE__ */ n(
1243
- ie,
1243
+ re,
1244
1244
  {
1245
1245
  className: "str-chat__avatar str-chat__message-sender-avatar",
1246
1246
  id: e.user.id,
@@ -1264,7 +1264,7 @@ const an = ({
1264
1264
  }
1265
1265
  )
1266
1266
  ] });
1267
- }, fa = ({
1267
+ }, ba = ({
1268
1268
  message: e
1269
1269
  }) => {
1270
1270
  const t = Qe(e);
@@ -1272,7 +1272,7 @@ const an = ({
1272
1272
  return /* @__PURE__ */ n("div", { className: Je(!0), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !0 }) });
1273
1273
  const s = et(e);
1274
1274
  return s ? /* @__PURE__ */ n(an, { ...s }) : null;
1275
- }, ga = ({
1275
+ }, pa = ({
1276
1276
  message: e
1277
1277
  }) => {
1278
1278
  const t = Qe(e);
@@ -1280,18 +1280,18 @@ const an = ({
1280
1280
  return /* @__PURE__ */ n("div", { className: Je(!1), children: /* @__PURE__ */ n(Ze, { attachment: t, isMyMessage: !1 }) });
1281
1281
  const s = et(e);
1282
1282
  return s ? /* @__PURE__ */ n(rn, { ...s }) : null;
1283
- }, yi = Object.assign(ha, {
1284
- Creator: fa,
1285
- Visitor: ga
1286
- }), ba = {
1283
+ }, ki = Object.assign(ga, {
1284
+ Creator: ba,
1285
+ Visitor: pa
1286
+ }), va = {
1287
1287
  isUnlocking: () => !1
1288
- }, pa = {
1289
- LockedAttachment: ba
1290
- }, on = Ye({}), Ci = on.Provider;
1291
- function va(e) {
1292
- return Ae(on)[e] ?? pa[e];
1288
+ }, xa = {
1289
+ LockedAttachment: va
1290
+ }, on = Ye({}), Ei = on.Provider;
1291
+ function wa(e) {
1292
+ return Ae(on)[e] ?? xa[e];
1293
1293
  }
1294
- const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1294
+ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1295
1295
  "svg",
1296
1296
  {
1297
1297
  width: e,
@@ -1308,22 +1308,22 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1308
1308
  }
1309
1309
  )
1310
1310
  }
1311
- ), wa = (e) => {
1311
+ ), Na = (e) => {
1312
1312
  var t;
1313
1313
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1314
- }, _a = (e) => {
1314
+ }, ya = (e) => {
1315
1315
  var t;
1316
1316
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1317
1317
  }, Ee = (e) => {
1318
1318
  var t;
1319
1319
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1320
- }, Na = (e) => {
1320
+ }, Ca = (e) => {
1321
1321
  var t;
1322
1322
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1323
- }, ln = (e) => wa(e) || _a(e), ya = (e) => {
1323
+ }, ln = (e) => Na(e) || ya(e), ka = (e) => {
1324
1324
  var t;
1325
1325
  return ln(e) && !((t = e.text) != null && t.trim());
1326
- }, Pe = ({
1326
+ }, Oe = ({
1327
1327
  message: e,
1328
1328
  standalone: t = !1,
1329
1329
  isMyMessage: s = !1,
@@ -1336,25 +1336,25 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1336
1336
  if (r) {
1337
1337
  const f = (u = e.metadata) == null ? void 0 : u.amount_text;
1338
1338
  if (!f) return null;
1339
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1339
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", w = t ? `${f} tip` : `Delivered with ${f} tip`;
1340
1340
  return /* @__PURE__ */ h("div", { className: c, children: [
1341
1341
  /* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
1342
- /* @__PURE__ */ n("span", { children: b })
1342
+ /* @__PURE__ */ n("span", { children: w })
1343
1343
  ] });
1344
1344
  }
1345
1345
  const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = [
1346
1346
  "message-chatbot-indicator",
1347
1347
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1348
1348
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1349
- ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(xa, { size: o ? 12 : 15 }) });
1350
- return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1349
+ ].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(_a, { size: o ? 12 : 15 }) });
1350
+ return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(ne, { children: [
1351
1351
  m,
1352
1352
  g
1353
- ] }) : /* @__PURE__ */ h(se, { children: [
1353
+ ] }) : /* @__PURE__ */ h(ne, { children: [
1354
1354
  g,
1355
1355
  m
1356
1356
  ] }) });
1357
- }, Ca = ({
1357
+ }, Ea = ({
1358
1358
  selected: e,
1359
1359
  onVoteUp: t,
1360
1360
  onVoteDown: s
@@ -1363,7 +1363,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1363
1363
  "button",
1364
1364
  {
1365
1365
  type: "button",
1366
- className: C("message-vote-button focus-ring", {
1366
+ className: k("message-vote-button focus-ring", {
1367
1367
  "message-vote-button--selected": e === "up"
1368
1368
  }),
1369
1369
  onClick: t,
@@ -1377,7 +1377,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1377
1377
  "button",
1378
1378
  {
1379
1379
  type: "button",
1380
- className: C("message-vote-button focus-ring", {
1380
+ className: k("message-vote-button focus-ring", {
1381
1381
  "message-vote-button--selected": e === "down"
1382
1382
  }),
1383
1383
  onClick: s,
@@ -1387,7 +1387,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1387
1387
  children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "down" ? "fill" : "regular" })
1388
1388
  }
1389
1389
  )
1390
- ] }), ka = (e) => {
1390
+ ] }), Sa = (e) => {
1391
1391
  var ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et, St;
1392
1392
  const {
1393
1393
  additionalMessageInputProps: t,
@@ -1403,63 +1403,63 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1403
1403
  isMessageAIGenerated: u,
1404
1404
  isMyMessage: f,
1405
1405
  message: c,
1406
- renderText: b,
1407
- threadList: w,
1406
+ renderText: w,
1407
+ threadList: b,
1408
1408
  viewerLanguage: p
1409
- } = e, { client: v } = We("CustomMessage"), { channel: _ } = de("CustomMessage"), { isUnlocking: R, onUnlockClick: y, onFetchSource: M, onDownloadClick: D } = va("LockedAttachment"), [$, L] = z(!1), N = Ln(c.id), { selected: I, voteUp: S, voteDown: F } = Hs(c), {
1410
- Attachment: T = Dn,
1411
- EditMessageModal: E = On,
1412
- MessageActions: A,
1413
- MessageBlocked: O = Pn,
1414
- MessageBouncePrompt: B = zn,
1415
- MessageDeleted: H = $n,
1416
- MessageIsThreadReplyInChannelButtonIndicator: V = Fn,
1409
+ } = e, { client: v } = We("CustomMessage"), { channel: _ } = ce("CustomMessage"), { isUnlocking: L, onUnlockClick: T, onFetchSource: y, onDownloadClick: M } = wa("LockedAttachment"), [$, P] = z(!1), D = Ln(c.id), { selected: R, voteUp: N, voteDown: A } = qs(c), {
1410
+ Attachment: S = Dn,
1411
+ EditMessageModal: I = Pn,
1412
+ MessageActions: E,
1413
+ MessageBlocked: O = On,
1414
+ MessageBouncePrompt: F = zn,
1415
+ MessageDeleted: j = $n,
1416
+ MessageIsThreadReplyInChannelButtonIndicator: H = Fn,
1417
1417
  MessageRepliesCountButton: Y = Bn,
1418
- ReminderNotification: q = Un,
1418
+ ReminderNotification: W = Un,
1419
1419
  StreamedMessageText: x = jn,
1420
- PinIndicator: k
1421
- } = jt("CustomMessage"), P = Vn(c), W = Gn(c), K = ne(
1420
+ PinIndicator: C
1421
+ } = jt("CustomMessage"), B = Vn(c), q = Gn(c), K = te(
1422
1422
  () => u == null ? void 0 : u(c),
1423
1423
  [u, c]
1424
- ), G = ne(() => {
1424
+ ), V = te(() => {
1425
1425
  const fe = c.attachments ?? [], Ce = c.shared_location ? [c.shared_location, ...fe] : fe;
1426
1426
  if (!Ee(c)) return Ce;
1427
1427
  const It = Ce.filter((Tt) => !("type" in Tt) || !sn(Tt));
1428
1428
  return It.length === Ce.length ? Ce : It;
1429
- }, [c]), ee = ne(() => {
1429
+ }, [c]), ie = te(() => {
1430
1430
  const fe = Kt({ message: c, viewerLanguage: p });
1431
1431
  return fe === c.text ? c : { ...c, text: fe };
1432
1432
  }, [c, p]);
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(j, { message: c });
1437
1437
  if (Yn(c))
1438
1438
  return /* @__PURE__ */ n(O, {});
1439
- const ue = !w && !!c.reply_count, Z = !w && c.show_in_channel && c.parent_id, re = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, te = qn(c);
1440
- let oe;
1441
- re ? oe = () => m(c) : te && (oe = () => L(!0));
1442
- const me = f(), En = C(
1439
+ const de = !b && !!c.reply_count, ue = !b && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ft = c.error) == null ? void 0 : ft.status) !== 403, ae = qn(c);
1440
+ let Z;
1441
+ Q ? Z = () => m(c) : ae && (Z = () => P(!0));
1442
+ const me = f(), En = k(
1443
1443
  "str-chat__message str-chat__message-simple",
1444
1444
  `str-chat__message--${c.type}`,
1445
1445
  `str-chat__message--${c.status}`,
1446
1446
  me ? "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
- "str-chat__message--has-attachment": P,
1449
+ "str-chat__message--has-attachment": B,
1450
1450
  "str-chat__message--highlighted": g,
1451
1451
  "str-chat__message--pinned pinned-message": c.pinned,
1452
- "str-chat__message--with-reactions": W,
1452
+ "str-chat__message--with-reactions": q,
1453
1453
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((gt = c == null ? void 0 : c.error) == null ? void 0 : gt.status) !== 403,
1454
- "str-chat__message-with-thread-link": ue || Z,
1454
+ "str-chat__message-with-thread-link": de || ue,
1455
1455
  "str-chat__virtual-message__wrapper--end": r,
1456
1456
  "str-chat__virtual-message__wrapper--first": i,
1457
1457
  "str-chat__virtual-message__wrapper--group": o
1458
1458
  }
1459
- ), dt = c.poll_id && v.polls.fromState(c.poll_id), ut = ya(c), he = Ee(c), mt = Na(c), Le = !!(G != null && G.length && !c.quoted_message), ht = he && me && Le;
1460
- return /* @__PURE__ */ h(se, { children: [
1459
+ ), dt = c.poll_id && v.polls.fromState(c.poll_id), ut = ka(c), he = Ee(c), mt = Ca(c), Le = !!(V != null && V.length && !c.quoted_message), ht = he && me && Le;
1460
+ return /* @__PURE__ */ h(ne, { children: [
1461
1461
  a && /* @__PURE__ */ n(
1462
- E,
1462
+ I,
1463
1463
  {
1464
1464
  additionalMessageInputProps: t
1465
1465
  }
@@ -1467,8 +1467,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1467
1467
  $ && /* @__PURE__ */ n(
1468
1468
  Wn,
1469
1469
  {
1470
- MessageBouncePrompt: B,
1471
- onClose: () => L(!1),
1470
+ MessageBouncePrompt: F,
1471
+ onClose: () => P(!1),
1472
1472
  open: $
1473
1473
  }
1474
1474
  ),
@@ -1478,10 +1478,10 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1478
1478
  className: En,
1479
1479
  "data-message-id": c.id,
1480
1480
  children: [
1481
- k && /* @__PURE__ */ n(k, {}),
1482
- !!N && /* @__PURE__ */ n(q, { reminder: N }),
1481
+ C && /* @__PURE__ */ n(C, {}),
1482
+ !!D && /* @__PURE__ */ n(W, { reminder: D }),
1483
1483
  c.user && /* @__PURE__ */ n(
1484
- ie,
1484
+ re,
1485
1485
  {
1486
1486
  className: "str-chat__avatar str-chat__message-sender-avatar",
1487
1487
  id: c.user.id,
@@ -1495,14 +1495,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1495
1495
  /* @__PURE__ */ n(
1496
1496
  "div",
1497
1497
  {
1498
- className: C("str-chat__message-inner", {
1499
- "str-chat__simple-message--error-failed": re || te
1498
+ className: k("str-chat__message-inner", {
1499
+ "str-chat__simple-message--error-failed": Q || ae
1500
1500
  }),
1501
1501
  "data-testid": "message-inner",
1502
- onClick: oe,
1503
- onKeyDown: oe,
1504
- role: oe ? "button" : void 0,
1505
- tabIndex: oe ? 0 : void 0,
1502
+ onClick: Z,
1503
+ onKeyDown: Z,
1504
+ role: Z ? "button" : void 0,
1505
+ tabIndex: Z ? 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
@@ -1511,7 +1511,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1511
1511
  },
1512
1512
  children: mt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
1513
1513
  me ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1514
- A && /* @__PURE__ */ n(A, {}),
1514
+ E && /* @__PURE__ */ n(E, {}),
1515
1515
  /* @__PURE__ */ n(
1516
1516
  zt.Sent,
1517
1517
  {
@@ -1521,8 +1521,8 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1521
1521
  amountText: (xt = c.metadata) == null ? void 0 : xt.amount_text,
1522
1522
  detail: (wt = c.metadata) == null ? void 0 : wt.attachment_detail,
1523
1523
  paymentStatus: (_t = c.metadata) == null ? void 0 : _t.payment_status,
1524
- onPreviewClick: () => y == null ? void 0 : y(c, _),
1525
- onFetchSource: async () => await (M == null ? void 0 : M(c, _))
1524
+ onPreviewClick: () => T == null ? void 0 : T(c, _),
1525
+ onFetchSource: async () => await (y == null ? void 0 : y(c, _))
1526
1526
  }
1527
1527
  )
1528
1528
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -1535,27 +1535,27 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1535
1535
  amountText: (kt = c.metadata) == null ? void 0 : kt.amount_text,
1536
1536
  detail: (Et = c.metadata) == null ? void 0 : Et.attachment_detail,
1537
1537
  paymentStatus: (St = c.metadata) == null ? void 0 : St.payment_status,
1538
- isUnlocking: R(c.id),
1539
- onUnlockClick: () => y == null ? void 0 : y(c, _),
1540
- onFetchSource: async () => await (M == null ? void 0 : M(c, _)),
1541
- onDownloadClick: () => D == null ? void 0 : D(c, _)
1538
+ isUnlocking: L(c.id),
1539
+ onUnlockClick: () => T == null ? void 0 : T(c, _),
1540
+ onFetchSource: async () => await (y == null ? void 0 : y(c, _)),
1541
+ onDownloadClick: () => M == null ? void 0 : M(c, _)
1542
1542
  }
1543
1543
  ),
1544
- A && /* @__PURE__ */ n(A, {})
1544
+ E && /* @__PURE__ */ n(E, {})
1545
1545
  ] }),
1546
1546
  c.text && /* @__PURE__ */ n("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ n(
1547
1547
  Mt,
1548
1548
  {
1549
- message: ee,
1550
- renderText: b
1549
+ message: ie,
1550
+ renderText: w
1551
1551
  }
1552
1552
  ) })
1553
1553
  ] }) : ut ? (
1554
1554
  /* Tip-only messages render as a standalone bubble */
1555
- /* @__PURE__ */ n(Pe, { message: c, standalone: !0 })
1555
+ /* @__PURE__ */ n(Oe, { 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
1557
  he && !ht && /* @__PURE__ */ n(
1558
- Pe,
1558
+ Oe,
1559
1559
  {
1560
1560
  message: c,
1561
1561
  hasAttachment: Le,
@@ -1563,24 +1563,24 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1563
1563
  }
1564
1564
  ),
1565
1565
  dt && /* @__PURE__ */ n(Xn, { poll: dt }),
1566
- G != null && G.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
- T,
1566
+ V != null && V.length && !c.quoted_message ? /* @__PURE__ */ n(
1567
+ S,
1568
1568
  {
1569
1569
  actionHandler: l,
1570
- attachments: G
1570
+ attachments: V
1571
1571
  }
1572
1572
  ) : null,
1573
1573
  K ? /* @__PURE__ */ n(
1574
1574
  x,
1575
1575
  {
1576
- message: ee,
1577
- renderText: b
1576
+ message: ie,
1577
+ renderText: w
1578
1578
  }
1579
1579
  ) : /* @__PURE__ */ n(
1580
1580
  Mt,
1581
1581
  {
1582
- message: ee,
1583
- renderText: b
1582
+ message: ie,
1583
+ renderText: w
1584
1584
  }
1585
1585
  ),
1586
1586
  /* @__PURE__ */ n(Kn, {})
@@ -1589,7 +1589,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1589
1589
  ),
1590
1590
  !mt && !ut && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1591
1591
  (!he || ht) && /* @__PURE__ */ n(
1592
- Pe,
1592
+ Oe,
1593
1593
  {
1594
1594
  message: c,
1595
1595
  hasAttachment: Le,
@@ -1597,34 +1597,34 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1597
1597
  }
1598
1598
  ),
1599
1599
  s && he && /* @__PURE__ */ n(
1600
- Ca,
1600
+ Ea,
1601
1601
  {
1602
- selected: I,
1603
- onVoteUp: S,
1604
- onVoteDown: F
1602
+ selected: R,
1603
+ onVoteUp: N,
1604
+ onVoteDown: A
1605
1605
  }
1606
1606
  )
1607
1607
  ] }),
1608
- ue && /* @__PURE__ */ n(
1608
+ de && /* @__PURE__ */ n(
1609
1609
  Y,
1610
1610
  {
1611
1611
  onClick: d,
1612
1612
  reply_count: c.reply_count
1613
1613
  }
1614
1614
  ),
1615
- Z && /* @__PURE__ */ n(V, {})
1615
+ ue && /* @__PURE__ */ n(H, {})
1616
1616
  ]
1617
1617
  },
1618
1618
  c.id
1619
1619
  )
1620
1620
  ] });
1621
- }, Ea = U.memo(
1622
- ka,
1621
+ }, Ia = U.memo(
1622
+ Sa,
1623
1623
  (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Rn(e, t)
1624
- ), Sa = (e) => {
1624
+ ), Ta = (e) => {
1625
1625
  const t = xe("CustomMessage");
1626
- return /* @__PURE__ */ n(Ea, { ...t, ...e });
1627
- }, Ia = () => {
1626
+ return /* @__PURE__ */ n(Ia, { ...t, ...e });
1627
+ }, Aa = () => {
1628
1628
  var s;
1629
1629
  const { handleDelete: e, message: t } = xe("CustomMessageActions");
1630
1630
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
@@ -1637,7 +1637,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1637
1637
  children: /* @__PURE__ */ n(As, { size: 16, weight: "light", "aria-hidden": !0 })
1638
1638
  }
1639
1639
  );
1640
- }, Ta = () => {
1640
+ }, Ma = () => {
1641
1641
  const { handleFlag: e } = xe("CustomMessageActions");
1642
1642
  return /* @__PURE__ */ n(
1643
1643
  Yt,
@@ -1649,19 +1649,19 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1649
1649
  children: /* @__PURE__ */ n(Vt, { size: 16, weight: "light", "aria-hidden": !0 })
1650
1650
  }
1651
1651
  );
1652
- }, Aa = () => {
1652
+ }, Ra = () => {
1653
1653
  var t;
1654
1654
  const { message: e } = xe("CustomMessageActions");
1655
1655
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1656
- Os,
1656
+ zs,
1657
1657
  {
1658
1658
  messageActionSet: [
1659
- { Component: Ia, placement: "quick", type: "delete" },
1660
- { Component: Ta, placement: "quick", type: "flag" }
1659
+ { Component: Aa, placement: "quick", type: "delete" },
1660
+ { Component: Ma, placement: "quick", type: "flag" }
1661
1661
  ]
1662
1662
  }
1663
1663
  );
1664
- }, Ma = ({
1664
+ }, La = ({
1665
1665
  link: e,
1666
1666
  onDismiss: t
1667
1667
  }) => {
@@ -1701,26 +1701,26 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1701
1701
  ]
1702
1702
  }
1703
1703
  );
1704
- }, Ra = (e) => ({
1704
+ }, Da = (e) => ({
1705
1705
  linkPreviews: Array.from(e.previews.values()).filter(
1706
1706
  (t) => At.previewIsLoaded(t) || At.previewIsLoading(t)
1707
1707
  )
1708
- }), La = () => {
1708
+ }), Pa = () => {
1709
1709
  const { linkPreviewsManager: e } = Jn(), { linkPreviews: t } = Zn(
1710
1710
  e.state,
1711
- Ra
1711
+ Da
1712
1712
  ), s = (r) => {
1713
1713
  e.dismissPreview(r);
1714
1714
  };
1715
1715
  return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-stretch w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
1716
- Ma,
1716
+ La,
1717
1717
  {
1718
1718
  link: r,
1719
1719
  onDismiss: s
1720
1720
  },
1721
1721
  r.og_scrape_url
1722
1722
  )) }) : null;
1723
- }, cn = U.createContext(!1), Da = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1723
+ }, cn = U.createContext(!1), Oa = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1724
1724
  "button",
1725
1725
  {
1726
1726
  ...s,
@@ -1730,14 +1730,14 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1730
1730
  onClick: e,
1731
1731
  children: /* @__PURE__ */ n(Ms, { weight: "bold", className: "size-4" })
1732
1732
  }
1733
- ), Oa = () => {
1733
+ ), za = () => {
1734
1734
  const e = Ae(cn), { handleSubmit: t } = es(), s = ts(), a = e || !s, {
1735
- SendButton: r = Da,
1735
+ SendButton: r = Oa,
1736
1736
  AttachmentPreviewList: i = ns
1737
1737
  } = jt("CustomMessageInput");
1738
1738
  return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]", children: [
1739
1739
  /* @__PURE__ */ n(ss, {}),
1740
- /* @__PURE__ */ n(La, {}),
1740
+ /* @__PURE__ */ n(Pa, {}),
1741
1741
  /* @__PURE__ */ n(i, {}),
1742
1742
  /* @__PURE__ */ h("div", { className: "flex", children: [
1743
1743
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
@@ -1764,15 +1764,15 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1764
1764
  )
1765
1765
  ] })
1766
1766
  ] });
1767
- }, Pa = ({
1767
+ }, $a = ({
1768
1768
  renderActions: e,
1769
1769
  renderFooter: t,
1770
1770
  disabled: s = !1,
1771
1771
  disabledReason: a
1772
1772
  }) => {
1773
1773
  var o;
1774
- const { channel: r } = de(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1775
- return s ? /* @__PURE__ */ h(se, { children: [
1774
+ const { channel: r } = ce(), i = ((o = r == null ? void 0 : r.data) == null ? void 0 : o.frozen) === !0;
1775
+ return s ? /* @__PURE__ */ h(ne, { children: [
1776
1776
  /* @__PURE__ */ n("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ n("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
1777
1777
  t == null ? void 0 : t()
1778
1778
  ] }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -1784,23 +1784,23 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1784
1784
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1785
1785
  children: [
1786
1786
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1787
- /* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: Oa }) })
1787
+ /* @__PURE__ */ n(cn.Provider, { value: i, children: /* @__PURE__ */ n(Qn, { Input: za }) })
1788
1788
  ]
1789
1789
  }
1790
1790
  ),
1791
1791
  t == null ? void 0 : t()
1792
1792
  ] });
1793
- }, za = [
1793
+ }, Fa = [
1794
1794
  "SYSTEM_DM_AGENT_PAUSED",
1795
1795
  "SYSTEM_DM_AGENT_RESUMED"
1796
- ], $a = {
1796
+ ], Ba = {
1797
1797
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1798
1798
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1799
- }, Fa = [
1799
+ }, Ua = [
1800
1800
  "SYSTEM_AGE_SAFETY_BLOCKED"
1801
- ], Ba = {
1801
+ ], ja = {
1802
1802
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1803
- }, ze = "age safety guidelines.", Ua = "https://linktr.ee/s/about/contact", Ft = (e) => za.includes(e), ja = (e) => Fa.includes(e), Va = (e) => {
1803
+ }, ze = "age safety guidelines.", Va = "https://linktr.ee/s/about/contact", Ft = (e) => Fa.includes(e), Ga = (e) => Ua.includes(e), Ha = (e) => {
1804
1804
  var a;
1805
1805
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1806
1806
  if (Ft(t))
@@ -1808,7 +1808,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1808
1808
  kind: "dm-agent",
1809
1809
  type: t
1810
1810
  };
1811
- if (ja(t))
1811
+ if (Ga(t))
1812
1812
  return {
1813
1813
  kind: "age-safety",
1814
1814
  type: t
@@ -1819,17 +1819,17 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1819
1819
  kind: "dm-agent",
1820
1820
  type: s
1821
1821
  };
1822
- }, Ga = (e) => {
1822
+ }, Ya = (e) => {
1823
1823
  const t = e.indexOf(ze);
1824
1824
  if (t === -1)
1825
1825
  return e;
1826
1826
  const s = t + ze.length;
1827
- return /* @__PURE__ */ h(se, { children: [
1827
+ return /* @__PURE__ */ h(ne, { children: [
1828
1828
  e.slice(0, t),
1829
1829
  /* @__PURE__ */ n(
1830
1830
  "a",
1831
1831
  {
1832
- href: Ua,
1832
+ href: Va,
1833
1833
  target: "_blank",
1834
1834
  rel: "noopener noreferrer",
1835
1835
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -1838,13 +1838,13 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1838
1838
  ),
1839
1839
  e.slice(s)
1840
1840
  ] });
1841
- }, Ha = (e) => {
1841
+ }, qa = (e) => {
1842
1842
  var a, r;
1843
- const t = e.message.hide_date === !0, s = Va(
1843
+ const t = e.message.hide_date === !0, s = Ha(
1844
1844
  e.message
1845
1845
  );
1846
1846
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1847
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || $a[s.type];
1847
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ba[s.type];
1848
1848
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1849
1849
  /* @__PURE__ */ h(
1850
1850
  "div",
@@ -1870,7 +1870,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1870
1870
  ] });
1871
1871
  }
1872
1872
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1873
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ba[s.type];
1873
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || ja[s.type];
1874
1874
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1875
1875
  /* @__PURE__ */ h(
1876
1876
  "div",
@@ -1889,7 +1889,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1889
1889
  "data-testid": "age-safety-system-message-icon"
1890
1890
  }
1891
1891
  ),
1892
- /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ga(i) }) })
1892
+ /* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ya(i) }) })
1893
1893
  ]
1894
1894
  }
1895
1895
  ),
@@ -1914,15 +1914,15 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1914
1914
  begin: `${120 * t}ms`,
1915
1915
  repeatCount: "indefinite"
1916
1916
  }
1917
- ) }), Ya = /* @__PURE__ */ new Set([
1918
- Oe.Thinking,
1919
- Oe.Generating,
1920
- Oe.ExternalSources
1921
- ]), qa = ({ threadList: e }) => {
1922
- var b, w;
1923
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
1924
- if (!e && l && Ya.has(o)) {
1925
- const p = Wa(t, (b = r.user) == null ? void 0 : b.id);
1917
+ ) }), Wa = /* @__PURE__ */ new Set([
1918
+ Pe.Thinking,
1919
+ Pe.Generating,
1920
+ Pe.ExternalSources
1921
+ ]), Xa = ({ threadList: e }) => {
1922
+ var w, b;
1923
+ const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = We(), { typing: i = {} } = rs(), { aiState: o } = is(t), l = Ae(dn);
1924
+ if (!e && l && Wa.has(o)) {
1925
+ const p = Ka(t, (w = r.user) == null ? void 0 : w.id);
1926
1926
  return /* @__PURE__ */ n(
1927
1927
  Bt,
1928
1928
  {
@@ -1948,7 +1948,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1948
1948
  ) : [], u = e ? g : m;
1949
1949
  if (!u.length)
1950
1950
  return null;
1951
- const f = (w = u[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1951
+ const f = (b = u[0]) == null ? void 0 : b.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
1952
1952
  return /* @__PURE__ */ n(
1953
1953
  Bt,
1954
1954
  {
@@ -1973,7 +1973,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
1973
1973
  },
1974
1974
  children: /* @__PURE__ */ h("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
1975
1975
  /* @__PURE__ */ n(
1976
- ie,
1976
+ re,
1977
1977
  {
1978
1978
  className: "str-chat__avatar str-chat__message-sender-avatar",
1979
1979
  id: e,
@@ -2002,7 +2002,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
2002
2002
  ] })
2003
2003
  }
2004
2004
  );
2005
- function Wa(e, t) {
2005
+ function Ka(e, t) {
2006
2006
  var a;
2007
2007
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2008
2008
  for (const r of Object.values(s)) {
@@ -2011,10 +2011,10 @@ function Wa(e, t) {
2011
2011
  return i;
2012
2012
  }
2013
2013
  }
2014
- const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2014
+ const Ja = () => null, Za = ({ className: e, message: t }) => /* @__PURE__ */ h(
2015
2015
  "div",
2016
2016
  {
2017
- className: C("flex items-center justify-center h-full", e),
2017
+ className: k("flex items-center justify-center h-full", e),
2018
2018
  children: [
2019
2019
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2020
2020
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2055,11 +2055,23 @@ const Xa = () => null, Ka = ({ className: e, message: t }) => /* @__PURE__ */ h(
2055
2055
  ]
2056
2056
  }
2057
2057
  ), Se = U.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2058
- /* @__PURE__ */ n(Ka, { className: "w-6 h-6" }),
2058
+ /* @__PURE__ */ n(Za, { className: "w-6 h-6" }),
2059
2059
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2060
2060
  ] }) }));
2061
2061
  Se.displayName = "LoadingState";
2062
- const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Ja = ({
2062
+ const He = ({
2063
+ className: e,
2064
+ size: t = 16
2065
+ }) => /* @__PURE__ */ n(
2066
+ Ls,
2067
+ {
2068
+ weight: "fill",
2069
+ size: t,
2070
+ className: k("shrink-0 text-[#1D9BF0]", e),
2071
+ "aria-label": "Verified",
2072
+ role: "img"
2073
+ }
2074
+ ), oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Ut = "Replies instantly with AI assistant", Qa = ({
2063
2075
  onBack: e,
2064
2076
  showBackButton: t,
2065
2077
  showStarButton: s = !1,
@@ -2074,26 +2086,29 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2074
2086
  onReportParticipantClick: u,
2075
2087
  customChannelActions: f,
2076
2088
  renderChannelActions: c,
2077
- showChannelInfo: b = !0,
2078
- onParticipantNameClick: w
2089
+ showChannelInfo: w = !0,
2090
+ renderHeaderTitleBadges: b
2079
2091
  }) => {
2080
- var D, $, L, N, I;
2081
- const { channel: p } = de(), v = U.useMemo(() => {
2082
- var T, E;
2083
- const S = (T = p._client) == null ? void 0 : T.userID;
2084
- return S ? Object.values(((E = p.state) == null ? void 0 : E.members) || {}).find(
2085
- (A) => {
2086
- var O;
2087
- return ((O = A.user) == null ? void 0 : O.id) && A.user.id !== S;
2092
+ var P, D, R, N, A, S;
2093
+ const { channel: p } = ce(), v = U.useMemo(() => {
2094
+ var O, F;
2095
+ const I = (O = p._client) == null ? void 0 : O.userID;
2096
+ return I ? Object.values(((F = p.state) == null ? void 0 : F.members) || {}).find(
2097
+ (j) => {
2098
+ var H;
2099
+ return ((H = j.user) == null ? void 0 : H.id) && j.user.id !== I;
2088
2100
  }
2089
2101
  ) : void 0;
2090
- }, [(D = p._client) == null ? void 0 : D.userID, ($ = p.state) == null ? void 0 : $.members]), _ = Xt(v == null ? void 0 : v.user), R = (L = v == null ? void 0 : v.user) == null ? void 0 : L.image, y = Wt(p), M = async () => {
2102
+ }, [(P = p._client) == null ? void 0 : P.userID, (D = p.state) == null ? void 0 : D.members]), _ = Xt(v == null ? void 0 : v.user), L = (R = v == null ? void 0 : v.user) == null ? void 0 : R.image, T = ((N = v == null ? void 0 : v.user) == null ? void 0 : N.is_verified) === !0, y = Wt(p), M = b == null ? void 0 : b({
2103
+ channel: p,
2104
+ participant: v
2105
+ }), $ = async () => {
2091
2106
  try {
2092
2107
  y ? await p.unpin() : await p.pin();
2093
- } catch (S) {
2108
+ } catch (I) {
2094
2109
  console.error(
2095
2110
  "[CustomChannelHeader] Failed to update pinned status:",
2096
- S
2111
+ I
2097
2112
  );
2098
2113
  }
2099
2114
  };
@@ -2102,8 +2117,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2102
2117
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2103
2118
  "button",
2104
2119
  {
2105
- className: C(
2106
- le,
2120
+ className: k(
2121
+ oe,
2107
2122
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2108
2123
  ),
2109
2124
  onClick: e || (() => {
@@ -2115,29 +2130,21 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2115
2130
  ) }),
2116
2131
  /* @__PURE__ */ h("div", { className: "flex flex-col gap-1 items-center", children: [
2117
2132
  /* @__PURE__ */ n(
2118
- ie,
2133
+ re,
2119
2134
  {
2120
- id: ((N = v == null ? void 0 : v.user) == null ? void 0 : N.id) || p.id || "unknown",
2135
+ id: ((A = v == null ? void 0 : v.user) == null ? void 0 : A.id) || p.id || "unknown",
2121
2136
  name: _,
2122
- image: R,
2137
+ image: L,
2123
2138
  starred: s && y,
2124
2139
  dmAgentEnabled: a,
2125
2140
  size: 48
2126
2141
  }
2127
2142
  ),
2128
- w ? /* @__PURE__ */ h(
2129
- "button",
2130
- {
2131
- type: "button",
2132
- onClick: w,
2133
- "aria-label": `View details for ${_}`,
2134
- 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",
2135
- children: [
2136
- /* @__PURE__ */ n("span", { className: "truncate", children: _ }),
2137
- /* @__PURE__ */ n(Ve, { className: "size-3 shrink-0", weight: "bold" })
2138
- ]
2139
- }
2140
- ) : /* @__PURE__ */ n("p", { className: "text-center text-xs font-medium text-black/90", children: _ }),
2143
+ /* @__PURE__ */ h("p", { className: "flex max-w-full items-center justify-center gap-1 text-center text-xs font-medium text-black/90", children: [
2144
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: _ }),
2145
+ T && /* @__PURE__ */ n(He, {}),
2146
+ M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M })
2147
+ ] }),
2141
2148
  a && /* @__PURE__ */ h("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2142
2149
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2143
2150
  /* @__PURE__ */ n("span", { children: Ut })
@@ -2147,14 +2154,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2147
2154
  s && /* @__PURE__ */ n(
2148
2155
  "button",
2149
2156
  {
2150
- className: le,
2151
- onClick: M,
2157
+ className: oe,
2158
+ onClick: $,
2152
2159
  type: "button",
2153
2160
  "aria-label": y ? "Unstar conversation" : "Star conversation",
2154
2161
  children: /* @__PURE__ */ n(
2155
2162
  Be,
2156
2163
  {
2157
- className: C("size-5", {
2164
+ className: k("size-5", {
2158
2165
  "text-yellow-600": y,
2159
2166
  "text-black/90": !y
2160
2167
  }),
@@ -2163,8 +2170,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2163
2170
  )
2164
2171
  }
2165
2172
  ),
2166
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2167
- Pt,
2173
+ w && (c !== void 0 ? c : /* @__PURE__ */ n(
2174
+ Ot,
2168
2175
  {
2169
2176
  channel: p,
2170
2177
  participant: v,
@@ -2177,7 +2184,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2177
2184
  onBlockParticipantClick: g,
2178
2185
  onReportParticipantClick: u,
2179
2186
  customChannelActions: f,
2180
- triggerClassName: C(le, "bg-[#F1F0EE]")
2187
+ triggerClassName: k(oe, "bg-[#F1F0EE]")
2181
2188
  }
2182
2189
  ))
2183
2190
  ] })
@@ -2187,8 +2194,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2187
2194
  t && e && /* @__PURE__ */ n(
2188
2195
  "button",
2189
2196
  {
2190
- className: C(
2191
- le,
2197
+ className: k(
2198
+ oe,
2192
2199
  "messaging-channel-view-back-button-desktop"
2193
2200
  ),
2194
2201
  type: "button",
@@ -2198,30 +2205,22 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2198
2205
  }
2199
2206
  ),
2200
2207
  /* @__PURE__ */ n(
2201
- ie,
2208
+ re,
2202
2209
  {
2203
- id: ((I = v == null ? void 0 : v.user) == null ? void 0 : I.id) || p.id || "unknown",
2210
+ id: ((S = v == null ? void 0 : v.user) == null ? void 0 : S.id) || p.id || "unknown",
2204
2211
  name: _,
2205
- image: R,
2212
+ image: L,
2206
2213
  starred: s && y,
2207
2214
  dmAgentEnabled: a,
2208
2215
  size: 48
2209
2216
  }
2210
2217
  ),
2211
2218
  /* @__PURE__ */ h("div", { className: "min-w-0", children: [
2212
- w ? /* @__PURE__ */ h(
2213
- "button",
2214
- {
2215
- type: "button",
2216
- onClick: w,
2217
- "aria-label": `View details for ${_}`,
2218
- className: "flex min-w-0 max-w-full items-center gap-1 rounded font-medium text-black/90 transition-opacity hover:opacity-70",
2219
- children: [
2220
- /* @__PURE__ */ n("span", { className: "truncate", children: _ }),
2221
- /* @__PURE__ */ n(Ve, { className: "size-4 shrink-0", weight: "bold" })
2222
- ]
2223
- }
2224
- ) : /* @__PURE__ */ n("h1", { className: "font-medium text-black/90 truncate", children: _ }),
2219
+ /* @__PURE__ */ h("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
2220
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: _ }),
2221
+ T && /* @__PURE__ */ n(He, {}),
2222
+ M && /* @__PURE__ */ n("span", { className: "shrink-0", children: M })
2223
+ ] }),
2225
2224
  a && /* @__PURE__ */ h("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
2226
2225
  /* @__PURE__ */ n(je, { className: "size-3 shrink-0 text-black/55" }),
2227
2226
  /* @__PURE__ */ n("span", { className: "truncate", children: Ut })
@@ -2232,14 +2231,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2232
2231
  s && /* @__PURE__ */ n(
2233
2232
  "button",
2234
2233
  {
2235
- className: le,
2236
- onClick: M,
2234
+ className: oe,
2235
+ onClick: $,
2237
2236
  type: "button",
2238
2237
  "aria-label": y ? "Unstar conversation" : "Star conversation",
2239
2238
  children: /* @__PURE__ */ n(
2240
2239
  Be,
2241
2240
  {
2242
- className: C("size-6", {
2241
+ className: k("size-6", {
2243
2242
  "text-yellow-600": y,
2244
2243
  "text-black/90": !y
2245
2244
  }),
@@ -2248,8 +2247,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2248
2247
  )
2249
2248
  }
2250
2249
  ),
2251
- b && (c !== void 0 ? c : /* @__PURE__ */ n(
2252
- Pt,
2250
+ w && (c !== void 0 ? c : /* @__PURE__ */ n(
2251
+ Ot,
2253
2252
  {
2254
2253
  channel: p,
2255
2254
  participant: v,
@@ -2262,13 +2261,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2262
2261
  onBlockParticipantClick: g,
2263
2262
  onReportParticipantClick: u,
2264
2263
  customChannelActions: f,
2265
- triggerClassName: le
2264
+ triggerClassName: oe
2266
2265
  }
2267
2266
  ))
2268
2267
  ] })
2269
2268
  ] })
2270
2269
  ] });
2271
- }, Za = ({
2270
+ }, er = ({
2272
2271
  onBack: e,
2273
2272
  showBackButton: t,
2274
2273
  renderMessageInputActions: s,
@@ -2283,65 +2282,65 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2283
2282
  showBlockParticipant: u = !0,
2284
2283
  showReportParticipant: f = !0,
2285
2284
  composerDisabled: c = !1,
2286
- composerDisabledReason: b,
2287
- showStarButton: w = !1,
2285
+ composerDisabledReason: w,
2286
+ showStarButton: b = !1,
2288
2287
  chatbotVotingEnabled: p = !1,
2289
2288
  renderChannelBanner: v,
2290
- customChannelActions: _,
2291
- renderChannelActions: R,
2289
+ renderHeaderTitleBadges: _,
2290
+ customChannelActions: L,
2291
+ renderChannelActions: T,
2292
2292
  renderMessage: y,
2293
2293
  dmAgentEnabled: M = !1,
2294
- viewerLanguage: D,
2295
- showChannelInfo: $ = !0,
2296
- onParticipantNameClick: L
2294
+ viewerLanguage: $,
2295
+ showChannelInfo: P = !0
2297
2296
  }) => {
2298
- var O, B, H, V, Y, q;
2299
- const { channel: N } = de(), I = U.useMemo(() => {
2300
- var P, W;
2301
- const x = (P = N._client) == null ? void 0 : P.userID;
2302
- return x ? Object.values(((W = N.state) == null ? void 0 : W.members) || {}).find(
2297
+ var O, F, j, H, Y, W;
2298
+ const { channel: D } = ce(), R = U.useMemo(() => {
2299
+ var B, q;
2300
+ const x = (B = D._client) == null ? void 0 : B.userID;
2301
+ return x ? Object.values(((q = D.state) == null ? void 0 : q.members) || {}).find(
2303
2302
  (K) => {
2304
- var G;
2305
- return ((G = K.user) == null ? void 0 : G.id) && K.user.id !== x;
2303
+ var V;
2304
+ return ((V = K.user) == null ? void 0 : V.id) && K.user.id !== x;
2306
2305
  }
2307
2306
  ) : void 0;
2308
- }, [(O = N._client) == null ? void 0 : O.userID, (B = N.state) == null ? void 0 : B.members]), S = U.useMemo(() => {
2309
- var P, W;
2310
- const x = (P = N._client) == null ? void 0 : P.userID;
2311
- return x ? Object.values(((W = N.state) == null ? void 0 : W.members) || {}).find((K) => {
2312
- var G;
2313
- return ((G = K.user) == null ? void 0 : G.id) === x;
2307
+ }, [(O = D._client) == null ? void 0 : O.userID, (F = D.state) == null ? void 0 : F.members]), N = U.useMemo(() => {
2308
+ var B, q;
2309
+ const x = (B = D._client) == null ? void 0 : B.userID;
2310
+ return x ? Object.values(((q = D.state) == null ? void 0 : q.members) || {}).find((K) => {
2311
+ var V;
2312
+ return ((V = K.user) == null ? void 0 : V.id) === x;
2314
2313
  }) : void 0;
2315
- }, [(H = N._client) == null ? void 0 : H.userID, (V = N.state) == null ? void 0 : V.members]), F = ((Y = S == null ? void 0 : S.user) == null ? void 0 : Y.is_account) ?? (S == null ? void 0 : S.is_account), T = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), E = M && F === !1 && T === !0, A = J(
2314
+ }, [(j = D._client) == null ? void 0 : j.userID, (H = D.state) == null ? void 0 : H.members]), A = ((Y = N == null ? void 0 : N.user) == null ? void 0 : Y.is_account) ?? (N == null ? void 0 : N.is_account), S = ((W = R == null ? void 0 : R.user) == null ? void 0 : W.is_account) ?? (R == null ? void 0 : R.is_account), I = M && A === !1 && S === !0, E = J(
2316
2315
  (x) => {
2317
- const { message: k } = xe("ChannelView"), P = /* @__PURE__ */ n(
2318
- Sa,
2316
+ const { message: C } = xe("ChannelView"), B = /* @__PURE__ */ n(
2317
+ Ta,
2319
2318
  {
2320
2319
  ...x,
2321
2320
  chatbotVotingEnabled: p,
2322
- viewerLanguage: D
2321
+ viewerLanguage: $
2323
2322
  }
2324
2323
  );
2325
- return !y || !k ? P : y(P, k);
2324
+ return !y || !C ? B : y(B, C);
2326
2325
  },
2327
- [p, y, D]
2326
+ [p, y, $]
2328
2327
  );
2329
- return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2328
+ return /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(
2330
2329
  ls,
2331
2330
  {
2332
2331
  overrides: {
2333
- Message: A,
2334
- MessageActions: Aa
2332
+ Message: E,
2333
+ MessageActions: Ra
2335
2334
  },
2336
2335
  children: /* @__PURE__ */ h(cs, { children: [
2337
2336
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2338
- Ja,
2337
+ Qa,
2339
2338
  {
2340
2339
  onBack: e,
2341
2340
  showBackButton: t,
2342
- showChannelInfo: $,
2343
- showStarButton: w,
2344
- dmAgentEnabled: E,
2341
+ showChannelInfo: P,
2342
+ showStarButton: b,
2343
+ dmAgentEnabled: I,
2345
2344
  onLeaveConversation: i,
2346
2345
  onBlockParticipant: o,
2347
2346
  showDeleteConversation: l,
@@ -2350,9 +2349,9 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2350
2349
  onDeleteConversationClick: d,
2351
2350
  onBlockParticipantClick: m,
2352
2351
  onReportParticipantClick: g,
2353
- customChannelActions: _,
2354
- renderChannelActions: R,
2355
- onParticipantNameClick: L
2352
+ customChannelActions: L,
2353
+ renderChannelActions: T,
2354
+ renderHeaderTitleBadges: _
2356
2355
  }
2357
2356
  ) }, "lt-channel-header"),
2358
2357
  v ? /* @__PURE__ */ n(U.Fragment, { children: v() }, "lt-channel-banner") : null,
@@ -2364,16 +2363,16 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2364
2363
  },
2365
2364
  "lt-channel-message-list"
2366
2365
  ),
2367
- r ? /* @__PURE__ */ n(U.Fragment, { children: r(N) }, "lt-channel-conversation-footer") : null,
2366
+ r ? /* @__PURE__ */ n(U.Fragment, { children: r(D) }, "lt-channel-conversation-footer") : null,
2368
2367
  /* @__PURE__ */ n(
2369
- Pa,
2368
+ $a,
2370
2369
  {
2371
2370
  ...s && {
2372
- renderActions: () => s == null ? void 0 : s(N)
2371
+ renderActions: () => s == null ? void 0 : s(D)
2373
2372
  },
2374
- renderFooter: () => a == null ? void 0 : a(N),
2373
+ renderFooter: () => a == null ? void 0 : a(D),
2375
2374
  disabled: c,
2376
- disabledReason: b
2375
+ disabledReason: w
2377
2376
  },
2378
2377
  "lt-channel-message-input"
2379
2378
  )
@@ -2391,67 +2390,67 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2391
2390
  onLeaveConversation: o,
2392
2391
  onBlockParticipant: l,
2393
2392
  className: d,
2394
- CustomChannelEmptyState: m = Xa,
2393
+ CustomChannelEmptyState: m = Ja,
2395
2394
  showDeleteConversation: g = !0,
2396
2395
  onDeleteConversationClick: u,
2397
2396
  onBlockParticipantClick: f,
2398
2397
  onReportParticipantClick: c,
2399
- showBlockParticipant: b = !0,
2400
- showReportParticipant: w = !0,
2398
+ showBlockParticipant: w = !0,
2399
+ showReportParticipant: b = !0,
2401
2400
  composerDisabled: p = !1,
2402
2401
  composerDisabledReason: v,
2403
2402
  dmAgentEnabled: _,
2404
- messageMetadata: R,
2405
- onMessageSent: y,
2406
- showStarButton: M = !1,
2407
- chatbotVotingEnabled: D = !1,
2403
+ messageMetadata: L,
2404
+ onMessageSent: T,
2405
+ showStarButton: y = !1,
2406
+ chatbotVotingEnabled: M = !1,
2408
2407
  renderChannelBanner: $,
2409
- customChannelActions: L,
2410
- renderChannelActions: N,
2411
- renderMessage: I,
2412
- onMessageLinkClick: S,
2413
- sendButton: F,
2414
- attachmentPreviewList: T,
2408
+ renderHeaderTitleBadges: P,
2409
+ customChannelActions: D,
2410
+ renderChannelActions: R,
2411
+ renderMessage: N,
2412
+ onMessageLinkClick: A,
2413
+ sendButton: S,
2414
+ attachmentPreviewList: I,
2415
2415
  viewerLanguage: E,
2416
- showChannelInfo: A = !0,
2417
- onParticipantNameClick: O
2416
+ showChannelInfo: O = !0
2418
2417
  }) => {
2419
- const B = J(
2420
- async (V, Y, q) => {
2421
- var G;
2422
- const x = ((G = e.data) == null ? void 0 : G.chatbot_paused) === !0, k = _ && !x, P = {
2418
+ const F = J(
2419
+ async (H, Y, W) => {
2420
+ var V;
2421
+ const x = ((V = e.data) == null ? void 0 : V.chatbot_paused) === !0, C = _ && !x, B = {
2423
2422
  ...Y,
2424
- ...k && { silent: !0 },
2425
- ...R && {
2423
+ ...C && { silent: !0 },
2424
+ ...L && {
2426
2425
  metadata: {
2427
2426
  ...Y.metadata ?? {},
2428
- ...R
2427
+ ...L
2429
2428
  }
2430
2429
  }
2431
- }, W = {
2432
- ...q,
2433
- ...k && { skip_push: !0 }
2434
- }, K = await e.sendMessage(P, W);
2435
- return y == null || y(K), K;
2430
+ }, q = {
2431
+ ...W,
2432
+ ...C && { skip_push: !0 }
2433
+ }, K = await e.sendMessage(B, q);
2434
+ return T == null || T(K), K;
2436
2435
  },
2437
- [e, _, R, y]
2438
- ), H = j(null);
2436
+ [e, _, L, T]
2437
+ ), j = G(null);
2439
2438
  return X(() => {
2440
- if (!S) return;
2441
- const V = H.current;
2442
- if (!V) return;
2443
- const Y = (q) => {
2444
- const x = q.target, k = x == null ? void 0 : x.closest("a[href]"), P = k == null ? void 0 : k.getAttribute("href");
2445
- if (!P) return;
2446
- const W = k == null ? void 0 : k.closest("[data-message-id]"), K = W == null ? void 0 : W.getAttribute("data-message-id"), G = K ? e.state.messages.find((ee) => ee.id === K) : void 0;
2447
- S(P, G);
2439
+ if (!A) return;
2440
+ const H = j.current;
2441
+ if (!H) return;
2442
+ const Y = (W) => {
2443
+ const x = W.target, C = x == null ? void 0 : x.closest("a[href]"), B = C == null ? void 0 : C.getAttribute("href");
2444
+ if (!B) return;
2445
+ const q = C == null ? void 0 : C.closest("[data-message-id]"), K = q == null ? void 0 : q.getAttribute("data-message-id"), V = K ? e.state.messages.find((ie) => ie.id === K) : void 0;
2446
+ A(B, V);
2448
2447
  };
2449
- return V.addEventListener("click", Y), () => V.removeEventListener("click", Y);
2450
- }, [S, e]), /* @__PURE__ */ n(
2448
+ return H.addEventListener("click", Y), () => H.removeEventListener("click", Y);
2449
+ }, [A, e]), /* @__PURE__ */ n(
2451
2450
  "div",
2452
2451
  {
2453
- ref: H,
2454
- className: C(
2452
+ ref: j,
2453
+ className: k(
2455
2454
  "messaging-channel-view h-full flex flex-col",
2456
2455
  d
2457
2456
  ),
@@ -2459,16 +2458,16 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2459
2458
  os,
2460
2459
  {
2461
2460
  channel: e,
2462
- MessageSystem: Ha,
2461
+ MessageSystem: qa,
2463
2462
  EmptyStateIndicator: m,
2464
2463
  LoadingIndicator: Se,
2465
- DateSeparator: Vs,
2466
- TypingIndicator: qa,
2467
- doSendMessageRequest: B,
2468
- ...F ? { SendButton: F } : {},
2469
- ...T ? { AttachmentPreviewList: T } : {},
2464
+ DateSeparator: Hs,
2465
+ TypingIndicator: Xa,
2466
+ doSendMessageRequest: F,
2467
+ ...S ? { SendButton: S } : {},
2468
+ ...I ? { AttachmentPreviewList: I } : {},
2470
2469
  children: /* @__PURE__ */ n(
2471
- Za,
2470
+ er,
2472
2471
  {
2473
2472
  onBack: t,
2474
2473
  showBackButton: s,
@@ -2482,20 +2481,20 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2482
2481
  onDeleteConversationClick: u,
2483
2482
  onBlockParticipantClick: f,
2484
2483
  onReportParticipantClick: c,
2485
- showBlockParticipant: b,
2486
- showReportParticipant: w,
2484
+ showBlockParticipant: w,
2485
+ showReportParticipant: b,
2487
2486
  composerDisabled: p,
2488
2487
  composerDisabledReason: v,
2489
- showStarButton: M,
2488
+ showStarButton: y,
2490
2489
  dmAgentEnabled: _,
2491
- chatbotVotingEnabled: D,
2490
+ chatbotVotingEnabled: M,
2492
2491
  renderChannelBanner: $,
2493
- customChannelActions: L,
2494
- renderChannelActions: N,
2495
- renderMessage: I,
2492
+ renderHeaderTitleBadges: P,
2493
+ customChannelActions: D,
2494
+ renderChannelActions: R,
2495
+ renderMessage: N,
2496
2496
  viewerLanguage: E,
2497
- showChannelInfo: A,
2498
- onParticipantNameClick: O
2497
+ showChannelInfo: O
2499
2498
  }
2500
2499
  )
2501
2500
  }
@@ -2520,7 +2519,7 @@ const be = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2520
2519
  )
2521
2520
  ] }) }));
2522
2521
  be.displayName = "ErrorState";
2523
- const ki = ({
2522
+ const Si = ({
2524
2523
  capabilities: e = {},
2525
2524
  renderMessageInputActions: t,
2526
2525
  renderConversationFooter: s,
@@ -2535,131 +2534,133 @@ const ki = ({
2535
2534
  onMessageSent: u,
2536
2535
  chatbotVotingEnabled: f = !1,
2537
2536
  viewerLanguage: c,
2537
+ renderHeaderTitleBadges: w,
2538
2538
  renderChannelBanner: b,
2539
- customChannelActions: w,
2540
- renderChannelActions: p,
2541
- renderMessage: v,
2542
- onMessageLinkClick: _,
2543
- showChannelInfo: R
2539
+ customChannelActions: p,
2540
+ renderChannelActions: v,
2541
+ renderMessage: _,
2542
+ onMessageLinkClick: L,
2543
+ showChannelInfo: T
2544
2544
  }) => {
2545
2545
  const {
2546
2546
  client: y,
2547
2547
  isConnected: M,
2548
- isLoading: D,
2549
- error: $,
2550
- refreshConnection: L,
2551
- service: N,
2552
- debug: I
2553
- } = Ps(), [S, F] = z(null), [T, E] = z(null), [A, O] = z(!1), { showDeleteConversation: B = !0 } = e, H = j(o);
2548
+ isLoading: $,
2549
+ error: P,
2550
+ refreshConnection: D,
2551
+ service: R,
2552
+ debug: N
2553
+ } = $s(), [A, S] = z(null), [I, E] = z(null), [O, F] = z(!1), { showDeleteConversation: j = !0 } = e, H = G(o);
2554
2554
  H.current = o;
2555
- const V = j(a);
2556
- V.current = a;
2557
- const Y = j(null), q = j(null);
2555
+ const Y = G(a);
2556
+ Y.current = a;
2557
+ const W = G(null), x = G(null);
2558
2558
  X(() => {
2559
- q.current = S;
2560
- }, [S]), X(() => {
2559
+ x.current = A;
2560
+ }, [A]), X(() => {
2561
2561
  if (!y || !M) return;
2562
- const P = y.userID;
2563
- if (!P) return;
2564
- const W = `${P}::${i}`;
2565
- if (Y.current === W) return;
2566
- Y.current = W;
2567
- const K = () => {
2568
- Y.current === W && (Y.current = null);
2562
+ const q = y.userID;
2563
+ if (!q) return;
2564
+ const K = `${q}::${i}`;
2565
+ if (W.current === K) return;
2566
+ W.current = K;
2567
+ const V = () => {
2568
+ W.current === K && (W.current = null);
2569
2569
  };
2570
2570
  (async () => {
2571
- var ee, ue;
2571
+ var de, ue;
2572
2572
  try {
2573
- I && console.log(
2573
+ N && console.log(
2574
2574
  "[MessagingShell] Loading initial conversation with:",
2575
2575
  i
2576
2576
  );
2577
- const Z = await y.queryChannels(
2577
+ const Q = await y.queryChannels(
2578
2578
  {
2579
2579
  type: "messaging",
2580
- members: { $eq: [P, i] }
2580
+ members: { $eq: [q, i] }
2581
2581
  },
2582
2582
  {},
2583
2583
  { limit: 1 }
2584
2584
  );
2585
- if (Z.length > 0) {
2586
- F(Z[0]), E(null), (ee = V.current) == null || ee.call(V, Z[0]), I && console.log(
2585
+ if (Q.length > 0) {
2586
+ S(Q[0]), E(null), (de = Y.current) == null || de.call(Y, Q[0]), N && console.log(
2587
2587
  "[MessagingShell] Initial conversation loaded:",
2588
- Z[0].id
2588
+ Q[0].id
2589
2589
  );
2590
2590
  return;
2591
2591
  }
2592
- const re = H.current;
2593
- if (!re || !N) {
2594
- K(), E("No conversation found with this account"), I && console.log(
2592
+ const ae = H.current;
2593
+ if (!ae || !R) {
2594
+ V(), E("No conversation found with this account"), N && console.log(
2595
2595
  "[MessagingShell] No conversation found for:",
2596
2596
  i
2597
2597
  );
2598
2598
  return;
2599
2599
  }
2600
2600
  try {
2601
- const te = await N.startChannelWithParticipant({
2602
- id: re.id,
2603
- name: re.name,
2604
- phone: re.phone
2601
+ const Z = await R.startChannelWithParticipant({
2602
+ id: ae.id,
2603
+ name: ae.name,
2604
+ phone: ae.phone
2605
2605
  });
2606
- F(te), E(null), (ue = V.current) == null || ue.call(V, te), I && console.log(
2606
+ S(Z), E(null), (ue = Y.current) == null || ue.call(Y, Z), N && console.log(
2607
2607
  "[MessagingShell] Channel created and loaded:",
2608
- te.id
2608
+ Z.id
2609
2609
  );
2610
- } catch (te) {
2610
+ } catch (Z) {
2611
2611
  console.error(
2612
2612
  "[MessagingShell] Failed to create conversation:",
2613
- te
2614
- ), K(), E("Failed to create conversation");
2613
+ Z
2614
+ ), V(), E("Failed to create conversation");
2615
2615
  }
2616
- } catch (Z) {
2616
+ } catch (Q) {
2617
2617
  console.error(
2618
2618
  "[MessagingShell] Failed to load initial conversation:",
2619
- Z
2620
- ), K(), q.current || E("Failed to load conversation");
2619
+ Q
2620
+ ), V(), x.current || E("Failed to load conversation");
2621
2621
  }
2622
2622
  })();
2623
- }, [i, y, M, N, I]);
2624
- const x = j(r);
2625
- x.current = r;
2626
- const k = J(() => {
2627
- var P;
2628
- F(null), O(!0), (P = x.current) == null || P.call(x);
2623
+ }, [i, y, M, R, N]);
2624
+ const C = G(r);
2625
+ C.current = r;
2626
+ const B = J(() => {
2627
+ var q;
2628
+ S(null), F(!0), (q = C.current) == null || q.call(C);
2629
2629
  }, []);
2630
- return D ? /* @__PURE__ */ n(Se, {}) : $ ? /* @__PURE__ */ n(be, { message: $, onBack: L }) : !M || !y ? /* @__PURE__ */ n(
2630
+ return $ ? /* @__PURE__ */ n(Se, {}) : P ? /* @__PURE__ */ n(be, { message: P, onBack: D }) : !M || !y ? /* @__PURE__ */ n(
2631
2631
  be,
2632
2632
  {
2633
2633
  message: "Not connected to messaging service",
2634
- onBack: L
2634
+ onBack: D
2635
2635
  }
2636
- ) : T ? /* @__PURE__ */ n(be, { message: T }) : A && !S ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : S ? /* @__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(
2636
+ ) : I ? /* @__PURE__ */ n(be, { message: I }) : O && !A ? /* @__PURE__ */ n(be, { message: "Conversation ended" }) : A ? /* @__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(
2637
2637
  un,
2638
2638
  {
2639
- channel: S,
2639
+ channel: A,
2640
2640
  renderMessageInputActions: t,
2641
2641
  renderConversationFooter: s,
2642
2642
  renderChannelBanner: b,
2643
- onLeaveConversation: k,
2644
- onBlockParticipant: k,
2643
+ onLeaveConversation: B,
2644
+ onBlockParticipant: B,
2645
2645
  CustomChannelEmptyState: l,
2646
- showDeleteConversation: B,
2646
+ showDeleteConversation: j,
2647
2647
  onBlockParticipantClick: d,
2648
2648
  onReportParticipantClick: m,
2649
2649
  dmAgentEnabled: g,
2650
2650
  onMessageSent: u,
2651
2651
  chatbotVotingEnabled: f,
2652
2652
  viewerLanguage: c,
2653
- customChannelActions: w,
2654
- renderChannelActions: p,
2655
- renderMessage: v,
2656
- onMessageLinkClick: _,
2657
- showChannelInfo: R
2653
+ renderHeaderTitleBadges: w,
2654
+ customChannelActions: p,
2655
+ renderChannelActions: v,
2656
+ renderMessage: _,
2657
+ onMessageLinkClick: L,
2658
+ showChannelInfo: T
2658
2659
  },
2659
- S.id
2660
+ A.id
2660
2661
  ) }) }) : /* @__PURE__ */ n(Se, {});
2661
2662
  };
2662
- function Qa(e) {
2663
+ function tr(e) {
2663
2664
  const t = e.state.pending_messages;
2664
2665
  if (t != null && t.length)
2665
2666
  for (const s of t)
@@ -2672,18 +2673,18 @@ const mn = U.createContext({
2672
2673
  debug: !1,
2673
2674
  renderMessagePreview: void 0,
2674
2675
  viewerLanguage: void 0
2675
- }), er = mn.Provider, tr = () => U.useContext(mn), nr = (e, t) => {
2676
+ }), nr = mn.Provider, sr = () => U.useContext(mn), ar = (e, t) => {
2676
2677
  const s = new Date(
2677
2678
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2678
2679
  ), r = new Date(
2679
2680
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2680
2681
  ).getTime() - s.getTime();
2681
2682
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2682
- }, sr = (e) => {
2683
+ }, rr = (e) => {
2683
2684
  const t = /* @__PURE__ */ new Date();
2684
2685
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2685
2686
  return "Just now";
2686
- const a = nr(e, t);
2687
+ const a = ar(e, t);
2687
2688
  return a === 0 ? e.toLocaleTimeString([], {
2688
2689
  hour: "numeric",
2689
2690
  minute: "2-digit",
@@ -2695,49 +2696,49 @@ const mn = U.createContext({
2695
2696
  });
2696
2697
  }, hn = U.memo(
2697
2698
  ({ channel: e, unread: t }) => {
2698
- var D, $, L;
2699
+ var $, P, D, R;
2699
2700
  const {
2700
2701
  selectedChannel: s,
2701
2702
  onChannelSelect: a,
2702
2703
  debug: r,
2703
2704
  renderMessagePreview: i,
2704
2705
  viewerLanguage: o
2705
- } = tr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2706
+ } = sr(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
2706
2707
  e && a(e);
2707
2708
  }, m = (N) => {
2708
- const I = N.key === "Enter" || N.key === " ", S = N.repeat;
2709
- !I || S || (N.preventDefault(), d());
2710
- }, u = Object.values(((D = e == null ? void 0 : e.state) == null ? void 0 : D.members) || {}).find(
2709
+ const A = N.key === "Enter" || N.key === " ", S = N.repeat;
2710
+ !A || S || (N.preventDefault(), d());
2711
+ }, u = Object.values((($ = e == null ? void 0 : e.state) == null ? void 0 : $.members) || {}).find(
2711
2712
  (N) => {
2712
- var I, S;
2713
- return ((I = N.user) == null ? void 0 : I.id) && N.user.id !== ((S = e == null ? void 0 : e._client) == null ? void 0 : S.userID);
2713
+ var A, S;
2714
+ return ((A = N.user) == null ? void 0 : A.id) && N.user.id !== ((S = e == null ? void 0 : e._client) == null ? void 0 : S.userID);
2714
2715
  }
2715
- ), f = Xt(u == null ? void 0 : u.user), c = ($ = u == null ? void 0 : u.user) == null ? void 0 : $.image, b = (() => {
2716
- var I;
2717
- const N = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
2716
+ ), f = Xt(u == null ? void 0 : u.user), c = (P = u == null ? void 0 : u.user) == null ? void 0 : P.image, w = ((D = u == null ? void 0 : u.user) == null ? void 0 : D.is_verified) === !0, b = (() => {
2717
+ var A;
2718
+ const N = (A = e == null ? void 0 : e.state) == null ? void 0 : A.messages;
2718
2719
  if (N != null && N.length) {
2719
2720
  for (let S = N.length - 1; S >= 0; S--)
2720
2721
  if (N[S].type !== "system") return N[S];
2721
2722
  }
2722
- })(), p = (() => {
2723
- var E, A, O, B;
2723
+ })(), v = (() => {
2724
+ var O, F, j, H;
2724
2725
  const N = Kt({
2725
2726
  message: b,
2726
2727
  viewerLanguage: o
2727
2728
  });
2728
- if (((E = b == null ? void 0 : b.metadata) == null ? void 0 : E.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2729
- if (((A = b == null ? void 0 : b.metadata) == null ? void 0 : A.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2730
- if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2729
+ if (((O = b == null ? void 0 : b.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_TIP") return N ? `💵 ${N}` : "💵 Sent a tip";
2730
+ if (((F = b == null ? void 0 : b.metadata) == null ? void 0 : F.custom_type) === "MESSAGE_PAID") return N ? `💰 ${N}` : "💰 Sent a message";
2731
+ if (((j = b == null ? void 0 : b.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT") return N ? `📎 ${N}` : "📎 Sent an attachment";
2731
2732
  if (N) return N;
2732
- const T = (B = b == null ? void 0 : b.attachments) == null ? void 0 : B[0];
2733
- return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2734
- })(), v = b != null && b.created_at ? sr(new Date(b.created_at)) : "", _ = b ? Ee(b) : !1, R = i ? i(b, p) : `${_ ? "✨ " : ""}${p}`, y = Wt(e), M = t ?? 0;
2733
+ const E = (H = b == null ? void 0 : b.attachments) == null ? void 0 : H[0];
2734
+ return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2735
+ })(), _ = b != null && b.created_at ? rr(new Date(b.created_at)) : "", L = b ? Ee(b) : !1, T = i ? i(b, v) : `${L ? "✨ " : ""}${v}`, y = Wt(e), M = t ?? 0;
2735
2736
  return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2736
2737
  channelId: e == null ? void 0 : e.id,
2737
2738
  isSelected: l,
2738
2739
  participantName: f,
2739
2740
  unreadCount: M,
2740
- hasTimestamp: !!v
2741
+ hasTimestamp: !!_
2741
2742
  }), /* @__PURE__ */ n(
2742
2743
  "div",
2743
2744
  {
@@ -2745,7 +2746,7 @@ const mn = U.createContext({
2745
2746
  tabIndex: 0,
2746
2747
  onClick: d,
2747
2748
  onKeyDown: m,
2748
- className: C(
2749
+ className: k(
2749
2750
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2750
2751
  {
2751
2752
  "bg-black/[0.04]": l,
@@ -2754,9 +2755,9 @@ const mn = U.createContext({
2754
2755
  ),
2755
2756
  children: /* @__PURE__ */ h("div", { className: "flex items-start gap-4", children: [
2756
2757
  /* @__PURE__ */ n(
2757
- ie,
2758
+ re,
2758
2759
  {
2759
- id: ((L = u == null ? void 0 : u.user) == null ? void 0 : L.id) || e.id || "unknown",
2760
+ id: ((R = u == null ? void 0 : u.user) == null ? void 0 : R.id) || e.id || "unknown",
2760
2761
  name: f,
2761
2762
  image: c,
2762
2763
  size: 48,
@@ -2765,22 +2766,15 @@ const mn = U.createContext({
2765
2766
  ),
2766
2767
  /* @__PURE__ */ h("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
2767
2768
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2", children: [
2768
- /* @__PURE__ */ h(
2769
- "h3",
2770
- {
2771
- className: C(
2772
- "text-sm font-medium truncate text-[#191918]"
2773
- ),
2774
- children: [
2775
- y && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2776
- f
2777
- ]
2778
- }
2779
- ),
2780
- v && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: v })
2769
+ /* @__PURE__ */ h("h3", { className: "flex min-w-0 items-center gap-1 text-sm font-medium text-[#191918]", children: [
2770
+ y && /* @__PURE__ */ n("span", { className: "sr-only", children: "Starred conversation. " }),
2771
+ /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: f }),
2772
+ w && /* @__PURE__ */ n(He, {})
2773
+ ] }),
2774
+ _ && /* @__PURE__ */ n("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
2781
2775
  ] }),
2782
2776
  /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
2783
- /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
2777
+ /* @__PURE__ */ n("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: T }),
2784
2778
  M > 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: M > 99 ? "99+" : M })
2785
2779
  ] })
2786
2780
  ] })
@@ -2790,14 +2784,14 @@ const mn = U.createContext({
2790
2784
  }
2791
2785
  );
2792
2786
  hn.displayName = "CustomChannelPreview";
2793
- const ar = { last_message_at: -1 }, rr = U.memo(
2787
+ const ir = { last_message_at: -1 }, or = U.memo(
2794
2788
  ({
2795
2789
  onChannelSelect: e,
2796
2790
  selectedChannel: t,
2797
2791
  filters: s,
2798
2792
  allowNewMessagesFromUnfilteredChannels: a = !1,
2799
2793
  channelRenderFilterFn: r,
2800
- sort: i = ar,
2794
+ sort: i = ir,
2801
2795
  className: o,
2802
2796
  customEmptyStateIndicator: l,
2803
2797
  renderMessagePreview: d,
@@ -2806,10 +2800,10 @@ const ar = { last_message_at: -1 }, rr = U.memo(
2806
2800
  const g = U.useRef(0);
2807
2801
  g.current++;
2808
2802
  const { debug: u = !1 } = Xe(), f = U.useCallback(
2809
- (b) => {
2810
- for (const w of b)
2811
- Qa(w);
2812
- return r ? r(b) : b;
2803
+ (w) => {
2804
+ for (const b of w)
2805
+ tr(b);
2806
+ return r ? r(w) : w;
2813
2807
  },
2814
2808
  [r]
2815
2809
  );
@@ -2837,11 +2831,11 @@ const ar = { last_message_at: -1 }, rr = U.memo(
2837
2831
  return /* @__PURE__ */ n(
2838
2832
  "div",
2839
2833
  {
2840
- className: C(
2834
+ className: k(
2841
2835
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2842
2836
  o
2843
2837
  ),
2844
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(er, { value: c, children: /* @__PURE__ */ n(
2838
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(nr, { value: c, children: /* @__PURE__ */ n(
2845
2839
  us,
2846
2840
  {
2847
2841
  filters: s,
@@ -2859,26 +2853,26 @@ const ar = { last_message_at: -1 }, rr = U.memo(
2859
2853
  );
2860
2854
  }
2861
2855
  );
2862
- rr.displayName = "ChannelList";
2863
- const ir = /^([a-z][a-z0-9+.-]*):/i, or = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2856
+ or.displayName = "ChannelList";
2857
+ const lr = /^([a-z][a-z0-9+.-]*):/i, cr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2864
2858
  function tt(e) {
2865
2859
  if (typeof e != "string") return;
2866
2860
  const t = e.trim();
2867
2861
  if (t === "") return;
2868
- const s = ir.exec(t);
2862
+ const s = lr.exec(t);
2869
2863
  if (s) {
2870
2864
  const a = s[1].toLowerCase();
2871
- return or.has(a) ? t : void 0;
2865
+ return cr.has(a) ? t : void 0;
2872
2866
  }
2873
2867
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2874
2868
  }
2875
- const lr = {
2869
+ const dr = {
2876
2870
  dark: "bg-white text-[#121110] hover:bg-white/90",
2877
2871
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2878
- }, cr = ({ variant: e, cta: t }) => {
2879
- const s = C(
2872
+ }, ur = ({ variant: e, cta: t }) => {
2873
+ const s = k(
2880
2874
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2881
- lr[e]
2875
+ dr[e]
2882
2876
  ), a = tt(t.href);
2883
2877
  return a ? /* @__PURE__ */ n(
2884
2878
  "a",
@@ -2905,10 +2899,10 @@ const lr = {
2905
2899
  children: t.label
2906
2900
  }
2907
2901
  );
2908
- }, dr = {
2902
+ }, mr = {
2909
2903
  dark: "text-white",
2910
2904
  light: "text-black/90"
2911
- }, ur = "text-white/30", mr = {
2905
+ }, hr = "text-white/30", fr = {
2912
2906
  dark: "text-white/55",
2913
2907
  light: "text-black/55"
2914
2908
  }, nt = ({
@@ -2921,14 +2915,14 @@ const lr = {
2921
2915
  cta: o,
2922
2916
  trailingAction: l
2923
2917
  }) => {
2924
- const d = e === "dark", m = t ?? (d ? s : void 0) ?? "", g = m.trim() !== "", u = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
2925
- if (!g && !u && !c && !b) return null;
2926
- const p = C(
2918
+ 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 !== "", w = o != null;
2919
+ if (!g && !u && !c && !w) return null;
2920
+ const p = k(
2927
2921
  "truncate text-base font-medium leading-6",
2928
- d && !t ? ur : dr[e]
2929
- ), v = C(
2922
+ d && !t ? hr : mr[e]
2923
+ ), v = k(
2930
2924
  "truncate text-xs leading-4",
2931
- mr[e]
2925
+ fr[e]
2932
2926
  );
2933
2927
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
2934
2928
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -2936,17 +2930,17 @@ const lr = {
2936
2930
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
2937
2931
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
2938
2932
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
2939
- /* @__PURE__ */ n("p", { className: C("min-w-0", p), children: m })
2933
+ /* @__PURE__ */ n("p", { className: k("min-w-0", p), children: m })
2940
2934
  ] }),
2941
2935
  u && /* @__PURE__ */ n("p", { className: v, children: a })
2942
2936
  ] }),
2943
- !b && c && /* @__PURE__ */ n("p", { className: v, children: f })
2937
+ !w && c && /* @__PURE__ */ n("p", { className: v, children: f })
2944
2938
  ] }),
2945
2939
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
2946
2940
  ] }),
2947
- o && /* @__PURE__ */ n(cr, { variant: e, cta: o })
2941
+ o && /* @__PURE__ */ n(ur, { variant: e, cta: o })
2948
2942
  ] });
2949
- }, hr = C(
2943
+ }, gr = k(
2950
2944
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2951
2945
  // 1px hairline border that sits flush with the card chrome — matches
2952
2946
  // the messaging design system's "small border around link attachments"
@@ -2964,8 +2958,8 @@ const lr = {
2964
2958
  bgClassName: l,
2965
2959
  "data-testid": d
2966
2960
  }) => {
2967
- const m = s != null || a != null, g = C(
2968
- hr,
2961
+ const m = s != null || a != null, g = k(
2962
+ gr,
2969
2963
  l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2970
2964
  // `focus-ring` is a design-system utility from the component-library
2971
2965
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2995,7 +2989,7 @@ const lr = {
2995
2989
  onClick: a,
2996
2990
  "aria-label": r,
2997
2991
  "data-testid": d,
2998
- className: C(g, "text-left"),
2992
+ className: k(g, "text-left"),
2999
2993
  children: [
3000
2994
  t,
3001
2995
  u
@@ -3013,15 +3007,15 @@ const lr = {
3013
3007
  ]
3014
3008
  }
3015
3009
  );
3016
- }, fr = {
3010
+ }, br = {
3017
3011
  dark: "bg-white/10",
3018
3012
  light: "bg-black/5"
3019
- }, gr = {
3013
+ }, pr = {
3020
3014
  dark: "size-16 text-white/25",
3021
3015
  light: "size-16 text-black/25"
3022
- }, Re = (e, t) => !!t && !!e && ae(e) === "audio", fn = (e, t) => {
3016
+ }, Re = (e, t) => !!t && !!e && se(e) === "audio", fn = (e, t) => {
3023
3017
  if (!t || !e) return !1;
3024
- const s = ae(e);
3018
+ const s = se(e);
3025
3019
  return s === "video" || s === "audio";
3026
3020
  }, st = "bg-[#F2F3F4]", Te = ({
3027
3021
  variant: e,
@@ -3032,7 +3026,7 @@ const lr = {
3032
3026
  topLeft: i,
3033
3027
  topRight: o
3034
3028
  }) => {
3035
- const l = ae(r), d = !!s && l === "video";
3029
+ const l = se(r), d = !!s && l === "video";
3036
3030
  return Re(r, s) ? /* @__PURE__ */ n("div", { className: "p-3", children: /* @__PURE__ */ n(
3037
3031
  "audio",
3038
3032
  {
@@ -3045,7 +3039,7 @@ const lr = {
3045
3039
  ) }) : /* @__PURE__ */ h(
3046
3040
  "div",
3047
3041
  {
3048
- className: C(
3042
+ className: k(
3049
3043
  "relative h-[180px] w-full overflow-hidden",
3050
3044
  d && "bg-black"
3051
3045
  ),
@@ -3072,12 +3066,12 @@ const lr = {
3072
3066
  ) : /* @__PURE__ */ n(
3073
3067
  "div",
3074
3068
  {
3075
- className: C(
3069
+ className: k(
3076
3070
  "flex h-full w-full items-center justify-center",
3077
- fr[e]
3071
+ br[e]
3078
3072
  ),
3079
- children: ce(r, {
3080
- className: gr[e],
3073
+ children: le(r, {
3074
+ className: pr[e],
3081
3075
  weight: "regular"
3082
3076
  })
3083
3077
  }
@@ -3087,7 +3081,7 @@ const lr = {
3087
3081
  ]
3088
3082
  }
3089
3083
  );
3090
- }, br = ({
3084
+ }, vr = ({
3091
3085
  title: e,
3092
3086
  placeholderTitle: t,
3093
3087
  description: s,
@@ -3101,7 +3095,7 @@ const lr = {
3101
3095
  onDismiss: g,
3102
3096
  onEditClick: u
3103
3097
  }) => {
3104
- const f = l === "classic", c = Re(r, o), b = g ? /* @__PURE__ */ n(
3098
+ const f = l === "classic", c = Re(r, o), w = g ? /* @__PURE__ */ n(
3105
3099
  "button",
3106
3100
  {
3107
3101
  type: "button",
@@ -3110,14 +3104,14 @@ const lr = {
3110
3104
  className: "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white",
3111
3105
  children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3112
3106
  }
3113
- ) : void 0, w = u ? /* @__PURE__ */ n(
3107
+ ) : void 0, b = u ? /* @__PURE__ */ n(
3114
3108
  "button",
3115
3109
  {
3116
3110
  type: "button",
3117
3111
  onClick: u,
3118
3112
  "aria-label": "Edit attachment",
3119
3113
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3120
- children: /* @__PURE__ */ n(Ls, { className: "size-5", weight: "regular" })
3114
+ children: /* @__PURE__ */ n(Ds, { className: "size-5", weight: "regular" })
3121
3115
  }
3122
3116
  ) : void 0;
3123
3117
  return c ? /* @__PURE__ */ n(Ie, { variant: "dark", bgClassName: st, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3130,12 +3124,12 @@ const lr = {
3130
3124
  mimeType: r
3131
3125
  }
3132
3126
  ) }),
3133
- b && /* @__PURE__ */ n("div", { className: "shrink-0", children: b })
3127
+ w && /* @__PURE__ */ n("div", { className: "shrink-0", children: w })
3134
3128
  ] }) }) : /* @__PURE__ */ h(
3135
3129
  Ie,
3136
3130
  {
3137
3131
  variant: "dark",
3138
- topRight: f ? b : void 0,
3132
+ topRight: f ? w : void 0,
3139
3133
  children: [
3140
3134
  !f && /* @__PURE__ */ n(
3141
3135
  Te,
@@ -3145,7 +3139,7 @@ const lr = {
3145
3139
  sourceUrl: o,
3146
3140
  title: e,
3147
3141
  mimeType: r,
3148
- topRight: b
3142
+ topRight: w
3149
3143
  }
3150
3144
  ),
3151
3145
  /* @__PURE__ */ n(
@@ -3158,13 +3152,13 @@ const lr = {
3158
3152
  url: a,
3159
3153
  appIcon: d,
3160
3154
  cta: m,
3161
- trailingAction: w
3155
+ trailingAction: b
3162
3156
  }
3163
3157
  )
3164
3158
  ]
3165
3159
  }
3166
3160
  );
3167
- }, pr = ({
3161
+ }, xr = ({
3168
3162
  title: e,
3169
3163
  description: t,
3170
3164
  url: s,
@@ -3176,7 +3170,7 @@ const lr = {
3176
3170
  cta: d,
3177
3171
  onClick: m
3178
3172
  }) => {
3179
- const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, b = Re(a, i) ? st : void 0, w = d && m ? {
3173
+ const g = fn(a, i), u = tt(s), f = d == null && u != null && !g ? u : void 0, c = d == null && !g ? m : void 0, w = Re(a, i) ? st : void 0, b = d && m ? {
3180
3174
  ...d,
3181
3175
  onClick: () => {
3182
3176
  var p;
@@ -3190,7 +3184,7 @@ const lr = {
3190
3184
  href: f,
3191
3185
  onClick: c,
3192
3186
  ariaLabel: e ?? "Open attachment preview",
3193
- bgClassName: b,
3187
+ bgClassName: w,
3194
3188
  "data-testid": "link-attachment",
3195
3189
  children: [
3196
3190
  o === "featured" && /* @__PURE__ */ n(
@@ -3211,13 +3205,13 @@ const lr = {
3211
3205
  description: t,
3212
3206
  url: s,
3213
3207
  appIcon: l,
3214
- cta: w
3208
+ cta: b
3215
3209
  }
3216
3210
  )
3217
3211
  ]
3218
3212
  }
3219
3213
  );
3220
- }, vr = ({
3214
+ }, wr = ({
3221
3215
  title: e,
3222
3216
  placeholderTitle: t,
3223
3217
  description: s,
@@ -3230,13 +3224,13 @@ const lr = {
3230
3224
  cta: m,
3231
3225
  onClick: g
3232
3226
  }) => {
3233
- const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0, b = m == null && !u && c != null ? g : void 0;
3227
+ const u = fn(r, o), f = tt(a), c = m == null && f != null && !u ? f : void 0, w = m == null && !u && c != null ? g : void 0;
3234
3228
  return /* @__PURE__ */ h(
3235
3229
  Ie,
3236
3230
  {
3237
3231
  variant: "dark",
3238
3232
  href: c,
3239
- onClick: b,
3233
+ onClick: w,
3240
3234
  bgClassName: Re(r, o) ? st : void 0,
3241
3235
  children: [
3242
3236
  l === "featured" && /* @__PURE__ */ n(
@@ -3264,20 +3258,20 @@ const lr = {
3264
3258
  ]
3265
3259
  }
3266
3260
  );
3267
- }, Ei = {
3268
- Composer: br,
3269
- Sent: vr,
3270
- Received: pr
3271
- }, xr = {
3261
+ }, Ii = {
3262
+ Composer: vr,
3263
+ Sent: wr,
3264
+ Received: xr
3265
+ }, _r = {
3272
3266
  dark: "bg-[#121110]",
3273
3267
  light: "bg-[#e9eaed]"
3274
- }, wr = {
3268
+ }, Nr = {
3275
3269
  dark: "text-white",
3276
3270
  light: "text-[#080707]"
3277
- }, _r = {
3271
+ }, yr = {
3278
3272
  dark: "border-white/[0.08]",
3279
3273
  light: "border-black/[0.08]"
3280
- }, Nr = (e) => e === "dark" ? "sender" : "receiver", yr = {
3274
+ }, Cr = (e) => e === "dark" ? "sender" : "receiver", kr = {
3281
3275
  sender: {
3282
3276
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3283
3277
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3299,13 +3293,13 @@ const lr = {
3299
3293
  children: i,
3300
3294
  "data-testid": o
3301
3295
  }) => {
3302
- const l = t != null && t !== "", d = yr[Nr(e)][a];
3296
+ const l = t != null && t !== "", d = kr[Cr(e)][a];
3303
3297
  return /* @__PURE__ */ h(
3304
3298
  "div",
3305
3299
  {
3306
3300
  "data-testid": o,
3307
3301
  "data-group-position": a,
3308
- className: C(
3302
+ className: k(
3309
3303
  // 280px-wide bubble — matches the mobile chat attachment width
3310
3304
  // and keeps the document / image / audio bubbles visually
3311
3305
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3314,10 +3308,10 @@ const lr = {
3314
3308
  // as the surrounding `CustomMessage` text bubbles.
3315
3309
  "relative w-[280px] overflow-hidden px-2 py-2",
3316
3310
  d,
3317
- xr[e],
3318
- wr[e],
3311
+ _r[e],
3312
+ Nr[e],
3319
3313
  s && "border",
3320
- s && _r[e],
3314
+ s && yr[e],
3321
3315
  r
3322
3316
  ),
3323
3317
  children: [
@@ -3325,7 +3319,7 @@ const lr = {
3325
3319
  l ? /* @__PURE__ */ n(
3326
3320
  "p",
3327
3321
  {
3328
- className: C(
3322
+ className: k(
3329
3323
  // No `text-*` / `font-*` overrides here — caption inherits
3330
3324
  // the same font family + size as `.str-chat__message-text`
3331
3325
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3354,22 +3348,22 @@ const lr = {
3354
3348
  a.stopPropagation(), e();
3355
3349
  },
3356
3350
  "aria-label": s,
3357
- className: C(
3351
+ className: k(
3358
3352
  "flex size-6 items-center justify-center rounded-full text-white",
3359
3353
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3360
3354
  ),
3361
3355
  children: /* @__PURE__ */ n(Me, { className: "size-3", weight: "bold" })
3362
3356
  }
3363
- ), Ne = (e) => e === "received" ? "light" : "dark", Si = ({
3357
+ ), Ne = (e) => e === "received" ? "light" : "dark", Ti = ({
3364
3358
  firstOfGroup: e,
3365
3359
  endOfGroup: t,
3366
3360
  groupedByUser: s
3367
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Cr = ({
3361
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Er = ({
3368
3362
  src: e,
3369
3363
  mimeType: t,
3370
3364
  filename: s,
3371
3365
  items: a
3372
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], kr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3366
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Sr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3373
3367
  /* @__PURE__ */ n(
3374
3368
  "audio",
3375
3369
  {
@@ -3392,7 +3386,7 @@ const lr = {
3392
3386
  preload: l,
3393
3387
  onDismiss: d
3394
3388
  }) => {
3395
- const m = Ne(e), g = e === "composer" && !!d, u = Cr({ src: t, mimeType: s, filename: a, items: r });
3389
+ const m = Ne(e), g = e === "composer" && !!d, u = Er({ src: t, mimeType: s, filename: a, items: r });
3396
3390
  if (u.length === 0)
3397
3391
  return null;
3398
3392
  const f = l ?? (u.length > 1 ? "none" : "metadata");
@@ -3403,30 +3397,30 @@ const lr = {
3403
3397
  text: i,
3404
3398
  groupPosition: o,
3405
3399
  "data-testid": "audio-attachment",
3406
- children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ n(
3407
- kr,
3400
+ children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, w) => /* @__PURE__ */ n(
3401
+ Sr,
3408
3402
  {
3409
3403
  item: c,
3410
3404
  preload: f,
3411
3405
  trailingAction: (
3412
3406
  // Composer only supports a single attachment, so the
3413
3407
  // dismiss control sits on the only player.
3414
- g && b === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
3408
+ g && w === 0 ? /* @__PURE__ */ n(_e, { onClick: d, variant: "inline" }) : void 0
3415
3409
  )
3416
3410
  },
3417
- `${c.src}-${b}`
3411
+ `${c.src}-${w}`
3418
3412
  )) })
3419
3413
  }
3420
3414
  );
3421
- }, Er = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Tr = {
3422
- Composer: Er,
3423
- Sent: Sr,
3424
- Received: Ir
3415
+ }, Ir = (e) => /* @__PURE__ */ n(at, { ...e, state: "composer" }), Tr = (e) => /* @__PURE__ */ n(at, { ...e, state: "sent" }), Ar = (e) => /* @__PURE__ */ n(at, { ...e, state: "received" }), Mr = {
3416
+ Composer: Ir,
3417
+ Sent: Tr,
3418
+ Received: Ar
3425
3419
  };
3426
- function Ar(e) {
3420
+ function Rr(e) {
3427
3421
  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`;
3428
3422
  }
3429
- const Mr = {
3423
+ const Lr = {
3430
3424
  pdf: "PDF",
3431
3425
  doc: "DOC",
3432
3426
  xls: "XLS",
@@ -3436,7 +3430,7 @@ const Mr = {
3436
3430
  text: "TXT",
3437
3431
  markdown: "MD"
3438
3432
  };
3439
- function Rr(e, t) {
3433
+ function Dr(e, t) {
3440
3434
  if (t) {
3441
3435
  const r = t.lastIndexOf(".");
3442
3436
  if (r > 0 && r < t.length - 1) {
@@ -3445,8 +3439,8 @@ function Rr(e, t) {
3445
3439
  }
3446
3440
  }
3447
3441
  if (!e) return;
3448
- if (ae(e) === "document") {
3449
- const r = Qt(e), i = Mr[r];
3442
+ if (se(e) === "document") {
3443
+ const r = Qt(e), i = Lr[r];
3450
3444
  if (i) return i;
3451
3445
  if (e === "application/octet-stream") return;
3452
3446
  }
@@ -3454,11 +3448,11 @@ function Rr(e, t) {
3454
3448
  if (!(!a || a === "*"))
3455
3449
  return a.toUpperCase();
3456
3450
  }
3457
- function Lr(e, t, s) {
3458
- const a = Rr(e, t), r = typeof s == "number" && s > 0 ? Ar(s) : void 0;
3451
+ function Pr(e, t, s) {
3452
+ const a = Dr(e, t), r = typeof s == "number" && s > 0 ? Rr(s) : void 0;
3459
3453
  return [a, r].filter(Boolean).join(" · ") || void 0;
3460
3454
  }
3461
- function Q(e) {
3455
+ function ee(e) {
3462
3456
  try {
3463
3457
  const s = new URL(e).pathname.split("/").pop();
3464
3458
  return s && s.length > 0 ? decodeURIComponent(s) : "download";
@@ -3466,13 +3460,13 @@ function Q(e) {
3466
3460
  return "download";
3467
3461
  }
3468
3462
  }
3469
- const Dr = {
3463
+ const Or = {
3470
3464
  dark: "text-white/55",
3471
3465
  light: "text-black/65"
3472
- }, Or = {
3466
+ }, zr = {
3473
3467
  dark: "bg-white/10",
3474
3468
  light: "bg-black/5"
3475
- }, Pr = {
3469
+ }, $r = {
3476
3470
  dark: "text-white/85",
3477
3471
  light: "text-black/85"
3478
3472
  }, gn = ({
@@ -3485,16 +3479,16 @@ const Dr = {
3485
3479
  activateLabel: o,
3486
3480
  trailingAction: l
3487
3481
  }) => {
3488
- const d = s ?? t ?? "File", m = Lr(a, t, r), g = /* @__PURE__ */ n(
3482
+ const d = s ?? t ?? "File", m = Pr(a, t, r), g = /* @__PURE__ */ n(
3489
3483
  "div",
3490
3484
  {
3491
- className: C(
3485
+ className: k(
3492
3486
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3493
- Or[e]
3487
+ zr[e]
3494
3488
  ),
3495
3489
  "aria-hidden": !0,
3496
- children: ce(a, {
3497
- className: C("size-6", Pr[e]),
3490
+ children: le(a, {
3491
+ className: k("size-6", $r[e]),
3498
3492
  weight: "regular"
3499
3493
  })
3500
3494
  }
@@ -3503,9 +3497,9 @@ const Dr = {
3503
3497
  m ? /* @__PURE__ */ n(
3504
3498
  "p",
3505
3499
  {
3506
- className: C(
3500
+ className: k(
3507
3501
  "truncate text-xs leading-4",
3508
- Dr[e]
3502
+ Or[e]
3509
3503
  ),
3510
3504
  children: m
3511
3505
  }
@@ -3516,7 +3510,7 @@ const Dr = {
3516
3510
  type: "button",
3517
3511
  onClick: i,
3518
3512
  "aria-label": o,
3519
- className: C(
3513
+ className: k(
3520
3514
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3521
3515
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3522
3516
  ),
@@ -3525,7 +3519,7 @@ const Dr = {
3525
3519
  u
3526
3520
  ]
3527
3521
  }
3528
- ) : /* @__PURE__ */ h(se, { children: [
3522
+ ) : /* @__PURE__ */ h(ne, { children: [
3529
3523
  g,
3530
3524
  u
3531
3525
  ] });
@@ -3535,7 +3529,7 @@ const Dr = {
3535
3529
  ] });
3536
3530
  };
3537
3531
  async function bn(e, t) {
3538
- const s = t ?? Q(e);
3532
+ const s = t ?? ee(e);
3539
3533
  try {
3540
3534
  const a = await fetch(e, { mode: "cors" });
3541
3535
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -3548,21 +3542,21 @@ async function bn(e, t) {
3548
3542
  }
3549
3543
  }
3550
3544
  }
3551
- const zr = ({
3545
+ const Fr = ({
3552
3546
  src: e,
3553
3547
  filename: t,
3554
3548
  fileSize: s,
3555
3549
  mimeType: a,
3556
3550
  title: r,
3557
3551
  items: i
3558
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], $r = ({
3552
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Br = ({
3559
3553
  variant: e,
3560
3554
  item: t,
3561
3555
  index: s,
3562
3556
  onActivate: a,
3563
3557
  trailingAction: r
3564
3558
  }) => {
3565
- const i = t.filename ?? Q(t.src);
3559
+ const i = t.filename ?? ee(t.src);
3566
3560
  return /* @__PURE__ */ n(
3567
3561
  gn,
3568
3562
  {
@@ -3589,26 +3583,26 @@ const zr = ({
3589
3583
  onClick: m,
3590
3584
  onDismiss: g
3591
3585
  }) => {
3592
- const u = Ne(e), f = e === "composer" && !!g, c = zr({
3586
+ const u = Ne(e), f = e === "composer" && !!g, c = Fr({
3593
3587
  src: t,
3594
3588
  filename: s,
3595
3589
  fileSize: a,
3596
3590
  mimeType: r,
3597
3591
  title: i,
3598
3592
  items: o
3599
- }), b = (p) => {
3593
+ }), w = (p) => {
3600
3594
  if ((m == null ? void 0 : m(p)) === !1) return;
3601
3595
  const v = c[p];
3602
3596
  if (!v) return;
3603
- const _ = v.filename ?? Q(v.src);
3597
+ const _ = v.filename ?? ee(v.src);
3604
3598
  bn(v.src, _);
3605
3599
  };
3606
3600
  if (c.length === 0)
3607
3601
  return null;
3608
- const w = /* @__PURE__ */ n(
3602
+ const b = /* @__PURE__ */ n(
3609
3603
  "span",
3610
3604
  {
3611
- className: C(
3605
+ className: k(
3612
3606
  "flex size-8 items-center justify-center rounded-full",
3613
3607
  u === "dark" ? "text-white/70" : "text-black/70"
3614
3608
  ),
@@ -3624,28 +3618,28 @@ const zr = ({
3624
3618
  groupPosition: d,
3625
3619
  "data-testid": "file-attachment",
3626
3620
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((p, v) => /* @__PURE__ */ n(
3627
- $r,
3621
+ Br,
3628
3622
  {
3629
3623
  variant: u,
3630
3624
  item: p,
3631
3625
  index: v,
3632
- onActivate: b,
3633
- trailingAction: f && v === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : w
3626
+ onActivate: w,
3627
+ trailingAction: f && v === 0 ? /* @__PURE__ */ n(_e, { onClick: g, variant: "inline" }) : b
3634
3628
  },
3635
3629
  `${p.src}-${v}`
3636
3630
  )) })
3637
3631
  }
3638
3632
  );
3639
- }, Fr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), Br = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), jr = {
3640
- Composer: Fr,
3641
- Sent: Br,
3642
- Received: Ur
3633
+ }, Ur = (e) => /* @__PURE__ */ n(rt, { ...e, state: "composer" }), jr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "sent" }), Vr = (e) => /* @__PURE__ */ n(rt, { ...e, state: "received" }), Gr = {
3634
+ Composer: Ur,
3635
+ Sent: jr,
3636
+ Received: Vr
3643
3637
  }, it = ({
3644
3638
  onPrev: e,
3645
3639
  onNext: t,
3646
3640
  prevLabel: s = "Previous",
3647
3641
  nextLabel: a = "Next"
3648
- }) => /* @__PURE__ */ h(se, { children: [
3642
+ }) => /* @__PURE__ */ h(ne, { children: [
3649
3643
  /* @__PURE__ */ n(
3650
3644
  "button",
3651
3645
  {
@@ -3653,7 +3647,7 @@ const zr = ({
3653
3647
  onClick: e,
3654
3648
  "aria-label": s,
3655
3649
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3656
- children: /* @__PURE__ */ n(Ds, { size: 20, weight: "bold", "aria-hidden": !0 })
3650
+ children: /* @__PURE__ */ n(Ps, { size: 20, weight: "bold", "aria-hidden": !0 })
3657
3651
  }
3658
3652
  ),
3659
3653
  /* @__PURE__ */ n(
@@ -3663,7 +3657,7 @@ const zr = ({
3663
3657
  onClick: t,
3664
3658
  "aria-label": a,
3665
3659
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
3666
- children: /* @__PURE__ */ n(Ve, { size: 20, weight: "bold", "aria-hidden": !0 })
3660
+ children: /* @__PURE__ */ n(Os, { size: 20, weight: "bold", "aria-hidden": !0 })
3667
3661
  }
3668
3662
  )
3669
3663
  ] }), pn = ({
@@ -3683,7 +3677,7 @@ const zr = ({
3683
3677
  }));
3684
3678
  },
3685
3679
  [l, e, t, o]
3686
- ), g = r ?? s !== "pill", f = { className: C(
3680
+ ), g = r ?? s !== "pill", f = { className: k(
3687
3681
  s === "pill" ? "size-4" : "size-5",
3688
3682
  "shrink-0"
3689
3683
  ), weight: "bold" };
@@ -3694,7 +3688,7 @@ const zr = ({
3694
3688
  onClick: m,
3695
3689
  disabled: l,
3696
3690
  "aria-label": a,
3697
- className: C(
3691
+ className: k(
3698
3692
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3699
3693
  {
3700
3694
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3734,7 +3728,7 @@ const zr = ({
3734
3728
  onClick: m,
3735
3729
  disabled: l,
3736
3730
  "aria-label": g ? a : void 0,
3737
- className: C(
3731
+ className: k(
3738
3732
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
3739
3733
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3740
3734
  ),
@@ -3785,7 +3779,7 @@ const zr = ({
3785
3779
  children: i,
3786
3780
  "data-testid": o
3787
3781
  }) => {
3788
- const l = j(null), d = j(null);
3782
+ const l = G(null), d = G(null);
3789
3783
  return X(() => {
3790
3784
  var f;
3791
3785
  const u = l.current;
@@ -3876,8 +3870,8 @@ const zr = ({
3876
3870
  length: t.length,
3877
3871
  initialIndex: s,
3878
3872
  open: e
3879
- }), l = t[r], d = ne(
3880
- () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "image"),
3873
+ }), l = t[r], d = te(
3874
+ () => (l == null ? void 0 : l.filename) ?? (l ? ee(l.src) : "image"),
3881
3875
  [l]
3882
3876
  );
3883
3877
  return l ? /* @__PURE__ */ h(
@@ -3922,7 +3916,7 @@ const zr = ({
3922
3916
  ]
3923
3917
  }
3924
3918
  ) : null;
3925
- }, Vr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
3919
+ }, Hr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", xn = ({
3926
3920
  tiles: e,
3927
3921
  onTileActivate: t,
3928
3922
  maxVisible: s = 4,
@@ -3931,14 +3925,14 @@ const zr = ({
3931
3925
  const r = e.length;
3932
3926
  if (r === 0) return null;
3933
3927
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, g) => {
3934
- const u = C(Vr, "h-full w-full");
3928
+ const u = k(Hr, "h-full w-full");
3935
3929
  return t ? /* @__PURE__ */ h(
3936
3930
  "button",
3937
3931
  {
3938
3932
  type: "button",
3939
3933
  onClick: () => t(m),
3940
3934
  "aria-label": d.ariaLabel ?? `Open media ${m + 1}`,
3941
- className: C(u, "cursor-zoom-in"),
3935
+ className: k(u, "cursor-zoom-in"),
3942
3936
  children: [
3943
3937
  d.content,
3944
3938
  g
@@ -3950,10 +3944,10 @@ const zr = ({
3950
3944
  g
3951
3945
  ] }, m);
3952
3946
  };
3953
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3947
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
3954
3948
  "div",
3955
3949
  {
3956
- className: C(
3950
+ className: k(
3957
3951
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
3958
3952
  a
3959
3953
  ),
@@ -3962,7 +3956,7 @@ const zr = ({
3962
3956
  ) : i.length === 3 ? /* @__PURE__ */ h(
3963
3957
  "div",
3964
3958
  {
3965
- className: C(
3959
+ className: k(
3966
3960
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3967
3961
  a
3968
3962
  ),
@@ -3975,7 +3969,7 @@ const zr = ({
3975
3969
  ) : /* @__PURE__ */ n(
3976
3970
  "div",
3977
3971
  {
3978
- className: C(
3972
+ className: k(
3979
3973
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
3980
3974
  a
3981
3975
  ),
@@ -4000,7 +3994,7 @@ const zr = ({
4000
3994
  [e]
4001
3995
  ), o = J(() => s(!1), []);
4002
3996
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4003
- }, Gr = (e, t, s, a) => ({
3997
+ }, Yr = (e, t, s, a) => ({
4004
3998
  ariaLabel: `Open image ${t + 1} of ${s}`,
4005
3999
  content: /* @__PURE__ */ n(
4006
4000
  "img",
@@ -4015,7 +4009,7 @@ const zr = ({
4015
4009
  className: "absolute inset-0 size-full rounded-md object-cover"
4016
4010
  }
4017
4011
  )
4018
- }), Hr = ({
4012
+ }), qr = ({
4019
4013
  src: e,
4020
4014
  alt: t,
4021
4015
  items: s
@@ -4023,7 +4017,7 @@ const zr = ({
4023
4017
  src: s.src,
4024
4018
  alt: s.alt,
4025
4019
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4026
- })), Yr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4020
+ })), Wr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4027
4021
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = ye(
4028
4022
  r
4029
4023
  );
@@ -4070,13 +4064,13 @@ const zr = ({
4070
4064
  loading: l = "lazy",
4071
4065
  onClick: d
4072
4066
  }) => {
4073
- const m = Hr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: b } = ye(
4067
+ const m = qr({ src: t, alt: s, items: r }), g = Ne(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: w } = ye(
4074
4068
  d
4075
4069
  );
4076
4070
  if (m.length === 0)
4077
4071
  return null;
4078
- const w = m.map(
4079
- (p, v) => Gr(p, v, m.length, l)
4072
+ const b = m.map(
4073
+ (p, v) => Yr(p, v, m.length, l)
4080
4074
  );
4081
4075
  return /* @__PURE__ */ h(
4082
4076
  we,
@@ -4086,24 +4080,24 @@ const zr = ({
4086
4080
  groupPosition: o,
4087
4081
  "data-testid": "image-attachment",
4088
4082
  children: [
4089
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: w, onTileActivate: c }) }),
4083
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(xn, { tiles: b, onTileActivate: c }) }),
4090
4084
  /* @__PURE__ */ n(
4091
4085
  vn,
4092
4086
  {
4093
4087
  open: u,
4094
4088
  items: wn(m, a),
4095
4089
  initialIndex: f,
4096
- onClose: b
4090
+ onClose: w
4097
4091
  }
4098
4092
  )
4099
4093
  ]
4100
4094
  }
4101
4095
  );
4102
- }, qr = (e) => /* @__PURE__ */ n(Yr, { ...e }), Wr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Kr = {
4103
- Composer: qr,
4104
- Sent: Wr,
4105
- Received: Xr
4106
- }, Jr = ({
4096
+ }, Xr = (e) => /* @__PURE__ */ n(Wr, { ...e }), Kr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "sent" }), Jr = (e) => /* @__PURE__ */ n(_n, { ...e, state: "received" }), Zr = {
4097
+ Composer: Xr,
4098
+ Sent: Kr,
4099
+ Received: Jr
4100
+ }, Qr = ({
4107
4101
  open: e,
4108
4102
  items: t,
4109
4103
  initialIndex: s = 0,
@@ -4113,11 +4107,11 @@ const zr = ({
4113
4107
  length: t.length,
4114
4108
  initialIndex: s,
4115
4109
  open: e
4116
- }), l = t[r], d = ne(
4117
- () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "document"),
4110
+ }), l = t[r], d = te(
4111
+ () => (l == null ? void 0 : l.filename) ?? (l ? ee(l.src) : "document"),
4118
4112
  [l]
4119
- ), m = ne(
4120
- () => l ? Zr(l.src) : void 0,
4113
+ ), m = te(
4114
+ () => l ? ei(l.src) : void 0,
4121
4115
  [l]
4122
4116
  );
4123
4117
  return !l || !m ? null : /* @__PURE__ */ h(
@@ -4151,23 +4145,23 @@ const zr = ({
4151
4145
  ]
4152
4146
  }
4153
4147
  );
4154
- }, Zr = (e) => {
4148
+ }, ei = (e) => {
4155
4149
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4156
4150
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4157
- }, Qr = ({
4151
+ }, ti = ({
4158
4152
  src: e,
4159
4153
  filename: t,
4160
4154
  fileSize: s,
4161
4155
  title: a,
4162
4156
  items: r
4163
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ei = ({
4157
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ni = ({
4164
4158
  variant: e,
4165
4159
  item: t,
4166
4160
  index: s,
4167
4161
  onActivate: a,
4168
4162
  trailingAction: r
4169
4163
  }) => {
4170
- const i = t.filename ?? Q(t.src);
4164
+ const i = t.filename ?? ee(t.src);
4171
4165
  return /* @__PURE__ */ n(
4172
4166
  gn,
4173
4167
  {
@@ -4193,14 +4187,14 @@ const zr = ({
4193
4187
  onClick: d,
4194
4188
  onDismiss: m
4195
4189
  }) => {
4196
- const g = Ne(e), u = Qr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = ye(
4190
+ const g = Ne(e), u = ti({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: b } = ye(
4197
4191
  d
4198
4192
  ), p = e === "composer" && !!m;
4199
4193
  if (u.length === 0)
4200
4194
  return null;
4201
4195
  const v = u.map((_) => ({
4202
4196
  src: _.src,
4203
- filename: _.filename ?? Q(_.src)
4197
+ filename: _.filename ?? ee(_.src)
4204
4198
  }));
4205
4199
  return /* @__PURE__ */ h(
4206
4200
  we,
@@ -4210,45 +4204,45 @@ const zr = ({
4210
4204
  groupPosition: l,
4211
4205
  "data-testid": "pdf-attachment",
4212
4206
  children: [
4213
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, R) => {
4214
- const y = _.filename ?? Q(_.src), M = p && R === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4207
+ /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((_, L) => {
4208
+ const T = _.filename ?? ee(_.src), y = p && L === 0 ? /* @__PURE__ */ n(_e, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4215
4209
  pn,
4216
4210
  {
4217
4211
  url: _.src,
4218
- filename: y,
4212
+ filename: T,
4219
4213
  variant: "inline",
4220
- label: `Download ${y}`,
4214
+ label: `Download ${T}`,
4221
4215
  tone: g
4222
4216
  }
4223
4217
  );
4224
4218
  return /* @__PURE__ */ n(
4225
- ei,
4219
+ ni,
4226
4220
  {
4227
4221
  variant: g,
4228
4222
  item: _,
4229
- index: R,
4230
- onActivate: b,
4231
- trailingAction: M
4223
+ index: L,
4224
+ onActivate: w,
4225
+ trailingAction: y
4232
4226
  },
4233
- `${_.src}-${R}`
4227
+ `${_.src}-${L}`
4234
4228
  );
4235
4229
  }) }),
4236
4230
  /* @__PURE__ */ n(
4237
- Jr,
4231
+ Qr,
4238
4232
  {
4239
4233
  open: f,
4240
4234
  items: v,
4241
4235
  initialIndex: c,
4242
- onClose: w
4236
+ onClose: b
4243
4237
  }
4244
4238
  )
4245
4239
  ]
4246
4240
  }
4247
4241
  );
4248
- }, ti = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), ni = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), ai = {
4249
- Composer: ti,
4250
- Sent: ni,
4251
- Received: si
4242
+ }, si = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), ai = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), ii = {
4243
+ Composer: si,
4244
+ Sent: ai,
4245
+ Received: ri
4252
4246
  }, Nn = ({
4253
4247
  open: e,
4254
4248
  items: t,
@@ -4259,8 +4253,8 @@ const zr = ({
4259
4253
  length: t.length,
4260
4254
  initialIndex: s,
4261
4255
  open: e
4262
- }), l = t[r], d = ne(
4263
- () => (l == null ? void 0 : l.filename) ?? (l ? Q(l.src) : "video"),
4256
+ }), l = t[r], d = te(
4257
+ () => (l == null ? void 0 : l.filename) ?? (l ? ee(l.src) : "video"),
4264
4258
  [l]
4265
4259
  );
4266
4260
  return l ? /* @__PURE__ */ h(
@@ -4299,7 +4293,7 @@ const zr = ({
4299
4293
  ]
4300
4294
  }
4301
4295
  ) : null;
4302
- }, 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(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
4296
+ }, oi = () => /* @__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(Ue, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), yn = ({
4303
4297
  item: e,
4304
4298
  index: t
4305
4299
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4321,11 +4315,11 @@ const zr = ({
4321
4315
  "aria-hidden": !0
4322
4316
  }
4323
4317
  ) }),
4324
- /* @__PURE__ */ n(ri, {})
4325
- ] }), ii = (e, t, s) => ({
4318
+ /* @__PURE__ */ n(oi, {})
4319
+ ] }), li = (e, t, s) => ({
4326
4320
  ariaLabel: `Play video ${t + 1} of ${s}`,
4327
4321
  content: /* @__PURE__ */ n(yn, { item: e, index: t })
4328
- }), oi = ({
4322
+ }), ci = ({
4329
4323
  src: e,
4330
4324
  poster: t,
4331
4325
  mimeType: s,
@@ -4337,7 +4331,7 @@ const zr = ({
4337
4331
  mimeType: s.mimeType,
4338
4332
  preload: s.preload,
4339
4333
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4340
- })), li = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4334
+ })), di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4341
4335
  const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: g } = ye(
4342
4336
  i
4343
4337
  );
@@ -4378,13 +4372,13 @@ const zr = ({
4378
4372
  preload: d,
4379
4373
  onClick: m
4380
4374
  }) => {
4381
- const g = oi({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = ye(
4375
+ const g = ci({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = Ne(e), { viewerOpen: f, viewerIndex: c, handleActivate: w, closeViewer: b } = ye(
4382
4376
  m
4383
4377
  );
4384
4378
  if (g.length === 0)
4385
4379
  return null;
4386
4380
  const p = g.map(
4387
- (v, _) => ii(v, _, g.length)
4381
+ (v, _) => li(v, _, g.length)
4388
4382
  );
4389
4383
  return /* @__PURE__ */ h(
4390
4384
  we,
@@ -4398,7 +4392,7 @@ const zr = ({
4398
4392
  xn,
4399
4393
  {
4400
4394
  tiles: p,
4401
- onTileActivate: b,
4395
+ onTileActivate: w,
4402
4396
  className: "overflow-hidden rounded-md"
4403
4397
  }
4404
4398
  ) }),
@@ -4408,23 +4402,23 @@ const zr = ({
4408
4402
  open: f,
4409
4403
  items: Cn(g, r),
4410
4404
  initialIndex: c,
4411
- onClose: w
4405
+ onClose: b
4412
4406
  }
4413
4407
  )
4414
4408
  ]
4415
4409
  }
4416
4410
  );
4417
- }, ci = (e) => /* @__PURE__ */ n(li, { ...e }), di = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), ui = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), mi = {
4418
- Composer: ci,
4419
- Sent: di,
4420
- Received: ui
4421
- }, Ii = {
4422
- Image: Kr,
4423
- Video: mi,
4424
- Audio: Tr,
4425
- Pdf: ai,
4426
- File: jr
4427
- }, hi = ({
4411
+ }, ui = (e) => /* @__PURE__ */ n(di, { ...e }), mi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "sent" }), hi = (e) => /* @__PURE__ */ n(kn, { ...e, state: "received" }), fi = {
4412
+ Composer: ui,
4413
+ Sent: mi,
4414
+ Received: hi
4415
+ }, Ai = {
4416
+ Image: Zr,
4417
+ Video: fi,
4418
+ Audio: Mr,
4419
+ Pdf: ii,
4420
+ File: Gr
4421
+ }, gi = ({
4428
4422
  question: e,
4429
4423
  onClick: t,
4430
4424
  loading: s = !1,
@@ -4436,7 +4430,7 @@ const zr = ({
4436
4430
  onClick: t,
4437
4431
  disabled: s,
4438
4432
  style: { backgroundColor: "#E6E5E3" },
4439
- className: C(
4433
+ className: k(
4440
4434
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4441
4435
  {
4442
4436
  "hover:brightness-95 active:brightness-90": !s,
@@ -4446,7 +4440,7 @@ const zr = ({
4446
4440
  ),
4447
4441
  children: e
4448
4442
  }
4449
- ), Ti = ({
4443
+ ), Mi = ({
4450
4444
  faqs: e,
4451
4445
  onFaqClick: t,
4452
4446
  loadingFaqId: s,
@@ -4458,7 +4452,7 @@ const zr = ({
4458
4452
  const l = e.filter((d) => d.enabled).sort((d, m) => (d.order ?? 0) - (m.order ?? 0));
4459
4453
  return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
4460
4454
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
4461
- ie,
4455
+ re,
4462
4456
  {
4463
4457
  id: o || "account",
4464
4458
  name: o || "Account",
@@ -4475,7 +4469,7 @@ const zr = ({
4475
4469
  children: [
4476
4470
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4477
4471
  l.map((d) => /* @__PURE__ */ n(
4478
- hi,
4472
+ gi,
4479
4473
  {
4480
4474
  question: d.question,
4481
4475
  onClick: () => t(d.id),
@@ -4490,37 +4484,38 @@ const zr = ({
4490
4484
  };
4491
4485
  export {
4492
4486
  en as A,
4493
- Hs as B,
4494
- Xa as C,
4495
- Ps as D,
4496
- Ti as F,
4497
- Ei as L,
4498
- yi as M,
4487
+ qs as B,
4488
+ Ja as C,
4489
+ $s as D,
4490
+ Mi as F,
4491
+ Ii as L,
4492
+ ki as M,
4493
+ He as V,
4499
4494
  ge as a,
4500
- ie as b,
4501
- rr as c,
4495
+ re as b,
4496
+ or as c,
4502
4497
  un as d,
4503
- Ci as e,
4504
- hi as f,
4505
- ae as g,
4498
+ Ei as e,
4499
+ gi as f,
4500
+ se as g,
4506
4501
  zt as h,
4507
- Ii as i,
4508
- Ca as j,
4509
- Ni as k,
4510
- ki as l,
4511
- Lr as m,
4512
- Ar as n,
4513
- sr as o,
4514
- Rr as p,
4502
+ Ai as i,
4503
+ Ea as j,
4504
+ Ci as k,
4505
+ Si as l,
4506
+ Pr as m,
4507
+ Rr as n,
4508
+ rr as o,
4509
+ Dr as p,
4515
4510
  Kt as q,
4516
- ce as r,
4511
+ le as r,
4517
4512
  sn as s,
4518
- $s as t,
4519
- Si as u,
4520
- Ys as v,
4513
+ Bs as t,
4514
+ Ti as u,
4515
+ Ws as v,
4521
4516
  Qe as w,
4522
4517
  et as x,
4523
4518
  Xt as y,
4524
- va as z
4519
+ wa as z
4525
4520
  };
4526
- //# sourceMappingURL=index-DKq7HA0h.js.map
4521
+ //# sourceMappingURL=index-DG5LOHey.js.map