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

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-C-v4hEGd.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,16 @@ 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
1219
+ }, ar = "Loading link preview", rr = y(
1220
+ // Fluid width, capped by a channel-scoped token: default 290px. A read-only
1221
1221
  // surface with no composer (the official channel) sets `--lt-msg-card-width`
1222
1222
  // on its root (see ChannelView). `w-full` fills the content column up to that
1223
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",
1224
+ "relative max-w-[var(--lt-msg-card-width,290px)] w-full select-none overflow-hidden",
1225
1225
  // 20px corners — no token exists for it in the component-library preset,
1226
1226
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
1227
1227
  "rounded-[20px]"
1228
- ), ir = "flex h-[250px] flex-col", Ne = ({
1228
+ ), ir = "flex h-[250px] flex-col", ye = ({
1229
1229
  variant: e,
1230
1230
  children: t,
1231
1231
  href: n,
@@ -1239,7 +1239,7 @@ const er = {
1239
1239
  busy: f = !1,
1240
1240
  "data-testid": m
1241
1241
  }) => {
1242
- const g = n != null || a != null, o = N(
1242
+ const g = n != null || a != null, o = y(
1243
1243
  "messaging-link-card",
1244
1244
  rr,
1245
1245
  u ? ir : "block",
@@ -1292,7 +1292,7 @@ const er = {
1292
1292
  "aria-label": r,
1293
1293
  "data-testid": m,
1294
1294
  "data-variant": e,
1295
- className: N(o, "text-left"),
1295
+ className: y(o, "text-left"),
1296
1296
  style: _,
1297
1297
  ...x,
1298
1298
  children: [
@@ -1391,7 +1391,7 @@ const Kt = {
1391
1391
  ) }) : /* @__PURE__ */ h(
1392
1392
  "div",
1393
1393
  {
1394
- className: N(
1394
+ className: y(
1395
1395
  // `flex-1 min-h-0` inside the shell's 250px column: the hero takes
1396
1396
  // every pixel the chin doesn't, which is 168px at a two-line title
1397
1397
  // and 188px at one.
@@ -1408,7 +1408,7 @@ const Kt = {
1408
1408
  /* @__PURE__ */ s(
1409
1409
  "div",
1410
1410
  {
1411
- className: N(
1411
+ className: y(
1412
1412
  "h-full w-full animate-pulse",
1413
1413
  Kt[e]
1414
1414
  ),
@@ -1452,7 +1452,7 @@ const Kt = {
1452
1452
  ) : /* @__PURE__ */ s(
1453
1453
  "div",
1454
1454
  {
1455
- className: N(
1455
+ className: y(
1456
1456
  "flex h-full w-full items-center justify-center",
1457
1457
  Kt[e]
1458
1458
  ),
@@ -1527,13 +1527,13 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1527
1527
  thumbnailUrl: c,
1528
1528
  mimeType: i,
1529
1529
  sourceUrl: l
1530
- }), y = o ? /* @__PURE__ */ s(
1530
+ }), N = o ? /* @__PURE__ */ s(
1531
1531
  "button",
1532
1532
  {
1533
1533
  type: "button",
1534
1534
  onClick: o,
1535
1535
  "aria-label": _,
1536
- className: N(
1536
+ className: y(
1537
1537
  pr,
1538
1538
  !v && br
1539
1539
  ),
@@ -1549,7 +1549,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1549
1549
  children: /* @__PURE__ */ s(ia, { className: "size-5", weight: "regular" })
1550
1550
  }
1551
1551
  ) : 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: [
1552
+ 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
1553
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
1554
1554
  Ce,
1555
1555
  {
@@ -1559,15 +1559,15 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1559
1559
  mimeType: i
1560
1560
  }
1561
1561
  ) }),
1562
- y && /* @__PURE__ */ s("div", { className: "shrink-0", children: y })
1562
+ N && /* @__PURE__ */ s("div", { className: "shrink-0", children: N })
1563
1563
  ] }) }) : /* @__PURE__ */ h(
1564
- Ne,
1564
+ ye,
1565
1565
  {
1566
1566
  variant: "dark",
1567
1567
  fixedHeight: !b,
1568
1568
  accentHex: p.accentHex,
1569
1569
  busy: p.isLoading,
1570
- topRight: b ? y : void 0,
1570
+ topRight: b ? N : void 0,
1571
1571
  children: [
1572
1572
  !b && /* @__PURE__ */ s(
1573
1573
  Ce,
@@ -1577,7 +1577,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1577
1577
  sourceUrl: l,
1578
1578
  title: e,
1579
1579
  mimeType: i,
1580
- topRight: y,
1580
+ topRight: N,
1581
1581
  isLoading: p.isLoading,
1582
1582
  onImageError: p.onImageError
1583
1583
  }
@@ -1609,9 +1609,9 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1609
1609
  children: a
1610
1610
  }) => n ? (
1611
1611
  // `isolate` keeps the tail's negative z-index from escaping behind the
1612
- // thread background; `w-fit` stops the wrapper from stretching in the
1613
- // composer's flex list.
1614
- /* @__PURE__ */ h("div", { className: "relative isolate w-fit", children: [
1612
+ // thread background. Same width contract as `CardShell` (`w-full` up to
1613
+ // the channel cap) so a short title cannot shrink the card.
1614
+ /* @__PURE__ */ h("div", { className: "relative isolate w-full max-w-[var(--lt-msg-card-width,290px)]", children: [
1615
1615
  a,
1616
1616
  /* @__PURE__ */ s(
1617
1617
  "span",
@@ -1620,7 +1620,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1620
1620
  "data-testid": "link-card-tail",
1621
1621
  "data-variant": t === "sender" ? "dark" : "light",
1622
1622
  style: e ? { "--accent": e } : void 0,
1623
- className: N(
1623
+ className: y(
1624
1624
  "messaging-link-card-tail",
1625
1625
  t === "receiver" && "messaging-link-card-tail--received"
1626
1626
  )
@@ -1643,7 +1643,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1643
1643
  onClick: g,
1644
1644
  groupPosition: o = "single"
1645
1645
  }) => {
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 ? {
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, N = u && g ? {
1647
1647
  ...u,
1648
1648
  onClick: () => {
1649
1649
  var k;
@@ -1665,7 +1665,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1665
1665
  side: "receiver",
1666
1666
  visible: p == null && (o === "single" || o === "end"),
1667
1667
  children: /* @__PURE__ */ h(
1668
- Ne,
1668
+ ye,
1669
1669
  {
1670
1670
  variant: "light",
1671
1671
  href: b,
@@ -1700,7 +1700,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1700
1700
  descriptionLines: n,
1701
1701
  url: a,
1702
1702
  appIcon: d,
1703
- cta: y,
1703
+ cta: N,
1704
1704
  isLoading: w.isLoading
1705
1705
  }
1706
1706
  )
@@ -1726,7 +1726,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1726
1726
  onClick: o,
1727
1727
  groupPosition: x = "single"
1728
1728
  }) => {
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({
1729
+ 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
1730
  variant: "dark",
1731
1731
  accentColor: m,
1732
1732
  status: g,
@@ -1740,17 +1740,17 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1740
1740
  {
1741
1741
  accentHex: w.accentHex,
1742
1742
  side: "sender",
1743
- visible: !y && (x === "single" || x === "end"),
1743
+ visible: !N && (x === "single" || x === "end"),
1744
1744
  children: /* @__PURE__ */ h(
1745
- Ne,
1745
+ ye,
1746
1746
  {
1747
1747
  variant: "dark",
1748
1748
  href: v,
1749
1749
  onClick: p,
1750
- fixedHeight: d === "featured" && !y,
1750
+ fixedHeight: d === "featured" && !N,
1751
1751
  accentHex: w.accentHex,
1752
1752
  busy: w.isLoading,
1753
- bgClassName: y ? ht : void 0,
1753
+ bgClassName: N ? ht : void 0,
1754
1754
  children: [
1755
1755
  d === "featured" && /* @__PURE__ */ s(
1756
1756
  Ce,
@@ -1792,10 +1792,10 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1792
1792
  }, _r = {
1793
1793
  dark: "bg-[#1e2330]",
1794
1794
  light: "bg-[#f2f1ef]"
1795
- }, yr = {
1795
+ }, Nr = {
1796
1796
  dark: "text-white",
1797
1797
  light: "text-[#000000]"
1798
- }, Nr = {
1798
+ }, yr = {
1799
1799
  dark: "border-white/[0.08]",
1800
1800
  light: "border-black/[0.08]"
1801
1801
  }, Cr = (e) => e === "dark" ? "sender" : "receiver", Sr = {
@@ -1829,7 +1829,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1829
1829
  {
1830
1830
  "data-testid": u,
1831
1831
  "data-group-position": a,
1832
- className: N(
1832
+ className: y(
1833
1833
  // Defaults describe a 280px-wide document / audio / link
1834
1834
  // bubble: that width matches the mobile chat attachment and
1835
1835
  // the 8px / 16px inset matches `--str-chat__spacing-2
@@ -1853,9 +1853,9 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1853
1853
  f && "pb-0",
1854
1854
  m,
1855
1855
  _r[e],
1856
- yr[e],
1856
+ Nr[e],
1857
1857
  n && "border",
1858
- n && Nr[e],
1858
+ n && yr[e],
1859
1859
  l
1860
1860
  ),
1861
1861
  children: [
@@ -1863,7 +1863,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1863
1863
  f ? /* @__PURE__ */ s(
1864
1864
  "p",
1865
1865
  {
1866
- className: N(
1866
+ className: y(
1867
1867
  // No `text-*` / `font-*` overrides here — caption inherits
1868
1868
  // the same font family + size as `.str-chat__message-text`
1869
1869
  // so it matches the surrounding `CustomMessage` bubbles.
@@ -1895,7 +1895,7 @@ const pr = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
1895
1895
  a.stopPropagation(), e();
1896
1896
  },
1897
1897
  "aria-label": n,
1898
- className: N(
1898
+ className: y(
1899
1899
  "flex size-6 items-center justify-center rounded-full text-white",
1900
1900
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
1901
1901
  ),
@@ -2029,13 +2029,13 @@ const Pr = {
2029
2029
  const d = n ?? t ?? "File", u = Or(a, t, r), f = /* @__PURE__ */ s(
2030
2030
  "div",
2031
2031
  {
2032
- className: N(
2032
+ className: y(
2033
2033
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
2034
2034
  Br[e]
2035
2035
  ),
2036
2036
  "aria-hidden": !0,
2037
2037
  children: Is(a, {
2038
- className: N("size-6", Fr[e]),
2038
+ className: y("size-6", Fr[e]),
2039
2039
  weight: "regular"
2040
2040
  })
2041
2041
  }
@@ -2044,7 +2044,7 @@ const Pr = {
2044
2044
  u ? /* @__PURE__ */ s(
2045
2045
  "p",
2046
2046
  {
2047
- className: N(
2047
+ className: y(
2048
2048
  "truncate text-xs leading-4",
2049
2049
  Pr[e]
2050
2050
  ),
@@ -2057,7 +2057,7 @@ const Pr = {
2057
2057
  type: "button",
2058
2058
  onClick: i,
2059
2059
  "aria-label": c,
2060
- className: N(
2060
+ className: y(
2061
2061
  "flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors",
2062
2062
  e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"
2063
2063
  ),
@@ -2149,7 +2149,7 @@ const zr = ({
2149
2149
  const _ = /* @__PURE__ */ s(
2150
2150
  "span",
2151
2151
  {
2152
- className: N(
2152
+ className: y(
2153
2153
  "flex size-8 items-center justify-center rounded-full",
2154
2154
  m === "dark" ? "text-white/70" : "text-black/70"
2155
2155
  ),
@@ -2224,7 +2224,7 @@ const zr = ({
2224
2224
  }));
2225
2225
  },
2226
2226
  [l, e, t, c]
2227
- ), f = r ?? n !== "pill", g = { className: N(
2227
+ ), f = r ?? n !== "pill", g = { className: y(
2228
2228
  n === "pill" ? "size-4" : "size-5",
2229
2229
  "shrink-0"
2230
2230
  ), weight: "bold" };
@@ -2235,7 +2235,7 @@ const zr = ({
2235
2235
  onClick: u,
2236
2236
  disabled: l,
2237
2237
  "aria-label": a,
2238
- className: N(
2238
+ className: y(
2239
2239
  "flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70",
2240
2240
  {
2241
2241
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
@@ -2275,7 +2275,7 @@ const zr = ({
2275
2275
  onClick: u,
2276
2276
  disabled: l,
2277
2277
  "aria-label": f ? a : void 0,
2278
- className: N(
2278
+ className: y(
2279
2279
  "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
2280
  i === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"
2281
2281
  ),
@@ -2483,7 +2483,7 @@ const zr = ({
2483
2483
  if (i === 0) return null;
2484
2484
  const c = e.slice(0, Math.min(i, n)), l = i - c.length, d = (f, m, g) => {
2485
2485
  var x;
2486
- const o = N(
2486
+ const o = y(
2487
2487
  Gr,
2488
2488
  "h-full w-full",
2489
2489
  (x = Yr[c.length]) == null ? void 0 : x[m]
@@ -2494,7 +2494,7 @@ const zr = ({
2494
2494
  type: "button",
2495
2495
  onClick: () => t(m),
2496
2496
  "aria-label": f.ariaLabel ?? `Open media ${m + 1}`,
2497
- className: N(o, "cursor-zoom-in"),
2497
+ className: y(o, "cursor-zoom-in"),
2498
2498
  children: [
2499
2499
  f.content,
2500
2500
  g
@@ -2517,7 +2517,7 @@ const zr = ({
2517
2517
  }), c.length === 1 ? /* @__PURE__ */ s(
2518
2518
  "div",
2519
2519
  {
2520
- className: N(
2520
+ className: y(
2521
2521
  a ? Xr : "aspect-square w-full",
2522
2522
  r
2523
2523
  ),
@@ -2527,7 +2527,7 @@ const zr = ({
2527
2527
  ) : c.length === 2 ? /* @__PURE__ */ s(
2528
2528
  "div",
2529
2529
  {
2530
- className: N(
2530
+ className: y(
2531
2531
  "grid aspect-[16/9] w-full grid-cols-2 gap-0.5",
2532
2532
  r
2533
2533
  ),
@@ -2536,7 +2536,7 @@ const zr = ({
2536
2536
  ) : c.length === 3 ? /* @__PURE__ */ h(
2537
2537
  "div",
2538
2538
  {
2539
- className: N(
2539
+ className: y(
2540
2540
  "grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5",
2541
2541
  r
2542
2542
  ),
@@ -2549,7 +2549,7 @@ const zr = ({
2549
2549
  ) : /* @__PURE__ */ s(
2550
2550
  "div",
2551
2551
  {
2552
- className: N(
2552
+ className: y(
2553
2553
  // 379x286 is the content box of Figma's 383x290 stacked-media
2554
2554
  // card (`attachment-single-image` 1973:13863) once its 2px
2555
2555
  // frame is removed. Pinning the aspect on the container — as
@@ -2685,9 +2685,9 @@ const zr = ({
2685
2685
  if (u.length === 0)
2686
2686
  return null;
2687
2687
  const v = u.map(
2688
- (p, y) => Kr({
2688
+ (p, N) => Kr({
2689
2689
  item: p,
2690
- index: y,
2690
+ index: N,
2691
2691
  totalCount: u.length,
2692
2692
  fallbackLoading: l,
2693
2693
  imgRef: _ ? b.imgRef : void 0,
@@ -2835,8 +2835,8 @@ const zr = ({
2835
2835
  groupPosition: l,
2836
2836
  "data-testid": "pdf-attachment",
2837
2837
  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(
2838
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: m.map((p, N) => {
2839
+ 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
2840
  Ms,
2841
2841
  {
2842
2842
  url: p.src,
@@ -2851,11 +2851,11 @@ const zr = ({
2851
2851
  {
2852
2852
  variant: f,
2853
2853
  item: p,
2854
- index: y,
2854
+ index: N,
2855
2855
  onActivate: x,
2856
2856
  trailingAction: k
2857
2857
  },
2858
- `${p.src}-${y}`
2858
+ `${p.src}-${N}`
2859
2859
  );
2860
2860
  }) }),
2861
2861
  /* @__PURE__ */ s(
@@ -3076,7 +3076,7 @@ function Qt(e) {
3076
3076
  status: "ready"
3077
3077
  };
3078
3078
  }
3079
- function yi(e) {
3079
+ function Ni(e) {
3080
3080
  var t;
3081
3081
  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
3082
  }
@@ -3102,12 +3102,12 @@ function js(e) {
3102
3102
  a(r);
3103
3103
  continue;
3104
3104
  }
3105
- const i = yi(r);
3105
+ const i = Ni(r);
3106
3106
  i && n(i, r);
3107
3107
  }
3108
3108
  return t;
3109
3109
  }
3110
- function Ni(e) {
3110
+ function yi(e) {
3111
3111
  return e.filter((t) => t.type === "media").length;
3112
3112
  }
3113
3113
  function Ci(e, t, n) {
@@ -3196,22 +3196,22 @@ const Ti = ({
3196
3196
  var b;
3197
3197
  const r = js(n.attachments);
3198
3198
  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;
3199
+ 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
3200
  let f = 0;
3201
- const m = [], g = u ? "middle" : e, o = e === "single" || e === "end", x = (v, p, y) => {
3201
+ const m = [], g = u ? "middle" : e, o = e === "single" || e === "end", x = (v, p, N) => {
3202
3202
  const w = t ? at.Sent : at.Received;
3203
3203
  m.push(
3204
3204
  /* @__PURE__ */ s(
3205
3205
  w,
3206
3206
  {
3207
3207
  ...Qt(v),
3208
- groupPosition: y ? g : "middle"
3208
+ groupPosition: N ? g : "middle"
3209
3209
  },
3210
3210
  p
3211
3211
  )
3212
3212
  );
3213
3213
  }, _ = (v, p) => {
3214
- const y = Ci(
3214
+ const N = Ci(
3215
3215
  f,
3216
3216
  i,
3217
3217
  e
@@ -3220,7 +3220,7 @@ const Ti = ({
3220
3220
  /* @__PURE__ */ s(
3221
3221
  Ii,
3222
3222
  {
3223
- groupPosition: y,
3223
+ groupPosition: N,
3224
3224
  isMyMessage: t,
3225
3225
  segment: v
3226
3226
  },
@@ -3229,13 +3229,13 @@ const Ti = ({
3229
3229
  );
3230
3230
  };
3231
3231
  return r.forEach((v, p) => {
3232
- const y = p === r.length - 1;
3232
+ const N = p === r.length - 1;
3233
3233
  if (v.type === "link") {
3234
3234
  v.attachments.forEach((w, k) => {
3235
3235
  x(
3236
3236
  w,
3237
3237
  `link-${p}-${k}`,
3238
- y && k === v.attachments.length - 1
3238
+ N && k === v.attachments.length - 1
3239
3239
  );
3240
3240
  });
3241
3241
  return;
@@ -3262,7 +3262,7 @@ const Ti = ({
3262
3262
  u ? /* @__PURE__ */ h(
3263
3263
  "div",
3264
3264
  {
3265
- className: N("str-chat__message-bubble", {
3265
+ className: y("str-chat__message-bubble", {
3266
3266
  "relative isolate": o
3267
3267
  }),
3268
3268
  children: [
@@ -3294,7 +3294,7 @@ const Ti = ({
3294
3294
  viewerLanguage: b,
3295
3295
  onOutboundClick: v,
3296
3296
  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), {
3297
+ } = 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
3298
  Attachment: I = ln,
3299
3299
  EditMessageModal: E = cn,
3300
3300
  MessageActions: C,
@@ -3333,7 +3333,7 @@ const Ti = ({
3333
3333
  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
3334
  let ge;
3335
3335
  le ? ge = () => u(o) : _t && (ge = () => L(!0));
3336
- const Z = g(), qs = N(
3336
+ const Z = g(), qs = y(
3337
3337
  "str-chat__message str-chat__message-simple",
3338
3338
  `str-chat__message--${o.type}`,
3339
3339
  `str-chat__message--${o.status}`,
@@ -3350,7 +3350,7 @@ const Ti = ({
3350
3350
  "str-chat__virtual-message__wrapper--first": r,
3351
3351
  "str-chat__virtual-message__wrapper--group": c
3352
3352
  }
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 = {
3353
+ ), 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
3354
  contentType: "text",
3355
3355
  amountText: (Tt = o.metadata) == null ? void 0 : Tt.amount_text,
3356
3356
  paymentStatus: (At = o.metadata) == null ? void 0 : At.payment_status,
@@ -3367,7 +3367,7 @@ const Ti = ({
3367
3367
  }, kt = /* @__PURE__ */ h(
3368
3368
  "div",
3369
3369
  {
3370
- className: N("str-chat__message-bubble", {
3370
+ className: y("str-chat__message-bubble", {
3371
3371
  "relative isolate": de
3372
3372
  }),
3373
3373
  children: [
@@ -3384,7 +3384,7 @@ const Ti = ({
3384
3384
  }
3385
3385
  ),
3386
3386
  B && /* @__PURE__ */ s(
3387
- yn,
3387
+ Nn,
3388
3388
  {
3389
3389
  MessageBouncePrompt: U,
3390
3390
  onClose: () => L(!1),
@@ -3415,7 +3415,7 @@ const Ti = ({
3415
3415
  /* @__PURE__ */ s(
3416
3416
  "div",
3417
3417
  {
3418
- className: N("str-chat__message-inner", {
3418
+ className: y("str-chat__message-inner", {
3419
3419
  "str-chat__simple-message--error-failed": le || _t
3420
3420
  }),
3421
3421
  "data-testid": "message-inner",
@@ -3429,7 +3429,7 @@ const Ti = ({
3429
3429
  marginInlineEnd: 0,
3430
3430
  marginInlineStart: 0
3431
3431
  },
3432
- children: yt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
3432
+ children: Nt ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper message-tip-wrapper", children: [
3433
3433
  /* @__PURE__ */ s(Va, { message: o }),
3434
3434
  ((Bt = o.text) == null ? void 0 : Bt.trim()) && kt
3435
3435
  ] }) : Pa(o) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
@@ -3485,11 +3485,11 @@ const Ti = ({
3485
3485
  ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h(
3486
3486
  "div",
3487
3487
  {
3488
- className: N("str-chat__message-bubble", {
3488
+ className: y("str-chat__message-bubble", {
3489
3489
  "relative isolate": de
3490
3490
  }),
3491
3491
  children: [
3492
- ve && !Nt && /* @__PURE__ */ s(
3492
+ ve && !yt && /* @__PURE__ */ s(
3493
3493
  Yt,
3494
3494
  {
3495
3495
  message: o,
@@ -3497,7 +3497,7 @@ const Ti = ({
3497
3497
  isMyMessage: Z
3498
3498
  }
3499
3499
  ),
3500
- We && /* @__PURE__ */ s(Nn, { poll: We }),
3500
+ We && /* @__PURE__ */ s(yn, { poll: We }),
3501
3501
  P != null && P.length && !o.quoted_message ? /* @__PURE__ */ s(
3502
3502
  I,
3503
3503
  {
@@ -3525,7 +3525,7 @@ const Ti = ({
3525
3525
  ) })
3526
3526
  }
3527
3527
  ),
3528
- !Ks && !yt && /* @__PURE__ */ s("div", { className: "str-chat__message-footer", children: (!ve || Nt) && /* @__PURE__ */ s(
3528
+ !Ks && !Nt && /* @__PURE__ */ s("div", { className: "str-chat__message-footer", children: (!ve || yt) && /* @__PURE__ */ s(
3529
3529
  Yt,
3530
3530
  {
3531
3531
  message: o,
@@ -3818,11 +3818,11 @@ const Ti = ({
3818
3818
  o = b;
3819
3819
  const p = Array.from(
3820
3820
  g.querySelectorAll(".str-chat__list")
3821
- ).find((w) => w.scrollHeight > w.clientHeight) ?? null, y = p ? p.scrollHeight - p.scrollTop - p.clientHeight < Fi : !1;
3821
+ ).find((w) => w.scrollHeight > w.clientHeight) ?? null, N = p ? p.scrollHeight - p.scrollTop - p.clientHeight < Fi : !1;
3822
3822
  g.style.setProperty(
3823
3823
  "--messaging-composer-height",
3824
3824
  `${b}px`
3825
- ), v && y && p && (p.scrollTop = p.scrollHeight);
3825
+ ), v && N && p && (p.scrollTop = p.scrollHeight);
3826
3826
  };
3827
3827
  if (x(), typeof ResizeObserver > "u")
3828
3828
  return;
@@ -4120,7 +4120,7 @@ function Zi(e, t) {
4120
4120
  const Ji = () => null, Qi = ({ className: e, message: t }) => /* @__PURE__ */ h(
4121
4121
  "div",
4122
4122
  {
4123
- className: N("flex items-center justify-center h-full", e),
4123
+ className: y("flex items-center justify-center h-full", e),
4124
4124
  children: [
4125
4125
  /* @__PURE__ */ h("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4126
4126
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
@@ -4185,7 +4185,7 @@ const eo = ({
4185
4185
  renderChannelBanner: b,
4186
4186
  customChannelActions: v,
4187
4187
  renderChannelActions: p,
4188
- renderMessage: y,
4188
+ renderMessage: N,
4189
4189
  viewerLanguage: w,
4190
4190
  showChannelInfo: k = !0,
4191
4191
  onParticipantNameClick: T,
@@ -4232,9 +4232,9 @@ const eo = ({
4232
4232
  onOutboundClick: C
4233
4233
  }
4234
4234
  );
4235
- return !y || !X ? K : y(K, X);
4235
+ return !N || !X ? K : N(K, X);
4236
4236
  },
4237
- [C, y, w]
4237
+ [C, N, w]
4238
4238
  );
4239
4239
  return /* @__PURE__ */ s(Cs.Provider, { value: M, children: /* @__PURE__ */ s(
4240
4240
  Dn,
@@ -4349,7 +4349,7 @@ const eo = ({
4349
4349
  composerDisabled: b = !1,
4350
4350
  composerDisabledReason: v,
4351
4351
  dmAgentEnabled: p,
4352
- messageMetadata: y,
4352
+ messageMetadata: N,
4353
4353
  onMessageSent: w,
4354
4354
  showStarButton: k = !1,
4355
4355
  renderChannelBanner: T,
@@ -4372,10 +4372,10 @@ const eo = ({
4372
4372
  const Q = ((ne = e.data) == null ? void 0 : ne.chatbot_paused) === !0, P = p && !Q, se = {
4373
4373
  ...Y,
4374
4374
  ...P && { silent: !0 },
4375
- ...y && {
4375
+ ...N && {
4376
4376
  metadata: {
4377
4377
  ...Y.metadata ?? {},
4378
- ...y
4378
+ ...N
4379
4379
  }
4380
4380
  }
4381
4381
  }, V = {
@@ -4384,7 +4384,7 @@ const eo = ({
4384
4384
  }, ee = await e.sendMessage(se, V);
4385
4385
  return w == null || w(ee), ee;
4386
4386
  },
4387
- [e, p, y, w]
4387
+ [e, p, N, w]
4388
4388
  ), H = j(null);
4389
4389
  q(() => {
4390
4390
  if (!L) return;
@@ -4403,7 +4403,7 @@ const eo = ({
4403
4403
  "div",
4404
4404
  {
4405
4405
  ref: H,
4406
- className: N(
4406
+ className: y(
4407
4407
  "messaging-channel-view h-full flex flex-col",
4408
4408
  d
4409
4409
  ),
@@ -4459,7 +4459,7 @@ const eo = ({
4459
4459
  }
4460
4460
  );
4461
4461
  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: [
4462
+ 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
4463
  /* @__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
4464
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
4465
4465
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -4473,7 +4473,7 @@ const ye = R.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
4473
4473
  }
4474
4474
  )
4475
4475
  ] }) }));
4476
- ye.displayName = "ErrorState";
4476
+ Ne.displayName = "ErrorState";
4477
4477
  const Vo = ({
4478
4478
  capabilities: e = {},
4479
4479
  renderMessageInputActions: t,
@@ -4494,7 +4494,7 @@ const Vo = ({
4494
4494
  onParticipantNameClick: b,
4495
4495
  onOutboundClick: v,
4496
4496
  resolveOutbound: p,
4497
- renderMessage: y,
4497
+ renderMessage: N,
4498
4498
  onMessageLinkClick: w,
4499
4499
  showChannelInfo: k,
4500
4500
  composerInput: T,
@@ -4585,13 +4585,13 @@ const Vo = ({
4585
4585
  var V;
4586
4586
  U(null), H(!0), (V = P.current) == null || V.call(P);
4587
4587
  }, []);
4588
- return L ? /* @__PURE__ */ s(Ve, {}) : S ? /* @__PURE__ */ s(ye, { message: S, onBack: I }) : !B || !D ? /* @__PURE__ */ s(
4589
- ye,
4588
+ return L ? /* @__PURE__ */ s(Ve, {}) : S ? /* @__PURE__ */ s(Ne, { message: S, onBack: I }) : !B || !D ? /* @__PURE__ */ s(
4589
+ Ne,
4590
4590
  {
4591
4591
  message: "Not connected to messaging service",
4592
4592
  onBack: I
4593
4593
  }
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(
4594
+ ) : 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
4595
  Vs,
4596
4596
  {
4597
4597
  channel: M,
@@ -4612,7 +4612,7 @@ const Vo = ({
4612
4612
  onParticipantNameClick: b,
4613
4613
  onOutboundClick: v,
4614
4614
  resolveOutbound: p,
4615
- renderMessage: y,
4615
+ renderMessage: N,
4616
4616
  onMessageLinkClick: w,
4617
4617
  showChannelInfo: k,
4618
4618
  composerInput: T,
@@ -4693,7 +4693,7 @@ const Gs = R.createContext({
4693
4693
  for (let E = S.length - 1; E >= 0; E--)
4694
4694
  if (S[E].type !== "system") return S[E];
4695
4695
  }
4696
- })(), y = (() => {
4696
+ })(), N = (() => {
4697
4697
  var M;
4698
4698
  const S = _s({
4699
4699
  message: v,
@@ -4712,7 +4712,7 @@ const Gs = R.createContext({
4712
4712
  if (S) return S;
4713
4713
  const C = (M = v == null ? void 0 : v.attachments) == null ? void 0 : M[0];
4714
4714
  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;
4715
+ })(), 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
4716
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
4717
4717
  channelId: t == null ? void 0 : t.id,
4718
4718
  isSelected: f,
@@ -4726,7 +4726,7 @@ const Gs = R.createContext({
4726
4726
  tabIndex: 0,
4727
4727
  onClick: g,
4728
4728
  onKeyDown: o,
4729
- className: N(
4729
+ className: y(
4730
4730
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
4731
4731
  {
4732
4732
  "bg-black/[0.04]": f,
@@ -4750,7 +4750,7 @@ const Gs = R.createContext({
4750
4750
  /* @__PURE__ */ h(
4751
4751
  "h3",
4752
4752
  {
4753
- className: N(
4753
+ className: y(
4754
4754
  "text-sm font-medium truncate text-[#191918]"
4755
4755
  ),
4756
4756
  children: [
@@ -4795,7 +4795,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4795
4795
  }) => {
4796
4796
  const p = R.useRef(0);
4797
4797
  p.current++;
4798
- const { debug: y = !1 } = it(), w = R.useCallback(
4798
+ const { debug: N = !1 } = it(), w = R.useCallback(
4799
4799
  (T) => {
4800
4800
  for (const A of T)
4801
4801
  to(A);
@@ -4803,7 +4803,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4803
4803
  },
4804
4804
  [r]
4805
4805
  );
4806
- y && console.log("📺 [ChannelList] 🔄 RENDER START", {
4806
+ N && console.log("📺 [ChannelList] 🔄 RENDER START", {
4807
4807
  renderCount: p.current,
4808
4808
  selectedChannelId: t == null ? void 0 : t.id,
4809
4809
  filters: n
@@ -4812,7 +4812,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4812
4812
  () => ({
4813
4813
  selectedChannel: t,
4814
4814
  onChannelSelect: e,
4815
- debug: y,
4815
+ debug: N,
4816
4816
  channelPreview: u,
4817
4817
  renderMessagePreview: f,
4818
4818
  viewerLanguage: m
@@ -4820,7 +4820,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4820
4820
  [
4821
4821
  t,
4822
4822
  e,
4823
- y,
4823
+ N,
4824
4824
  u,
4825
4825
  f,
4826
4826
  m
@@ -4829,7 +4829,7 @@ const io = { last_message_at: -1 }, oo = R.memo(
4829
4829
  return /* @__PURE__ */ s(
4830
4830
  "div",
4831
4831
  {
4832
- className: N(
4832
+ className: y(
4833
4833
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
4834
4834
  c
4835
4835
  ),
@@ -4870,7 +4870,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4870
4870
  return /* @__PURE__ */ s(
4871
4871
  "div",
4872
4872
  {
4873
- className: N(
4873
+ className: y(
4874
4874
  "flex gap-2",
4875
4875
  // `row` is capped (`max-w-[60%]`) and shrinkable (`min-w-0`) so a long
4876
4876
  // or localized secondary label can never grow the footer past the
@@ -4914,7 +4914,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4914
4914
  /* @__PURE__ */ s(
4915
4915
  "p",
4916
4916
  {
4917
- className: N("min-w-0", lo),
4917
+ className: y("min-w-0", lo),
4918
4918
  style: f,
4919
4919
  children: n
4920
4920
  }
@@ -4923,12 +4923,12 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4923
4923
  d && /* @__PURE__ */ s(
4924
4924
  "p",
4925
4925
  {
4926
- className: N(
4926
+ className: y(
4927
4927
  co,
4928
4928
  r <= 1 && "truncate"
4929
4929
  ),
4930
4930
  style: m,
4931
- children: mo(a ?? "")
4931
+ children: r > 1 ? mo(a ?? "") : a
4932
4932
  }
4933
4933
  )
4934
4934
  ] });
@@ -4973,7 +4973,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
4973
4973
  return /* @__PURE__ */ s(
4974
4974
  "div",
4975
4975
  {
4976
- className: N(
4976
+ className: y(
4977
4977
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
4978
4978
  fo[e]
4979
4979
  ),
@@ -5045,7 +5045,7 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5045
5045
  side: e === "dark" ? "sender" : "receiver",
5046
5046
  visible: x,
5047
5047
  children: /* @__PURE__ */ h(
5048
- Ne,
5048
+ ye,
5049
5049
  {
5050
5050
  variant: e,
5051
5051
  accentHex: o.accentHex,
@@ -5079,9 +5079,9 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5079
5079
  )
5080
5080
  }
5081
5081
  );
5082
- }, yo = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "dark" }), No = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "light" }), Go = {
5083
- Sent: yo,
5084
- Received: No
5082
+ }, No = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "dark" }), yo = (e) => /* @__PURE__ */ s(Ws, { ...e, variant: "light" }), Go = {
5083
+ Sent: No,
5084
+ Received: yo
5085
5085
  }, 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
5086
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5087
5087
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
@@ -5115,13 +5115,13 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5115
5115
  tail: n = !0,
5116
5116
  header: a,
5117
5117
  className: r
5118
- }) => /* @__PURE__ */ h(
5118
+ }) => /* @__PURE__ */ s(
5119
5119
  "div",
5120
5120
  {
5121
5121
  "data-dd-privacy": "mask",
5122
- className: N(
5122
+ className: y(
5123
5123
  "str-chat__message-bubble",
5124
- "relative px-4 py-3",
5124
+ "relative",
5125
5125
  "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]",
5126
5126
  r
5127
5127
  ),
@@ -5130,11 +5130,11 @@ const lo = "line-clamp-2 text-body-small-medium", co = "text-body-small-regular"
5130
5130
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5131
5131
  isolation: "isolate"
5132
5132
  },
5133
- children: [
5133
+ children: /* @__PURE__ */ h("div", { className: "str-chat__message-text", children: [
5134
5134
  a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5135
5135
  /* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
5136
5136
  n && /* @__PURE__ */ s(So, { variant: e })
5137
- ]
5137
+ ] })
5138
5138
  }
5139
5139
  ), Eo = ({
5140
5140
  text: e,
@@ -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-B0knLCIZ.js.map