@linktr.ee/messaging-react 4.3.1-rc-1787559873 → 4.3.1-rc-1787564868

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.
@@ -2,9 +2,9 @@ import { jsx as s, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
2
  import R, { createContext as Se, useMemo as re, useContext as he, useCallback as J, useState as $, useRef as j, useEffect as q, useId as Js, Suspense as Qs } from "react";
3
3
  import { StreamChatService as en } from "@linktr.ee/messaging-core";
4
4
  import { StreamChat as tn, LinkPreviewsManager as tt } from "stream-chat";
5
- import { Chat as sn, useChannelStateContext as be, useChatContext as Ge, DateSeparator as nn, useMessageContext as fe, MessageStatus as an, MessageErrorIcon as st, MessageText as Fe, areMessageUIPropsEqual as rn, useMessageReminder as on, useComponentContext as os, Attachment as ln, EditMessageModal as cn, MessageBlocked as dn, MessageBouncePrompt as un, MessageDeleted as mn, MessageIsThreadReplyInChannelButtonIndicator as hn, MessageRepliesCountButton as fn, ReminderNotification as gn, StreamedMessageText as pn, messageHasAttachments as bn, messageHasReactions as vn, isDateSeparatorMessage as xn, isMessageBlocked as wn, isMessageBounced as _n, MessageBounceModal as yn, Poll as Nn, useMessageComposer as Cn, useStateStore as Sn, MessageInput as $t, useMessageInputContext as kn, useMessageComposerHasSendableData as En, AttachmentPreviewList as In, QuotedMessagePreview as Tn, TextareaComposer as An, MessageTimestamp as qe, AIStates as Ke, useTypingContext as Rn, useAIState as Ln, Channel as Mn, WithComponents as Dn, Window as On, MessageList as Ut, ChannelList as Pn, InfiniteScroll as Bn } from "stream-chat-react";
5
+ import { Chat as sn, useChannelStateContext as be, useChatContext as Ge, DateSeparator as nn, useMessageContext as fe, MessageStatus as an, MessageErrorIcon as st, MessageText as Fe, areMessageUIPropsEqual as rn, useMessageReminder as on, useComponentContext as os, Attachment as ln, EditMessageModal as cn, MessageBlocked as dn, MessageBouncePrompt as un, MessageDeleted as mn, MessageIsThreadReplyInChannelButtonIndicator as hn, MessageRepliesCountButton as fn, ReminderNotification as gn, StreamedMessageText as pn, messageHasAttachments as bn, messageHasReactions as vn, isDateSeparatorMessage as xn, isMessageBlocked as wn, isMessageBounced as _n, MessageBounceModal as Nn, Poll as yn, useMessageComposer as Cn, useStateStore as Sn, MessageInput as $t, useMessageInputContext as kn, useMessageComposerHasSendableData as En, AttachmentPreviewList as In, QuotedMessagePreview as Tn, TextareaComposer as An, MessageTimestamp as qe, AIStates as Ke, useTypingContext as Rn, useAIState as Ln, Channel as Mn, WithComponents as Dn, Window as On, MessageList as Ut, ChannelList as Pn, InfiniteScroll as Bn } from "stream-chat-react";
6
6
  import { isOfficialChannel as ls, OFFICIAL_SENDER_USER_ID as Fn, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as jt, isAgeSafetySystemType as zn, resolveRichCardImagePresentation as $n, selectEnabledFaqs as Un } from "@linktr.ee/messaging-taxonomy";
7
- import N from "classnames";
7
+ import y from "classnames";
8
8
  import { StarIcon as nt, DotsThreeIcon as jn, SpinnerGapIcon as Oe, SignOutIcon as Hn, ProhibitInsetIcon as Ht, FlagIcon as cs, CurrencyDollarIcon as Vn, CaretRightIcon as ds, ArrowLeftIcon as Gn, GiftIcon as Yn, WarningCircleIcon as Wn, MegaphoneIcon as Xn, ChecksIcon as qn, CircleNotchIcon as ze, FileIcon as us, ImageIcon as Kn, SpeakerHighIcon as Zn, VideoCameraIcon as ms, FileMdIcon as Jn, FileTextIcon as Qn, FileZipIcon as ea, FilePptIcon as ta, FileCsvIcon as sa, FileXlsIcon as na, FileDocIcon as aa, FilePdfIcon as ra, XIcon as rt, PencilSimpleIcon as ia, DownloadSimpleIcon as $e, CaretLeftIcon as oa, PlayIcon as la, TrashSimpleIcon as ca, ArrowUpIcon as da, SparkleIcon as ua, ProhibitIcon as ma } from "@phosphor-icons/react";
9
9
  import { MessageActions as ha, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
10
10
  const _e = {
@@ -53,7 +53,7 @@ const _e = {
53
53
  serviceConfig: !!n,
54
54
  capabilities: Object.keys(r)
55
55
  });
56
- const [u, f] = $(null), [m, g] = $(null), [o, x] = $(!1), [_, b] = $(!1), [v, p] = $(null), y = j(!1), w = j(null), k = j(n);
56
+ const [u, f] = $(null), [m, g] = $(null), [o, x] = $(!1), [_, b] = $(!1), [v, p] = $(null), N = j(!1), w = j(null), k = j(n);
57
57
  k.current = n;
58
58
  const T = j(i);
59
59
  T.current = i;
@@ -121,7 +121,7 @@ const _e = {
121
121
  hasService: !!u,
122
122
  hasUser: !!t,
123
123
  userId: t == null ? void 0 : t.id,
124
- isConnecting: y.current,
124
+ isConnecting: N.current,
125
125
  isConnected: o,
126
126
  dependencies: { service: !!u, userId: t == null ? void 0 : t.id }
127
127
  }), c)
@@ -130,7 +130,7 @@ const _e = {
130
130
  d("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
131
131
  return;
132
132
  }
133
- if (y.current) {
133
+ if (N.current) {
134
134
  d("⚠️ USER CONNECTION SKIPPED", "Already connecting");
135
135
  return;
136
136
  }
@@ -142,7 +142,7 @@ const _e = {
142
142
  return;
143
143
  }
144
144
  (async () => {
145
- d("🚀 STARTING USER CONNECTION", { userId: t.id }), y.current = !0, b(!0), p(null);
145
+ d("🚀 STARTING USER CONNECTION", { userId: t.id }), N.current = !0, b(!0), p(null);
146
146
  try {
147
147
  d("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
148
148
  const H = await u.connectUser(t);
@@ -157,7 +157,7 @@ const _e = {
157
157
  error: X
158
158
  });
159
159
  } finally {
160
- b(!1), y.current = !1, d("🔄 USER CONNECTION FINISHED", {
160
+ b(!1), N.current = !1, d("🔄 USER CONNECTION FINISHED", {
161
161
  userId: t.id,
162
162
  isConnected: o
163
163
  });
@@ -354,7 +354,7 @@ const ke = ({
354
354
  "div",
355
355
  {
356
356
  "aria-hidden": "true",
357
- className: N(
357
+ className: y(
358
358
  "avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"
359
359
  ),
360
360
  style: { fontSize: m, lineHeight: 1 },
@@ -364,7 +364,7 @@ const ke = ({
364
364
  return /* @__PURE__ */ h(
365
365
  "div",
366
366
  {
367
- className: N("relative flex-shrink-0", a),
367
+ className: y("relative flex-shrink-0", a),
368
368
  style: {
369
369
  "--str-chat__avatar-size": `${n}px`,
370
370
  width: `${n}px`,
@@ -385,7 +385,7 @@ const ke = ({
385
385
  "div",
386
386
  {
387
387
  "data-testid": "avatar-ring",
388
- className: N("h-full w-full", "bg-transparent"),
388
+ className: y("h-full w-full", "bg-transparent"),
389
389
  style: {
390
390
  ...o,
391
391
  ...c && {
@@ -401,7 +401,7 @@ const ke = ({
401
401
  ]
402
402
  }
403
403
  );
404
- }, _a = "https://linktr.ee/s/about/trust-center/report", ya = ({
404
+ }, _a = "https://linktr.ee/s/about/trust-center/report", Na = ({
405
405
  channel: e,
406
406
  participant: t,
407
407
  showBlockParticipant: n = !0,
@@ -415,7 +415,7 @@ const ke = ({
415
415
  logLabel: f = "useChannelModerationActions"
416
416
  }) => {
417
417
  var I;
418
- const { service: m, debug: g } = it(), o = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, x = !!(a && n && m && o), [_, b] = $(!1), [v, p] = $(null), [y, w] = $(!1), [k, T] = $(!1), A = x && ((v == null ? void 0 : v.participantId) !== o || (v == null ? void 0 : v.service) !== m);
418
+ const { service: m, debug: g } = it(), o = (I = t == null ? void 0 : t.user) == null ? void 0 : I.id, x = !!(a && n && m && o), [_, b] = $(!1), [v, p] = $(null), [N, w] = $(!1), [k, T] = $(!1), A = x && ((v == null ? void 0 : v.participantId) !== o || (v == null ? void 0 : v.service) !== m);
419
419
  return q(() => {
420
420
  if (!x || !m || !o) {
421
421
  b(!1), p(null);
@@ -442,11 +442,11 @@ const ke = ({
442
442
  }, [x, m, o, f]), {
443
443
  isParticipantBlocked: _,
444
444
  isCheckingBlockedStatus: A,
445
- isLeaving: y,
445
+ isLeaving: N,
446
446
  isUpdatingBlockStatus: k,
447
447
  handleLeaveConversation: async () => {
448
448
  var E;
449
- if (!y) {
449
+ if (!N) {
450
450
  c == null || c(), g && console.log(`[${f}] Leave conversation`, e.cid), w(!0);
451
451
  try {
452
452
  const C = ((E = e._client) == null ? void 0 : E.userID) ?? null;
@@ -497,7 +497,7 @@ const ke = ({
497
497
  "button",
498
498
  {
499
499
  type: "button",
500
- className: N(
500
+ className: y(
501
501
  "flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60",
502
502
  e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand",
503
503
  t
@@ -505,7 +505,7 @@ const ke = ({
505
505
  ...a,
506
506
  children: n
507
507
  }
508
- ), Na = ({
508
+ ), ya = ({
509
509
  channel: e,
510
510
  participant: t,
511
511
  showDeleteConversation: n = !0,
@@ -522,13 +522,13 @@ const ke = ({
522
522
  const [g, o] = $(!1), x = j(null), _ = Js(), b = J(() => o(!1), []), {
523
523
  isParticipantBlocked: v,
524
524
  isCheckingBlockedStatus: p,
525
- isLeaving: y,
525
+ isLeaving: N,
526
526
  isUpdatingBlockStatus: w,
527
527
  handleLeaveConversation: k,
528
528
  handleBlockUser: T,
529
529
  handleUnblockUser: A,
530
530
  handleReportUser: D
531
- } = ya({
531
+ } = Na({
532
532
  channel: e,
533
533
  participant: t,
534
534
  showBlockParticipant: a,
@@ -572,7 +572,7 @@ const ke = ({
572
572
  {
573
573
  id: _,
574
574
  "aria-label": "Conversation options",
575
- className: N(
575
+ className: y(
576
576
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
577
577
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
578
578
  ),
@@ -581,10 +581,10 @@ const ke = ({
581
581
  xe,
582
582
  {
583
583
  onClick: k,
584
- disabled: y,
585
- "aria-busy": y,
584
+ disabled: N,
585
+ "aria-busy": N,
586
586
  children: [
587
- y ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Hn, { className: "h-5 w-5" }),
587
+ N ? /* @__PURE__ */ s(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Hn, { className: "h-5 w-5" }),
588
588
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
589
589
  ]
590
590
  }
@@ -657,7 +657,7 @@ const ke = ({
657
657
  );
658
658
  },
659
659
  [(S = b.state) == null ? void 0 : S.members, v == null ? void 0 : v.userID, b.type]
660
- ), y = xs(p == null ? void 0 : p.user), w = (I = p == null ? void 0 : p.user) == null ? void 0 : I.image, k = bs(b), T = Sa((E = b.data) == null ? void 0 : E.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, A = a && k, D = T || A || !!_, B = async () => {
660
+ ), N = xs(p == null ? void 0 : p.user), w = (I = p == null ? void 0 : p.user) == null ? void 0 : I.image, k = bs(b), T = Sa((E = b.data) == null ? void 0 : E.customer_tag) && (p == null ? void 0 : p.is_follower) === !0, A = a && k, D = T || A || !!_, B = async () => {
661
661
  try {
662
662
  k ? await b.unpin() : await b.pin();
663
663
  } catch (M) {
@@ -671,7 +671,7 @@ const ke = ({
671
671
  ke,
672
672
  {
673
673
  id: ((C = p == null ? void 0 : p.user) == null ? void 0 : C.id) || b.id || "unknown",
674
- name: y,
674
+ name: N,
675
675
  image: w,
676
676
  shape: "circle",
677
677
  size: 48,
@@ -681,12 +681,12 @@ const ke = ({
681
681
  /* @__PURE__ */ s(
682
682
  "span",
683
683
  {
684
- className: N(
684
+ className: y(
685
685
  "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
686
686
  D ? "pl-3 pr-2" : "px-3"
687
687
  ),
688
688
  children: /* @__PURE__ */ h("span", { className: "flex max-w-full items-center justify-center", children: [
689
- /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: y }),
689
+ /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
690
690
  D && /* @__PURE__ */ h("span", { className: "ml-2 flex gap-1", children: [
691
691
  T && /* @__PURE__ */ s(
692
692
  "span",
@@ -720,7 +720,7 @@ const ke = ({
720
720
  return /* @__PURE__ */ s(
721
721
  "div",
722
722
  {
723
- className: N(
723
+ className: y(
724
724
  "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
725
725
  e
726
726
  ),
@@ -728,7 +728,7 @@ const ke = ({
728
728
  /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
729
729
  "button",
730
730
  {
731
- className: N(
731
+ className: y(
732
732
  Ze,
733
733
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
734
734
  ),
@@ -744,7 +744,7 @@ const ke = ({
744
744
  {
745
745
  type: "button",
746
746
  onClick: _,
747
- "aria-label": `View details for ${y}`,
747
+ "aria-label": `View details for ${N}`,
748
748
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
749
749
  children: L
750
750
  }
@@ -761,7 +761,7 @@ const ke = ({
761
761
  children: /* @__PURE__ */ s(
762
762
  nt,
763
763
  {
764
- className: N("size-5", {
764
+ className: y("size-5", {
765
765
  "text-[#FFD60A]": k,
766
766
  "text-black/90": !k
767
767
  }),
@@ -771,7 +771,7 @@ const ke = ({
771
771
  }
772
772
  ),
773
773
  x && (o !== void 0 ? o : /* @__PURE__ */ s(
774
- Na,
774
+ ya,
775
775
  {
776
776
  channel: b,
777
777
  participant: p,
@@ -811,11 +811,11 @@ const Ta = {
811
811
  isUnlocking: () => !1
812
812
  }, Aa = {
813
813
  LockedAttachment: Ta
814
- }, ys = Se({}), Uo = ys.Provider;
814
+ }, Ns = Se({}), Uo = Ns.Provider;
815
815
  function Ra(e) {
816
- return he(ys)[e] ?? Aa[e];
816
+ return he(Ns)[e] ?? Aa[e];
817
817
  }
818
- const La = R.lazy(() => import("./Card-BzvDr-pU.js")), Ma = R.lazy(() => import("./Card-Bd_oNVXi.js")), Da = () => /* @__PURE__ */ s(
818
+ const La = R.lazy(() => import("./Card-BzvDr-pU.js")), Ma = R.lazy(() => import("./Card-CPjlTEDn.js")), Da = () => /* @__PURE__ */ s(
819
819
  "div",
820
820
  {
821
821
  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)]",
@@ -838,7 +838,7 @@ const La = R.lazy(() => import("./Card-BzvDr-pU.js")), Ma = R.lazy(() => import(
838
838
  }
839
839
  )
840
840
  }
841
- ), Ns = (e) => {
841
+ ), ys = (e) => {
842
842
  var t;
843
843
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
844
844
  }, Ue = (e) => {
@@ -855,14 +855,14 @@ const La = R.lazy(() => import("./Card-BzvDr-pU.js")), Ma = R.lazy(() => import(
855
855
  return lt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
856
856
  }, Fa = (e) => {
857
857
  var t;
858
- return Ns(e) && !!((t = e.metadata) != null && t.amount_text);
858
+ return ys(e) && !!((t = e.metadata) != null && t.amount_text);
859
859
  }, Yt = ({
860
860
  message: e,
861
861
  isMyMessage: t = !1,
862
862
  hasAttachment: n = !1
863
863
  }) => {
864
864
  var m;
865
- const a = Ns(e), r = Ue(e);
865
+ const a = ys(e), r = Ue(e);
866
866
  if (!a && !r)
867
867
  return null;
868
868
  if (a) {
@@ -999,7 +999,7 @@ const La = R.lazy(() => import("./Card-BzvDr-pU.js")), Ma = R.lazy(() => import(
999
999
  /* @__PURE__ */ s(
1000
1000
  "span",
1001
1001
  {
1002
- className: N("sent-message-outbound-name", {
1002
+ className: y("sent-message-outbound-name", {
1003
1003
  "underline [text-decoration-skip-ink:auto]": !!t
1004
1004
  }),
1005
1005
  "data-testid": "sent-message-outbound-status",
@@ -1102,7 +1102,7 @@ const er = {
1102
1102
  fullWidth: n = !0,
1103
1103
  standalone: a = !1
1104
1104
  }) => {
1105
- const r = t.variant ?? "primary", i = N(
1105
+ const r = t.variant ?? "primary", i = y(
1106
1106
  "inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
1107
1107
  n ? "w-full" : "min-w-0",
1108
1108
  !a && "mt-2",
@@ -1159,25 +1159,25 @@ const er = {
1159
1159
  const g = e === "dark", o = a ?? (g ? r : void 0) ?? "", x = o.trim() !== "", _ = i != null && i.trim() !== "", b = typeof l == "string" ? l.trim() : "", v = b !== "", p = u != null;
1160
1160
  if (!m && !x && !_ && !v && !p)
1161
1161
  return null;
1162
- const y = g && !a, w = N(
1162
+ const N = g && !a, w = y(
1163
1163
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
1164
- n == null && (y ? sr : tr[e])
1165
- ), k = N(
1164
+ n == null && (N ? sr : tr[e])
1165
+ ), k = y(
1166
1166
  "truncate text-[12px] leading-4 tracking-[0.24px]",
1167
1167
  n == null && qt[e]
1168
- ), T = N(
1168
+ ), T = y(
1169
1169
  "text-[12px] leading-4 tracking-[0.24px]",
1170
1170
  c <= 1 && "truncate",
1171
1171
  n == null && qt[e]
1172
1172
  );
1173
1173
  if (m) {
1174
- const B = N(
1174
+ const B = y(
1175
1175
  "animate-pulse rounded",
1176
1176
  nr[e]
1177
1177
  );
1178
1178
  return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
1179
- /* @__PURE__ */ s("div", { className: N("h-5 w-3/4", B), "aria-hidden": !0 }),
1180
- /* @__PURE__ */ s("div", { className: N("h-4 w-1/2", B), "aria-hidden": !0 })
1179
+ /* @__PURE__ */ s("div", { className: y("h-5 w-3/4", B), "aria-hidden": !0 }),
1180
+ /* @__PURE__ */ s("div", { className: y("h-4 w-1/2", B), "aria-hidden": !0 })
1181
1181
  ] }) });
1182
1182
  }
1183
1183
  const A = n ? { color: n } : void 0, D = c > 1 ? {
@@ -1195,7 +1195,7 @@ const er = {
1195
1195
  /* @__PURE__ */ s(
1196
1196
  "p",
1197
1197
  {
1198
- className: N("min-w-0", w),
1198
+ className: y("min-w-0", w),
1199
1199
  style: A,
1200
1200
  children: o
1201
1201
  }
@@ -1216,16 +1216,17 @@ const er = {
1216
1216
  ] }),
1217
1217
  u && /* @__PURE__ */ s(ks, { variant: t ?? e, cta: u })
1218
1218
  ] });
1219
- }, ar = "Loading link preview", rr = N(
1220
- // Fluid width, capped by a channel-scoped token: default 395px. A read-only
1221
- // surface with no composer (the official channel) sets `--lt-msg-card-width`
1222
- // on its root (see ChannelView). `w-full` fills the content column up to that
1223
- // cap so a card never overflows a narrower viewport — it shrinks to fit.
1224
- "relative max-w-[var(--lt-msg-card-width,395px)] w-full select-none overflow-hidden",
1219
+ }, ar = "Loading link preview", rr = y(
1220
+ // Width is a channel-scoped token: default 290px, but a read-only surface with no
1221
+ // composer (the official channel) sets `--lt-msg-card-width` on its root to widen the
1222
+ // content column (see ChannelView). Consumers that don't set the var keep 290px.
1223
+ // `max-w-full` caps the card to its container so a widened value can never overflow
1224
+ // horizontally on a narrow (sub-393px) viewport — it shrinks to fit instead.
1225
+ "relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden",
1225
1226
  // 20px corners — no token exists for it in the component-library preset,
1226
1227
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
1227
1228
  "rounded-[20px]"
1228
- ), ir = "flex h-[250px] flex-col", Ne = ({
1229
+ ), ir = "flex h-[250px] flex-col", ye = ({
1229
1230
  variant: e,
1230
1231
  children: t,
1231
1232
  href: n,
@@ -1239,7 +1240,7 @@ const er = {
1239
1240
  busy: f = !1,
1240
1241
  "data-testid": m
1241
1242
  }) => {
1242
- const g = n != null || a != null, o = N(
1243
+ const g = n != null || a != null, o = y(
1243
1244
  "messaging-link-card",
1244
1245
  rr,
1245
1246
  u ? ir : "block",
@@ -1292,7 +1293,7 @@ const er = {
1292
1293
  "aria-label": r,
1293
1294
  "data-testid": m,
1294
1295
  "data-variant": e,
1295
- className: N(o, "text-left"),
1296
+ className: y(o, "text-left"),
1296
1297
  style: _,
1297
1298
  ...x,
1298
1299
  children: [
@@ -1391,7 +1392,7 @@ const Kt = {
1391
1392
  ) }) : /* @__PURE__ */ h(
1392
1393
  "div",
1393
1394
  {
1394
- className: N(
1395
+ className: y(
1395
1396
  // `flex-1 min-h-0` inside the shell's 250px column: the hero takes
1396
1397
  // every pixel the chin doesn't, which is 168px at a two-line title
1397
1398
  // and 188px at one.
@@ -1408,7 +1409,7 @@ const Kt = {
1408
1409
  /* @__PURE__ */ s(
1409
1410
  "div",
1410
1411
  {
1411
- className: N(
1412
+ className: y(
1412
1413
  "h-full w-full animate-pulse",
1413
1414
  Kt[e]
1414
1415
  ),
@@ -1452,7 +1453,7 @@ const Kt = {
1452
1453
  ) : /* @__PURE__ */ s(
1453
1454
  "div",
1454
1455
  {
1455
- className: N(
1456
+ className: y(
1456
1457
  "flex h-full w-full items-center justify-center",
1457
1458
  Kt[e]
1458
1459
  ),
@@ -1527,13 +1528,13 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1527
1528
  thumbnailUrl: c,
1528
1529
  mimeType: i,
1529
1530
  sourceUrl: l
1530
- }), y = o ? /* @__PURE__ */ s(
1531
+ }), N = o ? /* @__PURE__ */ s(
1531
1532
  "button",
1532
1533
  {
1533
1534
  type: "button",
1534
1535
  onClick: o,
1535
1536
  "aria-label": _,
1536
- className: N(
1537
+ className: y(
1537
1538
  pr,
1538
1539
  !v && br
1539
1540
  ),
@@ -1549,7 +1550,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1549
1550
  children: /* @__PURE__ */ s(ia, { className: "size-5", weight: "regular" })
1550
1551
  }
1551
1552
  ) : void 0;
1552
- return v && !p.isLoading ? /* @__PURE__ */ s(Ne, { variant: "dark", bgClassName: ht, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
1553
+ return v && !p.isLoading ? /* @__PURE__ */ s(ye, { variant: "dark", bgClassName: ht, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
1553
1554
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
1554
1555
  Ce,
1555
1556
  {
@@ -1559,15 +1560,15 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1559
1560
  mimeType: i
1560
1561
  }
1561
1562
  ) }),
1562
- y && /* @__PURE__ */ s("div", { className: "shrink-0", children: y })
1563
+ N && /* @__PURE__ */ s("div", { className: "shrink-0", children: N })
1563
1564
  ] }) }) : /* @__PURE__ */ h(
1564
- Ne,
1565
+ ye,
1565
1566
  {
1566
1567
  variant: "dark",
1567
1568
  fixedHeight: !b,
1568
1569
  accentHex: p.accentHex,
1569
1570
  busy: p.isLoading,
1570
- topRight: b ? y : void 0,
1571
+ topRight: b ? N : void 0,
1571
1572
  children: [
1572
1573
  !b && /* @__PURE__ */ s(
1573
1574
  Ce,
@@ -1577,7 +1578,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1577
1578
  sourceUrl: l,
1578
1579
  title: e,
1579
1580
  mimeType: i,
1580
- topRight: y,
1581
+ topRight: N,
1581
1582
  isLoading: p.isLoading,
1582
1583
  onImageError: p.onImageError
1583
1584
  }
@@ -1620,7 +1621,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1620
1621
  "data-testid": "link-card-tail",
1621
1622
  "data-variant": t === "sender" ? "dark" : "light",
1622
1623
  style: e ? { "--accent": e } : void 0,
1623
- className: N(
1624
+ className: y(
1624
1625
  "messaging-link-card-tail",
1625
1626
  t === "receiver" && "messaging-link-card-tail--received"
1626
1627
  )
@@ -1643,7 +1644,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1643
1644
  onClick: g,
1644
1645
  groupPosition: o = "single"
1645
1646
  }) => {
1646
- const x = mt(r, c), _ = dt(a), b = u == null && _ != null && !x ? _ : void 0, v = u == null && !x ? g : void 0, p = m !== "loading" && Te(r, c) ? ht : void 0, y = u && g ? {
1647
+ const x = mt(r, c), _ = dt(a), b = u == null && _ != null && !x ? _ : void 0, v = u == null && !x ? g : void 0, p = m !== "loading" && Te(r, c) ? ht : void 0, N = u && g ? {
1647
1648
  ...u,
1648
1649
  onClick: () => {
1649
1650
  var k;
@@ -1665,7 +1666,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1665
1666
  side: "receiver",
1666
1667
  visible: p == null && (o === "single" || o === "end"),
1667
1668
  children: /* @__PURE__ */ h(
1668
- Ne,
1669
+ ye,
1669
1670
  {
1670
1671
  variant: "light",
1671
1672
  href: b,
@@ -1700,7 +1701,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1700
1701
  descriptionLines: n,
1701
1702
  url: a,
1702
1703
  appIcon: d,
1703
- cta: y,
1704
+ cta: N,
1704
1705
  isLoading: w.isLoading
1705
1706
  }
1706
1707
  )
@@ -1726,7 +1727,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1726
1727
  onClick: o,
1727
1728
  groupPosition: x = "single"
1728
1729
  }) => {
1729
- const _ = mt(i, l), b = dt(r), v = f == null && b != null && !_ ? b : void 0, p = f == null && !_ && v != null ? o : void 0, y = g !== "loading" && Te(i, l), w = Ye({
1730
+ const _ = mt(i, l), b = dt(r), v = f == null && b != null && !_ ? b : void 0, p = f == null && !_ && v != null ? o : void 0, N = g !== "loading" && Te(i, l), w = Ye({
1730
1731
  variant: "dark",
1731
1732
  accentColor: m,
1732
1733
  status: g,
@@ -1740,17 +1741,17 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1740
1741
  {
1741
1742
  accentHex: w.accentHex,
1742
1743
  side: "sender",
1743
- visible: !y && (x === "single" || x === "end"),
1744
+ visible: !N && (x === "single" || x === "end"),
1744
1745
  children: /* @__PURE__ */ h(
1745
- Ne,
1746
+ ye,
1746
1747
  {
1747
1748
  variant: "dark",
1748
1749
  href: v,
1749
1750
  onClick: p,
1750
- fixedHeight: d === "featured" && !y,
1751
+ fixedHeight: d === "featured" && !N,
1751
1752
  accentHex: w.accentHex,
1752
1753
  busy: w.isLoading,
1753
- bgClassName: y ? ht : void 0,
1754
+ bgClassName: N ? ht : void 0,
1754
1755
  children: [
1755
1756
  d === "featured" && /* @__PURE__ */ s(
1756
1757
  Ce,
@@ -1792,10 +1793,10 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1792
1793
  }, _r = {
1793
1794
  dark: "bg-[#1e2330]",
1794
1795
  light: "bg-[#f2f1ef]"
1795
- }, yr = {
1796
+ }, Nr = {
1796
1797
  dark: "text-white",
1797
1798
  light: "text-[#000000]"
1798
- }, Nr = {
1799
+ }, yr = {
1799
1800
  dark: "border-white/[0.08]",
1800
1801
  light: "border-black/[0.08]"
1801
1802
  }, Cr = (e) => e === "dark" ? "sender" : "receiver", Sr = {
@@ -1829,7 +1830,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1829
1830
  {
1830
1831
  "data-testid": u,
1831
1832
  "data-group-position": a,
1832
- className: N(
1833
+ className: y(
1833
1834
  // Defaults describe a 280px-wide document / audio / link
1834
1835
  // bubble: that width matches the mobile chat attachment and
1835
1836
  // the 8px / 16px inset matches `--str-chat__spacing-2
@@ -1853,9 +1854,9 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1853
1854
  f && "pb-0",
1854
1855
  m,
1855
1856
  _r[e],
1856
- yr[e],
1857
+ Nr[e],
1857
1858
  n && "border",
1858
- n && Nr[e],
1859
+ n && yr[e],
1859
1860
  l
1860
1861
  ),
1861
1862
  children: [
@@ -1863,7 +1864,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1863
1864
  f ? /* @__PURE__ */ s(
1864
1865
  "p",
1865
1866
  {
1866
- className: N(
1867
+ className: y(
1867
1868
  // No `text-*` / `font-*` overrides here — caption inherits
1868
1869
  // the same font family + size as `.str-chat__message-text`
1869
1870
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -1895,7 +1896,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1895
1896
  a.stopPropagation(), e();
1896
1897
  },
1897
1898
  "aria-label": n,
1898
- className: N(
1899
+ className: y(
1899
1900
  "flex size-6 items-center justify-center rounded-full text-white",
1900
1901
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
1901
1902
  ),
@@ -2029,13 +2030,13 @@ const Pr = {
2029
2030
  const d = n ?? t ?? "File", u = Or(a, t, r), f = /* @__PURE__ */ s(
2030
2031
  "div",
2031
2032
  {
2032
- className: N(
2033
+ className: y(
2033
2034
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
2034
2035
  Br[e]
2035
2036
  ),
2036
2037
  "aria-hidden": !0,
2037
2038
  children: Is(a, {
2038
- className: N("size-6", Fr[e]),
2039
+ className: y("size-6", Fr[e]),
2039
2040
  weight: "regular"
2040
2041
  })
2041
2042
  }
@@ -2044,7 +2045,7 @@ const Pr = {
2044
2045
  u ? /* @__PURE__ */ s(
2045
2046
  "p",
2046
2047
  {
2047
- className: N(
2048
+ className: y(
2048
2049
  "truncate text-xs leading-4",
2049
2050
  Pr[e]
2050
2051
  ),
@@ -2057,7 +2058,7 @@ const Pr = {
2057
2058
  type: "button",
2058
2059
  onClick: i,
2059
2060
  "aria-label": c,
2060
- className: N(
2061
+ className: y(
2061
2062
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
2062
2063
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
2063
2064
  ),
@@ -2149,7 +2150,7 @@ const zr = ({
2149
2150
  const _ = /* @__PURE__ */ s(
2150
2151
  "span",
2151
2152
  {
2152
- className: N(
2153
+ className: y(
2153
2154
  "flex size-8 items-center justify-center rounded-full",
2154
2155
  m === "dark" ? "text-white/70" : "text-black/70"
2155
2156
  ),
@@ -2224,7 +2225,7 @@ const zr = ({
2224
2225
  }));
2225
2226
  },
2226
2227
  [l, e, t, c]
2227
- ), f = r ?? n !== "pill", g = { className: N(
2228
+ ), f = r ?? n !== "pill", g = { className: y(
2228
2229
  n === "pill" ? "size-4" : "size-5",
2229
2230
  "shrink-0"
2230
2231
  ), weight: "bold" };
@@ -2235,7 +2236,7 @@ const zr = ({
2235
2236
  onClick: u,
2236
2237
  disabled: l,
2237
2238
  "aria-label": a,
2238
- className: N(
2239
+ className: y(
2239
2240
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
2240
2241
  {
2241
2242
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -2275,7 +2276,7 @@ const zr = ({
2275
2276
  onClick: u,
2276
2277
  disabled: l,
2277
2278
  "aria-label": f ? a : void 0,
2278
- className: N(
2279
+ className: y(
2279
2280
  "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70",
2280
2281
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
2281
2282
  ),
@@ -2483,7 +2484,7 @@ const zr = ({
2483
2484
  if (i === 0) return null;
2484
2485
  const c = e.slice(0, Math.min(i, n)), l = i - c.length, d = (f, m, g) => {
2485
2486
  var x;
2486
- const o = N(
2487
+ const o = y(
2487
2488
  Gr,
2488
2489
  "h-full w-full",
2489
2490
  (x = Yr[c.length]) == null ? void 0 : x[m]
@@ -2494,7 +2495,7 @@ const zr = ({
2494
2495
  type: "button",
2495
2496
  onClick: () => t(m),
2496
2497
  "aria-label": f.ariaLabel ?? `Open media ${m + 1}`,
2497
- className: N(o, "cursor-zoom-in"),
2498
+ className: y(o, "cursor-zoom-in"),
2498
2499
  children: [
2499
2500
  f.content,
2500
2501
  g
@@ -2517,7 +2518,7 @@ const zr = ({
2517
2518
  }), c.length === 1 ? /* @__PURE__ */ s(
2518
2519
  "div",
2519
2520
  {
2520
- className: N(
2521
+ className: y(
2521
2522
  a ? Xr : "aspect-square w-full",
2522
2523
  r
2523
2524
  ),
@@ -2527,7 +2528,7 @@ const zr = ({
2527
2528
  ) : c.length === 2 ? /* @__PURE__ */ s(
2528
2529
  "div",
2529
2530
  {
2530
- className: N(
2531
+ className: y(
2531
2532
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2532
2533
  r
2533
2534
  ),
@@ -2536,7 +2537,7 @@ const zr = ({
2536
2537
  ) : c.length === 3 ? /* @__PURE__ */ h(
2537
2538
  "div",
2538
2539
  {
2539
- className: N(
2540
+ className: y(
2540
2541
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2541
2542
  r
2542
2543
  ),
@@ -2549,7 +2550,7 @@ const zr = ({
2549
2550
  ) : /* @__PURE__ */ s(
2550
2551
  "div",
2551
2552
  {
2552
- className: N(
2553
+ className: y(
2553
2554
  // 379x286 is the content box of Figma's 383x290 stacked-media
2554
2555
  // card (`attachment-single-image` 1973:13863) once its 2px
2555
2556
  // frame is removed. Pinning the aspect on the container — as
@@ -2685,9 +2686,9 @@ const zr = ({
2685
2686
  if (u.length === 0)
2686
2687
  return null;
2687
2688
  const v = u.map(
2688
- (p, y) => Kr({
2689
+ (p, N) => Kr({
2689
2690
  item: p,
2690
- index: y,
2691
+ index: N,
2691
2692
  totalCount: u.length,
2692
2693
  fallbackLoading: l,
2693
2694
  imgRef: _ ? b.imgRef : void 0,
@@ -2835,8 +2836,8 @@ const zr = ({
2835
2836
  groupPosition: l,
2836
2837
  "data-testid": "pdf-attachment",
2837
2838
  children: [
2838
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((p, y) => {
2839
- const w = p.filename ?? ie(p.src), k = b && y === 0 ? /* @__PURE__ */ s(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2839
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((p, N) => {
2840
+ const w = p.filename ?? ie(p.src), k = b && N === 0 ? /* @__PURE__ */ s(Re, { onClick: u, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2840
2841
  Ms,
2841
2842
  {
2842
2843
  url: p.src,
@@ -2851,11 +2852,11 @@ const zr = ({
2851
2852
  {
2852
2853
  variant: f,
2853
2854
  item: p,
2854
- index: y,
2855
+ index: N,
2855
2856
  onActivate: x,
2856
2857
  trailingAction: k
2857
2858
  },
2858
- `${p.src}-${y}`
2859
+ `${p.src}-${N}`
2859
2860
  );
2860
2861
  }) }),
2861
2862
  /* @__PURE__ */ s(
@@ -3076,7 +3077,7 @@ function Qt(e) {
3076
3077
  status: "ready"
3077
3078
  };
3078
3079
  }
3079
- function yi(e) {
3080
+ function Ni(e) {
3080
3081
  var t;
3081
3082
  return ot(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;
3082
3083
  }
@@ -3102,12 +3103,12 @@ function js(e) {
3102
3103
  a(r);
3103
3104
  continue;
3104
3105
  }
3105
- const i = yi(r);
3106
+ const i = Ni(r);
3106
3107
  i && n(i, r);
3107
3108
  }
3108
3109
  return t;
3109
3110
  }
3110
- function Ni(e) {
3111
+ function yi(e) {
3111
3112
  return e.filter((t) => t.type === "media").length;
3112
3113
  }
3113
3114
  function Ci(e, t, n) {
@@ -3196,22 +3197,22 @@ const Ti = ({
3196
3197
  var b;
3197
3198
  const r = js(n.attachments);
3198
3199
  if (r.length === 0) return null;
3199
- const i = Ni(r), c = (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, u = c && _i(c, d) ? void 0 : c;
3200
+ const i = yi(r), c = (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, u = c && _i(c, d) ? void 0 : c;
3200
3201
  let f = 0;
3201
- const m = [], g = u ? "middle" : e, o = e === "single" || e === "end", x = (v, p, y) => {
3202
+ const m = [], g = u ? "middle" : e, o = e === "single" || e === "end", x = (v, p, N) => {
3202
3203
  const w = t ? at.Sent : at.Received;
3203
3204
  m.push(
3204
3205
  /* @__PURE__ */ s(
3205
3206
  w,
3206
3207
  {
3207
3208
  ...Qt(v),
3208
- groupPosition: y ? g : "middle"
3209
+ groupPosition: N ? g : "middle"
3209
3210
  },
3210
3211
  p
3211
3212
  )
3212
3213
  );
3213
3214
  }, _ = (v, p) => {
3214
- const y = Ci(
3215
+ const N = Ci(
3215
3216
  f,
3216
3217
  i,
3217
3218
  e
@@ -3220,7 +3221,7 @@ const Ti = ({
3220
3221
  /* @__PURE__ */ s(
3221
3222
  Ii,
3222
3223
  {
3223
- groupPosition: y,
3224
+ groupPosition: N,
3224
3225
  isMyMessage: t,
3225
3226
  segment: v
3226
3227
  },
@@ -3229,13 +3230,13 @@ const Ti = ({
3229
3230
  );
3230
3231
  };
3231
3232
  return r.forEach((v, p) => {
3232
- const y = p === r.length - 1;
3233
+ const N = p === r.length - 1;
3233
3234
  if (v.type === "link") {
3234
3235
  v.attachments.forEach((w, k) => {
3235
3236
  x(
3236
3237
  w,
3237
3238
  `link-${p}-${k}`,
3238
- y && k === v.attachments.length - 1
3239
+ N && k === v.attachments.length - 1
3239
3240
  );
3240
3241
  });
3241
3242
  return;
@@ -3262,7 +3263,7 @@ const Ti = ({
3262
3263
  u ? /* @__PURE__ */ h(
3263
3264
  "div",
3264
3265
  {
3265
- className: N("str-chat__message-bubble", {
3266
+ className: y("str-chat__message-bubble", {
3266
3267
  "relative isolate": o
3267
3268
  }),
3268
3269
  children: [
@@ -3294,7 +3295,7 @@ const Ti = ({
3294
3295
  viewerLanguage: b,
3295
3296
  onOutboundClick: v,
3296
3297
  resolvedOutbound: p
3297
- } = e, { client: y } = Ge("CustomMessage"), { channel: w } = be("CustomMessage"), { isUnlocking: k, onUnlockClick: T, onFetchSource: A, onDownloadClick: D } = Ra("LockedAttachment"), [B, L] = $(!1), S = on(o.id), {
3298
+ } = e, { client: N } = Ge("CustomMessage"), { channel: w } = be("CustomMessage"), { isUnlocking: k, onUnlockClick: T, onFetchSource: A, onDownloadClick: D } = Ra("LockedAttachment"), [B, L] = $(!1), S = on(o.id), {
3298
3299
  Attachment: I = ln,
3299
3300
  EditMessageModal: E = cn,
3300
3301
  MessageActions: C,
@@ -3333,7 +3334,7 @@ const Ti = ({
3333
3334
  const ae = !_ && !!o.reply_count, ue = !_ && o.show_in_channel && o.parent_id, le = o.status === "failed" && ((Et = o.error) == null ? void 0 : Et.status) !== 403, _t = _n(o);
3334
3335
  let ge;
3335
3336
  le ? ge = () => u(o) : _t && (ge = () => L(!0));
3336
- const Z = g(), qs = N(
3337
+ const Z = g(), qs = y(
3337
3338
  "str-chat__message str-chat__message-simple",
3338
3339
  `str-chat__message--${o.type}`,
3339
3340
  `str-chat__message--${o.status}`,
@@ -3350,7 +3351,7 @@ const Ti = ({
3350
3351
  "str-chat__virtual-message__wrapper--first": r,
3351
3352
  "str-chat__virtual-message__wrapper--group": c
3352
3353
  }
3353
- ), We = o.poll_id && y.polls.fromState(o.poll_id), yt = Ss(o), ve = Ue(o), Ks = lt(o), Xe = !!(P != null && P.length && !o.quoted_message), Nt = ve && Z && Xe, Zs = ee && ne && !o.quoted_message && !We && !Q && !ve, Ct = {
3354
+ ), We = o.poll_id && N.polls.fromState(o.poll_id), Nt = Ss(o), ve = Ue(o), Ks = lt(o), Xe = !!(P != null && P.length && !o.quoted_message), yt = ve && Z && Xe, Zs = ee && ne && !o.quoted_message && !We && !Q && !ve, Ct = {
3354
3355
  contentType: "text",
3355
3356
  amountText: (Tt = o.metadata) == null ? void 0 : Tt.amount_text,
3356
3357
  paymentStatus: (At = o.metadata) == null ? void 0 : At.payment_status,
@@ -3367,7 +3368,7 @@ const Ti = ({
3367
3368
  }, kt = /* @__PURE__ */ h(
3368
3369
  "div",
3369
3370
  {
3370
- className: N("str-chat__message-bubble", {
3371
+ className: y("str-chat__message-bubble", {
3371
3372
  "relative isolate": de
3372
3373
  }),
3373
3374
  children: [
@@ -3384,7 +3385,7 @@ const Ti = ({
3384
3385
  }
3385
3386
  ),
3386
3387
  B && /* @__PURE__ */ s(
3387
- yn,
3388
+ Nn,
3388
3389
  {
3389
3390
  MessageBouncePrompt: U,
3390
3391
  onClose: () => L(!1),
@@ -3415,7 +3416,7 @@ const Ti = ({
3415
3416
  /* @__PURE__ */ s(
3416
3417
  "div",
3417
3418
  {
3418
- className: N("str-chat__message-inner", {
3419
+ className: y("str-chat__message-inner", {
3419
3420
  "str-chat__simple-message--error-failed": le || _t
3420
3421
  }),
3421
3422
  "data-testid": "message-inner",
@@ -3429,7 +3430,7 @@ const Ti = ({
3429
3430
  marginInlineEnd: 0,
3430
3431
  marginInlineStart: 0
3431
3432
  },
3432
- children: yt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
3433
+ children: Nt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
3433
3434
  /* @__PURE__ */ s(Va, { message: o }),
3434
3435
  ((Bt = o.text) == null ? void 0 : Bt.trim()) && kt
3435
3436
  ] }) : Pa(o) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -3485,11 +3486,11 @@ const Ti = ({
3485
3486
  ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h(
3486
3487
  "div",
3487
3488
  {
3488
- className: N("str-chat__message-bubble", {
3489
+ className: y("str-chat__message-bubble", {
3489
3490
  "relative isolate": de
3490
3491
  }),
3491
3492
  children: [
3492
- ve && !Nt && /* @__PURE__ */ s(
3493
+ ve && !yt && /* @__PURE__ */ s(
3493
3494
  Yt,
3494
3495
  {
3495
3496
  message: o,
@@ -3497,7 +3498,7 @@ const Ti = ({
3497
3498
  isMyMessage: Z
3498
3499
  }
3499
3500
  ),
3500
- We && /* @__PURE__ */ s(Nn, { poll: We }),
3501
+ We && /* @__PURE__ */ s(yn, { poll: We }),
3501
3502
  P != null && P.length && !o.quoted_message ? /* @__PURE__ */ s(
3502
3503
  I,
3503
3504
  {
@@ -3525,7 +3526,7 @@ const Ti = ({
3525
3526
  ) })
3526
3527
  }
3527
3528
  ),
3528
- !Ks && !yt && /* @__PURE__ */ s("div", { className: "str-chat__message-footer", children: (!ve || Nt) && /* @__PURE__ */ s(
3529
+ !Ks && !Nt && /* @__PURE__ */ s("div", { className: "str-chat__message-footer", children: (!ve || yt) && /* @__PURE__ */ s(
3529
3530
  Yt,
3530
3531
  {
3531
3532
  message: o,
@@ -3818,11 +3819,11 @@ const Ti = ({
3818
3819
  o = b;
3819
3820
  const p = Array.from(
3820
3821
  g.querySelectorAll(".str-chat__list")
3821
- ).find((w) => w.scrollHeight > w.clientHeight) ?? null, y = p ? p.scrollHeight - p.scrollTop - p.clientHeight < Fi : !1;
3822
+ ).find((w) => w.scrollHeight > w.clientHeight) ?? null, N = p ? p.scrollHeight - p.scrollTop - p.clientHeight < Fi : !1;
3822
3823
  g.style.setProperty(
3823
3824
  "--messaging-composer-height",
3824
3825
  `${b}px`
3825
- ), v && y && p && (p.scrollTop = p.scrollHeight);
3826
+ ), v && N && p && (p.scrollTop = p.scrollHeight);
3826
3827
  };
3827
3828
  if (x(), typeof ResizeObserver > "u")
3828
3829
  return;
@@ -4120,7 +4121,7 @@ function Zi(e, t) {
4120
4121
  const Ji = () => null, Qi = ({ className: e, message: t }) => /* @__PURE__ */ h(
4121
4122
  "div",
4122
4123
  {
4123
- className: N("flex items-center justify-center h-full", e),
4124
+ className: y("flex items-center justify-center h-full", e),
4124
4125
  children: [
4125
4126
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4126
4127
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
@@ -4185,7 +4186,7 @@ const eo = ({
4185
4186
  renderChannelBanner: b,
4186
4187
  customChannelActions: v,
4187
4188
  renderChannelActions: p,
4188
- renderMessage: y,
4189
+ renderMessage: N,
4189
4190
  viewerLanguage: w,
4190
4191
  showChannelInfo: k = !0,
4191
4192
  onParticipantNameClick: T,
@@ -4232,9 +4233,9 @@ const eo = ({
4232
4233
  onOutboundClick: C
4233
4234
  }
4234
4235
  );
4235
- return !y || !X ? K : y(K, X);
4236
+ return !N || !X ? K : N(K, X);
4236
4237
  },
4237
- [C, y, w]
4238
+ [C, N, w]
4238
4239
  );
4239
4240
  return /* @__PURE__ */ s(Cs.Provider, { value: M, children: /* @__PURE__ */ s(
4240
4241
  Dn,
@@ -4349,7 +4350,7 @@ const eo = ({
4349
4350
  composerDisabled: b = !1,
4350
4351
  composerDisabledReason: v,
4351
4352
  dmAgentEnabled: p,
4352
- messageMetadata: y,
4353
+ messageMetadata: N,
4353
4354
  onMessageSent: w,
4354
4355
  showStarButton: k = !1,
4355
4356
  renderChannelBanner: T,
@@ -4372,10 +4373,10 @@ const eo = ({
4372
4373
  const Q = ((ne = e.data) == null ? void 0 : ne.chatbot_paused) === !0, P = p && !Q, se = {
4373
4374
  ...Y,
4374
4375
  ...P && { silent: !0 },
4375
- ...y && {
4376
+ ...N && {
4376
4377
  metadata: {
4377
4378
  ...Y.metadata ?? {},
4378
- ...y
4379
+ ...N
4379
4380
  }
4380
4381
  }
4381
4382
  }, V = {
@@ -4384,7 +4385,7 @@ const eo = ({
4384
4385
  }, ee = await e.sendMessage(se, V);
4385
4386
  return w == null || w(ee), ee;
4386
4387
  },
4387
- [e, p, y, w]
4388
+ [e, p, N, w]
4388
4389
  ), H = j(null);
4389
4390
  q(() => {
4390
4391
  if (!L) return;
@@ -4403,7 +4404,7 @@ const eo = ({
4403
4404
  "div",
4404
4405
  {
4405
4406
  ref: H,
4406
- className: N(
4407
+ className: y(
4407
4408
  "messaging-channel-view h-full flex flex-col",
4408
4409
  d
4409
4410
  ),
@@ -4459,7 +4460,7 @@ const eo = ({
4459
4460
  }
4460
4461
  );
4461
4462
  Vs.displayName = "ChannelView";
4462
- const ye = R.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
4463
+ const Ne = R.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
4463
4464
  /* @__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: "⚠️" }) }),
4464
4465
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4465
4466
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4473,7 +4474,7 @@ const ye = R.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4473
4474
  }
4474
4475
  )
4475
4476
  ] }) }));
4476
- ye.displayName = "ErrorState";
4477
+ Ne.displayName = "ErrorState";
4477
4478
  const Vo = ({
4478
4479
  capabilities: e = {},
4479
4480
  renderMessageInputActions: t,
@@ -4494,7 +4495,7 @@ const Vo = ({
4494
4495
  onParticipantNameClick: b,
4495
4496
  onOutboundClick: v,
4496
4497
  resolveOutbound: p,
4497
- renderMessage: y,
4498
+ renderMessage: N,
4498
4499
  onMessageLinkClick: w,
4499
4500
  showChannelInfo: k,
4500
4501
  composerInput: T,
@@ -4585,13 +4586,13 @@ const Vo = ({
4585
4586
  var V;
4586
4587
  U(null), H(!0), (V = P.current) == null || V.call(P);
4587
4588
  }, []);
4588
- return L ? /* @__PURE__ */ s(Ve, {}) : S ? /* @__PURE__ */ s(ye, { message: S, onBack: I }) : !B || !D ? /* @__PURE__ */ s(
4589
- ye,
4589
+ return L ? /* @__PURE__ */ s(Ve, {}) : S ? /* @__PURE__ */ s(Ne, { message: S, onBack: I }) : !B || !D ? /* @__PURE__ */ s(
4590
+ Ne,
4590
4591
  {
4591
4592
  message: "Not connected to messaging service",
4592
4593
  onBack: I
4593
4594
  }
4594
- ) : F ? /* @__PURE__ */ s(ye, { message: F }) : W && !M ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : M ? /* @__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(
4595
+ ) : F ? /* @__PURE__ */ s(Ne, { message: F }) : W && !M ? /* @__PURE__ */ s(Ne, { message: "Conversation ended" }) : M ? /* @__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(
4595
4596
  Vs,
4596
4597
  {
4597
4598
  channel: M,
@@ -4612,7 +4613,7 @@ const Vo = ({
4612
4613
  onParticipantNameClick: b,
4613
4614
  onOutboundClick: v,
4614
4615
  resolveOutbound: p,
4615
- renderMessage: y,
4616
+ renderMessage: N,
4616
4617
  onMessageLinkClick: w,
4617
4618
  showChannelInfo: k,
4618
4619
  composerInput: T,
@@ -4693,7 +4694,7 @@ const Gs = R.createContext({
4693
4694
  for (let E = S.length - 1; E >= 0; E--)
4694
4695
  if (S[E].type !== "system") return S[E];
4695
4696
  }
4696
- })(), y = (() => {
4697
+ })(), N = (() => {
4697
4698
  var M;
4698
4699
  const S = _s({
4699
4700
  message: v,
@@ -4712,7 +4713,7 @@ const Gs = R.createContext({
4712
4713
  if (S) return S;
4713
4714
  const C = (M = v == null ? void 0 : v.attachments) == null ? void 0 : M[0];
4714
4715
  return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
4715
- })(), w = v != null && v.created_at ? ro(new Date(v.created_at)) : "", k = v ? Ue(v) : !1, T = l ? l(v, y) : `${k ? "✨ " : ""}${y}`, A = n ?? 0;
4716
+ })(), w = v != null && v.created_at ? ro(new Date(v.created_at)) : "", k = v ? Ue(v) : !1, T = l ? l(v, N) : `${k ? "✨ " : ""}${N}`, A = n ?? 0;
4716
4717
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4717
4718
  channelId: t == null ? void 0 : t.id,
4718
4719
  isSelected: f,
@@ -4726,7 +4727,7 @@ const Gs = R.createContext({
4726
4727
  tabIndex: 0,
4727
4728
  onClick: g,
4728
4729
  onKeyDown: o,
4729
- className: N(
4730
+ className: y(
4730
4731
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
4731
4732
  {
4732
4733
  "bg-black/[0.04]": f,
@@ -4750,7 +4751,7 @@ const Gs = R.createContext({
4750
4751
  /* @__PURE__ */ h(
4751
4752
  "h3",
4752
4753
  {
4753
- className: N(
4754
+ className: y(
4754
4755
  "text-sm font-medium truncate text-[#191918]"
4755
4756
  ),
4756
4757
  children: [
@@ -4795,7 +4796,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4795
4796
  }) => {
4796
4797
  const p = R.useRef(0);
4797
4798
  p.current++;
4798
- const { debug: y = !1 } = it(), w = R.useCallback(
4799
+ const { debug: N = !1 } = it(), w = R.useCallback(
4799
4800
  (T) => {
4800
4801
  for (const A of T)
4801
4802
  to(A);
@@ -4803,7 +4804,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4803
4804
  },
4804
4805
  [r]
4805
4806
  );
4806
- y && console.log("📺 [ChannelList] 🔄 RENDER START", {
4807
+ N && console.log("📺 [ChannelList] 🔄 RENDER START", {
4807
4808
  renderCount: p.current,
4808
4809
  selectedChannelId: t == null ? void 0 : t.id,
4809
4810
  filters: n
@@ -4812,7 +4813,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4812
4813
  () => ({
4813
4814
  selectedChannel: t,
4814
4815
  onChannelSelect: e,
4815
- debug: y,
4816
+ debug: N,
4816
4817
  channelPreview: u,
4817
4818
  renderMessagePreview: f,
4818
4819
  viewerLanguage: m
@@ -4820,7 +4821,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4820
4821
  [
4821
4822
  t,
4822
4823
  e,
4823
- y,
4824
+ N,
4824
4825
  u,
4825
4826
  f,
4826
4827
  m
@@ -4829,7 +4830,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4829
4830
  return /* @__PURE__ */ s(
4830
4831
  "div",
4831
4832
  {
4832
- className: N(
4833
+ className: y(
4833
4834
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
4834
4835
  c
4835
4836
  ),
@@ -4858,7 +4859,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4858
4859
  }
4859
4860
  );
4860
4861
  oo.displayName = "ChannelList";
4861
- const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular", uo = () => /* @__PURE__ */ h(G, { children: [
4862
+ const lo = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", co = "text-[14px] leading-5 tracking-[0.02em]", uo = () => /* @__PURE__ */ h(G, { children: [
4862
4863
  /* @__PURE__ */ s("br", {}),
4863
4864
  /* @__PURE__ */ s("span", { "aria-hidden": !0, className: "block h-1.5" })
4864
4865
  ] }), mo = (e) => e.split(/\r?\n/).map((t, n, a) => /* @__PURE__ */ h(R.Fragment, { children: [
@@ -4870,7 +4871,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4870
4871
  return /* @__PURE__ */ s(
4871
4872
  "div",
4872
4873
  {
4873
- className: N(
4874
+ className: y(
4874
4875
  "flex gap-2",
4875
4876
  // `row` is capped (`max-w-[60%]`) and shrinkable (`min-w-0`) so a long
4876
4877
  // or localized secondary label can never grow the footer past the
@@ -4914,7 +4915,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4914
4915
  /* @__PURE__ */ s(
4915
4916
  "p",
4916
4917
  {
4917
- className: N("min-w-0", lo),
4918
+ className: y("min-w-0", lo),
4918
4919
  style: f,
4919
4920
  children: n
4920
4921
  }
@@ -4923,12 +4924,12 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4923
4924
  d && /* @__PURE__ */ s(
4924
4925
  "p",
4925
4926
  {
4926
- className: N(
4927
+ className: y(
4927
4928
  co,
4928
4929
  r <= 1 && "truncate"
4929
4930
  ),
4930
4931
  style: m,
4931
- children: mo(a ?? "")
4932
+ children: r > 1 ? mo(a ?? "") : a
4932
4933
  }
4933
4934
  )
4934
4935
  ] });
@@ -4973,7 +4974,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4973
4974
  return /* @__PURE__ */ s(
4974
4975
  "div",
4975
4976
  {
4976
- className: N(
4977
+ className: y(
4977
4978
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
4978
4979
  fo[e]
4979
4980
  ),
@@ -5045,7 +5046,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5045
5046
  side: e === "dark" ? "sender" : "receiver",
5046
5047
  visible: x,
5047
5048
  children: /* @__PURE__ */ h(
5048
- Ne,
5049
+ ye,
5049
5050
  {
5050
5051
  variant: e,
5051
5052
  accentHex: o.accentHex,
@@ -5079,9 +5080,9 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5079
5080
  )
5080
5081
  }
5081
5082
  );
5082
- }, yo = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "dark" }), No = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "light" }), Go = {
5083
- Sent: yo,
5084
- Received: No
5083
+ }, No = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "dark" }), yo = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "light" }), Go = {
5084
+ Sent: No,
5085
+ Received: yo
5085
5086
  }, is = `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%`, Co = {
5086
5087
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5087
5088
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
@@ -5119,8 +5120,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5119
5120
  "div",
5120
5121
  {
5121
5122
  "data-dd-privacy": "mask",
5122
- className: N(
5123
- "str-chat__message-bubble",
5123
+ className: y(
5124
5124
  "relative px-4 py-3",
5125
5125
  "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
5126
5126
  r
@@ -5165,7 +5165,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5165
5165
  onClick: t,
5166
5166
  disabled: n,
5167
5167
  style: { backgroundColor: "#E6E5E3" },
5168
- className: N(
5168
+ className: y(
5169
5169
  "w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring",
5170
5170
  {
5171
5171
  "hover:brightness-95 active:brightness-90": !n,
@@ -5255,4 +5255,4 @@ export {
5255
5255
  xs as y,
5256
5256
  Ho as z
5257
5257
  };
5258
- //# sourceMappingURL=index-D0fG7q_k.js.map
5258
+ //# sourceMappingURL=index-BJ1FkeL1.js.map