@linktr.ee/messaging-react 3.6.2-rc-1783311170 → 3.6.2-rc-1783314663

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 (34) hide show
  1. package/dist/{Card-DnEyeR_d.js → Card-Byosl29s.js} +3 -3
  2. package/dist/{Card-DnEyeR_d.js.map → Card-Byosl29s.js.map} +1 -1
  3. package/dist/{Card-CK1jw1VU.cjs → Card-CLfoYI1R.cjs} +2 -2
  4. package/dist/{Card-CK1jw1VU.cjs.map → Card-CLfoYI1R.cjs.map} +1 -1
  5. package/dist/{Card-CSwQT3wz.cjs → Card-CSkWY9mH.cjs} +2 -2
  6. package/dist/{Card-CSwQT3wz.cjs.map → Card-CSkWY9mH.cjs.map} +1 -1
  7. package/dist/{Card-CJh6R76n.js → Card-CqEKHw9S.js} +2 -2
  8. package/dist/{Card-CJh6R76n.js.map → Card-CqEKHw9S.js.map} +1 -1
  9. package/dist/{Card-DUoHKAuh.js → Card-ILtY9lfF.js} +2 -2
  10. package/dist/{Card-DUoHKAuh.js.map → Card-ILtY9lfF.js.map} +1 -1
  11. package/dist/{Card-DQtg7wWP.cjs → Card-UN0QRlxk.cjs} +2 -2
  12. package/dist/{Card-DQtg7wWP.cjs.map → Card-UN0QRlxk.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-C_F2Sw-9.js → LockedThumbnail-BKI_6JUF.js} +2 -2
  14. package/dist/{LockedThumbnail-C_F2Sw-9.js.map → LockedThumbnail-BKI_6JUF.js.map} +1 -1
  15. package/dist/{LockedThumbnail-BZLpmTpY.cjs → LockedThumbnail-DZ6C2xsr.cjs} +2 -2
  16. package/dist/{LockedThumbnail-BZLpmTpY.cjs.map → LockedThumbnail-DZ6C2xsr.cjs.map} +1 -1
  17. package/dist/assets/index.css +1 -1
  18. package/dist/{index-DcEVHNS3.js → index-DPwo1avm.js} +682 -688
  19. package/dist/index-DPwo1avm.js.map +1 -0
  20. package/dist/index-Q0FmgUJF.cjs +2 -0
  21. package/dist/index-Q0FmgUJF.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/CustomMessage/CustomMessage.stories.tsx +18 -11
  26. package/src/components/CustomMessage/MessageDeliveryStatus.test.tsx +60 -0
  27. package/src/components/CustomMessage/MessageDeliveryStatus.tsx +43 -0
  28. package/src/components/CustomMessage/index.tsx +2 -9
  29. package/src/styles.css +16 -25
  30. package/dist/index-DcEVHNS3.js.map +0 -1
  31. package/dist/index-LP0PQJxl.cjs +0 -2
  32. package/dist/index-LP0PQJxl.cjs.map +0 -1
  33. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +0 -83
  34. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +0 -67
@@ -1,12 +1,12 @@
1
- import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
- import U, { createContext as rt, useContext as Ie, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Gs, useMemo as ae, Suspense as it } from "react";
3
- import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as ue, useChatContext as me, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as _e, areMessageUIPropsEqual as Ks, useMessageReminder as Js, useComponentContext as is, Attachment as Zs, EditMessageModal as Qs, MessageBlocked as en, MessageBouncePrompt as tn, MessageDeleted as sn, MessageIsThreadReplyInChannelButtonIndicator as nn, MessageRepliesCountButton as an, ReminderNotification as rn, StreamedMessageText as ln, messageHasAttachments as on, messageHasReactions as cn, isDateSeparatorMessage as dn, isMessageBlocked as un, isMessageBounced as mn, MessageBounceModal as hn, MessageText as qt, MessageErrorIcon as Wt, Poll as fn, useMessageComposer as gn, useStateStore as pn, MessageInput as bn, useMessageInputContext as vn, useMessageComposerHasSendableData as xn, AttachmentPreviewList as wn, QuotedMessagePreview as _n, TextareaComposer as Nn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as An } from "stream-chat-react";
6
- import { StarIcon as Ee, DotsThreeIcon as Mn, SpinnerGapIcon as ze, SignOutIcon as Rn, ProhibitInsetIcon as Xt, FlagIcon as ls, ArrowLeftIcon as et, CurrencyDollarIcon as Ln, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Dn, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as jn, FileXlsIcon as Bn, FileDocIcon as Un, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Be, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Jn, TrashSimpleIcon as Zn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
1
+ import { jsx as s, jsxs as m, Fragment as te } from "react/jsx-runtime";
2
+ import U, { createContext as at, useContext as Se, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as ae, Suspense as rt } from "react";
3
+ import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as Hs, LinkPreviewsManager as Ht } from "stream-chat";
5
+ import { Chat as Ys, useChannelStateContext as ue, useChatContext as me, DateSeparator as qs, areMessageUIPropsEqual as Ws, useMessageReminder as Xs, useComponentContext as rs, Attachment as Ks, EditMessageModal as Js, MessageBlocked as Zs, MessageBouncePrompt as Qs, MessageDeleted as en, MessageIsThreadReplyInChannelButtonIndicator as tn, MessageRepliesCountButton as sn, ReminderNotification as nn, StreamedMessageText as an, messageHasAttachments as rn, messageHasReactions as ln, isDateSeparatorMessage as on, isMessageBlocked as cn, isMessageBounced as dn, MessageBounceModal as un, MessageText as Yt, MessageErrorIcon as qt, Poll as mn, useMessageContext as Ie, useMessageComposer as hn, useStateStore as fn, MessageInput as gn, useMessageInputContext as pn, useMessageComposerHasSendableData as bn, AttachmentPreviewList as vn, QuotedMessagePreview as xn, TextareaComposer as wn, MessageTimestamp as Ye, AIStates as qe, useTypingContext as _n, useAIState as Nn, Channel as yn, WithComponents as kn, Window as Cn, MessageList as En, ChannelList as Sn, InfiniteScroll as In } from "stream-chat-react";
6
+ import { StarIcon as Ee, DotsThreeIcon as Tn, SpinnerGapIcon as ze, SignOutIcon as An, ProhibitInsetIcon as Wt, FlagIcon as is, ArrowLeftIcon as Qe, CurrencyDollarIcon as Mn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as ls, ImageIcon as Rn, SpeakerHighIcon as Ln, VideoCameraIcon as os, FileMdIcon as Dn, FileTextIcon as zn, FileZipIcon as Pn, FilePptIcon as Fn, FileCsvIcon as On, FileXlsIcon as $n, FileDocIcon as jn, FilePdfIcon as Bn, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Un, LinkIcon as Vn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Gn, ChecksIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, PencilSimpleIcon as Xn, TrashSimpleIcon as Kn, ArrowUpIcon as Jn, ProhibitIcon as Zn } from "@phosphor-icons/react";
7
7
  import k from "classnames";
8
- import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
- const us = rt({
8
+ import { MessageActions as Qn, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
9
+ const ds = at({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const us = rt({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), lt = () => Ie(us), dl = ({
19
+ }), it = () => Se(ds), ll = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -24,7 +24,7 @@ const us = rt({
24
24
  capabilities: r = {},
25
25
  debug: i = !1
26
26
  }) => {
27
- var A, E;
27
+ var A, S;
28
28
  const l = J(
29
29
  (C, ...I) => {
30
30
  i && console.log(`🔥 [MessagingProvider] ${C}`, ...I);
@@ -39,8 +39,8 @@ const us = rt({
39
39
  });
40
40
  const [o, d] = B(null), [u, p] = B(null), [h, g] = B(!1), [c, v] = B(!1), [w, b] = B(null), f = G(!1), x = G(null), N = G(n);
41
41
  N.current = n;
42
- const S = G(i);
43
- S.current = i;
42
+ const E = G(i);
43
+ E.current = i;
44
44
  const T = G({
45
45
  userId: t == null ? void 0 : t.id,
46
46
  apiKey: a,
@@ -63,8 +63,8 @@ const us = rt({
63
63
  capabilities: r
64
64
  };
65
65
  const D = G(null);
66
- a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Ys(a) });
67
- const L = a ? ((E = D.current) == null ? void 0 : E.client) ?? null : null;
66
+ a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Hs(a) });
67
+ const L = a ? ((S = D.current) == null ? void 0 : S.client) ?? null : null;
68
68
  K(() => {
69
69
  const C = M.current, I = N.current;
70
70
  if (!a || !L || !I) {
@@ -78,10 +78,10 @@ const us = rt({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Hs({
81
+ const $ = new Gs({
82
82
  ...I,
83
83
  apiKey: a,
84
- debug: S.current,
84
+ debug: E.current,
85
85
  client: L
86
86
  });
87
87
  x.current = $, d($), l("✅ SERVICE SET", {
@@ -196,8 +196,8 @@ const us = rt({
196
196
  renderCount: M.current,
197
197
  willRenderChat: !!L,
198
198
  contextValueReady: !!y
199
- }), /* @__PURE__ */ s(us.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
- qs,
199
+ }), /* @__PURE__ */ s(ds.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
+ Ys,
201
201
  {
202
202
  client: L,
203
203
  customClasses: {
@@ -206,7 +206,7 @@ const us = rt({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, sa = () => lt(), ot = (e) => {
209
+ }, ea = () => it(), lt = (e) => {
210
210
  var a, r;
211
211
  const [t, n] = B(
212
212
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -228,14 +228,14 @@ const us = rt({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, na = "linktree-official", aa = "linktree-official-sender";
231
+ }, ta = "linktree-official", sa = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === na) {
234
+ if (n === ta) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === aa;
238
+ return ((l = i.user) == null ? void 0 : l.id) === sa;
239
239
  }
240
240
  );
241
241
  if (r) return r;
@@ -247,18 +247,18 @@ function Ue(e, t, n) {
247
247
  }
248
248
  );
249
249
  }
250
- const ra = /^[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
- function ia(e) {
252
- return ra.test(e.trim());
250
+ const na = /^[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
+ function aa(e) {
252
+ return na.test(e.trim());
253
253
  }
254
- function Kt(e, t) {
254
+ function Xt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !ia(n);
256
+ return !n || t && n === t ? !1 : !aa(n);
257
257
  }
258
- function ct(e) {
259
- return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
258
+ function ot(e) {
259
+ return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
260
260
  }
261
- const Jt = [
261
+ const Kt = [
262
262
  { emoji: "🍎", bgColor: "#FFD1DD" },
263
263
  // Apple
264
264
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -286,7 +286,7 @@ const Jt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function la(e) {
289
+ function ra(e) {
290
290
  let t = 0;
291
291
  for (let n = 0; n < e.length; n++) {
292
292
  const a = e.charCodeAt(n);
@@ -294,14 +294,14 @@ function la(e) {
294
294
  }
295
295
  return Math.abs(t);
296
296
  }
297
- function ms(e) {
298
- return Jt[la(e) % Jt.length];
297
+ function us(e) {
298
+ return Kt[ra(e) % Kt.length];
299
299
  }
300
- function oa(e) {
301
- return ms(e).emoji;
300
+ function ia(e) {
301
+ return us(e).emoji;
302
302
  }
303
- function ca(e) {
304
- return ms(e).bgColor;
303
+ function la(e) {
304
+ return us(e).bgColor;
305
305
  }
306
306
  const se = ({
307
307
  id: e,
@@ -312,7 +312,7 @@ const se = ({
312
312
  shape: i = "squircle",
313
313
  dmAgentEnabled: l = !1
314
314
  }) => {
315
- const o = oa(e), d = ca(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
315
+ const o = ia(e), d = la(e), u = 0.45, h = n < 32 ? Math.round(n * u) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, v = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -376,7 +376,7 @@ const se = ({
376
376
  ]
377
377
  }
378
378
  );
379
- }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
379
+ }, oa = "https://linktr.ee/s/about/trust-center/report", ca = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -390,29 +390,29 @@ const se = ({
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
392
  var A;
393
- const { service: h, debug: g } = lt(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, S] = B(!1), [T, M] = B(!1), D = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
393
+ const { service: h, debug: g } = it(), c = (A = t == null ? void 0 : t.user) == null ? void 0 : A.id, v = !!(a && n && h && c), [w, b] = B(!1), [f, x] = B(null), [N, E] = B(!1), [T, M] = B(!1), D = v && ((f == null ? void 0 : f.participantId) !== c || (f == null ? void 0 : f.service) !== h);
394
394
  return K(() => {
395
395
  if (!v || !h || !c) {
396
396
  b(!1), x(null);
397
397
  return;
398
398
  }
399
- let E = !1;
399
+ let S = !1;
400
400
  return (async () => {
401
401
  try {
402
402
  const C = await h.getBlockedUsers();
403
- if (E) return;
403
+ if (S) return;
404
404
  b(
405
405
  C.some(
406
406
  (I) => I.blocked_user_id === c
407
407
  )
408
408
  );
409
409
  } catch (C) {
410
- E || console.error(`[${p}] Failed to check blocked status:`, C);
410
+ S || console.error(`[${p}] Failed to check blocked status:`, C);
411
411
  } finally {
412
- E || x({ participantId: c, service: h });
412
+ S || x({ participantId: c, service: h });
413
413
  }
414
414
  })(), () => {
415
- E = !0;
415
+ S = !0;
416
416
  };
417
417
  }, [v, h, c, p]), {
418
418
  isParticipantBlocked: w,
@@ -420,23 +420,23 @@ const se = ({
420
420
  isLeaving: N,
421
421
  isUpdatingBlockStatus: T,
422
422
  handleLeaveConversation: async () => {
423
- var E;
423
+ var S;
424
424
  if (!N) {
425
- l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), S(!0);
425
+ l == null || l(), g && console.log(`[${p}] Leave conversation`, e.cid), E(!0);
426
426
  try {
427
- const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
427
+ const C = ((S = e._client) == null ? void 0 : S.userID) ?? null;
428
428
  await e.hide(C, !1), r && await r(e), u == null || u();
429
429
  } catch (C) {
430
430
  console.error(`[${p}] Failed to leave conversation`, C);
431
431
  } finally {
432
- S(!1);
432
+ E(!1);
433
433
  }
434
434
  }
435
435
  },
436
436
  handleBlockUser: async () => {
437
- var E, C, I;
437
+ var S, C, I;
438
438
  if (!(T || !h)) {
439
- o == null || o(), g && console.log(`[${p}] Block member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
439
+ o == null || o(), g && console.log(`[${p}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
440
440
  try {
441
441
  await h.blockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
442
442
  } catch ($) {
@@ -447,9 +447,9 @@ const se = ({
447
447
  }
448
448
  },
449
449
  handleUnblockUser: async () => {
450
- var E, C, I;
450
+ var S, C, I;
451
451
  if (!(T || !h)) {
452
- o == null || o(), g && console.log(`[${p}] Unblock member`, (E = t == null ? void 0 : t.user) == null ? void 0 : E.id), M(!0);
452
+ o == null || o(), g && console.log(`[${p}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), M(!0);
453
453
  try {
454
454
  await h.unBlockUser((C = t == null ? void 0 : t.user) == null ? void 0 : C.id), i && await i((I = t == null ? void 0 : t.user) == null ? void 0 : I.id), u == null || u();
455
455
  } catch ($) {
@@ -460,10 +460,10 @@ const se = ({
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(oa, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, Ne = ({
466
+ }, _e = ({
467
467
  variant: e = "default",
468
468
  className: t,
469
469
  children: n,
@@ -480,7 +480,7 @@ const se = ({
480
480
  ...a,
481
481
  children: n
482
482
  }
483
- ), st = ({
483
+ ), tt = ({
484
484
  channel: e,
485
485
  participant: t,
486
486
  showDeleteConversation: n = !0,
@@ -494,16 +494,16 @@ const se = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
497
+ const [g, c] = B(!1), v = G(null), w = Vs(), b = J(() => c(!1), []), {
498
498
  isParticipantBlocked: f,
499
499
  isCheckingBlockedStatus: x,
500
500
  isLeaving: N,
501
- isUpdatingBlockStatus: S,
501
+ isUpdatingBlockStatus: E,
502
502
  handleLeaveConversation: T,
503
503
  handleBlockUser: M,
504
504
  handleUnblockUser: D,
505
505
  handleReportUser: L
506
- } = ua({
506
+ } = ca({
507
507
  channel: e,
508
508
  participant: t,
509
509
  showBlockParticipant: a,
@@ -537,7 +537,7 @@ const se = ({
537
537
  "aria-controls": g ? w : void 0,
538
538
  onClick: () => c((z) => !z),
539
539
  children: [
540
- /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(Tn, { className: "size-5 text-black/90" }),
541
541
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
542
542
  ]
543
543
  }
@@ -553,13 +553,13 @@ const se = ({
553
553
  ),
554
554
  children: /* @__PURE__ */ m("ul", { className: "flex flex-col gap-1", children: [
555
555
  n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(
556
- Ne,
556
+ _e,
557
557
  {
558
558
  onClick: T,
559
559
  disabled: N,
560
560
  "aria-busy": N,
561
561
  children: [
562
- N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
562
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(An, { className: "h-5 w-5" }),
563
563
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
564
564
  ]
565
565
  }
@@ -567,35 +567,35 @@ const se = ({
567
567
  a && /* @__PURE__ */ s("li", { children: x ? (
568
568
  // Block status not yet resolved — show a disabled placeholder
569
569
  // so a premature click can't act on a stale block state.
570
- /* @__PURE__ */ m(Ne, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(_e, { disabled: !0, "aria-busy": !0, children: [
571
571
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
572
572
  /* @__PURE__ */ s("span", { children: "Block" })
573
573
  ] })
574
574
  ) : f ? /* @__PURE__ */ m(
575
- Ne,
575
+ _e,
576
576
  {
577
577
  onClick: D,
578
- disabled: S,
579
- "aria-busy": S,
578
+ disabled: E,
579
+ "aria-busy": E,
580
580
  children: [
581
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
581
+ E ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
- Ne,
586
+ _e,
587
587
  {
588
588
  onClick: M,
589
- disabled: S,
590
- "aria-busy": S,
589
+ disabled: E,
590
+ "aria-busy": E,
591
591
  children: [
592
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
592
+ E ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
593
593
  /* @__PURE__ */ s("span", { children: "Block" })
594
594
  ]
595
595
  }
596
596
  ) }),
597
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: L, children: [
598
- /* @__PURE__ */ s(ls, { className: "h-5 w-5" }),
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(_e, { variant: "danger", onClick: L, children: [
598
+ /* @__PURE__ */ s(is, { className: "h-5 w-5" }),
599
599
  /* @__PURE__ */ s("span", { children: "Report" })
600
600
  ] }) }),
601
601
  p
@@ -603,10 +603,10 @@ const se = ({
603
603
  }
604
604
  )
605
605
  ] });
606
- }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
606
+ }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", da = "CUSTOMER_PAID", ua = "Replies instantly with AI assistant", ma = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === da, ha = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
609
- }, pa = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ma);
609
+ }, fa = ({
610
610
  onBack: e,
611
611
  showBackButton: t,
612
612
  showStarButton: n = !1,
@@ -635,7 +635,7 @@ const se = ({
635
635
  );
636
636
  },
637
637
  [(L = b.state) == null ? void 0 : L.members, f == null ? void 0 : f.userID, b.type]
638
- ), N = ct(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = ot(b), M = ga(x), D = async () => {
638
+ ), N = ot(x == null ? void 0 : x.user), E = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = lt(b), M = ha(x), D = async () => {
639
639
  try {
640
640
  T ? await b.unpin() : await b.pin();
641
641
  } catch (y) {
@@ -657,7 +657,7 @@ const se = ({
657
657
  }),
658
658
  type: "button",
659
659
  "aria-label": "Back to conversations",
660
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
660
+ children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
661
661
  }
662
662
  ) }),
663
663
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: /* @__PURE__ */ m(
@@ -673,7 +673,7 @@ const se = ({
673
673
  {
674
674
  id: ((z = x == null ? void 0 : x.user) == null ? void 0 : z.id) || b.id || "unknown",
675
675
  name: N,
676
- image: S,
676
+ image: E,
677
677
  dmAgentEnabled: a,
678
678
  shape: "circle",
679
679
  size: 48,
@@ -689,7 +689,7 @@ const se = ({
689
689
  {
690
690
  "aria-label": "Paid customer",
691
691
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
692
- children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Mn, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
695
  n && T && /* @__PURE__ */ s(
@@ -712,7 +712,7 @@ const se = ({
712
712
  ] }),
713
713
  a && /* @__PURE__ */ m("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
714
714
  /* @__PURE__ */ s(xe, { className: "size-3 shrink-0 text-black/55" }),
715
- /* @__PURE__ */ s("span", { children: ha })
715
+ /* @__PURE__ */ s("span", { children: ua })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -740,7 +740,7 @@ const se = ({
740
740
  }
741
741
  ),
742
742
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
743
- st,
743
+ tt,
744
744
  {
745
745
  channel: b,
746
746
  participant: x,
@@ -758,20 +758,20 @@ const se = ({
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
762
- function va(e) {
763
- return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
761
+ }, ga = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
+ function pa(e) {
763
+ return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
764
  }
765
- function xa(e) {
765
+ function ba(e) {
766
766
  const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
- () => va(e.own_reactions),
767
+ () => pa(e.own_reactions),
768
768
  [e.own_reactions]
769
769
  ), r = J(async () => {
770
770
  if (n != null && n.userID)
771
771
  try {
772
- a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
772
+ a === "up" ? await t.deleteReaction(e.id, st) : await t.sendReaction(
773
773
  e.id,
774
- { type: nt },
774
+ { type: st },
775
775
  { enforce_unique: !0, skip_push: !0 }
776
776
  );
777
777
  } catch {
@@ -779,9 +779,9 @@ function xa(e) {
779
779
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = J(async () => {
780
780
  if (n != null && n.userID)
781
781
  try {
782
- a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
782
+ a === "down" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
783
783
  e.id,
784
- { type: at },
784
+ { type: nt },
785
785
  { enforce_unique: !0, skip_push: !0 }
786
786
  );
787
787
  } catch {
@@ -789,24 +789,24 @@ function xa(e) {
789
789
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
790
790
  return { selected: a, voteUp: r, voteDown: i };
791
791
  }
792
- function wa(e) {
792
+ function va(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
- function hs({
795
+ function ms({
796
796
  message: e,
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = wa(t);
800
+ const n = e == null ? void 0 : e.text, a = va(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const _a = U.lazy(() => import("./Card-CJh6R76n.js")), Na = U.lazy(() => import("./Card-DUoHKAuh.js")), ya = U.lazy(() => import("./Card-DnEyeR_d.js")), dt = () => /* @__PURE__ */ s(
803
+ const xa = U.lazy(() => import("./Card-CqEKHw9S.js")), wa = U.lazy(() => import("./Card-ILtY9lfF.js")), _a = U.lazy(() => import("./Card-Byosl29s.js")), ct = () => /* @__PURE__ */ s(
804
804
  "div",
805
805
  {
806
806
  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)]",
807
807
  "aria-hidden": !0
808
808
  }
809
- ), ka = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), gs = (e) => /* @__PURE__ */ s(it, { fallback: /* @__PURE__ */ s(dt, {}), children: /* @__PURE__ */ s(ya, { ...e }) }), Ca = fs, Sa = gs, Zt = { Composer: ka, Sent: fs, Received: gs, Creator: Ca, Visitor: Sa }, Ea = [
809
+ ), Na = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(xa, { ...e }) }), hs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), ya = hs, ka = fs, Jt = { Composer: Na, Sent: hs, Received: fs, Creator: ya, Visitor: ka }, Ca = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -819,39 +819,39 @@ const _a = U.lazy(() => import("./Card-CJh6R76n.js")), Na = U.lazy(() => import(
819
819
  function le(e) {
820
820
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
821
821
  }
822
- function ps(e) {
823
- const t = Ea.find(
822
+ function gs(e) {
823
+ const t = Ca.find(
824
824
  ([n]) => n.test(e)
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Ia = {
829
- video: cs,
830
- audio: zn,
831
- image: Dn,
832
- document: os
833
- }, Ta = {
834
- pdf: Vn,
835
- doc: Un,
836
- xls: Bn,
837
- csv: jn,
838
- ppt: $n,
839
- zip: On,
840
- text: Fn,
841
- markdown: Pn,
842
- generic: os
828
+ const Ea = {
829
+ video: os,
830
+ audio: Ln,
831
+ image: Rn,
832
+ document: ls
833
+ }, Sa = {
834
+ pdf: Bn,
835
+ doc: jn,
836
+ xls: $n,
837
+ csv: On,
838
+ ppt: Fn,
839
+ zip: Pn,
840
+ text: zn,
841
+ markdown: Dn,
842
+ generic: ls
843
843
  };
844
- function Aa(e) {
844
+ function Ia(e) {
845
845
  const t = le(e);
846
- return t !== "document" ? Ia[t] : Ta[ps(e)];
846
+ return t !== "document" ? Ea[t] : Sa[gs(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Aa(e), t);
849
+ return U.createElement(Ia(e), t);
850
850
  }
851
- const Ma = (e) => {
851
+ const Ta = (e) => {
852
852
  var t, n;
853
853
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
854
- }, Ra = ({
854
+ }, Aa = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -863,7 +863,7 @@ const Ma = (e) => {
863
863
  muted: d = !1,
864
864
  onContainerClick: u
865
865
  }) => {
866
- const p = le(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, S] = B(!1), [T, M] = B(!1), [D, L] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [E, C] = B(null), I = J(() => {
866
+ const p = le(t), h = G(null), g = G(null), c = G(null), v = G(r), [w, b] = B(a), [f, x] = B(0), [N, E] = B(!1), [T, M] = B(!1), [D, L] = B(!1), [O, z] = B(!1), [y, A] = B(!0), [S, C] = B(null), I = J(() => {
867
867
  L(!1), b(!0);
868
868
  }, []), $ = J((_) => {
869
869
  const R = g.current;
@@ -871,13 +871,13 @@ const Ma = (e) => {
871
871
  const H = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Ma(_) - H.left) / H.width)
874
+ Math.min(1, (Ta(_) - H.left) / H.width)
875
875
  );
876
876
  }, []), F = J((_) => {
877
877
  const R = h.current;
878
878
  R && R.duration && (R.currentTime = _ * R.duration);
879
879
  }, []), V = (_) => {
880
- _.stopPropagation(), S(!0);
880
+ _.stopPropagation(), E(!0);
881
881
  const R = $(_);
882
882
  x(R), F(R);
883
883
  };
@@ -903,19 +903,19 @@ const Ma = (e) => {
903
903
  }, [w]), K(() => {
904
904
  if (!N) return;
905
905
  const _ = (H) => x($(H)), R = (H) => {
906
- S(!1), F($(H));
906
+ E(!1), F($(H));
907
907
  };
908
908
  return window.addEventListener("mousemove", _), window.addEventListener("mouseup", R), window.addEventListener("touchmove", _, { passive: !0 }), window.addEventListener("touchend", R), () => {
909
909
  window.removeEventListener("mousemove", _), window.removeEventListener("mouseup", R), window.removeEventListener("touchmove", _), window.removeEventListener("touchend", R);
910
910
  };
911
911
  }, [N, $, F]);
912
- const Q = E ? { aspectRatio: String(E) } : void 0, te = E ? "" : " aspect-video", X = Math.round(f * 100);
912
+ const Q = S ? { aspectRatio: String(S) } : void 0, ee = S ? "" : " aspect-video", X = Math.round(f * 100);
913
913
  return /* @__PURE__ */ m(
914
914
  "div",
915
915
  {
916
916
  role: "button",
917
917
  tabIndex: 0,
918
- className: `relative cursor-pointer overflow-hidden bg-black ${te}`,
918
+ className: `relative cursor-pointer overflow-hidden bg-black ${ee}`,
919
919
  style: Q,
920
920
  onClick: (_) => {
921
921
  if (u) {
@@ -991,7 +991,7 @@ const Ma = (e) => {
991
991
  }
992
992
  ) }),
993
993
  O && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
994
- Ce,
994
+ ke,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
@@ -1010,7 +1010,7 @@ const Ma = (e) => {
1010
1010
  onKeyDown: (_) => {
1011
1011
  _.key !== "Enter" && _.key !== " " || (_.preventDefault(), _.stopPropagation(), I());
1012
1012
  },
1013
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(tt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1013
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(et, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1014
1014
  }
1015
1015
  ),
1016
1016
  o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1049,7 +1049,7 @@ const Ma = (e) => {
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Un, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1099,7 +1099,7 @@ const Ma = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
1102
- }, Qt = (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", bs = ({
1102
+ }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ps = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1110,7 +1110,7 @@ const Ma = (e) => {
1110
1110
  }) => {
1111
1111
  const o = le(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Ra,
1113
+ Aa,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1157,11 +1157,11 @@ const Ma = (e) => {
1157
1157
  {
1158
1158
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1159
1159
  children: we(e, {
1160
- className: Qt(r),
1160
+ className: Zt(r),
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${La(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ma(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1174,12 +1174,12 @@ const Ma = (e) => {
1174
1174
  {
1175
1175
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1176
1176
  children: we(e, {
1177
- className: Qt(r),
1177
+ className: Zt(r),
1178
1178
  weight: "regular"
1179
1179
  })
1180
1180
  }
1181
1181
  );
1182
- }, vs = ({
1182
+ }, bs = ({
1183
1183
  variant: e,
1184
1184
  thumbnail: t,
1185
1185
  title: n,
@@ -1245,28 +1245,28 @@ const Ma = (e) => {
1245
1245
  }
1246
1246
  );
1247
1247
  };
1248
- function xs(e) {
1248
+ function vs(e) {
1249
1249
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1250
1250
  }
1251
- function ut(e) {
1251
+ function dt(e) {
1252
1252
  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)]`;
1253
1253
  }
1254
- function Da(e) {
1254
+ function Ra(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function za(e) {
1257
+ function La(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function Pa(e) {
1260
+ function Da(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function Fa(e) {
1263
+ function za(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
- function Oa(e) {
1266
+ function Pa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const mt = ({ attachment: e, isMyMessage: t }) => {
1269
+ const ut = ({ attachment: e, isMyMessage: t }) => {
1270
1270
  const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, u = /* @__PURE__ */ m(U.Fragment, { children: [
1271
1271
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1272
1272
  "img",
@@ -1278,26 +1278,26 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1278
1278
  ) : /* @__PURE__ */ s(
1279
1279
  "div",
1280
1280
  {
1281
- className: `aspect-video w-full rounded-[20px] ${Da(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1281
+ className: `aspect-video w-full rounded-[20px] ${Ra(t)} flex items-center justify-center`,
1282
+ children: /* @__PURE__ */ s(Vn, { className: `size-12 ${Pa(t)}` })
1283
1283
  }
1284
1284
  ) }),
1285
1285
  /* @__PURE__ */ m("div", { className: "px-3 pb-3", children: [
1286
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${za(t)}`, children: n }),
1287
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Pa(t)}`, children: a }),
1288
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Fa(t)}`, children: d })
1286
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${La(t)}`, children: n }),
1287
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Da(t)}`, children: a }),
1288
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${za(t)}`, children: d })
1289
1289
  ] })
1290
1290
  ] });
1291
1291
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: u }) : /* @__PURE__ */ s("div", { className: "block", children: u });
1292
1292
  };
1293
- function ws(e) {
1293
+ function xs(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
- function ht(e) {
1296
+ function mt(e) {
1297
1297
  var t;
1298
- return (t = e.attachments) == null ? void 0 : t.find(ws);
1298
+ return (t = e.attachments) == null ? void 0 : t.find(xs);
1299
1299
  }
1300
- async function $a(e, t) {
1300
+ async function Fa(e, t) {
1301
1301
  let n;
1302
1302
  try {
1303
1303
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1309,7 +1309,7 @@ async function $a(e, t) {
1309
1309
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1310
1310
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1311
1311
  }
1312
- const ja = ({
1312
+ const Oa = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const ja = ({
1321
1321
  onClick: (i) => {
1322
1322
  i.stopPropagation();
1323
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1324
- a(!0), $a(e, t).then(() => {
1324
+ a(!0), Fa(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1329,14 +1329,14 @@ const ja = ({
1329
1329
  },
1330
1330
  disabled: n,
1331
1331
  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",
1332
- children: n ? /* @__PURE__ */ s(Ce, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
- /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1332
+ children: n ? /* @__PURE__ */ s(ke, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ m(U.Fragment, { children: [
1333
+ /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1334
1334
  "Download"
1335
1335
  ] })
1336
1336
  }
1337
1337
  );
1338
1338
  };
1339
- function ft(e) {
1339
+ function ht(e) {
1340
1340
  var h, g, c, v;
1341
1341
  const t = (h = e.attachments) == null ? void 0 : h.find(
1342
1342
  (w) => w.type === "video" && w.asset_url
@@ -1357,16 +1357,16 @@ function ft(e) {
1357
1357
  thumbnailUrl: p
1358
1358
  };
1359
1359
  }
1360
- const _s = ({
1360
+ const ws = ({
1361
1361
  resolvedUrl: e,
1362
1362
  resolvedType: t,
1363
1363
  title: n,
1364
1364
  fileSize: a,
1365
1365
  thumbnailUrl: r
1366
1366
  }) => {
1367
- const i = a !== void 0 ? xs(a) : void 0;
1367
+ const i = a !== void 0 ? vs(a) : void 0;
1368
1368
  return /* @__PURE__ */ s(
1369
- vs,
1369
+ bs,
1370
1370
  {
1371
1371
  variant: "dark",
1372
1372
  title: n,
@@ -1374,7 +1374,7 @@ const _s = ({
1374
1374
  mimeType: t,
1375
1375
  detail: i,
1376
1376
  thumbnail: /* @__PURE__ */ s(
1377
- bs,
1377
+ ps,
1378
1378
  {
1379
1379
  mimeType: t,
1380
1380
  sourceUrl: e,
@@ -1385,23 +1385,23 @@ const _s = ({
1385
1385
  )
1386
1386
  }
1387
1387
  );
1388
- }, Ns = ({
1388
+ }, _s = ({
1389
1389
  resolvedUrl: e,
1390
1390
  resolvedType: t,
1391
1391
  title: n,
1392
1392
  fileSize: a,
1393
1393
  thumbnailUrl: r
1394
1394
  }) => {
1395
- const i = le(t), l = a !== void 0 ? xs(a) : void 0;
1395
+ const i = le(t), l = a !== void 0 ? vs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
- vs,
1397
+ bs,
1398
1398
  {
1399
1399
  variant: "light",
1400
1400
  title: n,
1401
1401
  mimeType: t,
1402
1402
  detail: l,
1403
1403
  thumbnail: /* @__PURE__ */ s(
1404
- bs,
1404
+ ps,
1405
1405
  {
1406
1406
  mimeType: t,
1407
1407
  sourceUrl: e,
@@ -1411,14 +1411,14 @@ const _s = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s(ja, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s(Oa, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, Ba = ({
1417
+ }, $a = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
- const n = ht(e), a = ft(e);
1421
+ const n = mt(e), a = ht(e);
1422
1422
  return !n && !a ? null : /* @__PURE__ */ m("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1423
1423
  !t && e.user && /* @__PURE__ */ s(
1424
1424
  se,
@@ -1439,41 +1439,41 @@ const _s = ({
1439
1439
  {
1440
1440
  className: "str-chat__message-bubble",
1441
1441
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1442
- children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(_s, { ...a }) : /* @__PURE__ */ s(Ns, { ...a })
1442
+ children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ws, { ...a }) : /* @__PURE__ */ s(_s, { ...a })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, Ua = ({
1448
+ }, ja = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
- const t = ht(e);
1451
+ const t = mt(e);
1452
1452
  if (t)
1453
- return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1454
- const n = ft(e);
1455
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1456
- }, Va = ({
1453
+ return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1454
+ const n = ht(e);
1455
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ws, { ...n }) }) : null;
1456
+ }, Ba = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
- const t = ht(e);
1459
+ const t = mt(e);
1460
1460
  if (t)
1461
- return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1462
- const n = ft(e);
1463
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ns, { ...n }) }) : null;
1464
- }, ul = Object.assign(Ba, {
1465
- Creator: Ua,
1466
- Visitor: Va
1467
- }), Ga = {
1461
+ return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1462
+ const n = ht(e);
1463
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(_s, { ...n }) }) : null;
1464
+ }, ol = Object.assign($a, {
1465
+ Creator: ja,
1466
+ Visitor: Ba
1467
+ }), Ua = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Ha = {
1470
+ }, Va = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ya = {
1473
+ }, Ga = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
1476
+ }, Ha = (e) => e === "dark" ? "sender" : "receiver", Ya = {
1477
1477
  sender: {
1478
1478
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1479
1479
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1495,7 +1495,7 @@ const _s = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = Wa[qa(e)][a];
1498
+ const o = t != null && t !== "", d = Ya[Ha(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const _s = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
- Ga[e],
1514
- Ha[e],
1513
+ Ua[e],
1514
+ Va[e],
1515
1515
  n && "border",
1516
- n && Ya[e],
1516
+ n && Ga[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const _s = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", qa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Wa = ({
1564
1564
  src: e,
1565
1565
  mimeType: t,
1566
1566
  filename: n,
1567
1567
  items: a
1568
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Ja = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1568
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], Xa = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
1569
1569
  /* @__PURE__ */ s(
1570
1570
  "audio",
1571
1571
  {
@@ -1577,7 +1577,7 @@ const _s = ({
1577
1577
  }
1578
1578
  ),
1579
1579
  n ?? null
1580
- ] }), gt = ({
1580
+ ] }), ft = ({
1581
1581
  state: e,
1582
1582
  src: t,
1583
1583
  mimeType: n,
@@ -1588,7 +1588,7 @@ const _s = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Ka({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Wa({ src: t, mimeType: n, filename: a, items: r });
1592
1592
  if (h.length === 0)
1593
1593
  return null;
1594
1594
  const g = o ?? (h.length > 1 ? "none" : "metadata");
@@ -1600,7 +1600,7 @@ const _s = ({
1600
1600
  groupPosition: l,
1601
1601
  "data-testid": "audio-attachment",
1602
1602
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((c, v) => /* @__PURE__ */ s(
1603
- Ja,
1603
+ Xa,
1604
1604
  {
1605
1605
  item: c,
1606
1606
  preload: g,
@@ -1614,15 +1614,15 @@ const _s = ({
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
1617
- }, Za = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Qa = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), tr = {
1618
- Composer: Za,
1619
- Sent: Qa,
1620
- Received: er
1617
+ }, Ka = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), Qa = {
1618
+ Composer: Ka,
1619
+ Sent: Ja,
1620
+ Received: Za
1621
1621
  };
1622
- function sr(e) {
1622
+ function er(e) {
1623
1623
  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`;
1624
1624
  }
1625
- const nr = {
1625
+ const tr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const nr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function ar(e, t) {
1635
+ function sr(e, t) {
1636
1636
  if (t) {
1637
1637
  const r = t.lastIndexOf(".");
1638
1638
  if (r > 0 && r < t.length - 1) {
@@ -1642,7 +1642,7 @@ function ar(e, t) {
1642
1642
  }
1643
1643
  if (!e) return;
1644
1644
  if (le(e) === "document") {
1645
- const r = ps(e), i = nr[r];
1645
+ const r = gs(e), i = tr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function ar(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function rr(e, t, n) {
1654
- const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(n) : void 0;
1653
+ function nr(e, t, n) {
1654
+ const a = sr(e, t), r = typeof n == "number" && n > 0 ? er(n) : void 0;
1655
1655
  return [a, r].filter(Boolean).join(" · ") || void 0;
1656
1656
  }
1657
1657
  function re(e) {
@@ -1662,16 +1662,16 @@ function re(e) {
1662
1662
  return "download";
1663
1663
  }
1664
1664
  }
1665
- const ir = {
1665
+ const ar = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, lr = {
1668
+ }, rr = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, or = {
1671
+ }, ir = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
- }, ys = ({
1674
+ }, Ns = ({
1675
1675
  variant: e,
1676
1676
  filename: t,
1677
1677
  title: n,
@@ -1681,16 +1681,16 @@ const ir = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = rr(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = nr(a, t, r), p = /* @__PURE__ */ s(
1685
1685
  "div",
1686
1686
  {
1687
1687
  className: k(
1688
1688
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1689
- lr[e]
1689
+ rr[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", or[e]),
1693
+ className: k("size-6", ir[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,7 +1701,7 @@ const ir = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- ir[e]
1704
+ ar[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
@@ -1721,7 +1721,7 @@ const ir = {
1721
1721
  h
1722
1722
  ]
1723
1723
  }
1724
- ) : /* @__PURE__ */ m(ee, { children: [
1724
+ ) : /* @__PURE__ */ m(te, { children: [
1725
1725
  p,
1726
1726
  h
1727
1727
  ] });
@@ -1730,7 +1730,7 @@ const ir = {
1730
1730
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1731
1731
  ] });
1732
1732
  };
1733
- async function ks(e, t) {
1733
+ async function ys(e, t) {
1734
1734
  const n = t ?? re(e);
1735
1735
  try {
1736
1736
  const a = await fetch(e, { mode: "cors" });
@@ -1744,14 +1744,14 @@ async function ks(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const cr = ({
1747
+ const lr = ({
1748
1748
  src: e,
1749
1749
  filename: t,
1750
1750
  fileSize: n,
1751
1751
  mimeType: a,
1752
1752
  title: r,
1753
1753
  items: i
1754
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], or = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1760,7 +1760,7 @@ const cr = ({
1760
1760
  }) => {
1761
1761
  const i = t.filename ?? re(t.src);
1762
1762
  return /* @__PURE__ */ s(
1763
- ys,
1763
+ Ns,
1764
1764
  {
1765
1765
  variant: e,
1766
1766
  filename: i,
@@ -1772,7 +1772,7 @@ const cr = ({
1772
1772
  trailingAction: r
1773
1773
  }
1774
1774
  );
1775
- }, pt = ({
1775
+ }, gt = ({
1776
1776
  state: e,
1777
1777
  src: t,
1778
1778
  filename: n,
@@ -1785,7 +1785,7 @@ const cr = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), g = e === "composer" && !!p, c = cr({
1788
+ const h = Me(e), g = e === "composer" && !!p, c = lr({
1789
1789
  src: t,
1790
1790
  filename: n,
1791
1791
  fileSize: a,
@@ -1797,7 +1797,7 @@ const cr = ({
1797
1797
  const f = c[b];
1798
1798
  if (!f) return;
1799
1799
  const x = f.filename ?? re(f.src);
1800
- ks(f.src, x);
1800
+ ys(f.src, x);
1801
1801
  };
1802
1802
  if (c.length === 0)
1803
1803
  return null;
@@ -1809,7 +1809,7 @@ const cr = ({
1809
1809
  h === "dark" ? "text-white/70" : "text-black/70"
1810
1810
  ),
1811
1811
  "aria-hidden": !0,
1812
- children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
1812
+ children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
1813
1813
  }
1814
1814
  );
1815
1815
  return /* @__PURE__ */ s(
@@ -1820,7 +1820,7 @@ const cr = ({
1820
1820
  groupPosition: d,
1821
1821
  "data-testid": "file-attachment",
1822
1822
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, f) => /* @__PURE__ */ s(
1823
- dr,
1823
+ or,
1824
1824
  {
1825
1825
  variant: h,
1826
1826
  item: b,
@@ -1832,16 +1832,16 @@ const cr = ({
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
1835
- }, ur = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), fr = {
1836
- Composer: ur,
1837
- Sent: mr,
1838
- Received: hr
1839
- }, bt = ({
1835
+ }, cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), mr = {
1836
+ Composer: cr,
1837
+ Sent: dr,
1838
+ Received: ur
1839
+ }, pt = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
1842
1842
  prevLabel: n = "Previous",
1843
1843
  nextLabel: a = "Next"
1844
- }) => /* @__PURE__ */ m(ee, { children: [
1844
+ }) => /* @__PURE__ */ m(te, { children: [
1845
1845
  /* @__PURE__ */ s(
1846
1846
  "button",
1847
1847
  {
@@ -1849,7 +1849,7 @@ const cr = ({
1849
1849
  onClick: e,
1850
1850
  "aria-label": n,
1851
1851
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1852
- children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Gn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1862,7 +1862,7 @@ const cr = ({
1862
1862
  children: /* @__PURE__ */ s(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
1863
1863
  }
1864
1864
  )
1865
- ] }), Cs = ({
1865
+ ] }), ks = ({
1866
1866
  url: e,
1867
1867
  filename: t,
1868
1868
  variant: n = "pill",
@@ -1873,7 +1873,7 @@ const cr = ({
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
1875
  (c) => {
1876
- c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1876
+ c.stopPropagation(), !o && (d(!0), ys(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
@@ -1898,14 +1898,14 @@ const cr = ({
1898
1898
  }[i]
1899
1899
  ),
1900
1900
  children: o ? /* @__PURE__ */ s(
1901
- Ce,
1901
+ ke,
1902
1902
  {
1903
1903
  className: "size-4 animate-spin",
1904
1904
  weight: "bold",
1905
1905
  "aria-hidden": !0
1906
1906
  }
1907
1907
  ) : /* @__PURE__ */ s(
1908
- Se,
1908
+ Ce,
1909
1909
  {
1910
1910
  className: "size-5 shrink-0",
1911
1911
  weight: "bold",
@@ -1921,7 +1921,7 @@ const cr = ({
1921
1921
  disabled: o,
1922
1922
  "aria-label": a,
1923
1923
  className: "mes-media-viewer__action",
1924
- children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1924
+ children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
1925
  }
1926
1926
  ) : /* @__PURE__ */ m(
1927
1927
  "button",
@@ -1936,18 +1936,18 @@ const cr = ({
1936
1936
  ),
1937
1937
  children: [
1938
1938
  o ? /* @__PURE__ */ s(
1939
- Ce,
1939
+ ke,
1940
1940
  {
1941
1941
  className: "size-4 animate-spin",
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Ce, { ...g, "aria-hidden": !0 }),
1946
1946
  p ? null : a
1947
1947
  ]
1948
1948
  }
1949
1949
  );
1950
- }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1950
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), bt = ({
1951
1951
  length: e,
1952
1952
  initialIndex: t,
1953
1953
  open: n
@@ -1972,7 +1972,7 @@ const cr = ({
1972
1972
  };
1973
1973
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
1974
1974
  }, [n, e, l, o]), { index: r, prev: l, next: o };
1975
- }, xt = ({
1975
+ }, vt = ({
1976
1976
  open: e,
1977
1977
  onClose: t,
1978
1978
  ariaLabel: n,
@@ -2062,13 +2062,13 @@ const cr = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Ss = ({
2065
+ }, Cs = ({
2066
2066
  open: e,
2067
2067
  items: t,
2068
2068
  initialIndex: n = 0,
2069
2069
  onClose: a
2070
2070
  }) => {
2071
- const { index: r, prev: i, next: l } = vt({
2071
+ const { index: r, prev: i, next: l } = bt({
2072
2072
  length: t.length,
2073
2073
  initialIndex: n,
2074
2074
  open: e
@@ -2077,14 +2077,14 @@ const cr = ({
2077
2077
  [o]
2078
2078
  );
2079
2079
  return o ? /* @__PURE__ */ m(
2080
- xt,
2080
+ vt,
2081
2081
  {
2082
2082
  open: e,
2083
2083
  onClose: a,
2084
2084
  ariaLabel: d,
2085
2085
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2086
2086
  actions: /* @__PURE__ */ s(
2087
- Cs,
2087
+ ks,
2088
2088
  {
2089
2089
  url: o.src,
2090
2090
  filename: d,
@@ -2107,7 +2107,7 @@ const cr = ({
2107
2107
  `${r}:${o.src}`
2108
2108
  ),
2109
2109
  t.length > 1 ? /* @__PURE__ */ s(
2110
- bt,
2110
+ pt,
2111
2111
  {
2112
2112
  onPrev: i,
2113
2113
  onNext: l,
@@ -2118,7 +2118,7 @@ const cr = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
2121
- }, gr = "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", Es = ({
2121
+ }, hr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", Es = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const cr = ({
2127
2127
  const r = e.length;
2128
2128
  if (r === 0) return null;
2129
2129
  const i = e.slice(0, Math.min(r, n)), l = r - i.length, o = (d, u, p) => {
2130
- const h = k(gr, "h-full w-full");
2130
+ const h = k(hr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const cr = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, pr = (e, t, n, a) => ({
2199
+ }, fr = (e, t, n, a) => ({
2200
2200
  ariaLabel: `Open image ${t + 1} of ${n}`,
2201
2201
  content: /* @__PURE__ */ s(
2202
2202
  "img",
@@ -2211,15 +2211,15 @@ const cr = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), br = ({
2214
+ }), gr = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
2218
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Is = (e, t) => e.map((n, a) => ({
2218
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ss = (e, t) => e.map((n, a) => ({
2219
2219
  src: n.src,
2220
2220
  alt: n.alt,
2221
2221
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2222
- })), vr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), pr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2223
2223
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: u } = Re(
2224
2224
  r
2225
2225
  );
@@ -2246,16 +2246,16 @@ const cr = ({
2246
2246
  ),
2247
2247
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
2248
2248
  /* @__PURE__ */ s(
2249
- Ss,
2249
+ Cs,
2250
2250
  {
2251
2251
  open: l,
2252
- items: Is([{ src: e, alt: t }], n),
2252
+ items: Ss([{ src: e, alt: t }], n),
2253
2253
  initialIndex: o,
2254
2254
  onClose: u
2255
2255
  }
2256
2256
  )
2257
2257
  ] });
2258
- }, Ts = ({
2258
+ }, Is = ({
2259
2259
  state: e,
2260
2260
  src: t,
2261
2261
  alt: n,
@@ -2266,13 +2266,13 @@ const cr = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = br({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2269
+ const u = gr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2270
2270
  d
2271
2271
  );
2272
2272
  if (u.length === 0)
2273
2273
  return null;
2274
2274
  const w = u.map(
2275
- (b, f) => pr(b, f, u.length, o)
2275
+ (b, f) => fr(b, f, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2284,10 +2284,10 @@ const cr = ({
2284
2284
  children: [
2285
2285
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Ss,
2287
+ Cs,
2288
2288
  {
2289
2289
  open: h,
2290
- items: Is(u, a),
2290
+ items: Ss(u, a),
2291
2291
  initialIndex: g,
2292
2292
  onClose: v
2293
2293
  }
@@ -2295,17 +2295,17 @@ const cr = ({
2295
2295
  ]
2296
2296
  }
2297
2297
  );
2298
- }, xr = (e) => /* @__PURE__ */ s(vr, { ...e }), wr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), _r = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), Nr = {
2299
- Composer: xr,
2300
- Sent: wr,
2301
- Received: _r
2302
- }, yr = ({
2298
+ }, br = (e) => /* @__PURE__ */ s(pr, { ...e }), vr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), xr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), wr = {
2299
+ Composer: br,
2300
+ Sent: vr,
2301
+ Received: xr
2302
+ }, _r = ({
2303
2303
  open: e,
2304
2304
  items: t,
2305
2305
  initialIndex: n = 0,
2306
2306
  onClose: a
2307
2307
  }) => {
2308
- const { index: r, prev: i, next: l } = vt({
2308
+ const { index: r, prev: i, next: l } = bt({
2309
2309
  length: t.length,
2310
2310
  initialIndex: n,
2311
2311
  open: e
@@ -2313,11 +2313,11 @@ const cr = ({
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
2315
  ), u = ae(
2316
- () => o ? kr(o.src) : void 0,
2316
+ () => o ? Nr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
2320
- xt,
2320
+ vt,
2321
2321
  {
2322
2322
  open: e,
2323
2323
  onClose: a,
@@ -2336,7 +2336,7 @@ const cr = ({
2336
2336
  `${r}:${o.src}`
2337
2337
  ),
2338
2338
  t.length > 1 ? /* @__PURE__ */ s(
2339
- bt,
2339
+ pt,
2340
2340
  {
2341
2341
  onPrev: i,
2342
2342
  onNext: l,
@@ -2347,16 +2347,16 @@ const cr = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, kr = (e) => {
2350
+ }, Nr = (e) => {
2351
2351
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2352
2352
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2353
- }, Cr = ({
2353
+ }, yr = ({
2354
2354
  src: e,
2355
2355
  filename: t,
2356
2356
  fileSize: n,
2357
2357
  title: a,
2358
2358
  items: r
2359
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], kr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2365,7 +2365,7 @@ const cr = ({
2365
2365
  }) => {
2366
2366
  const i = t.filename ?? re(t.src);
2367
2367
  return /* @__PURE__ */ s(
2368
- ys,
2368
+ Ns,
2369
2369
  {
2370
2370
  variant: e,
2371
2371
  filename: i,
@@ -2377,7 +2377,7 @@ const cr = ({
2377
2377
  trailingAction: r
2378
2378
  }
2379
2379
  );
2380
- }, wt = ({
2380
+ }, xt = ({
2381
2381
  state: e,
2382
2382
  src: t,
2383
2383
  filename: n,
@@ -2389,7 +2389,7 @@ const cr = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = Cr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2392
+ const p = Me(e), h = yr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2393
2393
  d
2394
2394
  ), b = e === "composer" && !!u;
2395
2395
  if (h.length === 0)
@@ -2407,18 +2407,18 @@ const cr = ({
2407
2407
  "data-testid": "pdf-attachment",
2408
2408
  children: [
2409
2409
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
- const S = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
- Cs,
2410
+ const E = x.filename ?? re(x.src), T = b && N === 0 ? /* @__PURE__ */ s(Ae, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2411
+ ks,
2412
2412
  {
2413
2413
  url: x.src,
2414
- filename: S,
2414
+ filename: E,
2415
2415
  variant: "inline",
2416
- label: `Download ${S}`,
2416
+ label: `Download ${E}`,
2417
2417
  tone: p
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- Sr,
2421
+ kr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
@@ -2430,7 +2430,7 @@ const cr = ({
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- yr,
2433
+ _r,
2434
2434
  {
2435
2435
  open: g,
2436
2436
  items: f,
@@ -2441,17 +2441,17 @@ const cr = ({
2441
2441
  ]
2442
2442
  }
2443
2443
  );
2444
- }, Er = (e) => /* @__PURE__ */ s(wt, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(wt, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(wt, { ...e, state: "received" }), Ar = {
2445
- Composer: Er,
2446
- Sent: Ir,
2447
- Received: Tr
2448
- }, As = ({
2444
+ }, Cr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Ir = {
2445
+ Composer: Cr,
2446
+ Sent: Er,
2447
+ Received: Sr
2448
+ }, Ts = ({
2449
2449
  open: e,
2450
2450
  items: t,
2451
2451
  initialIndex: n = 0,
2452
2452
  onClose: a
2453
2453
  }) => {
2454
- const { index: r, prev: i, next: l } = vt({
2454
+ const { index: r, prev: i, next: l } = bt({
2455
2455
  length: t.length,
2456
2456
  initialIndex: n,
2457
2457
  open: e
@@ -2460,7 +2460,7 @@ const cr = ({
2460
2460
  [o]
2461
2461
  );
2462
2462
  return o ? /* @__PURE__ */ m(
2463
- xt,
2463
+ vt,
2464
2464
  {
2465
2465
  open: e,
2466
2466
  onClose: a,
@@ -2484,7 +2484,7 @@ const cr = ({
2484
2484
  `${r}:${o.src}`
2485
2485
  ),
2486
2486
  t.length > 1 ? /* @__PURE__ */ s(
2487
- bt,
2487
+ pt,
2488
2488
  {
2489
2489
  onPrev: i,
2490
2490
  onNext: l,
@@ -2495,7 +2495,7 @@ const cr = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
2498
- }, Mr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(tt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ms = ({
2498
+ }, Tr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(et, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), As = ({
2499
2499
  item: e,
2500
2500
  index: t
2501
2501
  }) => /* @__PURE__ */ m("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2510,30 +2510,30 @@ const cr = ({
2510
2510
  className: "absolute inset-0 size-full rounded-md object-cover"
2511
2511
  }
2512
2512
  ) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
2513
- cs,
2513
+ os,
2514
2514
  {
2515
2515
  className: "size-16 rounded-md text-white/30",
2516
2516
  weight: "regular",
2517
2517
  "aria-hidden": !0
2518
2518
  }
2519
2519
  ) }),
2520
- /* @__PURE__ */ s(Mr, {})
2521
- ] }), Rr = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Tr, {})
2521
+ ] }), Ar = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
- content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
- }), Lr = ({
2523
+ content: /* @__PURE__ */ s(As, { item: e, index: t })
2524
+ }), Mr = ({
2525
2525
  src: e,
2526
2526
  poster: t,
2527
2527
  mimeType: n,
2528
2528
  preload: a,
2529
2529
  items: r
2530
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Rs = (e, t) => e.map((n, a) => ({
2530
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Ms = (e, t) => e.map((n, a) => ({
2531
2531
  src: n.src,
2532
2532
  poster: n.poster,
2533
2533
  mimeType: n.mimeType,
2534
2534
  preload: n.preload,
2535
2535
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2536
- })), Dr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2536
+ })), Rr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2537
2537
  const { viewerOpen: o, viewerIndex: d, handleActivate: u, closeViewer: p } = Re(
2538
2538
  i
2539
2539
  );
@@ -2545,15 +2545,15 @@ const cr = ({
2545
2545
  onClick: () => u(0),
2546
2546
  "aria-label": "Play video",
2547
2547
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2548
- children: /* @__PURE__ */ s(Ms, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2548
+ children: /* @__PURE__ */ s(As, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2549
2549
  }
2550
2550
  ),
2551
2551
  l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: l }) }) : null,
2552
2552
  /* @__PURE__ */ s(
2553
- As,
2553
+ Ts,
2554
2554
  {
2555
2555
  open: o,
2556
- items: Rs(
2556
+ items: Ms(
2557
2557
  [{ src: e, poster: t, mimeType: n, preload: r }],
2558
2558
  a
2559
2559
  ),
@@ -2562,7 +2562,7 @@ const cr = ({
2562
2562
  }
2563
2563
  )
2564
2564
  ] });
2565
- }, Ls = ({
2565
+ }, Rs = ({
2566
2566
  state: e,
2567
2567
  src: t,
2568
2568
  poster: n,
@@ -2574,13 +2574,13 @@ const cr = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Lr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2577
+ const p = Mr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: g, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2578
2578
  u
2579
2579
  );
2580
2580
  if (p.length === 0)
2581
2581
  return null;
2582
2582
  const b = p.map(
2583
- (f, x) => Rr(f, x, p.length)
2583
+ (f, x) => Ar(f, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2599,10 +2599,10 @@ const cr = ({
2599
2599
  }
2600
2600
  ) }),
2601
2601
  /* @__PURE__ */ s(
2602
- As,
2602
+ Ts,
2603
2603
  {
2604
2604
  open: g,
2605
- items: Rs(p, r),
2605
+ items: Ms(p, r),
2606
2606
  initialIndex: c,
2607
2607
  onClose: w
2608
2608
  }
@@ -2610,25 +2610,38 @@ const cr = ({
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, zr = (e) => /* @__PURE__ */ s(Dr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Or = {
2614
- Composer: zr,
2615
- Sent: Pr,
2616
- Received: Fr
2617
- }, ye = {
2618
- Image: Nr,
2619
- Video: Or,
2620
- Audio: tr,
2621
- Pdf: Ar,
2622
- File: fr
2623
- }, $r = {
2613
+ }, Lr = (e) => /* @__PURE__ */ s(Rr, { ...e }), Dr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "sent" }), zr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "received" }), Pr = {
2614
+ Composer: Lr,
2615
+ Sent: Dr,
2616
+ Received: zr
2617
+ }, Ne = {
2618
+ Image: wr,
2619
+ Video: Pr,
2620
+ Audio: Qa,
2621
+ Pdf: Ir,
2622
+ File: mr
2623
+ }, Fr = {
2624
2624
  isUnlocking: () => !1
2625
- }, jr = {
2626
- LockedAttachment: $r
2627
- }, Ds = rt({}), ml = Ds.Provider;
2628
- function Br(e) {
2629
- return Ie(Ds)[e] ?? jr[e];
2625
+ }, Or = {
2626
+ LockedAttachment: Fr
2627
+ }, Ls = at({}), cl = Ls.Provider;
2628
+ function $r(e) {
2629
+ return Se(Ls)[e] ?? Or[e];
2630
2630
  }
2631
- const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2631
+ const jr = ({
2632
+ message: e,
2633
+ endOfGroup: t
2634
+ }) => !t || e.type === "error" || e.status !== "received" ? null : /* @__PURE__ */ m(
2635
+ "div",
2636
+ {
2637
+ className: "str-chat__message-delivery-status",
2638
+ "data-testid": "message-delivery-status",
2639
+ children: [
2640
+ /* @__PURE__ */ s(Hn, { size: 14, weight: "bold", "aria-hidden": "true" }),
2641
+ /* @__PURE__ */ s("span", { children: "Delivered" })
2642
+ ]
2643
+ }
2644
+ ), Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2632
2645
  "svg",
2633
2646
  {
2634
2647
  width: e,
@@ -2645,21 +2658,21 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2658
  }
2646
2659
  )
2647
2660
  }
2648
- ), Vr = (e) => {
2661
+ ), Ur = (e) => {
2649
2662
  var t;
2650
2663
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2651
- }, Gr = (e) => {
2664
+ }, Vr = (e) => {
2652
2665
  var t;
2653
2666
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2654
2667
  }, Fe = (e) => {
2655
2668
  var t;
2656
2669
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2657
- }, Hr = (e) => {
2670
+ }, Gr = (e) => {
2658
2671
  var t;
2659
2672
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2660
- }, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
2673
+ }, Ds = (e) => Ur(e) || Vr(e), Hr = (e) => {
2661
2674
  var t;
2662
- return zs(e) && !((t = e.text) != null && t.trim());
2675
+ return Ds(e) && !((t = e.text) != null && t.trim());
2663
2676
  }, Ke = ({
2664
2677
  message: e,
2665
2678
  standalone: t = !1,
@@ -2667,7 +2680,7 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2667
2680
  hasAttachment: a = !1
2668
2681
  }) => {
2669
2682
  var h;
2670
- const r = zs(e), i = Fe(e);
2683
+ const r = Ds(e), i = Fe(e);
2671
2684
  if (!r && !i)
2672
2685
  return null;
2673
2686
  if (r) {
@@ -2675,7 +2688,7 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2675
2688
  if (!g) return null;
2676
2689
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
2690
  return /* @__PURE__ */ m("div", { className: c, children: [
2678
- /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2691
+ /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2679
2692
  /* @__PURE__ */ s("span", { children: v })
2680
2693
  ] });
2681
2694
  }
@@ -2683,15 +2696,15 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2683
2696
  "message-chatbot-indicator",
2684
2697
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2685
2698
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2686
- ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Ur, { size: l ? 12 : 15 }) });
2687
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
2699
+ ].join(" "), u = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), p = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(Br, { size: l ? 12 : 15 }) });
2700
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(te, { children: [
2688
2701
  u,
2689
2702
  p
2690
- ] }) : /* @__PURE__ */ m(ee, { children: [
2703
+ ] }) : /* @__PURE__ */ m(te, { children: [
2691
2704
  p,
2692
2705
  u
2693
2706
  ] }) });
2694
- }, qr = ({
2707
+ }, Yr = ({
2695
2708
  selected: e,
2696
2709
  onVoteUp: t,
2697
2710
  onVoteDown: n
@@ -2707,7 +2720,7 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2707
2720
  "aria-label": "Good response",
2708
2721
  "aria-pressed": e === "up",
2709
2722
  "data-tooltip": "Good response",
2710
- children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2723
+ children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2711
2724
  }
2712
2725
  ),
2713
2726
  /* @__PURE__ */ s(
@@ -2721,45 +2734,29 @@ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2721
2734
  "aria-label": "Bad response",
2722
2735
  "aria-pressed": e === "down",
2723
2736
  "data-tooltip": "Bad response",
2724
- children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2737
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2725
2738
  }
2726
2739
  )
2727
- ] }), Je = () => {
2728
- const { lastOwnMessage: e, message: t } = _e(
2729
- "SentMessageDeliveryStatus"
2730
- );
2731
- return (e == null ? void 0 : e.id) !== t.id ? null : /* @__PURE__ */ m(ee, { children: [
2732
- /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2733
- /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2734
- ] });
2735
- }, Wr = () => null, Xr = () => /* @__PURE__ */ s(
2736
- Xs,
2737
- {
2738
- MessageSentStatus: Je,
2739
- MessageDeliveredStatus: Je,
2740
- MessageReadStatus: Je,
2741
- MessageSendingStatus: Wr
2742
- }
2743
- ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2744
- function _t(e) {
2740
+ ] }), qr = /^([a-z][a-z0-9+.-]*):/i, Wr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2741
+ function wt(e) {
2745
2742
  if (typeof e != "string") return;
2746
2743
  const t = e.trim();
2747
2744
  if (t === "") return;
2748
- const n = Kr.exec(t);
2745
+ const n = qr.exec(t);
2749
2746
  if (n) {
2750
2747
  const a = n[1].toLowerCase();
2751
- return Jr.has(a) ? t : void 0;
2748
+ return Wr.has(a) ? t : void 0;
2752
2749
  }
2753
2750
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2754
2751
  }
2755
- const Zr = {
2752
+ const Xr = {
2756
2753
  dark: "bg-white text-[#121110] hover:bg-white/90",
2757
2754
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2758
- }, Qr = ({ variant: e, cta: t }) => {
2755
+ }, Kr = ({ variant: e, cta: t }) => {
2759
2756
  const n = k(
2760
2757
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2761
- Zr[e]
2762
- ), a = _t(t.href);
2758
+ Xr[e]
2759
+ ), a = wt(t.href);
2763
2760
  return a ? /* @__PURE__ */ s(
2764
2761
  "a",
2765
2762
  {
@@ -2785,13 +2782,13 @@ const Zr = {
2785
2782
  children: t.label
2786
2783
  }
2787
2784
  );
2788
- }, ei = {
2785
+ }, Jr = {
2789
2786
  dark: "text-white",
2790
2787
  light: "text-black/90"
2791
- }, ti = "text-white/30", si = {
2788
+ }, Zr = "text-white/30", Qr = {
2792
2789
  dark: "text-white/55",
2793
2790
  light: "text-black/55"
2794
- }, Nt = ({
2791
+ }, _t = ({
2795
2792
  variant: e,
2796
2793
  title: t,
2797
2794
  placeholderTitle: n,
@@ -2805,10 +2802,10 @@ const Zr = {
2805
2802
  if (!p && !h && !c && !v) return null;
2806
2803
  const b = k(
2807
2804
  "truncate text-base font-medium leading-6",
2808
- d && !t ? ti : ei[e]
2805
+ d && !t ? Zr : Jr[e]
2809
2806
  ), f = k(
2810
2807
  "truncate text-xs leading-4",
2811
- si[e]
2808
+ Qr[e]
2812
2809
  );
2813
2810
  return /* @__PURE__ */ m("div", { className: "px-4 py-3", children: [
2814
2811
  /* @__PURE__ */ m("div", { className: "flex items-end gap-3", children: [
@@ -2824,9 +2821,9 @@ const Zr = {
2824
2821
  ] }),
2825
2822
  o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
2826
2823
  ] }),
2827
- l && /* @__PURE__ */ s(Qr, { variant: e, cta: l })
2824
+ l && /* @__PURE__ */ s(Kr, { variant: e, cta: l })
2828
2825
  ] });
2829
- }, ni = k(
2826
+ }, ei = k(
2830
2827
  "relative block w-[280px] select-none overflow-hidden rounded-md",
2831
2828
  // 1px hairline border that sits flush with the card chrome — matches
2832
2829
  // the messaging design system's "small border around link attachments"
@@ -2845,7 +2842,7 @@ const Zr = {
2845
2842
  "data-testid": d
2846
2843
  }) => {
2847
2844
  const u = n != null || a != null, p = k(
2848
- ni,
2845
+ ei,
2849
2846
  o ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
2850
2847
  // `focus-ring` is a design-system utility from the component-library
2851
2848
  // tailwind preset — outline-none + a black 2px focus-visible ring
@@ -2893,17 +2890,17 @@ const Zr = {
2893
2890
  ]
2894
2891
  }
2895
2892
  );
2896
- }, ai = {
2893
+ }, ti = {
2897
2894
  dark: "bg-white/10",
2898
2895
  light: "bg-black/5"
2899
- }, ri = {
2896
+ }, si = {
2900
2897
  dark: "size-16 text-white/25",
2901
2898
  light: "size-16 text-black/25"
2902
- }, Ve = (e, t) => !!t && !!e && le(e) === "audio", yt = (e, t) => {
2899
+ }, Ve = (e, t) => !!t && !!e && le(e) === "audio", Nt = (e, t) => {
2903
2900
  if (!t || !e) return !1;
2904
2901
  const n = le(e);
2905
2902
  return n === "video" || n === "audio";
2906
- }, kt = "bg-[#F2F3F4]", $e = ({
2903
+ }, yt = "bg-[#F2F3F4]", $e = ({
2907
2904
  variant: e,
2908
2905
  thumbnailUrl: t,
2909
2906
  sourceUrl: n,
@@ -2954,10 +2951,10 @@ const Zr = {
2954
2951
  {
2955
2952
  className: k(
2956
2953
  "flex h-full w-full items-center justify-center",
2957
- ai[e]
2954
+ ti[e]
2958
2955
  ),
2959
2956
  children: we(r, {
2960
- className: ri[e],
2957
+ className: si[e],
2961
2958
  weight: "regular"
2962
2959
  })
2963
2960
  }
@@ -2967,7 +2964,7 @@ const Zr = {
2967
2964
  ]
2968
2965
  }
2969
2966
  );
2970
- }, ii = ({
2967
+ }, ni = ({
2971
2968
  title: e,
2972
2969
  placeholderTitle: t,
2973
2970
  description: n,
@@ -2997,10 +2994,10 @@ const Zr = {
2997
2994
  onClick: h,
2998
2995
  "aria-label": "Edit attachment",
2999
2996
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3000
- children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
2997
+ children: /* @__PURE__ */ s(Xn, { className: "size-5", weight: "regular" })
3001
2998
  }
3002
2999
  ) : void 0;
3003
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3000
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3004
3001
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3005
3002
  $e,
3006
3003
  {
@@ -3029,7 +3026,7 @@ const Zr = {
3029
3026
  }
3030
3027
  ),
3031
3028
  /* @__PURE__ */ s(
3032
- Nt,
3029
+ _t,
3033
3030
  {
3034
3031
  variant: "dark",
3035
3032
  title: e,
@@ -3044,7 +3041,7 @@ const Zr = {
3044
3041
  ]
3045
3042
  }
3046
3043
  );
3047
- }, li = ({
3044
+ }, ai = ({
3048
3045
  title: e,
3049
3046
  description: t,
3050
3047
  url: n,
@@ -3056,7 +3053,7 @@ const Zr = {
3056
3053
  cta: d,
3057
3054
  onClick: u
3058
3055
  }) => {
3059
- const p = yt(a, i), h = _t(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? kt : void 0, w = d && u ? {
3056
+ const p = Nt(a, i), h = wt(n), g = d == null && h != null && !p ? h : void 0, c = d == null && !p ? u : void 0, v = Ve(a, i) ? yt : void 0, w = d && u ? {
3060
3057
  ...d,
3061
3058
  onClick: () => {
3062
3059
  var b;
@@ -3084,7 +3081,7 @@ const Zr = {
3084
3081
  }
3085
3082
  ),
3086
3083
  /* @__PURE__ */ s(
3087
- Nt,
3084
+ _t,
3088
3085
  {
3089
3086
  variant: "light",
3090
3087
  title: e,
@@ -3097,7 +3094,7 @@ const Zr = {
3097
3094
  ]
3098
3095
  }
3099
3096
  );
3100
- }, oi = ({
3097
+ }, ri = ({
3101
3098
  title: e,
3102
3099
  placeholderTitle: t,
3103
3100
  description: n,
@@ -3110,14 +3107,14 @@ const Zr = {
3110
3107
  cta: u,
3111
3108
  onClick: p
3112
3109
  }) => {
3113
- const h = yt(r, l), g = _t(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3110
+ const h = Nt(r, l), g = wt(a), c = u == null && g != null && !h ? g : void 0, v = u == null && !h && c != null ? p : void 0;
3114
3111
  return /* @__PURE__ */ m(
3115
3112
  Oe,
3116
3113
  {
3117
3114
  variant: "dark",
3118
3115
  href: c,
3119
3116
  onClick: v,
3120
- bgClassName: Ve(r, l) ? kt : void 0,
3117
+ bgClassName: Ve(r, l) ? yt : void 0,
3121
3118
  children: [
3122
3119
  o === "featured" && /* @__PURE__ */ s(
3123
3120
  $e,
@@ -3130,7 +3127,7 @@ const Zr = {
3130
3127
  }
3131
3128
  ),
3132
3129
  /* @__PURE__ */ s(
3133
- Nt,
3130
+ _t,
3134
3131
  {
3135
3132
  variant: "dark",
3136
3133
  title: e,
@@ -3144,22 +3141,22 @@ const Zr = {
3144
3141
  ]
3145
3142
  }
3146
3143
  );
3147
- }, es = {
3148
- Composer: ii,
3149
- Sent: oi,
3150
- Received: li
3151
- }, ci = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", di = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3144
+ }, Qt = {
3145
+ Composer: ni,
3146
+ Sent: ri,
3147
+ Received: ai
3148
+ }, ii = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#121110] px-4 py-2 text-white", li = "mt-[2px] max-w-[280px] whitespace-pre-wrap break-words rounded-[18px] bg-[#e9eaed] px-4 py-2 text-[#080707]";
3152
3149
  function P(e) {
3153
3150
  const t = e == null ? void 0 : e.trim();
3154
3151
  return t || void 0;
3155
3152
  }
3156
- function ts(e) {
3153
+ function es(e) {
3157
3154
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3158
3155
  }
3159
- function ui(e, t) {
3156
+ function oi(e, t) {
3160
3157
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3161
3158
  return !1;
3162
- const n = ts(e), a = ts(t);
3159
+ const n = es(e), a = es(t);
3163
3160
  if (n === a)
3164
3161
  return !0;
3165
3162
  if (!n.includes(a))
@@ -3167,7 +3164,7 @@ function ui(e, t) {
3167
3164
  const r = n.split(a).join("");
3168
3165
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3169
3166
  }
3170
- function ss(e) {
3167
+ function ts(e) {
3171
3168
  const t = P(e.og_scrape_url) ?? P(e.title_link), n = P(e.image_url) ?? P(e.thumb_url), a = P(e.asset_url), r = P(e.mime_type);
3172
3169
  return {
3173
3170
  title: P(e.title),
@@ -3177,19 +3174,19 @@ function ss(e) {
3177
3174
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3178
3175
  // native video/audio player in the hero instead of a static thumbnail.
3179
3176
  sourceUrl: a,
3180
- layout: n || yt(r, a) ? "featured" : "classic",
3177
+ layout: n || Nt(r, a) ? "featured" : "classic",
3181
3178
  mimeType: r
3182
3179
  };
3183
3180
  }
3184
- function mi(e) {
3181
+ function ci(e) {
3185
3182
  var t;
3186
- return Ps(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3183
+ return zs(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
3187
3184
  }
3188
- function Ps(e) {
3185
+ function zs(e) {
3189
3186
  const t = P(e.og_scrape_url);
3190
3187
  return e.type === "link" || !!t && !e.asset_url;
3191
3188
  }
3192
- function Fs(e) {
3189
+ function Ps(e) {
3193
3190
  if (!(e != null && e.length)) return [];
3194
3191
  const t = [], n = (r, i) => {
3195
3192
  const l = t[t.length - 1];
@@ -3207,51 +3204,51 @@ function Fs(e) {
3207
3204
  t.push({ type: "link", attachments: [r] });
3208
3205
  };
3209
3206
  for (const r of e) {
3210
- if (Ps(r)) {
3207
+ if (zs(r)) {
3211
3208
  a(r);
3212
3209
  continue;
3213
3210
  }
3214
- const i = mi(r);
3211
+ const i = ci(r);
3215
3212
  i && n(i, r);
3216
3213
  }
3217
3214
  return t;
3218
3215
  }
3219
- function hi(e) {
3216
+ function di(e) {
3220
3217
  let t = 0;
3221
3218
  for (const n of e)
3222
3219
  t += n.type === "link" ? n.attachments.length : 1;
3223
3220
  return t;
3224
3221
  }
3225
- function fi(e) {
3222
+ function ui(e) {
3226
3223
  return e.filter((t) => t.type === "media").length;
3227
3224
  }
3228
- function gi(e, t, n) {
3225
+ function mi(e, t, n) {
3229
3226
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3230
3227
  }
3231
- function ns(e) {
3228
+ function ss(e) {
3232
3229
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3233
3230
  }
3234
- function pi(e) {
3231
+ function hi(e) {
3235
3232
  switch (e) {
3236
3233
  case "image":
3237
- return ye.Image;
3234
+ return Ne.Image;
3238
3235
  case "video":
3239
- return ye.Video;
3236
+ return Ne.Video;
3240
3237
  case "audio":
3241
- return ye.Audio;
3238
+ return Ne.Audio;
3242
3239
  case "pdf":
3243
- return ye.Pdf;
3240
+ return Ne.Pdf;
3244
3241
  default:
3245
- return ye.File;
3242
+ return Ne.File;
3246
3243
  }
3247
3244
  }
3248
- function bi(e, t) {
3245
+ function fi(e, t) {
3249
3246
  if (t.length > 1)
3250
3247
  switch (e) {
3251
3248
  case "image":
3252
3249
  return {
3253
3250
  items: t.map((a) => ({
3254
- src: ns(a),
3251
+ src: ss(a),
3255
3252
  alt: P(a.title)
3256
3253
  }))
3257
3254
  };
@@ -3302,7 +3299,7 @@ function bi(e, t) {
3302
3299
  switch (e) {
3303
3300
  case "image":
3304
3301
  return {
3305
- src: ns(n),
3302
+ src: ss(n),
3306
3303
  alt: P(n.title)
3307
3304
  };
3308
3305
  case "video":
@@ -3332,48 +3329,48 @@ function bi(e, t) {
3332
3329
  };
3333
3330
  }
3334
3331
  }
3335
- function vi({
3332
+ function gi({
3336
3333
  groupPosition: e,
3337
3334
  isMyMessage: t,
3338
3335
  segment: n,
3339
3336
  text: a
3340
3337
  }) {
3341
- const r = pi(n.kind), i = {
3342
- ...bi(n.kind, n.attachments),
3338
+ const r = hi(n.kind), i = {
3339
+ ...fi(n.kind, n.attachments),
3343
3340
  groupPosition: e,
3344
3341
  ...a ? { text: a } : {}
3345
3342
  };
3346
3343
  return t ? /* @__PURE__ */ s(r.Sent, { ...i }) : /* @__PURE__ */ s(r.Received, { ...i });
3347
3344
  }
3348
- const xi = ({
3345
+ const pi = ({
3349
3346
  groupPosition: e,
3350
3347
  isMyMessage: t,
3351
3348
  message: n
3352
3349
  }) => {
3353
3350
  var w;
3354
- const a = Fs(n.attachments);
3351
+ const a = Ps(n.attachments);
3355
3352
  if (a.length === 0) return null;
3356
- const r = hi(a), i = fi(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
3353
+ const r = di(a), i = ui(a), l = (w = n.text) == null ? void 0 : w.trim(), o = a.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ts(o.attachments[0] ?? {}).url : void 0, u = l && oi(l, d) ? void 0 : l;
3357
3354
  let p = 0, h = 0;
3358
3355
  const g = [], c = (b, f) => {
3359
3356
  const x = p === r - 1;
3360
3357
  p += 1;
3361
- const N = t ? es.Sent : es.Received;
3358
+ const N = t ? Qt.Sent : Qt.Received;
3362
3359
  g.push(
3363
3360
  /* @__PURE__ */ m(U.Fragment, { children: [
3364
- /* @__PURE__ */ s(N, { ...ss(b) }),
3365
- x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3361
+ /* @__PURE__ */ s(N, { ...ts(b) }),
3362
+ x && u ? /* @__PURE__ */ s("div", { className: t ? ii : li, children: u }) : null
3366
3363
  ] }, f)
3367
3364
  );
3368
3365
  }, v = (b, f) => {
3369
- const x = p === r - 1, N = gi(
3366
+ const x = p === r - 1, N = mi(
3370
3367
  h,
3371
3368
  i,
3372
3369
  e
3373
3370
  );
3374
3371
  p += 1, h += 1, g.push(
3375
3372
  /* @__PURE__ */ s(
3376
- vi,
3373
+ gi,
3377
3374
  {
3378
3375
  groupPosition: N,
3379
3376
  isMyMessage: t,
@@ -3392,9 +3389,9 @@ const xi = ({
3392
3389
  return;
3393
3390
  }
3394
3391
  v(b, `media-${f}`);
3395
- }), /* @__PURE__ */ s(ee, { children: g });
3396
- }, wi = (e) => {
3397
- var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3392
+ }), /* @__PURE__ */ s(te, { children: g });
3393
+ }, bi = (e) => {
3394
+ var Tt, At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut;
3398
3395
  const {
3399
3396
  additionalMessageInputProps: t,
3400
3397
  chatbotVotingEnabled: n,
@@ -3412,52 +3409,52 @@ const xi = ({
3412
3409
  renderText: v,
3413
3410
  threadList: w,
3414
3411
  viewerLanguage: b
3415
- } = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = Br("LockedAttachment"), [D, L] = B(!1), O = Js(c.id), { selected: z, voteUp: y, voteDown: A } = xa(c), {
3416
- Attachment: E = Zs,
3417
- EditMessageModal: C = Qs,
3412
+ } = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: E, onFetchSource: T, onDownloadClick: M } = $r("LockedAttachment"), [D, L] = B(!1), O = Xs(c.id), { selected: z, voteUp: y, voteDown: A } = ba(c), {
3413
+ Attachment: S = Ks,
3414
+ EditMessageModal: C = Js,
3418
3415
  MessageActions: I,
3419
- MessageBlocked: $ = en,
3420
- MessageBouncePrompt: F = tn,
3421
- MessageDeleted: V = sn,
3422
- MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3423
- MessageRepliesCountButton: te = an,
3424
- ReminderNotification: X = rn,
3425
- StreamedMessageText: _ = ln,
3416
+ MessageBlocked: $ = Zs,
3417
+ MessageBouncePrompt: F = Qs,
3418
+ MessageDeleted: V = en,
3419
+ MessageIsThreadReplyInChannelButtonIndicator: Q = tn,
3420
+ MessageRepliesCountButton: ee = sn,
3421
+ ReminderNotification: X = nn,
3422
+ StreamedMessageText: _ = an,
3426
3423
  PinIndicator: R
3427
- } = is("CustomMessage"), H = on(c), q = cn(c), Y = ae(
3424
+ } = rs("CustomMessage"), H = rn(c), q = ln(c), Y = ae(
3428
3425
  () => h == null ? void 0 : h(c),
3429
3426
  [h, c]
3430
3427
  ), j = ae(() => {
3431
3428
  const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3432
3429
  if (!Fe(c)) return pe;
3433
- const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3434
- return Gt.length === pe.length ? pe : Gt;
3430
+ const Vt = pe.filter((Gt) => !("type" in Gt) || !xs(Gt));
3431
+ return Vt.length === pe.length ? pe : Vt;
3435
3432
  }, [c]), W = ae(
3436
- () => Fs(j),
3433
+ () => Ps(j),
3437
3434
  [j]
3438
3435
  ), Z = ae(() => {
3439
- const de = hs({ message: c, viewerLanguage: b });
3436
+ const de = ms({ message: c, viewerLanguage: b });
3440
3437
  return de === c.text ? c : { ...c, text: de };
3441
3438
  }, [c, b]), oe = W.length > 0, Le = W.reduce(
3442
3439
  (de, pe) => de + pe.attachments.length,
3443
3440
  0
3444
- ) === ((j == null ? void 0 : j.length) ?? 0), De = Xa(
3441
+ ) === ((j == null ? void 0 : j.length) ?? 0), De = qa(
3445
3442
  {
3446
3443
  endOfGroup: r,
3447
3444
  firstOfGroup: i,
3448
3445
  groupedByUser: l
3449
3446
  }
3450
3447
  );
3451
- if (dn(c))
3448
+ if (on(c))
3452
3449
  return null;
3453
3450
  if (c.deleted_at || c.type === "deleted")
3454
3451
  return /* @__PURE__ */ s(V, { message: c });
3455
- if (un(c))
3452
+ if (cn(c))
3456
3453
  return /* @__PURE__ */ s($, {});
3457
- const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3454
+ const ne = !w && !!c.reply_count, ce = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((Tt = c.error) == null ? void 0 : Tt.status) !== 403, Ct = dn(c);
3458
3455
  let he;
3459
- ie ? he = () => u(c) : St && (he = () => L(!0));
3460
- const fe = g(), Us = k(
3456
+ ie ? he = () => u(c) : Ct && (he = () => L(!0));
3457
+ const fe = g(), Bs = k(
3461
3458
  "str-chat__message str-chat__message-simple",
3462
3459
  `str-chat__message--${c.type}`,
3463
3460
  `str-chat__message--${c.status}`,
@@ -3468,14 +3465,14 @@ const xi = ({
3468
3465
  "str-chat__message--highlighted": p,
3469
3466
  "str-chat__message--pinned pinned-message": c.pinned,
3470
3467
  "str-chat__message--with-reactions": q,
3471
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
3468
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((At = c == null ? void 0 : c.error) == null ? void 0 : At.status) !== 403,
3472
3469
  "str-chat__message-with-thread-link": ne || ce,
3473
3470
  "str-chat__virtual-message__wrapper--end": r,
3474
3471
  "str-chat__virtual-message__wrapper--first": i,
3475
3472
  "str-chat__virtual-message__wrapper--group": l
3476
3473
  }
3477
- ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(j != null && j.length && !c.quoted_message), Tt = ge && fe && He, Vs = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
3478
- return /* @__PURE__ */ m(ee, { children: [
3474
+ ), Ge = c.poll_id && f.polls.fromState(c.poll_id), Et = Hr(c), ge = Fe(c), St = Gr(c), He = !!(j != null && j.length && !c.quoted_message), It = ge && fe && He, Us = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
3475
+ return /* @__PURE__ */ m(te, { children: [
3479
3476
  a && /* @__PURE__ */ s(
3480
3477
  C,
3481
3478
  {
@@ -3483,7 +3480,7 @@ const xi = ({
3483
3480
  }
3484
3481
  ),
3485
3482
  D && /* @__PURE__ */ s(
3486
- hn,
3483
+ un,
3487
3484
  {
3488
3485
  MessageBouncePrompt: F,
3489
3486
  onClose: () => L(!1),
@@ -3493,7 +3490,7 @@ const xi = ({
3493
3490
  /* @__PURE__ */ m(
3494
3491
  "div",
3495
3492
  {
3496
- className: Us,
3493
+ className: Bs,
3497
3494
  "data-message-id": c.id,
3498
3495
  "data-dd-privacy": "mask",
3499
3496
  children: [
@@ -3515,7 +3512,7 @@ const xi = ({
3515
3512
  "div",
3516
3513
  {
3517
3514
  className: k("str-chat__message-inner", {
3518
- "str-chat__simple-message--error-failed": ie || St
3515
+ "str-chat__simple-message--error-failed": ie || Ct
3519
3516
  }),
3520
3517
  "data-testid": "message-inner",
3521
3518
  onClick: he,
@@ -3528,34 +3525,34 @@ const xi = ({
3528
3525
  marginInlineEnd: 0,
3529
3526
  marginInlineStart: 0
3530
3527
  },
3531
- children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3528
+ children: St ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3532
3529
  fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3533
3530
  I && /* @__PURE__ */ s(I, {}),
3534
3531
  /* @__PURE__ */ s(
3535
- Zt.Sent,
3532
+ Jt.Sent,
3536
3533
  {
3537
- title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3538
- mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3539
- thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3540
- amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3541
- detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3542
- paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
3543
- onPreviewClick: () => S == null ? void 0 : S(c, x),
3534
+ title: (Mt = c.metadata) == null ? void 0 : Mt.attachment_title,
3535
+ mimeType: (Rt = c.metadata) == null ? void 0 : Rt.attachment_mime_type,
3536
+ thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3537
+ amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
3538
+ detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
3539
+ paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
3540
+ onPreviewClick: () => E == null ? void 0 : E(c, x),
3544
3541
  onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3545
3542
  }
3546
3543
  )
3547
3544
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3548
3545
  /* @__PURE__ */ s(
3549
- Zt.Received,
3546
+ Jt.Received,
3550
3547
  {
3551
- title: (Ot = c.metadata) == null ? void 0 : Ot.attachment_title,
3552
- mimeType: ($t = c.metadata) == null ? void 0 : $t.attachment_mime_type,
3553
- thumbnailUrl: (jt = c.metadata) == null ? void 0 : jt.attachment_thumbnail,
3554
- amountText: (Bt = c.metadata) == null ? void 0 : Bt.amount_text,
3555
- detail: (Ut = c.metadata) == null ? void 0 : Ut.attachment_detail,
3556
- paymentStatus: (Vt = c.metadata) == null ? void 0 : Vt.payment_status,
3548
+ title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
3549
+ mimeType: (Ot = c.metadata) == null ? void 0 : Ot.attachment_mime_type,
3550
+ thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
3551
+ amountText: (jt = c.metadata) == null ? void 0 : jt.amount_text,
3552
+ detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
3553
+ paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
3557
3554
  isUnlocking: N(c.id),
3558
- onUnlockClick: () => S == null ? void 0 : S(c, x),
3555
+ onUnlockClick: () => E == null ? void 0 : E(c, x),
3559
3556
  onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
3560
3557
  onDownloadClick: () => M == null ? void 0 : M(c, x)
3561
3558
  }
@@ -3563,7 +3560,7 @@ const xi = ({
3563
3560
  I && /* @__PURE__ */ s(I, {})
3564
3561
  ] }),
3565
3562
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3566
- qt,
3563
+ Yt,
3567
3564
  {
3568
3565
  message: Z,
3569
3566
  renderText: v
@@ -3572,7 +3569,7 @@ const xi = ({
3572
3569
  ] }) : Et ? (
3573
3570
  /* Tip-only messages render as a standalone bubble */
3574
3571
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3575
- ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3572
+ ) : Us ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3576
3573
  "div",
3577
3574
  {
3578
3575
  className: "str-chat__message-bubble",
@@ -3584,7 +3581,7 @@ const xi = ({
3584
3581
  },
3585
3582
  children: [
3586
3583
  /* @__PURE__ */ s(
3587
- xi,
3584
+ pi,
3588
3585
  {
3589
3586
  groupPosition: De,
3590
3587
  isMyMessage: fe,
@@ -3594,11 +3591,11 @@ const xi = ({
3594
3591
  }
3595
3592
  }
3596
3593
  ),
3597
- /* @__PURE__ */ s(Wt, {})
3594
+ /* @__PURE__ */ s(qt, {})
3598
3595
  ]
3599
3596
  }
3600
3597
  ) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3601
- ge && !Tt && /* @__PURE__ */ s(
3598
+ ge && !It && /* @__PURE__ */ s(
3602
3599
  Ke,
3603
3600
  {
3604
3601
  message: c,
@@ -3606,9 +3603,9 @@ const xi = ({
3606
3603
  isMyMessage: fe
3607
3604
  }
3608
3605
  ),
3609
- Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3606
+ Ge && /* @__PURE__ */ s(mn, { poll: Ge }),
3610
3607
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3611
- E,
3608
+ S,
3612
3609
  {
3613
3610
  actionHandler: o,
3614
3611
  attachments: j
@@ -3621,18 +3618,18 @@ const xi = ({
3621
3618
  renderText: v
3622
3619
  }
3623
3620
  ) : /* @__PURE__ */ s(
3624
- qt,
3621
+ Yt,
3625
3622
  {
3626
3623
  message: Z,
3627
3624
  renderText: v
3628
3625
  }
3629
3626
  ),
3630
- /* @__PURE__ */ s(Wt, {})
3627
+ /* @__PURE__ */ s(qt, {})
3631
3628
  ] }) })
3632
3629
  }
3633
3630
  ),
3634
- !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3635
- (!ge || Tt) && /* @__PURE__ */ s(
3631
+ !St && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3632
+ (!ge || It) && /* @__PURE__ */ s(
3636
3633
  Ke,
3637
3634
  {
3638
3635
  message: c,
@@ -3641,7 +3638,7 @@ const xi = ({
3641
3638
  }
3642
3639
  ),
3643
3640
  n && ge && /* @__PURE__ */ s(
3644
- qr,
3641
+ Yr,
3645
3642
  {
3646
3643
  selected: z,
3647
3644
  onVoteUp: y,
@@ -3649,9 +3646,9 @@ const xi = ({
3649
3646
  }
3650
3647
  )
3651
3648
  ] }),
3652
- /* @__PURE__ */ s(Xr, {}),
3649
+ /* @__PURE__ */ s(jr, { message: c, endOfGroup: r }),
3653
3650
  ne && /* @__PURE__ */ s(
3654
- te,
3651
+ ee,
3655
3652
  {
3656
3653
  onClick: d,
3657
3654
  reply_count: c.reply_count
@@ -3663,53 +3660,50 @@ const xi = ({
3663
3660
  c.id
3664
3661
  )
3665
3662
  ] });
3666
- }, _i = U.memo(
3667
- wi,
3668
- (e, t) => {
3669
- var n, a;
3670
- return e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || ((n = e.lastOwnMessage) == null ? void 0 : n.id) !== ((a = t.lastOwnMessage) == null ? void 0 : a.id) ? !1 : Ks(e, t);
3671
- }
3672
- ), Ni = (e) => {
3673
- const t = _e("CustomMessage");
3674
- return /* @__PURE__ */ s(_i, { ...t, ...e });
3675
- }, yi = () => {
3663
+ }, vi = U.memo(
3664
+ bi,
3665
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ws(e, t)
3666
+ ), xi = (e) => {
3667
+ const t = Ie("CustomMessage");
3668
+ return /* @__PURE__ */ s(vi, { ...t, ...e });
3669
+ }, wi = () => {
3676
3670
  var n;
3677
- const { handleDelete: e, message: t } = _e("CustomMessageActions");
3671
+ const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3678
3672
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3679
- ds,
3673
+ cs,
3680
3674
  {
3681
3675
  onClick: e,
3682
3676
  "aria-label": "Delete",
3683
3677
  title: "Delete",
3684
3678
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3685
- children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3679
+ children: /* @__PURE__ */ s(Kn, { size: 16, weight: "light", "aria-hidden": !0 })
3686
3680
  }
3687
3681
  );
3688
- }, ki = () => {
3689
- const { handleFlag: e } = _e("CustomMessageActions");
3682
+ }, _i = () => {
3683
+ const { handleFlag: e } = Ie("CustomMessageActions");
3690
3684
  return /* @__PURE__ */ s(
3691
- ds,
3685
+ cs,
3692
3686
  {
3693
3687
  onClick: e,
3694
3688
  "aria-label": "Report",
3695
3689
  title: "Report",
3696
3690
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3697
- children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3691
+ children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
3698
3692
  }
3699
3693
  );
3700
- }, Ci = () => {
3694
+ }, Ni = () => {
3701
3695
  var t;
3702
- const { message: e } = _e("CustomMessageActions");
3696
+ const { message: e } = Ie("CustomMessageActions");
3703
3697
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3704
- ta,
3698
+ Qn,
3705
3699
  {
3706
3700
  messageActionSet: [
3707
- { Component: yi, placement: "quick", type: "delete" },
3708
- { Component: ki, placement: "quick", type: "flag" }
3701
+ { Component: wi, placement: "quick", type: "delete" },
3702
+ { Component: _i, placement: "quick", type: "flag" }
3709
3703
  ]
3710
3704
  }
3711
3705
  );
3712
- }, Si = ({
3706
+ }, yi = ({
3713
3707
  link: e,
3714
3708
  onDismiss: t
3715
3709
  }) => {
@@ -3749,14 +3743,14 @@ const xi = ({
3749
3743
  ]
3750
3744
  }
3751
3745
  );
3752
- }, Ei = (e) => ({
3746
+ }, ki = (e) => ({
3753
3747
  linkPreviews: Array.from(e.previews.values()).filter(
3754
- (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3748
+ (t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
3755
3749
  )
3756
- }), Ii = () => {
3757
- const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3750
+ }), Ci = () => {
3751
+ const { linkPreviewsManager: e } = hn(), { linkPreviews: t } = fn(
3758
3752
  e.state,
3759
- Ei
3753
+ ki
3760
3754
  ), n = (r) => {
3761
3755
  e.dismissPreview(r);
3762
3756
  };
@@ -3769,9 +3763,9 @@ const xi = ({
3769
3763
  // block so it keeps its intrinsic height and the container scrolls — a
3770
3764
  // bare flex-column child would be shrunk on the column axis and its
3771
3765
  // fixed-height hero would spill out of the collapsed card box.
3772
- /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(Si, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3766
+ /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 mb-4 overflow-y-auto overscroll-contain", children: t.map((r) => /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(yi, { link: r, onDismiss: n }) }, r.og_scrape_url)) })
3773
3767
  ) : null;
3774
- }, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3768
+ }, kt = U.createContext(!1), dl = () => Se(kt), Ei = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3775
3769
  "button",
3776
3770
  {
3777
3771
  ...n,
@@ -3779,13 +3773,13 @@ const xi = ({
3779
3773
  "aria-label": "Send",
3780
3774
  disabled: t,
3781
3775
  onClick: e,
3782
- children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3776
+ children: /* @__PURE__ */ s(Jn, { weight: "bold", className: "size-4" })
3783
3777
  }
3784
- ), Ai = () => {
3785
- const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3786
- SendButton: r = Ti,
3787
- AttachmentPreviewList: i = wn
3788
- } = is("CustomMessageInput");
3778
+ ), Si = () => {
3779
+ const e = Se(kt), { handleSubmit: t } = pn(), n = bn(), a = e || !n, {
3780
+ SendButton: r = Ei,
3781
+ AttachmentPreviewList: i = vn
3782
+ } = rs("CustomMessageInput");
3789
3783
  return (
3790
3784
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
3791
3785
  // preview list inside is the scrollable region); the textarea + send row
@@ -3801,12 +3795,12 @@ const xi = ({
3801
3795
  className: "central-container flex min-h-0 flex-col gap-2 min-w-0 w-full self-stretch 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)]",
3802
3796
  "data-dd-privacy": "mask",
3803
3797
  children: [
3804
- /* @__PURE__ */ s(_n, {}),
3805
- /* @__PURE__ */ s(Ii, {}),
3798
+ /* @__PURE__ */ s(xn, {}),
3799
+ /* @__PURE__ */ s(Ci, {}),
3806
3800
  /* @__PURE__ */ s(i, {}),
3807
3801
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3808
3802
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3809
- Nn,
3803
+ wn,
3810
3804
  {
3811
3805
  "aria-disabled": e || void 0,
3812
3806
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3832,7 +3826,7 @@ const xi = ({
3832
3826
  }
3833
3827
  )
3834
3828
  );
3835
- }, Mi = ({
3829
+ }, Ii = ({
3836
3830
  renderActions: e,
3837
3831
  renderFooter: t,
3838
3832
  disabled: n = !1,
@@ -3841,7 +3835,7 @@ const xi = ({
3841
3835
  }) => {
3842
3836
  var o;
3843
3837
  const { channel: i } = ue(), l = ((o = i == null ? void 0 : i.data) == null ? void 0 : o.frozen) === !0;
3844
- return n ? /* @__PURE__ */ m(ee, { children: [
3838
+ return n ? /* @__PURE__ */ m(te, { children: [
3845
3839
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3846
3840
  t == null ? void 0 : t()
3847
3841
  ] }) : /* @__PURE__ */ m("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
@@ -3853,67 +3847,67 @@ const xi = ({
3853
3847
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3854
3848
  children: [
3855
3849
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3856
- /* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3850
+ /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(gn, { Input: r ?? Si }) })
3857
3851
  ]
3858
3852
  }
3859
3853
  ),
3860
3854
  t == null ? void 0 : t()
3861
3855
  ] });
3862
- }, Ri = [
3856
+ }, Ti = [
3863
3857
  "SYSTEM_DM_AGENT_PAUSED",
3864
3858
  "SYSTEM_DM_AGENT_RESUMED"
3865
- ], Li = {
3859
+ ], Ai = {
3866
3860
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3867
3861
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3868
- }, Di = [
3862
+ }, Mi = [
3869
3863
  "SYSTEM_AGE_SAFETY_BLOCKED"
3870
- ], zi = {
3864
+ ], Ri = {
3871
3865
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3872
- }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
3866
+ }, Je = "age safety guidelines.", Li = "https://linktr.ee/s/about/contact", ns = (e) => Ti.includes(e), Di = (e) => Mi.includes(e), zi = (e) => {
3873
3867
  var a;
3874
3868
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3875
- if (as(t))
3869
+ if (ns(t))
3876
3870
  return {
3877
3871
  kind: "dm-agent",
3878
3872
  type: t
3879
3873
  };
3880
- if (Fi(t))
3874
+ if (Di(t))
3881
3875
  return {
3882
3876
  kind: "age-safety",
3883
3877
  type: t
3884
3878
  };
3885
3879
  const n = e.dm_agent_system_type;
3886
- if (as(n))
3880
+ if (ns(n))
3887
3881
  return {
3888
3882
  kind: "dm-agent",
3889
3883
  type: n
3890
3884
  };
3891
- }, $i = (e) => {
3892
- const t = e.indexOf(Ze);
3885
+ }, Pi = (e) => {
3886
+ const t = e.indexOf(Je);
3893
3887
  if (t === -1)
3894
3888
  return e;
3895
- const n = t + Ze.length;
3896
- return /* @__PURE__ */ m(ee, { children: [
3889
+ const n = t + Je.length;
3890
+ return /* @__PURE__ */ m(te, { children: [
3897
3891
  e.slice(0, t),
3898
3892
  /* @__PURE__ */ s(
3899
3893
  "a",
3900
3894
  {
3901
- href: Pi,
3895
+ href: Li,
3902
3896
  target: "_blank",
3903
3897
  rel: "noopener noreferrer",
3904
3898
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
3905
- children: Ze
3899
+ children: Je
3906
3900
  }
3907
3901
  ),
3908
3902
  e.slice(n)
3909
3903
  ] });
3910
- }, ji = (e) => {
3904
+ }, Fi = (e) => {
3911
3905
  var a, r;
3912
- const t = e.message.hide_date === !0, n = Oi(
3906
+ const t = e.message.hide_date === !0, n = zi(
3913
3907
  e.message
3914
3908
  );
3915
3909
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3916
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Li[n.type];
3910
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Ai[n.type];
3917
3911
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3918
3912
  /* @__PURE__ */ m(
3919
3913
  "div",
@@ -3939,7 +3933,7 @@ const xi = ({
3939
3933
  ] });
3940
3934
  }
3941
3935
  if ((n == null ? void 0 : n.kind) === "age-safety") {
3942
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || zi[n.type];
3936
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Ri[n.type];
3943
3937
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3944
3938
  /* @__PURE__ */ m(
3945
3939
  "div",
@@ -3949,7 +3943,7 @@ const xi = ({
3949
3943
  "data-age-safety-system-type": n.type,
3950
3944
  children: [
3951
3945
  /* @__PURE__ */ s(
3952
- ea,
3946
+ Zn,
3953
3947
  {
3954
3948
  size: 24,
3955
3949
  weight: "duotone",
@@ -3958,7 +3952,7 @@ const xi = ({
3958
3952
  "data-testid": "age-safety-system-message-icon"
3959
3953
  }
3960
3954
  ),
3961
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: $i(i) }) })
3955
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("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: Pi(i) }) })
3962
3956
  ]
3963
3957
  }
3964
3958
  ),
@@ -3973,7 +3967,7 @@ const xi = ({
3973
3967
  ] }),
3974
3968
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3975
3969
  ] });
3976
- }, Os = rt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3970
+ }, Fs = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
3977
3971
  "animateTransform",
3978
3972
  {
3979
3973
  attributeName: "transform",
@@ -3983,17 +3977,17 @@ const xi = ({
3983
3977
  begin: `${120 * t}ms`,
3984
3978
  repeatCount: "indefinite"
3985
3979
  }
3986
- ) }), Bi = /* @__PURE__ */ new Set([
3980
+ ) }), Oi = /* @__PURE__ */ new Set([
3987
3981
  qe.Thinking,
3988
3982
  qe.Generating,
3989
3983
  qe.ExternalSources
3990
- ]), Ui = ({ threadList: e }) => {
3984
+ ]), $i = ({ threadList: e }) => {
3991
3985
  var v, w;
3992
- const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
3993
- if (!e && o && Bi.has(l)) {
3994
- const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
3986
+ const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = _n(), { aiState: l } = Nn(t), o = Se(Fs);
3987
+ if (!e && o && Oi.has(l)) {
3988
+ const b = ji(t, (v = r.user) == null ? void 0 : v.id);
3995
3989
  return /* @__PURE__ */ s(
3996
- rs,
3990
+ as,
3997
3991
  {
3998
3992
  avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
3999
3993
  avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
@@ -4019,7 +4013,7 @@ const xi = ({
4019
4013
  return null;
4020
4014
  const g = (w = h[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4021
4015
  return /* @__PURE__ */ s(
4022
- rs,
4016
+ as,
4023
4017
  {
4024
4018
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4025
4019
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4027,7 +4021,7 @@ const xi = ({
4027
4021
  testId: "typing-indicator"
4028
4022
  }
4029
4023
  );
4030
- }, rs = ({
4024
+ }, as = ({
4031
4025
  avatarId: e,
4032
4026
  avatarName: t,
4033
4027
  avatarImage: n,
@@ -4062,16 +4056,16 @@ const xi = ({
4062
4056
  height: "13",
4063
4057
  overflow: "visible",
4064
4058
  children: [
4065
- /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4066
- /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4067
- /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4059
+ /* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
4060
+ /* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
4061
+ /* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
4068
4062
  ]
4069
4063
  }
4070
4064
  ) }) }) }) }) })
4071
4065
  ] })
4072
4066
  }
4073
4067
  );
4074
- function Vi(e, t) {
4068
+ function ji(e, t) {
4075
4069
  var a;
4076
4070
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4077
4071
  for (const r of Object.values(n)) {
@@ -4080,7 +4074,7 @@ function Vi(e, t) {
4080
4074
  return i;
4081
4075
  }
4082
4076
  }
4083
- const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4077
+ const Bi = () => null, Ui = ({ className: e, message: t }) => /* @__PURE__ */ m(
4084
4078
  "div",
4085
4079
  {
4086
4080
  className: k("flex items-center justify-center h-full", e),
@@ -4124,11 +4118,11 @@ const Gi = () => null, Hi = ({ className: e, message: t }) => /* @__PURE__ */ m(
4124
4118
  ]
4125
4119
  }
4126
4120
  ), je = U.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ m("div", { className: "flex items-center", children: [
4127
- /* @__PURE__ */ s(Hi, { className: "w-6 h-6" }),
4121
+ /* @__PURE__ */ s(Ui, { className: "w-6 h-6" }),
4128
4122
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4129
4123
  ] }) }));
4130
4124
  je.displayName = "LoadingState";
4131
- const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Yi = ({
4125
+ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Pe = "Replies instantly with AI assistant", Vi = ({
4132
4126
  onBack: e,
4133
4127
  showBackButton: t,
4134
4128
  showStarButton: n = !1,
@@ -4147,7 +4141,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4147
4141
  onParticipantNameClick: w,
4148
4142
  renderHeaderTitleBadges: b
4149
4143
  }) => {
4150
- var A, E, C, I, $, F;
4144
+ var A, S, C, I, $, F;
4151
4145
  const { channel: f } = ue(), { client: x } = me(), N = U.useMemo(
4152
4146
  () => {
4153
4147
  var V;
@@ -4158,11 +4152,11 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4158
4152
  );
4159
4153
  },
4160
4154
  [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4161
- ), S = ct(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = ot(f), D = b == null ? void 0 : b({
4155
+ ), E = ot(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, M = lt(f), D = b == null ? void 0 : b({
4162
4156
  channel: f,
4163
4157
  participant: N
4164
- }), L = "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", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(ee, { children: [
4165
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: S }),
4158
+ }), L = "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", O = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", z = /* @__PURE__ */ m(te, { children: [
4159
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: E }),
4166
4160
  D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4167
4161
  ] }), y = async () => {
4168
4162
  try {
@@ -4187,7 +4181,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4187
4181
  }),
4188
4182
  type: "button",
4189
4183
  "aria-label": "Back to conversations",
4190
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4184
+ children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4191
4185
  }
4192
4186
  ) }),
4193
4187
  /* @__PURE__ */ s(
@@ -4200,7 +4194,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4200
4194
  {
4201
4195
  type: "button",
4202
4196
  onClick: w,
4203
- "aria-label": `View details for ${S}`,
4197
+ "aria-label": `View details for ${E}`,
4204
4198
  className: k(
4205
4199
  L,
4206
4200
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
@@ -4210,7 +4204,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4210
4204
  se,
4211
4205
  {
4212
4206
  id: ((C = N == null ? void 0 : N.user) == null ? void 0 : C.id) || f.id || "unknown",
4213
- name: S,
4207
+ name: E,
4214
4208
  image: T,
4215
4209
  starred: n && M,
4216
4210
  dmAgentEnabled: a,
@@ -4232,7 +4226,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4232
4226
  se,
4233
4227
  {
4234
4228
  id: ((I = N == null ? void 0 : N.user) == null ? void 0 : I.id) || f.id || "unknown",
4235
- name: S,
4229
+ name: E,
4236
4230
  image: T,
4237
4231
  starred: n && M,
4238
4232
  dmAgentEnabled: a,
@@ -4277,7 +4271,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4277
4271
  }
4278
4272
  ),
4279
4273
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
4280
- st,
4274
+ tt,
4281
4275
  {
4282
4276
  channel: f,
4283
4277
  participant: N,
@@ -4307,7 +4301,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4307
4301
  type: "button",
4308
4302
  onClick: e,
4309
4303
  "aria-label": "Back to conversations",
4310
- children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4304
+ children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4311
4305
  }
4312
4306
  ),
4313
4307
  w ? /* @__PURE__ */ m(
@@ -4315,7 +4309,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4315
4309
  {
4316
4310
  type: "button",
4317
4311
  onClick: w,
4318
- "aria-label": `View details for ${S}`,
4312
+ "aria-label": `View details for ${E}`,
4319
4313
  className: k(
4320
4314
  O,
4321
4315
  "appearance-none border-0 bg-transparent transition-opacity hover:opacity-70 focus-ring focus-visible:outline-none"
@@ -4325,7 +4319,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4325
4319
  se,
4326
4320
  {
4327
4321
  id: (($ = N == null ? void 0 : N.user) == null ? void 0 : $.id) || f.id || "unknown",
4328
- name: S,
4322
+ name: E,
4329
4323
  image: T,
4330
4324
  starred: n && M,
4331
4325
  dmAgentEnabled: a,
@@ -4349,7 +4343,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4349
4343
  se,
4350
4344
  {
4351
4345
  id: ((F = N == null ? void 0 : N.user) == null ? void 0 : F.id) || f.id || "unknown",
4352
- name: S,
4346
+ name: E,
4353
4347
  image: T,
4354
4348
  starred: n && M,
4355
4349
  dmAgentEnabled: a,
@@ -4395,7 +4389,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4395
4389
  }
4396
4390
  ),
4397
4391
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
4398
- st,
4392
+ tt,
4399
4393
  {
4400
4394
  channel: f,
4401
4395
  participant: N,
@@ -4414,7 +4408,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4414
4408
  ] })
4415
4409
  ] })
4416
4410
  ] });
4417
- }, qi = ({
4411
+ }, Gi = ({
4418
4412
  onBack: e,
4419
4413
  showBackButton: t,
4420
4414
  renderMessageInputActions: n,
@@ -4435,7 +4429,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4435
4429
  renderChannelBanner: f,
4436
4430
  renderHeaderTitleBadges: x,
4437
4431
  customChannelActions: N,
4438
- renderChannelActions: S,
4432
+ renderChannelActions: E,
4439
4433
  renderMessage: T,
4440
4434
  dmAgentEnabled: M = !1,
4441
4435
  viewerLanguage: D,
@@ -4444,7 +4438,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4444
4438
  composerInput: z
4445
4439
  }) => {
4446
4440
  var _, R, H, q;
4447
- const { channel: y } = ue(), { client: A } = me(), E = U.useMemo(
4441
+ const { channel: y } = ue(), { client: A } = me(), S = U.useMemo(
4448
4442
  () => {
4449
4443
  var Y;
4450
4444
  return Ue(
@@ -4461,10 +4455,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4461
4455
  var oe;
4462
4456
  return ((oe = Z.user) == null ? void 0 : oe.id) === Y;
4463
4457
  }) : void 0;
4464
- }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = E == null ? void 0 : E.user) == null ? void 0 : q.is_account) ?? (E == null ? void 0 : E.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4458
+ }, [A == null ? void 0 : A.userID, (R = y.state) == null ? void 0 : R.members]), I = ((H = C == null ? void 0 : C.user) == null ? void 0 : H.is_account) ?? (C == null ? void 0 : C.is_account), $ = ((q = S == null ? void 0 : S.user) == null ? void 0 : q.is_account) ?? (S == null ? void 0 : S.is_account), F = M && I === !1 && $ === !0, V = y.state.messages.some(
4465
4459
  (Y) => Y.type !== "deleted"
4466
- ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
4467
- pa,
4460
+ ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, ee = O ? /* @__PURE__ */ s(
4461
+ fa,
4468
4462
  {
4469
4463
  onBack: e,
4470
4464
  showBackButton: t,
@@ -4480,13 +4474,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4480
4474
  onBlockParticipantClick: u,
4481
4475
  onReportParticipantClick: p,
4482
4476
  customChannelActions: N,
4483
- renderChannelActions: S,
4477
+ renderChannelActions: E,
4484
4478
  onParticipantNameClick: O
4485
4479
  }
4486
4480
  ) : null, X = J(
4487
4481
  (Y) => {
4488
- const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
4489
- Ni,
4482
+ const { message: j } = Ie("ChannelView"), W = /* @__PURE__ */ s(
4483
+ xi,
4490
4484
  {
4491
4485
  ...Y,
4492
4486
  chatbotVotingEnabled: b,
@@ -4497,17 +4491,17 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4497
4491
  },
4498
4492
  [b, T, D]
4499
4493
  );
4500
- return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4501
- Sn,
4494
+ return /* @__PURE__ */ s(te, { children: /* @__PURE__ */ s(
4495
+ kn,
4502
4496
  {
4503
4497
  overrides: {
4504
4498
  Message: X,
4505
- MessageActions: Ci
4499
+ MessageActions: Ni
4506
4500
  },
4507
- children: /* @__PURE__ */ m(En, { children: [
4508
- !O && /* @__PURE__ */ m(ee, { children: [
4501
+ children: /* @__PURE__ */ m(Cn, { children: [
4502
+ !O && /* @__PURE__ */ m(te, { children: [
4509
4503
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4510
- Yi,
4504
+ Vi,
4511
4505
  {
4512
4506
  onBack: e,
4513
4507
  showBackButton: t,
@@ -4523,14 +4517,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4523
4517
  onBlockParticipantClick: u,
4524
4518
  onReportParticipantClick: p,
4525
4519
  customChannelActions: N,
4526
- renderChannelActions: S,
4520
+ renderChannelActions: E,
4527
4521
  renderHeaderTitleBadges: x
4528
4522
  }
4529
4523
  ) }, "lt-channel-header"),
4530
4524
  Q
4531
4525
  ] }),
4532
4526
  O && !V && /* @__PURE__ */ m("div", { className: "px-4 @lg:px-6", children: [
4533
- te,
4527
+ ee,
4534
4528
  Q
4535
4529
  ] }),
4536
4530
  /* @__PURE__ */ s(
@@ -4538,10 +4532,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4538
4532
  {
4539
4533
  className: "flex-1 overflow-hidden relative",
4540
4534
  children: /* @__PURE__ */ s(
4541
- In,
4535
+ En,
4542
4536
  {
4543
4537
  head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4544
- te,
4538
+ ee,
4545
4539
  Q
4546
4540
  ] }) : void 0,
4547
4541
  hideDeletedMessages: !0,
@@ -4553,7 +4547,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4553
4547
  ),
4554
4548
  r ? /* @__PURE__ */ s(U.Fragment, { children: r(y) }, "lt-channel-conversation-footer") : null,
4555
4549
  /* @__PURE__ */ s(
4556
- Mi,
4550
+ Ii,
4557
4551
  {
4558
4552
  ...n && {
4559
4553
  renderActions: () => n == null ? void 0 : n(y)
@@ -4568,7 +4562,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4568
4562
  ] })
4569
4563
  }
4570
4564
  ) });
4571
- }, $s = U.memo(
4565
+ }, Os = U.memo(
4572
4566
  ({
4573
4567
  channel: e,
4574
4568
  onBack: t,
@@ -4579,7 +4573,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4579
4573
  onLeaveConversation: l,
4580
4574
  onBlockParticipant: o,
4581
4575
  className: d,
4582
- CustomChannelEmptyState: u = Gi,
4576
+ CustomChannelEmptyState: u = Bi,
4583
4577
  showDeleteConversation: p = !0,
4584
4578
  onDeleteConversationClick: h,
4585
4579
  onBlockParticipantClick: g,
@@ -4590,7 +4584,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4590
4584
  composerDisabledReason: f,
4591
4585
  dmAgentEnabled: x,
4592
4586
  messageMetadata: N,
4593
- onMessageSent: S,
4587
+ onMessageSent: E,
4594
4588
  showStarButton: T = !1,
4595
4589
  chatbotVotingEnabled: M = !1,
4596
4590
  renderChannelBanner: D,
@@ -4599,7 +4593,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4599
4593
  renderChannelActions: z,
4600
4594
  renderMessage: y,
4601
4595
  onMessageLinkClick: A,
4602
- sendButton: E,
4596
+ sendButton: S,
4603
4597
  attachmentPreviewList: C,
4604
4598
  viewerLanguage: I,
4605
4599
  showChannelInfo: $ = !0,
@@ -4622,13 +4616,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4622
4616
  ...R,
4623
4617
  ...q && { skip_push: !0 }
4624
4618
  }, W = await e.sendMessage(Y, j);
4625
- return S == null || S(W), W;
4619
+ return E == null || E(W), W;
4626
4620
  },
4627
- [e, x, N, S]
4628
- ), te = G(null);
4621
+ [e, x, N, E]
4622
+ ), ee = G(null);
4629
4623
  return K(() => {
4630
4624
  if (!A) return;
4631
- const X = te.current;
4625
+ const X = ee.current;
4632
4626
  if (!X) return;
4633
4627
  const _ = (R) => {
4634
4628
  const H = R.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
@@ -4640,25 +4634,25 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4640
4634
  }, [A, e]), /* @__PURE__ */ s(
4641
4635
  "div",
4642
4636
  {
4643
- ref: te,
4637
+ ref: ee,
4644
4638
  className: k(
4645
4639
  "messaging-channel-view h-full flex flex-col",
4646
4640
  d
4647
4641
  ),
4648
- children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4649
- Cn,
4642
+ children: /* @__PURE__ */ s(Fs.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4643
+ yn,
4650
4644
  {
4651
4645
  channel: e,
4652
- MessageSystem: ji,
4646
+ MessageSystem: Fi,
4653
4647
  EmptyStateIndicator: u,
4654
4648
  LoadingIndicator: je,
4655
- DateSeparator: ba,
4656
- TypingIndicator: Ui,
4649
+ DateSeparator: ga,
4650
+ TypingIndicator: $i,
4657
4651
  doSendMessageRequest: Q,
4658
- ...E ? { SendButton: E } : {},
4652
+ ...S ? { SendButton: S } : {},
4659
4653
  ...C ? { AttachmentPreviewList: C } : {},
4660
4654
  children: /* @__PURE__ */ s(
4661
- qi,
4655
+ Gi,
4662
4656
  {
4663
4657
  onBack: t,
4664
4658
  showBackButton: n,
@@ -4696,8 +4690,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4696
4690
  );
4697
4691
  }
4698
4692
  );
4699
- $s.displayName = "ChannelView";
4700
- const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4693
+ Os.displayName = "ChannelView";
4694
+ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ m("div", { className: "text-center max-w-sm", children: [
4701
4695
  /* @__PURE__ */ s("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ s("span", { className: "text-4xl", children: "⚠️" }) }),
4702
4696
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4703
4697
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4711,8 +4705,8 @@ const ke = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4711
4705
  }
4712
4706
  )
4713
4707
  ] }) }));
4714
- ke.displayName = "ErrorState";
4715
- const fl = ({
4708
+ ye.displayName = "ErrorState";
4709
+ const ul = ({
4716
4710
  capabilities: e = {},
4717
4711
  renderMessageInputActions: t,
4718
4712
  renderConversationFooter: n,
@@ -4733,7 +4727,7 @@ const fl = ({
4733
4727
  renderChannelActions: f,
4734
4728
  onParticipantNameClick: x,
4735
4729
  renderMessage: N,
4736
- onMessageLinkClick: S,
4730
+ onMessageLinkClick: E,
4737
4731
  showChannelInfo: T,
4738
4732
  composerInput: M
4739
4733
  }) => {
@@ -4744,8 +4738,8 @@ const fl = ({
4744
4738
  error: z,
4745
4739
  refreshConnection: y,
4746
4740
  service: A,
4747
- debug: E
4748
- } = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4741
+ debug: S
4742
+ } = ea(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(l);
4749
4743
  X.current = l;
4750
4744
  const _ = G(a);
4751
4745
  _.current = a;
@@ -4765,7 +4759,7 @@ const fl = ({
4765
4759
  (async () => {
4766
4760
  var Le, De;
4767
4761
  try {
4768
- E && console.log(
4762
+ S && console.log(
4769
4763
  "[MessagingShell] Loading initial conversation with:",
4770
4764
  i
4771
4765
  );
@@ -4778,7 +4772,7 @@ const fl = ({
4778
4772
  { limit: 1 }
4779
4773
  );
4780
4774
  if (ne.length > 0) {
4781
- I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]), E && console.log(
4775
+ I(ne[0]), F(null), (Le = _.current) == null || Le.call(_, ne[0]), S && console.log(
4782
4776
  "[MessagingShell] Initial conversation loaded:",
4783
4777
  ne[0].id
4784
4778
  );
@@ -4786,7 +4780,7 @@ const fl = ({
4786
4780
  }
4787
4781
  const ce = X.current;
4788
4782
  if (!ce || !A) {
4789
- Z(), F("No conversation found with this account"), E && console.log(
4783
+ Z(), F("No conversation found with this account"), S && console.log(
4790
4784
  "[MessagingShell] No conversation found for:",
4791
4785
  i
4792
4786
  );
@@ -4798,7 +4792,7 @@ const fl = ({
4798
4792
  name: ce.name,
4799
4793
  phone: ce.phone
4800
4794
  });
4801
- I(ie), F(null), (De = _.current) == null || De.call(_, ie), E && console.log(
4795
+ I(ie), F(null), (De = _.current) == null || De.call(_, ie), S && console.log(
4802
4796
  "[MessagingShell] Channel created and loaded:",
4803
4797
  ie.id
4804
4798
  );
@@ -4815,21 +4809,21 @@ const fl = ({
4815
4809
  ), Z(), H.current || F("Failed to load conversation");
4816
4810
  }
4817
4811
  })();
4818
- }, [i, D, L, A, E]);
4812
+ }, [i, D, L, A, S]);
4819
4813
  const q = G(r);
4820
4814
  q.current = r;
4821
4815
  const Y = J(() => {
4822
4816
  var j;
4823
4817
  I(null), Q(!0), (j = q.current) == null || j.call(q);
4824
4818
  }, []);
4825
- return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4826
- ke,
4819
+ return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4820
+ ye,
4827
4821
  {
4828
4822
  message: "Not connected to messaging service",
4829
4823
  onBack: y
4830
4824
  }
4831
- ) : $ ? /* @__PURE__ */ s(ke, { message: $ }) : V && !C ? /* @__PURE__ */ s(ke, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4832
- $s,
4825
+ ) : $ ? /* @__PURE__ */ s(ye, { message: $ }) : V && !C ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : C ? /* @__PURE__ */ s("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ s(
4826
+ Os,
4833
4827
  {
4834
4828
  channel: C,
4835
4829
  renderMessageInputActions: t,
@@ -4838,7 +4832,7 @@ const fl = ({
4838
4832
  onLeaveConversation: Y,
4839
4833
  onBlockParticipant: Y,
4840
4834
  CustomChannelEmptyState: o,
4841
- showDeleteConversation: te,
4835
+ showDeleteConversation: ee,
4842
4836
  onBlockParticipantClick: d,
4843
4837
  onReportParticipantClick: u,
4844
4838
  dmAgentEnabled: p,
@@ -4850,20 +4844,20 @@ const fl = ({
4850
4844
  renderChannelActions: f,
4851
4845
  onParticipantNameClick: x,
4852
4846
  renderMessage: N,
4853
- onMessageLinkClick: S,
4847
+ onMessageLinkClick: E,
4854
4848
  showChannelInfo: T,
4855
4849
  composerInput: M
4856
4850
  },
4857
4851
  C.id
4858
4852
  ) }) }) : /* @__PURE__ */ s(je, {});
4859
4853
  };
4860
- function Wi(e) {
4854
+ function Hi(e) {
4861
4855
  const t = e.state.pending_messages;
4862
4856
  if (t != null && t.length)
4863
4857
  for (const n of t)
4864
4858
  e.state.addMessageSorted(n.message);
4865
4859
  }
4866
- const js = U.createContext({
4860
+ const $s = U.createContext({
4867
4861
  selectedChannel: void 0,
4868
4862
  onChannelSelect: () => {
4869
4863
  },
@@ -4871,18 +4865,18 @@ const js = U.createContext({
4871
4865
  renderMessagePreview: void 0,
4872
4866
  channelPreview: void 0,
4873
4867
  viewerLanguage: void 0
4874
- }), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
4868
+ }), Yi = $s.Provider, qi = () => U.useContext($s), Wi = (e, t) => {
4875
4869
  const n = new Date(
4876
4870
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4877
4871
  ), r = new Date(
4878
4872
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
4879
4873
  ).getTime() - n.getTime();
4880
4874
  return Math.floor(r / (1e3 * 60 * 60 * 24));
4881
- }, Zi = (e) => {
4875
+ }, Xi = (e) => {
4882
4876
  const t = /* @__PURE__ */ new Date();
4883
4877
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
4884
4878
  return "Just now";
4885
- const a = Ji(e, t);
4879
+ const a = Wi(e, t);
4886
4880
  return a === 0 ? e.toLocaleTimeString([], {
4887
4881
  hour: "numeric",
4888
4882
  minute: "2-digit",
@@ -4892,7 +4886,7 @@ const js = U.createContext({
4892
4886
  day: "numeric",
4893
4887
  year: "2-digit"
4894
4888
  });
4895
- }, Bs = U.memo(
4889
+ }, js = U.memo(
4896
4890
  (e) => {
4897
4891
  var L, O, z;
4898
4892
  const { channel: t, unread: n } = e, {
@@ -4902,7 +4896,7 @@ const js = U.createContext({
4902
4896
  channelPreview: l,
4903
4897
  renderMessagePreview: o,
4904
4898
  viewerLanguage: d
4905
- } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4899
+ } = qi(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4906
4900
  if (l)
4907
4901
  return /* @__PURE__ */ s(
4908
4902
  l,
@@ -4917,22 +4911,22 @@ const js = U.createContext({
4917
4911
  const g = () => {
4918
4912
  t && r(t);
4919
4913
  }, c = (y) => {
4920
- const A = y.key === "Enter" || y.key === " ", E = y.repeat;
4921
- !A || E || (y.preventDefault(), g());
4914
+ const A = y.key === "Enter" || y.key === " ", S = y.repeat;
4915
+ !A || S || (y.preventDefault(), g());
4922
4916
  }, v = Ue(
4923
4917
  (L = t == null ? void 0 : t.state) == null ? void 0 : L.members,
4924
4918
  u == null ? void 0 : u.userID,
4925
4919
  t == null ? void 0 : t.type
4926
- ), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4920
+ ), w = ot(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4927
4921
  var A;
4928
4922
  const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4929
4923
  if (y != null && y.length) {
4930
- for (let E = y.length - 1; E >= 0; E--)
4931
- if (y[E].type !== "system") return y[E];
4924
+ for (let S = y.length - 1; S >= 0; S--)
4925
+ if (y[S].type !== "system") return y[S];
4932
4926
  }
4933
4927
  })(), N = (() => {
4934
4928
  var $, F, V, Q;
4935
- const y = hs({
4929
+ const y = ms({
4936
4930
  message: f,
4937
4931
  viewerLanguage: d
4938
4932
  });
@@ -4943,13 +4937,13 @@ const js = U.createContext({
4943
4937
  if (y) return y;
4944
4938
  const I = (Q = f == null ? void 0 : f.attachments) == null ? void 0 : Q[0];
4945
4939
  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";
4946
- })(), S = f != null && f.created_at ? Zi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
4940
+ })(), E = f != null && f.created_at ? Xi(new Date(f.created_at)) : "", T = f ? Fe(f) : !1, M = o ? o(f, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
4947
4941
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4948
4942
  channelId: t == null ? void 0 : t.id,
4949
4943
  isSelected: p,
4950
4944
  participantName: w,
4951
4945
  unreadCount: D,
4952
- hasTimestamp: !!S
4946
+ hasTimestamp: !!E
4953
4947
  }), /* @__PURE__ */ s(
4954
4948
  "div",
4955
4949
  {
@@ -4990,7 +4984,7 @@ const js = U.createContext({
4990
4984
  ]
4991
4985
  }
4992
4986
  ),
4993
- S && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: S })
4987
+ E && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: E })
4994
4988
  ] }),
4995
4989
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
4996
4990
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: M }),
@@ -5002,28 +4996,28 @@ const js = U.createContext({
5002
4996
  );
5003
4997
  }
5004
4998
  );
5005
- Bs.displayName = "CustomChannelPreview";
5006
- const Qi = { last_message_at: -1 }, el = U.memo(
4999
+ js.displayName = "CustomChannelPreview";
5000
+ const Ki = { last_message_at: -1 }, Ji = U.memo(
5007
5001
  ({
5008
5002
  onChannelSelect: e,
5009
5003
  selectedChannel: t,
5010
5004
  filters: n,
5011
5005
  allowNewMessagesFromUnfilteredChannels: a = !1,
5012
5006
  channelRenderFilterFn: r,
5013
- sort: i = Qi,
5007
+ sort: i = Ki,
5014
5008
  className: l,
5015
5009
  customEmptyStateIndicator: o,
5016
- channelListPaginator: d = An,
5010
+ channelListPaginator: d = In,
5017
5011
  channelPreview: u,
5018
5012
  renderMessagePreview: p,
5019
5013
  viewerLanguage: h
5020
5014
  }) => {
5021
5015
  const g = U.useRef(0);
5022
5016
  g.current++;
5023
- const { debug: c = !1 } = lt(), v = U.useCallback(
5017
+ const { debug: c = !1 } = it(), v = U.useCallback(
5024
5018
  (b) => {
5025
5019
  for (const f of b)
5026
- Wi(f);
5020
+ Hi(f);
5027
5021
  return r ? r(b) : b;
5028
5022
  },
5029
5023
  [r]
@@ -5058,8 +5052,8 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5058
5052
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5059
5053
  l
5060
5054
  ),
5061
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5062
- Tn,
5055
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Yi, { value: w, children: /* @__PURE__ */ s(
5056
+ Sn,
5063
5057
  {
5064
5058
  filters: n,
5065
5059
  sort: i,
@@ -5067,7 +5061,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5067
5061
  allowNewMessagesFromUnfilteredChannels: a,
5068
5062
  channelRenderFilterFn: v,
5069
5063
  Paginator: d,
5070
- Preview: Bs,
5064
+ Preview: js,
5071
5065
  EmptyStateIndicator: o
5072
5066
  },
5073
5067
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5076,8 +5070,8 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5076
5070
  );
5077
5071
  }
5078
5072
  );
5079
- el.displayName = "ChannelList";
5080
- const tl = ({
5073
+ Ji.displayName = "ChannelList";
5074
+ const Zi = ({
5081
5075
  question: e,
5082
5076
  onClick: t,
5083
5077
  loading: n = !1,
@@ -5099,7 +5093,7 @@ const tl = ({
5099
5093
  ),
5100
5094
  children: e
5101
5095
  }
5102
- ), gl = ({
5096
+ ), ml = ({
5103
5097
  faqs: e,
5104
5098
  onFaqClick: t,
5105
5099
  loadingFaqId: n,
@@ -5128,7 +5122,7 @@ const tl = ({
5128
5122
  children: [
5129
5123
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5130
5124
  o.map((d) => /* @__PURE__ */ s(
5131
- tl,
5125
+ Zi,
5132
5126
  {
5133
5127
  question: d.question,
5134
5128
  onClick: () => t(d.id),
@@ -5142,40 +5136,40 @@ const tl = ({
5142
5136
  ] }) });
5143
5137
  };
5144
5138
  export {
5145
- bs as A,
5146
- hl as B,
5147
- Gi as C,
5148
- Br as D,
5149
- xa as E,
5150
- gl as F,
5151
- sa as G,
5152
- es as L,
5153
- ul as M,
5154
- Ne as a,
5139
+ ps as A,
5140
+ dl as B,
5141
+ Bi as C,
5142
+ $r as D,
5143
+ ba as E,
5144
+ ml as F,
5145
+ ea as G,
5146
+ Qt as L,
5147
+ ol as M,
5148
+ _e as a,
5155
5149
  se as b,
5156
- el as c,
5157
- $s as d,
5158
- ml as e,
5159
- tl as f,
5150
+ Ji as c,
5151
+ Os as d,
5152
+ cl as e,
5153
+ Zi as f,
5160
5154
  le as g,
5161
- Zt as h,
5162
- ye as i,
5163
- qr as j,
5164
- dl as k,
5165
- fl as l,
5166
- rr as m,
5167
- sr as n,
5168
- Zi as o,
5169
- ar as p,
5170
- hs as q,
5155
+ Jt as h,
5156
+ Ne as i,
5157
+ Yr as j,
5158
+ ll as k,
5159
+ ul as l,
5160
+ nr as m,
5161
+ er as n,
5162
+ Xi as o,
5163
+ sr as p,
5164
+ ms as q,
5171
5165
  we as r,
5172
- ws as s,
5173
- ia as t,
5174
- Xa as u,
5175
- wa as v,
5166
+ xs as s,
5167
+ aa as t,
5168
+ qa as u,
5169
+ va as v,
5176
5170
  Ue as w,
5177
- ht as x,
5178
- ft as y,
5179
- ct as z
5171
+ mt as x,
5172
+ ht as y,
5173
+ ot as z
5180
5174
  };
5181
- //# sourceMappingURL=index-DcEVHNS3.js.map
5175
+ //# sourceMappingURL=index-DPwo1avm.js.map