@linktr.ee/messaging-react 3.8.1 → 3.8.2-rc-1783566056

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 (27) hide show
  1. package/dist/{Card-jGOcSN1O.js → Card-5O1ojtKv.js} +3 -3
  2. package/dist/{Card-jGOcSN1O.js.map → Card-5O1ojtKv.js.map} +1 -1
  3. package/dist/{Card-DOSuQdnk.cjs → Card-Bg6RA1UO.cjs} +2 -2
  4. package/dist/{Card-DOSuQdnk.cjs.map → Card-Bg6RA1UO.cjs.map} +1 -1
  5. package/dist/{Card-BRvcFjsq.js → Card-Cz5ctt6G.js} +2 -2
  6. package/dist/{Card-BRvcFjsq.js.map → Card-Cz5ctt6G.js.map} +1 -1
  7. package/dist/{Card-CvNHv3me.js → Card-DQWB2QcN.js} +2 -2
  8. package/dist/{Card-CvNHv3me.js.map → Card-DQWB2QcN.js.map} +1 -1
  9. package/dist/{Card-NnQw99XE.cjs → Card-UazV5u2Y.cjs} +2 -2
  10. package/dist/{Card-NnQw99XE.cjs.map → Card-UazV5u2Y.cjs.map} +1 -1
  11. package/dist/{Card-BuXkok0A.cjs → Card-b0FXCsSs.cjs} +2 -2
  12. package/dist/{Card-BuXkok0A.cjs.map → Card-b0FXCsSs.cjs.map} +1 -1
  13. package/dist/{LockedThumbnail-EsjaAqLR.js → LockedThumbnail-CvSbvYRW.js} +2 -2
  14. package/dist/{LockedThumbnail-EsjaAqLR.js.map → LockedThumbnail-CvSbvYRW.js.map} +1 -1
  15. package/dist/{LockedThumbnail-uAauUd5c.cjs → LockedThumbnail-D0VL6cPH.cjs} +2 -2
  16. package/dist/{LockedThumbnail-uAauUd5c.cjs.map → LockedThumbnail-D0VL6cPH.cjs.map} +1 -1
  17. package/dist/{index-DRurVQ0-.cjs → index-DrqiyBRo.cjs} +2 -2
  18. package/dist/index-DrqiyBRo.cjs.map +1 -0
  19. package/dist/{index-BCgRoF_u.js → index-zQJ3Ag9l.js} +133 -134
  20. package/dist/index-zQJ3Ag9l.js.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 +29 -11
  25. package/src/components/CustomMessage/SentMessageDeliveryStatus.tsx +22 -26
  26. package/dist/index-BCgRoF_u.js.map +0 -1
  27. package/dist/index-DRurVQ0-.cjs.map +0 -1
@@ -2,8 +2,8 @@ import { jsx as s, jsxs as m, Fragment as ee } from "react/jsx-runtime";
2
2
  import V, { createContext as rt, useContext as Ie, useCallback as Z, useState as U, useRef as G, useEffect as J, useId as Gs, useMemo as se, Suspense as it } from "react";
3
3
  import { StreamChatService as Hs } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as Ys, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as qs, useChannelStateContext as le, useChatContext as oe, 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 Dn, CaretRightIcon as ve, SparkleIcon as xe, FileIcon as os, ImageIcon as Ln, SpeakerHighIcon as zn, VideoCameraIcon as cs, FileMdIcon as Pn, FileTextIcon as Fn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, 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";
5
+ import { Chat as qs, useChannelStateContext as le, 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 Bn, FileXlsIcon as Un, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Ce, PlayIcon as tt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Se, XIcon as Ue, 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
8
  import { MessageActions as ta, DefaultDropdownActionButton as ds } from "stream-chat-react/experimental";
9
9
  const us = rt({
@@ -47,9 +47,9 @@ const us = rt({
47
47
  apiKey: a,
48
48
  serviceConfig: n,
49
49
  capabilities: r
50
- }), D = G(0);
51
- D.current++, l("📊 RENDER INFO", {
52
- renderCount: D.current,
50
+ }), L = G(0);
51
+ L.current++, l("📊 RENDER INFO", {
52
+ renderCount: L.current,
53
53
  currentProps: { userId: t == null ? void 0 : t.id, apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..." },
54
54
  propChanges: {
55
55
  userChanged: A.current.userId !== (t == null ? void 0 : t.id),
@@ -67,7 +67,7 @@ const us = rt({
67
67
  !o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new Ys(a) });
68
68
  const F = o || (a ? ((R = $.current) == null ? void 0 : R.client) ?? null : null);
69
69
  J(() => {
70
- const E = D.current, z = C.current;
70
+ const E = L.current, z = C.current;
71
71
  if (o) {
72
72
  N.current = null, u(null), h(null), c(!1), g(null), w(!1);
73
73
  return;
@@ -94,7 +94,7 @@ const us = rt({
94
94
  serviceInstance: !!O
95
95
  });
96
96
  }, [a, F, o]);
97
- const L = G(null);
97
+ const D = G(null);
98
98
  J(() => {
99
99
  var z, O;
100
100
  if (l("🔗 USER CONNECTION EFFECT TRIGGERED", {
@@ -114,7 +114,7 @@ const us = rt({
114
114
  l("⚠️ USER CONNECTION SKIPPED", "Already connecting");
115
115
  return;
116
116
  }
117
- if (((z = L.current) == null ? void 0 : z.serviceId) === d && ((O = L.current) == null ? void 0 : O.userId) === t.id) {
117
+ if (((z = D.current) == null ? void 0 : z.serviceId) === d && ((O = D.current) == null ? void 0 : O.userId) === t.id) {
118
118
  l(
119
119
  "⚠️ USER CONNECTION SKIPPED",
120
120
  "Already connected this user with this service"
@@ -126,7 +126,7 @@ const us = rt({
126
126
  try {
127
127
  l("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
128
128
  const j = await d.connectUser(t);
129
- h(j), c(!0), L.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
129
+ h(j), c(!0), D.current = { serviceId: d, userId: t.id }, l("✅ USER CONNECTION SUCCESS", {
130
130
  userId: t.id,
131
131
  clientId: j.userID
132
132
  });
@@ -147,7 +147,7 @@ const us = rt({
147
147
  const E = F;
148
148
  return () => {
149
149
  var z;
150
- E && (L.current = null, (z = N.current) == null || z.disconnectUser().catch(console.error));
150
+ E && (D.current = null, (z = N.current) == null || z.disconnectUser().catch(console.error));
151
151
  };
152
152
  }, [F]);
153
153
  const y = Z(async () => {
@@ -211,7 +211,7 @@ const us = rt({
211
211
  l
212
212
  ]);
213
213
  return l("🔄 RENDER END", {
214
- renderCount: D.current,
214
+ renderCount: L.current,
215
215
  willRenderChat: !!F,
216
216
  contextValueReady: !!I
217
217
  }), /* @__PURE__ */ s(us.Provider, { value: I, children: F ? /* @__PURE__ */ s(
@@ -408,7 +408,7 @@ const ne = ({
408
408
  logLabel: p = "useChannelModerationActions"
409
409
  }) => {
410
410
  var I;
411
- const { service: h, debug: f } = lt(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, v = !!(a && n && h && c), [w, b] = U(!1), [g, x] = U(null), [N, C] = U(!1), [T, A] = U(!1), D = v && ((g == null ? void 0 : g.participantId) !== c || (g == null ? void 0 : g.service) !== h);
411
+ const { service: h, debug: f } = lt(), c = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, v = !!(a && n && h && c), [w, b] = U(!1), [g, x] = U(null), [N, C] = U(!1), [T, A] = U(!1), L = v && ((g == null ? void 0 : g.participantId) !== c || (g == null ? void 0 : g.service) !== h);
412
412
  return J(() => {
413
413
  if (!v || !h || !c) {
414
414
  b(!1), x(null);
@@ -434,7 +434,7 @@ const ne = ({
434
434
  };
435
435
  }, [v, h, c, p]), {
436
436
  isParticipantBlocked: w,
437
- isCheckingBlockedStatus: D,
437
+ isCheckingBlockedStatus: L,
438
438
  isLeaving: N,
439
439
  isUpdatingBlockStatus: T,
440
440
  handleLeaveConversation: async () => {
@@ -519,7 +519,7 @@ const ne = ({
519
519
  isUpdatingBlockStatus: C,
520
520
  handleLeaveConversation: T,
521
521
  handleBlockUser: A,
522
- handleUnblockUser: D,
522
+ handleUnblockUser: L,
523
523
  handleReportUser: $
524
524
  } = ua({
525
525
  channel: e,
@@ -536,13 +536,13 @@ const ne = ({
536
536
  });
537
537
  return J(() => {
538
538
  if (!f) return;
539
- const L = (I) => {
539
+ const D = (I) => {
540
540
  v.current && !v.current.contains(I.target) && c(!1);
541
541
  }, y = (I) => {
542
542
  I.key === "Escape" && c(!1);
543
543
  };
544
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", y), () => {
545
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", y);
544
+ return document.addEventListener("mousedown", D), document.addEventListener("keydown", y), () => {
545
+ document.removeEventListener("mousedown", D), document.removeEventListener("keydown", y);
546
546
  };
547
547
  }, [f]), !t || !(n || a || r || !!p) ? null : /* @__PURE__ */ m("div", { ref: v, className: "relative", children: [
548
548
  /* @__PURE__ */ m(
@@ -553,7 +553,7 @@ const ne = ({
553
553
  "aria-haspopup": "true",
554
554
  "aria-expanded": f,
555
555
  "aria-controls": f ? w : void 0,
556
- onClick: () => c((L) => !L),
556
+ onClick: () => c((D) => !D),
557
557
  children: [
558
558
  /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
559
559
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
@@ -592,7 +592,7 @@ const ne = ({
592
592
  ) : g ? /* @__PURE__ */ m(
593
593
  Ne,
594
594
  {
595
- onClick: D,
595
+ onClick: L,
596
596
  disabled: C,
597
597
  "aria-busy": C,
598
598
  children: [
@@ -642,8 +642,8 @@ const ne = ({
642
642
  showChannelInfo: v = !0,
643
643
  onParticipantNameClick: w
644
644
  }) => {
645
- var $, F, L;
646
- const { channel: b } = le(), { client: g } = oe(), x = V.useMemo(
645
+ var $, F, D;
646
+ const { channel: b } = le(), { client: g } = me(), x = V.useMemo(
647
647
  () => {
648
648
  var y;
649
649
  return je(
@@ -653,7 +653,7 @@ const ne = ({
653
653
  );
654
654
  },
655
655
  [($ = b.state) == null ? void 0 : $.members, g == null ? void 0 : g.userID, b.type]
656
- ), N = ct(x == null ? void 0 : x.user), C = (F = x == null ? void 0 : x.user) == null ? void 0 : F.image, T = ot(b), A = ga(x), D = async () => {
656
+ ), N = ct(x == null ? void 0 : x.user), C = (F = x == null ? void 0 : x.user) == null ? void 0 : F.image, T = ot(b), A = ga(x), L = async () => {
657
657
  try {
658
658
  T ? await b.unpin() : await b.pin();
659
659
  } catch (y) {
@@ -689,7 +689,7 @@ const ne = ({
689
689
  /* @__PURE__ */ s(
690
690
  ne,
691
691
  {
692
- id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || b.id || "unknown",
692
+ id: ((D = x == null ? void 0 : x.user) == null ? void 0 : D.id) || b.id || "unknown",
693
693
  name: N,
694
694
  image: C,
695
695
  dmAgentEnabled: a,
@@ -707,7 +707,7 @@ const ne = ({
707
707
  {
708
708
  "aria-label": "Paid customer",
709
709
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
710
- children: /* @__PURE__ */ s(Dn, { className: "size-2.5", weight: "bold" })
710
+ children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
711
711
  }
712
712
  ),
713
713
  n && T && /* @__PURE__ */ s(
@@ -741,7 +741,7 @@ const ne = ({
741
741
  "button",
742
742
  {
743
743
  className: We,
744
- onClick: D,
744
+ onClick: L,
745
745
  type: "button",
746
746
  "aria-pressed": T,
747
747
  "aria-label": T ? "Unstar conversation" : "Star conversation",
@@ -781,7 +781,7 @@ function va(e) {
781
781
  return e != null && e.length ? e.some((t) => t.type === at) ? "down" : e.some((t) => t.type === nt) ? "up" : null : null;
782
782
  }
783
783
  function xa(e) {
784
- const { channel: t } = le(), { client: n } = oe("useMessageVote"), a = se(
784
+ const { channel: t } = le(), { client: n } = me("useMessageVote"), a = se(
785
785
  () => va(e.own_reactions),
786
786
  [e.own_reactions]
787
787
  ), r = Z(async () => {
@@ -818,7 +818,7 @@ function hs({
818
818
  const n = e == null ? void 0 : e.text, a = wa(t);
819
819
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
820
820
  }
821
- const _a = V.lazy(() => import("./Card-BRvcFjsq.js")), Na = V.lazy(() => import("./Card-CvNHv3me.js")), ya = V.lazy(() => import("./Card-jGOcSN1O.js")), dt = () => /* @__PURE__ */ s(
821
+ const _a = V.lazy(() => import("./Card-Cz5ctt6G.js")), Na = V.lazy(() => import("./Card-DQWB2QcN.js")), ya = V.lazy(() => import("./Card-5O1ojtKv.js")), dt = () => /* @__PURE__ */ s(
822
822
  "div",
823
823
  {
824
824
  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)]",
@@ -834,7 +834,7 @@ const _a = V.lazy(() => import("./Card-BRvcFjsq.js")), Na = V.lazy(() => import(
834
834
  [/plain|rtf/, "text"],
835
835
  [/markdown/, "markdown"]
836
836
  ];
837
- function ce(e) {
837
+ function oe(e) {
838
838
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
839
839
  }
840
840
  function ps(e) {
@@ -846,7 +846,7 @@ function ps(e) {
846
846
  const Ia = {
847
847
  video: cs,
848
848
  audio: zn,
849
- image: Ln,
849
+ image: Dn,
850
850
  document: os
851
851
  }, Ta = {
852
852
  pdf: Vn,
@@ -860,7 +860,7 @@ const Ia = {
860
860
  generic: os
861
861
  };
862
862
  function Aa(e) {
863
- const t = ce(e);
863
+ const t = oe(e);
864
864
  return t !== "document" ? Ia[t] : Ta[ps(e)];
865
865
  }
866
866
  function we(e, t) {
@@ -881,7 +881,7 @@ const Ma = (e) => {
881
881
  muted: d = !1,
882
882
  onContainerClick: u
883
883
  }) => {
884
- const p = ce(t), h = G(null), f = G(null), c = G(null), v = G(r), [w, b] = U(a), [g, x] = U(0), [N, C] = U(!1), [T, A] = U(!1), [D, $] = U(!1), [F, L] = U(!1), [y, I] = U(!0), [S, R] = U(null), E = Z(() => {
884
+ const p = oe(t), h = G(null), f = G(null), c = G(null), v = G(r), [w, b] = U(a), [g, x] = U(0), [N, C] = U(!1), [T, A] = U(!1), [L, $] = U(!1), [F, D] = U(!1), [y, I] = U(!0), [S, R] = U(null), E = Z(() => {
885
885
  $(!1), b(!0);
886
886
  }, []), z = Z((_) => {
887
887
  const M = f.current;
@@ -940,7 +940,7 @@ const Ma = (e) => {
940
940
  u(_);
941
941
  return;
942
942
  }
943
- D || o && b((M) => !M);
943
+ L || o && b((M) => !M);
944
944
  },
945
945
  onKeyDown: (_) => {
946
946
  if (!(_.key !== "Enter" && _.key !== " ")) {
@@ -948,7 +948,7 @@ const Ma = (e) => {
948
948
  u(_);
949
949
  return;
950
950
  }
951
- D || o && b((M) => !M);
951
+ L || o && b((M) => !M);
952
952
  }
953
953
  },
954
954
  children: [
@@ -972,11 +972,11 @@ const Ma = (e) => {
972
972
  loop: i,
973
973
  muted: d,
974
974
  style: { width: "100%", height: "100%" },
975
- onLoadStart: () => L(!0),
975
+ onLoadStart: () => D(!0),
976
976
  onCanPlay: () => {
977
- L(!1), I(!1);
977
+ D(!1), I(!1);
978
978
  },
979
- onWaiting: () => L(!0),
979
+ onWaiting: () => D(!0),
980
980
  onPlay: () => $(!1),
981
981
  onEnded: () => {
982
982
  i || (b(!1), x(0));
@@ -992,11 +992,11 @@ const Ma = (e) => {
992
992
  muted: d,
993
993
  playsInline: !0,
994
994
  style: { width: "100%", height: "100%" },
995
- onLoadStart: () => L(!0),
995
+ onLoadStart: () => D(!0),
996
996
  onCanPlay: () => {
997
- L(!1), I(!1);
997
+ D(!1), I(!1);
998
998
  },
999
- onWaiting: () => L(!0),
999
+ onWaiting: () => D(!0),
1000
1000
  onPlay: () => $(!1),
1001
1001
  onLoadedMetadata: () => {
1002
1002
  const _ = h.current;
@@ -1008,14 +1008,14 @@ const Ma = (e) => {
1008
1008
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1009
1009
  }
1010
1010
  ) }),
1011
- F && !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1011
+ F && !L && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ s(
1012
1012
  Ce,
1013
1013
  {
1014
1014
  className: "size-8 animate-spin text-white/80",
1015
1015
  weight: "bold"
1016
1016
  }
1017
1017
  ) }),
1018
- D && !o && /* @__PURE__ */ s(
1018
+ L && !o && /* @__PURE__ */ s(
1019
1019
  "div",
1020
1020
  {
1021
1021
  className: "absolute inset-0 z-30 flex cursor-pointer items-center justify-center bg-black/35",
@@ -1117,7 +1117,7 @@ const Ma = (e) => {
1117
1117
  ]
1118
1118
  }
1119
1119
  );
1120
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Da = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", bs = ({
1120
+ }, 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 = ({
1121
1121
  mimeType: e,
1122
1122
  sourceUrl: t,
1123
1123
  thumbnailUrl: n,
@@ -1126,7 +1126,7 @@ const Ma = (e) => {
1126
1126
  mediaPlayerProps: i,
1127
1127
  containedImage: o = !1
1128
1128
  }) => {
1129
- const l = ce(e), [d, u] = U(!1);
1129
+ const l = oe(e), [d, u] = U(!1);
1130
1130
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1131
1131
  Ra,
1132
1132
  {
@@ -1179,7 +1179,7 @@ const Ma = (e) => {
1179
1179
  weight: "regular"
1180
1180
  })
1181
1181
  }
1182
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Da(r)}`, children: /* @__PURE__ */ s(
1182
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${La(r)}`, children: /* @__PURE__ */ s(
1183
1183
  "img",
1184
1184
  {
1185
1185
  src: n,
@@ -1269,7 +1269,7 @@ function xs(e) {
1269
1269
  function ut(e) {
1270
1270
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1271
1271
  }
1272
- function La(e) {
1272
+ function Da(e) {
1273
1273
  return e ? "bg-white/10" : "bg-black/5";
1274
1274
  }
1275
1275
  function za(e) {
@@ -1296,7 +1296,7 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1296
1296
  ) : /* @__PURE__ */ s(
1297
1297
  "div",
1298
1298
  {
1299
- className: `aspect-video w-full rounded-[20px] ${La(t)} flex items-center justify-center`,
1299
+ className: `aspect-video w-full rounded-[20px] ${Da(t)} flex items-center justify-center`,
1300
1300
  children: /* @__PURE__ */ s(Hn, { className: `size-12 ${Oa(t)}` })
1301
1301
  }
1302
1302
  ) }),
@@ -1410,7 +1410,7 @@ const _s = ({
1410
1410
  fileSize: a,
1411
1411
  thumbnailUrl: r
1412
1412
  }) => {
1413
- const i = ce(t), o = a !== void 0 ? xs(a) : void 0;
1413
+ const i = oe(t), o = a !== void 0 ? xs(a) : void 0;
1414
1414
  return /* @__PURE__ */ s(
1415
1415
  vs,
1416
1416
  {
@@ -1660,7 +1660,7 @@ function ar(e, t) {
1660
1660
  }
1661
1661
  }
1662
1662
  if (!e) return;
1663
- if (ce(e) === "document") {
1663
+ if (oe(e) === "document") {
1664
1664
  const r = ps(e), i = nr[r];
1665
1665
  if (i) return i;
1666
1666
  if (e === "application/octet-stream") return;
@@ -2540,7 +2540,7 @@ const cr = ({
2540
2540
  ] }), Rr = (e, t, n) => ({
2541
2541
  ariaLabel: `Play video ${t + 1} of ${n}`,
2542
2542
  content: /* @__PURE__ */ s(Ms, { item: e, index: t })
2543
- }), Dr = ({
2543
+ }), Lr = ({
2544
2544
  src: e,
2545
2545
  poster: t,
2546
2546
  mimeType: n,
@@ -2552,7 +2552,7 @@ const cr = ({
2552
2552
  mimeType: n.mimeType,
2553
2553
  preload: n.preload,
2554
2554
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2555
- })), Lr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2555
+ })), Dr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: o }) => {
2556
2556
  const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: p } = Re(
2557
2557
  i
2558
2558
  );
@@ -2581,7 +2581,7 @@ const cr = ({
2581
2581
  }
2582
2582
  )
2583
2583
  ] });
2584
- }, Ds = ({
2584
+ }, Ls = ({
2585
2585
  state: e,
2586
2586
  src: t,
2587
2587
  poster: n,
@@ -2593,7 +2593,7 @@ const cr = ({
2593
2593
  preload: d,
2594
2594
  onClick: u
2595
2595
  }) => {
2596
- const p = Dr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2596
+ const p = Lr({ src: t, poster: n, mimeType: a, preload: d, items: i }), h = Me(e), { viewerOpen: f, viewerIndex: c, handleActivate: v, closeViewer: w } = Re(
2597
2597
  u
2598
2598
  );
2599
2599
  if (p.length === 0)
@@ -2629,7 +2629,7 @@ const cr = ({
2629
2629
  ]
2630
2630
  }
2631
2631
  );
2632
- }, zr = (e) => /* @__PURE__ */ s(Lr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), Or = {
2632
+ }, zr = (e) => /* @__PURE__ */ s(Dr, { ...e }), Pr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "sent" }), Fr = (e) => /* @__PURE__ */ s(Ls, { ...e, state: "received" }), Or = {
2633
2633
  Composer: zr,
2634
2634
  Sent: Pr,
2635
2635
  Received: Fr
@@ -2643,9 +2643,9 @@ const cr = ({
2643
2643
  isUnlocking: () => !1
2644
2644
  }, Br = {
2645
2645
  LockedAttachment: $r
2646
- }, Ls = rt({}), ml = Ls.Provider;
2646
+ }, Ds = rt({}), ml = Ds.Provider;
2647
2647
  function Ur(e) {
2648
- return Ie(Ls)[e] ?? Br[e];
2648
+ return Ie(Ds)[e] ?? Br[e];
2649
2649
  }
2650
2650
  const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2651
2651
  "svg",
@@ -2744,15 +2744,14 @@ const jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2744
2744
  }
2745
2745
  )
2746
2746
  ] }), Je = () => {
2747
- var i;
2748
- const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), { client: n } = oe("SentMessageDeliveryStatus"), a = (i = n.user) == null ? void 0 : i.id, r = se(() => {
2749
- var o;
2750
- if (!(!a || !t)) {
2751
- for (let l = t.length - 1; l >= 0; l -= 1)
2752
- if (((o = t[l].user) == null ? void 0 : o.id) === a) return t[l].id;
2753
- }
2754
- }, [t, a]);
2755
- return e.id !== r ? null : /* @__PURE__ */ m(ee, { children: [
2747
+ const { message: e } = _e("SentMessageDeliveryStatus"), { messages: t } = le("SentMessageDeliveryStatus"), n = se(
2748
+ () => {
2749
+ var a;
2750
+ return (a = t == null ? void 0 : t[t.length - 1]) == null ? void 0 : a.id;
2751
+ },
2752
+ [t]
2753
+ );
2754
+ return e.id !== n ? null : /* @__PURE__ */ m(ee, { children: [
2756
2755
  /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2757
2756
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2758
2757
  ] });
@@ -2923,9 +2922,9 @@ const Zr = {
2923
2922
  }, ri = {
2924
2923
  dark: "size-16 text-white/25",
2925
2924
  light: "size-16 text-black/25"
2926
- }, Ve = (e, t) => !!t && !!e && ce(e) === "audio", yt = (e, t) => {
2925
+ }, Ve = (e, t) => !!t && !!e && oe(e) === "audio", yt = (e, t) => {
2927
2926
  if (!t || !e) return !1;
2928
- const n = ce(e);
2927
+ const n = oe(e);
2929
2928
  return n === "video" || n === "audio";
2930
2929
  }, kt = "bg-[#F2F3F4]", $e = ({
2931
2930
  variant: e,
@@ -2936,7 +2935,7 @@ const Zr = {
2936
2935
  topLeft: i,
2937
2936
  topRight: o
2938
2937
  }) => {
2939
- const l = ce(r), d = !!n && l === "video";
2938
+ const l = oe(r), d = !!n && l === "video";
2940
2939
  return Ve(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2941
2940
  "audio",
2942
2941
  {
@@ -3418,7 +3417,7 @@ const xi = ({
3418
3417
  v(b, `media-${g}`);
3419
3418
  }), /* @__PURE__ */ s(ee, { children: f });
3420
3419
  }, wi = (e) => {
3421
- var At, Mt, Rt, Dt, Lt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt;
3420
+ var At, Mt, Rt, Lt, Dt, zt, Pt, Ft, Ot, $t, Bt, Ut, jt, Vt;
3422
3421
  const {
3423
3422
  additionalMessageInputProps: t,
3424
3423
  chatbotVotingEnabled: n,
@@ -3436,7 +3435,7 @@ const xi = ({
3436
3435
  renderText: v,
3437
3436
  threadList: w,
3438
3437
  viewerLanguage: b
3439
- } = e, { client: g } = oe("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: C, onFetchSource: T, onDownloadClick: A } = Ur("LockedAttachment"), [D, $] = U(!1), F = Js(c.id), { selected: L, voteUp: y, voteDown: I } = xa(c), {
3438
+ } = e, { client: g } = me("CustomMessage"), { channel: x } = le("CustomMessage"), { isUnlocking: N, onUnlockClick: C, onFetchSource: T, onDownloadClick: A } = Ur("LockedAttachment"), [L, $] = U(!1), F = Js(c.id), { selected: D, voteUp: y, voteDown: I } = xa(c), {
3440
3439
  Attachment: S = Zs,
3441
3440
  EditMessageModal: R = Qs,
3442
3441
  MessageActions: E,
@@ -3452,7 +3451,7 @@ const xi = ({
3452
3451
  () => h == null ? void 0 : h(c),
3453
3452
  [h, c]
3454
3453
  ), B = se(() => {
3455
- const me = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...me] : me;
3454
+ const ue = c.attachments ?? [], pe = c.shared_location ? [c.shared_location, ...ue] : ue;
3456
3455
  if (!Fe(c)) return pe;
3457
3456
  const Gt = pe.filter((Ht) => !("type" in Ht) || !ws(Ht));
3458
3457
  return Gt.length === pe.length ? pe : Gt;
@@ -3460,12 +3459,12 @@ const xi = ({
3460
3459
  () => Fs(B),
3461
3460
  [B]
3462
3461
  ), Q = se(() => {
3463
- const me = hs({ message: c, viewerLanguage: b });
3464
- return me === c.text ? c : { ...c, text: me };
3465
- }, [c, b]), de = W.length > 0, De = W.reduce(
3466
- (me, pe) => me + pe.attachments.length,
3462
+ const ue = hs({ message: c, viewerLanguage: b });
3463
+ return ue === c.text ? c : { ...c, text: ue };
3464
+ }, [c, b]), ce = W.length > 0, Le = W.reduce(
3465
+ (ue, pe) => ue + pe.attachments.length,
3467
3466
  0
3468
- ) === ((B == null ? void 0 : B.length) ?? 0), Le = Xa(
3467
+ ) === ((B == null ? void 0 : B.length) ?? 0), De = Xa(
3469
3468
  {
3470
3469
  endOfGroup: r,
3471
3470
  firstOfGroup: i,
@@ -3478,7 +3477,7 @@ const xi = ({
3478
3477
  return /* @__PURE__ */ s(j, { message: c });
3479
3478
  if (un(c))
3480
3479
  return /* @__PURE__ */ s(z, {});
3481
- const ae = !w && !!c.reply_count, ue = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3480
+ const ae = !w && !!c.reply_count, de = !w && c.show_in_channel && c.parent_id, ie = c.status === "failed" && ((At = c.error) == null ? void 0 : At.status) !== 403, St = mn(c);
3482
3481
  let he;
3483
3482
  ie ? he = () => u(c) : St && (he = () => $(!0));
3484
3483
  const fe = f(), js = k(
@@ -3493,12 +3492,12 @@ const xi = ({
3493
3492
  "str-chat__message--pinned pinned-message": c.pinned,
3494
3493
  "str-chat__message--with-reactions": q,
3495
3494
  "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,
3496
- "str-chat__message-with-thread-link": ae || ue,
3495
+ "str-chat__message-with-thread-link": ae || de,
3497
3496
  "str-chat__virtual-message__wrapper--end": r,
3498
3497
  "str-chat__virtual-message__wrapper--first": i,
3499
3498
  "str-chat__virtual-message__wrapper--group": o
3500
3499
  }
3501
- ), Ge = c.poll_id && g.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Tt = ge && fe && He, Vs = de && De && !c.quoted_message && !Ge && !Y && !ge;
3500
+ ), Ge = c.poll_id && g.polls.fromState(c.poll_id), Et = Yr(c), ge = Fe(c), It = Hr(c), He = !!(B != null && B.length && !c.quoted_message), Tt = ge && fe && He, Vs = ce && Le && !c.quoted_message && !Ge && !Y && !ge;
3502
3501
  return /* @__PURE__ */ m(ee, { children: [
3503
3502
  a && /* @__PURE__ */ s(
3504
3503
  R,
@@ -3506,12 +3505,12 @@ const xi = ({
3506
3505
  additionalMessageInputProps: t
3507
3506
  }
3508
3507
  ),
3509
- D && /* @__PURE__ */ s(
3508
+ L && /* @__PURE__ */ s(
3510
3509
  hn,
3511
3510
  {
3512
3511
  MessageBouncePrompt: O,
3513
3512
  onClose: () => $(!1),
3514
- open: D
3513
+ open: L
3515
3514
  }
3516
3515
  ),
3517
3516
  /* @__PURE__ */ m(
@@ -3559,8 +3558,8 @@ const xi = ({
3559
3558
  Zt.Sent,
3560
3559
  {
3561
3560
  title: (Rt = c.metadata) == null ? void 0 : Rt.attachment_title,
3562
- mimeType: (Dt = c.metadata) == null ? void 0 : Dt.attachment_mime_type,
3563
- thumbnailUrl: (Lt = c.metadata) == null ? void 0 : Lt.attachment_thumbnail,
3561
+ mimeType: (Lt = c.metadata) == null ? void 0 : Lt.attachment_mime_type,
3562
+ thumbnailUrl: (Dt = c.metadata) == null ? void 0 : Dt.attachment_thumbnail,
3564
3563
  amountText: (zt = c.metadata) == null ? void 0 : zt.amount_text,
3565
3564
  detail: (Pt = c.metadata) == null ? void 0 : Pt.attachment_detail,
3566
3565
  paymentStatus: (Ft = c.metadata) == null ? void 0 : Ft.payment_status,
@@ -3610,7 +3609,7 @@ const xi = ({
3610
3609
  /* @__PURE__ */ s(
3611
3610
  xi,
3612
3611
  {
3613
- groupPosition: Le,
3612
+ groupPosition: De,
3614
3613
  isMyMessage: fe,
3615
3614
  message: {
3616
3615
  attachments: B,
@@ -3667,7 +3666,7 @@ const xi = ({
3667
3666
  n && ge && /* @__PURE__ */ s(
3668
3667
  qr,
3669
3668
  {
3670
- selected: L,
3669
+ selected: D,
3671
3670
  onVoteUp: y,
3672
3671
  onVoteDown: I
3673
3672
  }
@@ -3681,7 +3680,7 @@ const xi = ({
3681
3680
  reply_count: c.reply_count
3682
3681
  }
3683
3682
  ),
3684
- ue && /* @__PURE__ */ s(X, {})
3683
+ de && /* @__PURE__ */ s(X, {})
3685
3684
  ]
3686
3685
  },
3687
3686
  c.id
@@ -3883,14 +3882,14 @@ const xi = ({
3883
3882
  }, Ri = [
3884
3883
  "SYSTEM_DM_AGENT_PAUSED",
3885
3884
  "SYSTEM_DM_AGENT_RESUMED"
3886
- ], Di = {
3885
+ ], Li = {
3887
3886
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
3888
3887
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
3889
- }, Li = [
3888
+ }, Di = [
3890
3889
  "SYSTEM_AGE_SAFETY_BLOCKED"
3891
3890
  ], zi = {
3892
3891
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3893
- }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Li.includes(e), Oi = (e) => {
3892
+ }, Ze = "age safety guidelines.", Pi = "https://linktr.ee/s/about/contact", as = (e) => Ri.includes(e), Fi = (e) => Di.includes(e), Oi = (e) => {
3894
3893
  var a;
3895
3894
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3896
3895
  if (as(t))
@@ -3934,7 +3933,7 @@ const xi = ({
3934
3933
  e.message
3935
3934
  );
3936
3935
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
3937
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Di[n.type];
3936
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || Li[n.type];
3938
3937
  return /* @__PURE__ */ m("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
3939
3938
  /* @__PURE__ */ m(
3940
3939
  "div",
@@ -4010,7 +4009,7 @@ const xi = ({
4010
4009
  qe.ExternalSources
4011
4010
  ]), ji = ({ threadList: e }) => {
4012
4011
  var v, w;
4013
- const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = oe(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
4012
+ const { channel: t, channelConfig: n, thread: a } = le(), { client: r } = me(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Ie(Os);
4014
4013
  if (!e && l && Ui.has(o)) {
4015
4014
  const b = Vi(t, (v = r.user) == null ? void 0 : v.id);
4016
4015
  return /* @__PURE__ */ s(
@@ -4169,7 +4168,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4169
4168
  renderHeaderTitleBadges: b
4170
4169
  }) => {
4171
4170
  var I, S, R, E, z, O;
4172
- const { channel: g } = le(), { client: x } = oe(), N = V.useMemo(
4171
+ const { channel: g } = le(), { client: x } = me(), N = V.useMemo(
4173
4172
  () => {
4174
4173
  var j;
4175
4174
  return je(
@@ -4179,12 +4178,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4179
4178
  );
4180
4179
  },
4181
4180
  [(I = g.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, g.type]
4182
- ), C = ct(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, A = ot(g), D = b == null ? void 0 : b({
4181
+ ), C = ct(N == null ? void 0 : N.user), T = (S = N == null ? void 0 : N.user) == null ? void 0 : S.image, A = ot(g), L = b == null ? void 0 : b({
4183
4182
  channel: g,
4184
4183
  participant: N
4185
- }), $ = "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", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", L = /* @__PURE__ */ m(ee, { children: [
4184
+ }), $ = "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", F = "flex min-w-0 max-w-full items-center gap-4 rounded-[12px] px-1 py-0.5 text-left text-black/90", D = /* @__PURE__ */ m(ee, { children: [
4186
4185
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: C }),
4187
- D && /* @__PURE__ */ s("span", { className: "shrink-0", children: D })
4186
+ L && /* @__PURE__ */ s("span", { className: "shrink-0", children: L })
4188
4187
  ] }), y = async () => {
4189
4188
  try {
4190
4189
  A ? await g.unpin() : await g.pin();
@@ -4239,7 +4238,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4239
4238
  }
4240
4239
  ),
4241
4240
  /* @__PURE__ */ m("span", { className: "flex max-w-full items-center gap-0.5", children: [
4242
- L,
4241
+ D,
4243
4242
  /* @__PURE__ */ s(ve, { className: "size-3 shrink-0", weight: "bold" })
4244
4243
  ] }),
4245
4244
  a && /* @__PURE__ */ m("div", { className: "flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
@@ -4261,7 +4260,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4261
4260
  }
4262
4261
  ),
4263
4262
  /* @__PURE__ */ m("p", { className: "flex max-w-full items-center justify-center gap-0.5", children: [
4264
- L,
4263
+ D,
4265
4264
  /* @__PURE__ */ s(
4266
4265
  ve,
4267
4266
  {
@@ -4355,7 +4354,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4355
4354
  ),
4356
4355
  /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4357
4356
  /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4358
- L,
4357
+ D,
4359
4358
  /* @__PURE__ */ s(ve, { className: "size-4 shrink-0", weight: "bold" })
4360
4359
  ] }),
4361
4360
  a && /* @__PURE__ */ m("div", { className: "mt-0.5 flex items-center gap-1 text-[10px] leading-3 text-black/55", children: [
@@ -4379,7 +4378,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4379
4378
  ),
4380
4379
  /* @__PURE__ */ m("div", { className: "min-w-0", children: [
4381
4380
  /* @__PURE__ */ m("h1", { className: "flex min-w-0 items-center gap-1 font-medium text-black/90", children: [
4382
- L,
4381
+ D,
4383
4382
  /* @__PURE__ */ s(
4384
4383
  ve,
4385
4384
  {
@@ -4459,13 +4458,13 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4459
4458
  renderChannelActions: C,
4460
4459
  renderMessage: T,
4461
4460
  dmAgentEnabled: A = !1,
4462
- viewerLanguage: D,
4461
+ viewerLanguage: L,
4463
4462
  showChannelInfo: $ = !0,
4464
4463
  onParticipantNameClick: F,
4465
- composerInput: L
4464
+ composerInput: D
4466
4465
  }) => {
4467
4466
  var _, M, H, q;
4468
- const { channel: y } = le(), { client: I } = oe(), S = V.useMemo(
4467
+ const { channel: y } = le(), { client: I } = me(), S = V.useMemo(
4469
4468
  () => {
4470
4469
  var Y;
4471
4470
  return je(
@@ -4479,8 +4478,8 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4479
4478
  var W;
4480
4479
  const Y = I == null ? void 0 : I.userID;
4481
4480
  return Y ? Object.values(((W = y.state) == null ? void 0 : W.members) || {}).find((Q) => {
4482
- var de;
4483
- return ((de = Q.user) == null ? void 0 : de.id) === Y;
4481
+ var ce;
4482
+ return ((ce = Q.user) == null ? void 0 : ce.id) === Y;
4484
4483
  }) : void 0;
4485
4484
  }, [I == null ? void 0 : I.userID, (M = y.state) == null ? void 0 : M.members]), E = ((H = R == null ? void 0 : R.user) == null ? void 0 : H.is_account) ?? (R == null ? void 0 : R.is_account), z = ((q = S == null ? void 0 : S.user) == null ? void 0 : q.is_account) ?? (S == null ? void 0 : S.is_account), O = A && E === !1 && z === !0, j = y.state.messages.some(
4486
4485
  (Y) => Y.type !== "deleted"
@@ -4511,12 +4510,12 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4511
4510
  {
4512
4511
  ...Y,
4513
4512
  chatbotVotingEnabled: b,
4514
- viewerLanguage: D
4513
+ viewerLanguage: L
4515
4514
  }
4516
4515
  );
4517
4516
  return !T || !B ? W : T(W, B);
4518
4517
  },
4519
- [b, T, D]
4518
+ [b, T, L]
4520
4519
  );
4521
4520
  return /* @__PURE__ */ s(ee, { children: /* @__PURE__ */ s(
4522
4521
  Sn,
@@ -4582,7 +4581,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4582
4581
  renderFooter: () => a == null ? void 0 : a(y),
4583
4582
  disabled: c,
4584
4583
  disabledReason: v,
4585
- composerInput: L
4584
+ composerInput: D
4586
4585
  },
4587
4586
  "lt-channel-message-input"
4588
4587
  )
@@ -4614,10 +4613,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4614
4613
  onMessageSent: C,
4615
4614
  showStarButton: T = !1,
4616
4615
  chatbotVotingEnabled: A = !1,
4617
- renderChannelBanner: D,
4616
+ renderChannelBanner: L,
4618
4617
  renderHeaderTitleBadges: $,
4619
4618
  customChannelActions: F,
4620
- renderChannelActions: L,
4619
+ renderChannelActions: D,
4621
4620
  renderMessage: y,
4622
4621
  onMessageLinkClick: I,
4623
4622
  sendButton: S,
@@ -4654,7 +4653,7 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4654
4653
  const _ = (M) => {
4655
4654
  const H = M.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4656
4655
  if (!Y) return;
4657
- const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((de) => de.id === W) : void 0;
4656
+ const B = q == null ? void 0 : q.closest("[data-message-id]"), W = B == null ? void 0 : B.getAttribute("data-message-id"), Q = W ? e.state.messages.find((ce) => ce.id === W) : void 0;
4658
4657
  I(Y, Q);
4659
4658
  };
4660
4659
  return K.addEventListener("click", _), () => K.removeEventListener("click", _);
@@ -4700,10 +4699,10 @@ const be = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4700
4699
  showStarButton: T,
4701
4700
  dmAgentEnabled: x,
4702
4701
  chatbotVotingEnabled: A,
4703
- renderChannelBanner: D,
4702
+ renderChannelBanner: L,
4704
4703
  renderHeaderTitleBadges: $,
4705
4704
  customChannelActions: F,
4706
- renderChannelActions: L,
4705
+ renderChannelActions: D,
4707
4706
  renderMessage: y,
4708
4707
  viewerLanguage: E,
4709
4708
  showChannelInfo: z,
@@ -4759,10 +4758,10 @@ const fl = ({
4759
4758
  composerInput: A
4760
4759
  }) => {
4761
4760
  const {
4762
- client: D,
4761
+ client: L,
4763
4762
  isConnected: $,
4764
4763
  isLoading: F,
4765
- error: L,
4764
+ error: D,
4766
4765
  refreshConnection: y,
4767
4766
  service: I,
4768
4767
  debug: S
@@ -4774,8 +4773,8 @@ const fl = ({
4774
4773
  J(() => {
4775
4774
  H.current = R;
4776
4775
  }, [R]), J(() => {
4777
- if (!D || !$) return;
4778
- const B = D.userID;
4776
+ if (!L || !$) return;
4777
+ const B = L.userID;
4779
4778
  if (!B) return;
4780
4779
  const W = `${B}::${i}`;
4781
4780
  if (M.current === W) return;
@@ -4784,13 +4783,13 @@ const fl = ({
4784
4783
  M.current === W && (M.current = null);
4785
4784
  };
4786
4785
  (async () => {
4787
- var De, Le;
4786
+ var Le, De;
4788
4787
  try {
4789
4788
  S && console.log(
4790
4789
  "[MessagingShell] Loading initial conversation with:",
4791
4790
  i
4792
4791
  );
4793
- const ae = await D.queryChannels(
4792
+ const ae = await L.queryChannels(
4794
4793
  {
4795
4794
  type: "messaging",
4796
4795
  members: { $eq: [B, i] }
@@ -4799,14 +4798,14 @@ const fl = ({
4799
4798
  { limit: 1 }
4800
4799
  );
4801
4800
  if (ae.length > 0) {
4802
- E(ae[0]), O(null), (De = _.current) == null || De.call(_, ae[0]), S && console.log(
4801
+ E(ae[0]), O(null), (Le = _.current) == null || Le.call(_, ae[0]), S && console.log(
4803
4802
  "[MessagingShell] Initial conversation loaded:",
4804
4803
  ae[0].id
4805
4804
  );
4806
4805
  return;
4807
4806
  }
4808
- const ue = K.current;
4809
- if (!ue || !I) {
4807
+ const de = K.current;
4808
+ if (!de || !I) {
4810
4809
  Q(), O("No conversation found with this account"), S && console.log(
4811
4810
  "[MessagingShell] No conversation found for:",
4812
4811
  i
@@ -4815,11 +4814,11 @@ const fl = ({
4815
4814
  }
4816
4815
  try {
4817
4816
  const ie = await I.startChannelWithParticipant({
4818
- id: ue.id,
4819
- name: ue.name,
4820
- phone: ue.phone
4817
+ id: de.id,
4818
+ name: de.name,
4819
+ phone: de.phone
4821
4820
  });
4822
- E(ie), O(null), (Le = _.current) == null || Le.call(_, ie), S && console.log(
4821
+ E(ie), O(null), (De = _.current) == null || De.call(_, ie), S && console.log(
4823
4822
  "[MessagingShell] Channel created and loaded:",
4824
4823
  ie.id
4825
4824
  );
@@ -4836,14 +4835,14 @@ const fl = ({
4836
4835
  ), Q(), H.current || O("Failed to load conversation");
4837
4836
  }
4838
4837
  })();
4839
- }, [i, D, $, I, S]);
4838
+ }, [i, L, $, I, S]);
4840
4839
  const q = G(r);
4841
4840
  q.current = r;
4842
4841
  const Y = Z(() => {
4843
4842
  var B;
4844
4843
  E(null), X(!0), (B = q.current) == null || B.call(q);
4845
4844
  }, []);
4846
- return F ? /* @__PURE__ */ s(Be, {}) : L ? /* @__PURE__ */ s(ke, { message: L, onBack: y }) : !$ || !D ? /* @__PURE__ */ s(
4845
+ return F ? /* @__PURE__ */ s(Be, {}) : D ? /* @__PURE__ */ s(ke, { message: D, onBack: y }) : !$ || !L ? /* @__PURE__ */ s(
4847
4846
  ke,
4848
4847
  {
4849
4848
  message: "Not connected to messaging service",
@@ -4915,7 +4914,7 @@ const Bs = V.createContext({
4915
4914
  });
4916
4915
  }, Us = V.memo(
4917
4916
  (e) => {
4918
- var $, F, L;
4917
+ var $, F, D;
4919
4918
  const { channel: t, unread: n } = e, {
4920
4919
  selectedChannel: a,
4921
4920
  onChannelSelect: r,
@@ -4923,7 +4922,7 @@ const Bs = V.createContext({
4923
4922
  channelPreview: o,
4924
4923
  renderMessagePreview: l,
4925
4924
  viewerLanguage: d
4926
- } = Ki(), { client: u } = oe(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4925
+ } = Ki(), { client: u } = me(), p = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), h = ot(t);
4927
4926
  if (o)
4928
4927
  return /* @__PURE__ */ s(
4929
4928
  o,
@@ -4964,12 +4963,12 @@ const Bs = V.createContext({
4964
4963
  if (y) return y;
4965
4964
  const E = (X = g == null ? void 0 : g.attachments) == null ? void 0 : X[0];
4966
4965
  return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4967
- })(), C = g != null && g.created_at ? Zi(new Date(g.created_at)) : "", T = g ? Fe(g) : !1, A = l ? l(g, N) : `${T ? "✨ " : ""}${N}`, D = n ?? 0;
4966
+ })(), C = g != null && g.created_at ? Zi(new Date(g.created_at)) : "", T = g ? Fe(g) : !1, A = l ? l(g, N) : `${T ? "✨ " : ""}${N}`, L = n ?? 0;
4968
4967
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4969
4968
  channelId: t == null ? void 0 : t.id,
4970
4969
  isSelected: p,
4971
4970
  participantName: w,
4972
- unreadCount: D,
4971
+ unreadCount: L,
4973
4972
  hasTimestamp: !!C
4974
4973
  }), /* @__PURE__ */ s(
4975
4974
  "div",
@@ -4990,7 +4989,7 @@ const Bs = V.createContext({
4990
4989
  /* @__PURE__ */ s(
4991
4990
  ne,
4992
4991
  {
4993
- id: ((L = v == null ? void 0 : v.user) == null ? void 0 : L.id) || t.id || "unknown",
4992
+ id: ((D = v == null ? void 0 : v.user) == null ? void 0 : D.id) || t.id || "unknown",
4994
4993
  name: w,
4995
4994
  image: b,
4996
4995
  size: 48,
@@ -5015,7 +5014,7 @@ const Bs = V.createContext({
5015
5014
  ] }),
5016
5015
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5017
5016
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: A }),
5018
- D > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: D > 99 ? "99+" : D })
5017
+ L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
5019
5018
  ] })
5020
5019
  ] })
5021
5020
  ] })
@@ -5178,7 +5177,7 @@ export {
5178
5177
  $s as d,
5179
5178
  ml as e,
5180
5179
  tl as f,
5181
- ce as g,
5180
+ oe as g,
5182
5181
  Zt as h,
5183
5182
  ye as i,
5184
5183
  qr as j,
@@ -5199,4 +5198,4 @@ export {
5199
5198
  ft as y,
5200
5199
  ct as z
5201
5200
  };
5202
- //# sourceMappingURL=index-BCgRoF_u.js.map
5201
+ //# sourceMappingURL=index-zQJ3Ag9l.js.map