@linktr.ee/messaging-react 3.5.5-rc-1782987115 → 3.5.5

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 (39) hide show
  1. package/dist/{Card-B6Jplpgi.js → Card-Bb26YfI4.js} +2 -2
  2. package/dist/{Card-B6Jplpgi.js.map → Card-Bb26YfI4.js.map} +1 -1
  3. package/dist/{Card-CwENIQHI.cjs → Card-BrKZ-lbW.cjs} +2 -2
  4. package/dist/{Card-CwENIQHI.cjs.map → Card-BrKZ-lbW.cjs.map} +1 -1
  5. package/dist/{Card-rMhzAqC4.js → Card-CHvZlG79.js} +2 -2
  6. package/dist/{Card-rMhzAqC4.js.map → Card-CHvZlG79.js.map} +1 -1
  7. package/dist/{Card-hIM2Pu2w.js → Card-DN-Wvpia.js} +3 -3
  8. package/dist/{Card-hIM2Pu2w.js.map → Card-DN-Wvpia.js.map} +1 -1
  9. package/dist/{Card-jw-FEk_j.cjs → Card-S1vPBCzV.cjs} +2 -2
  10. package/dist/{Card-jw-FEk_j.cjs.map → Card-S1vPBCzV.cjs.map} +1 -1
  11. package/dist/{Card-CH1lN2DQ.cjs → Card-vLf8WYOu.cjs} +2 -2
  12. package/dist/{Card-CH1lN2DQ.cjs.map → Card-vLf8WYOu.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-NSvs1btu.cjs → LockedThumbnail-BE4DGTl8.cjs} +2 -2
  14. package/dist/{LockedThumbnail-NSvs1btu.cjs.map → LockedThumbnail-BE4DGTl8.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-C68EUgjg.js → LockedThumbnail-Jl0brl9S.js} +3 -3
  16. package/dist/{LockedThumbnail-C68EUgjg.js.map → LockedThumbnail-Jl0brl9S.js.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-Bo9wjHNl.js → index-6Q-jnVFS.js} +587 -580
  19. package/dist/index-6Q-jnVFS.js.map +1 -0
  20. package/dist/index-Cjf7FPAs.cjs +2 -0
  21. package/dist/index-Cjf7FPAs.cjs.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +1 -1
  24. package/package.json +2 -2
  25. package/src/components/AttachmentCard/index.tsx +1 -1
  26. package/src/components/Avatar/getAvatarEmoji.test.ts +32 -0
  27. package/src/components/Avatar/getAvatarEmoji.ts +32 -19
  28. package/src/components/Avatar/index.tsx +6 -3
  29. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.tsx +1 -1
  30. package/src/components/CustomMessage/MessageAttachmentConversations.stories.tsx +1 -1
  31. package/src/components/CustomMessage/MessageTag.stories.tsx +2 -2
  32. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +1 -1
  33. package/src/components/LockedAttachment/components/_shared/LockedCardShell.tsx +1 -1
  34. package/src/components/MediaMessage/index.tsx +1 -1
  35. package/src/components/MessageAttachment/_shared/Bubble.tsx +3 -3
  36. package/src/styles.css +6 -51
  37. package/dist/index-Bo9wjHNl.js.map +0 -1
  38. package/dist/index-Bt9H9JKb.cjs +0 -2
  39. package/dist/index-Bt9H9JKb.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as h, Fragment as se } from "react/jsx-runtime";
2
- import F, { createContext as Xe, useContext as ye, useCallback as W, useState as $, useRef as H, useEffect as q, useId as Sn, useMemo as re, Suspense as Ke } from "react";
3
- import { StreamChatService as Tn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as An, LinkPreviewsManager as Dt } from "stream-chat";
5
- import { Chat as Mn, DateSeparator as Rn, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Ln, useMessageReminder as Dn, useComponentContext as Ht, Attachment as Pn, EditMessageModal as On, MessageBlocked as zn, MessageBouncePrompt as $n, MessageDeleted as Fn, MessageIsThreadReplyInChannelButtonIndicator as Bn, MessageRepliesCountButton as Un, ReminderNotification as jn, StreamedMessageText as Vn, messageHasAttachments as Gn, messageHasReactions as Hn, isDateSeparatorMessage as Yn, isMessageBlocked as qn, isMessageBounced as Wn, MessageBounceModal as Xn, MessageText as Pt, Poll as Kn, MessageErrorIcon as Jn, useMessageContext as ke, useMessageComposer as Zn, useStateStore as Qn, MessageInput as es, useMessageInputContext as ts, useMessageComposerHasSendableData as ns, AttachmentPreviewList as ss, QuotedMessagePreview as as, TextareaComposer as rs, MessageTimestamp as Fe, AIStates as Be, useTypingContext as is, useAIState as os, Channel as ls, WithComponents as cs, Window as ds, MessageList as us, ChannelList as ms, InfiniteScroll as hs } from "stream-chat-react";
6
- import { StarIcon as He, DotsThreeIcon as fs, SpinnerGapIcon as Ae, SignOutIcon as gs, ProhibitInsetIcon as Ot, FlagIcon as Yt, FileIcon as qt, ImageIcon as ps, SpeakerHighIcon as bs, VideoCameraIcon as Wt, FileMdIcon as vs, FileTextIcon as xs, FileZipIcon as ws, FilePptIcon as Ns, FileCsvIcon as _s, FileXlsIcon as ys, FileDocIcon as ks, FilePdfIcon as Cs, CircleNotchIcon as Ne, PlayIcon as Ye, PauseIcon as Es, LinkIcon as Is, DownloadSimpleIcon as _e, GiftIcon as Ss, ThumbsUpIcon as Ts, ThumbsDownIcon as As, TrashSimpleIcon as Ms, XIcon as Oe, ArrowUpIcon as Rs, SparkleIcon as ve, ProhibitIcon as Ls, ArrowLeftIcon as zt, CaretRightIcon as xe, PencilSimpleIcon as Ds, CaretLeftIcon as Ps } from "@phosphor-icons/react";
7
- import k from "classnames";
8
- import { MessageActions as Os, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
2
+ import $, { createContext as Xe, useContext as ye, useCallback as W, useState as F, useRef as H, useEffect as q, useId as Tn, useMemo as re, Suspense as Ke } from "react";
3
+ import { StreamChatService as An } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Mn, LinkPreviewsManager as Dt } from "stream-chat";
5
+ import { Chat as Rn, DateSeparator as Ln, useChannelStateContext as de, useChatContext as ue, areMessageUIPropsEqual as Dn, useMessageReminder as Pn, useComponentContext as Ht, Attachment as On, EditMessageModal as zn, MessageBlocked as Fn, MessageBouncePrompt as $n, MessageDeleted as Bn, MessageIsThreadReplyInChannelButtonIndicator as jn, MessageRepliesCountButton as Un, ReminderNotification as Vn, StreamedMessageText as Gn, messageHasAttachments as Hn, messageHasReactions as Yn, isDateSeparatorMessage as qn, isMessageBlocked as Wn, isMessageBounced as Xn, MessageBounceModal as Kn, MessageText as Pt, Poll as Jn, MessageErrorIcon as Zn, useMessageContext as Ce, useMessageComposer as Qn, useStateStore as es, MessageInput as ts, useMessageInputContext as ns, useMessageComposerHasSendableData as ss, AttachmentPreviewList as as, QuotedMessagePreview as rs, TextareaComposer as is, MessageTimestamp as $e, AIStates as Be, useTypingContext as os, useAIState as ls, Channel as cs, WithComponents as ds, Window as us, MessageList as ms, ChannelList as hs, InfiniteScroll as fs } from "stream-chat-react";
6
+ import { StarIcon as He, DotsThreeIcon as gs, SpinnerGapIcon as Ae, SignOutIcon as ps, ProhibitInsetIcon as Ot, FlagIcon as Yt, FileIcon as qt, ImageIcon as bs, SpeakerHighIcon as vs, VideoCameraIcon as Wt, FileMdIcon as xs, FileTextIcon as ws, FileZipIcon as Ns, FilePptIcon as _s, FileCsvIcon as ys, FileXlsIcon as Cs, FileDocIcon as ks, FilePdfIcon as Es, CircleNotchIcon as Ne, PlayIcon as Ye, PauseIcon as Is, LinkIcon as Ss, DownloadSimpleIcon as _e, GiftIcon as Ts, ThumbsUpIcon as As, ThumbsDownIcon as Ms, TrashSimpleIcon as Rs, XIcon as Oe, ArrowUpIcon as Ls, SparkleIcon as ve, ProhibitIcon as Ds, ArrowLeftIcon as zt, CaretRightIcon as xe, PencilSimpleIcon as Ps, CaretLeftIcon as Os } from "@phosphor-icons/react";
7
+ import C from "classnames";
8
+ import { MessageActions as zs, DefaultDropdownActionButton as Xt } from "stream-chat-react/experimental";
9
9
  const Kt = Xe({
10
10
  service: null,
11
11
  client: null,
@@ -16,7 +16,7 @@ const Kt = Xe({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), Je = () => ye(Kt), Ci = ({
19
+ }), Je = () => ye(Kt), Ii = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: s,
@@ -37,7 +37,7 @@ const Kt = Xe({
37
37
  serviceConfig: !!s,
38
38
  capabilities: Object.keys(r)
39
39
  });
40
- const [l, d] = $(null), [u, g] = $(null), [m, f] = $(!1), [c, b] = $(!1), [w, v] = $(null), p = H(!1), N = H(null), _ = H(s);
40
+ const [l, d] = F(null), [u, g] = F(null), [m, f] = F(!1), [c, b] = F(!1), [w, v] = F(null), p = H(!1), N = H(null), _ = H(s);
41
41
  _.current = s;
42
42
  const T = H(i);
43
43
  T.current = i;
@@ -63,7 +63,7 @@ const Kt = Xe({
63
63
  capabilities: r
64
64
  };
65
65
  const L = H(null);
66
- a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new An(a) });
66
+ a && ((A = L.current) == null ? void 0 : A.apiKey) !== a && (L.current = { apiKey: a, client: new Mn(a) });
67
67
  const D = a ? ((E = L.current) == null ? void 0 : E.client) ?? null : null;
68
68
  q(() => {
69
69
  const y = M.current, I = _.current;
@@ -78,7 +78,7 @@ const Kt = Xe({
78
78
  renderCount: y,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const z = new Tn({
81
+ const z = new An({
82
82
  ...I,
83
83
  apiKey: a,
84
84
  debug: T.current,
@@ -124,10 +124,10 @@ const Kt = Xe({
124
124
  clientId: O.userID
125
125
  });
126
126
  } catch (O) {
127
- const U = O instanceof Error ? O.message : "Connection failed";
128
- v(U), o("❌ USER CONNECTION ERROR", {
127
+ const j = O instanceof Error ? O.message : "Connection failed";
128
+ v(j), o("❌ USER CONNECTION ERROR", {
129
129
  userId: t.id,
130
- error: U
130
+ error: j
131
131
  });
132
132
  } finally {
133
133
  b(!1), p.current = !1, o("🔄 USER CONNECTION FINISHED", {
@@ -165,7 +165,7 @@ const Kt = Xe({
165
165
  } finally {
166
166
  b(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
167
167
  }
168
- }, [l, t, o]), C = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
168
+ }, [l, t, o]), k = $.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
169
169
  hasService: !!l,
170
170
  hasClient: !!u,
171
171
  isConnected: m,
@@ -195,9 +195,9 @@ const Kt = Xe({
195
195
  return o("🔄 RENDER END", {
196
196
  renderCount: M.current,
197
197
  willRenderChat: !!D,
198
- contextValueReady: !!C
199
- }), /* @__PURE__ */ n(Kt.Provider, { value: C, children: D ? /* @__PURE__ */ n(
200
- Mn,
198
+ contextValueReady: !!k
199
+ }), /* @__PURE__ */ n(Kt.Provider, { value: k, children: D ? /* @__PURE__ */ n(
200
+ Rn,
201
201
  {
202
202
  client: D,
203
203
  customClasses: {
@@ -206,9 +206,9 @@ const Kt = Xe({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, zs = () => Je(), Jt = (e) => {
209
+ }, Fs = () => Je(), Jt = (e) => {
210
210
  var a, r;
211
- const [t, s] = $(
211
+ const [t, s] = F(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
213
213
  );
214
214
  return q(() => {
@@ -228,14 +228,14 @@ const Kt = Xe({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, $s = "linktree-official", Fs = "linktree-official-sender";
231
+ }, $s = "linktree-official", Bs = "linktree-official-sender";
232
232
  function Ze(e, t, s) {
233
233
  const a = Object.values(e || {});
234
234
  if (s === $s) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var o;
238
- return ((o = i.user) == null ? void 0 : o.id) === Fs;
238
+ return ((o = i.user) == null ? void 0 : o.id) === Bs;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,46 +247,46 @@ function Ze(e, t, s) {
247
247
  }
248
248
  );
249
249
  }
250
- const Bs = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
250
+ const js = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
251
251
  function Us(e) {
252
- return Bs.test(e.trim());
252
+ return js.test(e.trim());
253
253
  }
254
- function $t(e, t) {
254
+ function Ft(e, t) {
255
255
  const s = e == null ? void 0 : e.trim();
256
256
  return !s || t && s === t ? !1 : !Us(s);
257
257
  }
258
258
  function Zt(e) {
259
- return $t(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : $t(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
259
+ return Ft(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Ft(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
260
260
  }
261
- const Ft = [
262
- "🍎",
261
+ const $t = [
262
+ { emoji: "🍎", bgColor: "#FFD1DD" },
263
263
  // Apple
264
- "🍌",
264
+ { emoji: "🍌", bgColor: "#FFF1C9" },
265
265
  // Banana
266
- "🍇",
266
+ { emoji: "🍇", bgColor: "#E6D9FF" },
267
267
  // Grape
268
- "🍊",
268
+ { emoji: "🍊", bgColor: "#D6F4FF" },
269
269
  // Orange
270
- "🍓",
270
+ { emoji: "🍓", bgColor: "#FFE0AE" },
271
271
  // Strawberry
272
- "🥥",
272
+ { emoji: "🥥", bgColor: "#F7E7D8" },
273
273
  // Coconut
274
- "🍒",
274
+ { emoji: "🍒", bgColor: "#DFF4D8" },
275
275
  // Cherry
276
- "🥭",
276
+ { emoji: "🥭", bgColor: "#FFD8C2" },
277
277
  // Mango
278
- "🍉",
278
+ { emoji: "🍉", bgColor: "#D6EBFF" },
279
279
  // Watermelon
280
- "🍋",
280
+ { emoji: "🍋", bgColor: "#CAEEB5" },
281
281
  // Lemon
282
- "🥝",
282
+ { emoji: "🥝", bgColor: "#FFE7C7" },
283
283
  // Kiwi
284
- "🫒",
284
+ { emoji: "🫒", bgColor: "#F6E3B4" },
285
285
  // Olive
286
- "🍈"
286
+ { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function js(e) {
289
+ function Vs(e) {
290
290
  let t = 0;
291
291
  for (let s = 0; s < e.length; s++) {
292
292
  const a = e.charCodeAt(s);
@@ -294,9 +294,14 @@ function js(e) {
294
294
  }
295
295
  return Math.abs(t);
296
296
  }
297
- function Vs(e) {
298
- const s = js(e) % Ft.length;
299
- return Ft[s];
297
+ function Qt(e) {
298
+ return $t[Vs(e) % $t.length];
299
+ }
300
+ function Gs(e) {
301
+ return Qt(e).emoji;
302
+ }
303
+ function Hs(e) {
304
+ return Qt(e).bgColor;
300
305
  }
301
306
  const ne = ({
302
307
  id: e,
@@ -307,7 +312,7 @@ const ne = ({
307
312
  shape: i = "squircle",
308
313
  dmAgentEnabled: o = !1
309
314
  }) => {
310
- const l = Vs(e), d = 0.45, g = s < 32 ? Math.round(s * d) : s < 56 ? 14 : s < 120 ? 18 : 36, m = s >= 40 ? 2 : 1, f = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, c = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: f, children: t ? /* @__PURE__ */ n(
315
+ const l = Gs(e), d = Hs(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, f = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n(
311
316
  "img",
312
317
  {
313
318
  src: t,
@@ -318,24 +323,26 @@ const ne = ({
318
323
  "div",
319
324
  {
320
325
  "aria-hidden": "true",
321
- className: k(
322
- "avatar-fallback flex h-full w-full items-center justify-center bg-[#E6E5E3] font-semibold select-none transition-colors"
326
+ className: C(
327
+ "avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
323
328
  ),
324
- style: { fontSize: g, lineHeight: 1 },
329
+ style: { fontSize: m, lineHeight: 1 },
325
330
  children: l
326
331
  }
327
332
  ) });
328
333
  return /* @__PURE__ */ h(
329
334
  "div",
330
335
  {
331
- className: k(
332
- "relative flex-shrink-0 !bg-transparent",
336
+ className: C(
337
+ "relative flex-shrink-0",
333
338
  a
334
339
  ),
335
340
  style: {
336
341
  "--str-chat__avatar-size": `${s}px`,
337
342
  width: `${s}px`,
338
- height: `${s}px`
343
+ height: `${s}px`,
344
+ backgroundColor: t ? void 0 : d,
345
+ ...c
339
346
  },
340
347
  children: [
341
348
  r && /* @__PURE__ */ n(
@@ -350,26 +357,26 @@ const ne = ({
350
357
  "div",
351
358
  {
352
359
  "data-testid": "avatar-ring",
353
- className: k(
360
+ className: C(
354
361
  "h-full w-full",
355
362
  "bg-transparent"
356
363
  ),
357
364
  style: {
358
- ...f,
365
+ ...c,
359
366
  ...o && {
360
- borderWidth: `${m}px`,
367
+ borderWidth: `${f}px`,
361
368
  borderStyle: "solid",
362
369
  borderColor: "var(--AI-Gradient, #7F22FE)",
363
370
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
364
371
  }
365
372
  },
366
- children: c
373
+ children: b
367
374
  }
368
375
  )
369
376
  ]
370
377
  }
371
378
  );
372
- }, Gs = "https://linktr.ee/s/about/trust-center/report", Hs = ({
379
+ }, Ys = "https://linktr.ee/s/about/trust-center/report", qs = ({
373
380
  channel: e,
374
381
  participant: t,
375
382
  showBlockParticipant: s = !0,
@@ -383,7 +390,7 @@ const ne = ({
383
390
  logLabel: g = "useChannelModerationActions"
384
391
  }) => {
385
392
  var A;
386
- const { service: m, debug: f } = Je(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, b = !!(a && s && m && c), [w, v] = $(!1), [p, N] = $(null), [_, T] = $(!1), [R, M] = $(!1), L = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
393
+ const { service: m, debug: f } = Je(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, b = !!(a && s && m && c), [w, v] = F(!1), [p, N] = F(null), [_, T] = F(!1), [R, M] = F(!1), L = b && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== m);
387
394
  return q(() => {
388
395
  if (!b || !m || !c) {
389
396
  v(!1), N(null);
@@ -453,7 +460,7 @@ const ne = ({
453
460
  }
454
461
  },
455
462
  handleReportUser: () => {
456
- d == null || d(), u == null || u(), window.open(Gs, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(Ys, "_blank", "noopener,noreferrer");
457
464
  }
458
465
  };
459
466
  }, be = ({
@@ -465,7 +472,7 @@ const ne = ({
465
472
  "button",
466
473
  {
467
474
  type: "button",
468
- className: k(
475
+ className: C(
469
476
  "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",
470
477
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
471
478
  t
@@ -487,7 +494,7 @@ const ne = ({
487
494
  customChannelActions: g,
488
495
  triggerClassName: m
489
496
  }) => {
490
- const [f, c] = $(!1), b = H(null), w = Sn(), v = W(() => c(!1), []), {
497
+ const [f, c] = F(!1), b = H(null), w = Tn(), v = W(() => c(!1), []), {
491
498
  isParticipantBlocked: p,
492
499
  isCheckingBlockedStatus: N,
493
500
  isLeaving: _,
@@ -496,7 +503,7 @@ const ne = ({
496
503
  handleBlockUser: M,
497
504
  handleUnblockUser: L,
498
505
  handleReportUser: D
499
- } = Hs({
506
+ } = qs({
500
507
  channel: e,
501
508
  participant: t,
502
509
  showBlockParticipant: a,
@@ -513,11 +520,11 @@ const ne = ({
513
520
  if (!f) return;
514
521
  const P = (A) => {
515
522
  b.current && !b.current.contains(A.target) && c(!1);
516
- }, C = (A) => {
523
+ }, k = (A) => {
517
524
  A.key === "Escape" && c(!1);
518
525
  };
519
- return document.addEventListener("mousedown", P), document.addEventListener("keydown", C), () => {
520
- document.removeEventListener("mousedown", P), document.removeEventListener("keydown", C);
526
+ return document.addEventListener("mousedown", P), document.addEventListener("keydown", k), () => {
527
+ document.removeEventListener("mousedown", P), document.removeEventListener("keydown", k);
521
528
  };
522
529
  }, [f]), !t || !(s || a || r || !!g) ? null : /* @__PURE__ */ h("div", { ref: b, className: "relative", children: [
523
530
  /* @__PURE__ */ h(
@@ -530,7 +537,7 @@ const ne = ({
530
537
  "aria-controls": f ? w : void 0,
531
538
  onClick: () => c((P) => !P),
532
539
  children: [
533
- /* @__PURE__ */ n(fs, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ n(gs, { className: "size-5 text-black/90" }),
534
541
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
535
542
  ]
536
543
  }
@@ -540,7 +547,7 @@ const ne = ({
540
547
  {
541
548
  id: w,
542
549
  "aria-label": "Conversation options",
543
- className: k(
550
+ className: C(
544
551
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
545
552
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
546
553
  ),
@@ -552,7 +559,7 @@ const ne = ({
552
559
  disabled: _,
553
560
  "aria-busy": _,
554
561
  children: [
555
- _ ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(gs, { className: "h-5 w-5" }),
562
+ _ ? /* @__PURE__ */ n(Ae, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ps, { className: "h-5 w-5" }),
556
563
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
557
564
  ]
558
565
  }
@@ -596,13 +603,13 @@ const ne = ({
596
603
  }
597
604
  )
598
605
  ] });
599
- }, Ys = (e) => /* @__PURE__ */ n(Rn, { ...e, position: "center" }), qe = "vote_up", We = "vote_down";
600
- function qs(e) {
606
+ }, Ws = (e) => /* @__PURE__ */ n(Ln, { ...e, position: "center" }), qe = "vote_up", We = "vote_down";
607
+ function Xs(e) {
601
608
  return e != null && e.length ? e.some((t) => t.type === We) ? "down" : e.some((t) => t.type === qe) ? "up" : null : null;
602
609
  }
603
- function Ws(e) {
610
+ function Ks(e) {
604
611
  const { channel: t } = de(), { client: s } = ue("useMessageVote"), a = re(
605
- () => qs(e.own_reactions),
612
+ () => Xs(e.own_reactions),
606
613
  [e.own_reactions]
607
614
  ), r = W(async () => {
608
615
  if (s != null && s.userID)
@@ -627,24 +634,24 @@ function Ws(e) {
627
634
  }, [t, s == null ? void 0 : s.userID, e.id, a]);
628
635
  return { selected: a, voteUp: r, voteDown: i };
629
636
  }
630
- function Xs(e) {
637
+ function Js(e) {
631
638
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
632
639
  }
633
- function Qt({
640
+ function en({
634
641
  message: e,
635
642
  viewerLanguage: t
636
643
  }) {
637
644
  var r;
638
- const s = e == null ? void 0 : e.text, a = Xs(t);
645
+ const s = e == null ? void 0 : e.text, a = Js(t);
639
646
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
640
647
  }
641
- const Ks = F.lazy(() => import("./Card-rMhzAqC4.js")), Js = F.lazy(() => import("./Card-B6Jplpgi.js")), Zs = F.lazy(() => import("./Card-hIM2Pu2w.js")), Qe = () => /* @__PURE__ */ n(
648
+ const Zs = $.lazy(() => import("./Card-CHvZlG79.js")), Qs = $.lazy(() => import("./Card-Bb26YfI4.js")), ea = $.lazy(() => import("./Card-DN-Wvpia.js")), Qe = () => /* @__PURE__ */ n(
642
649
  "div",
643
650
  {
644
651
  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)]",
645
652
  "aria-hidden": !0
646
653
  }
647
- ), Qs = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Ks, { ...e }) }), en = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Js, { ...e }) }), tn = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Zs, { ...e }) }), ea = en, ta = tn, Ut = { Composer: Qs, Sent: en, Received: tn, Creator: ea, Visitor: ta }, na = [
654
+ ), ta = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Zs, { ...e }) }), tn = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(Qs, { ...e }) }), nn = (e) => /* @__PURE__ */ n(Ke, { fallback: /* @__PURE__ */ n(Qe, {}), children: /* @__PURE__ */ n(ea, { ...e }) }), na = tn, sa = nn, jt = { Composer: ta, Sent: tn, Received: nn, Creator: na, Visitor: sa }, aa = [
648
655
  [/pdf/, "pdf"],
649
656
  [/wordprocessingml|msword|\.doc/, "doc"],
650
657
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -657,39 +664,39 @@ const Ks = F.lazy(() => import("./Card-rMhzAqC4.js")), Js = F.lazy(() => import(
657
664
  function ie(e) {
658
665
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
659
666
  }
660
- function nn(e) {
661
- const t = na.find(
667
+ function sn(e) {
668
+ const t = aa.find(
662
669
  ([s]) => s.test(e)
663
670
  );
664
671
  return t ? t[1] : "generic";
665
672
  }
666
- const sa = {
673
+ const ra = {
667
674
  video: Wt,
668
- audio: bs,
669
- image: ps,
675
+ audio: vs,
676
+ image: bs,
670
677
  document: qt
671
- }, aa = {
672
- pdf: Cs,
678
+ }, ia = {
679
+ pdf: Es,
673
680
  doc: ks,
674
- xls: ys,
675
- csv: _s,
676
- ppt: Ns,
677
- zip: ws,
678
- text: xs,
679
- markdown: vs,
681
+ xls: Cs,
682
+ csv: ys,
683
+ ppt: _s,
684
+ zip: Ns,
685
+ text: ws,
686
+ markdown: xs,
680
687
  generic: qt
681
688
  };
682
- function ra(e) {
689
+ function oa(e) {
683
690
  const t = ie(e);
684
- return t !== "document" ? sa[t] : aa[nn(e)];
691
+ return t !== "document" ? ra[t] : ia[sn(e)];
685
692
  }
686
693
  function ce(e, t) {
687
- return F.createElement(ra(e), t);
694
+ return $.createElement(oa(e), t);
688
695
  }
689
- const ia = (e) => {
696
+ const la = (e) => {
690
697
  var t, s;
691
698
  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;
692
- }, oa = ({
699
+ }, ca = ({
693
700
  source: e,
694
701
  mimeType: t,
695
702
  poster: s,
@@ -701,7 +708,7 @@ const ia = (e) => {
701
708
  muted: d = !1,
702
709
  onContainerClick: u
703
710
  }) => {
704
- const g = ie(t), m = H(null), f = H(null), c = H(null), b = H(r), [w, v] = $(a), [p, N] = $(0), [_, T] = $(!1), [R, M] = $(!1), [L, D] = $(!1), [B, P] = $(!1), [C, A] = $(!0), [E, y] = $(null), I = W(() => {
711
+ const g = ie(t), m = H(null), f = H(null), c = H(null), b = H(r), [w, v] = F(a), [p, N] = F(0), [_, T] = F(!1), [R, M] = F(!1), [L, D] = F(!1), [B, P] = F(!1), [k, A] = F(!0), [E, y] = F(null), I = W(() => {
705
712
  D(!1), v(!0);
706
713
  }, []), z = W((x) => {
707
714
  const S = f.current;
@@ -709,12 +716,12 @@ const ia = (e) => {
709
716
  const G = S.getBoundingClientRect();
710
717
  return Math.max(
711
718
  0,
712
- Math.min(1, (ia(x) - G.left) / G.width)
719
+ Math.min(1, (la(x) - G.left) / G.width)
713
720
  );
714
721
  }, []), O = W((x) => {
715
722
  const S = m.current;
716
723
  S && S.duration && (S.currentTime = x * S.duration);
717
- }, []), U = (x) => {
724
+ }, []), j = (x) => {
718
725
  x.stopPropagation(), T(!0);
719
726
  const S = z(x);
720
727
  N(S), O(S);
@@ -772,7 +779,7 @@ const ia = (e) => {
772
779
  }
773
780
  },
774
781
  children: [
775
- s && (g === "audio" || C) && /* @__PURE__ */ n(
782
+ s && (g === "audio" || k) && /* @__PURE__ */ n(
776
783
  "img",
777
784
  {
778
785
  src: s,
@@ -780,7 +787,7 @@ const ia = (e) => {
780
787
  className: "absolute inset-0 h-full w-full object-cover"
781
788
  }
782
789
  ),
783
- !s && (g === "audio" || C) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
790
+ !s && (g === "audio" || k) && /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: ce(t, {
784
791
  className: "size-12 text-black/20",
785
792
  weight: "regular"
786
793
  }) }),
@@ -862,8 +869,8 @@ const ia = (e) => {
862
869
  tabIndex: 0,
863
870
  ref: f,
864
871
  className: "relative flex h-4 w-full cursor-pointer items-center",
865
- onMouseDown: U,
866
- onTouchStart: U,
872
+ onMouseDown: j,
873
+ onTouchStart: j,
867
874
  onClick: (x) => x.stopPropagation(),
868
875
  onKeyDown: (x) => {
869
876
  x.key === "ArrowRight" && O(Math.min(1, p + 0.05)), x.key === "ArrowLeft" && O(Math.max(0, p - 0.05));
@@ -887,7 +894,7 @@ const ia = (e) => {
887
894
  },
888
895
  className: "shrink-0 text-white",
889
896
  "aria-label": w ? "Pause" : "Play",
890
- children: w ? /* @__PURE__ */ n(Es, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ye, { className: "size-5 translate-x-px", weight: "fill" })
897
+ children: w ? /* @__PURE__ */ n(Is, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Ye, { className: "size-5 translate-x-px", weight: "fill" })
891
898
  }
892
899
  ),
893
900
  /* @__PURE__ */ h(
@@ -901,8 +908,8 @@ const ia = (e) => {
901
908
  tabIndex: 0,
902
909
  ref: f,
903
910
  className: "relative flex h-4 w-full cursor-pointer items-center",
904
- onMouseDown: U,
905
- onTouchStart: U,
911
+ onMouseDown: j,
912
+ onTouchStart: j,
906
913
  onClick: (x) => x.stopPropagation(),
907
914
  onMouseEnter: () => M(!0),
908
915
  onMouseLeave: () => M(!1),
@@ -937,7 +944,7 @@ const ia = (e) => {
937
944
  ]
938
945
  }
939
946
  );
940
- }, jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", la = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", sn = ({
947
+ }, Ut = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", an = ({
941
948
  mimeType: e,
942
949
  sourceUrl: t,
943
950
  thumbnailUrl: s,
@@ -946,9 +953,9 @@ const ia = (e) => {
946
953
  mediaPlayerProps: i,
947
954
  containedImage: o = !1
948
955
  }) => {
949
- const l = ie(e), [d, u] = $(!1);
956
+ const l = ie(e), [d, u] = F(!1);
950
957
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
951
- oa,
958
+ ca,
952
959
  {
953
960
  source: t,
954
961
  mimeType: e,
@@ -995,11 +1002,11 @@ const ia = (e) => {
995
1002
  {
996
1003
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
997
1004
  children: ce(e, {
998
- className: jt(r),
1005
+ className: Ut(r),
999
1006
  weight: "regular"
1000
1007
  })
1001
1008
  }
1002
- ) : s ? /* @__PURE__ */ n("div", { className: `relative ${la(r)}`, children: /* @__PURE__ */ n(
1009
+ ) : s ? /* @__PURE__ */ n("div", { className: `relative ${da(r)}`, children: /* @__PURE__ */ n(
1003
1010
  "img",
1004
1011
  {
1005
1012
  src: s,
@@ -1012,12 +1019,12 @@ const ia = (e) => {
1012
1019
  {
1013
1020
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1014
1021
  children: ce(e, {
1015
- className: jt(r),
1022
+ className: Ut(r),
1016
1023
  weight: "regular"
1017
1024
  })
1018
1025
  }
1019
1026
  );
1020
- }, an = ({
1027
+ }, rn = ({
1021
1028
  variant: e,
1022
1029
  thumbnail: t,
1023
1030
  title: s,
@@ -1037,9 +1044,9 @@ const ia = (e) => {
1037
1044
  {
1038
1045
  ref: g,
1039
1046
  "data-testid": m,
1040
- className: k(
1047
+ className: C(
1041
1048
  "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)]",
1042
- f ? "bg-[#1e2330]" : "bg-white"
1049
+ f ? "bg-[#121110]" : "bg-white"
1043
1050
  ),
1044
1051
  children: [
1045
1052
  d ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
@@ -1049,7 +1056,7 @@ const ia = (e) => {
1049
1056
  c.trim() !== "" && /* @__PURE__ */ n(
1050
1057
  "p",
1051
1058
  {
1052
- className: k("mb-0.5 truncate text-base font-medium", {
1059
+ className: C("mb-0.5 truncate text-base font-medium", {
1053
1060
  "text-black": !f,
1054
1061
  "text-white/30": f && b,
1055
1062
  "text-white": f && !b
@@ -1059,7 +1066,7 @@ const ia = (e) => {
1059
1066
  ),
1060
1067
  /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center gap-1", children: [
1061
1068
  ce(r, {
1062
- className: k(
1069
+ className: C(
1063
1070
  "size-5 shrink-0",
1064
1071
  f ? "text-white/55" : "text-black/55"
1065
1072
  ),
@@ -1068,7 +1075,7 @@ const ia = (e) => {
1068
1075
  i != null && i !== "" && /* @__PURE__ */ n(
1069
1076
  "span",
1070
1077
  {
1071
- className: k(
1078
+ className: C(
1072
1079
  "text-xs font-medium",
1073
1080
  f ? "text-white/55" : "text-black/55"
1074
1081
  ),
@@ -1083,29 +1090,29 @@ const ia = (e) => {
1083
1090
  }
1084
1091
  );
1085
1092
  };
1086
- function rn(e) {
1093
+ function on(e) {
1087
1094
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1088
1095
  }
1089
1096
  function et(e) {
1090
- return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1097
+ 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)]`;
1091
1098
  }
1092
- function ca(e) {
1099
+ function ua(e) {
1093
1100
  return e ? "bg-white/10" : "bg-black/5";
1094
1101
  }
1095
- function da(e) {
1102
+ function ma(e) {
1096
1103
  return e ? "text-white" : "text-black";
1097
1104
  }
1098
- function ua(e) {
1105
+ function ha(e) {
1099
1106
  return e ? "text-white/55" : "text-black/55";
1100
1107
  }
1101
- function ma(e) {
1108
+ function fa(e) {
1102
1109
  return e ? "text-white/40" : "text-black/40";
1103
1110
  }
1104
- function ha(e) {
1111
+ function ga(e) {
1105
1112
  return e ? "text-white/20" : "text-black/20";
1106
1113
  }
1107
1114
  const tt = ({ attachment: e, isMyMessage: t }) => {
1108
- const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ h(F.Fragment, { children: [
1115
+ const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ h($.Fragment, { children: [
1109
1116
  /* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
1110
1117
  "img",
1111
1118
  {
@@ -1116,26 +1123,26 @@ const tt = ({ attachment: e, isMyMessage: t }) => {
1116
1123
  ) : /* @__PURE__ */ n(
1117
1124
  "div",
1118
1125
  {
1119
- className: `aspect-video w-full rounded-[20px] ${ca(t)} flex items-center justify-center`,
1120
- children: /* @__PURE__ */ n(Is, { className: `size-12 ${ha(t)}` })
1126
+ className: `aspect-video w-full rounded-[20px] ${ua(t)} flex items-center justify-center`,
1127
+ children: /* @__PURE__ */ n(Ss, { className: `size-12 ${ga(t)}` })
1121
1128
  }
1122
1129
  ) }),
1123
1130
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1124
- s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${da(t)}`, children: s }),
1125
- a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ua(t)}`, children: a }),
1126
- d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${ma(t)}`, children: d })
1131
+ s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ma(t)}`, children: s }),
1132
+ a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${ha(t)}`, children: a }),
1133
+ d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${fa(t)}`, children: d })
1127
1134
  ] })
1128
1135
  ] });
1129
1136
  return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ n("div", { className: "block", children: u });
1130
1137
  };
1131
- function on(e) {
1138
+ function ln(e) {
1132
1139
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1133
1140
  }
1134
1141
  function nt(e) {
1135
1142
  var t;
1136
- return (t = e.attachments) == null ? void 0 : t.find(on);
1143
+ return (t = e.attachments) == null ? void 0 : t.find(ln);
1137
1144
  }
1138
- async function fa(e, t) {
1145
+ async function pa(e, t) {
1139
1146
  let s;
1140
1147
  try {
1141
1148
  s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1147,11 +1154,11 @@ async function fa(e, t) {
1147
1154
  const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
1148
1155
  o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
1149
1156
  }
1150
- const ga = ({
1157
+ const ba = ({
1151
1158
  url: e,
1152
1159
  filename: t
1153
1160
  }) => {
1154
- const [s, a] = $(!1);
1161
+ const [s, a] = F(!1);
1155
1162
  return /* @__PURE__ */ n(
1156
1163
  "button",
1157
1164
  {
@@ -1159,7 +1166,7 @@ const ga = ({
1159
1166
  onClick: (i) => {
1160
1167
  i.stopPropagation();
1161
1168
  const o = window.open("", "_blank", "noopener,noreferrer");
1162
- a(!0), fa(e, t).then(() => {
1169
+ a(!0), pa(e, t).then(() => {
1163
1170
  o == null || o.close();
1164
1171
  }).catch(() => {
1165
1172
  o && (o.location.href = e);
@@ -1167,7 +1174,7 @@ const ga = ({
1167
1174
  },
1168
1175
  disabled: s,
1169
1176
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1170
- children: s ? /* @__PURE__ */ n(Ne, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(F.Fragment, { children: [
1177
+ children: s ? /* @__PURE__ */ n(Ne, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h($.Fragment, { children: [
1171
1178
  /* @__PURE__ */ n(_e, { className: "size-4 text-white", weight: "bold" }),
1172
1179
  "Download"
1173
1180
  ] })
@@ -1195,16 +1202,16 @@ function st(e) {
1195
1202
  thumbnailUrl: g
1196
1203
  };
1197
1204
  }
1198
- const ln = ({
1205
+ const cn = ({
1199
1206
  resolvedUrl: e,
1200
1207
  resolvedType: t,
1201
1208
  title: s,
1202
1209
  fileSize: a,
1203
1210
  thumbnailUrl: r
1204
1211
  }) => {
1205
- const i = a !== void 0 ? rn(a) : void 0;
1212
+ const i = a !== void 0 ? on(a) : void 0;
1206
1213
  return /* @__PURE__ */ n(
1207
- an,
1214
+ rn,
1208
1215
  {
1209
1216
  variant: "dark",
1210
1217
  title: s,
@@ -1212,7 +1219,7 @@ const ln = ({
1212
1219
  mimeType: t,
1213
1220
  detail: i,
1214
1221
  thumbnail: /* @__PURE__ */ n(
1215
- sn,
1222
+ an,
1216
1223
  {
1217
1224
  mimeType: t,
1218
1225
  sourceUrl: e,
@@ -1223,23 +1230,23 @@ const ln = ({
1223
1230
  )
1224
1231
  }
1225
1232
  );
1226
- }, cn = ({
1233
+ }, dn = ({
1227
1234
  resolvedUrl: e,
1228
1235
  resolvedType: t,
1229
1236
  title: s,
1230
1237
  fileSize: a,
1231
1238
  thumbnailUrl: r
1232
1239
  }) => {
1233
- const i = ie(t), o = a !== void 0 ? rn(a) : void 0;
1240
+ const i = ie(t), o = a !== void 0 ? on(a) : void 0;
1234
1241
  return /* @__PURE__ */ n(
1235
- an,
1242
+ rn,
1236
1243
  {
1237
1244
  variant: "light",
1238
1245
  title: s,
1239
1246
  mimeType: t,
1240
1247
  detail: o,
1241
1248
  thumbnail: /* @__PURE__ */ n(
1242
- sn,
1249
+ an,
1243
1250
  {
1244
1251
  mimeType: t,
1245
1252
  sourceUrl: e,
@@ -1249,10 +1256,10 @@ const ln = ({
1249
1256
  containedImage: i === "image" || i === "document"
1250
1257
  }
1251
1258
  ),
1252
- action: /* @__PURE__ */ n(ga, { url: e, filename: s })
1259
+ action: /* @__PURE__ */ n(ba, { url: e, filename: s })
1253
1260
  }
1254
1261
  );
1255
- }, pa = ({
1262
+ }, va = ({
1256
1263
  message: e,
1257
1264
  isMyMessage: t = !1
1258
1265
  }) => {
@@ -1277,40 +1284,40 @@ const ln = ({
1277
1284
  {
1278
1285
  className: "str-chat__message-bubble",
1279
1286
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1280
- children: s ? /* @__PURE__ */ n("div", { className: et(t), children: /* @__PURE__ */ n(tt, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(ln, { ...a }) : /* @__PURE__ */ n(cn, { ...a })
1287
+ children: s ? /* @__PURE__ */ n("div", { className: et(t), children: /* @__PURE__ */ n(tt, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(cn, { ...a }) : /* @__PURE__ */ n(dn, { ...a })
1281
1288
  }
1282
1289
  ) })
1283
1290
  }
1284
1291
  )
1285
1292
  ] });
1286
- }, ba = ({
1293
+ }, xa = ({
1287
1294
  message: e
1288
1295
  }) => {
1289
1296
  const t = nt(e);
1290
1297
  if (t)
1291
1298
  return /* @__PURE__ */ n("div", { className: et(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(tt, { attachment: t, isMyMessage: !0 }) });
1292
1299
  const s = st(e);
1293
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ln, { ...s }) }) : null;
1294
- }, va = ({
1300
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(cn, { ...s }) }) : null;
1301
+ }, wa = ({
1295
1302
  message: e
1296
1303
  }) => {
1297
1304
  const t = nt(e);
1298
1305
  if (t)
1299
1306
  return /* @__PURE__ */ n("div", { className: et(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(tt, { attachment: t, isMyMessage: !1 }) });
1300
1307
  const s = st(e);
1301
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(cn, { ...s }) }) : null;
1302
- }, Ei = Object.assign(pa, {
1303
- Creator: ba,
1304
- Visitor: va
1305
- }), xa = {
1308
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dn, { ...s }) }) : null;
1309
+ }, Si = Object.assign(va, {
1310
+ Creator: xa,
1311
+ Visitor: wa
1312
+ }), Na = {
1306
1313
  isUnlocking: () => !1
1307
- }, wa = {
1308
- LockedAttachment: xa
1309
- }, dn = Xe({}), Ii = dn.Provider;
1310
- function Na(e) {
1311
- return ye(dn)[e] ?? wa[e];
1314
+ }, _a = {
1315
+ LockedAttachment: Na
1316
+ }, un = Xe({}), Ti = un.Provider;
1317
+ function ya(e) {
1318
+ return ye(un)[e] ?? _a[e];
1312
1319
  }
1313
- const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1320
+ const Ca = ({ size: e = 15 }) => /* @__PURE__ */ n(
1314
1321
  "svg",
1315
1322
  {
1316
1323
  width: e,
@@ -1327,29 +1334,29 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1327
1334
  }
1328
1335
  )
1329
1336
  }
1330
- ), ya = (e) => {
1337
+ ), ka = (e) => {
1331
1338
  var t;
1332
1339
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
1333
- }, ka = (e) => {
1340
+ }, Ea = (e) => {
1334
1341
  var t;
1335
1342
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
1336
1343
  }, Re = (e) => {
1337
1344
  var t;
1338
1345
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
1339
- }, Ca = (e) => {
1346
+ }, Ia = (e) => {
1340
1347
  var t;
1341
1348
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
1342
- }, un = (e) => ya(e) || ka(e), Ea = (e) => {
1349
+ }, mn = (e) => ka(e) || Ea(e), Sa = (e) => {
1343
1350
  var t;
1344
- return un(e) && !((t = e.text) != null && t.trim());
1345
- }, Ue = ({
1351
+ return mn(e) && !((t = e.text) != null && t.trim());
1352
+ }, je = ({
1346
1353
  message: e,
1347
1354
  standalone: t = !1,
1348
1355
  isMyMessage: s = !1,
1349
1356
  hasAttachment: a = !1
1350
1357
  }) => {
1351
1358
  var m;
1352
- const r = un(e), i = Re(e);
1359
+ const r = mn(e), i = Re(e);
1353
1360
  if (!r && !i)
1354
1361
  return null;
1355
1362
  if (r) {
@@ -1357,7 +1364,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1357
1364
  if (!f) return null;
1358
1365
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${f} tip` : `Delivered with ${f} tip`;
1359
1366
  return /* @__PURE__ */ h("div", { className: c, children: [
1360
- /* @__PURE__ */ n(Ss, { size: t ? 14 : 12 }),
1367
+ /* @__PURE__ */ n(Ts, { size: t ? 14 : 12 }),
1361
1368
  /* @__PURE__ */ n("span", { children: b })
1362
1369
  ] });
1363
1370
  }
@@ -1365,7 +1372,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1365
1372
  "message-chatbot-indicator",
1366
1373
  s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
1367
1374
  o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
1368
- ].join(" "), u = /* @__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 }) });
1375
+ ].join(" "), u = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), g = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(Ca, { size: o ? 12 : 15 }) });
1369
1376
  return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(se, { children: [
1370
1377
  u,
1371
1378
  g
@@ -1373,7 +1380,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1373
1380
  g,
1374
1381
  u
1375
1382
  ] }) });
1376
- }, Ia = ({
1383
+ }, Ta = ({
1377
1384
  selected: e,
1378
1385
  onVoteUp: t,
1379
1386
  onVoteDown: s
@@ -1382,32 +1389,32 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1382
1389
  "button",
1383
1390
  {
1384
1391
  type: "button",
1385
- className: k("message-vote-button focus-ring", {
1392
+ className: C("message-vote-button focus-ring", {
1386
1393
  "message-vote-button--selected": e === "up"
1387
1394
  }),
1388
1395
  onClick: t,
1389
1396
  "aria-label": "Good response",
1390
1397
  "aria-pressed": e === "up",
1391
1398
  "data-tooltip": "Good response",
1392
- children: /* @__PURE__ */ n(Ts, { size: 16, weight: e === "up" ? "fill" : "regular" })
1399
+ children: /* @__PURE__ */ n(As, { size: 16, weight: e === "up" ? "fill" : "regular" })
1393
1400
  }
1394
1401
  ),
1395
1402
  /* @__PURE__ */ n(
1396
1403
  "button",
1397
1404
  {
1398
1405
  type: "button",
1399
- className: k("message-vote-button focus-ring", {
1406
+ className: C("message-vote-button focus-ring", {
1400
1407
  "message-vote-button--selected": e === "down"
1401
1408
  }),
1402
1409
  onClick: s,
1403
1410
  "aria-label": "Bad response",
1404
1411
  "aria-pressed": e === "down",
1405
1412
  "data-tooltip": "Bad response",
1406
- children: /* @__PURE__ */ n(As, { size: 16, weight: e === "down" ? "fill" : "regular" })
1413
+ children: /* @__PURE__ */ n(Ms, { size: 16, weight: e === "down" ? "fill" : "regular" })
1407
1414
  }
1408
1415
  )
1409
- ] }), Sa = (e) => {
1410
- var vt, xt, wt, Nt, _t, yt, kt, Ct, Et, It, St, Tt, At, Mt;
1416
+ ] }), Aa = (e) => {
1417
+ var vt, xt, wt, Nt, _t, yt, Ct, kt, Et, It, St, Tt, At, Mt;
1411
1418
  const {
1412
1419
  additionalMessageInputProps: t,
1413
1420
  chatbotVotingEnabled: s,
@@ -1425,40 +1432,40 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1425
1432
  renderText: b,
1426
1433
  threadList: w,
1427
1434
  viewerLanguage: v
1428
- } = e, { client: p } = ue("CustomMessage"), { channel: N } = de("CustomMessage"), { isUnlocking: _, onUnlockClick: T, onFetchSource: R, onDownloadClick: M } = Na("LockedAttachment"), [L, D] = $(!1), B = Dn(c.id), { selected: P, voteUp: C, voteDown: A } = Ws(c), {
1429
- Attachment: E = Pn,
1430
- EditMessageModal: y = On,
1435
+ } = e, { client: p } = ue("CustomMessage"), { channel: N } = de("CustomMessage"), { isUnlocking: _, onUnlockClick: T, onFetchSource: R, onDownloadClick: M } = ya("LockedAttachment"), [L, D] = F(!1), B = Pn(c.id), { selected: P, voteUp: k, voteDown: A } = Ks(c), {
1436
+ Attachment: E = On,
1437
+ EditMessageModal: y = zn,
1431
1438
  MessageActions: I,
1432
- MessageBlocked: z = zn,
1439
+ MessageBlocked: z = Fn,
1433
1440
  MessageBouncePrompt: O = $n,
1434
- MessageDeleted: U = Fn,
1435
- MessageIsThreadReplyInChannelButtonIndicator: X = Bn,
1441
+ MessageDeleted: j = Bn,
1442
+ MessageIsThreadReplyInChannelButtonIndicator: X = jn,
1436
1443
  MessageRepliesCountButton: Z = Un,
1437
- ReminderNotification: Y = jn,
1438
- StreamedMessageText: x = Vn,
1444
+ ReminderNotification: Y = Vn,
1445
+ StreamedMessageText: x = Gn,
1439
1446
  PinIndicator: S
1440
- } = Ht("CustomMessage"), G = Gn(c), V = Hn(c), Q = re(
1447
+ } = Ht("CustomMessage"), G = Hn(c), V = Yn(c), Q = re(
1441
1448
  () => m == null ? void 0 : m(c),
1442
1449
  [m, c]
1443
- ), j = re(() => {
1450
+ ), U = re(() => {
1444
1451
  const pe = c.attachments ?? [], Te = c.shared_location ? [c.shared_location, ...pe] : pe;
1445
1452
  if (!Re(c)) return Te;
1446
- const Rt = Te.filter((Lt) => !("type" in Lt) || !on(Lt));
1453
+ const Rt = Te.filter((Lt) => !("type" in Lt) || !ln(Lt));
1447
1454
  return Rt.length === Te.length ? Te : Rt;
1448
1455
  }, [c]), K = re(() => {
1449
- const pe = Qt({ message: c, viewerLanguage: v });
1456
+ const pe = en({ message: c, viewerLanguage: v });
1450
1457
  return pe === c.text ? c : { ...c, text: pe };
1451
1458
  }, [c, v]);
1452
- if (Yn(c))
1459
+ if (qn(c))
1453
1460
  return null;
1454
1461
  if (c.deleted_at || c.type === "deleted")
1455
- return /* @__PURE__ */ n(U, { message: c });
1456
- if (qn(c))
1462
+ return /* @__PURE__ */ n(j, { message: c });
1463
+ if (Wn(c))
1457
1464
  return /* @__PURE__ */ n(z, {});
1458
- const ee = !w && !!c.reply_count, me = !w && c.show_in_channel && c.parent_id, he = c.status === "failed" && ((vt = c.error) == null ? void 0 : vt.status) !== 403, fe = Wn(c);
1465
+ const ee = !w && !!c.reply_count, me = !w && c.show_in_channel && c.parent_id, he = c.status === "failed" && ((vt = c.error) == null ? void 0 : vt.status) !== 403, fe = Xn(c);
1459
1466
  let J;
1460
1467
  he ? J = () => u(c) : fe && (J = () => D(!0));
1461
- const te = f(), oe = k(
1468
+ const te = f(), oe = C(
1462
1469
  "str-chat__message str-chat__message-simple",
1463
1470
  `str-chat__message--${c.type}`,
1464
1471
  `str-chat__message--${c.status}`,
@@ -1475,7 +1482,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1475
1482
  "str-chat__virtual-message__wrapper--first": i,
1476
1483
  "str-chat__virtual-message__wrapper--group": o
1477
1484
  }
1478
- ), ft = c.poll_id && p.polls.fromState(c.poll_id), gt = Ea(c), ge = Re(c), pt = Ca(c), $e = !!(j != null && j.length && !c.quoted_message), bt = ge && te && $e;
1485
+ ), ft = c.poll_id && p.polls.fromState(c.poll_id), gt = Sa(c), ge = Re(c), pt = Ia(c), Fe = !!(U != null && U.length && !c.quoted_message), bt = ge && te && Fe;
1479
1486
  return /* @__PURE__ */ h(se, { children: [
1480
1487
  a && /* @__PURE__ */ n(
1481
1488
  y,
@@ -1484,7 +1491,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1484
1491
  }
1485
1492
  ),
1486
1493
  L && /* @__PURE__ */ n(
1487
- Xn,
1494
+ Kn,
1488
1495
  {
1489
1496
  MessageBouncePrompt: O,
1490
1497
  onClose: () => D(!1),
@@ -1515,7 +1522,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1515
1522
  /* @__PURE__ */ n(
1516
1523
  "div",
1517
1524
  {
1518
- className: k("str-chat__message-inner", {
1525
+ className: C("str-chat__message-inner", {
1519
1526
  "str-chat__simple-message--error-failed": he || fe
1520
1527
  }),
1521
1528
  "data-testid": "message-inner",
@@ -1533,21 +1540,21 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1533
1540
  te ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1534
1541
  I && /* @__PURE__ */ n(I, {}),
1535
1542
  /* @__PURE__ */ n(
1536
- Ut.Sent,
1543
+ jt.Sent,
1537
1544
  {
1538
1545
  title: (wt = c.metadata) == null ? void 0 : wt.attachment_title,
1539
1546
  mimeType: (Nt = c.metadata) == null ? void 0 : Nt.attachment_mime_type,
1540
1547
  thumbnailUrl: (_t = c.metadata) == null ? void 0 : _t.attachment_thumbnail,
1541
1548
  amountText: (yt = c.metadata) == null ? void 0 : yt.amount_text,
1542
- detail: (kt = c.metadata) == null ? void 0 : kt.attachment_detail,
1543
- paymentStatus: (Ct = c.metadata) == null ? void 0 : Ct.payment_status,
1549
+ detail: (Ct = c.metadata) == null ? void 0 : Ct.attachment_detail,
1550
+ paymentStatus: (kt = c.metadata) == null ? void 0 : kt.payment_status,
1544
1551
  onPreviewClick: () => T == null ? void 0 : T(c, N),
1545
1552
  onFetchSource: async () => await (R == null ? void 0 : R(c, N))
1546
1553
  }
1547
1554
  )
1548
1555
  ] }) : /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1549
1556
  /* @__PURE__ */ n(
1550
- Ut.Received,
1557
+ jt.Received,
1551
1558
  {
1552
1559
  title: (Et = c.metadata) == null ? void 0 : Et.attachment_title,
1553
1560
  mimeType: (It = c.metadata) == null ? void 0 : It.attachment_mime_type,
@@ -1572,22 +1579,22 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1572
1579
  ) })
1573
1580
  ] }) : gt ? (
1574
1581
  /* Tip-only messages render as a standalone bubble */
1575
- /* @__PURE__ */ n(Ue, { message: c, standalone: !0 })
1582
+ /* @__PURE__ */ n(je, { message: c, standalone: !0 })
1576
1583
  ) : /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
1577
1584
  ge && !bt && /* @__PURE__ */ n(
1578
- Ue,
1585
+ je,
1579
1586
  {
1580
1587
  message: c,
1581
- hasAttachment: $e,
1588
+ hasAttachment: Fe,
1582
1589
  isMyMessage: te
1583
1590
  }
1584
1591
  ),
1585
- ft && /* @__PURE__ */ n(Kn, { poll: ft }),
1586
- j != null && j.length && !c.quoted_message ? /* @__PURE__ */ n(
1592
+ ft && /* @__PURE__ */ n(Jn, { poll: ft }),
1593
+ U != null && U.length && !c.quoted_message ? /* @__PURE__ */ n(
1587
1594
  E,
1588
1595
  {
1589
1596
  actionHandler: l,
1590
- attachments: j
1597
+ attachments: U
1591
1598
  }
1592
1599
  ) : null,
1593
1600
  Q ? /* @__PURE__ */ n(
@@ -1603,24 +1610,24 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1603
1610
  renderText: b
1604
1611
  }
1605
1612
  ),
1606
- /* @__PURE__ */ n(Jn, {})
1613
+ /* @__PURE__ */ n(Zn, {})
1607
1614
  ] }) })
1608
1615
  }
1609
1616
  ),
1610
1617
  !pt && !gt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
1611
1618
  (!ge || bt) && /* @__PURE__ */ n(
1612
- Ue,
1619
+ je,
1613
1620
  {
1614
1621
  message: c,
1615
- hasAttachment: $e,
1622
+ hasAttachment: Fe,
1616
1623
  isMyMessage: te
1617
1624
  }
1618
1625
  ),
1619
1626
  s && ge && /* @__PURE__ */ n(
1620
- Ia,
1627
+ Ta,
1621
1628
  {
1622
1629
  selected: P,
1623
- onVoteUp: C,
1630
+ onVoteUp: k,
1624
1631
  onVoteDown: A
1625
1632
  }
1626
1633
  )
@@ -1638,15 +1645,15 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1638
1645
  c.id
1639
1646
  )
1640
1647
  ] });
1641
- }, Ta = F.memo(
1642
- Sa,
1643
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ln(e, t)
1644
- ), Aa = (e) => {
1645
- const t = ke("CustomMessage");
1646
- return /* @__PURE__ */ n(Ta, { ...t, ...e });
1647
- }, Ma = () => {
1648
+ }, Ma = $.memo(
1649
+ Aa,
1650
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Dn(e, t)
1651
+ ), Ra = (e) => {
1652
+ const t = Ce("CustomMessage");
1653
+ return /* @__PURE__ */ n(Ma, { ...t, ...e });
1654
+ }, La = () => {
1648
1655
  var s;
1649
- const { handleDelete: e, message: t } = ke("CustomMessageActions");
1656
+ const { handleDelete: e, message: t } = Ce("CustomMessageActions");
1650
1657
  return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
1651
1658
  Xt,
1652
1659
  {
@@ -1654,11 +1661,11 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1654
1661
  "aria-label": "Delete",
1655
1662
  title: "Delete",
1656
1663
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
1657
- children: /* @__PURE__ */ n(Ms, { size: 16, weight: "light", "aria-hidden": !0 })
1664
+ children: /* @__PURE__ */ n(Rs, { size: 16, weight: "light", "aria-hidden": !0 })
1658
1665
  }
1659
1666
  );
1660
- }, Ra = () => {
1661
- const { handleFlag: e } = ke("CustomMessageActions");
1667
+ }, Da = () => {
1668
+ const { handleFlag: e } = Ce("CustomMessageActions");
1662
1669
  return /* @__PURE__ */ n(
1663
1670
  Xt,
1664
1671
  {
@@ -1669,19 +1676,19 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1669
1676
  children: /* @__PURE__ */ n(Yt, { size: 16, weight: "light", "aria-hidden": !0 })
1670
1677
  }
1671
1678
  );
1672
- }, La = () => {
1679
+ }, Pa = () => {
1673
1680
  var t;
1674
- const { message: e } = ke("CustomMessageActions");
1681
+ const { message: e } = Ce("CustomMessageActions");
1675
1682
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
1676
- Os,
1683
+ zs,
1677
1684
  {
1678
1685
  messageActionSet: [
1679
- { Component: Ma, placement: "quick", type: "delete" },
1680
- { Component: Ra, placement: "quick", type: "flag" }
1686
+ { Component: La, placement: "quick", type: "delete" },
1687
+ { Component: Da, placement: "quick", type: "flag" }
1681
1688
  ]
1682
1689
  }
1683
1690
  );
1684
- }, Da = ({
1691
+ }, Oa = ({
1685
1692
  link: e,
1686
1693
  onDismiss: t
1687
1694
  }) => {
@@ -1692,7 +1699,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1692
1699
  href: s,
1693
1700
  target: "_blank",
1694
1701
  rel: "noopener noreferrer",
1695
- className: "relative block w-full rounded-[24px] bg-[#1e2330] p-2 no-underline transition-opacity hover:opacity-90",
1702
+ className: "relative block w-full rounded-[24px] bg-[#121110] p-2 no-underline transition-opacity hover:opacity-90",
1696
1703
  children: [
1697
1704
  r && /* @__PURE__ */ n(
1698
1705
  "img",
@@ -1721,26 +1728,26 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1721
1728
  ]
1722
1729
  }
1723
1730
  );
1724
- }, Pa = (e) => ({
1731
+ }, za = (e) => ({
1725
1732
  linkPreviews: Array.from(e.previews.values()).filter(
1726
1733
  (t) => Dt.previewIsLoaded(t) || Dt.previewIsLoading(t)
1727
1734
  )
1728
- }), Oa = () => {
1729
- const { linkPreviewsManager: e } = Zn(), { linkPreviews: t } = Qn(
1735
+ }), Fa = () => {
1736
+ const { linkPreviewsManager: e } = Qn(), { linkPreviews: t } = es(
1730
1737
  e.state,
1731
- Pa
1738
+ za
1732
1739
  ), s = (r) => {
1733
1740
  e.dismissPreview(r);
1734
1741
  };
1735
1742
  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(
1736
- Da,
1743
+ Oa,
1737
1744
  {
1738
1745
  link: r,
1739
1746
  onDismiss: s
1740
1747
  },
1741
1748
  r.og_scrape_url
1742
1749
  )) }) : null;
1743
- }, at = F.createContext(!1), Si = () => ye(at), za = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1750
+ }, at = $.createContext(!1), Ai = () => ye(at), $a = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
1744
1751
  "button",
1745
1752
  {
1746
1753
  ...s,
@@ -1748,12 +1755,12 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1748
1755
  "aria-label": "Send",
1749
1756
  disabled: t,
1750
1757
  onClick: e,
1751
- children: /* @__PURE__ */ n(Rs, { weight: "bold", className: "size-4" })
1758
+ children: /* @__PURE__ */ n(Ls, { weight: "bold", className: "size-4" })
1752
1759
  }
1753
- ), $a = () => {
1754
- const e = ye(at), { handleSubmit: t } = ts(), s = ns(), a = e || !s, {
1755
- SendButton: r = za,
1756
- AttachmentPreviewList: i = ss
1760
+ ), Ba = () => {
1761
+ const e = ye(at), { handleSubmit: t } = ns(), s = ss(), a = e || !s, {
1762
+ SendButton: r = $a,
1763
+ AttachmentPreviewList: i = as
1757
1764
  } = Ht("CustomMessageInput");
1758
1765
  return /* @__PURE__ */ h(
1759
1766
  "div",
@@ -1761,12 +1768,12 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1761
1768
  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)]",
1762
1769
  "data-dd-privacy": "mask",
1763
1770
  children: [
1764
- /* @__PURE__ */ n(as, {}),
1765
- /* @__PURE__ */ n(Oa, {}),
1771
+ /* @__PURE__ */ n(rs, {}),
1772
+ /* @__PURE__ */ n(Fa, {}),
1766
1773
  /* @__PURE__ */ n(i, {}),
1767
1774
  /* @__PURE__ */ h("div", { className: "flex", children: [
1768
1775
  /* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
1769
- rs,
1776
+ is,
1770
1777
  {
1771
1778
  "aria-disabled": e || void 0,
1772
1779
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -1791,7 +1798,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1791
1798
  ]
1792
1799
  }
1793
1800
  );
1794
- }, Fa = ({
1801
+ }, ja = ({
1795
1802
  renderActions: e,
1796
1803
  renderFooter: t,
1797
1804
  disabled: s = !1,
@@ -1812,23 +1819,23 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1812
1819
  className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
1813
1820
  children: [
1814
1821
  e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
1815
- /* @__PURE__ */ n(at.Provider, { value: o, children: /* @__PURE__ */ n(es, { Input: r ?? $a }) })
1822
+ /* @__PURE__ */ n(at.Provider, { value: o, children: /* @__PURE__ */ n(ts, { Input: r ?? Ba }) })
1816
1823
  ]
1817
1824
  }
1818
1825
  ),
1819
1826
  t == null ? void 0 : t()
1820
1827
  ] });
1821
- }, Ba = [
1828
+ }, Ua = [
1822
1829
  "SYSTEM_DM_AGENT_PAUSED",
1823
1830
  "SYSTEM_DM_AGENT_RESUMED"
1824
- ], Ua = {
1831
+ ], Va = {
1825
1832
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
1826
1833
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
1827
- }, ja = [
1834
+ }, Ga = [
1828
1835
  "SYSTEM_AGE_SAFETY_BLOCKED"
1829
- ], Va = {
1836
+ ], Ha = {
1830
1837
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
1831
- }, je = "age safety guidelines.", Ga = "https://linktr.ee/s/about/contact", Vt = (e) => Ba.includes(e), Ha = (e) => ja.includes(e), Ya = (e) => {
1838
+ }, Ue = "age safety guidelines.", Ya = "https://linktr.ee/s/about/contact", Vt = (e) => Ua.includes(e), qa = (e) => Ga.includes(e), Wa = (e) => {
1832
1839
  var a;
1833
1840
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
1834
1841
  if (Vt(t))
@@ -1836,7 +1843,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1836
1843
  kind: "dm-agent",
1837
1844
  type: t
1838
1845
  };
1839
- if (Ha(t))
1846
+ if (qa(t))
1840
1847
  return {
1841
1848
  kind: "age-safety",
1842
1849
  type: t
@@ -1847,32 +1854,32 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1847
1854
  kind: "dm-agent",
1848
1855
  type: s
1849
1856
  };
1850
- }, qa = (e) => {
1851
- const t = e.indexOf(je);
1857
+ }, Xa = (e) => {
1858
+ const t = e.indexOf(Ue);
1852
1859
  if (t === -1)
1853
1860
  return e;
1854
- const s = t + je.length;
1861
+ const s = t + Ue.length;
1855
1862
  return /* @__PURE__ */ h(se, { children: [
1856
1863
  e.slice(0, t),
1857
1864
  /* @__PURE__ */ n(
1858
1865
  "a",
1859
1866
  {
1860
- href: Ga,
1867
+ href: Ya,
1861
1868
  target: "_blank",
1862
1869
  rel: "noopener noreferrer",
1863
1870
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
1864
- children: je
1871
+ children: Ue
1865
1872
  }
1866
1873
  ),
1867
1874
  e.slice(s)
1868
1875
  ] });
1869
- }, Wa = (e) => {
1876
+ }, Ka = (e) => {
1870
1877
  var a, r;
1871
- const t = e.message.hide_date === !0, s = Ya(
1878
+ const t = e.message.hide_date === !0, s = Wa(
1872
1879
  e.message
1873
1880
  );
1874
1881
  if ((s == null ? void 0 : s.kind) === "dm-agent") {
1875
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ua[s.type];
1882
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Va[s.type];
1876
1883
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1877
1884
  /* @__PURE__ */ h(
1878
1885
  "div",
@@ -1894,11 +1901,11 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1894
1901
  ]
1895
1902
  }
1896
1903
  ),
1897
- !t && /* @__PURE__ */ n(Fe, { message: e.message })
1904
+ !t && /* @__PURE__ */ n($e, { message: e.message })
1898
1905
  ] });
1899
1906
  }
1900
1907
  if ((s == null ? void 0 : s.kind) === "age-safety") {
1901
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Va[s.type];
1908
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ha[s.type];
1902
1909
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
1903
1910
  /* @__PURE__ */ h(
1904
1911
  "div",
@@ -1908,7 +1915,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1908
1915
  "data-age-safety-system-type": s.type,
1909
1916
  children: [
1910
1917
  /* @__PURE__ */ n(
1911
- Ls,
1918
+ Ds,
1912
1919
  {
1913
1920
  size: 24,
1914
1921
  weight: "duotone",
@@ -1917,11 +1924,11 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1917
1924
  "data-testid": "age-safety-system-message-icon"
1918
1925
  }
1919
1926
  ),
1920
- /* @__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: qa(i) }) })
1927
+ /* @__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: Xa(i) }) })
1921
1928
  ]
1922
1929
  }
1923
1930
  ),
1924
- !t && /* @__PURE__ */ n(Fe, { message: e.message })
1931
+ !t && /* @__PURE__ */ n($e, { message: e.message })
1925
1932
  ] });
1926
1933
  }
1927
1934
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -1930,9 +1937,9 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1930
1937
  /* @__PURE__ */ n("p", { children: e.message.text }),
1931
1938
  /* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
1932
1939
  ] }),
1933
- !t && /* @__PURE__ */ n(Fe, { message: e.message })
1940
+ !t && /* @__PURE__ */ n($e, { message: e.message })
1934
1941
  ] });
1935
- }, mn = Xe(!1), Ve = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1942
+ }, hn = Xe(!1), Ve = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
1936
1943
  "animateTransform",
1937
1944
  {
1938
1945
  attributeName: "transform",
@@ -1942,15 +1949,15 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
1942
1949
  begin: `${120 * t}ms`,
1943
1950
  repeatCount: "indefinite"
1944
1951
  }
1945
- ) }), Xa = /* @__PURE__ */ new Set([
1952
+ ) }), Ja = /* @__PURE__ */ new Set([
1946
1953
  Be.Thinking,
1947
1954
  Be.Generating,
1948
1955
  Be.ExternalSources
1949
- ]), Ka = ({ threadList: e }) => {
1956
+ ]), Za = ({ threadList: e }) => {
1950
1957
  var b, w;
1951
- const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = ue(), { typing: i = {} } = is(), { aiState: o } = os(t), l = ye(mn);
1952
- if (!e && l && Xa.has(o)) {
1953
- const v = Ja(t, (b = r.user) == null ? void 0 : b.id);
1958
+ const { channel: t, channelConfig: s, thread: a } = de(), { client: r } = ue(), { typing: i = {} } = os(), { aiState: o } = ls(t), l = ye(hn);
1959
+ if (!e && l && Ja.has(o)) {
1960
+ const v = Qa(t, (b = r.user) == null ? void 0 : b.id);
1954
1961
  return /* @__PURE__ */ n(
1955
1962
  Gt,
1956
1963
  {
@@ -2030,7 +2037,7 @@ const _a = ({ size: e = 15 }) => /* @__PURE__ */ n(
2030
2037
  ] })
2031
2038
  }
2032
2039
  );
2033
- function Ja(e, t) {
2040
+ function Qa(e, t) {
2034
2041
  var a;
2035
2042
  const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
2036
2043
  for (const r of Object.values(s)) {
@@ -2039,10 +2046,10 @@ function Ja(e, t) {
2039
2046
  return i;
2040
2047
  }
2041
2048
  }
2042
- const Za = () => null, Qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2049
+ const er = () => null, tr = ({ className: e, message: t }) => /* @__PURE__ */ h(
2043
2050
  "div",
2044
2051
  {
2045
- className: k("flex items-center justify-center h-full", e),
2052
+ className: C("flex items-center justify-center h-full", e),
2046
2053
  children: [
2047
2054
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
2048
2055
  /* @__PURE__ */ n("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ n(
@@ -2082,12 +2089,12 @@ const Za = () => null, Qa = ({ className: e, message: t }) => /* @__PURE__ */ h(
2082
2089
  t && /* @__PURE__ */ n("span", { className: "text-stone", children: t })
2083
2090
  ]
2084
2091
  }
2085
- ), Le = F.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2086
- /* @__PURE__ */ n(Qa, { className: "w-6 h-6" }),
2092
+ ), Le = $.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
2093
+ /* @__PURE__ */ n(tr, { className: "w-6 h-6" }),
2087
2094
  /* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
2088
2095
  ] }) }));
2089
2096
  Le.displayName = "LoadingState";
2090
- const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Me = "Replies instantly with AI assistant", er = ({
2097
+ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Me = "Replies instantly with AI assistant", nr = ({
2091
2098
  onBack: e,
2092
2099
  showBackButton: t,
2093
2100
  showStarButton: s = !1,
@@ -2107,11 +2114,11 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2107
2114
  renderHeaderTitleBadges: v
2108
2115
  }) => {
2109
2116
  var A, E, y, I, z, O;
2110
- const { channel: p } = de(), { client: N } = ue(), _ = F.useMemo(
2117
+ const { channel: p } = de(), { client: N } = ue(), _ = $.useMemo(
2111
2118
  () => {
2112
- var U;
2119
+ var j;
2113
2120
  return Ze(
2114
- (U = p.state) == null ? void 0 : U.members,
2121
+ (j = p.state) == null ? void 0 : j.members,
2115
2122
  N == null ? void 0 : N.userID,
2116
2123
  p.type
2117
2124
  );
@@ -2123,13 +2130,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2123
2130
  }), D = "flex max-w-full flex-col items-center gap-1 rounded-[12px] px-1 py-0.5 text-center text-xs font-medium text-black/90", B = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", P = /* @__PURE__ */ h(se, { children: [
2124
2131
  /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: T }),
2125
2132
  L && /* @__PURE__ */ n("span", { className: "shrink-0", children: L })
2126
- ] }), C = async () => {
2133
+ ] }), k = async () => {
2127
2134
  try {
2128
2135
  M ? await p.unpin() : await p.pin();
2129
- } catch (U) {
2136
+ } catch (j) {
2130
2137
  console.error(
2131
2138
  "[CustomChannelHeader] Failed to update pinned status:",
2132
- U
2139
+ j
2133
2140
  );
2134
2141
  }
2135
2142
  };
@@ -2138,7 +2145,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2138
2145
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: t && /* @__PURE__ */ n(
2139
2146
  "button",
2140
2147
  {
2141
- className: k(
2148
+ className: C(
2142
2149
  le,
2143
2150
  "messaging-channel-view-back-button-mobile bg-[#F1F0EE]"
2144
2151
  ),
@@ -2160,7 +2167,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2160
2167
  type: "button",
2161
2168
  onClick: w,
2162
2169
  "aria-label": `View details for ${T}`,
2163
- className: k(
2170
+ className: C(
2164
2171
  D,
2165
2172
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2166
2173
  ),
@@ -2220,13 +2227,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2220
2227
  "button",
2221
2228
  {
2222
2229
  className: le,
2223
- onClick: C,
2230
+ onClick: k,
2224
2231
  type: "button",
2225
2232
  "aria-label": M ? "Unstar conversation" : "Star conversation",
2226
2233
  children: /* @__PURE__ */ n(
2227
2234
  He,
2228
2235
  {
2229
- className: k("size-5", {
2236
+ className: C("size-5", {
2230
2237
  "text-yellow-600": M,
2231
2238
  "text-black/90": !M
2232
2239
  }),
@@ -2249,7 +2256,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2249
2256
  onBlockParticipantClick: g,
2250
2257
  onReportParticipantClick: m,
2251
2258
  customChannelActions: f,
2252
- triggerClassName: k(le, "bg-[#F1F0EE]")
2259
+ triggerClassName: C(le, "bg-[#F1F0EE]")
2253
2260
  }
2254
2261
  ))
2255
2262
  ] })
@@ -2259,7 +2266,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2259
2266
  t && e && /* @__PURE__ */ n(
2260
2267
  "button",
2261
2268
  {
2262
- className: k(
2269
+ className: C(
2263
2270
  le,
2264
2271
  "messaging-channel-view-back-button-desktop"
2265
2272
  ),
@@ -2275,7 +2282,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2275
2282
  type: "button",
2276
2283
  onClick: w,
2277
2284
  "aria-label": `View details for ${T}`,
2278
- className: k(
2285
+ className: C(
2279
2286
  B,
2280
2287
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
2281
2288
  ),
@@ -2338,13 +2345,13 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2338
2345
  "button",
2339
2346
  {
2340
2347
  className: le,
2341
- onClick: C,
2348
+ onClick: k,
2342
2349
  type: "button",
2343
2350
  "aria-label": M ? "Unstar conversation" : "Star conversation",
2344
2351
  children: /* @__PURE__ */ n(
2345
2352
  He,
2346
2353
  {
2347
- className: k("size-6", {
2354
+ className: C("size-6", {
2348
2355
  "text-yellow-600": M,
2349
2356
  "text-black/90": !M
2350
2357
  }),
@@ -2373,7 +2380,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2373
2380
  ] })
2374
2381
  ] })
2375
2382
  ] });
2376
- }, tr = ({
2383
+ }, sr = ({
2377
2384
  onBack: e,
2378
2385
  showBackButton: t,
2379
2386
  renderMessageInputActions: s,
@@ -2403,27 +2410,27 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2403
2410
  composerInput: P
2404
2411
  }) => {
2405
2412
  var X, Z, Y, x;
2406
- const { channel: C } = de(), { client: A } = ue(), E = F.useMemo(
2413
+ const { channel: k } = de(), { client: A } = ue(), E = $.useMemo(
2407
2414
  () => {
2408
2415
  var S;
2409
2416
  return Ze(
2410
- (S = C.state) == null ? void 0 : S.members,
2417
+ (S = k.state) == null ? void 0 : S.members,
2411
2418
  A == null ? void 0 : A.userID,
2412
- C.type
2419
+ k.type
2413
2420
  );
2414
2421
  },
2415
- [(X = C.state) == null ? void 0 : X.members, A == null ? void 0 : A.userID, C.type]
2416
- ), y = F.useMemo(() => {
2422
+ [(X = k.state) == null ? void 0 : X.members, A == null ? void 0 : A.userID, k.type]
2423
+ ), y = $.useMemo(() => {
2417
2424
  var V;
2418
2425
  const S = A == null ? void 0 : A.userID;
2419
- return S ? Object.values(((V = C.state) == null ? void 0 : V.members) || {}).find((Q) => {
2420
- var j;
2421
- return ((j = Q.user) == null ? void 0 : j.id) === S;
2426
+ return S ? Object.values(((V = k.state) == null ? void 0 : V.members) || {}).find((Q) => {
2427
+ var U;
2428
+ return ((U = Q.user) == null ? void 0 : U.id) === S;
2422
2429
  }) : void 0;
2423
- }, [A == null ? void 0 : A.userID, (Z = C.state) == null ? void 0 : Z.members]), I = ((Y = y == null ? void 0 : y.user) == null ? void 0 : Y.is_account) ?? (y == null ? void 0 : y.is_account), z = ((x = E == null ? void 0 : E.user) == null ? void 0 : x.is_account) ?? (E == null ? void 0 : E.is_account), O = M && I === !1 && z === !0, U = W(
2430
+ }, [A == null ? void 0 : A.userID, (Z = k.state) == null ? void 0 : Z.members]), I = ((Y = y == null ? void 0 : y.user) == null ? void 0 : Y.is_account) ?? (y == null ? void 0 : y.is_account), z = ((x = E == null ? void 0 : E.user) == null ? void 0 : x.is_account) ?? (E == null ? void 0 : E.is_account), O = M && I === !1 && z === !0, j = W(
2424
2431
  (S) => {
2425
- const { message: G } = ke("ChannelView"), V = /* @__PURE__ */ n(
2426
- Aa,
2432
+ const { message: G } = Ce("ChannelView"), V = /* @__PURE__ */ n(
2433
+ Ra,
2427
2434
  {
2428
2435
  ...S,
2429
2436
  chatbotVotingEnabled: v,
@@ -2435,15 +2442,15 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2435
2442
  [v, R, L]
2436
2443
  );
2437
2444
  return /* @__PURE__ */ n(se, { children: /* @__PURE__ */ n(
2438
- cs,
2445
+ ds,
2439
2446
  {
2440
2447
  overrides: {
2441
- Message: U,
2442
- MessageActions: La
2448
+ Message: j,
2449
+ MessageActions: Pa
2443
2450
  },
2444
- children: /* @__PURE__ */ h(ds, { children: [
2451
+ children: /* @__PURE__ */ h(us, { children: [
2445
2452
  /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
2446
- er,
2453
+ nr,
2447
2454
  {
2448
2455
  onBack: e,
2449
2456
  showBackButton: t,
@@ -2464,23 +2471,23 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2464
2471
  renderHeaderTitleBadges: N
2465
2472
  }
2466
2473
  ) }, "lt-channel-header"),
2467
- p ? /* @__PURE__ */ n(F.Fragment, { children: p() }, "lt-channel-banner") : null,
2474
+ p ? /* @__PURE__ */ n($.Fragment, { children: p() }, "lt-channel-banner") : null,
2468
2475
  /* @__PURE__ */ n(
2469
2476
  "div",
2470
2477
  {
2471
2478
  className: "flex-1 overflow-hidden relative",
2472
- children: /* @__PURE__ */ n(us, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2479
+ children: /* @__PURE__ */ n(ms, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
2473
2480
  },
2474
2481
  "lt-channel-message-list"
2475
2482
  ),
2476
- r ? /* @__PURE__ */ n(F.Fragment, { children: r(C) }, "lt-channel-conversation-footer") : null,
2483
+ r ? /* @__PURE__ */ n($.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
2477
2484
  /* @__PURE__ */ n(
2478
- Fa,
2485
+ ja,
2479
2486
  {
2480
2487
  ...s && {
2481
- renderActions: () => s == null ? void 0 : s(C)
2488
+ renderActions: () => s == null ? void 0 : s(k)
2482
2489
  },
2483
- renderFooter: () => a == null ? void 0 : a(C),
2490
+ renderFooter: () => a == null ? void 0 : a(k),
2484
2491
  disabled: c,
2485
2492
  disabledReason: b,
2486
2493
  composerInput: P
@@ -2490,7 +2497,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2490
2497
  ] })
2491
2498
  }
2492
2499
  ) });
2493
- }, hn = F.memo(
2500
+ }, fn = $.memo(
2494
2501
  ({
2495
2502
  channel: e,
2496
2503
  onBack: t,
@@ -2501,7 +2508,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2501
2508
  onLeaveConversation: o,
2502
2509
  onBlockParticipant: l,
2503
2510
  className: d,
2504
- CustomChannelEmptyState: u = Za,
2511
+ CustomChannelEmptyState: u = er,
2505
2512
  showDeleteConversation: g = !0,
2506
2513
  onDeleteConversationClick: m,
2507
2514
  onBlockParticipantClick: f,
@@ -2519,14 +2526,14 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2519
2526
  renderHeaderTitleBadges: D,
2520
2527
  customChannelActions: B,
2521
2528
  renderChannelActions: P,
2522
- renderMessage: C,
2529
+ renderMessage: k,
2523
2530
  onMessageLinkClick: A,
2524
2531
  sendButton: E,
2525
2532
  attachmentPreviewList: y,
2526
2533
  viewerLanguage: I,
2527
2534
  showChannelInfo: z = !0,
2528
2535
  onParticipantNameClick: O,
2529
- composerInput: U
2536
+ composerInput: j
2530
2537
  }) => {
2531
2538
  const X = W(
2532
2539
  async (Y, x, S) => {
@@ -2540,10 +2547,10 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2540
2547
  ..._
2541
2548
  }
2542
2549
  }
2543
- }, j = {
2550
+ }, U = {
2544
2551
  ...S,
2545
2552
  ...V && { skip_push: !0 }
2546
- }, K = await e.sendMessage(Q, j);
2553
+ }, K = await e.sendMessage(Q, U);
2547
2554
  return T == null || T(K), K;
2548
2555
  },
2549
2556
  [e, N, _, T]
@@ -2555,7 +2562,7 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2555
2562
  const x = (S) => {
2556
2563
  const G = S.target, V = G == null ? void 0 : G.closest("a[href]"), Q = V == null ? void 0 : V.getAttribute("href");
2557
2564
  if (!Q) return;
2558
- const j = V == null ? void 0 : V.closest("[data-message-id]"), K = j == null ? void 0 : j.getAttribute("data-message-id"), ee = K ? e.state.messages.find((me) => me.id === K) : void 0;
2565
+ const U = V == null ? void 0 : V.closest("[data-message-id]"), K = U == null ? void 0 : U.getAttribute("data-message-id"), ee = K ? e.state.messages.find((me) => me.id === K) : void 0;
2559
2566
  A(Q, ee);
2560
2567
  };
2561
2568
  return Y.addEventListener("click", x), () => Y.removeEventListener("click", x);
@@ -2563,24 +2570,24 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2563
2570
  "div",
2564
2571
  {
2565
2572
  ref: Z,
2566
- className: k(
2573
+ className: C(
2567
2574
  "messaging-channel-view h-full flex flex-col",
2568
2575
  d
2569
2576
  ),
2570
- children: /* @__PURE__ */ n(mn.Provider, { value: N ?? !1, children: /* @__PURE__ */ n(
2571
- ls,
2577
+ children: /* @__PURE__ */ n(hn.Provider, { value: N ?? !1, children: /* @__PURE__ */ n(
2578
+ cs,
2572
2579
  {
2573
2580
  channel: e,
2574
- MessageSystem: Wa,
2581
+ MessageSystem: Ka,
2575
2582
  EmptyStateIndicator: u,
2576
2583
  LoadingIndicator: Le,
2577
- DateSeparator: Ys,
2578
- TypingIndicator: Ka,
2584
+ DateSeparator: Ws,
2585
+ TypingIndicator: Za,
2579
2586
  doSendMessageRequest: X,
2580
2587
  ...E ? { SendButton: E } : {},
2581
2588
  ...y ? { AttachmentPreviewList: y } : {},
2582
2589
  children: /* @__PURE__ */ n(
2583
- tr,
2590
+ sr,
2584
2591
  {
2585
2592
  onBack: t,
2586
2593
  showBackButton: s,
@@ -2605,11 +2612,11 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2605
2612
  renderHeaderTitleBadges: D,
2606
2613
  customChannelActions: B,
2607
2614
  renderChannelActions: P,
2608
- renderMessage: C,
2615
+ renderMessage: k,
2609
2616
  viewerLanguage: I,
2610
2617
  showChannelInfo: z,
2611
2618
  onParticipantNameClick: O,
2612
- composerInput: U
2619
+ composerInput: j
2613
2620
  }
2614
2621
  )
2615
2622
  }
@@ -2618,8 +2625,8 @@ const le = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
2618
2625
  );
2619
2626
  }
2620
2627
  );
2621
- hn.displayName = "ChannelView";
2622
- const we = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2628
+ fn.displayName = "ChannelView";
2629
+ const we = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
2623
2630
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
2624
2631
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
2625
2632
  /* @__PURE__ */ n("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -2634,7 +2641,7 @@ const we = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
2634
2641
  )
2635
2642
  ] }) }));
2636
2643
  we.displayName = "ErrorState";
2637
- const Ti = ({
2644
+ const Mi = ({
2638
2645
  capabilities: e = {},
2639
2646
  renderMessageInputActions: t,
2640
2647
  renderConversationFooter: s,
@@ -2664,10 +2671,10 @@ const Ti = ({
2664
2671
  isConnected: D,
2665
2672
  isLoading: B,
2666
2673
  error: P,
2667
- refreshConnection: C,
2674
+ refreshConnection: k,
2668
2675
  service: A,
2669
2676
  debug: E
2670
- } = zs(), [y, I] = $(null), [z, O] = $(null), [U, X] = $(!1), { showDeleteConversation: Z = !0 } = e, Y = H(o);
2677
+ } = Fs(), [y, I] = F(null), [z, O] = F(null), [j, X] = F(!1), { showDeleteConversation: Z = !0 } = e, Y = H(o);
2671
2678
  Y.current = o;
2672
2679
  const x = H(a);
2673
2680
  x.current = a;
@@ -2676,9 +2683,9 @@ const Ti = ({
2676
2683
  G.current = y;
2677
2684
  }, [y]), q(() => {
2678
2685
  if (!L || !D) return;
2679
- const j = L.userID;
2680
- if (!j) return;
2681
- const K = `${j}::${i}`;
2686
+ const U = L.userID;
2687
+ if (!U) return;
2688
+ const K = `${U}::${i}`;
2682
2689
  if (S.current === K) return;
2683
2690
  S.current = K;
2684
2691
  const ee = () => {
@@ -2694,7 +2701,7 @@ const Ti = ({
2694
2701
  const J = await L.queryChannels(
2695
2702
  {
2696
2703
  type: "messaging",
2697
- members: { $eq: [j, i] }
2704
+ members: { $eq: [U, i] }
2698
2705
  },
2699
2706
  {},
2700
2707
  { limit: 1 }
@@ -2741,17 +2748,17 @@ const Ti = ({
2741
2748
  const V = H(r);
2742
2749
  V.current = r;
2743
2750
  const Q = W(() => {
2744
- var j;
2745
- I(null), X(!0), (j = V.current) == null || j.call(V);
2751
+ var U;
2752
+ I(null), X(!0), (U = V.current) == null || U.call(V);
2746
2753
  }, []);
2747
- return B ? /* @__PURE__ */ n(Le, {}) : P ? /* @__PURE__ */ n(we, { message: P, onBack: C }) : !D || !L ? /* @__PURE__ */ n(
2754
+ return B ? /* @__PURE__ */ n(Le, {}) : P ? /* @__PURE__ */ n(we, { message: P, onBack: k }) : !D || !L ? /* @__PURE__ */ n(
2748
2755
  we,
2749
2756
  {
2750
2757
  message: "Not connected to messaging service",
2751
- onBack: C
2758
+ onBack: k
2752
2759
  }
2753
- ) : z ? /* @__PURE__ */ n(we, { message: z }) : U && !y ? /* @__PURE__ */ n(we, { message: "Conversation ended" }) : y ? /* @__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(
2754
- hn,
2760
+ ) : z ? /* @__PURE__ */ n(we, { message: z }) : j && !y ? /* @__PURE__ */ n(we, { message: "Conversation ended" }) : y ? /* @__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(
2761
+ fn,
2755
2762
  {
2756
2763
  channel: y,
2757
2764
  renderMessageInputActions: t,
@@ -2779,13 +2786,13 @@ const Ti = ({
2779
2786
  y.id
2780
2787
  ) }) }) : /* @__PURE__ */ n(Le, {});
2781
2788
  };
2782
- function nr(e) {
2789
+ function ar(e) {
2783
2790
  const t = e.state.pending_messages;
2784
2791
  if (t != null && t.length)
2785
2792
  for (const s of t)
2786
2793
  e.state.addMessageSorted(s.message);
2787
2794
  }
2788
- const fn = F.createContext({
2795
+ const gn = $.createContext({
2789
2796
  selectedChannel: void 0,
2790
2797
  onChannelSelect: () => {
2791
2798
  },
@@ -2793,18 +2800,18 @@ const fn = F.createContext({
2793
2800
  renderMessagePreview: void 0,
2794
2801
  channelPreview: void 0,
2795
2802
  viewerLanguage: void 0
2796
- }), sr = fn.Provider, ar = () => F.useContext(fn), rr = (e, t) => {
2803
+ }), rr = gn.Provider, ir = () => $.useContext(gn), or = (e, t) => {
2797
2804
  const s = new Date(
2798
2805
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
2799
2806
  ), r = new Date(
2800
2807
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
2801
2808
  ).getTime() - s.getTime();
2802
2809
  return Math.floor(r / (1e3 * 60 * 60 * 24));
2803
- }, ir = (e) => {
2810
+ }, lr = (e) => {
2804
2811
  const t = /* @__PURE__ */ new Date();
2805
2812
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
2806
2813
  return "Just now";
2807
- const a = rr(e, t);
2814
+ const a = or(e, t);
2808
2815
  return a === 0 ? e.toLocaleTimeString([], {
2809
2816
  hour: "numeric",
2810
2817
  minute: "2-digit",
@@ -2814,7 +2821,7 @@ const fn = F.createContext({
2814
2821
  day: "numeric",
2815
2822
  year: "2-digit"
2816
2823
  });
2817
- }, gn = F.memo(
2824
+ }, pn = $.memo(
2818
2825
  (e) => {
2819
2826
  var D, B, P;
2820
2827
  const { channel: t, unread: s } = e, {
@@ -2824,7 +2831,7 @@ const fn = F.createContext({
2824
2831
  channelPreview: o,
2825
2832
  renderMessagePreview: l,
2826
2833
  viewerLanguage: d
2827
- } = ar(), { client: u } = ue(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = Jt(t);
2834
+ } = ir(), { client: u } = ue(), g = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = Jt(t);
2828
2835
  if (o)
2829
2836
  return /* @__PURE__ */ n(
2830
2837
  o,
@@ -2838,34 +2845,34 @@ const fn = F.createContext({
2838
2845
  );
2839
2846
  const f = () => {
2840
2847
  t && r(t);
2841
- }, c = (C) => {
2842
- const A = C.key === "Enter" || C.key === " ", E = C.repeat;
2843
- !A || E || (C.preventDefault(), f());
2848
+ }, c = (k) => {
2849
+ const A = k.key === "Enter" || k.key === " ", E = k.repeat;
2850
+ !A || E || (k.preventDefault(), f());
2844
2851
  }, b = Ze(
2845
2852
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
2846
2853
  u == null ? void 0 : u.userID,
2847
2854
  t == null ? void 0 : t.type
2848
2855
  ), w = Zt(b == null ? void 0 : b.user), v = (B = b == null ? void 0 : b.user) == null ? void 0 : B.image, p = (() => {
2849
2856
  var A;
2850
- const C = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
2851
- if (C != null && C.length) {
2852
- for (let E = C.length - 1; E >= 0; E--)
2853
- if (C[E].type !== "system") return C[E];
2857
+ const k = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
2858
+ if (k != null && k.length) {
2859
+ for (let E = k.length - 1; E >= 0; E--)
2860
+ if (k[E].type !== "system") return k[E];
2854
2861
  }
2855
2862
  })(), _ = (() => {
2856
- var z, O, U, X;
2857
- const C = Qt({
2863
+ var z, O, j, X;
2864
+ const k = en({
2858
2865
  message: p,
2859
2866
  viewerLanguage: d
2860
2867
  });
2861
- if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return C ? `💵 ${C}` : "💵 Sent a tip";
2862
- if (((O = p == null ? void 0 : p.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return C ? `💰 ${C}` : "💰 Sent a message";
2863
- if (((U = p == null ? void 0 : p.metadata) == null ? void 0 : U.custom_type) === "MESSAGE_ATTACHMENT")
2864
- return C ? `📎 ${C}` : "📎 Sent an attachment";
2865
- if (C) return C;
2868
+ if (((z = p == null ? void 0 : p.metadata) == null ? void 0 : z.custom_type) === "MESSAGE_TIP") return k ? `💵 ${k}` : "💵 Sent a tip";
2869
+ if (((O = p == null ? void 0 : p.metadata) == null ? void 0 : O.custom_type) === "MESSAGE_PAID") return k ? `💰 ${k}` : "💰 Sent a message";
2870
+ if (((j = p == null ? void 0 : p.metadata) == null ? void 0 : j.custom_type) === "MESSAGE_ATTACHMENT")
2871
+ return k ? `📎 ${k}` : "📎 Sent an attachment";
2872
+ if (k) return k;
2866
2873
  const I = (X = p == null ? void 0 : p.attachments) == null ? void 0 : X[0];
2867
2874
  return I ? I.og_scrape_url ? I.og_scrape_url : I.type === "image" ? "📷 Sent an image" : I.type === "video" ? "🎥 Sent a video" : I.type === "audio" ? "🎵 Sent audio" : I.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
2868
- })(), T = p != null && p.created_at ? ir(new Date(p.created_at)) : "", R = p ? Re(p) : !1, M = l ? l(p, _) : `${R ? "✨ " : ""}${_}`, L = s ?? 0;
2875
+ })(), T = p != null && p.created_at ? lr(new Date(p.created_at)) : "", R = p ? Re(p) : !1, M = l ? l(p, _) : `${R ? "✨ " : ""}${_}`, L = s ?? 0;
2869
2876
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
2870
2877
  channelId: t == null ? void 0 : t.id,
2871
2878
  isSelected: g,
@@ -2879,7 +2886,7 @@ const fn = F.createContext({
2879
2886
  tabIndex: 0,
2880
2887
  onClick: f,
2881
2888
  onKeyDown: c,
2882
- className: k(
2889
+ className: C(
2883
2890
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
2884
2891
  {
2885
2892
  "bg-black/[0.04]": g,
@@ -2903,7 +2910,7 @@ const fn = F.createContext({
2903
2910
  /* @__PURE__ */ h(
2904
2911
  "h3",
2905
2912
  {
2906
- className: k(
2913
+ className: C(
2907
2914
  "text-sm font-medium truncate text-[#191918]"
2908
2915
  ),
2909
2916
  children: [
@@ -2924,28 +2931,28 @@ const fn = F.createContext({
2924
2931
  );
2925
2932
  }
2926
2933
  );
2927
- gn.displayName = "CustomChannelPreview";
2928
- const or = { last_message_at: -1 }, lr = F.memo(
2934
+ pn.displayName = "CustomChannelPreview";
2935
+ const cr = { last_message_at: -1 }, dr = $.memo(
2929
2936
  ({
2930
2937
  onChannelSelect: e,
2931
2938
  selectedChannel: t,
2932
2939
  filters: s,
2933
2940
  allowNewMessagesFromUnfilteredChannels: a = !1,
2934
2941
  channelRenderFilterFn: r,
2935
- sort: i = or,
2942
+ sort: i = cr,
2936
2943
  className: o,
2937
2944
  customEmptyStateIndicator: l,
2938
- channelListPaginator: d = hs,
2945
+ channelListPaginator: d = fs,
2939
2946
  channelPreview: u,
2940
2947
  renderMessagePreview: g,
2941
2948
  viewerLanguage: m
2942
2949
  }) => {
2943
- const f = F.useRef(0);
2950
+ const f = $.useRef(0);
2944
2951
  f.current++;
2945
- const { debug: c = !1 } = Je(), b = F.useCallback(
2952
+ const { debug: c = !1 } = Je(), b = $.useCallback(
2946
2953
  (v) => {
2947
2954
  for (const p of v)
2948
- nr(p);
2955
+ ar(p);
2949
2956
  return r ? r(v) : v;
2950
2957
  },
2951
2958
  [r]
@@ -2955,7 +2962,7 @@ const or = { last_message_at: -1 }, lr = F.memo(
2955
2962
  selectedChannelId: t == null ? void 0 : t.id,
2956
2963
  filters: s
2957
2964
  });
2958
- const w = F.useMemo(
2965
+ const w = $.useMemo(
2959
2966
  () => ({
2960
2967
  selectedChannel: t,
2961
2968
  onChannelSelect: e,
@@ -2976,12 +2983,12 @@ const or = { last_message_at: -1 }, lr = F.memo(
2976
2983
  return /* @__PURE__ */ n(
2977
2984
  "div",
2978
2985
  {
2979
- className: k(
2986
+ className: C(
2980
2987
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
2981
2988
  o
2982
2989
  ),
2983
- children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(sr, { value: w, children: /* @__PURE__ */ n(
2984
- ms,
2990
+ children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(rr, { value: w, children: /* @__PURE__ */ n(
2991
+ hs,
2985
2992
  {
2986
2993
  filters: s,
2987
2994
  sort: i,
@@ -2989,7 +2996,7 @@ const or = { last_message_at: -1 }, lr = F.memo(
2989
2996
  allowNewMessagesFromUnfilteredChannels: a,
2990
2997
  channelRenderFilterFn: b,
2991
2998
  Paginator: d,
2992
- Preview: gn,
2999
+ Preview: pn,
2993
3000
  EmptyStateIndicator: l
2994
3001
  },
2995
3002
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -2998,26 +3005,26 @@ const or = { last_message_at: -1 }, lr = F.memo(
2998
3005
  );
2999
3006
  }
3000
3007
  );
3001
- lr.displayName = "ChannelList";
3002
- const cr = /^([a-z][a-z0-9+.-]*):/i, dr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3008
+ dr.displayName = "ChannelList";
3009
+ const ur = /^([a-z][a-z0-9+.-]*):/i, mr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3003
3010
  function rt(e) {
3004
3011
  if (typeof e != "string") return;
3005
3012
  const t = e.trim();
3006
3013
  if (t === "") return;
3007
- const s = cr.exec(t);
3014
+ const s = ur.exec(t);
3008
3015
  if (s) {
3009
3016
  const a = s[1].toLowerCase();
3010
- return dr.has(a) ? t : void 0;
3017
+ return mr.has(a) ? t : void 0;
3011
3018
  }
3012
3019
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
3013
3020
  }
3014
- const ur = {
3021
+ const hr = {
3015
3022
  dark: "bg-white text-[#121110] hover:bg-white/90",
3016
3023
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
3017
- }, mr = ({ variant: e, cta: t }) => {
3018
- const s = k(
3024
+ }, fr = ({ variant: e, cta: t }) => {
3025
+ const s = C(
3019
3026
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3020
- ur[e]
3027
+ hr[e]
3021
3028
  ), a = rt(t.href);
3022
3029
  return a ? /* @__PURE__ */ n(
3023
3030
  "a",
@@ -3044,10 +3051,10 @@ const ur = {
3044
3051
  children: t.label
3045
3052
  }
3046
3053
  );
3047
- }, hr = {
3054
+ }, gr = {
3048
3055
  dark: "text-white",
3049
3056
  light: "text-black/90"
3050
- }, fr = "text-white/30", gr = {
3057
+ }, pr = "text-white/30", br = {
3051
3058
  dark: "text-white/55",
3052
3059
  light: "text-black/55"
3053
3060
  }, it = ({
@@ -3062,12 +3069,12 @@ const ur = {
3062
3069
  }) => {
3063
3070
  const d = e === "dark", u = t ?? (d ? s : void 0) ?? "", g = u.trim() !== "", m = a != null && a.trim() !== "", f = typeof r == "string" ? r.trim() : "", c = f !== "", b = o != null;
3064
3071
  if (!g && !m && !c && !b) return null;
3065
- const v = k(
3072
+ const v = C(
3066
3073
  "truncate text-base font-medium leading-6",
3067
- d && !t ? fr : hr[e]
3068
- ), p = k(
3074
+ d && !t ? pr : gr[e]
3075
+ ), p = C(
3069
3076
  "truncate text-xs leading-4",
3070
- gr[e]
3077
+ br[e]
3071
3078
  );
3072
3079
  return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
3073
3080
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
@@ -3075,7 +3082,7 @@ const ur = {
3075
3082
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-1", children: [
3076
3083
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3077
3084
  i ? /* @__PURE__ */ n("span", { className: "shrink-0", children: i }) : null,
3078
- /* @__PURE__ */ n("p", { className: k("min-w-0", v), children: u })
3085
+ /* @__PURE__ */ n("p", { className: C("min-w-0", v), children: u })
3079
3086
  ] }),
3080
3087
  m && /* @__PURE__ */ n("p", { className: p, children: a })
3081
3088
  ] }),
@@ -3083,9 +3090,9 @@ const ur = {
3083
3090
  ] }),
3084
3091
  l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
3085
3092
  ] }),
3086
- o && /* @__PURE__ */ n(mr, { variant: e, cta: o })
3093
+ o && /* @__PURE__ */ n(fr, { variant: e, cta: o })
3087
3094
  ] });
3088
- }, pr = k(
3095
+ }, vr = C(
3089
3096
  "relative block w-[280px] select-none overflow-hidden rounded-md",
3090
3097
  // 1px hairline border that sits flush with the card chrome — matches
3091
3098
  // the messaging design system's "small border around link attachments"
@@ -3103,9 +3110,9 @@ const ur = {
3103
3110
  bgClassName: l,
3104
3111
  "data-testid": d
3105
3112
  }) => {
3106
- const u = s != null || a != null, g = k(
3107
- pr,
3108
- l ?? (e === "dark" ? "bg-[#1e2330]" : "bg-white"),
3113
+ const u = s != null || a != null, g = C(
3114
+ vr,
3115
+ l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
3109
3116
  // `focus-ring` is a design-system utility from the component-library
3110
3117
  // tailwind preset — outline-none + a black 2px focus-visible ring
3111
3118
  // with offset, so keyboard users can see the focused card.
@@ -3134,7 +3141,7 @@ const ur = {
3134
3141
  onClick: a,
3135
3142
  "aria-label": r,
3136
3143
  "data-testid": d,
3137
- className: k(g, "text-left"),
3144
+ className: C(g, "text-left"),
3138
3145
  children: [
3139
3146
  t,
3140
3147
  m
@@ -3152,13 +3159,13 @@ const ur = {
3152
3159
  ]
3153
3160
  }
3154
3161
  );
3155
- }, br = {
3162
+ }, xr = {
3156
3163
  dark: "bg-white/10",
3157
3164
  light: "bg-black/5"
3158
- }, vr = {
3165
+ }, wr = {
3159
3166
  dark: "size-16 text-white/25",
3160
3167
  light: "size-16 text-black/25"
3161
- }, ze = (e, t) => !!t && !!e && ie(e) === "audio", pn = (e, t) => {
3168
+ }, ze = (e, t) => !!t && !!e && ie(e) === "audio", bn = (e, t) => {
3162
3169
  if (!t || !e) return !1;
3163
3170
  const s = ie(e);
3164
3171
  return s === "video" || s === "audio";
@@ -3184,7 +3191,7 @@ const ur = {
3184
3191
  ) }) : /* @__PURE__ */ h(
3185
3192
  "div",
3186
3193
  {
3187
- className: k(
3194
+ className: C(
3188
3195
  "relative h-[180px] w-full overflow-hidden",
3189
3196
  d && "bg-black"
3190
3197
  ),
@@ -3211,12 +3218,12 @@ const ur = {
3211
3218
  ) : /* @__PURE__ */ n(
3212
3219
  "div",
3213
3220
  {
3214
- className: k(
3221
+ className: C(
3215
3222
  "flex h-full w-full items-center justify-center",
3216
- br[e]
3223
+ xr[e]
3217
3224
  ),
3218
3225
  children: ce(r, {
3219
- className: vr[e],
3226
+ className: wr[e],
3220
3227
  weight: "regular"
3221
3228
  })
3222
3229
  }
@@ -3226,7 +3233,7 @@ const ur = {
3226
3233
  ]
3227
3234
  }
3228
3235
  );
3229
- }, xr = ({
3236
+ }, Nr = ({
3230
3237
  title: e,
3231
3238
  placeholderTitle: t,
3232
3239
  description: s,
@@ -3256,7 +3263,7 @@ const ur = {
3256
3263
  onClick: m,
3257
3264
  "aria-label": "Edit attachment",
3258
3265
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3259
- children: /* @__PURE__ */ n(Ds, { className: "size-5", weight: "regular" })
3266
+ children: /* @__PURE__ */ n(Ps, { className: "size-5", weight: "regular" })
3260
3267
  }
3261
3268
  ) : void 0;
3262
3269
  return c ? /* @__PURE__ */ n(De, { variant: "dark", bgClassName: ot, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3303,7 +3310,7 @@ const ur = {
3303
3310
  ]
3304
3311
  }
3305
3312
  );
3306
- }, wr = ({
3313
+ }, _r = ({
3307
3314
  title: e,
3308
3315
  description: t,
3309
3316
  url: s,
@@ -3315,7 +3322,7 @@ const ur = {
3315
3322
  cta: d,
3316
3323
  onClick: u
3317
3324
  }) => {
3318
- const g = pn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? ot : void 0, w = d && u ? {
3325
+ const g = bn(a, i), m = rt(s), f = d == null && m != null && !g ? m : void 0, c = d == null && !g ? u : void 0, b = ze(a, i) ? ot : void 0, w = d && u ? {
3319
3326
  ...d,
3320
3327
  onClick: () => {
3321
3328
  var v;
@@ -3356,7 +3363,7 @@ const ur = {
3356
3363
  ]
3357
3364
  }
3358
3365
  );
3359
- }, Nr = ({
3366
+ }, yr = ({
3360
3367
  title: e,
3361
3368
  placeholderTitle: t,
3362
3369
  description: s,
@@ -3369,7 +3376,7 @@ const ur = {
3369
3376
  cta: u,
3370
3377
  onClick: g
3371
3378
  }) => {
3372
- const m = pn(r, o), f = rt(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3379
+ const m = bn(r, o), f = rt(a), c = u == null && f != null && !m ? f : void 0, b = u == null && !m && c != null ? g : void 0;
3373
3380
  return /* @__PURE__ */ h(
3374
3381
  De,
3375
3382
  {
@@ -3403,20 +3410,20 @@ const ur = {
3403
3410
  ]
3404
3411
  }
3405
3412
  );
3406
- }, Ai = {
3407
- Composer: xr,
3408
- Sent: Nr,
3409
- Received: wr
3410
- }, _r = {
3411
- dark: "bg-[#1e2330]",
3413
+ }, Ri = {
3414
+ Composer: Nr,
3415
+ Sent: yr,
3416
+ Received: _r
3417
+ }, Cr = {
3418
+ dark: "bg-[#121110]",
3412
3419
  light: "bg-[#e9eaed]"
3413
- }, yr = {
3420
+ }, kr = {
3414
3421
  dark: "text-white",
3415
3422
  light: "text-[#080707]"
3416
- }, kr = {
3423
+ }, Er = {
3417
3424
  dark: "border-white/[0.08]",
3418
3425
  light: "border-black/[0.08]"
3419
- }, Cr = (e) => e === "dark" ? "sender" : "receiver", Er = {
3426
+ }, Ir = (e) => e === "dark" ? "sender" : "receiver", Sr = {
3420
3427
  sender: {
3421
3428
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
3422
3429
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -3429,7 +3436,7 @@ const ur = {
3429
3436
  middle: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[4px] rounded-br-[18px]",
3430
3437
  end: "rounded-tl-[4px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]"
3431
3438
  }
3432
- }, Ce = ({
3439
+ }, ke = ({
3433
3440
  variant: e,
3434
3441
  text: t,
3435
3442
  bordered: s = !0,
@@ -3438,13 +3445,13 @@ const ur = {
3438
3445
  children: i,
3439
3446
  "data-testid": o
3440
3447
  }) => {
3441
- const l = t != null && t !== "", d = Er[Cr(e)][a];
3448
+ const l = t != null && t !== "", d = Sr[Ir(e)][a];
3442
3449
  return /* @__PURE__ */ h(
3443
3450
  "div",
3444
3451
  {
3445
3452
  "data-testid": o,
3446
3453
  "data-group-position": a,
3447
- className: k(
3454
+ className: C(
3448
3455
  // 280px-wide bubble — matches the mobile chat attachment width
3449
3456
  // and keeps the document / image / audio bubbles visually
3450
3457
  // consistent inside the conversation timeline. The 8px / 16px
@@ -3453,10 +3460,10 @@ const ur = {
3453
3460
  // as the surrounding `CustomMessage` text bubbles.
3454
3461
  "relative w-[280px] overflow-hidden px-2 py-2",
3455
3462
  d,
3456
- _r[e],
3457
- yr[e],
3463
+ Cr[e],
3464
+ kr[e],
3458
3465
  s && "border",
3459
- s && kr[e],
3466
+ s && Er[e],
3460
3467
  r
3461
3468
  ),
3462
3469
  children: [
@@ -3464,7 +3471,7 @@ const ur = {
3464
3471
  l ? /* @__PURE__ */ n(
3465
3472
  "p",
3466
3473
  {
3467
- className: k(
3474
+ className: C(
3468
3475
  // No `text-*` / `font-*` overrides here — caption inherits
3469
3476
  // the same font family + size as `.str-chat__message-text`
3470
3477
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -3493,22 +3500,22 @@ const ur = {
3493
3500
  a.stopPropagation(), e();
3494
3501
  },
3495
3502
  "aria-label": s,
3496
- className: k(
3503
+ className: C(
3497
3504
  "flex size-6 items-center justify-center rounded-full text-white",
3498
3505
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
3499
3506
  ),
3500
3507
  children: /* @__PURE__ */ n(Oe, { className: "size-3", weight: "bold" })
3501
3508
  }
3502
- ), Ie = (e) => e === "received" ? "light" : "dark", Mi = ({
3509
+ ), Ie = (e) => e === "received" ? "light" : "dark", Li = ({
3503
3510
  firstOfGroup: e,
3504
3511
  endOfGroup: t,
3505
3512
  groupedByUser: s
3506
- }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ir = ({
3513
+ }) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Tr = ({
3507
3514
  src: e,
3508
3515
  mimeType: t,
3509
3516
  filename: s,
3510
3517
  items: a
3511
- }) => 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: [
3518
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Ar = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
3512
3519
  /* @__PURE__ */ n(
3513
3520
  "audio",
3514
3521
  {
@@ -3531,19 +3538,19 @@ const ur = {
3531
3538
  preload: l,
3532
3539
  onDismiss: d
3533
3540
  }) => {
3534
- const u = Ie(e), g = e === "composer" && !!d, m = Ir({ src: t, mimeType: s, filename: a, items: r });
3541
+ const u = Ie(e), g = e === "composer" && !!d, m = Tr({ src: t, mimeType: s, filename: a, items: r });
3535
3542
  if (m.length === 0)
3536
3543
  return null;
3537
3544
  const f = l ?? (m.length > 1 ? "none" : "metadata");
3538
3545
  return /* @__PURE__ */ n(
3539
- Ce,
3546
+ ke,
3540
3547
  {
3541
3548
  variant: u,
3542
3549
  text: i,
3543
3550
  groupPosition: o,
3544
3551
  "data-testid": "audio-attachment",
3545
3552
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, b) => /* @__PURE__ */ n(
3546
- Sr,
3553
+ Ar,
3547
3554
  {
3548
3555
  item: c,
3549
3556
  preload: f,
@@ -3557,15 +3564,15 @@ const ur = {
3557
3564
  )) })
3558
3565
  }
3559
3566
  );
3560
- }, Tr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Ar = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Mr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Rr = {
3561
- Composer: Tr,
3562
- Sent: Ar,
3563
- Received: Mr
3567
+ }, Mr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "composer" }), Rr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "sent" }), Lr = (e) => /* @__PURE__ */ n(lt, { ...e, state: "received" }), Dr = {
3568
+ Composer: Mr,
3569
+ Sent: Rr,
3570
+ Received: Lr
3564
3571
  };
3565
- function Lr(e) {
3572
+ function Pr(e) {
3566
3573
  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`;
3567
3574
  }
3568
- const Dr = {
3575
+ const Or = {
3569
3576
  pdf: "PDF",
3570
3577
  doc: "DOC",
3571
3578
  xls: "XLS",
@@ -3575,7 +3582,7 @@ const Dr = {
3575
3582
  text: "TXT",
3576
3583
  markdown: "MD"
3577
3584
  };
3578
- function Pr(e, t) {
3585
+ function zr(e, t) {
3579
3586
  if (t) {
3580
3587
  const r = t.lastIndexOf(".");
3581
3588
  if (r > 0 && r < t.length - 1) {
@@ -3585,7 +3592,7 @@ function Pr(e, t) {
3585
3592
  }
3586
3593
  if (!e) return;
3587
3594
  if (ie(e) === "document") {
3588
- const r = nn(e), i = Dr[r];
3595
+ const r = sn(e), i = Or[r];
3589
3596
  if (i) return i;
3590
3597
  if (e === "application/octet-stream") return;
3591
3598
  }
@@ -3593,8 +3600,8 @@ function Pr(e, t) {
3593
3600
  if (!(!a || a === "*"))
3594
3601
  return a.toUpperCase();
3595
3602
  }
3596
- function Or(e, t, s) {
3597
- const a = Pr(e, t), r = typeof s == "number" && s > 0 ? Lr(s) : void 0;
3603
+ function Fr(e, t, s) {
3604
+ const a = zr(e, t), r = typeof s == "number" && s > 0 ? Pr(s) : void 0;
3598
3605
  return [a, r].filter(Boolean).join(" · ") || void 0;
3599
3606
  }
3600
3607
  function ae(e) {
@@ -3605,16 +3612,16 @@ function ae(e) {
3605
3612
  return "download";
3606
3613
  }
3607
3614
  }
3608
- const zr = {
3615
+ const $r = {
3609
3616
  dark: "text-white/55",
3610
3617
  light: "text-black/65"
3611
- }, $r = {
3618
+ }, Br = {
3612
3619
  dark: "bg-white/10",
3613
3620
  light: "bg-black/5"
3614
- }, Fr = {
3621
+ }, jr = {
3615
3622
  dark: "text-white/85",
3616
3623
  light: "text-black/85"
3617
- }, bn = ({
3624
+ }, vn = ({
3618
3625
  variant: e,
3619
3626
  filename: t,
3620
3627
  title: s,
@@ -3624,16 +3631,16 @@ const zr = {
3624
3631
  activateLabel: o,
3625
3632
  trailingAction: l
3626
3633
  }) => {
3627
- const d = s ?? t ?? "File", u = Or(a, t, r), g = /* @__PURE__ */ n(
3634
+ const d = s ?? t ?? "File", u = Fr(a, t, r), g = /* @__PURE__ */ n(
3628
3635
  "div",
3629
3636
  {
3630
- className: k(
3637
+ className: C(
3631
3638
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
3632
- $r[e]
3639
+ Br[e]
3633
3640
  ),
3634
3641
  "aria-hidden": !0,
3635
3642
  children: ce(a, {
3636
- className: k("size-6", Fr[e]),
3643
+ className: C("size-6", jr[e]),
3637
3644
  weight: "regular"
3638
3645
  })
3639
3646
  }
@@ -3642,9 +3649,9 @@ const zr = {
3642
3649
  u ? /* @__PURE__ */ n(
3643
3650
  "p",
3644
3651
  {
3645
- className: k(
3652
+ className: C(
3646
3653
  "truncate text-xs leading-4",
3647
- zr[e]
3654
+ $r[e]
3648
3655
  ),
3649
3656
  children: u
3650
3657
  }
@@ -3655,7 +3662,7 @@ const zr = {
3655
3662
  type: "button",
3656
3663
  onClick: i,
3657
3664
  "aria-label": o,
3658
- className: k(
3665
+ className: C(
3659
3666
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
3660
3667
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
3661
3668
  ),
@@ -3673,7 +3680,7 @@ const zr = {
3673
3680
  l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
3674
3681
  ] });
3675
3682
  };
3676
- async function vn(e, t) {
3683
+ async function xn(e, t) {
3677
3684
  const s = t ?? ae(e);
3678
3685
  try {
3679
3686
  const a = await fetch(e, { mode: "cors" });
@@ -3687,14 +3694,14 @@ async function vn(e, t) {
3687
3694
  }
3688
3695
  }
3689
3696
  }
3690
- const Br = ({
3697
+ const Ur = ({
3691
3698
  src: e,
3692
3699
  filename: t,
3693
3700
  fileSize: s,
3694
3701
  mimeType: a,
3695
3702
  title: r,
3696
3703
  items: i
3697
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Ur = ({
3704
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], Vr = ({
3698
3705
  variant: e,
3699
3706
  item: t,
3700
3707
  index: s,
@@ -3703,7 +3710,7 @@ const Br = ({
3703
3710
  }) => {
3704
3711
  const i = t.filename ?? ae(t.src);
3705
3712
  return /* @__PURE__ */ n(
3706
- bn,
3713
+ vn,
3707
3714
  {
3708
3715
  variant: e,
3709
3716
  filename: i,
@@ -3728,7 +3735,7 @@ const Br = ({
3728
3735
  onClick: u,
3729
3736
  onDismiss: g
3730
3737
  }) => {
3731
- const m = Ie(e), f = e === "composer" && !!g, c = Br({
3738
+ const m = Ie(e), f = e === "composer" && !!g, c = Ur({
3732
3739
  src: t,
3733
3740
  filename: s,
3734
3741
  fileSize: a,
@@ -3740,14 +3747,14 @@ const Br = ({
3740
3747
  const p = c[v];
3741
3748
  if (!p) return;
3742
3749
  const N = p.filename ?? ae(p.src);
3743
- vn(p.src, N);
3750
+ xn(p.src, N);
3744
3751
  };
3745
3752
  if (c.length === 0)
3746
3753
  return null;
3747
3754
  const w = /* @__PURE__ */ n(
3748
3755
  "span",
3749
3756
  {
3750
- className: k(
3757
+ className: C(
3751
3758
  "flex size-8 items-center justify-center rounded-full",
3752
3759
  m === "dark" ? "text-white/70" : "text-black/70"
3753
3760
  ),
@@ -3756,14 +3763,14 @@ const Br = ({
3756
3763
  }
3757
3764
  );
3758
3765
  return /* @__PURE__ */ n(
3759
- Ce,
3766
+ ke,
3760
3767
  {
3761
3768
  variant: m,
3762
3769
  text: l,
3763
3770
  groupPosition: d,
3764
3771
  "data-testid": "file-attachment",
3765
3772
  children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, p) => /* @__PURE__ */ n(
3766
- Ur,
3773
+ Vr,
3767
3774
  {
3768
3775
  variant: m,
3769
3776
  item: v,
@@ -3775,10 +3782,10 @@ const Br = ({
3775
3782
  )) })
3776
3783
  }
3777
3784
  );
3778
- }, jr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), Vr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), Gr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), Hr = {
3779
- Composer: jr,
3780
- Sent: Vr,
3781
- Received: Gr
3785
+ }, Gr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "composer" }), Hr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ n(ct, { ...e, state: "received" }), qr = {
3786
+ Composer: Gr,
3787
+ Sent: Hr,
3788
+ Received: Yr
3782
3789
  }, dt = ({
3783
3790
  onPrev: e,
3784
3791
  onNext: t,
@@ -3792,7 +3799,7 @@ const Br = ({
3792
3799
  onClick: e,
3793
3800
  "aria-label": s,
3794
3801
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
3795
- children: /* @__PURE__ */ n(Ps, { size: 20, weight: "bold", "aria-hidden": !0 })
3802
+ children: /* @__PURE__ */ n(Os, { size: 20, weight: "bold", "aria-hidden": !0 })
3796
3803
  }
3797
3804
  ),
3798
3805
  /* @__PURE__ */ n(
@@ -3805,7 +3812,7 @@ const Br = ({
3805
3812
  children: /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
3806
3813
  }
3807
3814
  )
3808
- ] }), xn = ({
3815
+ ] }), wn = ({
3809
3816
  url: e,
3810
3817
  filename: t,
3811
3818
  variant: s = "pill",
@@ -3814,15 +3821,15 @@ const Br = ({
3814
3821
  tone: i = "dark",
3815
3822
  onTriggered: o
3816
3823
  }) => {
3817
- const [l, d] = $(!1), u = W(
3824
+ const [l, d] = F(!1), u = W(
3818
3825
  (c) => {
3819
- c.stopPropagation(), !l && (d(!0), vn(e, t).catch(() => {
3826
+ c.stopPropagation(), !l && (d(!0), xn(e, t).catch(() => {
3820
3827
  }).finally(() => {
3821
3828
  d(!1), o == null || o();
3822
3829
  }));
3823
3830
  },
3824
3831
  [l, e, t, o]
3825
- ), g = r ?? s !== "pill", f = { className: k(
3832
+ ), g = r ?? s !== "pill", f = { className: C(
3826
3833
  s === "pill" ? "size-4" : "size-5",
3827
3834
  "shrink-0"
3828
3835
  ), weight: "bold" };
@@ -3833,7 +3840,7 @@ const Br = ({
3833
3840
  onClick: u,
3834
3841
  disabled: l,
3835
3842
  "aria-label": a,
3836
- className: k(
3843
+ className: C(
3837
3844
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
3838
3845
  {
3839
3846
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -3873,7 +3880,7 @@ const Br = ({
3873
3880
  onClick: u,
3874
3881
  disabled: l,
3875
3882
  "aria-label": g ? a : void 0,
3876
- className: k(
3883
+ className: C(
3877
3884
  "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",
3878
3885
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
3879
3886
  ),
@@ -3895,7 +3902,7 @@ const Br = ({
3895
3902
  initialIndex: t,
3896
3903
  open: s
3897
3904
  }) => {
3898
- const a = Ge(t, 0, Math.max(e - 1, 0)), [r, i] = $(a);
3905
+ const a = Ge(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
3899
3906
  q(() => {
3900
3907
  s && i(Ge(t, 0, Math.max(e - 1, 0)));
3901
3908
  }, [s, t, e]), q(() => {
@@ -4005,7 +4012,7 @@ const Br = ({
4005
4012
  ]
4006
4013
  }
4007
4014
  );
4008
- }, wn = ({
4015
+ }, Nn = ({
4009
4016
  open: e,
4010
4017
  items: t,
4011
4018
  initialIndex: s = 0,
@@ -4027,7 +4034,7 @@ const Br = ({
4027
4034
  ariaLabel: d,
4028
4035
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
4029
4036
  actions: /* @__PURE__ */ n(
4030
- xn,
4037
+ wn,
4031
4038
  {
4032
4039
  url: l.src,
4033
4040
  filename: d,
@@ -4061,7 +4068,7 @@ const Br = ({
4061
4068
  ]
4062
4069
  }
4063
4070
  ) : null;
4064
- }, Yr = "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", Nn = ({
4071
+ }, Wr = "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", _n = ({
4065
4072
  tiles: e,
4066
4073
  onTileActivate: t,
4067
4074
  maxVisible: s = 4,
@@ -4070,14 +4077,14 @@ const Br = ({
4070
4077
  const r = e.length;
4071
4078
  if (r === 0) return null;
4072
4079
  const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, u, g) => {
4073
- const m = k(Yr, "h-full w-full");
4080
+ const m = C(Wr, "h-full w-full");
4074
4081
  return t ? /* @__PURE__ */ h(
4075
4082
  "button",
4076
4083
  {
4077
4084
  type: "button",
4078
4085
  onClick: () => t(u),
4079
4086
  "aria-label": d.ariaLabel ?? `Open media ${u + 1}`,
4080
- className: k(m, "cursor-zoom-in"),
4087
+ className: C(m, "cursor-zoom-in"),
4081
4088
  children: [
4082
4089
  d.content,
4083
4090
  g
@@ -4089,10 +4096,10 @@ const Br = ({
4089
4096
  g
4090
4097
  ] }, u);
4091
4098
  };
4092
- return i.length === 1 ? /* @__PURE__ */ n("div", { className: k("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4099
+ return i.length === 1 ? /* @__PURE__ */ n("div", { className: C("aspect-square w-full", a), children: l(i[0], 0) }) : i.length === 2 ? /* @__PURE__ */ n(
4093
4100
  "div",
4094
4101
  {
4095
- className: k(
4102
+ className: C(
4096
4103
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
4097
4104
  a
4098
4105
  ),
@@ -4101,7 +4108,7 @@ const Br = ({
4101
4108
  ) : i.length === 3 ? /* @__PURE__ */ h(
4102
4109
  "div",
4103
4110
  {
4104
- className: k(
4111
+ className: C(
4105
4112
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4106
4113
  a
4107
4114
  ),
@@ -4114,7 +4121,7 @@ const Br = ({
4114
4121
  ) : /* @__PURE__ */ n(
4115
4122
  "div",
4116
4123
  {
4117
- className: k(
4124
+ className: C(
4118
4125
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
4119
4126
  a
4120
4127
  ),
@@ -4132,14 +4139,14 @@ const Br = ({
4132
4139
  }
4133
4140
  );
4134
4141
  }, Se = (e) => {
4135
- const [t, s] = $(!1), [a, r] = $(0), i = W(
4142
+ const [t, s] = F(!1), [a, r] = F(0), i = W(
4136
4143
  (l) => {
4137
4144
  (e == null ? void 0 : e(l)) !== !1 && (r(l), s(!0));
4138
4145
  },
4139
4146
  [e]
4140
4147
  ), o = W(() => s(!1), []);
4141
4148
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
4142
- }, qr = (e, t, s, a) => ({
4149
+ }, Xr = (e, t, s, a) => ({
4143
4150
  ariaLabel: `Open image ${t + 1} of ${s}`,
4144
4151
  content: /* @__PURE__ */ n(
4145
4152
  "img",
@@ -4154,15 +4161,15 @@ const Br = ({
4154
4161
  className: "absolute inset-0 size-full rounded-md object-cover"
4155
4162
  }
4156
4163
  )
4157
- }), Wr = ({
4164
+ }), Kr = ({
4158
4165
  src: e,
4159
4166
  alt: t,
4160
4167
  items: s
4161
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], _n = (e, t) => e.map((s, a) => ({
4168
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], yn = (e, t) => e.map((s, a) => ({
4162
4169
  src: s.src,
4163
4170
  alt: s.alt,
4164
4171
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4165
- })), Xr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4172
+ })), Jr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
4166
4173
  const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Se(
4167
4174
  r
4168
4175
  );
@@ -4189,16 +4196,16 @@ const Br = ({
4189
4196
  ),
4190
4197
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ee, { onClick: i }) }) : null,
4191
4198
  /* @__PURE__ */ n(
4192
- wn,
4199
+ Nn,
4193
4200
  {
4194
4201
  open: o,
4195
- items: _n([{ src: e, alt: t }], s),
4202
+ items: yn([{ src: e, alt: t }], s),
4196
4203
  initialIndex: l,
4197
4204
  onClose: u
4198
4205
  }
4199
4206
  )
4200
4207
  ] });
4201
- }, yn = ({
4208
+ }, Cn = ({
4202
4209
  state: e,
4203
4210
  src: t,
4204
4211
  alt: s,
@@ -4209,28 +4216,28 @@ const Br = ({
4209
4216
  loading: l = "lazy",
4210
4217
  onClick: d
4211
4218
  }) => {
4212
- const u = Wr({ src: t, alt: s, items: r }), g = Ie(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Se(
4219
+ const u = Kr({ src: t, alt: s, items: r }), g = Ie(e), { viewerOpen: m, viewerIndex: f, handleActivate: c, closeViewer: b } = Se(
4213
4220
  d
4214
4221
  );
4215
4222
  if (u.length === 0)
4216
4223
  return null;
4217
4224
  const w = u.map(
4218
- (v, p) => qr(v, p, u.length, l)
4225
+ (v, p) => Xr(v, p, u.length, l)
4219
4226
  );
4220
4227
  return /* @__PURE__ */ h(
4221
- Ce,
4228
+ ke,
4222
4229
  {
4223
4230
  variant: g,
4224
4231
  text: i,
4225
4232
  groupPosition: o,
4226
4233
  "data-testid": "image-attachment",
4227
4234
  children: [
4228
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Nn, { tiles: w, onTileActivate: c }) }),
4235
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(_n, { tiles: w, onTileActivate: c }) }),
4229
4236
  /* @__PURE__ */ n(
4230
- wn,
4237
+ Nn,
4231
4238
  {
4232
4239
  open: m,
4233
- items: _n(u, a),
4240
+ items: yn(u, a),
4234
4241
  initialIndex: f,
4235
4242
  onClose: b
4236
4243
  }
@@ -4238,11 +4245,11 @@ const Br = ({
4238
4245
  ]
4239
4246
  }
4240
4247
  );
4241
- }, Kr = (e) => /* @__PURE__ */ n(Xr, { ...e }), Jr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ n(yn, { ...e, state: "received" }), Qr = {
4242
- Composer: Kr,
4243
- Sent: Jr,
4244
- Received: Zr
4245
- }, ei = ({
4248
+ }, Zr = (e) => /* @__PURE__ */ n(Jr, { ...e }), Qr = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ti = {
4249
+ Composer: Zr,
4250
+ Sent: Qr,
4251
+ Received: ei
4252
+ }, ni = ({
4246
4253
  open: e,
4247
4254
  items: t,
4248
4255
  initialIndex: s = 0,
@@ -4256,7 +4263,7 @@ const Br = ({
4256
4263
  () => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
4257
4264
  [l]
4258
4265
  ), u = re(
4259
- () => l ? ti(l.src) : void 0,
4266
+ () => l ? si(l.src) : void 0,
4260
4267
  [l]
4261
4268
  );
4262
4269
  return !l || !u ? null : /* @__PURE__ */ h(
@@ -4290,16 +4297,16 @@ const Br = ({
4290
4297
  ]
4291
4298
  }
4292
4299
  );
4293
- }, ti = (e) => {
4300
+ }, si = (e) => {
4294
4301
  const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
4295
4302
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
4296
- }, ni = ({
4303
+ }, ai = ({
4297
4304
  src: e,
4298
4305
  filename: t,
4299
4306
  fileSize: s,
4300
4307
  title: a,
4301
4308
  items: r
4302
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], si = ({
4309
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], ri = ({
4303
4310
  variant: e,
4304
4311
  item: t,
4305
4312
  index: s,
@@ -4308,7 +4315,7 @@ const Br = ({
4308
4315
  }) => {
4309
4316
  const i = t.filename ?? ae(t.src);
4310
4317
  return /* @__PURE__ */ n(
4311
- bn,
4318
+ vn,
4312
4319
  {
4313
4320
  variant: e,
4314
4321
  filename: i,
@@ -4332,7 +4339,7 @@ const Br = ({
4332
4339
  onClick: d,
4333
4340
  onDismiss: u
4334
4341
  }) => {
4335
- const g = Ie(e), m = ni({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = Se(
4342
+ const g = Ie(e), m = ai({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = Se(
4336
4343
  d
4337
4344
  ), v = e === "composer" && !!u;
4338
4345
  if (m.length === 0)
@@ -4342,7 +4349,7 @@ const Br = ({
4342
4349
  filename: N.filename ?? ae(N.src)
4343
4350
  }));
4344
4351
  return /* @__PURE__ */ h(
4345
- Ce,
4352
+ ke,
4346
4353
  {
4347
4354
  variant: g,
4348
4355
  text: o,
@@ -4351,7 +4358,7 @@ const Br = ({
4351
4358
  children: [
4352
4359
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((N, _) => {
4353
4360
  const T = N.filename ?? ae(N.src), R = v && _ === 0 ? /* @__PURE__ */ n(Ee, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
4354
- xn,
4361
+ wn,
4355
4362
  {
4356
4363
  url: N.src,
4357
4364
  filename: T,
@@ -4361,7 +4368,7 @@ const Br = ({
4361
4368
  }
4362
4369
  );
4363
4370
  return /* @__PURE__ */ n(
4364
- si,
4371
+ ri,
4365
4372
  {
4366
4373
  variant: g,
4367
4374
  item: N,
@@ -4373,7 +4380,7 @@ const Br = ({
4373
4380
  );
4374
4381
  }) }),
4375
4382
  /* @__PURE__ */ n(
4376
- ei,
4383
+ ni,
4377
4384
  {
4378
4385
  open: f,
4379
4386
  items: p,
@@ -4384,10 +4391,10 @@ const Br = ({
4384
4391
  ]
4385
4392
  }
4386
4393
  );
4387
- }, ai = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), ri = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), ii = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), oi = {
4388
- Composer: ai,
4389
- Sent: ri,
4390
- Received: ii
4394
+ }, ii = (e) => /* @__PURE__ */ n(ht, { ...e, state: "composer" }), oi = (e) => /* @__PURE__ */ n(ht, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(ht, { ...e, state: "received" }), ci = {
4395
+ Composer: ii,
4396
+ Sent: oi,
4397
+ Received: li
4391
4398
  }, kn = ({
4392
4399
  open: e,
4393
4400
  items: t,
@@ -4438,7 +4445,7 @@ const Br = ({
4438
4445
  ]
4439
4446
  }
4440
4447
  ) : null;
4441
- }, li = () => /* @__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(Ye, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Cn = ({
4448
+ }, di = () => /* @__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(Ye, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), En = ({
4442
4449
  item: e,
4443
4450
  index: t
4444
4451
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -4460,23 +4467,23 @@ const Br = ({
4460
4467
  "aria-hidden": !0
4461
4468
  }
4462
4469
  ) }),
4463
- /* @__PURE__ */ n(li, {})
4464
- ] }), ci = (e, t, s) => ({
4470
+ /* @__PURE__ */ n(di, {})
4471
+ ] }), ui = (e, t, s) => ({
4465
4472
  ariaLabel: `Play video ${t + 1} of ${s}`,
4466
- content: /* @__PURE__ */ n(Cn, { item: e, index: t })
4467
- }), di = ({
4473
+ content: /* @__PURE__ */ n(En, { item: e, index: t })
4474
+ }), mi = ({
4468
4475
  src: e,
4469
4476
  poster: t,
4470
4477
  mimeType: s,
4471
4478
  preload: a,
4472
4479
  items: r
4473
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], En = (e, t) => e.map((s, a) => ({
4480
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], In = (e, t) => e.map((s, a) => ({
4474
4481
  src: s.src,
4475
4482
  poster: s.poster,
4476
4483
  mimeType: s.mimeType,
4477
4484
  preload: s.preload,
4478
4485
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
4479
- })), ui = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4486
+ })), hi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
4480
4487
  const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: g } = Se(
4481
4488
  i
4482
4489
  );
@@ -4488,7 +4495,7 @@ const Br = ({
4488
4495
  onClick: () => u(0),
4489
4496
  "aria-label": "Play video",
4490
4497
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
4491
- children: /* @__PURE__ */ n(Cn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4498
+ children: /* @__PURE__ */ n(En, { item: { src: e, poster: t, mimeType: s }, index: 0 })
4492
4499
  }
4493
4500
  ),
4494
4501
  o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(Ee, { onClick: o }) }) : null,
@@ -4496,7 +4503,7 @@ const Br = ({
4496
4503
  kn,
4497
4504
  {
4498
4505
  open: l,
4499
- items: En(
4506
+ items: In(
4500
4507
  [{ src: e, poster: t, mimeType: s, preload: r }],
4501
4508
  a
4502
4509
  ),
@@ -4505,7 +4512,7 @@ const Br = ({
4505
4512
  }
4506
4513
  )
4507
4514
  ] });
4508
- }, In = ({
4515
+ }, Sn = ({
4509
4516
  state: e,
4510
4517
  src: t,
4511
4518
  poster: s,
@@ -4517,16 +4524,16 @@ const Br = ({
4517
4524
  preload: d,
4518
4525
  onClick: u
4519
4526
  }) => {
4520
- const g = di({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ie(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = Se(
4527
+ const g = mi({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Ie(e), { viewerOpen: f, viewerIndex: c, handleActivate: b, closeViewer: w } = Se(
4521
4528
  u
4522
4529
  );
4523
4530
  if (g.length === 0)
4524
4531
  return null;
4525
4532
  const v = g.map(
4526
- (p, N) => ci(p, N, g.length)
4533
+ (p, N) => ui(p, N, g.length)
4527
4534
  );
4528
4535
  return /* @__PURE__ */ h(
4529
- Ce,
4536
+ ke,
4530
4537
  {
4531
4538
  variant: m,
4532
4539
  text: o,
@@ -4534,7 +4541,7 @@ const Br = ({
4534
4541
  "data-testid": "video-attachment",
4535
4542
  children: [
4536
4543
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
4537
- Nn,
4544
+ _n,
4538
4545
  {
4539
4546
  tiles: v,
4540
4547
  onTileActivate: b,
@@ -4545,7 +4552,7 @@ const Br = ({
4545
4552
  kn,
4546
4553
  {
4547
4554
  open: f,
4548
- items: En(g, r),
4555
+ items: In(g, r),
4549
4556
  initialIndex: c,
4550
4557
  onClose: w
4551
4558
  }
@@ -4553,17 +4560,17 @@ const Br = ({
4553
4560
  ]
4554
4561
  }
4555
4562
  );
4556
- }, mi = (e) => /* @__PURE__ */ n(ui, { ...e }), hi = (e) => /* @__PURE__ */ n(In, { ...e, state: "sent" }), fi = (e) => /* @__PURE__ */ n(In, { ...e, state: "received" }), gi = {
4557
- Composer: mi,
4558
- Sent: hi,
4559
- Received: fi
4560
- }, Ri = {
4561
- Image: Qr,
4562
- Video: gi,
4563
- Audio: Rr,
4564
- Pdf: oi,
4565
- File: Hr
4566
- }, pi = ({
4563
+ }, fi = (e) => /* @__PURE__ */ n(hi, { ...e }), gi = (e) => /* @__PURE__ */ n(Sn, { ...e, state: "sent" }), pi = (e) => /* @__PURE__ */ n(Sn, { ...e, state: "received" }), bi = {
4564
+ Composer: fi,
4565
+ Sent: gi,
4566
+ Received: pi
4567
+ }, Di = {
4568
+ Image: ti,
4569
+ Video: bi,
4570
+ Audio: Dr,
4571
+ Pdf: ci,
4572
+ File: qr
4573
+ }, vi = ({
4567
4574
  question: e,
4568
4575
  onClick: t,
4569
4576
  loading: s = !1,
@@ -4575,7 +4582,7 @@ const Br = ({
4575
4582
  onClick: t,
4576
4583
  disabled: s,
4577
4584
  style: { backgroundColor: "#E6E5E3" },
4578
- className: k(
4585
+ className: C(
4579
4586
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
4580
4587
  {
4581
4588
  "hover:brightness-95 active:brightness-90": !s,
@@ -4585,7 +4592,7 @@ const Br = ({
4585
4592
  ),
4586
4593
  children: e
4587
4594
  }
4588
- ), Li = ({
4595
+ ), Pi = ({
4589
4596
  faqs: e,
4590
4597
  onFaqClick: t,
4591
4598
  loadingFaqId: s,
@@ -4614,7 +4621,7 @@ const Br = ({
4614
4621
  children: [
4615
4622
  a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
4616
4623
  l.map((d) => /* @__PURE__ */ n(
4617
- pi,
4624
+ vi,
4618
4625
  {
4619
4626
  question: d.question,
4620
4627
  onClick: () => t(d.id),
@@ -4628,40 +4635,40 @@ const Br = ({
4628
4635
  ] }) });
4629
4636
  };
4630
4637
  export {
4631
- sn as A,
4632
- Si as B,
4633
- Za as C,
4634
- Na as D,
4635
- Ws as E,
4636
- Li as F,
4637
- zs as G,
4638
- Ai as L,
4639
- Ei as M,
4638
+ an as A,
4639
+ Ai as B,
4640
+ er as C,
4641
+ ya as D,
4642
+ Ks as E,
4643
+ Pi as F,
4644
+ Fs as G,
4645
+ Ri as L,
4646
+ Si as M,
4640
4647
  be as a,
4641
4648
  ne as b,
4642
- lr as c,
4643
- hn as d,
4644
- Ii as e,
4645
- pi as f,
4649
+ dr as c,
4650
+ fn as d,
4651
+ Ti as e,
4652
+ vi as f,
4646
4653
  ie as g,
4647
- Ut as h,
4648
- Ri as i,
4649
- Ia as j,
4650
- Ci as k,
4651
- Ti as l,
4652
- Or as m,
4653
- Lr as n,
4654
- ir as o,
4655
- Pr as p,
4656
- Qt as q,
4654
+ jt as h,
4655
+ Di as i,
4656
+ Ta as j,
4657
+ Ii as k,
4658
+ Mi as l,
4659
+ Fr as m,
4660
+ Pr as n,
4661
+ lr as o,
4662
+ zr as p,
4663
+ en as q,
4657
4664
  ce as r,
4658
- on as s,
4665
+ ln as s,
4659
4666
  Us as t,
4660
- Mi as u,
4661
- Xs as v,
4667
+ Li as u,
4668
+ Js as v,
4662
4669
  Ze as w,
4663
4670
  nt as x,
4664
4671
  st as y,
4665
4672
  Zt as z
4666
4673
  };
4667
- //# sourceMappingURL=index-Bo9wjHNl.js.map
4674
+ //# sourceMappingURL=index-6Q-jnVFS.js.map