@linktr.ee/messaging-react 3.12.3-rc-1784032997 → 3.12.3-rc-1784036508

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.
@@ -1,12 +1,12 @@
1
1
  import { jsx as s, jsxs as u, Fragment as se } from "react/jsx-runtime";
2
- import V, { createContext as ct, useContext as Te, useCallback as J, useState as B, useRef as G, useEffect as K, useId as js, useMemo as re, Suspense as Vs } from "react";
3
- import { StreamChatService as Gs } from "@linktr.ee/messaging-core";
4
- import { StreamChat as Hs, LinkPreviewsManager as Yt } from "stream-chat";
5
- import { Chat as Ys, useChannelStateContext as ce, useChatContext as fe, DateSeparator as qs, MessageStatus as Ws, useMessageContext as Ne, MessageErrorIcon as nt, MessageText as $e, areMessageUIPropsEqual as Xs, useMessageReminder as Ks, useComponentContext as as, Attachment as Zs, EditMessageModal as Js, 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, Poll as hn, 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 Xe, AIStates as Ke, 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 Ie, DotsThreeIcon as Mn, SpinnerGapIcon as Fe, SignOutIcon as An, ProhibitInsetIcon as qt, FlagIcon as rs, ArrowLeftIcon as at, CurrencyDollarIcon as Rn, CaretRightIcon as xe, SparkleIcon as we, FileIcon as is, ImageIcon as Ln, SpeakerHighIcon as Dn, VideoCameraIcon as ls, FileMdIcon as zn, FileTextIcon as Fn, FileZipIcon as Pn, FilePptIcon as On, FileCsvIcon as $n, FileXlsIcon as Un, FileDocIcon as Bn, FilePdfIcon as jn, CircleNotchIcon as Se, PlayIcon as rt, PauseIcon as Vn, LinkIcon as Gn, DownloadSimpleIcon as Ee, XIcon as Ge, CaretLeftIcon as Hn, GiftIcon as Yn, ThumbsUpIcon as qn, ThumbsDownIcon as Wn, ChecksIcon as Xn, PencilSimpleIcon as Kn, TrashSimpleIcon as Zn, ArrowUpIcon as Jn, ProhibitIcon as Qn } from "@phosphor-icons/react";
2
+ import V, { createContext as ct, useContext as Te, useCallback as J, useState as B, useRef as G, useEffect as K, useId as Vs, useMemo as re, Suspense as Gs } 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 oe, useChatContext as fe, DateSeparator as Ws, MessageStatus as Xs, useMessageContext as Ne, MessageErrorIcon as nt, MessageText as $e, areMessageUIPropsEqual as Ks, useMessageReminder as Zs, useComponentContext as rs, Attachment as Js, 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, 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 Xe, AIStates as Ke, useTypingContext as yn, useAIState as kn, Channel as Cn, WithComponents as Sn, Window as En, MessageList as In, ChannelList as Tn, InfiniteScroll as Mn } from "stream-chat-react";
6
+ import { StarIcon as Ie, DotsThreeIcon as An, SpinnerGapIcon as Fe, SignOutIcon as Rn, ProhibitInsetIcon as qt, FlagIcon as is, ArrowLeftIcon as at, CurrencyDollarIcon as Ln, CaretRightIcon as xe, SparkleIcon as we, FileIcon as ls, ImageIcon as Dn, SpeakerHighIcon as zn, VideoCameraIcon as os, FileMdIcon as Fn, FileTextIcon as Pn, FileZipIcon as On, FilePptIcon as $n, FileCsvIcon as Un, FileXlsIcon as Bn, FileDocIcon as jn, FilePdfIcon as Vn, CircleNotchIcon as Se, PlayIcon as rt, PauseIcon as Gn, LinkIcon as Hn, DownloadSimpleIcon as Ee, XIcon as Ge, CaretLeftIcon as Yn, GiftIcon as qn, ThumbsUpIcon as Wn, ThumbsDownIcon as Xn, ChecksIcon as Kn, PencilSimpleIcon as Zn, TrashSimpleIcon as Jn, ArrowUpIcon as Qn, ProhibitIcon as ea } from "@phosphor-icons/react";
7
7
  import y from "classnames";
8
- import { MessageActions as ea, DefaultDropdownActionButton as os } from "stream-chat-react/experimental";
9
- const cs = ct({
8
+ import { MessageActions as ta, DefaultDropdownActionButton as cs } from "stream-chat-react/experimental";
9
+ const ds = ct({
10
10
  service: null,
11
11
  client: null,
12
12
  isConnected: !1,
@@ -16,7 +16,7 @@ const cs = ct({
16
16
  refreshConnection: async () => {
17
17
  },
18
18
  debug: !1
19
- }), dt = () => Te(cs), hl = ({
19
+ }), dt = () => Te(ds), hl = ({
20
20
  children: e,
21
21
  user: t,
22
22
  serviceConfig: n,
@@ -64,7 +64,7 @@ const cs = ct({
64
64
  capabilities: r
65
65
  };
66
66
  const O = G(null);
67
- !o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new Hs(a) });
67
+ !o && a && ((I = O.current) == null ? void 0 : I.apiKey) !== a && (O.current = { apiKey: a, client: new Ys(a) });
68
68
  const F = o || (a ? ((T = O.current) == null ? void 0 : T.client) ?? null : null);
69
69
  K(() => {
70
70
  const M = R.current, P = k.current;
@@ -83,7 +83,7 @@ const cs = ct({
83
83
  renderCount: M,
84
84
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
85
85
  });
86
- const $ = new Gs({
86
+ const $ = new Hs({
87
87
  ...P,
88
88
  apiKey: a,
89
89
  debug: D.current,
@@ -214,8 +214,8 @@ const cs = ct({
214
214
  renderCount: R.current,
215
215
  willRenderChat: !!F,
216
216
  contextValueReady: !!E
217
- }), /* @__PURE__ */ s(cs.Provider, { value: E, children: F ? /* @__PURE__ */ s(
218
- Ys,
217
+ }), /* @__PURE__ */ s(ds.Provider, { value: E, children: F ? /* @__PURE__ */ s(
218
+ qs,
219
219
  {
220
220
  client: F,
221
221
  customClasses: {
@@ -224,7 +224,7 @@ const cs = ct({
224
224
  children: e
225
225
  }
226
226
  ) : e });
227
- }, ta = () => dt(), ut = (e) => {
227
+ }, sa = () => dt(), ut = (e) => {
228
228
  var a, r;
229
229
  const [t, n] = B(
230
230
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -246,14 +246,14 @@ const cs = ct({
246
246
  e.off("member.updated", i);
247
247
  };
248
248
  }, [e]), t;
249
- }, sa = "linktree-official", na = "linktree-official-sender";
249
+ }, na = "linktree-official", aa = "linktree-official-sender";
250
250
  function He(e, t, n) {
251
251
  const a = Object.values(e || {});
252
- if (n === sa) {
252
+ if (n === na) {
253
253
  const r = a.find(
254
254
  (i) => {
255
255
  var o;
256
- return ((o = i.user) == null ? void 0 : o.id) === na;
256
+ return ((o = i.user) == null ? void 0 : o.id) === aa;
257
257
  }
258
258
  );
259
259
  if (r) return r;
@@ -265,13 +265,13 @@ function He(e, t, n) {
265
265
  }
266
266
  );
267
267
  }
268
- 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;
269
- function ra(e) {
270
- return aa.test(e.trim());
268
+ 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;
269
+ function ia(e) {
270
+ return ra.test(e.trim());
271
271
  }
272
272
  function Wt(e, t) {
273
273
  const n = e == null ? void 0 : e.trim();
274
- return !n || t && n === t ? !1 : !ra(n);
274
+ return !n || t && n === t ? !1 : !ia(n);
275
275
  }
276
276
  function mt(e) {
277
277
  return Wt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Wt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
@@ -304,7 +304,7 @@ const Xt = [
304
304
  { emoji: "🍈", bgColor: "#D9F7E1" }
305
305
  // Melon
306
306
  ];
307
- function ia(e) {
307
+ function la(e) {
308
308
  let t = 0;
309
309
  for (let n = 0; n < e.length; n++) {
310
310
  const a = e.charCodeAt(n);
@@ -312,14 +312,14 @@ function ia(e) {
312
312
  }
313
313
  return Math.abs(t);
314
314
  }
315
- function ds(e) {
316
- return Xt[ia(e) % Xt.length];
317
- }
318
- function la(e) {
319
- return ds(e).emoji;
315
+ function us(e) {
316
+ return Xt[la(e) % Xt.length];
320
317
  }
321
318
  function oa(e) {
322
- return ds(e).bgColor;
319
+ return us(e).emoji;
320
+ }
321
+ function ca(e) {
322
+ return us(e).bgColor;
323
323
  }
324
324
  const ne = ({
325
325
  id: e,
@@ -330,7 +330,7 @@ const ne = ({
330
330
  shape: i = "squircle",
331
331
  dmAgentEnabled: o = !1
332
332
  }) => {
333
- const l = la(e), d = oa(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
333
+ const l = oa(e), d = ca(e), m = 0.45, h = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, b = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
334
334
  "img",
335
335
  {
336
336
  src: t,
@@ -394,7 +394,7 @@ const ne = ({
394
394
  ]
395
395
  }
396
396
  );
397
- }, ca = "https://linktr.ee/s/about/trust-center/report", da = ({
397
+ }, da = "https://linktr.ee/s/about/trust-center/report", ua = ({
398
398
  channel: e,
399
399
  participant: t,
400
400
  showBlockParticipant: n = !0,
@@ -478,7 +478,7 @@ const ne = ({
478
478
  }
479
479
  },
480
480
  handleReportUser: () => {
481
- d == null || d(), m == null || m(), window.open(ca, "_blank", "noopener,noreferrer");
481
+ d == null || d(), m == null || m(), window.open(da, "_blank", "noopener,noreferrer");
482
482
  }
483
483
  };
484
484
  }, ye = ({
@@ -512,7 +512,7 @@ const ne = ({
512
512
  customChannelActions: f,
513
513
  triggerClassName: h
514
514
  }) => {
515
- const [g, c] = B(!1), b = G(null), v = js(), x = J(() => c(!1), []), {
515
+ const [g, c] = B(!1), b = G(null), v = Vs(), x = J(() => c(!1), []), {
516
516
  isParticipantBlocked: p,
517
517
  isCheckingBlockedStatus: _,
518
518
  isLeaving: w,
@@ -521,7 +521,7 @@ const ne = ({
521
521
  handleBlockUser: S,
522
522
  handleUnblockUser: R,
523
523
  handleReportUser: O
524
- } = da({
524
+ } = ua({
525
525
  channel: e,
526
526
  participant: t,
527
527
  showBlockParticipant: a,
@@ -555,7 +555,7 @@ const ne = ({
555
555
  "aria-controls": g ? v : void 0,
556
556
  onClick: () => c((L) => !L),
557
557
  children: [
558
- /* @__PURE__ */ s(Mn, { className: "size-5 text-black/90" }),
558
+ /* @__PURE__ */ s(An, { className: "size-5 text-black/90" }),
559
559
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
560
560
  ]
561
561
  }
@@ -577,7 +577,7 @@ const ne = ({
577
577
  disabled: w,
578
578
  "aria-busy": w,
579
579
  children: [
580
- w ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(An, { className: "h-5 w-5" }),
580
+ w ? /* @__PURE__ */ s(Fe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Rn, { className: "h-5 w-5" }),
581
581
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
582
582
  ]
583
583
  }
@@ -613,7 +613,7 @@ const ne = ({
613
613
  }
614
614
  ) }),
615
615
  r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ u(ye, { variant: "danger", onClick: O, children: [
616
- /* @__PURE__ */ s(rs, { className: "h-5 w-5" }),
616
+ /* @__PURE__ */ s(is, { className: "h-5 w-5" }),
617
617
  /* @__PURE__ */ s("span", { children: "Report" })
618
618
  ] }) }),
619
619
  f
@@ -621,10 +621,10 @@ const ne = ({
621
621
  }
622
622
  )
623
623
  ] });
624
- }, Ze = "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) => {
624
+ }, Ze = "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) => {
625
625
  const t = e;
626
- return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(ha);
627
- }, ga = ({
626
+ return [t == null ? void 0 : t.customerTag, t == null ? void 0 : t.customer_tag].some(fa);
627
+ }, pa = ({
628
628
  className: e,
629
629
  onBack: t,
630
630
  showBackButton: n,
@@ -644,7 +644,7 @@ const ne = ({
644
644
  onParticipantNameClick: x
645
645
  }) => {
646
646
  var F, L, C;
647
- const { channel: p } = ce(), { client: _ } = fe(), w = V.useMemo(
647
+ const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
648
648
  () => {
649
649
  var E;
650
650
  return He(
@@ -654,7 +654,7 @@ const ne = ({
654
654
  );
655
655
  },
656
656
  [(F = p.state) == null ? void 0 : F.members, _ == null ? void 0 : _.userID, p.type]
657
- ), k = mt(w == null ? void 0 : w.user), D = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = ut(p), R = fa(w), O = async () => {
657
+ ), k = mt(w == null ? void 0 : w.user), D = (L = w == null ? void 0 : w.user) == null ? void 0 : L.image, S = ut(p), R = ga(w), O = async () => {
658
658
  try {
659
659
  S ? await p.unpin() : await p.pin();
660
660
  } catch (E) {
@@ -715,7 +715,7 @@ const ne = ({
715
715
  {
716
716
  "aria-label": "Paid customer",
717
717
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
718
- children: /* @__PURE__ */ s(Rn, { className: "size-2.5", weight: "bold" })
718
+ children: /* @__PURE__ */ s(Ln, { className: "size-2.5", weight: "bold" })
719
719
  }
720
720
  ),
721
721
  a && S && /* @__PURE__ */ s(
@@ -738,7 +738,7 @@ const ne = ({
738
738
  ] }),
739
739
  r && /* @__PURE__ */ u("span", { className: "mt-1 flex items-center gap-1 px-1 pb-0.5 text-[10px] leading-3 text-black/55", children: [
740
740
  /* @__PURE__ */ s(we, { className: "size-3 shrink-0 text-black/55" }),
741
- /* @__PURE__ */ s("span", { children: ma })
741
+ /* @__PURE__ */ s("span", { children: ha })
742
742
  ] })
743
743
  ] })
744
744
  ]
@@ -786,13 +786,13 @@ const ne = ({
786
786
  ] })
787
787
  }
788
788
  );
789
- }, pa = (e) => /* @__PURE__ */ s(qs, { ...e, position: "center" }), lt = "vote_up", ot = "vote_down";
790
- function ba(e) {
789
+ }, ba = (e) => /* @__PURE__ */ s(Ws, { ...e, position: "center" }), lt = "vote_up", ot = "vote_down";
790
+ function va(e) {
791
791
  return e != null && e.length ? e.some((t) => t.type === ot) ? "down" : e.some((t) => t.type === lt) ? "up" : null : null;
792
792
  }
793
- function va(e) {
794
- const { channel: t } = ce(), { client: n } = fe("useMessageVote"), a = re(
795
- () => ba(e.own_reactions),
793
+ function xa(e) {
794
+ const { channel: t } = oe(), { client: n } = fe("useMessageVote"), a = re(
795
+ () => va(e.own_reactions),
796
796
  [e.own_reactions]
797
797
  ), r = J(async () => {
798
798
  if (n != null && n.userID)
@@ -817,18 +817,18 @@ function va(e) {
817
817
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
818
818
  return { selected: a, voteUp: r, voteDown: i };
819
819
  }
820
- function xa(e) {
820
+ function wa(e) {
821
821
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
822
822
  }
823
- function us({
823
+ function ms({
824
824
  message: e,
825
825
  viewerLanguage: t
826
826
  }) {
827
827
  var r;
828
- const n = e == null ? void 0 : e.text, a = xa(t);
828
+ const n = e == null ? void 0 : e.text, a = wa(t);
829
829
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
830
830
  }
831
- const wa = ["linktr.ee", "cloudfront.net", "cloudinary"], _a = "messaging-attachment-v1_0";
831
+ const _a = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
832
832
  function Na(e) {
833
833
  try {
834
834
  return new URL(e).hostname.toLowerCase();
@@ -837,16 +837,17 @@ function Na(e) {
837
837
  }
838
838
  }
839
839
  function ya(e) {
840
- return wa.some((t) => e.includes(t));
840
+ return _a.some(
841
+ (t) => e === t || e.endsWith(`.${t}`)
842
+ );
841
843
  }
842
- function ie(e) {
844
+ function he(e) {
843
845
  const t = e == null ? void 0 : e.trim();
844
846
  if (!t) return;
845
847
  const n = Na(t);
846
- if (!n || !ya(n) || /[?&]io=true(?:&|$)/.test(t) && /[?&]size=/.test(t))
847
- return t;
848
- const a = t.includes("?") ? "&" : "?";
849
- return `${t}${a}io=true&size=${_a}`;
848
+ if (!n || !ya(n)) return t;
849
+ const a = new URL(t);
850
+ return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Kt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Kt), a.toString());
850
851
  }
851
852
  const ka = [
852
853
  [/pdf/, "pdf"],
@@ -858,34 +859,34 @@ const ka = [
858
859
  [/plain|rtf/, "text"],
859
860
  [/markdown/, "markdown"]
860
861
  ];
861
- function de(e) {
862
+ function ce(e) {
862
863
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
863
864
  }
864
- function ms(e) {
865
+ function hs(e) {
865
866
  const t = ka.find(
866
867
  ([n]) => n.test(e)
867
868
  );
868
869
  return t ? t[1] : "generic";
869
870
  }
870
871
  const Ca = {
871
- video: ls,
872
- audio: Dn,
873
- image: Ln,
874
- document: is
872
+ video: os,
873
+ audio: zn,
874
+ image: Dn,
875
+ document: ls
875
876
  }, Sa = {
876
- pdf: jn,
877
- doc: Bn,
878
- xls: Un,
879
- csv: $n,
880
- ppt: On,
881
- zip: Pn,
882
- text: Fn,
883
- markdown: zn,
884
- generic: is
877
+ pdf: Vn,
878
+ doc: jn,
879
+ xls: Bn,
880
+ csv: Un,
881
+ ppt: $n,
882
+ zip: On,
883
+ text: Pn,
884
+ markdown: Fn,
885
+ generic: ls
885
886
  };
886
887
  function Ea(e) {
887
- const t = de(e);
888
- return t !== "document" ? Ca[t] : Sa[ms(e)];
888
+ const t = ce(e);
889
+ return t !== "document" ? Ca[t] : Sa[hs(e)];
889
890
  }
890
891
  function _e(e, t) {
891
892
  return V.createElement(Ea(e), t);
@@ -905,7 +906,7 @@ const Ia = (e) => {
905
906
  muted: d = !1,
906
907
  onContainerClick: m
907
908
  }) => {
908
- const f = de(t), h = G(null), g = G(null), c = G(null), b = G(r), [v, x] = B(a), [p, _] = B(0), [w, k] = B(!1), [D, S] = B(!1), [R, O] = B(!1), [F, L] = B(!1), [C, E] = B(!0), [I, T] = B(null), M = J(() => {
909
+ const f = ce(t), h = G(null), g = G(null), c = G(null), b = G(r), [v, x] = B(a), [p, _] = B(0), [w, k] = B(!1), [D, S] = B(!1), [R, O] = B(!1), [F, L] = B(!1), [C, E] = B(!0), [I, T] = B(null), M = J(() => {
909
910
  O(!1), x(!0);
910
911
  }, []), P = J((N) => {
911
912
  const A = g.current;
@@ -1091,7 +1092,7 @@ const Ia = (e) => {
1091
1092
  },
1092
1093
  className: "shrink-0 text-white",
1093
1094
  "aria-label": v ? "Pause" : "Play",
1094
- children: v ? /* @__PURE__ */ s(Vn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(rt, { className: "size-5 translate-x-px", weight: "fill" })
1095
+ children: v ? /* @__PURE__ */ s(Gn, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(rt, { className: "size-5 translate-x-px", weight: "fill" })
1095
1096
  }
1096
1097
  ),
1097
1098
  /* @__PURE__ */ u(
@@ -1141,7 +1142,7 @@ const Ia = (e) => {
1141
1142
  ]
1142
1143
  }
1143
1144
  );
1144
- }, Kt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", hs = ({
1145
+ }, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ma = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", fs = ({
1145
1146
  mimeType: e,
1146
1147
  sourceUrl: t,
1147
1148
  thumbnailUrl: n,
@@ -1150,7 +1151,7 @@ const Ia = (e) => {
1150
1151
  mediaPlayerProps: i,
1151
1152
  containedImage: o = !1
1152
1153
  }) => {
1153
- const l = de(e), [d, m] = B(!1), f = ie(t), h = ie(n);
1154
+ const l = ce(e), [d, m] = B(!1), f = he(t), h = he(n);
1154
1155
  return t && (l === "video" || l === "audio") ? /* @__PURE__ */ s(
1155
1156
  Ta,
1156
1157
  {
@@ -1199,7 +1200,7 @@ const Ia = (e) => {
1199
1200
  {
1200
1201
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1201
1202
  children: _e(e, {
1202
- className: Kt(r),
1203
+ className: Zt(r),
1203
1204
  weight: "regular"
1204
1205
  })
1205
1206
  }
@@ -1216,12 +1217,12 @@ const Ia = (e) => {
1216
1217
  {
1217
1218
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1218
1219
  children: _e(e, {
1219
- className: Kt(r),
1220
+ className: Zt(r),
1220
1221
  weight: "regular"
1221
1222
  })
1222
1223
  }
1223
1224
  );
1224
- }, fs = ({
1225
+ }, gs = ({
1225
1226
  variant: e,
1226
1227
  thumbnail: t,
1227
1228
  title: n,
@@ -1287,7 +1288,7 @@ const Ia = (e) => {
1287
1288
  }
1288
1289
  );
1289
1290
  };
1290
- function gs(e) {
1291
+ function ps(e) {
1291
1292
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1292
1293
  }
1293
1294
  function ht(e) {
@@ -1313,7 +1314,7 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
1313
1314
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1314
1315
  "img",
1315
1316
  {
1316
- src: ie(r) ?? r,
1317
+ src: he(r) ?? r,
1317
1318
  alt: n ?? "",
1318
1319
  className: "aspect-video w-full rounded-[20px] object-cover"
1319
1320
  }
@@ -1321,7 +1322,7 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
1321
1322
  "div",
1322
1323
  {
1323
1324
  className: `aspect-video w-full rounded-[20px] ${Aa(t)} flex items-center justify-center`,
1324
- children: /* @__PURE__ */ s(Gn, { className: `size-12 ${za(t)}` })
1325
+ children: /* @__PURE__ */ s(Hn, { className: `size-12 ${za(t)}` })
1325
1326
  }
1326
1327
  ) }),
1327
1328
  /* @__PURE__ */ u("div", { className: "px-3 pb-3", children: [
@@ -1332,12 +1333,12 @@ const ft = ({ attachment: e, isMyMessage: t }) => {
1332
1333
  ] });
1333
1334
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
1334
1335
  };
1335
- function ps(e) {
1336
+ function bs(e) {
1336
1337
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1337
1338
  }
1338
1339
  function gt(e) {
1339
1340
  var t;
1340
- return (t = e.attachments) == null ? void 0 : t.find(ps);
1341
+ return (t = e.attachments) == null ? void 0 : t.find(bs);
1341
1342
  }
1342
1343
  async function Fa(e, t) {
1343
1344
  let n;
@@ -1399,16 +1400,16 @@ function pt(e) {
1399
1400
  thumbnailUrl: f
1400
1401
  };
1401
1402
  }
1402
- const bs = ({
1403
+ const vs = ({
1403
1404
  resolvedUrl: e,
1404
1405
  resolvedType: t,
1405
1406
  title: n,
1406
1407
  fileSize: a,
1407
1408
  thumbnailUrl: r
1408
1409
  }) => {
1409
- const i = a !== void 0 ? gs(a) : void 0;
1410
+ const i = a !== void 0 ? ps(a) : void 0;
1410
1411
  return /* @__PURE__ */ s(
1411
- fs,
1412
+ gs,
1412
1413
  {
1413
1414
  variant: "dark",
1414
1415
  title: n,
@@ -1416,7 +1417,7 @@ const bs = ({
1416
1417
  mimeType: t,
1417
1418
  detail: i,
1418
1419
  thumbnail: /* @__PURE__ */ s(
1419
- hs,
1420
+ fs,
1420
1421
  {
1421
1422
  mimeType: t,
1422
1423
  sourceUrl: e,
@@ -1427,23 +1428,23 @@ const bs = ({
1427
1428
  )
1428
1429
  }
1429
1430
  );
1430
- }, vs = ({
1431
+ }, xs = ({
1431
1432
  resolvedUrl: e,
1432
1433
  resolvedType: t,
1433
1434
  title: n,
1434
1435
  fileSize: a,
1435
1436
  thumbnailUrl: r
1436
1437
  }) => {
1437
- const i = de(t), o = a !== void 0 ? gs(a) : void 0;
1438
+ const i = ce(t), o = a !== void 0 ? ps(a) : void 0;
1438
1439
  return /* @__PURE__ */ s(
1439
- fs,
1440
+ gs,
1440
1441
  {
1441
1442
  variant: "light",
1442
1443
  title: n,
1443
1444
  mimeType: t,
1444
1445
  detail: o,
1445
1446
  thumbnail: /* @__PURE__ */ s(
1446
- hs,
1447
+ fs,
1447
1448
  {
1448
1449
  mimeType: t,
1449
1450
  sourceUrl: e,
@@ -1482,7 +1483,7 @@ const bs = ({
1482
1483
  className: "str-chat__message-bubble",
1483
1484
  "data-attachment-bubble": "true",
1484
1485
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1485
- children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(bs, { ...a }) : /* @__PURE__ */ s(vs, { ...a })
1486
+ children: n ? /* @__PURE__ */ s("div", { className: ht(t), children: /* @__PURE__ */ s(ft, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(vs, { ...a }) : /* @__PURE__ */ s(xs, { ...a })
1486
1487
  }
1487
1488
  ) })
1488
1489
  }
@@ -1495,7 +1496,7 @@ const bs = ({
1495
1496
  if (t)
1496
1497
  return /* @__PURE__ */ s("div", { className: ht(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !0 }) });
1497
1498
  const n = pt(e);
1498
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(bs, { ...n }) }) : null;
1499
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(vs, { ...n }) }) : null;
1499
1500
  }, Ua = ({
1500
1501
  message: e
1501
1502
  }) => {
@@ -1503,7 +1504,7 @@ const bs = ({
1503
1504
  if (t)
1504
1505
  return /* @__PURE__ */ s("div", { className: ht(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ft, { attachment: t, isMyMessage: !1 }) });
1505
1506
  const n = pt(e);
1506
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(vs, { ...n }) }) : null;
1507
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(xs, { ...n }) }) : null;
1507
1508
  }, fl = Object.assign(Oa, {
1508
1509
  Creator: $a,
1509
1510
  Visitor: Ua
@@ -1684,8 +1685,8 @@ function tr(e, t) {
1684
1685
  }
1685
1686
  }
1686
1687
  if (!e) return;
1687
- if (de(e) === "document") {
1688
- const r = ms(e), i = er[r];
1688
+ if (ce(e) === "document") {
1689
+ const r = hs(e), i = er[r];
1689
1690
  if (i) return i;
1690
1691
  if (e === "application/octet-stream") return;
1691
1692
  }
@@ -1697,7 +1698,7 @@ function sr(e, t, n) {
1697
1698
  const a = tr(e, t), r = typeof n == "number" && n > 0 ? Qa(n) : void 0;
1698
1699
  return [a, r].filter(Boolean).join(" · ") || void 0;
1699
1700
  }
1700
- function le(e) {
1701
+ function ie(e) {
1701
1702
  try {
1702
1703
  const n = new URL(e).pathname.split("/").pop();
1703
1704
  return n && n.length > 0 ? decodeURIComponent(n) : "download";
@@ -1714,7 +1715,7 @@ const nr = {
1714
1715
  }, rr = {
1715
1716
  dark: "text-white/85",
1716
1717
  light: "text-black/85"
1717
- }, xs = ({
1718
+ }, ws = ({
1718
1719
  variant: e,
1719
1720
  filename: t,
1720
1721
  title: n,
@@ -1773,8 +1774,8 @@ const nr = {
1773
1774
  l ? /* @__PURE__ */ s("div", { className: "shrink-0", children: l }) : null
1774
1775
  ] });
1775
1776
  };
1776
- async function ws(e, t) {
1777
- const n = t ?? le(e);
1777
+ async function _s(e, t) {
1778
+ const n = t ?? ie(e);
1778
1779
  try {
1779
1780
  const a = await fetch(e, { mode: "cors" });
1780
1781
  if (!a.ok) throw new Error(`HTTP ${a.status}`);
@@ -1801,9 +1802,9 @@ const ir = ({
1801
1802
  onActivate: a,
1802
1803
  trailingAction: r
1803
1804
  }) => {
1804
- const i = t.filename ?? le(t.src);
1805
+ const i = t.filename ?? ie(t.src);
1805
1806
  return /* @__PURE__ */ s(
1806
- xs,
1807
+ ws,
1807
1808
  {
1808
1809
  variant: e,
1809
1810
  filename: i,
@@ -1839,8 +1840,8 @@ const ir = ({
1839
1840
  if ((m == null ? void 0 : m(x)) === !1) return;
1840
1841
  const p = c[x];
1841
1842
  if (!p) return;
1842
- const _ = p.filename ?? le(p.src);
1843
- ws(p.src, _);
1843
+ const _ = p.filename ?? ie(p.src);
1844
+ _s(p.src, _);
1844
1845
  };
1845
1846
  if (c.length === 0)
1846
1847
  return null;
@@ -1892,7 +1893,7 @@ const ir = ({
1892
1893
  onClick: e,
1893
1894
  "aria-label": n,
1894
1895
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1895
- children: /* @__PURE__ */ s(Hn, { size: 20, weight: "bold", "aria-hidden": !0 })
1896
+ children: /* @__PURE__ */ s(Yn, { size: 20, weight: "bold", "aria-hidden": !0 })
1896
1897
  }
1897
1898
  ),
1898
1899
  /* @__PURE__ */ s(
@@ -1905,7 +1906,7 @@ const ir = ({
1905
1906
  children: /* @__PURE__ */ s(xe, { size: 20, weight: "bold", "aria-hidden": !0 })
1906
1907
  }
1907
1908
  )
1908
- ] }), _s = ({
1909
+ ] }), Ns = ({
1909
1910
  url: e,
1910
1911
  filename: t,
1911
1912
  variant: n = "pill",
@@ -1916,7 +1917,7 @@ const ir = ({
1916
1917
  }) => {
1917
1918
  const [l, d] = B(!1), m = J(
1918
1919
  (c) => {
1919
- c.stopPropagation(), !l && (d(!0), ws(e, t).catch(() => {
1920
+ c.stopPropagation(), !l && (d(!0), _s(e, t).catch(() => {
1920
1921
  }).finally(() => {
1921
1922
  d(!1), o == null || o();
1922
1923
  }));
@@ -2105,7 +2106,7 @@ const ir = ({
2105
2106
  ]
2106
2107
  }
2107
2108
  );
2108
- }, Ns = ({
2109
+ }, ys = ({
2109
2110
  open: e,
2110
2111
  items: t,
2111
2112
  initialIndex: n = 0,
@@ -2116,7 +2117,7 @@ const ir = ({
2116
2117
  initialIndex: n,
2117
2118
  open: e
2118
2119
  }), l = t[r], d = re(
2119
- () => (l == null ? void 0 : l.filename) ?? (l ? le(l.src) : "image"),
2120
+ () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "image"),
2120
2121
  [l]
2121
2122
  );
2122
2123
  return l ? /* @__PURE__ */ u(
@@ -2127,7 +2128,7 @@ const ir = ({
2127
2128
  ariaLabel: d,
2128
2129
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2129
2130
  actions: /* @__PURE__ */ s(
2130
- _s,
2131
+ Ns,
2131
2132
  {
2132
2133
  url: l.src,
2133
2134
  filename: d,
@@ -2161,7 +2162,7 @@ const ir = ({
2161
2162
  ]
2162
2163
  }
2163
2164
  ) : null;
2164
- }, mr = "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", ys = ({
2165
+ }, mr = "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", ks = ({
2165
2166
  tiles: e,
2166
2167
  onTileActivate: t,
2167
2168
  maxVisible: n = 4,
@@ -2244,7 +2245,7 @@ const ir = ({
2244
2245
  content: /* @__PURE__ */ s(
2245
2246
  "img",
2246
2247
  {
2247
- src: ie(e.src) ?? e.src,
2248
+ src: he(e.src) ?? e.src,
2248
2249
  alt: e.alt ?? "",
2249
2250
  width: e.width,
2250
2251
  height: e.height,
@@ -2258,7 +2259,7 @@ const ir = ({
2258
2259
  src: e,
2259
2260
  alt: t,
2260
2261
  items: n
2261
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], ks = (e, t) => e.map((n, a) => ({
2262
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Cs = (e, t) => e.map((n, a) => ({
2262
2263
  src: n.src,
2263
2264
  alt: n.alt,
2264
2265
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
@@ -2277,7 +2278,7 @@ const ir = ({
2277
2278
  children: /* @__PURE__ */ s(
2278
2279
  "img",
2279
2280
  {
2280
- src: ie(e) ?? e,
2281
+ src: he(e) ?? e,
2281
2282
  alt: t ?? "",
2282
2283
  draggable: !1,
2283
2284
  loading: a,
@@ -2289,16 +2290,16 @@ const ir = ({
2289
2290
  ),
2290
2291
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: i }) }) : null,
2291
2292
  /* @__PURE__ */ s(
2292
- Ns,
2293
+ ys,
2293
2294
  {
2294
2295
  open: o,
2295
- items: ks([{ src: e, alt: t }], n),
2296
+ items: Cs([{ src: e, alt: t }], n),
2296
2297
  initialIndex: l,
2297
2298
  onClose: m
2298
2299
  }
2299
2300
  )
2300
2301
  ] });
2301
- }, Cs = ({
2302
+ }, Ss = ({
2302
2303
  state: e,
2303
2304
  src: t,
2304
2305
  alt: n,
@@ -2325,12 +2326,12 @@ const ir = ({
2325
2326
  groupPosition: o,
2326
2327
  "data-testid": "image-attachment",
2327
2328
  children: [
2328
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(ys, { tiles: v, onTileActivate: c }) }),
2329
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(ks, { tiles: v, onTileActivate: c }) }),
2329
2330
  /* @__PURE__ */ s(
2330
- Ns,
2331
+ ys,
2331
2332
  {
2332
2333
  open: h,
2333
- items: ks(m, a),
2334
+ items: Cs(m, a),
2334
2335
  initialIndex: g,
2335
2336
  onClose: b
2336
2337
  }
@@ -2338,7 +2339,7 @@ const ir = ({
2338
2339
  ]
2339
2340
  }
2340
2341
  );
2341
- }, pr = (e) => /* @__PURE__ */ s(gr, { ...e }), br = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "sent" }), vr = (e) => /* @__PURE__ */ s(Cs, { ...e, state: "received" }), xr = {
2342
+ }, pr = (e) => /* @__PURE__ */ s(gr, { ...e }), br = (e) => /* @__PURE__ */ s(Ss, { ...e, state: "sent" }), vr = (e) => /* @__PURE__ */ s(Ss, { ...e, state: "received" }), xr = {
2342
2343
  Composer: pr,
2343
2344
  Sent: br,
2344
2345
  Received: vr
@@ -2353,7 +2354,7 @@ const ir = ({
2353
2354
  initialIndex: n,
2354
2355
  open: e
2355
2356
  }), l = t[r], d = re(
2356
- () => (l == null ? void 0 : l.filename) ?? (l ? le(l.src) : "document"),
2357
+ () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "document"),
2357
2358
  [l]
2358
2359
  ), m = re(
2359
2360
  () => l ? _r(l.src) : void 0,
@@ -2406,9 +2407,9 @@ const ir = ({
2406
2407
  onActivate: a,
2407
2408
  trailingAction: r
2408
2409
  }) => {
2409
- const i = t.filename ?? le(t.src);
2410
+ const i = t.filename ?? ie(t.src);
2410
2411
  return /* @__PURE__ */ s(
2411
- xs,
2412
+ ws,
2412
2413
  {
2413
2414
  variant: e,
2414
2415
  filename: i,
@@ -2439,7 +2440,7 @@ const ir = ({
2439
2440
  return null;
2440
2441
  const p = h.map((_) => ({
2441
2442
  src: _.src,
2442
- filename: _.filename ?? le(_.src)
2443
+ filename: _.filename ?? ie(_.src)
2443
2444
  }));
2444
2445
  return /* @__PURE__ */ u(
2445
2446
  Me,
@@ -2450,8 +2451,8 @@ const ir = ({
2450
2451
  "data-testid": "pdf-attachment",
2451
2452
  children: [
2452
2453
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: h.map((_, w) => {
2453
- const k = _.filename ?? le(_.src), D = x && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2454
- _s,
2454
+ const k = _.filename ?? ie(_.src), D = x && w === 0 ? /* @__PURE__ */ s(Ae, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2455
+ Ns,
2455
2456
  {
2456
2457
  url: _.src,
2457
2458
  filename: k,
@@ -2488,7 +2489,7 @@ const ir = ({
2488
2489
  Composer: kr,
2489
2490
  Sent: Cr,
2490
2491
  Received: Sr
2491
- }, Ss = ({
2492
+ }, Es = ({
2492
2493
  open: e,
2493
2494
  items: t,
2494
2495
  initialIndex: n = 0,
@@ -2499,7 +2500,7 @@ const ir = ({
2499
2500
  initialIndex: n,
2500
2501
  open: e
2501
2502
  }), l = t[r], d = re(
2502
- () => (l == null ? void 0 : l.filename) ?? (l ? le(l.src) : "video"),
2503
+ () => (l == null ? void 0 : l.filename) ?? (l ? ie(l.src) : "video"),
2503
2504
  [l]
2504
2505
  );
2505
2506
  return l ? /* @__PURE__ */ u(
@@ -2538,7 +2539,7 @@ const ir = ({
2538
2539
  ]
2539
2540
  }
2540
2541
  ) : null;
2541
- }, Ir = () => /* @__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(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Es = ({
2542
+ }, Ir = () => /* @__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(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Is = ({
2542
2543
  item: e,
2543
2544
  index: t
2544
2545
  }) => /* @__PURE__ */ u("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2553,7 +2554,7 @@ const ir = ({
2553
2554
  className: "absolute inset-0 size-full rounded-md object-cover"
2554
2555
  }
2555
2556
  ) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
2556
- ls,
2557
+ os,
2557
2558
  {
2558
2559
  className: "size-16 rounded-md text-white/30",
2559
2560
  weight: "regular",
@@ -2563,14 +2564,14 @@ const ir = ({
2563
2564
  /* @__PURE__ */ s(Ir, {})
2564
2565
  ] }), Tr = (e, t, n) => ({
2565
2566
  ariaLabel: `Play video ${t + 1} of ${n}`,
2566
- content: /* @__PURE__ */ s(Es, { item: e, index: t })
2567
+ content: /* @__PURE__ */ s(Is, { item: e, index: t })
2567
2568
  }), Mr = ({
2568
2569
  src: e,
2569
2570
  poster: t,
2570
2571
  mimeType: n,
2571
2572
  preload: a,
2572
2573
  items: r
2573
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Is = (e, t) => e.map((n, a) => ({
2574
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Ts = (e, t) => e.map((n, a) => ({
2574
2575
  src: n.src,
2575
2576
  poster: n.poster,
2576
2577
  mimeType: n.mimeType,
@@ -2588,15 +2589,15 @@ const ir = ({
2588
2589
  onClick: () => m(0),
2589
2590
  "aria-label": "Play video",
2590
2591
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2591
- children: /* @__PURE__ */ s(Es, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2592
+ children: /* @__PURE__ */ s(Is, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2592
2593
  }
2593
2594
  ),
2594
2595
  o ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ae, { onClick: o }) }) : null,
2595
2596
  /* @__PURE__ */ s(
2596
- Ss,
2597
+ Es,
2597
2598
  {
2598
2599
  open: l,
2599
- items: Is(
2600
+ items: Ts(
2600
2601
  [{ src: e, poster: t, mimeType: n, preload: r }],
2601
2602
  a
2602
2603
  ),
@@ -2605,7 +2606,7 @@ const ir = ({
2605
2606
  }
2606
2607
  )
2607
2608
  ] });
2608
- }, Ts = ({
2609
+ }, Ms = ({
2609
2610
  state: e,
2610
2611
  src: t,
2611
2612
  poster: n,
@@ -2634,7 +2635,7 @@ const ir = ({
2634
2635
  "data-testid": "video-attachment",
2635
2636
  children: [
2636
2637
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2637
- ys,
2638
+ ks,
2638
2639
  {
2639
2640
  tiles: x,
2640
2641
  onTileActivate: b,
@@ -2642,10 +2643,10 @@ const ir = ({
2642
2643
  }
2643
2644
  ) }),
2644
2645
  /* @__PURE__ */ s(
2645
- Ss,
2646
+ Es,
2646
2647
  {
2647
2648
  open: g,
2648
- items: Is(f, r),
2649
+ items: Ts(f, r),
2649
2650
  initialIndex: c,
2650
2651
  onClose: v
2651
2652
  }
@@ -2653,7 +2654,7 @@ const ir = ({
2653
2654
  ]
2654
2655
  }
2655
2656
  );
2656
- }, Rr = (e) => /* @__PURE__ */ s(Ar, { ...e }), Lr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "sent" }), Dr = (e) => /* @__PURE__ */ s(Ts, { ...e, state: "received" }), zr = {
2657
+ }, Rr = (e) => /* @__PURE__ */ s(Ar, { ...e }), Lr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), Dr = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), zr = {
2657
2658
  Composer: Rr,
2658
2659
  Sent: Lr,
2659
2660
  Received: Dr
@@ -2667,17 +2668,17 @@ const ir = ({
2667
2668
  isUnlocking: () => !1
2668
2669
  }, Pr = {
2669
2670
  LockedAttachment: Fr
2670
- }, Ms = ct({}), gl = Ms.Provider;
2671
+ }, As = ct({}), gl = As.Provider;
2671
2672
  function Or(e) {
2672
- return Te(Ms)[e] ?? Pr[e];
2673
+ return Te(As)[e] ?? Pr[e];
2673
2674
  }
2674
- const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-Bme-pBSF.js")), Br = () => /* @__PURE__ */ s(
2675
+ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import("./Card-CKM_PULl.js")), Br = () => /* @__PURE__ */ s(
2675
2676
  "div",
2676
2677
  {
2677
2678
  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)]",
2678
2679
  "aria-hidden": !0
2679
2680
  }
2680
- ), Pe = (e) => /* @__PURE__ */ s(Vs, { fallback: /* @__PURE__ */ s(Br, {}), children: e.contentType === "text" ? /* @__PURE__ */ s($r, { ...e }) : /* @__PURE__ */ s(Ur, { ...e }) }), jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2681
+ ), Pe = (e) => /* @__PURE__ */ s(Gs, { fallback: /* @__PURE__ */ s(Br, {}), children: e.contentType === "text" ? /* @__PURE__ */ s($r, { ...e }) : /* @__PURE__ */ s(Ur, { ...e }) }), jr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2681
2682
  "svg",
2682
2683
  {
2683
2684
  width: e,
@@ -2712,9 +2713,9 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2712
2713
  }, Yr = (e) => {
2713
2714
  var t;
2714
2715
  return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2715
- }, As = (e) => Vr(e) || Gr(e), qr = (e) => {
2716
+ }, Rs = (e) => Vr(e) || Gr(e), qr = (e) => {
2716
2717
  var t;
2717
- return As(e) && !((t = e.text) != null && t.trim());
2718
+ return Rs(e) && !((t = e.text) != null && t.trim());
2718
2719
  }, Qe = ({
2719
2720
  message: e,
2720
2721
  standalone: t = !1,
@@ -2722,7 +2723,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2722
2723
  hasAttachment: a = !1
2723
2724
  }) => {
2724
2725
  var h;
2725
- const r = As(e), i = Ue(e);
2726
+ const r = Rs(e), i = Ue(e);
2726
2727
  if (!r && !i)
2727
2728
  return null;
2728
2729
  if (r) {
@@ -2730,7 +2731,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2730
2731
  if (!g) return null;
2731
2732
  const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = t ? `${g} tip` : `Delivered with ${g} tip`;
2732
2733
  return /* @__PURE__ */ u("div", { className: c, children: [
2733
- /* @__PURE__ */ s(Yn, { size: t ? 14 : 12 }),
2734
+ /* @__PURE__ */ s(qn, { size: t ? 14 : 12 }),
2734
2735
  /* @__PURE__ */ s("span", { children: b })
2735
2736
  ] });
2736
2737
  }
@@ -2762,7 +2763,7 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2762
2763
  "aria-label": "Good response",
2763
2764
  "aria-pressed": e === "up",
2764
2765
  "data-tooltip": "Good response",
2765
- children: /* @__PURE__ */ s(qn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2766
+ children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "up" ? "fill" : "regular" })
2766
2767
  }
2767
2768
  ),
2768
2769
  /* @__PURE__ */ s(
@@ -2776,11 +2777,11 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2776
2777
  "aria-label": "Bad response",
2777
2778
  "aria-pressed": e === "down",
2778
2779
  "data-tooltip": "Bad response",
2779
- children: /* @__PURE__ */ s(Wn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2780
+ children: /* @__PURE__ */ s(Xn, { size: 16, weight: e === "down" ? "fill" : "regular" })
2780
2781
  }
2781
2782
  )
2782
2783
  ] }), et = () => {
2783
- const { message: e } = Ne("SentMessageDeliveryStatus"), { messages: t } = ce("SentMessageDeliveryStatus"), n = (() => {
2784
+ const { message: e } = Ne("SentMessageDeliveryStatus"), { messages: t } = oe("SentMessageDeliveryStatus"), n = (() => {
2784
2785
  if (t)
2785
2786
  for (let a = t.length - 1; a >= 0; a -= 1) {
2786
2787
  const r = t[a];
@@ -2789,11 +2790,11 @@ const $r = V.lazy(() => import("./Card-qS17qnN0.js")), Ur = V.lazy(() => import(
2789
2790
  }
2790
2791
  })();
2791
2792
  return e.id !== n ? null : /* @__PURE__ */ u(se, { children: [
2792
- /* @__PURE__ */ s(Xn, { weight: "bold", "aria-hidden": "true" }),
2793
+ /* @__PURE__ */ s(Kn, { weight: "bold", "aria-hidden": "true" }),
2793
2794
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2794
2795
  ] });
2795
2796
  }, Xr = () => null, Kr = () => /* @__PURE__ */ s(
2796
- Ws,
2797
+ Xs,
2797
2798
  {
2798
2799
  MessageSentStatus: et,
2799
2800
  MessageDeliveredStatus: et,
@@ -2959,9 +2960,9 @@ const Qr = {
2959
2960
  }, ii = {
2960
2961
  dark: "size-16 text-white/25",
2961
2962
  light: "size-16 text-black/25"
2962
- }, Ye = (e, t) => !!t && !!e && de(e) === "audio", St = (e, t) => {
2963
+ }, Ye = (e, t) => !!t && !!e && ce(e) === "audio", St = (e, t) => {
2963
2964
  if (!t || !e) return !1;
2964
- const n = de(e);
2965
+ const n = ce(e);
2965
2966
  return n === "video" || n === "audio";
2966
2967
  }, Et = "bg-[#F2F3F4]", je = ({
2967
2968
  variant: e,
@@ -2972,7 +2973,7 @@ const Qr = {
2972
2973
  topLeft: i,
2973
2974
  topRight: o
2974
2975
  }) => {
2975
- const l = de(r), d = !!n && l === "video", m = ie(t);
2976
+ const l = ce(r), d = !!n && l === "video", m = he(t);
2976
2977
  return Ye(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
2977
2978
  "audio",
2978
2979
  {
@@ -3057,7 +3058,7 @@ const Qr = {
3057
3058
  onClick: h,
3058
3059
  "aria-label": "Edit attachment",
3059
3060
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3060
- children: /* @__PURE__ */ s(Kn, { className: "size-5", weight: "regular" })
3061
+ children: /* @__PURE__ */ s(Zn, { className: "size-5", weight: "regular" })
3061
3062
  }
3062
3063
  ) : void 0;
3063
3064
  return c ? /* @__PURE__ */ s(Be, { variant: "dark", bgClassName: Et, children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -3204,7 +3205,7 @@ const Qr = {
3204
3205
  ]
3205
3206
  }
3206
3207
  );
3207
- }, Zt = {
3208
+ }, Jt = {
3208
3209
  Composer: li,
3209
3210
  Sent: ci,
3210
3211
  Received: oi
@@ -3213,13 +3214,13 @@ function z(e) {
3213
3214
  const t = e == null ? void 0 : e.trim();
3214
3215
  return t || void 0;
3215
3216
  }
3216
- function Jt(e) {
3217
+ function Qt(e) {
3217
3218
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3218
3219
  }
3219
3220
  function di(e, t) {
3220
3221
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3221
3222
  return !1;
3222
- const n = Jt(e), a = Jt(t);
3223
+ const n = Qt(e), a = Qt(t);
3223
3224
  if (n === a)
3224
3225
  return !0;
3225
3226
  if (!n.includes(a))
@@ -3227,13 +3228,13 @@ function di(e, t) {
3227
3228
  const r = n.split(a).join("");
3228
3229
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3229
3230
  }
3230
- function Qt(e) {
3231
+ function es(e) {
3231
3232
  const t = z(e.og_scrape_url) ?? z(e.title_link), n = z(e.image_url) ?? z(e.thumb_url), a = z(e.asset_url), r = z(e.mime_type);
3232
3233
  return {
3233
3234
  title: z(e.title),
3234
3235
  description: z(e.text),
3235
3236
  url: t,
3236
- thumbnailUrl: ie(n),
3237
+ thumbnailUrl: he(n),
3237
3238
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3238
3239
  // native video/audio player in the hero instead of a static thumbnail.
3239
3240
  sourceUrl: a,
@@ -3243,13 +3244,13 @@ function Qt(e) {
3243
3244
  }
3244
3245
  function ui(e) {
3245
3246
  var t;
3246
- return Rs(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;
3247
+ return Ls(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;
3247
3248
  }
3248
- function Rs(e) {
3249
+ function Ls(e) {
3249
3250
  const t = z(e.og_scrape_url);
3250
3251
  return e.type === "link" || !!t && !e.asset_url;
3251
3252
  }
3252
- function Ls(e) {
3253
+ function Ds(e) {
3253
3254
  if (!(e != null && e.length)) return [];
3254
3255
  const t = [], n = (r, i) => {
3255
3256
  const o = t[t.length - 1];
@@ -3267,7 +3268,7 @@ function Ls(e) {
3267
3268
  t.push({ type: "link", attachments: [r] });
3268
3269
  };
3269
3270
  for (const r of e) {
3270
- if (Rs(r)) {
3271
+ if (Ls(r)) {
3271
3272
  a(r);
3272
3273
  continue;
3273
3274
  }
@@ -3282,10 +3283,8 @@ function mi(e) {
3282
3283
  function hi(e, t, n) {
3283
3284
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3284
3285
  }
3285
- function es(e) {
3286
- return ie(
3287
- z(e.image_url)
3288
- ) ?? ie(z(e.asset_url)) ?? "";
3286
+ function ts(e) {
3287
+ return z(e.image_url) ?? z(e.asset_url) ?? "";
3289
3288
  }
3290
3289
  function fi(e) {
3291
3290
  switch (e) {
@@ -3307,7 +3306,7 @@ function gi(e, t) {
3307
3306
  case "image":
3308
3307
  return {
3309
3308
  items: t.map((a) => ({
3310
- src: es(a),
3309
+ src: ts(a),
3311
3310
  alt: z(a.title)
3312
3311
  }))
3313
3312
  };
@@ -3358,7 +3357,7 @@ function gi(e, t) {
3358
3357
  switch (e) {
3359
3358
  case "image":
3360
3359
  return {
3361
- src: es(n),
3360
+ src: ts(n),
3362
3361
  alt: z(n.title)
3363
3362
  };
3364
3363
  case "video":
@@ -3406,14 +3405,14 @@ const bi = ({
3406
3405
  renderText: a
3407
3406
  }) => {
3408
3407
  var b;
3409
- const r = Ls(n.attachments);
3408
+ const r = Ds(n.attachments);
3410
3409
  if (r.length === 0) return null;
3411
- const i = mi(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? Qt(l.attachments[0] ?? {}).url : void 0, m = o && di(o, d) ? void 0 : o;
3410
+ const i = mi(r), o = (b = n.text) == null ? void 0 : b.trim(), l = r.find((v) => v.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? es(l.attachments[0] ?? {}).url : void 0, m = o && di(o, d) ? void 0 : o;
3412
3411
  let f = 0;
3413
3412
  const h = [], g = (v, x) => {
3414
- const p = t ? Zt.Sent : Zt.Received;
3413
+ const p = t ? Jt.Sent : Jt.Received;
3415
3414
  h.push(
3416
- /* @__PURE__ */ s(p, { ...Qt(v) }, x)
3415
+ /* @__PURE__ */ s(p, { ...es(v) }, x)
3417
3416
  );
3418
3417
  }, c = (v, x) => {
3419
3418
  const p = hi(
@@ -3489,50 +3488,50 @@ const bi = ({
3489
3488
  renderText: b,
3490
3489
  threadList: v,
3491
3490
  viewerLanguage: x
3492
- } = e, { client: p } = fe("CustomMessage"), { channel: _ } = ce("CustomMessage"), { isUnlocking: w, onUnlockClick: k, onFetchSource: D, onDownloadClick: S } = Or("LockedAttachment"), [R, O] = B(!1), F = Ks(c.id), { selected: L, voteUp: C, voteDown: E } = va(c), {
3493
- Attachment: I = Zs,
3494
- EditMessageModal: T = Js,
3491
+ } = e, { client: p } = fe("CustomMessage"), { channel: _ } = oe("CustomMessage"), { isUnlocking: w, onUnlockClick: k, onFetchSource: D, onDownloadClick: S } = Or("LockedAttachment"), [R, O] = B(!1), F = Zs(c.id), { selected: L, voteUp: C, voteDown: E } = xa(c), {
3492
+ Attachment: I = Js,
3493
+ EditMessageModal: T = Qs,
3495
3494
  MessageActions: M,
3496
- MessageBlocked: P = Qs,
3497
- MessageBouncePrompt: $ = en,
3498
- MessageDeleted: j = tn,
3499
- MessageIsThreadReplyInChannelButtonIndicator: Q = sn,
3500
- MessageRepliesCountButton: ee = nn,
3501
- ReminderNotification: X = an,
3502
- StreamedMessageText: N = rn,
3495
+ MessageBlocked: P = en,
3496
+ MessageBouncePrompt: $ = tn,
3497
+ MessageDeleted: j = sn,
3498
+ MessageIsThreadReplyInChannelButtonIndicator: Q = nn,
3499
+ MessageRepliesCountButton: ee = an,
3500
+ ReminderNotification: X = rn,
3501
+ StreamedMessageText: N = ln,
3503
3502
  PinIndicator: A
3504
- } = as("CustomMessage"), H = ln(c), q = on(c), Y = re(
3503
+ } = rs("CustomMessage"), H = on(c), q = cn(c), Y = re(
3505
3504
  () => h == null ? void 0 : h(c),
3506
3505
  [h, c]
3507
3506
  ), U = re(() => {
3508
- const he = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...he] : he;
3507
+ const me = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...me] : me;
3509
3508
  if (!Ue(c)) return be;
3510
- const Gt = be.filter((Ht) => !("type" in Ht) || !ps(Ht));
3509
+ const Gt = be.filter((Ht) => !("type" in Ht) || !bs(Ht));
3511
3510
  return Gt.length === be.length ? be : Gt;
3512
3511
  }, [c]), W = re(
3513
- () => Ls(U),
3512
+ () => Ds(U),
3514
3513
  [U]
3515
3514
  ), Z = re(() => {
3516
- const he = us({ message: c, viewerLanguage: x });
3517
- return he === c.text ? c : { ...c, text: he };
3518
- }, [c, x]), ue = W.length > 0, De = W.reduce(
3519
- (he, be) => he + be.attachments.length,
3515
+ const me = ms({ message: c, viewerLanguage: x });
3516
+ return me === c.text ? c : { ...c, text: me };
3517
+ }, [c, x]), de = W.length > 0, De = W.reduce(
3518
+ (me, be) => me + be.attachments.length,
3520
3519
  0
3521
3520
  ) === ((U == null ? void 0 : U.length) ?? 0), ze = Ya({
3522
3521
  endOfGroup: r,
3523
3522
  firstOfGroup: i,
3524
3523
  groupedByUser: o
3525
3524
  });
3526
- if (cn(c))
3525
+ if (dn(c))
3527
3526
  return null;
3528
3527
  if (c.deleted_at || c.type === "deleted")
3529
3528
  return /* @__PURE__ */ s(j, { message: c });
3530
- if (dn(c))
3529
+ if (un(c))
3531
3530
  return /* @__PURE__ */ s(P, {});
3532
- const ae = !v && !!c.reply_count, me = !v && c.show_in_channel && c.parent_id, oe = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = un(c);
3531
+ const ae = !v && !!c.reply_count, ue = !v && c.show_in_channel && c.parent_id, le = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = mn(c);
3533
3532
  let ge;
3534
- oe ? ge = () => m(c) : Tt && (ge = () => O(!0));
3535
- const te = g(), $s = y(
3533
+ le ? ge = () => m(c) : Tt && (ge = () => O(!0));
3534
+ const te = g(), Us = y(
3536
3535
  "str-chat__message str-chat__message-simple",
3537
3536
  `str-chat__message--${c.type}`,
3538
3537
  `str-chat__message--${c.status}`,
@@ -3544,12 +3543,12 @@ const bi = ({
3544
3543
  "str-chat__message--pinned pinned-message": c.pinned,
3545
3544
  "str-chat__message--with-reactions": q,
3546
3545
  "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((zt = c == null ? void 0 : c.error) == null ? void 0 : zt.status) !== 403,
3547
- "str-chat__message-with-thread-link": ae || me,
3546
+ "str-chat__message-with-thread-link": ae || ue,
3548
3547
  "str-chat__virtual-message__wrapper--end": r,
3549
3548
  "str-chat__virtual-message__wrapper--first": i,
3550
3549
  "str-chat__virtual-message__wrapper--group": o
3551
3550
  }
3552
- ), qe = c.poll_id && p.polls.fromState(c.poll_id), Mt = qr(c), pe = Ue(c), Us = yt(c), We = !!(U != null && U.length && !c.quoted_message), At = pe && te && We, Bs = ue && De && !c.quoted_message && !qe && !Y && !pe, Rt = {
3551
+ ), qe = c.poll_id && p.polls.fromState(c.poll_id), Mt = qr(c), pe = Ue(c), Bs = yt(c), We = !!(U != null && U.length && !c.quoted_message), At = pe && te && We, js = de && De && !c.quoted_message && !qe && !Y && !pe, Rt = {
3553
3552
  contentType: "text",
3554
3553
  amountText: (Ft = c.metadata) == null ? void 0 : Ft.amount_text,
3555
3554
  paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
@@ -3572,7 +3571,7 @@ const bi = ({
3572
3571
  }
3573
3572
  ),
3574
3573
  R && /* @__PURE__ */ s(
3575
- mn,
3574
+ hn,
3576
3575
  {
3577
3576
  MessageBouncePrompt: $,
3578
3577
  onClose: () => O(!1),
@@ -3582,7 +3581,7 @@ const bi = ({
3582
3581
  /* @__PURE__ */ u(
3583
3582
  "div",
3584
3583
  {
3585
- className: $s,
3584
+ className: Us,
3586
3585
  "data-message-id": c.id,
3587
3586
  "data-dd-privacy": "mask",
3588
3587
  children: [
@@ -3604,7 +3603,7 @@ const bi = ({
3604
3603
  "div",
3605
3604
  {
3606
3605
  className: y("str-chat__message-inner", {
3607
- "str-chat__simple-message--error-failed": oe || Tt
3606
+ "str-chat__simple-message--error-failed": le || Tt
3608
3607
  }),
3609
3608
  "data-testid": "message-inner",
3610
3609
  onClick: ge,
@@ -3664,7 +3663,7 @@ const bi = ({
3664
3663
  renderText: b
3665
3664
  }
3666
3665
  ) })
3667
- ] }) : Bs ? /* @__PURE__ */ s(
3666
+ ] }) : js ? /* @__PURE__ */ s(
3668
3667
  bi,
3669
3668
  {
3670
3669
  groupPosition: ze,
@@ -3688,7 +3687,7 @@ const bi = ({
3688
3687
  isMyMessage: te
3689
3688
  }
3690
3689
  ),
3691
- qe && /* @__PURE__ */ s(hn, { poll: qe }),
3690
+ qe && /* @__PURE__ */ s(fn, { poll: qe }),
3692
3691
  U != null && U.length && !c.quoted_message ? /* @__PURE__ */ s(
3693
3692
  I,
3694
3693
  {
@@ -3713,7 +3712,7 @@ const bi = ({
3713
3712
  ] }) })
3714
3713
  }
3715
3714
  ),
3716
- !Us && !Mt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
3715
+ !Bs && !Mt && /* @__PURE__ */ u("div", { className: "str-chat__message-footer", children: [
3717
3716
  (!pe || At) && /* @__PURE__ */ s(
3718
3717
  Qe,
3719
3718
  {
@@ -3739,7 +3738,7 @@ const bi = ({
3739
3738
  reply_count: c.reply_count
3740
3739
  }
3741
3740
  ),
3742
- me && /* @__PURE__ */ s(Q, {})
3741
+ ue && /* @__PURE__ */ s(Q, {})
3743
3742
  ]
3744
3743
  },
3745
3744
  c.id
@@ -3747,7 +3746,7 @@ const bi = ({
3747
3746
  ] });
3748
3747
  }, xi = V.memo(
3749
3748
  vi,
3750
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Xs(e, t)
3749
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : Ks(e, t)
3751
3750
  ), wi = (e) => {
3752
3751
  const t = Ne("CustomMessage");
3753
3752
  return /* @__PURE__ */ s(xi, { ...t, ...e });
@@ -3755,32 +3754,32 @@ const bi = ({
3755
3754
  var n;
3756
3755
  const { handleDelete: e, message: t } = Ne("CustomMessageActions");
3757
3756
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
3758
- os,
3757
+ cs,
3759
3758
  {
3760
3759
  onClick: e,
3761
3760
  "aria-label": "Delete",
3762
3761
  title: "Delete",
3763
3762
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3764
- children: /* @__PURE__ */ s(Zn, { size: 16, weight: "light", "aria-hidden": !0 })
3763
+ children: /* @__PURE__ */ s(Jn, { size: 16, weight: "light", "aria-hidden": !0 })
3765
3764
  }
3766
3765
  );
3767
3766
  }, Ni = () => {
3768
3767
  const { handleFlag: e } = Ne("CustomMessageActions");
3769
3768
  return /* @__PURE__ */ s(
3770
- os,
3769
+ cs,
3771
3770
  {
3772
3771
  onClick: e,
3773
3772
  "aria-label": "Report",
3774
3773
  title: "Report",
3775
3774
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
3776
- children: /* @__PURE__ */ s(rs, { size: 16, weight: "light", "aria-hidden": !0 })
3775
+ children: /* @__PURE__ */ s(is, { size: 16, weight: "light", "aria-hidden": !0 })
3777
3776
  }
3778
3777
  );
3779
3778
  }, yi = () => {
3780
3779
  var t;
3781
3780
  const { message: e } = Ne("CustomMessageActions");
3782
3781
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ s(
3783
- ea,
3782
+ ta,
3784
3783
  {
3785
3784
  messageActionSet: [
3786
3785
  { Component: _i, placement: "quick", type: "delete" },
@@ -3833,7 +3832,7 @@ const bi = ({
3833
3832
  (t) => Yt.previewIsLoaded(t) || Yt.previewIsLoading(t)
3834
3833
  )
3835
3834
  }), Si = () => {
3836
- const { linkPreviewsManager: e } = fn(), { linkPreviews: t } = gn(
3835
+ const { linkPreviewsManager: e } = gn(), { linkPreviews: t } = pn(
3837
3836
  e.state,
3838
3837
  Ci
3839
3838
  ), n = (r) => {
@@ -3858,13 +3857,13 @@ const bi = ({
3858
3857
  "aria-label": "Send",
3859
3858
  disabled: t,
3860
3859
  onClick: e,
3861
- children: /* @__PURE__ */ s(Jn, { weight: "bold", className: "size-4" })
3860
+ children: /* @__PURE__ */ s(Qn, { weight: "bold", className: "size-4" })
3862
3861
  }
3863
3862
  ), Ii = () => {
3864
- const e = Te(It), { handleSubmit: t } = bn(), n = vn(), a = e || !n, {
3863
+ const e = Te(It), { handleSubmit: t } = vn(), n = xn(), a = e || !n, {
3865
3864
  SendButton: r = Ei,
3866
- AttachmentPreviewList: i = xn
3867
- } = as("CustomMessageInput");
3865
+ AttachmentPreviewList: i = wn
3866
+ } = rs("CustomMessageInput");
3868
3867
  return (
3869
3868
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
3870
3869
  // preview list inside is the scrollable region); the textarea + send row
@@ -3880,12 +3879,12 @@ const bi = ({
3880
3879
  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)]",
3881
3880
  "data-dd-privacy": "mask",
3882
3881
  children: [
3883
- /* @__PURE__ */ s(wn, {}),
3882
+ /* @__PURE__ */ s(_n, {}),
3884
3883
  /* @__PURE__ */ s(Si, {}),
3885
3884
  /* @__PURE__ */ s(i, {}),
3886
3885
  /* @__PURE__ */ u("div", { className: "flex shrink-0", children: [
3887
3886
  /* @__PURE__ */ s("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ s(
3888
- _n,
3887
+ Nn,
3889
3888
  {
3890
3889
  "aria-disabled": e || void 0,
3891
3890
  className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -3920,7 +3919,7 @@ const bi = ({
3920
3919
  composerInput: r
3921
3920
  }) => {
3922
3921
  var l;
3923
- const { channel: i } = ce(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
3922
+ const { channel: i } = oe(), o = ((l = i == null ? void 0 : i.data) == null ? void 0 : l.frozen) === !0;
3924
3923
  return n ? /* @__PURE__ */ u(se, { children: [
3925
3924
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: a ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: a }) : null }),
3926
3925
  t == null ? void 0 : t()
@@ -3933,7 +3932,7 @@ const bi = ({
3933
3932
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
3934
3933
  children: [
3935
3934
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
3936
- /* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(pn, { Input: r ?? Ii }) })
3935
+ /* @__PURE__ */ s(It.Provider, { value: o, children: /* @__PURE__ */ s(bn, { Input: r ?? Ii }) })
3937
3936
  ]
3938
3937
  }
3939
3938
  ),
@@ -3949,10 +3948,10 @@ const bi = ({
3949
3948
  "SYSTEM_AGE_SAFETY_BLOCKED"
3950
3949
  ], Li = {
3951
3950
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
3952
- }, tt = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", ts = (e) => Mi.includes(e), zi = (e) => Ri.includes(e), Fi = (e) => {
3951
+ }, tt = "age safety guidelines.", Di = "https://linktr.ee/s/about/contact", ss = (e) => Mi.includes(e), zi = (e) => Ri.includes(e), Fi = (e) => {
3953
3952
  var a;
3954
3953
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
3955
- if (ts(t))
3954
+ if (ss(t))
3956
3955
  return {
3957
3956
  kind: "dm-agent",
3958
3957
  type: t
@@ -3963,7 +3962,7 @@ const bi = ({
3963
3962
  type: t
3964
3963
  };
3965
3964
  const n = e.dm_agent_system_type;
3966
- if (ts(n))
3965
+ if (ss(n))
3967
3966
  return {
3968
3967
  kind: "dm-agent",
3969
3968
  type: n
@@ -4029,7 +4028,7 @@ const bi = ({
4029
4028
  "data-age-safety-system-type": n.type,
4030
4029
  children: [
4031
4030
  /* @__PURE__ */ s(
4032
- Qn,
4031
+ ea,
4033
4032
  {
4034
4033
  size: 24,
4035
4034
  weight: "duotone",
@@ -4053,7 +4052,7 @@ const bi = ({
4053
4052
  ] }),
4054
4053
  !t && /* @__PURE__ */ s(Xe, { message: e.message })
4055
4054
  ] });
4056
- }, Ds = ct(!1), st = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4055
+ }, zs = ct(!1), st = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4057
4056
  "animateTransform",
4058
4057
  {
4059
4058
  attributeName: "transform",
@@ -4069,11 +4068,11 @@ const bi = ({
4069
4068
  Ke.ExternalSources
4070
4069
  ]), Ui = ({ threadList: e }) => {
4071
4070
  var b, v;
4072
- const { channel: t, channelConfig: n, thread: a } = ce(), { client: r } = fe(), { typing: i = {} } = Nn(), { aiState: o } = yn(t), l = Te(Ds);
4071
+ const { channel: t, channelConfig: n, thread: a } = oe(), { client: r } = fe(), { typing: i = {} } = yn(), { aiState: o } = kn(t), l = Te(zs);
4073
4072
  if (!e && l && $i.has(o)) {
4074
4073
  const x = Bi(t, (b = r.user) == null ? void 0 : b.id);
4075
4074
  return /* @__PURE__ */ s(
4076
- ss,
4075
+ ns,
4077
4076
  {
4078
4077
  avatarId: (x == null ? void 0 : x.id) ?? "ai-agent",
4079
4078
  avatarName: (x == null ? void 0 : x.name) ?? (x == null ? void 0 : x.id) ?? "Agent",
@@ -4099,7 +4098,7 @@ const bi = ({
4099
4098
  return null;
4100
4099
  const g = (v = h[0]) == null ? void 0 : v.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4101
4100
  return /* @__PURE__ */ s(
4102
- ss,
4101
+ ns,
4103
4102
  {
4104
4103
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4105
4104
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4107,7 +4106,7 @@ const bi = ({
4107
4106
  testId: "typing-indicator"
4108
4107
  }
4109
4108
  );
4110
- }, ss = ({
4109
+ }, ns = ({
4111
4110
  avatarId: e,
4112
4111
  avatarName: t,
4113
4112
  avatarImage: n,
@@ -4228,7 +4227,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4228
4227
  renderHeaderTitleBadges: x
4229
4228
  }) => {
4230
4229
  var E, I, T, M, P, $;
4231
- const { channel: p } = ce(), { client: _ } = fe(), w = V.useMemo(
4230
+ const { channel: p } = oe(), { client: _ } = fe(), w = V.useMemo(
4232
4231
  () => {
4233
4232
  var j;
4234
4233
  return He(
@@ -4524,7 +4523,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4524
4523
  composerInput: L
4525
4524
  }) => {
4526
4525
  var N, A, H, q;
4527
- const { channel: C } = ce(), { client: E } = fe(), I = V.useMemo(
4526
+ const { channel: C } = oe(), { client: E } = fe(), I = V.useMemo(
4528
4527
  () => {
4529
4528
  var Y;
4530
4529
  return He(
@@ -4538,13 +4537,13 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4538
4537
  var W;
4539
4538
  const Y = E == null ? void 0 : E.userID;
4540
4539
  return Y ? Object.values(((W = C.state) == null ? void 0 : W.members) || {}).find((Z) => {
4541
- var ue;
4542
- return ((ue = Z.user) == null ? void 0 : ue.id) === Y;
4540
+ var de;
4541
+ return ((de = Z.user) == null ? void 0 : de.id) === Y;
4543
4542
  }) : void 0;
4544
4543
  }, [E == null ? void 0 : E.userID, (A = C.state) == null ? void 0 : A.members]), M = ((H = T == null ? void 0 : T.user) == null ? void 0 : H.is_account) ?? (T == null ? void 0 : T.is_account), P = ((q = I == null ? void 0 : I.user) == null ? void 0 : q.is_account) ?? (I == null ? void 0 : I.is_account), $ = S && M === !1 && P === !0, j = C.state.messages.some(
4545
4544
  (Y) => Y.type !== "deleted"
4546
4545
  ), Q = p ? /* @__PURE__ */ s(V.Fragment, { children: p() }, "lt-channel-banner") : null, ee = F ? /* @__PURE__ */ s(
4547
- ga,
4546
+ pa,
4548
4547
  {
4549
4548
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4550
4549
  onBack: e,
@@ -4579,15 +4578,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4579
4578
  [x, D, R]
4580
4579
  );
4581
4580
  return /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
4582
- Cn,
4581
+ Sn,
4583
4582
  {
4584
4583
  overrides: {
4585
4584
  Message: X,
4586
4585
  MessageActions: yi,
4587
- UnreadMessagesNotification: () => null,
4588
4586
  UnreadMessagesSeparator: () => null
4589
4587
  },
4590
- children: /* @__PURE__ */ u(Sn, { children: [
4588
+ children: /* @__PURE__ */ u(En, { children: [
4591
4589
  !F && /* @__PURE__ */ u(se, { children: [
4592
4590
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
4593
4591
  Gi,
@@ -4622,7 +4620,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4622
4620
  Q
4623
4621
  ] }) }),
4624
4622
  /* @__PURE__ */ s(
4625
- En,
4623
+ In,
4626
4624
  {
4627
4625
  head: F && j ? /* @__PURE__ */ u("div", { className: "sticky top-0 z-10", children: [
4628
4626
  ee,
@@ -4653,7 +4651,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4653
4651
  ] })
4654
4652
  }
4655
4653
  ) });
4656
- }, zs = V.memo(
4654
+ }, Fs = V.memo(
4657
4655
  ({
4658
4656
  channel: e,
4659
4657
  onBack: t,
@@ -4718,7 +4716,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4718
4716
  const N = (A) => {
4719
4717
  const H = A.target, q = H == null ? void 0 : H.closest("a[href]"), Y = q == null ? void 0 : q.getAttribute("href");
4720
4718
  if (!Y) return;
4721
- const U = q == null ? void 0 : q.closest("[data-message-id]"), W = U == null ? void 0 : U.getAttribute("data-message-id"), Z = W ? e.state.messages.find((ue) => ue.id === W) : void 0;
4719
+ const U = q == null ? void 0 : q.closest("[data-message-id]"), W = U == null ? void 0 : U.getAttribute("data-message-id"), Z = W ? e.state.messages.find((de) => de.id === W) : void 0;
4722
4720
  E(Y, Z);
4723
4721
  };
4724
4722
  return X.addEventListener("click", N), () => X.removeEventListener("click", N);
@@ -4730,14 +4728,14 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4730
4728
  "messaging-channel-view h-full flex flex-col",
4731
4729
  d
4732
4730
  ),
4733
- children: /* @__PURE__ */ s(Ds.Provider, { value: _ ?? !1, children: /* @__PURE__ */ s(
4734
- kn,
4731
+ children: /* @__PURE__ */ s(zs.Provider, { value: _ ?? !1, children: /* @__PURE__ */ s(
4732
+ Cn,
4735
4733
  {
4736
4734
  channel: e,
4737
4735
  MessageSystem: Oi,
4738
4736
  EmptyStateIndicator: m,
4739
4737
  LoadingIndicator: Ve,
4740
- DateSeparator: pa,
4738
+ DateSeparator: ba,
4741
4739
  TypingIndicator: Ui,
4742
4740
  doSendMessageRequest: Q,
4743
4741
  ...I ? { SendButton: I } : {},
@@ -4781,7 +4779,7 @@ const ve = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
4781
4779
  );
4782
4780
  }
4783
4781
  );
4784
- zs.displayName = "ChannelView";
4782
+ Fs.displayName = "ChannelView";
4785
4783
  const Ce = V.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ u("div", { className: "text-center max-w-sm", children: [
4786
4784
  /* @__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: "⚠️" }) }),
4787
4785
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -4830,7 +4828,7 @@ const bl = ({
4830
4828
  refreshConnection: C,
4831
4829
  service: E,
4832
4830
  debug: I
4833
- } = ta(), [T, M] = B(null), [P, $] = B(null), [j, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
4831
+ } = sa(), [T, M] = B(null), [P, $] = B(null), [j, Q] = B(!1), { showDeleteConversation: ee = !0 } = e, X = G(o);
4834
4832
  X.current = o;
4835
4833
  const N = G(a);
4836
4834
  N.current = a;
@@ -4869,8 +4867,8 @@ const bl = ({
4869
4867
  );
4870
4868
  return;
4871
4869
  }
4872
- const me = X.current;
4873
- if (!me || !E) {
4870
+ const ue = X.current;
4871
+ if (!ue || !E) {
4874
4872
  Z(), $("No conversation found with this account"), I && console.log(
4875
4873
  "[MessagingShell] No conversation found for:",
4876
4874
  i
@@ -4878,19 +4876,19 @@ const bl = ({
4878
4876
  return;
4879
4877
  }
4880
4878
  try {
4881
- const oe = await E.startChannelWithParticipant({
4882
- id: me.id,
4883
- name: me.name,
4884
- phone: me.phone
4879
+ const le = await E.startChannelWithParticipant({
4880
+ id: ue.id,
4881
+ name: ue.name,
4882
+ phone: ue.phone
4885
4883
  });
4886
- M(oe), $(null), (ze = N.current) == null || ze.call(N, oe), I && console.log(
4884
+ M(le), $(null), (ze = N.current) == null || ze.call(N, le), I && console.log(
4887
4885
  "[MessagingShell] Channel created and loaded:",
4888
- oe.id
4886
+ le.id
4889
4887
  );
4890
- } catch (oe) {
4888
+ } catch (le) {
4891
4889
  console.error(
4892
4890
  "[MessagingShell] Failed to create conversation:",
4893
- oe
4891
+ le
4894
4892
  ), Z(), $("Failed to create conversation");
4895
4893
  }
4896
4894
  } catch (ae) {
@@ -4914,7 +4912,7 @@ const bl = ({
4914
4912
  onBack: C
4915
4913
  }
4916
4914
  ) : P ? /* @__PURE__ */ s(Ce, { message: P }) : j && !T ? /* @__PURE__ */ s(Ce, { message: "Conversation ended" }) : T ? /* @__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(
4917
- zs,
4915
+ Fs,
4918
4916
  {
4919
4917
  channel: T,
4920
4918
  renderMessageInputActions: t,
@@ -4948,7 +4946,7 @@ function Yi(e) {
4948
4946
  for (const n of t)
4949
4947
  e.state.addMessageSorted(n.message);
4950
4948
  }
4951
- const Fs = V.createContext({
4949
+ const Ps = V.createContext({
4952
4950
  selectedChannel: void 0,
4953
4951
  onChannelSelect: () => {
4954
4952
  },
@@ -4956,7 +4954,7 @@ const Fs = V.createContext({
4956
4954
  renderMessagePreview: void 0,
4957
4955
  channelPreview: void 0,
4958
4956
  viewerLanguage: void 0
4959
- }), qi = Fs.Provider, Wi = () => V.useContext(Fs), Xi = (e, t) => {
4957
+ }), qi = Ps.Provider, Wi = () => V.useContext(Ps), Xi = (e, t) => {
4960
4958
  const n = new Date(
4961
4959
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
4962
4960
  ), r = new Date(
@@ -4977,7 +4975,7 @@ const Fs = V.createContext({
4977
4975
  day: "numeric",
4978
4976
  year: "2-digit"
4979
4977
  });
4980
- }, Ps = V.memo(
4978
+ }, Os = V.memo(
4981
4979
  (e) => {
4982
4980
  var O, F, L;
4983
4981
  const { channel: t, unread: n } = e, {
@@ -5017,7 +5015,7 @@ const Fs = V.createContext({
5017
5015
  }
5018
5016
  })(), w = (() => {
5019
5017
  var M;
5020
- const C = us({
5018
+ const C = ms({
5021
5019
  message: p,
5022
5020
  viewerLanguage: d
5023
5021
  }), { custom_type: E, attachment_content_type: I } = (p == null ? void 0 : p.metadata) || {};
@@ -5093,7 +5091,7 @@ const Fs = V.createContext({
5093
5091
  );
5094
5092
  }
5095
5093
  );
5096
- Ps.displayName = "CustomChannelPreview";
5094
+ Os.displayName = "CustomChannelPreview";
5097
5095
  const Zi = { last_message_at: -1 }, Ji = V.memo(
5098
5096
  ({
5099
5097
  onChannelSelect: e,
@@ -5104,7 +5102,7 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5104
5102
  sort: i = Zi,
5105
5103
  className: o,
5106
5104
  customEmptyStateIndicator: l,
5107
- channelListPaginator: d = Tn,
5105
+ channelListPaginator: d = Mn,
5108
5106
  channelPreview: m,
5109
5107
  renderMessagePreview: f,
5110
5108
  viewerLanguage: h,
@@ -5156,7 +5154,7 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5156
5154
  o
5157
5155
  ),
5158
5156
  children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(qi, { value: D, children: /* @__PURE__ */ s(
5159
- In,
5157
+ Tn,
5160
5158
  {
5161
5159
  filters: n,
5162
5160
  sort: i,
@@ -5170,7 +5168,7 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5170
5168
  onAddedToChannel: x,
5171
5169
  onChannelUpdated: p,
5172
5170
  Paginator: d,
5173
- Preview: Ps,
5171
+ Preview: Os,
5174
5172
  EmptyStateIndicator: l
5175
5173
  },
5176
5174
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5180,7 +5178,7 @@ const Zi = { last_message_at: -1 }, Ji = V.memo(
5180
5178
  }
5181
5179
  );
5182
5180
  Ji.displayName = "ChannelList";
5183
- const ns = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Qi = {
5181
+ const as = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Qi = {
5184
5182
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5185
5183
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5186
5184
  }, el = ({ variant: e }) => /* @__PURE__ */ s(
@@ -5194,8 +5192,8 @@ const ns = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5194
5192
  transform: e === "received" ? "scaleX(-1)" : void 0,
5195
5193
  transformOrigin: "center",
5196
5194
  backgroundColor: Qi[e],
5197
- WebkitMask: ns,
5198
- mask: ns
5195
+ WebkitMask: as,
5196
+ mask: as
5199
5197
  }
5200
5198
  }
5201
5199
  ), tl = {
@@ -5207,7 +5205,7 @@ const ns = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5207
5205
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5208
5206
  color: "var(--str-chat__message-bubble-color, #000000)"
5209
5207
  }
5210
- }, Os = ({
5208
+ }, $s = ({
5211
5209
  variant: e,
5212
5210
  text: t,
5213
5211
  tail: n = !0,
@@ -5239,7 +5237,7 @@ const ns = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5239
5237
  header: n,
5240
5238
  className: a
5241
5239
  }) => /* @__PURE__ */ s(
5242
- Os,
5240
+ $s,
5243
5241
  {
5244
5242
  variant: "received",
5245
5243
  text: e,
@@ -5247,7 +5245,7 @@ const ns = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5247
5245
  header: n,
5248
5246
  className: a
5249
5247
  }
5250
- ), nl = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Os, { variant: "sent", text: e, tail: t, className: n }), vl = {
5248
+ ), nl = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s($s, { variant: "sent", text: e, tail: t, className: n }), vl = {
5251
5249
  Sent: nl,
5252
5250
  Received: sl
5253
5251
  }, al = ({
@@ -5315,24 +5313,24 @@ const ns = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5315
5313
  ] }) });
5316
5314
  };
5317
5315
  export {
5318
- hs as A,
5316
+ fs as A,
5319
5317
  pt as B,
5320
5318
  ji as C,
5321
5319
  mt as D,
5322
5320
  pl as E,
5323
5321
  xl as F,
5324
5322
  Or as G,
5325
- va as H,
5326
- ta as I,
5327
- Zt as L,
5323
+ xa as H,
5324
+ sa as I,
5325
+ Jt as L,
5328
5326
  fl as M,
5329
5327
  ye as a,
5330
5328
  ne as b,
5331
5329
  Ji as c,
5332
- zs as d,
5330
+ Fs as d,
5333
5331
  gl as e,
5334
5332
  al as f,
5335
- de as g,
5333
+ ce as g,
5336
5334
  Pe as h,
5337
5335
  ke as i,
5338
5336
  vl as j,
@@ -5340,17 +5338,17 @@ export {
5340
5338
  hl as l,
5341
5339
  bl as m,
5342
5340
  sr as n,
5343
- ie as o,
5341
+ he as o,
5344
5342
  Qa as p,
5345
5343
  Ki as q,
5346
5344
  _e as r,
5347
5345
  tr as s,
5348
- us as t,
5349
- ps as u,
5350
- ra as v,
5346
+ ms as t,
5347
+ bs as u,
5348
+ ia as v,
5351
5349
  Ya as w,
5352
- xa as x,
5350
+ wa as x,
5353
5351
  He as y,
5354
5352
  gt as z
5355
5353
  };
5356
- //# sourceMappingURL=index-D9_M5IWl.js.map
5354
+ //# sourceMappingURL=index-FDgJhTIG.js.map