@linktr.ee/messaging-react 4.2.0-rc-1787181113 → 4.2.0-rc-1787239893

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,26 +1,26 @@
1
1
  import { jsx as n, jsxs as f, Fragment as Q } from "react/jsx-runtime";
2
- import F, { createContext as Re, useMemo as re, useContext as ge, useCallback as J, useState as B, useRef as V, useEffect as X, useId as cs, Suspense as ds } from "react";
3
- import { StreamChatService as us } from "@linktr.ee/messaging-core";
4
- import { StreamChat as ms, LinkPreviewsManager as st } from "stream-chat";
5
- import { Chat as hs, useChannelStateContext as _e, useChatContext as Ye, DateSeparator as fs, useMessageContext as pe, MessageStatus as gs, MessageErrorIcon as at, MessageText as Ue, areMessageUIPropsEqual as ps, useMessageReminder as bs, useComponentContext as gn, Attachment as vs, EditMessageModal as xs, MessageBlocked as ws, MessageBouncePrompt as _s, MessageDeleted as ys, MessageIsThreadReplyInChannelButtonIndicator as Ns, MessageRepliesCountButton as ks, ReminderNotification as Cs, StreamedMessageText as Ss, messageHasAttachments as Es, messageHasReactions as Is, isDateSeparatorMessage as Ts, isMessageBlocked as As, isMessageBounced as Rs, MessageBounceModal as Ls, Poll as Ms, useMessageComposer as Ds, useStateStore as Os, MessageInput as Yt, useMessageInputContext as Ps, useMessageComposerHasSendableData as Fs, AttachmentPreviewList as zs, QuotedMessagePreview as Bs, TextareaComposer as $s, MessageTimestamp as Ze, AIStates as Je, useTypingContext as Us, useAIState as js, Channel as Hs, WithComponents as Vs, Window as Gs, MessageList as Wt, ChannelList as Ys, InfiniteScroll as Ws } from "stream-chat-react";
6
- import { isOfficialChannel as pn, OFFICIAL_SENDER_USER_ID as Ks, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as Kt, isAgeSafetySystemType as Xs, resolveRichCardImagePresentation as qs, selectEnabledFaqs as Zs } from "@linktr.ee/messaging-taxonomy";
2
+ import F, { createContext as Re, useMemo as re, useContext as ge, useCallback as J, useState as B, useRef as V, useEffect as X, useId as ds, Suspense as us } from "react";
3
+ import { StreamChatService as ms } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as hs, LinkPreviewsManager as st } from "stream-chat";
5
+ import { Chat as fs, useChannelStateContext as _e, useChatContext as Ye, DateSeparator as gs, useMessageContext as pe, MessageStatus as ps, MessageErrorIcon as at, MessageText as Ue, areMessageUIPropsEqual as bs, useMessageReminder as vs, useComponentContext as gn, Attachment as xs, EditMessageModal as ws, MessageBlocked as _s, MessageBouncePrompt as ys, MessageDeleted as Ns, MessageIsThreadReplyInChannelButtonIndicator as ks, MessageRepliesCountButton as Cs, ReminderNotification as Ss, StreamedMessageText as Es, messageHasAttachments as Is, messageHasReactions as Ts, isDateSeparatorMessage as As, isMessageBlocked as Rs, isMessageBounced as Ls, MessageBounceModal as Ms, Poll as Ds, useMessageComposer as Os, useStateStore as Ps, MessageInput as Yt, useMessageInputContext as Fs, useMessageComposerHasSendableData as zs, AttachmentPreviewList as Bs, QuotedMessagePreview as $s, TextareaComposer as Us, MessageTimestamp as Ze, AIStates as Je, useTypingContext as js, useAIState as Hs, Channel as Vs, WithComponents as Gs, Window as Ys, MessageList as Wt, ChannelList as Ws, InfiniteScroll as Ks } from "stream-chat-react";
6
+ import { isOfficialChannel as pn, OFFICIAL_SENDER_USER_ID as Xs, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as Kt, isAgeSafetySystemType as qs, resolveRichCardImagePresentation as Zs, selectEnabledFaqs as Js } from "@linktr.ee/messaging-taxonomy";
7
7
  import k from "classnames";
8
- import { StarIcon as rt, DotsThreeIcon as Js, SpinnerGapIcon as ze, SignOutIcon as Qs, ProhibitInsetIcon as Xt, FlagIcon as bn, CurrencyDollarIcon as ea, CaretRightIcon as vn, ArrowLeftIcon as ta, FileIcon as xn, ImageIcon as na, SpeakerHighIcon as sa, VideoCameraIcon as wn, FileMdIcon as aa, FileTextIcon as ra, FileZipIcon as ia, FilePptIcon as oa, FileCsvIcon as la, FileXlsIcon as ca, FileDocIcon as da, FilePdfIcon as ua, CircleNotchIcon as xe, PlayIcon as it, PauseIcon as ma, LinkIcon as ha, DownloadSimpleIcon as Ie, GiftIcon as fa, WarningCircleIcon as ga, MegaphoneIcon as pa, ChecksIcon as ba, XIcon as lt, PencilSimpleIcon as va, CaretLeftIcon as xa, TrashSimpleIcon as wa, ArrowUpIcon as _a, SparkleIcon as ya, ProhibitIcon as Na } from "@phosphor-icons/react";
9
- import { MessageActions as ka, DefaultDropdownActionButton as _n } from "stream-chat-react/experimental";
8
+ import { StarIcon as rt, DotsThreeIcon as Qs, SpinnerGapIcon as ze, SignOutIcon as ea, ProhibitInsetIcon as Xt, FlagIcon as bn, CurrencyDollarIcon as ta, CaretRightIcon as vn, ArrowLeftIcon as na, FileIcon as xn, ImageIcon as sa, SpeakerHighIcon as aa, VideoCameraIcon as wn, FileMdIcon as ra, FileTextIcon as ia, FileZipIcon as oa, FilePptIcon as la, FileCsvIcon as ca, FileXlsIcon as da, FileDocIcon as ua, FilePdfIcon as ma, CircleNotchIcon as xe, PlayIcon as it, PauseIcon as ha, LinkIcon as fa, DownloadSimpleIcon as Ie, GiftIcon as ga, WarningCircleIcon as pa, MegaphoneIcon as ba, ChecksIcon as va, XIcon as lt, PencilSimpleIcon as xa, CaretLeftIcon as wa, TrashSimpleIcon as _a, ArrowUpIcon as ya, SparkleIcon as Na, ProhibitIcon as ka } from "@phosphor-icons/react";
9
+ import { MessageActions as Ca, DefaultDropdownActionButton as _n } from "stream-chat-react/experimental";
10
10
  const Se = {
11
11
  debug: (e, ...t) => console.log(e, ...t),
12
12
  info: (e, ...t) => console.log(e, ...t),
13
13
  warn: (e, ...t) => console.warn(e, ...t),
14
14
  error: (e, ...t) => console.error(e, ...t)
15
- }, Ca = (e) => ({
15
+ }, yn = (e) => ({
16
16
  debug: (e == null ? void 0 : e.debug) ?? Se.debug,
17
17
  info: (e == null ? void 0 : e.info) ?? Se.info,
18
18
  warn: (e == null ? void 0 : e.warn) ?? Se.warn,
19
19
  error: (e == null ? void 0 : e.error) ?? Se.error
20
- }), yn = Re(Se), Sa = ({ logger: e, children: t }) => {
21
- const s = re(() => Ca(e), [e]);
22
- return /* @__PURE__ */ n(yn.Provider, { value: s, children: t });
23
- }, ll = () => ge(yn), Nn = Re({
20
+ }), Nn = Re(Se), Sa = ({ logger: e, children: t }) => {
21
+ const s = re(() => yn(e), [e]);
22
+ return /* @__PURE__ */ n(Nn.Provider, { value: s, children: t });
23
+ }, ll = () => ge(Nn), kn = Re({
24
24
  service: null,
25
25
  client: null,
26
26
  isConnected: !1,
@@ -30,7 +30,7 @@ const Se = {
30
30
  refreshConnection: async () => {
31
31
  },
32
32
  debug: !1
33
- }), ct = () => ge(Nn), cl = ({
33
+ }), ct = () => ge(kn), cl = ({
34
34
  children: e,
35
35
  user: t,
36
36
  serviceConfig: s,
@@ -81,7 +81,7 @@ const Se = {
81
81
  capabilities: r
82
82
  };
83
83
  const A = V(null);
84
- !o && a && ((O = A.current) == null ? void 0 : O.apiKey) !== a && (A.current = { apiKey: a, client: new ms(a) });
84
+ !o && a && ((O = A.current) == null ? void 0 : O.apiKey) !== a && (A.current = { apiKey: a, client: new hs(a) });
85
85
  const C = o || (a ? ((j = A.current) == null ? void 0 : j.client) ?? null : null);
86
86
  X(() => {
87
87
  const z = $.current, P = I.current;
@@ -100,13 +100,14 @@ const Se = {
100
100
  renderCount: z,
101
101
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
102
102
  });
103
- const q = new us({
103
+ const q = new ms({
104
104
  ...P,
105
105
  apiKey: a,
106
106
  debug: M.current,
107
107
  client: C,
108
108
  // An explicit serviceConfig.logger wins — existing injectors keep working.
109
- ...P.logger || !T.current ? {} : { logger: T.current }
109
+ // Resolved, because the service swaps its console defaults out wholesale.
110
+ ...P.logger || !T.current ? {} : { logger: yn(T.current) }
110
111
  });
111
112
  _.current = q, h(q), d("✅ SERVICE SET", {
112
113
  renderCount: z,
@@ -233,8 +234,8 @@ const Se = {
233
234
  renderCount: $.current,
234
235
  willRenderChat: !!C,
235
236
  contextValueReady: !!S
236
- }), /* @__PURE__ */ n(Sa, { logger: c, children: /* @__PURE__ */ n(Nn.Provider, { value: S, children: C ? /* @__PURE__ */ n(
237
- hs,
237
+ }), /* @__PURE__ */ n(Sa, { logger: c, children: /* @__PURE__ */ n(kn.Provider, { value: S, children: C ? /* @__PURE__ */ n(
238
+ fs,
238
239
  {
239
240
  client: C,
240
241
  customClasses: {
@@ -243,7 +244,7 @@ const Se = {
243
244
  children: e
244
245
  }
245
246
  ) : e }) });
246
- }, Ea = () => ct(), kn = (e) => {
247
+ }, Ea = () => ct(), Cn = (e) => {
247
248
  var a, r;
248
249
  const [t, s] = B(
249
250
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -266,13 +267,13 @@ const Se = {
266
267
  };
267
268
  }, [e]), t;
268
269
  };
269
- function Cn(e, t, s) {
270
+ function Sn(e, t, s) {
270
271
  const a = Object.values(e || {});
271
272
  if (pn(s)) {
272
273
  const r = a.find(
273
274
  (i) => {
274
275
  var o;
275
- return ((o = i.user) == null ? void 0 : o.id) === Ks;
276
+ return ((o = i.user) == null ? void 0 : o.id) === Xs;
276
277
  }
277
278
  );
278
279
  if (r) return r;
@@ -292,7 +293,7 @@ function qt(e, t) {
292
293
  const s = e == null ? void 0 : e.trim();
293
294
  return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !Ta(s);
294
295
  }
295
- function Sn(e) {
296
+ function En(e) {
296
297
  return qt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : qt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
297
298
  }
298
299
  const Zt = [
@@ -331,14 +332,14 @@ function Aa(e) {
331
332
  }
332
333
  return Math.abs(t);
333
334
  }
334
- function En(e) {
335
+ function In(e) {
335
336
  return Zt[Aa(e) % Zt.length];
336
337
  }
337
338
  function Ra(e) {
338
- return En(e).emoji;
339
+ return In(e).emoji;
339
340
  }
340
341
  function La(e) {
341
- return En(e).bgColor;
342
+ return In(e).bgColor;
342
343
  }
343
344
  const ye = ({
344
345
  id: e,
@@ -518,7 +519,7 @@ const ye = ({
518
519
  customChannelActions: h,
519
520
  triggerClassName: m
520
521
  }) => {
521
- const [g, l] = B(!1), v = V(null), w = cs(), b = J(() => l(!1), []), {
522
+ const [g, l] = B(!1), v = V(null), w = ds(), b = J(() => l(!1), []), {
522
523
  isParticipantBlocked: x,
523
524
  isCheckingBlockedStatus: p,
524
525
  isLeaving: y,
@@ -561,7 +562,7 @@ const ye = ({
561
562
  "aria-controls": g ? w : void 0,
562
563
  onClick: () => l((A) => !A),
563
564
  children: [
564
- /* @__PURE__ */ n(Js, { className: "size-5 text-black/90" }),
565
+ /* @__PURE__ */ n(Qs, { className: "size-5 text-black/90" }),
565
566
  /* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
566
567
  ]
567
568
  }
@@ -583,7 +584,7 @@ const ye = ({
583
584
  disabled: y,
584
585
  "aria-busy": y,
585
586
  children: [
586
- y ? /* @__PURE__ */ n(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Qs, { className: "h-5 w-5" }),
587
+ y ? /* @__PURE__ */ n(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ea, { className: "h-5 w-5" }),
587
588
  /* @__PURE__ */ n("span", { children: "Delete Conversation" })
588
589
  ]
589
590
  }
@@ -649,14 +650,14 @@ const ye = ({
649
650
  const { channel: b } = _e(), { client: x } = Ye(), p = F.useMemo(
650
651
  () => {
651
652
  var O;
652
- return Cn(
653
+ return Sn(
653
654
  (O = b.state) == null ? void 0 : O.members,
654
655
  x == null ? void 0 : x.userID,
655
656
  b.type
656
657
  );
657
658
  },
658
659
  [(C = b.state) == null ? void 0 : C.members, x == null ? void 0 : x.userID, b.type]
659
- ), y = Sn(p == null ? void 0 : p.user), _ = (R = p == null ? void 0 : p.user) == null ? void 0 : R.image, I = kn(b), M = Fa((E = b.data) == null ? void 0 : E.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, T = a && I, D = M || T || !!w, $ = async () => {
660
+ ), y = En(p == null ? void 0 : p.user), _ = (R = p == null ? void 0 : p.user) == null ? void 0 : R.image, I = Cn(b), M = Fa((E = b.data) == null ? void 0 : E.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, T = a && I, D = M || T || !!w, $ = async () => {
660
661
  try {
661
662
  I ? await b.unpin() : await b.pin();
662
663
  } catch (O) {
@@ -692,7 +693,7 @@ const ye = ({
692
693
  {
693
694
  "aria-label": "Paid customer",
694
695
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
695
- children: /* @__PURE__ */ n(ea, { className: "size-2.5", weight: "bold" })
696
+ children: /* @__PURE__ */ n(ta, { className: "size-2.5", weight: "bold" })
696
697
  }
697
698
  ),
698
699
  T && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
@@ -735,7 +736,7 @@ const ye = ({
735
736
  }),
736
737
  type: "button",
737
738
  "aria-label": "Back to conversations",
738
- children: /* @__PURE__ */ n(ta, { className: "size-5 text-black/90" })
739
+ children: /* @__PURE__ */ n(na, { className: "size-5 text-black/90" })
739
740
  }
740
741
  ) }),
741
742
  /* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
@@ -790,11 +791,11 @@ const ye = ({
790
791
  ] })
791
792
  }
792
793
  );
793
- }, Ba = (e) => /* @__PURE__ */ n(fs, { ...e, position: "center" });
794
+ }, Ba = (e) => /* @__PURE__ */ n(gs, { ...e, position: "center" });
794
795
  function $a(e) {
795
796
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
796
797
  }
797
- function In({
798
+ function Tn({
798
799
  message: e,
799
800
  viewerLanguage: t
800
801
  }) {
@@ -836,7 +837,7 @@ const Va = [
836
837
  function ue(e) {
837
838
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
838
839
  }
839
- function Tn(e) {
840
+ function An(e) {
840
841
  const t = Va.find(
841
842
  ([s]) => s.test(e)
842
843
  );
@@ -844,23 +845,23 @@ function Tn(e) {
844
845
  }
845
846
  const Ga = {
846
847
  video: wn,
847
- audio: sa,
848
- image: na,
848
+ audio: aa,
849
+ image: sa,
849
850
  document: xn
850
851
  }, Ya = {
851
- pdf: ua,
852
- doc: da,
853
- xls: ca,
854
- csv: la,
855
- ppt: oa,
856
- zip: ia,
857
- text: ra,
858
- markdown: aa,
852
+ pdf: ma,
853
+ doc: ua,
854
+ xls: da,
855
+ csv: ca,
856
+ ppt: la,
857
+ zip: oa,
858
+ text: ia,
859
+ markdown: ra,
859
860
  generic: xn
860
861
  };
861
862
  function Wa(e) {
862
863
  const t = ue(e);
863
- return t !== "document" ? Ga[t] : Ya[Tn(e)];
864
+ return t !== "document" ? Ga[t] : Ya[An(e)];
864
865
  }
865
866
  function we(e, t) {
866
867
  return F.createElement(Wa(e), t);
@@ -1069,7 +1070,7 @@ const Ka = (e) => {
1069
1070
  },
1070
1071
  className: "shrink-0 text-white",
1071
1072
  "aria-label": w ? "Pause" : "Play",
1072
- children: w ? /* @__PURE__ */ n(ma, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(it, { className: "size-5 translate-x-px", weight: "fill" })
1073
+ children: w ? /* @__PURE__ */ n(ha, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(it, { className: "size-5 translate-x-px", weight: "fill" })
1073
1074
  }
1074
1075
  ),
1075
1076
  /* @__PURE__ */ f(
@@ -1117,7 +1118,7 @@ const Ka = (e) => {
1117
1118
  ]
1118
1119
  }
1119
1120
  );
1120
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", qa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", An = ({
1121
+ }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", qa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Rn = ({
1121
1122
  mimeType: e,
1122
1123
  sourceUrl: t,
1123
1124
  thumbnailUrl: s,
@@ -1197,7 +1198,7 @@ const Ka = (e) => {
1197
1198
  })
1198
1199
  }
1199
1200
  );
1200
- }, Rn = ({
1201
+ }, Ln = ({
1201
1202
  variant: e,
1202
1203
  thumbnail: t,
1203
1204
  title: s,
@@ -1263,7 +1264,7 @@ const Ka = (e) => {
1263
1264
  }
1264
1265
  );
1265
1266
  };
1266
- function Ln(e) {
1267
+ function Mn(e) {
1267
1268
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1268
1269
  }
1269
1270
  function dt(e) {
@@ -1297,7 +1298,7 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1297
1298
  "div",
1298
1299
  {
1299
1300
  className: `aspect-video w-full rounded-[20px] ${Za(t)} flex items-center justify-center`,
1300
- children: /* @__PURE__ */ n(ha, { className: `size-12 ${tr(t)}` })
1301
+ children: /* @__PURE__ */ n(fa, { className: `size-12 ${tr(t)}` })
1301
1302
  }
1302
1303
  ) }),
1303
1304
  /* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
@@ -1409,16 +1410,16 @@ function ht(e) {
1409
1410
  thumbnailUrl: h
1410
1411
  };
1411
1412
  }
1412
- const Mn = ({
1413
+ const Dn = ({
1413
1414
  resolvedUrl: e,
1414
1415
  resolvedType: t,
1415
1416
  title: s,
1416
1417
  fileSize: a,
1417
1418
  thumbnailUrl: r
1418
1419
  }) => {
1419
- const i = a !== void 0 ? Ln(a) : void 0;
1420
+ const i = a !== void 0 ? Mn(a) : void 0;
1420
1421
  return /* @__PURE__ */ n(
1421
- Rn,
1422
+ Ln,
1422
1423
  {
1423
1424
  variant: "dark",
1424
1425
  title: s,
@@ -1426,7 +1427,7 @@ const Mn = ({
1426
1427
  mimeType: t,
1427
1428
  detail: i,
1428
1429
  thumbnail: /* @__PURE__ */ n(
1429
- An,
1430
+ Rn,
1430
1431
  {
1431
1432
  mimeType: t,
1432
1433
  sourceUrl: e,
@@ -1437,23 +1438,23 @@ const Mn = ({
1437
1438
  )
1438
1439
  }
1439
1440
  );
1440
- }, Dn = ({
1441
+ }, On = ({
1441
1442
  resolvedUrl: e,
1442
1443
  resolvedType: t,
1443
1444
  title: s,
1444
1445
  fileSize: a,
1445
1446
  thumbnailUrl: r
1446
1447
  }) => {
1447
- const i = ue(t), o = a !== void 0 ? Ln(a) : void 0;
1448
+ const i = ue(t), o = a !== void 0 ? Mn(a) : void 0;
1448
1449
  return /* @__PURE__ */ n(
1449
- Rn,
1450
+ Ln,
1450
1451
  {
1451
1452
  variant: "light",
1452
1453
  title: s,
1453
1454
  mimeType: t,
1454
1455
  detail: o,
1455
1456
  thumbnail: /* @__PURE__ */ n(
1456
- An,
1457
+ Rn,
1457
1458
  {
1458
1459
  mimeType: t,
1459
1460
  sourceUrl: e,
@@ -1503,7 +1504,7 @@ const Mn = ({
1503
1504
  attachment: s,
1504
1505
  isMyMessage: t
1505
1506
  }
1506
- ) }) : t ? /* @__PURE__ */ n(Mn, { ...a }) : /* @__PURE__ */ n(Dn, { ...a })
1507
+ ) }) : t ? /* @__PURE__ */ n(Dn, { ...a }) : /* @__PURE__ */ n(On, { ...a })
1507
1508
  }
1508
1509
  ) })
1509
1510
  }
@@ -1516,7 +1517,7 @@ const Mn = ({
1516
1517
  if (t)
1517
1518
  return /* @__PURE__ */ n("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ut, { attachment: t, isMyMessage: !0 }) });
1518
1519
  const s = ht(e);
1519
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Mn, { ...s }) }) : null;
1520
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Dn, { ...s }) }) : null;
1520
1521
  }, ir = ({
1521
1522
  message: e
1522
1523
  }) => {
@@ -1524,7 +1525,7 @@ const Mn = ({
1524
1525
  if (t)
1525
1526
  return /* @__PURE__ */ n("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(ut, { attachment: t, isMyMessage: !1 }) });
1526
1527
  const s = ht(e);
1527
- return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(Dn, { ...s }) }) : null;
1528
+ return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(On, { ...s }) }) : null;
1528
1529
  }, dl = Object.assign(ar, {
1529
1530
  Creator: rr,
1530
1531
  Visitor: ir
@@ -1532,17 +1533,17 @@ const Mn = ({
1532
1533
  isUnlocking: () => !1
1533
1534
  }, lr = {
1534
1535
  LockedAttachment: or
1535
- }, On = Re({}), ul = On.Provider;
1536
+ }, Pn = Re({}), ul = Pn.Provider;
1536
1537
  function cr(e) {
1537
- return ge(On)[e] ?? lr[e];
1538
+ return ge(Pn)[e] ?? lr[e];
1538
1539
  }
1539
- const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import("./Card-BOudQBd6.js")), mr = () => /* @__PURE__ */ n(
1540
+ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import("./Card-pnqpS46t.js")), mr = () => /* @__PURE__ */ n(
1540
1541
  "div",
1541
1542
  {
1542
1543
  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)]",
1543
1544
  "aria-hidden": !0
1544
1545
  }
1545
- ), Be = (e) => /* @__PURE__ */ n(ds, { fallback: /* @__PURE__ */ n(mr, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(dr, { ...e }) : /* @__PURE__ */ n(ur, { ...e }) }), hr = ({ size: e = 15 }) => /* @__PURE__ */ n(
1546
+ ), Be = (e) => /* @__PURE__ */ n(us, { fallback: /* @__PURE__ */ n(mr, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(dr, { ...e }) : /* @__PURE__ */ n(ur, { ...e }) }), hr = ({ size: e = 15 }) => /* @__PURE__ */ n(
1546
1547
  "svg",
1547
1548
  {
1548
1549
  width: e,
@@ -1559,7 +1560,7 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1559
1560
  }
1560
1561
  )
1561
1562
  }
1562
- ), Pn = (e) => {
1563
+ ), Fn = (e) => {
1563
1564
  var t;
1564
1565
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
1565
1566
  }, je = (e) => {
@@ -1576,20 +1577,20 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1576
1577
  return ft(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
1577
1578
  }, pr = (e) => {
1578
1579
  var t;
1579
- return Pn(e) && !!((t = e.metadata) != null && t.amount_text);
1580
+ return Fn(e) && !!((t = e.metadata) != null && t.amount_text);
1580
1581
  }, en = ({
1581
1582
  message: e,
1582
1583
  isMyMessage: t = !1,
1583
1584
  hasAttachment: s = !1
1584
1585
  }) => {
1585
1586
  var m;
1586
- const a = Pn(e), r = je(e);
1587
+ const a = Fn(e), r = je(e);
1587
1588
  if (!a && !r)
1588
1589
  return null;
1589
1590
  if (a) {
1590
1591
  const g = (m = e.metadata) == null ? void 0 : m.amount_text;
1591
1592
  return g ? /* @__PURE__ */ f("div", { className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]", children: [
1592
- /* @__PURE__ */ n(fa, { size: 12 }),
1593
+ /* @__PURE__ */ n(ga, { size: 12 }),
1593
1594
  /* @__PURE__ */ f("span", { children: [
1594
1595
  "Delivered with ",
1595
1596
  g,
@@ -1630,7 +1631,7 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1630
1631
  mask: tn
1631
1632
  }
1632
1633
  }
1633
- ), Fn = Re(
1634
+ ), zn = Re(
1634
1635
  void 0
1635
1636
  ), vr = (e) => {
1636
1637
  var s;
@@ -1668,7 +1669,7 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1668
1669
  }, _r = (e, t) => {
1669
1670
  const s = xr(e, t), [a, r] = B(s);
1670
1671
  return wr(a, s) ? a : (r(s), s);
1671
- }, zn = (e) => {
1672
+ }, Bn = (e) => {
1672
1673
  var t;
1673
1674
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.TIP;
1674
1675
  }, yr = ({ message: e }) => {
@@ -1699,7 +1700,7 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1699
1700
  })();
1700
1701
  return e.id === s;
1701
1702
  }, $e = () => gt() ? /* @__PURE__ */ f(Q, { children: [
1702
- /* @__PURE__ */ n(ba, { weight: "bold", "aria-hidden": "true" }),
1703
+ /* @__PURE__ */ n(va, { weight: "bold", "aria-hidden": "true" }),
1703
1704
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
1704
1705
  ] }) : null, Nr = () => gt() ? /* @__PURE__ */ f(Q, { children: [
1705
1706
  /* @__PURE__ */ n(
@@ -1716,7 +1717,7 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1716
1717
  onOutboundClick: t
1717
1718
  }) => {
1718
1719
  const s = e.name || "Broadcast", r = /* @__PURE__ */ f(Q, { children: [
1719
- /* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(pa, { weight: "fill" }) }),
1720
+ /* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ba, { weight: "fill" }) }),
1720
1721
  /* @__PURE__ */ n(
1721
1722
  "span",
1722
1723
  {
@@ -1739,7 +1740,7 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1739
1740
  }
1740
1741
  ) : r;
1741
1742
  }, Cr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
1742
- /* @__PURE__ */ n(ga, { weight: "bold", "aria-hidden": "true" }),
1743
+ /* @__PURE__ */ n(pa, { weight: "bold", "aria-hidden": "true" }),
1743
1744
  /* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
1744
1745
  ] }), Sr = ({
1745
1746
  onOutboundClick: e,
@@ -1762,12 +1763,12 @@ const dr = F.lazy(() => import("./Card-BzvDr-pU.js")), ur = F.lazy(() => import(
1762
1763
  onOutboundClick: e
1763
1764
  }
1764
1765
  ) : null, u = pr(a) ? null : /* @__PURE__ */ n(
1765
- gs,
1766
+ ps,
1766
1767
  {
1767
1768
  MessageSentStatus: $e,
1768
1769
  MessageDeliveredStatus: $e,
1769
1770
  MessageReadStatus: $e,
1770
- MessageSendingStatus: zn(a) ? $e : Nr
1771
+ MessageSendingStatus: Bn(a) ? $e : Nr
1771
1772
  }
1772
1773
  );
1773
1774
  return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
@@ -1796,7 +1797,7 @@ const Tr = {
1796
1797
  primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
1797
1798
  secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
1798
1799
  }
1799
- }, Bn = ({
1800
+ }, $n = ({
1800
1801
  variant: e,
1801
1802
  cta: t,
1802
1803
  fullWidth: s = !0,
@@ -1914,7 +1915,7 @@ const Tr = {
1914
1915
  ] }),
1915
1916
  h && /* @__PURE__ */ n("div", { className: "shrink-0", children: h })
1916
1917
  ] }),
1917
- u && /* @__PURE__ */ n(Bn, { variant: t ?? e, cta: u })
1918
+ u && /* @__PURE__ */ n($n, { variant: t ?? e, cta: u })
1918
1919
  ] });
1919
1920
  }, Mr = "Loading link preview", Dr = k(
1920
1921
  // Width is a channel-scoped token: default 290px, but a read-only surface with no
@@ -2131,9 +2132,9 @@ function zr(e) {
2131
2132
  const t = e.trim();
2132
2133
  return t.startsWith("#") ? t : `#${t}`;
2133
2134
  }
2134
- const Br = "#FFFFFF", $n = "#040403", $r = {
2135
+ const Br = "#FFFFFF", Un = "#040403", $r = {
2135
2136
  dark: Br,
2136
- light: $n
2137
+ light: Un
2137
2138
  };
2138
2139
  function Ke({
2139
2140
  variant: e,
@@ -2150,7 +2151,7 @@ function Ke({
2150
2151
  }, [r]);
2151
2152
  const u = F.useCallback(() => {
2152
2153
  d(!0);
2153
- }, []), h = Le(i, o), l = a === "featured" && !!r && !h && !c && s === "ready" && t != null && Fr.test(t.trim()) ? zr(t) : void 0, v = h ? $n : $r[e];
2154
+ }, []), h = Le(i, o), l = a === "featured" && !!r && !h && !c && s === "ready" && t != null && Fr.test(t.trim()) ? zr(t) : void 0, v = h ? Un : $r[e];
2154
2155
  return {
2155
2156
  thumbnailUrl: c ? void 0 : r,
2156
2157
  accentHex: l,
@@ -2205,7 +2206,7 @@ const Ur = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
2205
2206
  onClick: v,
2206
2207
  "aria-label": "Edit attachment",
2207
2208
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
2208
- children: /* @__PURE__ */ n(va, { className: "size-5", weight: "regular" })
2209
+ children: /* @__PURE__ */ n(xa, { className: "size-5", weight: "regular" })
2209
2210
  }
2210
2211
  ) : void 0;
2211
2212
  return x && !p.isLoading ? /* @__PURE__ */ n(Te, { variant: "dark", bgClassName: xt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
@@ -2646,7 +2647,7 @@ function ri(e, t) {
2646
2647
  }
2647
2648
  if (!e) return;
2648
2649
  if (ue(e) === "document") {
2649
- const r = Tn(e), i = ai[r];
2650
+ const r = An(e), i = ai[r];
2650
2651
  if (i) return i;
2651
2652
  if (e === "application/octet-stream") return;
2652
2653
  }
@@ -2675,7 +2676,7 @@ const oi = {
2675
2676
  }, ci = {
2676
2677
  dark: "text-white/85",
2677
2678
  light: "text-black/85"
2678
- }, Un = ({
2679
+ }, jn = ({
2679
2680
  variant: e,
2680
2681
  filename: t,
2681
2682
  title: s,
@@ -2734,7 +2735,7 @@ const oi = {
2734
2735
  c ? /* @__PURE__ */ n("div", { className: "shrink-0", children: c }) : null
2735
2736
  ] });
2736
2737
  };
2737
- async function jn(e, t) {
2738
+ async function Hn(e, t) {
2738
2739
  const s = t ?? ie(e);
2739
2740
  try {
2740
2741
  const a = await fetch(e, { mode: "cors" });
@@ -2764,7 +2765,7 @@ const di = ({
2764
2765
  }) => {
2765
2766
  const i = t.filename ?? ie(t.src);
2766
2767
  return /* @__PURE__ */ n(
2767
- Un,
2768
+ jn,
2768
2769
  {
2769
2770
  variant: e,
2770
2771
  filename: i,
@@ -2801,7 +2802,7 @@ const di = ({
2801
2802
  const x = l[b];
2802
2803
  if (!x) return;
2803
2804
  const p = x.filename ?? ie(x.src);
2804
- jn(x.src, p);
2805
+ Hn(x.src, p);
2805
2806
  };
2806
2807
  if (l.length === 0)
2807
2808
  return null;
@@ -2840,7 +2841,7 @@ const di = ({
2840
2841
  Composer: mi,
2841
2842
  Sent: hi,
2842
2843
  Received: fi
2843
- }, Hn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", an = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", Nt = ({
2844
+ }, Vn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", an = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", Nt = ({
2844
2845
  onPrev: e,
2845
2846
  onNext: t,
2846
2847
  prevLabel: s = "Previous",
@@ -2853,7 +2854,7 @@ const di = ({
2853
2854
  onClick: e,
2854
2855
  "aria-label": s,
2855
2856
  className: `${an} left-4`,
2856
- children: /* @__PURE__ */ n(xa, { size: 20, weight: "bold", "aria-hidden": !0 })
2857
+ children: /* @__PURE__ */ n(wa, { size: 20, weight: "bold", "aria-hidden": !0 })
2857
2858
  }
2858
2859
  ),
2859
2860
  /* @__PURE__ */ n(
@@ -2866,7 +2867,7 @@ const di = ({
2866
2867
  children: /* @__PURE__ */ n(vn, { size: 20, weight: "bold", "aria-hidden": !0 })
2867
2868
  }
2868
2869
  )
2869
- ] }), Vn = ({
2870
+ ] }), Gn = ({
2870
2871
  url: e,
2871
2872
  filename: t,
2872
2873
  variant: s = "pill",
@@ -2877,7 +2878,7 @@ const di = ({
2877
2878
  }) => {
2878
2879
  const [c, d] = B(!1), u = J(
2879
2880
  (l) => {
2880
- l.stopPropagation(), !c && (d(!0), jn(e, t).catch(() => {
2881
+ l.stopPropagation(), !c && (d(!0), Hn(e, t).catch(() => {
2881
2882
  }).finally(() => {
2882
2883
  d(!1), o == null || o();
2883
2884
  }));
@@ -2924,7 +2925,7 @@ const di = ({
2924
2925
  onClick: u,
2925
2926
  disabled: c,
2926
2927
  "aria-label": a,
2927
- className: Hn,
2928
+ className: Vn,
2928
2929
  children: c ? /* @__PURE__ */ n(xe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ n(Ie, { size: 20, weight: "bold", "aria-hidden": !0 })
2929
2930
  }
2930
2931
  ) : /* @__PURE__ */ f(
@@ -3056,7 +3057,7 @@ const di = ({
3056
3057
  type: "button",
3057
3058
  onClick: t,
3058
3059
  "aria-label": "Close viewer",
3059
- className: Hn,
3060
+ className: Vn,
3060
3061
  children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
3061
3062
  }
3062
3063
  )
@@ -3066,7 +3067,7 @@ const di = ({
3066
3067
  ]
3067
3068
  }
3068
3069
  );
3069
- }, Gn = ({
3070
+ }, Yn = ({
3070
3071
  open: e,
3071
3072
  items: t,
3072
3073
  initialIndex: s = 0,
@@ -3088,7 +3089,7 @@ const di = ({
3088
3089
  ariaLabel: d,
3089
3090
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
3090
3091
  actions: /* @__PURE__ */ n(
3091
- Vn,
3092
+ Gn,
3092
3093
  {
3093
3094
  url: c.src,
3094
3095
  filename: d,
@@ -3131,7 +3132,7 @@ const di = ({
3131
3132
  "rounded-bl-[18px]",
3132
3133
  "rounded-br-[18px]"
3133
3134
  ]
3134
- }, vi = "--mes-single-width-cap", xi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", wi = 436, Yn = ({
3135
+ }, vi = "--mes-single-width-cap", xi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", wi = 436, Wn = ({
3135
3136
  tiles: e,
3136
3137
  onTileActivate: t,
3137
3138
  maxVisible: s = 4,
@@ -3272,7 +3273,7 @@ const di = ({
3272
3273
  src: e,
3273
3274
  alt: t,
3274
3275
  items: s
3275
- }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Wn = (e, t) => e.map((s, a) => ({
3276
+ }) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], Kn = (e, t) => e.map((s, a) => ({
3276
3277
  src: s.src,
3277
3278
  alt: s.alt,
3278
3279
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
@@ -3301,10 +3302,10 @@ const di = ({
3301
3302
  ),
3302
3303
  i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(De, { onClick: i }) }) : null,
3303
3304
  /* @__PURE__ */ n(
3304
- Gn,
3305
+ Yn,
3305
3306
  {
3306
3307
  open: o,
3307
- items: Wn([{ src: e, alt: t }], s),
3308
+ items: Kn([{ src: e, alt: t }], s),
3308
3309
  initialIndex: c,
3309
3310
  onClose: u
3310
3311
  }
@@ -3329,7 +3330,7 @@ const di = ({
3329
3330
  imgRef: r,
3330
3331
  onLoad: i
3331
3332
  };
3332
- }, Kn = ({
3333
+ }, Xn = ({
3333
3334
  state: e,
3334
3335
  src: t,
3335
3336
  alt: s,
@@ -3366,7 +3367,7 @@ const di = ({
3366
3367
  "data-testid": "image-attachment",
3367
3368
  children: [
3368
3369
  /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
3369
- Yn,
3370
+ Wn,
3370
3371
  {
3371
3372
  tiles: x,
3372
3373
  onTileActivate: l,
@@ -3374,10 +3375,10 @@ const di = ({
3374
3375
  }
3375
3376
  ) }),
3376
3377
  /* @__PURE__ */ n(
3377
- Gn,
3378
+ Yn,
3378
3379
  {
3379
3380
  open: m,
3380
- items: Wn(u, a),
3381
+ items: Kn(u, a),
3381
3382
  initialIndex: g,
3382
3383
  onClose: v
3383
3384
  }
@@ -3385,7 +3386,7 @@ const di = ({
3385
3386
  ]
3386
3387
  }
3387
3388
  );
3388
- }, Si = (e) => /* @__PURE__ */ n(Ni, { ...e }), Ei = (e) => /* @__PURE__ */ n(Kn, { ...e, state: "sent" }), Ii = (e) => /* @__PURE__ */ n(Kn, { ...e, state: "received" }), Ti = {
3389
+ }, Si = (e) => /* @__PURE__ */ n(Ni, { ...e }), Ei = (e) => /* @__PURE__ */ n(Xn, { ...e, state: "sent" }), Ii = (e) => /* @__PURE__ */ n(Xn, { ...e, state: "received" }), Ti = {
3389
3390
  Composer: Si,
3390
3391
  Sent: Ei,
3391
3392
  Received: Ii
@@ -3455,7 +3456,7 @@ const di = ({
3455
3456
  }) => {
3456
3457
  const i = t.filename ?? ie(t.src);
3457
3458
  return /* @__PURE__ */ n(
3458
- Un,
3459
+ jn,
3459
3460
  {
3460
3461
  variant: e,
3461
3462
  filename: i,
@@ -3496,7 +3497,7 @@ const di = ({
3496
3497
  children: [
3497
3498
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((p, y) => {
3498
3499
  const _ = p.filename ?? ie(p.src), I = b && y === 0 ? /* @__PURE__ */ n(De, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
3499
- Vn,
3500
+ Gn,
3500
3501
  {
3501
3502
  url: p.src,
3502
3503
  filename: _,
@@ -3533,7 +3534,7 @@ const di = ({
3533
3534
  Composer: Di,
3534
3535
  Sent: Oi,
3535
3536
  Received: Pi
3536
- }, Xn = ({
3537
+ }, qn = ({
3537
3538
  open: e,
3538
3539
  items: t,
3539
3540
  initialIndex: s = 0,
@@ -3583,7 +3584,7 @@ const di = ({
3583
3584
  ]
3584
3585
  }
3585
3586
  ) : null;
3586
- }, zi = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(it, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), qn = ({
3587
+ }, zi = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(it, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Zn = ({
3587
3588
  item: e,
3588
3589
  index: t
3589
3590
  }) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -3608,14 +3609,14 @@ const di = ({
3608
3609
  /* @__PURE__ */ n(zi, {})
3609
3610
  ] }), Bi = (e, t, s) => ({
3610
3611
  ariaLabel: `Play video ${t + 1} of ${s}`,
3611
- content: /* @__PURE__ */ n(qn, { item: e, index: t })
3612
+ content: /* @__PURE__ */ n(Zn, { item: e, index: t })
3612
3613
  }), $i = ({
3613
3614
  src: e,
3614
3615
  poster: t,
3615
3616
  mimeType: s,
3616
3617
  preload: a,
3617
3618
  items: r
3618
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Zn = (e, t) => e.map((s, a) => ({
3619
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], Jn = (e, t) => e.map((s, a) => ({
3619
3620
  src: s.src,
3620
3621
  poster: s.poster,
3621
3622
  mimeType: s.mimeType,
@@ -3631,21 +3632,21 @@ const di = ({
3631
3632
  onClick: () => u(0),
3632
3633
  "aria-label": "Play video",
3633
3634
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
3634
- children: /* @__PURE__ */ n(qn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
3635
+ children: /* @__PURE__ */ n(Zn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
3635
3636
  }
3636
3637
  ),
3637
3638
  o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(De, { onClick: o }) }) : null,
3638
3639
  /* @__PURE__ */ n(
3639
- Xn,
3640
+ qn,
3640
3641
  {
3641
3642
  open: c,
3642
- items: Zn([{ src: e, poster: t, mimeType: s, preload: r }], a),
3643
+ items: Jn([{ src: e, poster: t, mimeType: s, preload: r }], a),
3643
3644
  initialIndex: d,
3644
3645
  onClose: h
3645
3646
  }
3646
3647
  )
3647
3648
  ] });
3648
- }, Jn = ({
3649
+ }, Qn = ({
3649
3650
  state: e,
3650
3651
  src: t,
3651
3652
  poster: s,
@@ -3671,12 +3672,12 @@ const di = ({
3671
3672
  groupPosition: c,
3672
3673
  "data-testid": "video-attachment",
3673
3674
  children: [
3674
- /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Yn, { tiles: b, onTileActivate: v }) }),
3675
+ /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(Wn, { tiles: b, onTileActivate: v }) }),
3675
3676
  /* @__PURE__ */ n(
3676
- Xn,
3677
+ qn,
3677
3678
  {
3678
3679
  open: g,
3679
- items: Zn(h, r),
3680
+ items: Jn(h, r),
3680
3681
  initialIndex: l,
3681
3682
  onClose: w
3682
3683
  }
@@ -3684,7 +3685,7 @@ const di = ({
3684
3685
  ]
3685
3686
  }
3686
3687
  );
3687
- }, ji = (e) => /* @__PURE__ */ n(Ui, { ...e }), Hi = (e) => /* @__PURE__ */ n(Jn, { ...e, state: "sent" }), Vi = (e) => /* @__PURE__ */ n(Jn, { ...e, state: "received" }), Gi = {
3688
+ }, ji = (e) => /* @__PURE__ */ n(Ui, { ...e }), Hi = (e) => /* @__PURE__ */ n(Qn, { ...e, state: "sent" }), Vi = (e) => /* @__PURE__ */ n(Qn, { ...e, state: "received" }), Gi = {
3688
3689
  Composer: ji,
3689
3690
  Sent: Hi,
3690
3691
  Received: Vi
@@ -3739,7 +3740,7 @@ function Wi(e) {
3739
3740
  var t;
3740
3741
  return We(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;
3741
3742
  }
3742
- function Qn(e) {
3743
+ function es(e) {
3743
3744
  if (!(e != null && e.length)) return [];
3744
3745
  const t = [], s = (r, i) => {
3745
3746
  const o = t[t.length - 1];
@@ -3828,7 +3829,9 @@ function ln(e, t) {
3828
3829
  function Ji(e, t) {
3829
3830
  if (t.length > 1)
3830
3831
  return {
3831
- items: t.map((a) => ln(e, a))
3832
+ items: t.map(
3833
+ (a) => ln(e, a)
3834
+ )
3832
3835
  };
3833
3836
  const s = t[0];
3834
3837
  return s ? ln(e, s) : {};
@@ -3851,7 +3854,7 @@ const eo = ({
3851
3854
  renderText: a
3852
3855
  }) => {
3853
3856
  var b;
3854
- const r = Qn(s.attachments);
3857
+ const r = es(s.attachments);
3855
3858
  if (r.length === 0) return null;
3856
3859
  const i = Ki(r), o = (b = s.text) == null ? void 0 : b.trim(), c = r.find((x) => x.type === "link"), d = (c == null ? void 0 : c.type) === "link" ? on(c.attachments[0] ?? {}).url : void 0, u = o && Yi(o, d) ? void 0 : o;
3857
3860
  let h = 0;
@@ -3951,19 +3954,19 @@ const eo = ({
3951
3954
  viewerLanguage: b,
3952
3955
  onOutboundClick: x,
3953
3956
  resolvedOutbound: p
3954
- } = e, { client: y } = Ye("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: I, onUnlockClick: M, onFetchSource: T, onDownloadClick: D } = cr("LockedAttachment"), [$, A] = B(!1), C = bs(l.id), {
3955
- Attachment: R = vs,
3956
- EditMessageModal: E = xs,
3957
+ } = e, { client: y } = Ye("CustomMessage"), { channel: _ } = _e("CustomMessage"), { isUnlocking: I, onUnlockClick: M, onFetchSource: T, onDownloadClick: D } = cr("LockedAttachment"), [$, A] = B(!1), C = vs(l.id), {
3958
+ Attachment: R = xs,
3959
+ EditMessageModal: E = ws,
3957
3960
  MessageActions: S,
3958
- MessageBlocked: O = ws,
3959
- MessageBouncePrompt: j = _s,
3960
- MessageDeleted: z = ys,
3961
- MessageIsThreadReplyInChannelButtonIndicator: P = Ns,
3962
- MessageRepliesCountButton: q = ks,
3963
- ReminderNotification: G = Cs,
3964
- StreamedMessageText: Z = Ss,
3961
+ MessageBlocked: O = _s,
3962
+ MessageBouncePrompt: j = ys,
3963
+ MessageDeleted: z = Ns,
3964
+ MessageIsThreadReplyInChannelButtonIndicator: P = ks,
3965
+ MessageRepliesCountButton: q = Cs,
3966
+ ReminderNotification: G = Ss,
3967
+ StreamedMessageText: Z = Es,
3965
3968
  PinIndicator: Y
3966
- } = gn("CustomMessage"), N = Es(l), L = Is(l), W = re(
3969
+ } = gn("CustomMessage"), N = Is(l), L = Ts(l), W = re(
3967
3970
  () => m == null ? void 0 : m(l),
3968
3971
  [m, l]
3969
3972
  ), U = re(() => {
@@ -3972,25 +3975,25 @@ const eo = ({
3972
3975
  const Vt = ve.filter((Gt) => !("type" in Gt) || !We(Gt));
3973
3976
  return Vt.length === ve.length ? ve : Vt;
3974
3977
  }, [l]), ne = re(
3975
- () => Qn(U),
3978
+ () => es(U),
3976
3979
  [U]
3977
3980
  ), K = re(() => {
3978
- const fe = In({ message: l, viewerLanguage: b });
3981
+ const fe = Tn({ message: l, viewerLanguage: b });
3979
3982
  return fe === l.text ? l : { ...l, text: fe };
3980
3983
  }, [l, b]), te = ne.length > 0, se = ne.reduce(
3981
3984
  (fe, ve) => fe + ve.attachments.length,
3982
3985
  0
3983
3986
  ) === ((U == null ? void 0 : U.length) ?? 0), oe = (i == null ? void 0 : i[0]) ?? "", Fe = oe === "top" ? "first" : oe === "middle" ? "middle" : oe === "bottom" ? "end" : "single", me = oe === "single" || oe === "bottom";
3984
- if (Ts(l))
3987
+ if (As(l))
3985
3988
  return null;
3986
3989
  if (l.deleted_at || l.type === "deleted")
3987
3990
  return /* @__PURE__ */ n(z, { message: l });
3988
- if (As(l))
3991
+ if (Rs(l))
3989
3992
  return /* @__PURE__ */ n(O, {});
3990
- const ae = !w && !!l.reply_count, he = !w && l.show_in_channel && l.parent_id, le = l.status === "failed" && ((Mt = l.error) == null ? void 0 : Mt.status) !== 403, Et = Rs(l);
3993
+ const ae = !w && !!l.reply_count, he = !w && l.show_in_channel && l.parent_id, le = l.status === "failed" && ((Mt = l.error) == null ? void 0 : Mt.status) !== 403, Et = Ls(l);
3991
3994
  let be;
3992
3995
  le ? be = () => u(l) : Et && (be = () => A(!0));
3993
- const ee = g(), is = k(
3996
+ const ee = g(), os = k(
3994
3997
  "str-chat__message str-chat__message-simple",
3995
3998
  `str-chat__message--${l.type}`,
3996
3999
  `str-chat__message--${l.status}`,
@@ -4007,7 +4010,7 @@ const eo = ({
4007
4010
  "str-chat__virtual-message__wrapper--first": r,
4008
4011
  "str-chat__virtual-message__wrapper--group": o
4009
4012
  }
4010
- ), Xe = l.poll_id && y.polls.fromState(l.poll_id), It = zn(l), Ne = je(l), os = ft(l), qe = !!(U != null && U.length && !l.quoted_message), Tt = Ne && ee && qe, ls = te && se && !l.quoted_message && !Xe && !W && !Ne, At = {
4013
+ ), Xe = l.poll_id && y.polls.fromState(l.poll_id), It = Bn(l), Ne = je(l), ls = ft(l), qe = !!(U != null && U.length && !l.quoted_message), Tt = Ne && ee && qe, cs = te && se && !l.quoted_message && !Xe && !W && !Ne, At = {
4011
4014
  contentType: "text",
4012
4015
  amountText: (Ot = l.metadata) == null ? void 0 : Ot.amount_text,
4013
4016
  paymentStatus: (Pt = l.metadata) == null ? void 0 : Pt.payment_status,
@@ -4041,7 +4044,7 @@ const eo = ({
4041
4044
  }
4042
4045
  ),
4043
4046
  $ && /* @__PURE__ */ n(
4044
- Ls,
4047
+ Ms,
4045
4048
  {
4046
4049
  MessageBouncePrompt: j,
4047
4050
  onClose: () => A(!1),
@@ -4051,7 +4054,7 @@ const eo = ({
4051
4054
  /* @__PURE__ */ f(
4052
4055
  "div",
4053
4056
  {
4054
- className: is,
4057
+ className: os,
4055
4058
  "data-message-id": l.id,
4056
4059
  "data-dd-privacy": "mask",
4057
4060
  children: [
@@ -4124,7 +4127,7 @@ const eo = ({
4124
4127
  !ee && S && /* @__PURE__ */ n(S, {})
4125
4128
  ] }),
4126
4129
  l.text && Lt
4127
- ] }) : ls ? /* @__PURE__ */ n(
4130
+ ] }) : cs ? /* @__PURE__ */ n(
4128
4131
  eo,
4129
4132
  {
4130
4133
  groupPosition: Fe,
@@ -4154,7 +4157,7 @@ const eo = ({
4154
4157
  isMyMessage: ee
4155
4158
  }
4156
4159
  ),
4157
- Xe && /* @__PURE__ */ n(Ms, { poll: Xe }),
4160
+ Xe && /* @__PURE__ */ n(Ds, { poll: Xe }),
4158
4161
  U != null && U.length && !l.quoted_message ? /* @__PURE__ */ n(
4159
4162
  R,
4160
4163
  {
@@ -4182,7 +4185,7 @@ const eo = ({
4182
4185
  ) })
4183
4186
  }
4184
4187
  ),
4185
- !os && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!Ne || Tt) && /* @__PURE__ */ n(
4188
+ !ls && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!Ne || Tt) && /* @__PURE__ */ n(
4186
4189
  en,
4187
4190
  {
4188
4191
  message: l,
@@ -4214,11 +4217,11 @@ const eo = ({
4214
4217
  to,
4215
4218
  (e, t) => {
4216
4219
  var s, a, r, i;
4217
- return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ps(e, t);
4220
+ return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : bs(e, t);
4218
4221
  }
4219
4222
  ), so = (e) => {
4220
4223
  var i;
4221
- const t = pe("CustomMessage"), s = ge(Fn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4224
+ const t = pe("CustomMessage"), s = ge(zn), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
4222
4225
  return /* @__PURE__ */ n(
4223
4226
  no,
4224
4227
  {
@@ -4237,7 +4240,7 @@ const eo = ({
4237
4240
  "aria-label": "Delete",
4238
4241
  title: "Delete",
4239
4242
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4240
- children: /* @__PURE__ */ n(wa, { size: 16, weight: "light", "aria-hidden": !0 })
4243
+ children: /* @__PURE__ */ n(_a, { size: 16, weight: "light", "aria-hidden": !0 })
4241
4244
  }
4242
4245
  );
4243
4246
  }, ro = () => {
@@ -4256,7 +4259,7 @@ const eo = ({
4256
4259
  var t;
4257
4260
  const { message: e } = pe("CustomMessageActions");
4258
4261
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== ce.ATTACHMENT ? null : /* @__PURE__ */ n(
4259
- ka,
4262
+ Ca,
4260
4263
  {
4261
4264
  messageActionSet: [
4262
4265
  { Component: ao, placement: "quick", type: "delete" },
@@ -4269,7 +4272,7 @@ const eo = ({
4269
4272
  (t) => st.previewIsLoaded(t) || st.previewIsLoading(t)
4270
4273
  )
4271
4274
  }), lo = () => {
4272
- const { linkPreviewsManager: e } = Ds(), { linkPreviews: t } = Os(
4275
+ const { linkPreviewsManager: e } = Os(), { linkPreviews: t } = Ps(
4273
4276
  e.state,
4274
4277
  oo
4275
4278
  ), s = (r) => {
@@ -4344,12 +4347,12 @@ const eo = ({
4344
4347
  disabled: t,
4345
4348
  onPointerDown: (a) => a.preventDefault(),
4346
4349
  onClick: e,
4347
- children: /* @__PURE__ */ n(_a, { weight: "bold", className: "size-4" })
4350
+ children: /* @__PURE__ */ n(ya, { weight: "bold", className: "size-4" })
4348
4351
  }
4349
4352
  ), cn = () => {
4350
- const e = ge(Ve), { handleSubmit: t } = Ps(), s = Fs(), a = e || !s, {
4353
+ const e = ge(Ve), { handleSubmit: t } = Fs(), s = zs(), a = e || !s, {
4351
4354
  SendButton: r = uo,
4352
- AttachmentPreviewList: i = zs
4355
+ AttachmentPreviewList: i = Bs
4353
4356
  } = gn("CustomMessageInput"), o = F.useRef(null);
4354
4357
  return F.useEffect(() => {
4355
4358
  const c = o.current;
@@ -4413,13 +4416,13 @@ const eo = ({
4413
4416
  "data-dd-privacy": "mask",
4414
4417
  children: [
4415
4418
  /* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
4416
- /* @__PURE__ */ n(Bs, {}),
4419
+ /* @__PURE__ */ n($s, {}),
4417
4420
  /* @__PURE__ */ n(lo, {}),
4418
4421
  /* @__PURE__ */ n(i, {})
4419
4422
  ] }),
4420
4423
  /* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
4421
4424
  /* @__PURE__ */ n(
4422
- $s,
4425
+ Us,
4423
4426
  {
4424
4427
  "aria-disabled": e || void 0,
4425
4428
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4551,7 +4554,9 @@ const eo = ({
4551
4554
  }, mo = {
4552
4555
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
4553
4556
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4554
- }, ho = ["SYSTEM_AGE_SAFETY_BLOCKED"], fo = {
4557
+ }, ho = [
4558
+ "SYSTEM_AGE_SAFETY_BLOCKED"
4559
+ ], fo = {
4555
4560
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4556
4561
  }, tt = "age safety guidelines.", go = "https://linktr.ee/s/about/contact", po = (e) => ho.includes(
4557
4562
  e
@@ -4566,7 +4571,7 @@ const eo = ({
4566
4571
  kind: "dm-agent",
4567
4572
  type: t
4568
4573
  };
4569
- if (Xs(t))
4574
+ if (qs(t))
4570
4575
  return {
4571
4576
  kind: "age-safety",
4572
4577
  type: t
@@ -4612,7 +4617,7 @@ const eo = ({
4612
4617
  "data-dm-agent-system-type": s.type,
4613
4618
  children: [
4614
4619
  /* @__PURE__ */ n(
4615
- ya,
4620
+ Na,
4616
4621
  {
4617
4622
  size: 16,
4618
4623
  weight: "regular",
@@ -4638,7 +4643,7 @@ const eo = ({
4638
4643
  "data-age-safety-system-type": s.type,
4639
4644
  children: [
4640
4645
  /* @__PURE__ */ n(
4641
- Na,
4646
+ ka,
4642
4647
  {
4643
4648
  size: 24,
4644
4649
  weight: "duotone",
@@ -4662,7 +4667,7 @@ const eo = ({
4662
4667
  ] }),
4663
4668
  !t && /* @__PURE__ */ n(Ze, { message: e.message })
4664
4669
  ] });
4665
- }, es = Re(!1), nt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4670
+ }, ts = Re(!1), nt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
4666
4671
  "animateTransform",
4667
4672
  {
4668
4673
  attributeName: "transform",
@@ -4678,7 +4683,7 @@ const eo = ({
4678
4683
  Je.ExternalSources
4679
4684
  ]), yo = ({ threadList: e }) => {
4680
4685
  var v, w;
4681
- const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ye(), { typing: i = {} } = Us(), { aiState: o } = js(t), c = ge(es);
4686
+ const { channel: t, channelConfig: s, thread: a } = _e(), { client: r } = Ye(), { typing: i = {} } = js(), { aiState: o } = Hs(t), c = ge(ts);
4682
4687
  if (!e && c && _o.has(o)) {
4683
4688
  const b = No(t, (v = r.user) == null ? void 0 : v.id);
4684
4689
  return /* @__PURE__ */ n(
@@ -4891,8 +4896,8 @@ const So = ({
4891
4896
  },
4892
4897
  [S, y, _]
4893
4898
  );
4894
- return /* @__PURE__ */ n(Fn.Provider, { value: O, children: /* @__PURE__ */ n(
4895
- Vs,
4899
+ return /* @__PURE__ */ n(zn.Provider, { value: O, children: /* @__PURE__ */ n(
4900
+ Gs,
4896
4901
  {
4897
4902
  overrides: {
4898
4903
  Message: q,
@@ -4900,7 +4905,7 @@ const So = ({
4900
4905
  UnreadMessagesNotification: () => null,
4901
4906
  UnreadMessagesSeparator: () => null
4902
4907
  },
4903
- children: /* @__PURE__ */ n(Gs, { children: $ ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4908
+ children: /* @__PURE__ */ n(Ys, { children: $ ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4904
4909
  /* @__PURE__ */ f(
4905
4910
  "div",
4906
4911
  {
@@ -4983,7 +4988,7 @@ const So = ({
4983
4988
  ] }) })
4984
4989
  }
4985
4990
  ) });
4986
- }, ts = F.memo(
4991
+ }, ns = F.memo(
4987
4992
  ({
4988
4993
  channel: e,
4989
4994
  onBack: t,
@@ -5063,8 +5068,8 @@ const So = ({
5063
5068
  d
5064
5069
  ),
5065
5070
  style: Z,
5066
- children: /* @__PURE__ */ n(es.Provider, { value: p ?? !1, children: /* @__PURE__ */ n(
5067
- Hs,
5071
+ children: /* @__PURE__ */ n(ts.Provider, { value: p ?? !1, children: /* @__PURE__ */ n(
5072
+ Vs,
5068
5073
  {
5069
5074
  channel: e,
5070
5075
  MessageSystem: wo,
@@ -5113,7 +5118,7 @@ const So = ({
5113
5118
  );
5114
5119
  }
5115
5120
  );
5116
- ts.displayName = "ChannelView";
5121
+ ns.displayName = "ChannelView";
5117
5122
  const Ee = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5118
5123
  /* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
5119
5124
  /* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
@@ -5247,7 +5252,7 @@ const fl = ({
5247
5252
  onBack: R
5248
5253
  }
5249
5254
  ) : z ? /* @__PURE__ */ n(Ee, { message: z }) : q && !O ? /* @__PURE__ */ n(Ee, { message: "Conversation ended" }) : O ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
5250
- ts,
5255
+ ns,
5251
5256
  {
5252
5257
  channel: O,
5253
5258
  renderMessageInputActions: t,
@@ -5282,7 +5287,7 @@ function Eo(e) {
5282
5287
  for (const s of t)
5283
5288
  e.state.addMessageSorted(s.message);
5284
5289
  }
5285
- const ns = F.createContext({
5290
+ const ss = F.createContext({
5286
5291
  selectedChannel: void 0,
5287
5292
  onChannelSelect: () => {
5288
5293
  },
@@ -5290,7 +5295,7 @@ const ns = F.createContext({
5290
5295
  renderMessagePreview: void 0,
5291
5296
  channelPreview: void 0,
5292
5297
  viewerLanguage: void 0
5293
- }), Io = ns.Provider, To = () => F.useContext(ns), Ao = (e, t) => {
5298
+ }), Io = ss.Provider, To = () => F.useContext(ss), Ao = (e, t) => {
5294
5299
  const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
5295
5300
  return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
5296
5301
  }, Ro = (e) => {
@@ -5310,7 +5315,7 @@ const ns = F.createContext({
5310
5315
  day: "numeric",
5311
5316
  year: "numeric"
5312
5317
  });
5313
- }, ss = F.memo(
5318
+ }, as = F.memo(
5314
5319
  (e) => {
5315
5320
  var D, $, A;
5316
5321
  const { channel: t, unread: s } = e, {
@@ -5320,7 +5325,7 @@ const ns = F.createContext({
5320
5325
  channelPreview: o,
5321
5326
  renderMessagePreview: c,
5322
5327
  viewerLanguage: d
5323
- } = To(), { client: u } = Ye(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = kn(t);
5328
+ } = To(), { client: u } = Ye(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = Cn(t);
5324
5329
  if (o)
5325
5330
  return /* @__PURE__ */ n(
5326
5331
  o,
@@ -5337,11 +5342,11 @@ const ns = F.createContext({
5337
5342
  }, l = (C) => {
5338
5343
  const R = C.key === "Enter" || C.key === " ", E = C.repeat;
5339
5344
  !R || E || (C.preventDefault(), g());
5340
- }, v = Cn(
5345
+ }, v = Sn(
5341
5346
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
5342
5347
  u == null ? void 0 : u.userID,
5343
5348
  t == null ? void 0 : t.type
5344
- ), w = Sn(v == null ? void 0 : v.user), b = ($ = v == null ? void 0 : v.user) == null ? void 0 : $.image, x = (() => {
5349
+ ), w = En(v == null ? void 0 : v.user), b = ($ = v == null ? void 0 : v.user) == null ? void 0 : $.image, x = (() => {
5345
5350
  var R;
5346
5351
  const C = (R = t == null ? void 0 : t.state) == null ? void 0 : R.messages;
5347
5352
  if (C != null && C.length) {
@@ -5350,7 +5355,7 @@ const ns = F.createContext({
5350
5355
  }
5351
5356
  })(), y = (() => {
5352
5357
  var O;
5353
- const C = In({
5358
+ const C = Tn({
5354
5359
  message: x,
5355
5360
  viewerLanguage: d
5356
5361
  }), { custom_type: R, attachment_content_type: E } = (x == null ? void 0 : x.metadata) || {};
@@ -5426,7 +5431,7 @@ const ns = F.createContext({
5426
5431
  );
5427
5432
  }
5428
5433
  );
5429
- ss.displayName = "CustomChannelPreview";
5434
+ as.displayName = "CustomChannelPreview";
5430
5435
  const Lo = { last_message_at: -1 }, Mo = F.memo(
5431
5436
  ({
5432
5437
  onChannelSelect: e,
@@ -5437,7 +5442,7 @@ const Lo = { last_message_at: -1 }, Mo = F.memo(
5437
5442
  sort: i = Lo,
5438
5443
  className: o,
5439
5444
  customEmptyStateIndicator: c,
5440
- channelListPaginator: d = Ws,
5445
+ channelListPaginator: d = Ks,
5441
5446
  channelPreview: u,
5442
5447
  renderMessagePreview: h,
5443
5448
  viewerLanguage: m,
@@ -5489,7 +5494,7 @@ const Lo = { last_message_at: -1 }, Mo = F.memo(
5489
5494
  o
5490
5495
  ),
5491
5496
  children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Io, { value: I, children: /* @__PURE__ */ n(
5492
- Ys,
5497
+ Ws,
5493
5498
  {
5494
5499
  filters: s,
5495
5500
  sort: i,
@@ -5503,7 +5508,7 @@ const Lo = { last_message_at: -1 }, Mo = F.memo(
5503
5508
  onAddedToChannel: b,
5504
5509
  onChannelUpdated: x,
5505
5510
  Paginator: d,
5506
- Preview: ss,
5511
+ Preview: as,
5507
5512
  EmptyStateIndicator: c
5508
5513
  },
5509
5514
  `${JSON.stringify(s)}:${JSON.stringify(i)}`
@@ -5528,7 +5533,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5528
5533
  a ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"
5529
5534
  ),
5530
5535
  children: t.map((r, i) => /* @__PURE__ */ n(
5531
- Bn,
5536
+ $n,
5532
5537
  {
5533
5538
  variant: e,
5534
5539
  cta: r,
@@ -5667,7 +5672,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5667
5672
  onImageError: i
5668
5673
  }
5669
5674
  )
5670
- ) }), as = ({
5675
+ ) }), rs = ({
5671
5676
  variant: e,
5672
5677
  title: t,
5673
5678
  subtitle: s,
@@ -5679,7 +5684,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5679
5684
  accentColor: d,
5680
5685
  groupPosition: u = "single"
5681
5686
  }) => {
5682
- const h = qs({
5687
+ const h = Zs({
5683
5688
  imagePresentation: i,
5684
5689
  images: r
5685
5690
  }), m = r.length > 0, g = m && h === "hero", l = Ke({
@@ -5729,7 +5734,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5729
5734
  )
5730
5735
  }
5731
5736
  );
5732
- }, Go = (e) => /* @__PURE__ */ n(as, { ...e, variant: "dark" }), Yo = (e) => /* @__PURE__ */ n(as, { ...e, variant: "light" }), gl = {
5737
+ }, Go = (e) => /* @__PURE__ */ n(rs, { ...e, variant: "dark" }), Yo = (e) => /* @__PURE__ */ n(rs, { ...e, variant: "light" }), gl = {
5733
5738
  Sent: Go,
5734
5739
  Received: Yo
5735
5740
  }, fn = `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%`, Wo = {
@@ -5759,7 +5764,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5759
5764
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5760
5765
  color: "var(--str-chat__message-bubble-color, #000000)"
5761
5766
  }
5762
- }, rs = ({
5767
+ }, is = ({
5763
5768
  variant: e,
5764
5769
  text: t,
5765
5770
  tail: s = !0,
@@ -5791,7 +5796,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5791
5796
  header: s,
5792
5797
  className: a
5793
5798
  }) => /* @__PURE__ */ n(
5794
- rs,
5799
+ is,
5795
5800
  {
5796
5801
  variant: "received",
5797
5802
  text: e,
@@ -5799,7 +5804,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5799
5804
  header: s,
5800
5805
  className: a
5801
5806
  }
5802
- ), Zo = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(rs, { variant: "sent", text: e, tail: t, className: s }), pl = {
5807
+ ), Zo = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(is, { variant: "sent", text: e, tail: t, className: s }), pl = {
5803
5808
  Sent: Zo,
5804
5809
  Received: qo
5805
5810
  }, Jo = ({
@@ -5833,7 +5838,7 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5833
5838
  avatarImage: i,
5834
5839
  avatarName: o
5835
5840
  }) => {
5836
- const c = Zs(e);
5841
+ const c = Js(e);
5837
5842
  return c.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
5838
5843
  (i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
5839
5844
  ye,
@@ -5867,11 +5872,11 @@ const Do = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
5867
5872
  ] }) });
5868
5873
  };
5869
5874
  export {
5870
- An as A,
5875
+ Rn as A,
5871
5876
  mt as B,
5872
5877
  ko as C,
5873
5878
  ht as D,
5874
- Sn as E,
5879
+ En as E,
5875
5880
  bl as F,
5876
5881
  hl as G,
5877
5882
  cr as H,
@@ -5884,7 +5889,7 @@ export {
5884
5889
  ke as a,
5885
5890
  ye as b,
5886
5891
  Mo as c,
5887
- ts as d,
5892
+ ns as d,
5888
5893
  ul as e,
5889
5894
  Jo as f,
5890
5895
  ue as g,
@@ -5900,12 +5905,12 @@ export {
5900
5905
  Ro as q,
5901
5906
  we as r,
5902
5907
  ri as s,
5903
- In as t,
5908
+ Tn as t,
5904
5909
  We as u,
5905
- zn as v,
5910
+ Bn as v,
5906
5911
  Ta as w,
5907
5912
  ml as x,
5908
5913
  $a as y,
5909
- Cn as z
5914
+ Sn as z
5910
5915
  };
5911
- //# sourceMappingURL=index-6RdyZh6F.js.map
5916
+ //# sourceMappingURL=index-CT_7H4Gc.js.map