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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/{Card-BqePrWk0.js → Card-CJh6R76n.js} +2 -2
  2. package/dist/{Card-BqePrWk0.js.map → Card-CJh6R76n.js.map} +1 -1
  3. package/dist/{Card-DQGYnsjO.cjs → Card-CK1jw1VU.cjs} +2 -2
  4. package/dist/{Card-DQGYnsjO.cjs.map → Card-CK1jw1VU.cjs.map} +1 -1
  5. package/dist/{Card-bm6JeM03.cjs → Card-CSwQT3wz.cjs} +2 -2
  6. package/dist/{Card-bm6JeM03.cjs.map → Card-CSwQT3wz.cjs.map} +1 -1
  7. package/dist/{Card-Dlb_74PT.cjs → Card-DQtg7wWP.cjs} +2 -2
  8. package/dist/{Card-Dlb_74PT.cjs.map → Card-DQtg7wWP.cjs.map} +1 -1
  9. package/dist/{Card-CS_6M9I_.js → Card-DUoHKAuh.js} +2 -2
  10. package/dist/{Card-CS_6M9I_.js.map → Card-DUoHKAuh.js.map} +1 -1
  11. package/dist/{Card-CYD26x1-.js → Card-DnEyeR_d.js} +3 -3
  12. package/dist/{Card-CYD26x1-.js.map → Card-DnEyeR_d.js.map} +1 -1
  13. package/dist/{LockedThumbnail-C3kgiGFK.cjs → LockedThumbnail-BZLpmTpY.cjs} +2 -2
  14. package/dist/{LockedThumbnail-C3kgiGFK.cjs.map → LockedThumbnail-BZLpmTpY.cjs.map} +1 -1
  15. package/dist/{LockedThumbnail-DC782hvV.js → LockedThumbnail-C_F2Sw-9.js} +2 -2
  16. package/dist/{LockedThumbnail-DC782hvV.js.map → LockedThumbnail-C_F2Sw-9.js.map} +1 -1
  17. package/dist/{index-DaF1G1q2.js → index-DcEVHNS3.js} +490 -483
  18. package/dist/index-DcEVHNS3.js.map +1 -0
  19. package/dist/index-LP0PQJxl.cjs +2 -0
  20. package/dist/index-LP0PQJxl.cjs.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -2
  24. package/src/components/CustomMessage/SentMessageDeliveryStatus.test.tsx +50 -21
  25. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +42 -24
  26. package/dist/index-DaF1G1q2.js.map +0 -1
  27. package/dist/index-eVxxkfK6.cjs +0 -2
  28. package/dist/index-eVxxkfK6.cjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
- import U, { createContext as at, useContext as Ee, 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, MessageStatus as Ws, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as rs, Attachment as Js, EditMessageModal as Zs, MessageBlocked as Qs, MessageBouncePrompt as en, MessageDeleted as tn, MessageIsThreadReplyInChannelButtonIndicator as sn, MessageRepliesCountButton as nn, ReminderNotification as an, StreamedMessageText as rn, messageHasAttachments as ln, messageHasReactions as on, isDateSeparatorMessage as cn, isMessageBlocked as dn, isMessageBounced as un, MessageBounceModal as mn, MessageText as Yt, MessageErrorIcon as qt, Poll as hn, useMessageContext as Ie, useMessageComposer as fn, useStateStore as gn, MessageInput as pn, useMessageInputContext as bn, useMessageComposerHasSendableData as vn, AttachmentPreviewList as xn, QuotedMessagePreview as wn, TextareaComposer as _n, MessageTimestamp as Ye, AIStates as qe, useTypingContext as Nn, useAIState as yn, Channel as kn, WithComponents as Cn, Window as Sn, MessageList as En, ChannelList as In, InfiniteScroll as Tn } from "stream-chat-react";
6
- import { StarIcon as Se, DotsThreeIcon as An, SpinnerGapIcon as ze, SignOutIcon as Mn, ProhibitInsetIcon as Wt, FlagIcon as is, ArrowLeftIcon as Qe, CurrencyDollarIcon as Rn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as ls, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as os, FileMdIcon as zn, FileTextIcon as Pn, FileZipIcon as Fn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as jn, FileDocIcon as Bn, FilePdfIcon as Un, CircleNotchIcon as ke, PlayIcon as et, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ce, XIcon as Be, CaretLeftIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, ChecksIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Jn, ArrowUpIcon as Zn, ProhibitIcon as Qn } from "@phosphor-icons/react";
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";
7
7
  import k from "classnames";
8
- import { MessageActions as ea, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
9
- const ds = at({
8
+ import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
+ const us = rt({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const ds = at({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), it = () => Ee(ds), dl = ({
19
+ }), lt = () => Ie(us), dl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -63,7 +63,7 @@ const ds = at({
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 Hs(a) });
66
+ a && ((A = D.current) == null ? void 0 : A.apiKey) !== a && (D.current = { apiKey: a, client: new Ys(a) });
67
67
  const L = a ? ((E = D.current) == null ? void 0 : E.client) ?? null : null;
68
68
  K(() => {
69
69
  const C = M.current, I = N.current;
@@ -78,7 +78,7 @@ const ds = at({
78
78
  renderCount: C,
79
79
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
80
80
  });
81
- const $ = new Gs({
81
+ const $ = new Hs({
82
82
  ...I,
83
83
  apiKey: a,
84
84
  debug: S.current,
@@ -196,8 +196,8 @@ const ds = at({
196
196
  renderCount: M.current,
197
197
  willRenderChat: !!L,
198
198
  contextValueReady: !!y
199
- }), /* @__PURE__ */ s(ds.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
- Ys,
199
+ }), /* @__PURE__ */ s(us.Provider, { value: y, children: L ? /* @__PURE__ */ s(
200
+ qs,
201
201
  {
202
202
  client: L,
203
203
  customClasses: {
@@ -206,7 +206,7 @@ const ds = at({
206
206
  children: e
207
207
  }
208
208
  ) : e });
209
- }, ta = () => it(), lt = (e) => {
209
+ }, sa = () => lt(), ot = (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 ds = at({
228
228
  e.off("member.updated", i);
229
229
  };
230
230
  }, [e]), t;
231
- }, sa = "linktree-official", na = "linktree-official-sender";
231
+ }, na = "linktree-official", aa = "linktree-official-sender";
232
232
  function Ue(e, t, n) {
233
233
  const a = Object.values(e || {});
234
- if (n === sa) {
234
+ if (n === na) {
235
235
  const r = a.find(
236
236
  (i) => {
237
237
  var l;
238
- return ((l = i.user) == null ? void 0 : l.id) === na;
238
+ return ((l = i.user) == null ? void 0 : l.id) === aa;
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 aa = /^[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 ra(e) {
252
- return aa.test(e.trim());
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());
253
253
  }
254
- function Xt(e, t) {
254
+ function Kt(e, t) {
255
255
  const n = e == null ? void 0 : e.trim();
256
- return !n || t && n === t ? !1 : !ra(n);
256
+ return !n || t && n === t ? !1 : !ia(n);
257
257
  }
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";
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";
260
260
  }
261
- const Kt = [
261
+ const Jt = [
262
262
  { emoji: "🍎", bgColor: "#FFD1DD" },
263
263
  // Apple
264
264
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -286,7 +286,7 @@ const Kt = [
286
286
  { emoji: "🍈", bgColor: "#D9F7E1" }
287
287
  // Melon
288
288
  ];
289
- function ia(e) {
289
+ function la(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 ia(e) {
294
294
  }
295
295
  return Math.abs(t);
296
296
  }
297
- function us(e) {
298
- return Kt[ia(e) % Kt.length];
299
- }
300
- function la(e) {
301
- return us(e).emoji;
297
+ function ms(e) {
298
+ return Jt[la(e) % Jt.length];
302
299
  }
303
300
  function oa(e) {
304
- return us(e).bgColor;
301
+ return ms(e).emoji;
302
+ }
303
+ function ca(e) {
304
+ return ms(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 = la(e), d = oa(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 = 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(
316
316
  "img",
317
317
  {
318
318
  src: t,
@@ -350,7 +350,7 @@ const se = ({
350
350
  {
351
351
  "aria-hidden": "true",
352
352
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
353
- children: /* @__PURE__ */ s(Se, { className: "size-3 text-yellow-600", weight: "duotone" })
353
+ children: /* @__PURE__ */ s(Ee, { className: "size-3 text-yellow-600", weight: "duotone" })
354
354
  }
355
355
  ),
356
356
  /* @__PURE__ */ s(
@@ -376,7 +376,7 @@ const se = ({
376
376
  ]
377
377
  }
378
378
  );
379
- }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
379
+ }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
380
380
  channel: e,
381
381
  participant: t,
382
382
  showBlockParticipant: n = !0,
@@ -390,7 +390,7 @@ const se = ({
390
390
  logLabel: p = "useChannelModerationActions"
391
391
  }) => {
392
392
  var A;
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, 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 } = 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);
394
394
  return K(() => {
395
395
  if (!v || !h || !c) {
396
396
  b(!1), x(null);
@@ -460,10 +460,10 @@ const se = ({
460
460
  }
461
461
  },
462
462
  handleReportUser: () => {
463
- d == null || d(), u == null || u(), window.open(ca, "_blank", "noopener,noreferrer");
463
+ d == null || d(), u == null || u(), window.open(da, "_blank", "noopener,noreferrer");
464
464
  }
465
465
  };
466
- }, _e = ({
466
+ }, Ne = ({
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
- ), tt = ({
483
+ ), st = ({
484
484
  channel: e,
485
485
  participant: t,
486
486
  showDeleteConversation: n = !0,
@@ -494,7 +494,7 @@ const se = ({
494
494
  customChannelActions: p,
495
495
  triggerClassName: h
496
496
  }) => {
497
- const [g, c] = B(!1), v = G(null), w = Vs(), b = J(() => c(!1), []), {
497
+ const [g, c] = B(!1), v = G(null), w = Gs(), b = J(() => c(!1), []), {
498
498
  isParticipantBlocked: f,
499
499
  isCheckingBlockedStatus: x,
500
500
  isLeaving: N,
@@ -503,7 +503,7 @@ const se = ({
503
503
  handleBlockUser: M,
504
504
  handleUnblockUser: D,
505
505
  handleReportUser: L
506
- } = da({
506
+ } = ua({
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(An, { className: "size-5 text-black/90" }),
540
+ /* @__PURE__ */ s(Mn, { 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
- _e,
556
+ Ne,
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(Mn, { className: "h-5 w-5" }),
562
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { 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(_e, { disabled: !0, "aria-busy": !0, children: [
570
+ /* @__PURE__ */ m(Ne, { 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
- _e,
575
+ Ne,
576
576
  {
577
577
  onClick: D,
578
578
  disabled: S,
579
579
  "aria-busy": S,
580
580
  children: [
581
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
581
+ S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Unblock" })
583
583
  ]
584
584
  }
585
585
  ) : /* @__PURE__ */ m(
586
- _e,
586
+ Ne,
587
587
  {
588
588
  onClick: M,
589
589
  disabled: S,
590
590
  "aria-busy": S,
591
591
  children: [
592
- S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Wt, { className: "h-5 w-5" }),
592
+ S ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Xt, { 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(_e, { variant: "danger", onClick: L, children: [
598
- /* @__PURE__ */ s(is, { className: "h-5 w-5" }),
597
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ m(Ne, { variant: "danger", onClick: L, children: [
598
+ /* @__PURE__ */ s(ls, { 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", ua = "CUSTOMER_PAID", ma = "Replies instantly with AI assistant", ha = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ua, fa = (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", ma = "CUSTOMER_PAID", ha = "Replies instantly with AI assistant", fa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === ma, ga = (e) => {
607
607
  const t = e;
608
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
609
- }, ga = ({
608
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
609
+ }, pa = ({
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 = ot(x == null ? void 0 : x.user), S = (O = x == null ? void 0 : x.user) == null ? void 0 : O.image, T = lt(b), M = fa(x), D = async () => {
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 () => {
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(Qe, { className: "size-5 text-black/90" })
660
+ children: /* @__PURE__ */ s(et, { 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(
@@ -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(Rn, { className: "size-2.5", weight: "bold" })
692
+ children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
693
693
  }
694
694
  ),
695
695
  n && T && /* @__PURE__ */ s(
@@ -697,7 +697,7 @@ const se = ({
697
697
  {
698
698
  "aria-label": "Starred conversation",
699
699
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
700
- children: /* @__PURE__ */ s(Se, { className: "size-2.5", weight: "fill" })
700
+ children: /* @__PURE__ */ s(Ee, { className: "size-2.5", weight: "fill" })
701
701
  }
702
702
  ),
703
703
  /* @__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: ma })
715
+ /* @__PURE__ */ s("span", { children: ha })
716
716
  ] })
717
717
  ] })
718
718
  ]
@@ -728,7 +728,7 @@ const se = ({
728
728
  "aria-pressed": T,
729
729
  "aria-label": T ? "Unstar conversation" : "Star conversation",
730
730
  children: /* @__PURE__ */ s(
731
- Se,
731
+ Ee,
732
732
  {
733
733
  className: k("size-5", {
734
734
  "text-[#FFD60A]": T,
@@ -740,7 +740,7 @@ const se = ({
740
740
  }
741
741
  ),
742
742
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
743
- tt,
743
+ st,
744
744
  {
745
745
  channel: b,
746
746
  participant: x,
@@ -758,20 +758,20 @@ const se = ({
758
758
  ))
759
759
  ] })
760
760
  ] }) });
761
- }, pa = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), st = "vote_up", nt = "vote_down";
762
- function ba(e) {
763
- return e != null && e.length ? e.some((t) => t.type === nt) ? "down" : e.some((t) => t.type === st) ? "up" : null : null;
764
- }
761
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), nt = "vote_up", at = "vote_down";
765
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;
764
+ }
765
+ function xa(e) {
766
766
  const { channel: t } = ue(), { client: n } = me("useMessageVote"), a = ae(
767
- () => ba(e.own_reactions),
767
+ () => va(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, st) : await t.sendReaction(
772
+ a === "up" ? await t.deleteReaction(e.id, nt) : await t.sendReaction(
773
773
  e.id,
774
- { type: st },
774
+ { type: nt },
775
775
  { enforce_unique: !0, skip_push: !0 }
776
776
  );
777
777
  } catch {
@@ -779,9 +779,9 @@ function va(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, nt) : await t.sendReaction(
782
+ a === "down" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
783
783
  e.id,
784
- { type: nt },
784
+ { type: at },
785
785
  { enforce_unique: !0, skip_push: !0 }
786
786
  );
787
787
  } catch {
@@ -789,24 +789,24 @@ function va(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 xa(e) {
792
+ function wa(e) {
793
793
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
794
794
  }
795
- function ms({
795
+ function hs({
796
796
  message: e,
797
797
  viewerLanguage: t
798
798
  }) {
799
799
  var r;
800
- const n = e == null ? void 0 : e.text, a = xa(t);
800
+ const n = e == null ? void 0 : e.text, a = wa(t);
801
801
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
802
802
  }
803
- const wa = U.lazy(() => import("./Card-BqePrWk0.js")), _a = U.lazy(() => import("./Card-CS_6M9I_.js")), Na = U.lazy(() => import("./Card-CYD26x1-.js")), ct = () => /* @__PURE__ */ s(
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(
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
- ), ya = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(wa, { ...e }) }), hs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(_a, { ...e }) }), fs = (e) => /* @__PURE__ */ s(rt, { fallback: /* @__PURE__ */ s(ct, {}), children: /* @__PURE__ */ s(Na, { ...e }) }), ka = hs, Ca = fs, Jt = { Composer: ya, Sent: hs, Received: fs, Creator: ka, Visitor: Ca }, Sa = [
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 = [
810
810
  [/pdf/, "pdf"],
811
811
  [/wordprocessingml|msword|\.doc/, "doc"],
812
812
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -819,39 +819,39 @@ const wa = U.lazy(() => import("./Card-BqePrWk0.js")), _a = 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 gs(e) {
823
- const t = Sa.find(
822
+ function ps(e) {
823
+ const t = Ea.find(
824
824
  ([n]) => n.test(e)
825
825
  );
826
826
  return t ? t[1] : "generic";
827
827
  }
828
- const Ea = {
829
- video: os,
830
- audio: Dn,
831
- image: Ln,
832
- document: ls
833
- }, Ia = {
834
- pdf: Un,
835
- doc: Bn,
836
- xls: jn,
837
- csv: $n,
838
- ppt: On,
839
- zip: Fn,
840
- text: Pn,
841
- markdown: zn,
842
- generic: ls
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
843
843
  };
844
- function Ta(e) {
844
+ function Aa(e) {
845
845
  const t = le(e);
846
- return t !== "document" ? Ea[t] : Ia[gs(e)];
846
+ return t !== "document" ? Ia[t] : Ta[ps(e)];
847
847
  }
848
848
  function we(e, t) {
849
- return U.createElement(Ta(e), t);
849
+ return U.createElement(Aa(e), t);
850
850
  }
851
- const Aa = (e) => {
851
+ const Ma = (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
- }, Ma = ({
854
+ }, Ra = ({
855
855
  source: e,
856
856
  mimeType: t,
857
857
  poster: n,
@@ -871,7 +871,7 @@ const Aa = (e) => {
871
871
  const H = R.getBoundingClientRect();
872
872
  return Math.max(
873
873
  0,
874
- Math.min(1, (Aa(_) - H.left) / H.width)
874
+ Math.min(1, (Ma(_) - H.left) / H.width)
875
875
  );
876
876
  }, []), F = J((_) => {
877
877
  const R = h.current;
@@ -991,7 +991,7 @@ const Aa = (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
- ke,
994
+ Ce,
995
995
  {
996
996
  className: "size-8 animate-spin text-white/80",
997
997
  weight: "bold"
@@ -1010,7 +1010,7 @@ const Aa = (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(et, { 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(tt, { 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 Aa = (e) => {
1049
1049
  },
1050
1050
  className: "shrink-0 text-white",
1051
1051
  "aria-label": w ? "Pause" : "Play",
1052
- children: w ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(et, { className: "size-5 translate-x-px", weight: "fill" })
1052
+ children: w ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(tt, { className: "size-5 translate-x-px", weight: "fill" })
1053
1053
  }
1054
1054
  ),
1055
1055
  /* @__PURE__ */ m(
@@ -1099,7 +1099,7 @@ const Aa = (e) => {
1099
1099
  ]
1100
1100
  }
1101
1101
  );
1102
- }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ra = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ps = ({
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 = ({
1103
1103
  mimeType: e,
1104
1104
  sourceUrl: t,
1105
1105
  thumbnailUrl: n,
@@ -1110,7 +1110,7 @@ const Aa = (e) => {
1110
1110
  }) => {
1111
1111
  const o = le(e), [d, u] = B(!1);
1112
1112
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1113
- Ma,
1113
+ Ra,
1114
1114
  {
1115
1115
  source: t,
1116
1116
  mimeType: e,
@@ -1157,11 +1157,11 @@ const Aa = (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: Zt(r),
1160
+ className: Qt(r),
1161
1161
  weight: "regular"
1162
1162
  })
1163
1163
  }
1164
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ra(r)}`, children: /* @__PURE__ */ s(
1164
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${La(r)}`, children: /* @__PURE__ */ s(
1165
1165
  "img",
1166
1166
  {
1167
1167
  src: n,
@@ -1174,12 +1174,12 @@ const Aa = (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: Zt(r),
1177
+ className: Qt(r),
1178
1178
  weight: "regular"
1179
1179
  })
1180
1180
  }
1181
1181
  );
1182
- }, bs = ({
1182
+ }, vs = ({
1183
1183
  variant: e,
1184
1184
  thumbnail: t,
1185
1185
  title: n,
@@ -1245,28 +1245,28 @@ const Aa = (e) => {
1245
1245
  }
1246
1246
  );
1247
1247
  };
1248
- function vs(e) {
1248
+ function xs(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 dt(e) {
1251
+ function ut(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 La(e) {
1254
+ function Da(e) {
1255
1255
  return e ? "bg-white/10" : "bg-black/5";
1256
1256
  }
1257
- function Da(e) {
1257
+ function za(e) {
1258
1258
  return e ? "text-white" : "text-black";
1259
1259
  }
1260
- function za(e) {
1260
+ function Pa(e) {
1261
1261
  return e ? "text-white/55" : "text-black/55";
1262
1262
  }
1263
- function Pa(e) {
1263
+ function Fa(e) {
1264
1264
  return e ? "text-white/40" : "text-black/40";
1265
1265
  }
1266
- function Fa(e) {
1266
+ function Oa(e) {
1267
1267
  return e ? "text-white/20" : "text-black/20";
1268
1268
  }
1269
- const ut = ({ attachment: e, isMyMessage: t }) => {
1269
+ const mt = ({ 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 ut = ({ attachment: e, isMyMessage: t }) => {
1278
1278
  ) : /* @__PURE__ */ s(
1279
1279
  "div",
1280
1280
  {
1281
- className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1282
- children: /* @__PURE__ */ s(Gn, { className: `size-12 ${Fa(t)}` })
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)}` })
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 ${Da(t)}`, children: n }),
1287
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${za(t)}`, children: a }),
1288
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Pa(t)}`, children: d })
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 })
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 xs(e) {
1293
+ function ws(e) {
1294
1294
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1295
1295
  }
1296
- function mt(e) {
1296
+ function ht(e) {
1297
1297
  var t;
1298
- return (t = e.attachments) == null ? void 0 : t.find(xs);
1298
+ return (t = e.attachments) == null ? void 0 : t.find(ws);
1299
1299
  }
1300
- async function Oa(e, t) {
1300
+ async function $a(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 Oa(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 $a = ({
1312
+ const ja = ({
1313
1313
  url: e,
1314
1314
  filename: t
1315
1315
  }) => {
@@ -1321,7 +1321,7 @@ const $a = ({
1321
1321
  onClick: (i) => {
1322
1322
  i.stopPropagation();
1323
1323
  const l = window.open("", "_blank", "noopener,noreferrer");
1324
- a(!0), Oa(e, t).then(() => {
1324
+ a(!0), $a(e, t).then(() => {
1325
1325
  l == null || l.close();
1326
1326
  }).catch(() => {
1327
1327
  l && (l.location.href = e);
@@ -1329,14 +1329,14 @@ const $a = ({
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(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" }),
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" }),
1334
1334
  "Download"
1335
1335
  ] })
1336
1336
  }
1337
1337
  );
1338
1338
  };
1339
- function ht(e) {
1339
+ function ft(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 ht(e) {
1357
1357
  thumbnailUrl: p
1358
1358
  };
1359
1359
  }
1360
- const ws = ({
1360
+ const _s = ({
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 ? vs(a) : void 0;
1367
+ const i = a !== void 0 ? xs(a) : void 0;
1368
1368
  return /* @__PURE__ */ s(
1369
- bs,
1369
+ vs,
1370
1370
  {
1371
1371
  variant: "dark",
1372
1372
  title: n,
@@ -1374,7 +1374,7 @@ const ws = ({
1374
1374
  mimeType: t,
1375
1375
  detail: i,
1376
1376
  thumbnail: /* @__PURE__ */ s(
1377
- ps,
1377
+ bs,
1378
1378
  {
1379
1379
  mimeType: t,
1380
1380
  sourceUrl: e,
@@ -1385,23 +1385,23 @@ const ws = ({
1385
1385
  )
1386
1386
  }
1387
1387
  );
1388
- }, _s = ({
1388
+ }, Ns = ({
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 ? vs(a) : void 0;
1395
+ const i = le(t), l = a !== void 0 ? xs(a) : void 0;
1396
1396
  return /* @__PURE__ */ s(
1397
- bs,
1397
+ vs,
1398
1398
  {
1399
1399
  variant: "light",
1400
1400
  title: n,
1401
1401
  mimeType: t,
1402
1402
  detail: l,
1403
1403
  thumbnail: /* @__PURE__ */ s(
1404
- ps,
1404
+ bs,
1405
1405
  {
1406
1406
  mimeType: t,
1407
1407
  sourceUrl: e,
@@ -1411,14 +1411,14 @@ const ws = ({
1411
1411
  containedImage: i === "image" || i === "document"
1412
1412
  }
1413
1413
  ),
1414
- action: /* @__PURE__ */ s($a, { url: e, filename: n })
1414
+ action: /* @__PURE__ */ s(ja, { url: e, filename: n })
1415
1415
  }
1416
1416
  );
1417
- }, ja = ({
1417
+ }, Ba = ({
1418
1418
  message: e,
1419
1419
  isMyMessage: t = !1
1420
1420
  }) => {
1421
- const n = mt(e), a = ht(e);
1421
+ const n = ht(e), a = ft(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 ws = ({
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: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(ws, { ...a }) : /* @__PURE__ */ s(_s, { ...a })
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 })
1443
1443
  }
1444
1444
  ) })
1445
1445
  }
1446
1446
  )
1447
1447
  ] });
1448
- }, Ba = ({
1448
+ }, Ua = ({
1449
1449
  message: e
1450
1450
  }) => {
1451
- const t = mt(e);
1451
+ const t = ht(e);
1452
1452
  if (t)
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
- }, Ua = ({
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 = ({
1457
1457
  message: e
1458
1458
  }) => {
1459
- const t = mt(e);
1459
+ const t = ht(e);
1460
1460
  if (t)
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
- }, ul = Object.assign(ja, {
1465
- Creator: Ba,
1466
- Visitor: Ua
1467
- }), Va = {
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 = {
1468
1468
  dark: "bg-[#121110]",
1469
1469
  light: "bg-[#e9eaed]"
1470
- }, Ga = {
1470
+ }, Ha = {
1471
1471
  dark: "text-white",
1472
1472
  light: "text-[#080707]"
1473
- }, Ha = {
1473
+ }, Ya = {
1474
1474
  dark: "border-white/[0.08]",
1475
1475
  light: "border-black/[0.08]"
1476
- }, Ya = (e) => e === "dark" ? "sender" : "receiver", qa = {
1476
+ }, qa = (e) => e === "dark" ? "sender" : "receiver", Wa = {
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 ws = ({
1495
1495
  children: i,
1496
1496
  "data-testid": l
1497
1497
  }) => {
1498
- const o = t != null && t !== "", d = qa[Ya(e)][a];
1498
+ const o = t != null && t !== "", d = Wa[qa(e)][a];
1499
1499
  return /* @__PURE__ */ m(
1500
1500
  "div",
1501
1501
  {
@@ -1510,10 +1510,10 @@ const ws = ({
1510
1510
  // as the surrounding `CustomMessage` text bubbles.
1511
1511
  "relative w-[280px] overflow-hidden px-2 py-2",
1512
1512
  d,
1513
- Va[e],
1514
1513
  Ga[e],
1514
+ Ha[e],
1515
1515
  n && "border",
1516
- n && Ha[e],
1516
+ n && Ya[e],
1517
1517
  r
1518
1518
  ),
1519
1519
  children: [
@@ -1556,16 +1556,16 @@ const ws = ({
1556
1556
  ),
1557
1557
  children: /* @__PURE__ */ s(Be, { className: "size-3", weight: "bold" })
1558
1558
  }
1559
- ), Me = (e) => e === "received" ? "light" : "dark", Wa = ({
1559
+ ), Me = (e) => e === "received" ? "light" : "dark", Xa = ({
1560
1560
  firstOfGroup: e,
1561
1561
  endOfGroup: t,
1562
1562
  groupedByUser: n
1563
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Xa = ({
1563
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", Ka = ({
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 }] : [], Ka = ({ 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 }] : [], Ja = ({ 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 ws = ({
1577
1577
  }
1578
1578
  ),
1579
1579
  n ?? null
1580
- ] }), ft = ({
1580
+ ] }), gt = ({
1581
1581
  state: e,
1582
1582
  src: t,
1583
1583
  mimeType: n,
@@ -1588,7 +1588,7 @@ const ws = ({
1588
1588
  preload: o,
1589
1589
  onDismiss: d
1590
1590
  }) => {
1591
- const u = Me(e), p = e === "composer" && !!d, h = Xa({ src: t, mimeType: n, filename: a, items: r });
1591
+ const u = Me(e), p = e === "composer" && !!d, h = Ka({ 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 ws = ({
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
- Ka,
1603
+ Ja,
1604
1604
  {
1605
1605
  item: c,
1606
1606
  preload: g,
@@ -1614,15 +1614,15 @@ const ws = ({
1614
1614
  )) })
1615
1615
  }
1616
1616
  );
1617
- }, Ja = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), Za = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), Qa = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), er = {
1618
- Composer: Ja,
1619
- Sent: Za,
1620
- Received: Qa
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
1621
1621
  };
1622
- function tr(e) {
1622
+ function sr(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 sr = {
1625
+ const nr = {
1626
1626
  pdf: "PDF",
1627
1627
  doc: "DOC",
1628
1628
  xls: "XLS",
@@ -1632,7 +1632,7 @@ const sr = {
1632
1632
  text: "TXT",
1633
1633
  markdown: "MD"
1634
1634
  };
1635
- function nr(e, t) {
1635
+ function ar(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 nr(e, t) {
1642
1642
  }
1643
1643
  if (!e) return;
1644
1644
  if (le(e) === "document") {
1645
- const r = gs(e), i = sr[r];
1645
+ const r = ps(e), i = nr[r];
1646
1646
  if (i) return i;
1647
1647
  if (e === "application/octet-stream") return;
1648
1648
  }
@@ -1650,8 +1650,8 @@ function nr(e, t) {
1650
1650
  if (!(!a || a === "*"))
1651
1651
  return a.toUpperCase();
1652
1652
  }
1653
- function ar(e, t, n) {
1654
- const a = nr(e, t), r = typeof n == "number" && n > 0 ? tr(n) : void 0;
1653
+ function rr(e, t, n) {
1654
+ const a = ar(e, t), r = typeof n == "number" && n > 0 ? sr(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 rr = {
1665
+ const ir = {
1666
1666
  dark: "text-white/55",
1667
1667
  light: "text-black/65"
1668
- }, ir = {
1668
+ }, lr = {
1669
1669
  dark: "bg-white/10",
1670
1670
  light: "bg-black/5"
1671
- }, lr = {
1671
+ }, or = {
1672
1672
  dark: "text-white/85",
1673
1673
  light: "text-black/85"
1674
- }, Ns = ({
1674
+ }, ys = ({
1675
1675
  variant: e,
1676
1676
  filename: t,
1677
1677
  title: n,
@@ -1681,16 +1681,16 @@ const rr = {
1681
1681
  activateLabel: l,
1682
1682
  trailingAction: o
1683
1683
  }) => {
1684
- const d = n ?? t ?? "File", u = ar(a, t, r), p = /* @__PURE__ */ s(
1684
+ const d = n ?? t ?? "File", u = rr(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
- ir[e]
1689
+ lr[e]
1690
1690
  ),
1691
1691
  "aria-hidden": !0,
1692
1692
  children: we(a, {
1693
- className: k("size-6", lr[e]),
1693
+ className: k("size-6", or[e]),
1694
1694
  weight: "regular"
1695
1695
  })
1696
1696
  }
@@ -1701,7 +1701,7 @@ const rr = {
1701
1701
  {
1702
1702
  className: k(
1703
1703
  "truncate text-xs leading-4",
1704
- rr[e]
1704
+ ir[e]
1705
1705
  ),
1706
1706
  children: u
1707
1707
  }
@@ -1730,7 +1730,7 @@ const rr = {
1730
1730
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1731
1731
  ] });
1732
1732
  };
1733
- async function ys(e, t) {
1733
+ async function ks(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 ys(e, t) {
1744
1744
  }
1745
1745
  }
1746
1746
  }
1747
- const or = ({
1747
+ const cr = ({
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 }] : [], cr = ({
1754
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], dr = ({
1755
1755
  variant: e,
1756
1756
  item: t,
1757
1757
  index: n,
@@ -1760,7 +1760,7 @@ const or = ({
1760
1760
  }) => {
1761
1761
  const i = t.filename ?? re(t.src);
1762
1762
  return /* @__PURE__ */ s(
1763
- Ns,
1763
+ ys,
1764
1764
  {
1765
1765
  variant: e,
1766
1766
  filename: i,
@@ -1772,7 +1772,7 @@ const or = ({
1772
1772
  trailingAction: r
1773
1773
  }
1774
1774
  );
1775
- }, gt = ({
1775
+ }, pt = ({
1776
1776
  state: e,
1777
1777
  src: t,
1778
1778
  filename: n,
@@ -1785,7 +1785,7 @@ const or = ({
1785
1785
  onClick: u,
1786
1786
  onDismiss: p
1787
1787
  }) => {
1788
- const h = Me(e), g = e === "composer" && !!p, c = or({
1788
+ const h = Me(e), g = e === "composer" && !!p, c = cr({
1789
1789
  src: t,
1790
1790
  filename: n,
1791
1791
  fileSize: a,
@@ -1797,7 +1797,7 @@ const or = ({
1797
1797
  const f = c[b];
1798
1798
  if (!f) return;
1799
1799
  const x = f.filename ?? re(f.src);
1800
- ys(f.src, x);
1800
+ ks(f.src, x);
1801
1801
  };
1802
1802
  if (c.length === 0)
1803
1803
  return null;
@@ -1809,7 +1809,7 @@ const or = ({
1809
1809
  h === "dark" ? "text-white/70" : "text-black/70"
1810
1810
  ),
1811
1811
  "aria-hidden": !0,
1812
- children: /* @__PURE__ */ s(Ce, { className: "size-5", weight: "bold" })
1812
+ children: /* @__PURE__ */ s(Se, { className: "size-5", weight: "bold" })
1813
1813
  }
1814
1814
  );
1815
1815
  return /* @__PURE__ */ s(
@@ -1820,7 +1820,7 @@ const or = ({
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
- cr,
1823
+ dr,
1824
1824
  {
1825
1825
  variant: h,
1826
1826
  item: b,
@@ -1832,11 +1832,11 @@ const or = ({
1832
1832
  )) })
1833
1833
  }
1834
1834
  );
1835
- }, dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), mr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), hr = {
1836
- Composer: dr,
1837
- Sent: ur,
1838
- Received: mr
1839
- }, pt = ({
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 = ({
1840
1840
  onPrev: e,
1841
1841
  onNext: t,
1842
1842
  prevLabel: n = "Previous",
@@ -1849,7 +1849,7 @@ const or = ({
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(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1852
+ children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1853
1853
  }
1854
1854
  ),
1855
1855
  /* @__PURE__ */ s(
@@ -1862,7 +1862,7 @@ const or = ({
1862
1862
  children: /* @__PURE__ */ s(ve, { size: 20, weight: "bold", "aria-hidden": !0 })
1863
1863
  }
1864
1864
  )
1865
- ] }), ks = ({
1865
+ ] }), Cs = ({
1866
1866
  url: e,
1867
1867
  filename: t,
1868
1868
  variant: n = "pill",
@@ -1873,7 +1873,7 @@ const or = ({
1873
1873
  }) => {
1874
1874
  const [o, d] = B(!1), u = J(
1875
1875
  (c) => {
1876
- c.stopPropagation(), !o && (d(!0), ys(e, t).catch(() => {
1876
+ c.stopPropagation(), !o && (d(!0), ks(e, t).catch(() => {
1877
1877
  }).finally(() => {
1878
1878
  d(!1), l == null || l();
1879
1879
  }));
@@ -1898,14 +1898,14 @@ const or = ({
1898
1898
  }[i]
1899
1899
  ),
1900
1900
  children: o ? /* @__PURE__ */ s(
1901
- ke,
1901
+ Ce,
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
- Ce,
1908
+ Se,
1909
1909
  {
1910
1910
  className: "size-5 shrink-0",
1911
1911
  weight: "bold",
@@ -1921,7 +1921,7 @@ const or = ({
1921
1921
  disabled: o,
1922
1922
  "aria-label": a,
1923
1923
  className: "mes-media-viewer__action",
1924
- children: o ? /* @__PURE__ */ s(ke, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 })
1924
+ children: o ? /* @__PURE__ */ s(Ce, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
1925
  }
1926
1926
  ) : /* @__PURE__ */ m(
1927
1927
  "button",
@@ -1936,18 +1936,18 @@ const or = ({
1936
1936
  ),
1937
1937
  children: [
1938
1938
  o ? /* @__PURE__ */ s(
1939
- ke,
1939
+ Ce,
1940
1940
  {
1941
1941
  className: "size-4 animate-spin",
1942
1942
  weight: "bold",
1943
1943
  "aria-hidden": !0
1944
1944
  }
1945
- ) : /* @__PURE__ */ s(Ce, { ...g, "aria-hidden": !0 }),
1945
+ ) : /* @__PURE__ */ s(Se, { ...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), bt = ({
1950
+ }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
1951
1951
  length: e,
1952
1952
  initialIndex: t,
1953
1953
  open: n
@@ -1972,7 +1972,7 @@ const or = ({
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
- }, vt = ({
1975
+ }, xt = ({
1976
1976
  open: e,
1977
1977
  onClose: t,
1978
1978
  ariaLabel: n,
@@ -2062,13 +2062,13 @@ const or = ({
2062
2062
  ]
2063
2063
  }
2064
2064
  );
2065
- }, Cs = ({
2065
+ }, Ss = ({
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 } = bt({
2071
+ const { index: r, prev: i, next: l } = vt({
2072
2072
  length: t.length,
2073
2073
  initialIndex: n,
2074
2074
  open: e
@@ -2077,14 +2077,14 @@ const or = ({
2077
2077
  [o]
2078
2078
  );
2079
2079
  return o ? /* @__PURE__ */ m(
2080
- vt,
2080
+ xt,
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
- ks,
2087
+ Cs,
2088
2088
  {
2089
2089
  url: o.src,
2090
2090
  filename: d,
@@ -2107,7 +2107,7 @@ const or = ({
2107
2107
  `${r}:${o.src}`
2108
2108
  ),
2109
2109
  t.length > 1 ? /* @__PURE__ */ s(
2110
- pt,
2110
+ bt,
2111
2111
  {
2112
2112
  onPrev: i,
2113
2113
  onNext: l,
@@ -2118,7 +2118,7 @@ const or = ({
2118
2118
  ]
2119
2119
  }
2120
2120
  ) : null;
2121
- }, fr = "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", Ss = ({
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 = ({
2122
2122
  tiles: e,
2123
2123
  onTileActivate: t,
2124
2124
  maxVisible: n = 4,
@@ -2127,7 +2127,7 @@ const or = ({
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(fr, "h-full w-full");
2130
+ const h = k(gr, "h-full w-full");
2131
2131
  return t ? /* @__PURE__ */ m(
2132
2132
  "button",
2133
2133
  {
@@ -2196,7 +2196,7 @@ const or = ({
2196
2196
  [e]
2197
2197
  ), l = J(() => n(!1), []);
2198
2198
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2199
- }, gr = (e, t, n, a) => ({
2199
+ }, pr = (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 or = ({
2211
2211
  className: "absolute inset-0 size-full rounded-md object-cover"
2212
2212
  }
2213
2213
  )
2214
- }), pr = ({
2214
+ }), br = ({
2215
2215
  src: e,
2216
2216
  alt: t,
2217
2217
  items: n
2218
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Es = (e, t) => e.map((n, a) => ({
2218
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Is = (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
- })), br = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2222
+ })), vr = ({ 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 or = ({
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
- Cs,
2249
+ Ss,
2250
2250
  {
2251
2251
  open: l,
2252
- items: Es([{ src: e, alt: t }], n),
2252
+ items: Is([{ src: e, alt: t }], n),
2253
2253
  initialIndex: o,
2254
2254
  onClose: u
2255
2255
  }
2256
2256
  )
2257
2257
  ] });
2258
- }, Is = ({
2258
+ }, Ts = ({
2259
2259
  state: e,
2260
2260
  src: t,
2261
2261
  alt: n,
@@ -2266,13 +2266,13 @@ const or = ({
2266
2266
  loading: o = "lazy",
2267
2267
  onClick: d
2268
2268
  }) => {
2269
- const u = pr({ src: t, alt: n, items: r }), p = Me(e), { viewerOpen: h, viewerIndex: g, handleActivate: c, closeViewer: v } = Re(
2269
+ const u = br({ 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) => gr(b, f, u.length, o)
2275
+ (b, f) => pr(b, f, u.length, o)
2276
2276
  );
2277
2277
  return /* @__PURE__ */ m(
2278
2278
  Te,
@@ -2282,12 +2282,12 @@ const or = ({
2282
2282
  groupPosition: l,
2283
2283
  "data-testid": "image-attachment",
2284
2284
  children: [
2285
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ss, { tiles: w, onTileActivate: c }) }),
2285
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Es, { tiles: w, onTileActivate: c }) }),
2286
2286
  /* @__PURE__ */ s(
2287
- Cs,
2287
+ Ss,
2288
2288
  {
2289
2289
  open: h,
2290
- items: Es(u, a),
2290
+ items: Is(u, a),
2291
2291
  initialIndex: g,
2292
2292
  onClose: v
2293
2293
  }
@@ -2295,17 +2295,17 @@ const or = ({
2295
2295
  ]
2296
2296
  }
2297
2297
  );
2298
- }, vr = (e) => /* @__PURE__ */ s(br, { ...e }), xr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "sent" }), wr = (e) => /* @__PURE__ */ s(Is, { ...e, state: "received" }), _r = {
2299
- Composer: vr,
2300
- Sent: xr,
2301
- Received: wr
2302
- }, Nr = ({
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 = ({
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 } = bt({
2308
+ const { index: r, prev: i, next: l } = vt({
2309
2309
  length: t.length,
2310
2310
  initialIndex: n,
2311
2311
  open: e
@@ -2313,11 +2313,11 @@ const or = ({
2313
2313
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2314
2314
  [o]
2315
2315
  ), u = ae(
2316
- () => o ? yr(o.src) : void 0,
2316
+ () => o ? kr(o.src) : void 0,
2317
2317
  [o]
2318
2318
  );
2319
2319
  return !o || !u ? null : /* @__PURE__ */ m(
2320
- vt,
2320
+ xt,
2321
2321
  {
2322
2322
  open: e,
2323
2323
  onClose: a,
@@ -2336,7 +2336,7 @@ const or = ({
2336
2336
  `${r}:${o.src}`
2337
2337
  ),
2338
2338
  t.length > 1 ? /* @__PURE__ */ s(
2339
- pt,
2339
+ bt,
2340
2340
  {
2341
2341
  onPrev: i,
2342
2342
  onNext: l,
@@ -2347,16 +2347,16 @@ const or = ({
2347
2347
  ]
2348
2348
  }
2349
2349
  );
2350
- }, yr = (e) => {
2350
+ }, kr = (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
- }, kr = ({
2353
+ }, Cr = ({
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 }] : [], Cr = ({
2359
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Sr = ({
2360
2360
  variant: e,
2361
2361
  item: t,
2362
2362
  index: n,
@@ -2365,7 +2365,7 @@ const or = ({
2365
2365
  }) => {
2366
2366
  const i = t.filename ?? re(t.src);
2367
2367
  return /* @__PURE__ */ s(
2368
- Ns,
2368
+ ys,
2369
2369
  {
2370
2370
  variant: e,
2371
2371
  filename: i,
@@ -2377,7 +2377,7 @@ const or = ({
2377
2377
  trailingAction: r
2378
2378
  }
2379
2379
  );
2380
- }, xt = ({
2380
+ }, wt = ({
2381
2381
  state: e,
2382
2382
  src: t,
2383
2383
  filename: n,
@@ -2389,7 +2389,7 @@ const or = ({
2389
2389
  onClick: d,
2390
2390
  onDismiss: u
2391
2391
  }) => {
2392
- const p = Me(e), h = kr({ 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 = Cr({ 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)
@@ -2408,7 +2408,7 @@ const or = ({
2408
2408
  children: [
2409
2409
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((x, N) => {
2410
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
- ks,
2411
+ Cs,
2412
2412
  {
2413
2413
  url: x.src,
2414
2414
  filename: S,
@@ -2418,7 +2418,7 @@ const or = ({
2418
2418
  }
2419
2419
  );
2420
2420
  return /* @__PURE__ */ s(
2421
- Cr,
2421
+ Sr,
2422
2422
  {
2423
2423
  variant: p,
2424
2424
  item: x,
@@ -2430,7 +2430,7 @@ const or = ({
2430
2430
  );
2431
2431
  }) }),
2432
2432
  /* @__PURE__ */ s(
2433
- Nr,
2433
+ yr,
2434
2434
  {
2435
2435
  open: g,
2436
2436
  items: f,
@@ -2441,17 +2441,17 @@ const or = ({
2441
2441
  ]
2442
2442
  }
2443
2443
  );
2444
- }, Sr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Ir = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Tr = {
2445
- Composer: Sr,
2446
- Sent: Er,
2447
- Received: Ir
2448
- }, Ts = ({
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 = ({
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 } = bt({
2454
+ const { index: r, prev: i, next: l } = vt({
2455
2455
  length: t.length,
2456
2456
  initialIndex: n,
2457
2457
  open: e
@@ -2460,7 +2460,7 @@ const or = ({
2460
2460
  [o]
2461
2461
  );
2462
2462
  return o ? /* @__PURE__ */ m(
2463
- vt,
2463
+ xt,
2464
2464
  {
2465
2465
  open: e,
2466
2466
  onClose: a,
@@ -2484,7 +2484,7 @@ const or = ({
2484
2484
  `${r}:${o.src}`
2485
2485
  ),
2486
2486
  t.length > 1 ? /* @__PURE__ */ s(
2487
- pt,
2487
+ bt,
2488
2488
  {
2489
2489
  onPrev: i,
2490
2490
  onNext: l,
@@ -2495,7 +2495,7 @@ const or = ({
2495
2495
  ]
2496
2496
  }
2497
2497
  ) : null;
2498
- }, Ar = () => /* @__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 = ({
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 = ({
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 or = ({
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
- os,
2513
+ cs,
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(Ar, {})
2521
- ] }), Mr = (e, t, n) => ({
2520
+ /* @__PURE__ */ s(Mr, {})
2521
+ ] }), Rr = (e, t, n) => ({
2522
2522
  ariaLabel: `Play video ${t + 1} of ${n}`,
2523
- content: /* @__PURE__ */ s(As, { item: e, index: t })
2524
- }), Rr = ({
2523
+ content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2524
+ }), Lr = ({
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 }] : [], Ms = (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 }] : [], Rs = (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
- })), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2536
+ })), Dr = ({ 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 or = ({
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(As, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2548
+ children: /* @__PURE__ */ s(Ms, { 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
- Ts,
2553
+ As,
2554
2554
  {
2555
2555
  open: o,
2556
- items: Ms(
2556
+ items: Rs(
2557
2557
  [{ src: e, poster: t, mimeType: n, preload: r }],
2558
2558
  a
2559
2559
  ),
@@ -2562,7 +2562,7 @@ const or = ({
2562
2562
  }
2563
2563
  )
2564
2564
  ] });
2565
- }, Rs = ({
2565
+ }, Ls = ({
2566
2566
  state: e,
2567
2567
  src: t,
2568
2568
  poster: n,
@@ -2574,13 +2574,13 @@ const or = ({
2574
2574
  preload: d,
2575
2575
  onClick: u
2576
2576
  }) => {
2577
- const p = Rr({ 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 = Lr({ 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) => Mr(f, x, p.length)
2583
+ (f, x) => Rr(f, x, p.length)
2584
2584
  );
2585
2585
  return /* @__PURE__ */ m(
2586
2586
  Te,
@@ -2591,7 +2591,7 @@ const or = ({
2591
2591
  "data-testid": "video-attachment",
2592
2592
  children: [
2593
2593
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2594
- Ss,
2594
+ Es,
2595
2595
  {
2596
2596
  tiles: b,
2597
2597
  onTileActivate: v,
@@ -2599,10 +2599,10 @@ const or = ({
2599
2599
  }
2600
2600
  ) }),
2601
2601
  /* @__PURE__ */ s(
2602
- Ts,
2602
+ As,
2603
2603
  {
2604
2604
  open: g,
2605
- items: Ms(p, r),
2605
+ items: Rs(p, r),
2606
2606
  initialIndex: c,
2607
2607
  onClose: w
2608
2608
  }
@@ -2610,25 +2610,25 @@ const or = ({
2610
2610
  ]
2611
2611
  }
2612
2612
  );
2613
- }, Dr = (e) => /* @__PURE__ */ s(Lr, { ...e }), zr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "sent" }), Pr = (e) => /* @__PURE__ */ s(Rs, { ...e, state: "received" }), Fr = {
2614
- Composer: Dr,
2615
- Sent: zr,
2616
- Received: Pr
2617
- }, Ne = {
2618
- Image: _r,
2619
- Video: Fr,
2620
- Audio: er,
2621
- Pdf: Tr,
2622
- File: hr
2623
- }, Or = {
2624
- isUnlocking: () => !1
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
2625
2623
  }, $r = {
2626
- LockedAttachment: Or
2627
- }, Ls = at({}), ml = Ls.Provider;
2628
- function jr(e) {
2629
- return Ee(Ls)[e] ?? $r[e];
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];
2630
2630
  }
2631
- const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2631
+ const Ur = ({ size: e = 15 }) => /* @__PURE__ */ s(
2632
2632
  "svg",
2633
2633
  {
2634
2634
  width: e,
@@ -2645,21 +2645,21 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2645
2645
  }
2646
2646
  )
2647
2647
  }
2648
- ), Ur = (e) => {
2648
+ ), Vr = (e) => {
2649
2649
  var t;
2650
2650
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
2651
- }, Vr = (e) => {
2651
+ }, Gr = (e) => {
2652
2652
  var t;
2653
2653
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
2654
2654
  }, Fe = (e) => {
2655
2655
  var t;
2656
2656
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
2657
- }, Gr = (e) => {
2657
+ }, Hr = (e) => {
2658
2658
  var t;
2659
2659
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2660
- }, Ds = (e) => Ur(e) || Vr(e), Hr = (e) => {
2660
+ }, zs = (e) => Vr(e) || Gr(e), Yr = (e) => {
2661
2661
  var t;
2662
- return Ds(e) && !((t = e.text) != null && t.trim());
2662
+ return zs(e) && !((t = e.text) != null && t.trim());
2663
2663
  }, Ke = ({
2664
2664
  message: e,
2665
2665
  standalone: t = !1,
@@ -2667,7 +2667,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2667
2667
  hasAttachment: a = !1
2668
2668
  }) => {
2669
2669
  var h;
2670
- const r = Ds(e), i = Fe(e);
2670
+ const r = zs(e), i = Fe(e);
2671
2671
  if (!r && !i)
2672
2672
  return null;
2673
2673
  if (r) {
@@ -2675,7 +2675,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2675
2675
  if (!g) return null;
2676
2676
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", v = t ? `${g} tip` : `Delivered with ${g} tip`;
2677
2677
  return /* @__PURE__ */ m("div", { className: c, children: [
2678
- /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2678
+ /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2679
2679
  /* @__PURE__ */ s("span", { children: v })
2680
2680
  ] });
2681
2681
  }
@@ -2683,7 +2683,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2683
2683
  "message-chatbot-indicator",
2684
2684
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2685
2685
  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(Br, { size: l ? 12 : 15 }) });
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
2687
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ m(ee, { children: [
2688
2688
  u,
2689
2689
  p
@@ -2691,7 +2691,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2691
2691
  p,
2692
2692
  u
2693
2693
  ] }) });
2694
- }, Yr = ({
2694
+ }, qr = ({
2695
2695
  selected: e,
2696
2696
  onVoteUp: t,
2697
2697
  onVoteDown: n
@@ -2707,7 +2707,7 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2707
2707
  "aria-label": "Good response",
2708
2708
  "aria-pressed": e === "up",
2709
2709
  "data-tooltip": "Good response",
2710
- children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2710
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2711
2711
  }
2712
2712
  ),
2713
2713
  /* @__PURE__ */ s(
@@ -2721,20 +2721,27 @@ const Br = ({ size: e = 15 }) => /* @__PURE__ */ s(
2721
2721
  "aria-label": "Bad response",
2722
2722
  "aria-pressed": e === "down",
2723
2723
  "data-tooltip": "Bad response",
2724
- children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2724
+ children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2725
2725
  }
2726
2726
  )
2727
- ] }), qr = () => /* @__PURE__ */ m(ee, { children: [
2728
- /* @__PURE__ */ s(Xn, { weight: "bold", "aria-hidden": "true" }),
2729
- /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2730
- ] }), Wr = () => null, Xr = () => /* @__PURE__ */ s(
2731
- Ws,
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,
2732
2737
  {
2733
- MessageSentStatus: qr,
2738
+ MessageSentStatus: Je,
2739
+ MessageDeliveredStatus: Je,
2740
+ MessageReadStatus: Je,
2734
2741
  MessageSendingStatus: Wr
2735
2742
  }
2736
2743
  ), Kr = /^([a-z][a-z0-9+.-]*):/i, Jr = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2737
- function wt(e) {
2744
+ function _t(e) {
2738
2745
  if (typeof e != "string") return;
2739
2746
  const t = e.trim();
2740
2747
  if (t === "") return;
@@ -2752,7 +2759,7 @@ const Zr = {
2752
2759
  const n = k(
2753
2760
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
2754
2761
  Zr[e]
2755
- ), a = wt(t.href);
2762
+ ), a = _t(t.href);
2756
2763
  return a ? /* @__PURE__ */ s(
2757
2764
  "a",
2758
2765
  {
@@ -2784,7 +2791,7 @@ const Zr = {
2784
2791
  }, ti = "text-white/30", si = {
2785
2792
  dark: "text-white/55",
2786
2793
  light: "text-black/55"
2787
- }, _t = ({
2794
+ }, Nt = ({
2788
2795
  variant: e,
2789
2796
  title: t,
2790
2797
  placeholderTitle: n,
@@ -2892,11 +2899,11 @@ const Zr = {
2892
2899
  }, ri = {
2893
2900
  dark: "size-16 text-white/25",
2894
2901
  light: "size-16 text-black/25"
2895
- }, Ve = (e, t) => !!t && !!e && le(e) === "audio", Nt = (e, t) => {
2902
+ }, Ve = (e, t) => !!t && !!e && le(e) === "audio", yt = (e, t) => {
2896
2903
  if (!t || !e) return !1;
2897
2904
  const n = le(e);
2898
2905
  return n === "video" || n === "audio";
2899
- }, yt = "bg-[#F2F3F4]", $e = ({
2906
+ }, kt = "bg-[#F2F3F4]", $e = ({
2900
2907
  variant: e,
2901
2908
  thumbnailUrl: t,
2902
2909
  sourceUrl: n,
@@ -2990,10 +2997,10 @@ const Zr = {
2990
2997
  onClick: h,
2991
2998
  "aria-label": "Edit attachment",
2992
2999
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2993
- children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3000
+ children: /* @__PURE__ */ s(Jn, { className: "size-5", weight: "regular" })
2994
3001
  }
2995
3002
  ) : void 0;
2996
- return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: yt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
3003
+ return c ? /* @__PURE__ */ s(Oe, { variant: "dark", bgClassName: kt, children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 pr-3", children: [
2997
3004
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
2998
3005
  $e,
2999
3006
  {
@@ -3022,7 +3029,7 @@ const Zr = {
3022
3029
  }
3023
3030
  ),
3024
3031
  /* @__PURE__ */ s(
3025
- _t,
3032
+ Nt,
3026
3033
  {
3027
3034
  variant: "dark",
3028
3035
  title: e,
@@ -3049,7 +3056,7 @@ const Zr = {
3049
3056
  cta: d,
3050
3057
  onClick: u
3051
3058
  }) => {
3052
- 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 ? {
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 ? {
3053
3060
  ...d,
3054
3061
  onClick: () => {
3055
3062
  var b;
@@ -3077,7 +3084,7 @@ const Zr = {
3077
3084
  }
3078
3085
  ),
3079
3086
  /* @__PURE__ */ s(
3080
- _t,
3087
+ Nt,
3081
3088
  {
3082
3089
  variant: "light",
3083
3090
  title: e,
@@ -3103,14 +3110,14 @@ const Zr = {
3103
3110
  cta: u,
3104
3111
  onClick: p
3105
3112
  }) => {
3106
- 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;
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;
3107
3114
  return /* @__PURE__ */ m(
3108
3115
  Oe,
3109
3116
  {
3110
3117
  variant: "dark",
3111
3118
  href: c,
3112
3119
  onClick: v,
3113
- bgClassName: Ve(r, l) ? yt : void 0,
3120
+ bgClassName: Ve(r, l) ? kt : void 0,
3114
3121
  children: [
3115
3122
  o === "featured" && /* @__PURE__ */ s(
3116
3123
  $e,
@@ -3123,7 +3130,7 @@ const Zr = {
3123
3130
  }
3124
3131
  ),
3125
3132
  /* @__PURE__ */ s(
3126
- _t,
3133
+ Nt,
3127
3134
  {
3128
3135
  variant: "dark",
3129
3136
  title: e,
@@ -3137,7 +3144,7 @@ const Zr = {
3137
3144
  ]
3138
3145
  }
3139
3146
  );
3140
- }, Qt = {
3147
+ }, es = {
3141
3148
  Composer: ii,
3142
3149
  Sent: oi,
3143
3150
  Received: li
@@ -3146,13 +3153,13 @@ function P(e) {
3146
3153
  const t = e == null ? void 0 : e.trim();
3147
3154
  return t || void 0;
3148
3155
  }
3149
- function es(e) {
3156
+ function ts(e) {
3150
3157
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3151
3158
  }
3152
3159
  function ui(e, t) {
3153
3160
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3154
3161
  return !1;
3155
- const n = es(e), a = es(t);
3162
+ const n = ts(e), a = ts(t);
3156
3163
  if (n === a)
3157
3164
  return !0;
3158
3165
  if (!n.includes(a))
@@ -3160,7 +3167,7 @@ function ui(e, t) {
3160
3167
  const r = n.split(a).join("");
3161
3168
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3162
3169
  }
3163
- function ts(e) {
3170
+ function ss(e) {
3164
3171
  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);
3165
3172
  return {
3166
3173
  title: P(e.title),
@@ -3170,19 +3177,19 @@ function ts(e) {
3170
3177
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3171
3178
  // native video/audio player in the hero instead of a static thumbnail.
3172
3179
  sourceUrl: a,
3173
- layout: n || Nt(r, a) ? "featured" : "classic",
3180
+ layout: n || yt(r, a) ? "featured" : "classic",
3174
3181
  mimeType: r
3175
3182
  };
3176
3183
  }
3177
3184
  function mi(e) {
3178
3185
  var t;
3179
- 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;
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;
3180
3187
  }
3181
- function zs(e) {
3188
+ function Ps(e) {
3182
3189
  const t = P(e.og_scrape_url);
3183
3190
  return e.type === "link" || !!t && !e.asset_url;
3184
3191
  }
3185
- function Ps(e) {
3192
+ function Fs(e) {
3186
3193
  if (!(e != null && e.length)) return [];
3187
3194
  const t = [], n = (r, i) => {
3188
3195
  const l = t[t.length - 1];
@@ -3200,7 +3207,7 @@ function Ps(e) {
3200
3207
  t.push({ type: "link", attachments: [r] });
3201
3208
  };
3202
3209
  for (const r of e) {
3203
- if (zs(r)) {
3210
+ if (Ps(r)) {
3204
3211
  a(r);
3205
3212
  continue;
3206
3213
  }
@@ -3221,21 +3228,21 @@ function fi(e) {
3221
3228
  function gi(e, t, n) {
3222
3229
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3223
3230
  }
3224
- function ss(e) {
3231
+ function ns(e) {
3225
3232
  return P(e.image_url) ?? P(e.asset_url) ?? "";
3226
3233
  }
3227
3234
  function pi(e) {
3228
3235
  switch (e) {
3229
3236
  case "image":
3230
- return Ne.Image;
3237
+ return ye.Image;
3231
3238
  case "video":
3232
- return Ne.Video;
3239
+ return ye.Video;
3233
3240
  case "audio":
3234
- return Ne.Audio;
3241
+ return ye.Audio;
3235
3242
  case "pdf":
3236
- return Ne.Pdf;
3243
+ return ye.Pdf;
3237
3244
  default:
3238
- return Ne.File;
3245
+ return ye.File;
3239
3246
  }
3240
3247
  }
3241
3248
  function bi(e, t) {
@@ -3244,7 +3251,7 @@ function bi(e, t) {
3244
3251
  case "image":
3245
3252
  return {
3246
3253
  items: t.map((a) => ({
3247
- src: ss(a),
3254
+ src: ns(a),
3248
3255
  alt: P(a.title)
3249
3256
  }))
3250
3257
  };
@@ -3295,7 +3302,7 @@ function bi(e, t) {
3295
3302
  switch (e) {
3296
3303
  case "image":
3297
3304
  return {
3298
- src: ss(n),
3305
+ src: ns(n),
3299
3306
  alt: P(n.title)
3300
3307
  };
3301
3308
  case "video":
@@ -3344,17 +3351,17 @@ const xi = ({
3344
3351
  message: n
3345
3352
  }) => {
3346
3353
  var w;
3347
- const a = Ps(n.attachments);
3354
+ const a = Fs(n.attachments);
3348
3355
  if (a.length === 0) return null;
3349
- 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" ? ts(o.attachments[0] ?? {}).url : void 0, u = l && ui(l, d) ? void 0 : l;
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;
3350
3357
  let p = 0, h = 0;
3351
3358
  const g = [], c = (b, f) => {
3352
3359
  const x = p === r - 1;
3353
3360
  p += 1;
3354
- const N = t ? Qt.Sent : Qt.Received;
3361
+ const N = t ? es.Sent : es.Received;
3355
3362
  g.push(
3356
3363
  /* @__PURE__ */ m(U.Fragment, { children: [
3357
- /* @__PURE__ */ s(N, { ...ts(b) }),
3364
+ /* @__PURE__ */ s(N, { ...ss(b) }),
3358
3365
  x && u ? /* @__PURE__ */ s("div", { className: t ? ci : di, children: u }) : null
3359
3366
  ] }, f)
3360
3367
  );
@@ -3387,7 +3394,7 @@ const xi = ({
3387
3394
  v(b, `media-${f}`);
3388
3395
  }), /* @__PURE__ */ s(ee, { children: g });
3389
3396
  }, wi = (e) => {
3390
- var Tt, At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut;
3397
+ var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, jt, Bt, Ut, Vt;
3391
3398
  const {
3392
3399
  additionalMessageInputProps: t,
3393
3400
  chatbotVotingEnabled: n,
@@ -3405,52 +3412,52 @@ const xi = ({
3405
3412
  renderText: v,
3406
3413
  threadList: w,
3407
3414
  viewerLanguage: b
3408
- } = e, { client: f } = me("CustomMessage"), { channel: x } = ue("CustomMessage"), { isUnlocking: N, onUnlockClick: S, onFetchSource: T, onDownloadClick: M } = jr("LockedAttachment"), [D, L] = B(!1), O = Ks(c.id), { selected: z, voteUp: y, voteDown: A } = va(c), {
3409
- Attachment: E = Js,
3410
- EditMessageModal: C = Zs,
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,
3411
3418
  MessageActions: I,
3412
- MessageBlocked: $ = Qs,
3413
- MessageBouncePrompt: F = en,
3414
- MessageDeleted: V = tn,
3415
- MessageIsThreadReplyInChannelButtonIndicator: Q = sn,
3416
- MessageRepliesCountButton: te = nn,
3417
- ReminderNotification: X = an,
3418
- StreamedMessageText: _ = rn,
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,
3419
3426
  PinIndicator: R
3420
- } = rs("CustomMessage"), H = ln(c), q = on(c), Y = ae(
3427
+ } = is("CustomMessage"), H = on(c), q = cn(c), Y = ae(
3421
3428
  () => h == null ? void 0 : h(c),
3422
3429
  [h, c]
3423
3430
  ), j = ae(() => {
3424
3431
  const de = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...de] : de;
3425
3432
  if (!Fe(c)) return pe;
3426
- const Vt = pe.filter((Gt) => !("type" in Gt) || !xs(Gt));
3427
- return Vt.length === pe.length ? pe : Vt;
3433
+ const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3434
+ return Gt.length === pe.length ? pe : Gt;
3428
3435
  }, [c]), W = ae(
3429
- () => Ps(j),
3436
+ () => Fs(j),
3430
3437
  [j]
3431
3438
  ), Z = ae(() => {
3432
- const de = ms({ message: c, viewerLanguage: b });
3439
+ const de = hs({ message: c, viewerLanguage: b });
3433
3440
  return de === c.text ? c : { ...c, text: de };
3434
3441
  }, [c, b]), oe = W.length > 0, Le = W.reduce(
3435
3442
  (de, pe) => de + pe.attachments.length,
3436
3443
  0
3437
- ) === ((j == null ? void 0 : j.length) ?? 0), De = Wa(
3444
+ ) === ((j == null ? void 0 : j.length) ?? 0), De = Xa(
3438
3445
  {
3439
3446
  endOfGroup: r,
3440
3447
  firstOfGroup: i,
3441
3448
  groupedByUser: l
3442
3449
  }
3443
3450
  );
3444
- if (cn(c))
3451
+ if (dn(c))
3445
3452
  return null;
3446
3453
  if (c.deleted_at || c.type === "deleted")
3447
3454
  return /* @__PURE__ */ s(V, { message: c });
3448
- if (dn(c))
3455
+ if (un(c))
3449
3456
  return /* @__PURE__ */ s($, {});
3450
- 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 = un(c);
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);
3451
3458
  let he;
3452
- ie ? he = () => u(c) : Ct && (he = () => L(!0));
3453
- const fe = g(), Bs = k(
3459
+ ie ? he = () => u(c) : St && (he = () => L(!0));
3460
+ const fe = g(), Us = k(
3454
3461
  "str-chat__message str-chat__message-simple",
3455
3462
  `str-chat__message--${c.type}`,
3456
3463
  `str-chat__message--${c.status}`,
@@ -3461,13 +3468,13 @@ const xi = ({
3461
3468
  "str-chat__message--highlighted": p,
3462
3469
  "str-chat__message--pinned pinned-message": c.pinned,
3463
3470
  "str-chat__message--with-reactions": q,
3464
- "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,
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,
3465
3472
  "str-chat__message-with-thread-link": ne || ce,
3466
3473
  "str-chat__virtual-message__wrapper--end": r,
3467
3474
  "str-chat__virtual-message__wrapper--first": i,
3468
3475
  "str-chat__virtual-message__wrapper--group": l
3469
3476
  }
3470
- ), Ge = c.poll_id && f.polls.fromState(c.poll_id), St = Hr(c), ge = Fe(c), Et = Gr(c), He = !!(j != null && j.length && !c.quoted_message), It = ge && fe && He, Us = oe && Le && !c.quoted_message && !Ge && !Y && !ge;
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;
3471
3478
  return /* @__PURE__ */ m(ee, { children: [
3472
3479
  a && /* @__PURE__ */ s(
3473
3480
  C,
@@ -3476,7 +3483,7 @@ const xi = ({
3476
3483
  }
3477
3484
  ),
3478
3485
  D && /* @__PURE__ */ s(
3479
- mn,
3486
+ hn,
3480
3487
  {
3481
3488
  MessageBouncePrompt: F,
3482
3489
  onClose: () => L(!1),
@@ -3486,7 +3493,7 @@ const xi = ({
3486
3493
  /* @__PURE__ */ m(
3487
3494
  "div",
3488
3495
  {
3489
- className: Bs,
3496
+ className: Us,
3490
3497
  "data-message-id": c.id,
3491
3498
  "data-dd-privacy": "mask",
3492
3499
  children: [
@@ -3508,7 +3515,7 @@ const xi = ({
3508
3515
  "div",
3509
3516
  {
3510
3517
  className: k("str-chat__message-inner", {
3511
- "str-chat__simple-message--error-failed": ie || Ct
3518
+ "str-chat__simple-message--error-failed": ie || St
3512
3519
  }),
3513
3520
  "data-testid": "message-inner",
3514
3521
  onClick: he,
@@ -3521,32 +3528,32 @@ const xi = ({
3521
3528
  marginInlineEnd: 0,
3522
3529
  marginInlineStart: 0
3523
3530
  },
3524
- children: Et ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3531
+ children: It ? /* @__PURE__ */ m("div", { className: "str-chat__message-bubble-wrapper", children: [
3525
3532
  fe ? /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3526
3533
  I && /* @__PURE__ */ s(I, {}),
3527
3534
  /* @__PURE__ */ s(
3528
- Jt.Sent,
3535
+ Zt.Sent,
3529
3536
  {
3530
- title: (Mt = c.metadata) == null ? void 0 : Mt.attachment_title,
3531
- mimeType: (Rt = c.metadata) == null ? void 0 : Rt.attachment_mime_type,
3532
- thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3533
- amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
3534
- detail: (zt = c.metadata) == null ? void 0 : zt.attachment_detail,
3535
- paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
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,
3536
3543
  onPreviewClick: () => S == null ? void 0 : S(c, x),
3537
3544
  onFetchSource: async () => await (T == null ? void 0 : T(c, x))
3538
3545
  }
3539
3546
  )
3540
3547
  ] }) : /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
3541
3548
  /* @__PURE__ */ s(
3542
- Jt.Received,
3549
+ Zt.Received,
3543
3550
  {
3544
- title: (Ft = c.metadata) == null ? void 0 : Ft.attachment_title,
3545
- mimeType: (Ot = c.metadata) == null ? void 0 : Ot.attachment_mime_type,
3546
- thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
3547
- amountText: (jt = c.metadata) == null ? void 0 : jt.amount_text,
3548
- detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
3549
- paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
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,
3550
3557
  isUnlocking: N(c.id),
3551
3558
  onUnlockClick: () => S == null ? void 0 : S(c, x),
3552
3559
  onFetchSource: async () => await (T == null ? void 0 : T(c, x)),
@@ -3556,16 +3563,16 @@ const xi = ({
3556
3563
  I && /* @__PURE__ */ s(I, {})
3557
3564
  ] }),
3558
3565
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
3559
- Yt,
3566
+ qt,
3560
3567
  {
3561
3568
  message: Z,
3562
3569
  renderText: v
3563
3570
  }
3564
3571
  ) })
3565
- ] }) : St ? (
3572
+ ] }) : Et ? (
3566
3573
  /* Tip-only messages render as a standalone bubble */
3567
3574
  /* @__PURE__ */ s(Ke, { message: c, standalone: !0 })
3568
- ) : Us ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3575
+ ) : Vs ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m(
3569
3576
  "div",
3570
3577
  {
3571
3578
  className: "str-chat__message-bubble",
@@ -3587,11 +3594,11 @@ const xi = ({
3587
3594
  }
3588
3595
  }
3589
3596
  ),
3590
- /* @__PURE__ */ s(qt, {})
3597
+ /* @__PURE__ */ s(Wt, {})
3591
3598
  ]
3592
3599
  }
3593
3600
  ) }) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ m("div", { className: "str-chat__message-bubble", children: [
3594
- ge && !It && /* @__PURE__ */ s(
3601
+ ge && !Tt && /* @__PURE__ */ s(
3595
3602
  Ke,
3596
3603
  {
3597
3604
  message: c,
@@ -3599,7 +3606,7 @@ const xi = ({
3599
3606
  isMyMessage: fe
3600
3607
  }
3601
3608
  ),
3602
- Ge && /* @__PURE__ */ s(hn, { poll: Ge }),
3609
+ Ge && /* @__PURE__ */ s(fn, { poll: Ge }),
3603
3610
  j != null && j.length && !c.quoted_message ? /* @__PURE__ */ s(
3604
3611
  E,
3605
3612
  {
@@ -3614,18 +3621,18 @@ const xi = ({
3614
3621
  renderText: v
3615
3622
  }
3616
3623
  ) : /* @__PURE__ */ s(
3617
- Yt,
3624
+ qt,
3618
3625
  {
3619
3626
  message: Z,
3620
3627
  renderText: v
3621
3628
  }
3622
3629
  ),
3623
- /* @__PURE__ */ s(qt, {})
3630
+ /* @__PURE__ */ s(Wt, {})
3624
3631
  ] }) })
3625
3632
  }
3626
3633
  ),
3627
- !Et && !St && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3628
- (!ge || It) && /* @__PURE__ */ s(
3634
+ !It && !Et && /* @__PURE__ */ m("div", { className: "str-chat__message-footer", children: [
3635
+ (!ge || Tt) && /* @__PURE__ */ s(
3629
3636
  Ke,
3630
3637
  {
3631
3638
  message: c,
@@ -3634,7 +3641,7 @@ const xi = ({
3634
3641
  }
3635
3642
  ),
3636
3643
  n && ge && /* @__PURE__ */ s(
3637
- Yr,
3644
+ qr,
3638
3645
  {
3639
3646
  selected: z,
3640
3647
  onVoteUp: y,
@@ -3660,41 +3667,41 @@ const xi = ({
3660
3667
  wi,
3661
3668
  (e, t) => {
3662
3669
  var n, a;
3663
- 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 : Xs(e, t);
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);
3664
3671
  }
3665
3672
  ), Ni = (e) => {
3666
- const t = Ie("CustomMessage");
3673
+ const t = _e("CustomMessage");
3667
3674
  return /* @__PURE__ */ s(_i, { ...t, ...e });
3668
3675
  }, yi = () => {
3669
3676
  var n;
3670
- const { handleDelete: e, message: t } = Ie("CustomMessageActions");
3677
+ const { handleDelete: e, message: t } = _e("CustomMessageActions");
3671
3678
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3672
- cs,
3679
+ ds,
3673
3680
  {
3674
3681
  onClick: e,
3675
3682
  "aria-label": "Delete",
3676
3683
  title: "Delete",
3677
3684
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3678
- children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3685
+ children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3679
3686
  }
3680
3687
  );
3681
3688
  }, ki = () => {
3682
- const { handleFlag: e } = Ie("CustomMessageActions");
3689
+ const { handleFlag: e } = _e("CustomMessageActions");
3683
3690
  return /* @__PURE__ */ s(
3684
- cs,
3691
+ ds,
3685
3692
  {
3686
3693
  onClick: e,
3687
3694
  "aria-label": "Report",
3688
3695
  title: "Report",
3689
3696
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3690
- children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
3697
+ children: /* @__PURE__ */ s(ls, { size: 16, weight: "light", "aria-hidden": !0 })
3691
3698
  }
3692
3699
  );
3693
3700
  }, Ci = () => {
3694
3701
  var t;
3695
- const { message: e } = Ie("CustomMessageActions");
3702
+ const { message: e } = _e("CustomMessageActions");
3696
3703
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3697
- ea,
3704
+ ta,
3698
3705
  {
3699
3706
  messageActionSet: [
3700
3707
  { Component: yi, placement: "quick", type: "delete" },
@@ -3744,10 +3751,10 @@ const xi = ({
3744
3751
  );
3745
3752
  }, Ei = (e) => ({
3746
3753
  linkPreviews: Array.from(e.previews.values()).filter(
3747
- (t) => Ht.previewIsLoaded(t) || Ht.previewIsLoading(t)
3754
+ (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3748
3755
  )
3749
3756
  }), Ii = () => {
3750
- const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3757
+ const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3751
3758
  e.state,
3752
3759
  Ei
3753
3760
  ), n = (r) => {
@@ -3764,7 +3771,7 @@ const xi = ({
3764
3771
  // fixed-height hero would spill out of the collapsed card box.
3765
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
3773
  ) : null;
3767
- }, kt = U.createContext(!1), hl = () => Ee(kt), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3774
+ }, Ct = U.createContext(!1), hl = () => Ie(Ct), Ti = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
3768
3775
  "button",
3769
3776
  {
3770
3777
  ...n,
@@ -3772,13 +3779,13 @@ const xi = ({
3772
3779
  "aria-label": "Send",
3773
3780
  disabled: t,
3774
3781
  onClick: e,
3775
- children: /* @__PURE__ */ s(Zn, { weight: "bold", className: "size-4" })
3782
+ children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3776
3783
  }
3777
3784
  ), Ai = () => {
3778
- const e = Ee(kt), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3785
+ const e = Ie(Ct), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3779
3786
  SendButton: r = Ti,
3780
- AttachmentPreviewList: i = xn
3781
- } = rs("CustomMessageInput");
3787
+ AttachmentPreviewList: i = wn
3788
+ } = is("CustomMessageInput");
3782
3789
  return (
3783
3790
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
3784
3791
  // preview list inside is the scrollable region); the textarea + send row
@@ -3794,12 +3801,12 @@ const xi = ({
3794
3801
  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)]",
3795
3802
  "data-dd-privacy": "mask",
3796
3803
  children: [
3797
- /* @__PURE__ */ s(wn, {}),
3804
+ /* @__PURE__ */ s(_n, {}),
3798
3805
  /* @__PURE__ */ s(Ii, {}),
3799
3806
  /* @__PURE__ */ s(i, {}),
3800
3807
  /* @__PURE__ */ m("div", { className: "flex shrink-0", children: [
3801
3808
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3802
- _n,
3809
+ Nn,
3803
3810
  {
3804
3811
  "aria-disabled": e || void 0,
3805
3812
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3846,7 +3853,7 @@ const xi = ({
3846
3853
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3847
3854
  children: [
3848
3855
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3849
- /* @__PURE__ */ s(kt.Provider, { value: l, children: /* @__PURE__ */ s(pn, { Input: r ?? Ai }) })
3856
+ /* @__PURE__ */ s(Ct.Provider, { value: l, children: /* @__PURE__ */ s(bn, { Input: r ?? Ai }) })
3850
3857
  ]
3851
3858
  }
3852
3859
  ),
@@ -3862,10 +3869,10 @@ const xi = ({
3862
3869
  "SYSTEM_AGE_SAFETY_BLOCKED"
3863
3870
  ], zi = {
3864
3871
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3865
- }, Je = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", ns = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
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
3873
  var a;
3867
3874
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3868
- if (ns(t))
3875
+ if (as(t))
3869
3876
  return {
3870
3877
  kind: "dm-agent",
3871
3878
  type: t
@@ -3876,16 +3883,16 @@ const xi = ({
3876
3883
  type: t
3877
3884
  };
3878
3885
  const n = e.dm_agent_system_type;
3879
- if (ns(n))
3886
+ if (as(n))
3880
3887
  return {
3881
3888
  kind: "dm-agent",
3882
3889
  type: n
3883
3890
  };
3884
3891
  }, $i = (e) => {
3885
- const t = e.indexOf(Je);
3892
+ const t = e.indexOf(Ze);
3886
3893
  if (t === -1)
3887
3894
  return e;
3888
- const n = t + Je.length;
3895
+ const n = t + Ze.length;
3889
3896
  return /* @__PURE__ */ m(ee, { children: [
3890
3897
  e.slice(0, t),
3891
3898
  /* @__PURE__ */ s(
@@ -3895,7 +3902,7 @@ const xi = ({
3895
3902
  target: "_blank",
3896
3903
  rel: "noopener noreferrer",
3897
3904
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
3898
- children: Je
3905
+ children: Ze
3899
3906
  }
3900
3907
  ),
3901
3908
  e.slice(n)
@@ -3942,7 +3949,7 @@ const xi = ({
3942
3949
  "data-age-safety-system-type": n.type,
3943
3950
  children: [
3944
3951
  /* @__PURE__ */ s(
3945
- Qn,
3952
+ ea,
3946
3953
  {
3947
3954
  size: 24,
3948
3955
  weight: "duotone",
@@ -3966,7 +3973,7 @@ const xi = ({
3966
3973
  ] }),
3967
3974
  !t && /* @__PURE__ */ s(Ye, { message: e.message })
3968
3975
  ] });
3969
- }, Fs = at(!1), Ze = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
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
3977
  "animateTransform",
3971
3978
  {
3972
3979
  attributeName: "transform",
@@ -3982,11 +3989,11 @@ const xi = ({
3982
3989
  qe.ExternalSources
3983
3990
  ]), Ui = ({ threadList: e }) => {
3984
3991
  var v, w;
3985
- const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = Nn(), { aiState: l } = yn(t), o = Ee(Fs);
3992
+ const { channel: t, channelConfig: n, thread: a } = ue(), { client: r } = me(), { typing: i = {} } = yn(), { aiState: l } = kn(t), o = Ie(Os);
3986
3993
  if (!e && o && Bi.has(l)) {
3987
3994
  const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
3988
3995
  return /* @__PURE__ */ s(
3989
- as,
3996
+ rs,
3990
3997
  {
3991
3998
  avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
3992
3999
  avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
@@ -4012,7 +4019,7 @@ const xi = ({
4012
4019
  return null;
4013
4020
  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;
4014
4021
  return /* @__PURE__ */ s(
4015
- as,
4022
+ rs,
4016
4023
  {
4017
4024
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4018
4025
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4020,7 +4027,7 @@ const xi = ({
4020
4027
  testId: "typing-indicator"
4021
4028
  }
4022
4029
  );
4023
- }, as = ({
4030
+ }, rs = ({
4024
4031
  avatarId: e,
4025
4032
  avatarName: t,
4026
4033
  avatarImage: n,
@@ -4055,9 +4062,9 @@ const xi = ({
4055
4062
  height: "13",
4056
4063
  overflow: "visible",
4057
4064
  children: [
4058
- /* @__PURE__ */ s(Ze, { cx: "4", index: 0 }),
4059
- /* @__PURE__ */ s(Ze, { cx: "16", index: 1 }),
4060
- /* @__PURE__ */ s(Ze, { cx: "28", index: 2 })
4065
+ /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4066
+ /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4067
+ /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4061
4068
  ]
4062
4069
  }
4063
4070
  ) }) }) }) }) })
@@ -4151,7 +4158,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4151
4158
  );
4152
4159
  },
4153
4160
  [(A = f.state) == null ? void 0 : A.members, x == null ? void 0 : x.userID, f.type]
4154
- ), S = ot(N == null ? void 0 : N.user), T = (E = N == null ? void 0 : N.user) == null ? void 0 : E.image, M = lt(f), D = b == null ? void 0 : b({
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
4162
  channel: f,
4156
4163
  participant: N
4157
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: [
@@ -4180,7 +4187,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4180
4187
  }),
4181
4188
  type: "button",
4182
4189
  "aria-label": "Back to conversations",
4183
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4190
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4184
4191
  }
4185
4192
  ) }),
4186
4193
  /* @__PURE__ */ s(
@@ -4258,7 +4265,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4258
4265
  type: "button",
4259
4266
  "aria-label": M ? "Unstar conversation" : "Star conversation",
4260
4267
  children: /* @__PURE__ */ s(
4261
- Se,
4268
+ Ee,
4262
4269
  {
4263
4270
  className: k("size-5", {
4264
4271
  "text-yellow-600": M,
@@ -4270,7 +4277,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4270
4277
  }
4271
4278
  ),
4272
4279
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
4273
- tt,
4280
+ st,
4274
4281
  {
4275
4282
  channel: f,
4276
4283
  participant: N,
@@ -4300,7 +4307,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4300
4307
  type: "button",
4301
4308
  onClick: e,
4302
4309
  "aria-label": "Back to conversations",
4303
- children: /* @__PURE__ */ s(Qe, { className: "size-5 text-black/90" })
4310
+ children: /* @__PURE__ */ s(et, { className: "size-5 text-black/90" })
4304
4311
  }
4305
4312
  ),
4306
4313
  w ? /* @__PURE__ */ m(
@@ -4376,7 +4383,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4376
4383
  type: "button",
4377
4384
  "aria-label": M ? "Unstar conversation" : "Star conversation",
4378
4385
  children: /* @__PURE__ */ s(
4379
- Se,
4386
+ Ee,
4380
4387
  {
4381
4388
  className: k("size-6", {
4382
4389
  "text-yellow-600": M,
@@ -4388,7 +4395,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4388
4395
  }
4389
4396
  ),
4390
4397
  v && (c !== void 0 ? c : /* @__PURE__ */ s(
4391
- tt,
4398
+ st,
4392
4399
  {
4393
4400
  channel: f,
4394
4401
  participant: N,
@@ -4457,7 +4464,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4457
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
4465
  (Y) => Y.type !== "deleted"
4459
4466
  ), Q = f ? /* @__PURE__ */ s(U.Fragment, { children: f() }, "lt-channel-banner") : null, te = O ? /* @__PURE__ */ s(
4460
- ga,
4467
+ pa,
4461
4468
  {
4462
4469
  onBack: e,
4463
4470
  showBackButton: t,
@@ -4478,7 +4485,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4478
4485
  }
4479
4486
  ) : null, X = J(
4480
4487
  (Y) => {
4481
- const { message: j } = Ie("ChannelView"), W = /* @__PURE__ */ s(
4488
+ const { message: j } = _e("ChannelView"), W = /* @__PURE__ */ s(
4482
4489
  Ni,
4483
4490
  {
4484
4491
  ...Y,
@@ -4491,13 +4498,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4491
4498
  [b, T, D]
4492
4499
  );
4493
4500
  return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4494
- Cn,
4501
+ Sn,
4495
4502
  {
4496
4503
  overrides: {
4497
4504
  Message: X,
4498
4505
  MessageActions: Ci
4499
4506
  },
4500
- children: /* @__PURE__ */ m(Sn, { children: [
4507
+ children: /* @__PURE__ */ m(En, { children: [
4501
4508
  !O && /* @__PURE__ */ m(ee, { children: [
4502
4509
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4503
4510
  Yi,
@@ -4531,7 +4538,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4531
4538
  {
4532
4539
  className: "flex-1 overflow-hidden relative",
4533
4540
  children: /* @__PURE__ */ s(
4534
- En,
4541
+ In,
4535
4542
  {
4536
4543
  head: O && V ? /* @__PURE__ */ m("div", { className: "sticky top-0 z-10", children: [
4537
4544
  te,
@@ -4561,7 +4568,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4561
4568
  ] })
4562
4569
  }
4563
4570
  ) });
4564
- }, Os = U.memo(
4571
+ }, $s = U.memo(
4565
4572
  ({
4566
4573
  channel: e,
4567
4574
  onBack: t,
@@ -4638,14 +4645,14 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4638
4645
  "messaging-channel-view h-full flex flex-col",
4639
4646
  d
4640
4647
  ),
4641
- children: /* @__PURE__ */ s(Fs.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4642
- kn,
4648
+ children: /* @__PURE__ */ s(Os.Provider, { value: x ?? !1, children: /* @__PURE__ */ s(
4649
+ Cn,
4643
4650
  {
4644
4651
  channel: e,
4645
4652
  MessageSystem: ji,
4646
4653
  EmptyStateIndicator: u,
4647
4654
  LoadingIndicator: je,
4648
- DateSeparator: pa,
4655
+ DateSeparator: ba,
4649
4656
  TypingIndicator: Ui,
4650
4657
  doSendMessageRequest: Q,
4651
4658
  ...E ? { SendButton: E } : {},
@@ -4689,8 +4696,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4689
4696
  );
4690
4697
  }
4691
4698
  );
4692
- Os.displayName = "ChannelView";
4693
- 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: [
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: [
4694
4701
  /* @__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: "⚠️" }) }),
4695
4702
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4696
4703
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4704,7 +4711,7 @@ const ye = U.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4704
4711
  }
4705
4712
  )
4706
4713
  ] }) }));
4707
- ye.displayName = "ErrorState";
4714
+ ke.displayName = "ErrorState";
4708
4715
  const fl = ({
4709
4716
  capabilities: e = {},
4710
4717
  renderMessageInputActions: t,
@@ -4738,7 +4745,7 @@ const fl = ({
4738
4745
  refreshConnection: y,
4739
4746
  service: A,
4740
4747
  debug: E
4741
- } = ta(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4748
+ } = sa(), [C, I] = B(null), [$, F] = B(null), [V, Q] = B(!1), { showDeleteConversation: te = !0 } = e, X = G(l);
4742
4749
  X.current = l;
4743
4750
  const _ = G(a);
4744
4751
  _.current = a;
@@ -4815,14 +4822,14 @@ const fl = ({
4815
4822
  var j;
4816
4823
  I(null), Q(!0), (j = q.current) == null || j.call(q);
4817
4824
  }, []);
4818
- return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ye, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4819
- ye,
4825
+ return O ? /* @__PURE__ */ s(je, {}) : z ? /* @__PURE__ */ s(ke, { message: z, onBack: y }) : !L || !D ? /* @__PURE__ */ s(
4826
+ ke,
4820
4827
  {
4821
4828
  message: "Not connected to messaging service",
4822
4829
  onBack: y
4823
4830
  }
4824
- ) : $ ? /* @__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(
4825
- Os,
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,
4826
4833
  {
4827
4834
  channel: C,
4828
4835
  renderMessageInputActions: t,
@@ -4856,7 +4863,7 @@ function Wi(e) {
4856
4863
  for (const n of t)
4857
4864
  e.state.addMessageSorted(n.message);
4858
4865
  }
4859
- const $s = U.createContext({
4866
+ const js = U.createContext({
4860
4867
  selectedChannel: void 0,
4861
4868
  onChannelSelect: () => {
4862
4869
  },
@@ -4864,7 +4871,7 @@ const $s = U.createContext({
4864
4871
  renderMessagePreview: void 0,
4865
4872
  channelPreview: void 0,
4866
4873
  viewerLanguage: void 0
4867
- }), Xi = $s.Provider, Ki = () => U.useContext($s), Ji = (e, t) => {
4874
+ }), Xi = js.Provider, Ki = () => U.useContext(js), Ji = (e, t) => {
4868
4875
  const n = new Date(
4869
4876
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4870
4877
  ), r = new Date(
@@ -4885,7 +4892,7 @@ const $s = U.createContext({
4885
4892
  day: "numeric",
4886
4893
  year: "2-digit"
4887
4894
  });
4888
- }, js = U.memo(
4895
+ }, Bs = U.memo(
4889
4896
  (e) => {
4890
4897
  var L, O, z;
4891
4898
  const { channel: t, unread: n } = e, {
@@ -4895,7 +4902,7 @@ const $s = U.createContext({
4895
4902
  channelPreview: l,
4896
4903
  renderMessagePreview: o,
4897
4904
  viewerLanguage: d
4898
- } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = lt(t);
4905
+ } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4899
4906
  if (l)
4900
4907
  return /* @__PURE__ */ s(
4901
4908
  l,
@@ -4916,7 +4923,7 @@ const $s = U.createContext({
4916
4923
  (L = t == null ? void 0 : t.state) == null ? void 0 : L.members,
4917
4924
  u == null ? void 0 : u.userID,
4918
4925
  t == null ? void 0 : t.type
4919
- ), w = ot(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4926
+ ), w = ct(v == null ? void 0 : v.user), b = (O = v == null ? void 0 : v.user) == null ? void 0 : O.image, f = (() => {
4920
4927
  var A;
4921
4928
  const y = (A = t == null ? void 0 : t.state) == null ? void 0 : A.messages;
4922
4929
  if (y != null && y.length) {
@@ -4925,7 +4932,7 @@ const $s = U.createContext({
4925
4932
  }
4926
4933
  })(), N = (() => {
4927
4934
  var $, F, V, Q;
4928
- const y = ms({
4935
+ const y = hs({
4929
4936
  message: f,
4930
4937
  viewerLanguage: d
4931
4938
  });
@@ -4995,7 +5002,7 @@ const $s = U.createContext({
4995
5002
  );
4996
5003
  }
4997
5004
  );
4998
- js.displayName = "CustomChannelPreview";
5005
+ Bs.displayName = "CustomChannelPreview";
4999
5006
  const Qi = { last_message_at: -1 }, el = U.memo(
5000
5007
  ({
5001
5008
  onChannelSelect: e,
@@ -5006,14 +5013,14 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5006
5013
  sort: i = Qi,
5007
5014
  className: l,
5008
5015
  customEmptyStateIndicator: o,
5009
- channelListPaginator: d = Tn,
5016
+ channelListPaginator: d = An,
5010
5017
  channelPreview: u,
5011
5018
  renderMessagePreview: p,
5012
5019
  viewerLanguage: h
5013
5020
  }) => {
5014
5021
  const g = U.useRef(0);
5015
5022
  g.current++;
5016
- const { debug: c = !1 } = it(), v = U.useCallback(
5023
+ const { debug: c = !1 } = lt(), v = U.useCallback(
5017
5024
  (b) => {
5018
5025
  for (const f of b)
5019
5026
  Wi(f);
@@ -5052,7 +5059,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5052
5059
  l
5053
5060
  ),
5054
5061
  children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Xi, { value: w, children: /* @__PURE__ */ s(
5055
- In,
5062
+ Tn,
5056
5063
  {
5057
5064
  filters: n,
5058
5065
  sort: i,
@@ -5060,7 +5067,7 @@ const Qi = { last_message_at: -1 }, el = U.memo(
5060
5067
  allowNewMessagesFromUnfilteredChannels: a,
5061
5068
  channelRenderFilterFn: v,
5062
5069
  Paginator: d,
5063
- Preview: js,
5070
+ Preview: Bs,
5064
5071
  EmptyStateIndicator: o
5065
5072
  },
5066
5073
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5135,40 +5142,40 @@ const tl = ({
5135
5142
  ] }) });
5136
5143
  };
5137
5144
  export {
5138
- ps as A,
5145
+ bs as A,
5139
5146
  hl as B,
5140
5147
  Gi as C,
5141
- jr as D,
5142
- va as E,
5148
+ Br as D,
5149
+ xa as E,
5143
5150
  gl as F,
5144
- ta as G,
5145
- Qt as L,
5151
+ sa as G,
5152
+ es as L,
5146
5153
  ul as M,
5147
- _e as a,
5154
+ Ne as a,
5148
5155
  se as b,
5149
5156
  el as c,
5150
- Os as d,
5157
+ $s as d,
5151
5158
  ml as e,
5152
5159
  tl as f,
5153
5160
  le as g,
5154
- Jt as h,
5155
- Ne as i,
5156
- Yr as j,
5161
+ Zt as h,
5162
+ ye as i,
5163
+ qr as j,
5157
5164
  dl as k,
5158
5165
  fl as l,
5159
- ar as m,
5160
- tr as n,
5166
+ rr as m,
5167
+ sr as n,
5161
5168
  Zi as o,
5162
- nr as p,
5163
- ms as q,
5169
+ ar as p,
5170
+ hs as q,
5164
5171
  we as r,
5165
- xs as s,
5166
- ra as t,
5167
- Wa as u,
5168
- xa as v,
5172
+ ws as s,
5173
+ ia as t,
5174
+ Xa as u,
5175
+ wa as v,
5169
5176
  Ue as w,
5170
- mt as x,
5171
- ht as y,
5172
- ot as z
5177
+ ht as x,
5178
+ ft as y,
5179
+ ct as z
5173
5180
  };
5174
- //# sourceMappingURL=index-DaF1G1q2.js.map
5181
+ //# sourceMappingURL=index-DcEVHNS3.js.map