@linktr.ee/messaging-react 3.24.2-rc-1785435591 → 3.25.0-rc-1785440433

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{Card-Cgn2G-VJ.js → Card-DcyixIfP.js} +2 -2
  2. package/dist/{Card-Cgn2G-VJ.js.map → Card-DcyixIfP.js.map} +1 -1
  3. package/dist/{Card-CRhkz5Jp.cjs → Card-_fDH4x4V.cjs} +2 -2
  4. package/dist/{Card-CRhkz5Jp.cjs.map → Card-_fDH4x4V.cjs.map} +1 -1
  5. package/dist/assets/index.css +1 -1
  6. package/dist/{index-Daw6ObfN.js → index-DSQieSNh.js} +892 -799
  7. package/dist/index-DSQieSNh.js.map +1 -0
  8. package/dist/index-quV01XX7.cjs +2 -0
  9. package/dist/index-quV01XX7.cjs.map +1 -0
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.js +1 -1
  13. package/package.json +2 -2
  14. package/src/components/LinkAttachment/LinkAttachment.stories.tsx +17 -9
  15. package/src/components/LinkAttachment/LinkAttachment.test.tsx +104 -56
  16. package/src/components/LinkAttachment/components/Composer/Card.tsx +1 -1
  17. package/src/components/LinkAttachment/components/Received/Card.tsx +1 -1
  18. package/src/components/LinkAttachment/components/Sent/Card.tsx +1 -1
  19. package/src/components/LinkAttachment/components/_shared/CardBody.tsx +12 -11
  20. package/src/components/LinkAttachment/components/_shared/CardShell.tsx +17 -1
  21. package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +10 -1
  22. package/src/components/LinkAttachment/components/_shared/accentSurface.test.ts +151 -0
  23. package/src/components/LinkAttachment/components/_shared/accentSurface.ts +211 -0
  24. package/src/components/LinkAttachment/components/_shared/chinContrast.test.ts +64 -124
  25. package/src/components/LinkAttachment/components/_shared/chinContrast.ts +68 -71
  26. package/src/components/LinkAttachment/components/_shared/useChinPalette.ts +35 -31
  27. package/src/components/LinkAttachment/types.ts +2 -2
  28. package/src/styles.css +8 -41
  29. package/dist/index-BwfUbPpY.cjs +0 -2
  30. package/dist/index-BwfUbPpY.cjs.map +0 -1
  31. package/dist/index-Daw6ObfN.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  import { jsx as s, jsxs as h, Fragment as J } from "react/jsx-runtime";
2
- import F, { createContext as lt, useContext as ke, useCallback as W, useState as B, useRef as H, useEffect as Y, useId as en, useMemo as ne, Suspense as tn } from "react";
3
- import { StreamChatService as sn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as nn, LinkPreviewsManager as et } from "stream-chat";
5
- import { Chat as an, useChannelStateContext as he, useChatContext as Se, DateSeparator as rn, useMessageContext as fe, MessageStatus as on, MessageErrorIcon as tt, MessageText as ze, areMessageUIPropsEqual as ln, useMessageReminder as cn, useComponentContext as ds, Attachment as dn, EditMessageModal as un, MessageBlocked as mn, MessageBouncePrompt as hn, MessageDeleted as fn, MessageIsThreadReplyInChannelButtonIndicator as gn, MessageRepliesCountButton as pn, ReminderNotification as bn, StreamedMessageText as vn, messageHasAttachments as xn, messageHasReactions as _n, isDateSeparatorMessage as wn, isMessageBlocked as Nn, isMessageBounced as yn, MessageBounceModal as Cn, Poll as kn, useMessageComposer as Sn, useStateStore as En, MessageInput as Yt, useMessageInputContext as In, useMessageComposerHasSendableData as Tn, AttachmentPreviewList as An, QuotedMessagePreview as Ln, TextareaComposer as Mn, MessageTimestamp as Ge, AIStates as Ye, useTypingContext as Rn, useAIState as Dn, Channel as Pn, WithComponents as On, Window as zn, MessageList as Wt, ChannelList as Bn, InfiniteScroll as Fn } from "stream-chat-react";
2
+ import B, { createContext as mt, useContext as ke, useCallback as W, useState as F, useRef as H, useEffect as Y, useId as rn, useMemo as ne, Suspense as on } from "react";
3
+ import { StreamChatService as ln } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as cn, LinkPreviewsManager as st } from "stream-chat";
5
+ import { Chat as dn, useChannelStateContext as he, useChatContext as Se, DateSeparator as un, useMessageContext as fe, MessageStatus as mn, MessageErrorIcon as nt, MessageText as Oe, areMessageUIPropsEqual as hn, useMessageReminder as fn, useComponentContext as gs, Attachment as gn, EditMessageModal as pn, MessageBlocked as bn, MessageBouncePrompt as vn, MessageDeleted as xn, MessageIsThreadReplyInChannelButtonIndicator as _n, MessageRepliesCountButton as wn, ReminderNotification as Nn, StreamedMessageText as yn, messageHasAttachments as Cn, messageHasReactions as kn, isDateSeparatorMessage as Sn, isMessageBlocked as En, isMessageBounced as In, MessageBounceModal as Tn, Poll as An, useMessageComposer as Mn, useStateStore as Ln, MessageInput as Kt, useMessageInputContext as Rn, useMessageComposerHasSendableData as Dn, AttachmentPreviewList as Pn, QuotedMessagePreview as On, TextareaComposer as zn, MessageTimestamp as He, AIStates as Ge, useTypingContext as Fn, useAIState as Bn, Channel as $n, WithComponents as Un, Window as Vn, MessageList as Zt, ChannelList as jn, InfiniteScroll as Hn } from "stream-chat-react";
6
6
  import y from "classnames";
7
- import { StarIcon as st, DotsThreeIcon as $n, SpinnerGapIcon as De, SignOutIcon as Un, ProhibitInsetIcon as qt, FlagIcon as us, CurrencyDollarIcon as Vn, CaretRightIcon as ms, ArrowLeftIcon as jn, FileIcon as hs, ImageIcon as Hn, SpeakerHighIcon as Gn, VideoCameraIcon as fs, FileMdIcon as Yn, FileTextIcon as Wn, FileZipIcon as qn, FilePptIcon as Xn, FileCsvIcon as Kn, FileXlsIcon as Zn, FileDocIcon as Jn, FilePdfIcon as Qn, CircleNotchIcon as ve, PlayIcon as nt, PauseIcon as ea, LinkIcon as ta, DownloadSimpleIcon as Ce, XIcon as ct, CaretLeftIcon as sa, GiftIcon as na, ThumbsUpIcon as aa, ThumbsDownIcon as ra, WarningCircleIcon as ia, MegaphoneIcon as oa, ChecksIcon as la, PencilSimpleIcon as ca, TrashSimpleIcon as da, ArrowUpIcon as ua, SparkleIcon as ma, ProhibitIcon as ha } from "@phosphor-icons/react";
8
- import { isOfficialChannel as fa, OFFICIAL_SENDER_USER_ID as ga, MESSAGE_CUSTOM_TYPE as le, isDmAgentSystemType as Xt, isAgeSafetySystemType as pa, selectEnabledFaqs as ba } from "@linktr.ee/messaging-taxonomy";
9
- import { MessageActions as va, DefaultDropdownActionButton as gs } from "stream-chat-react/experimental";
10
- const ps = lt({
7
+ import { StarIcon as at, DotsThreeIcon as Gn, SpinnerGapIcon as De, SignOutIcon as Yn, ProhibitInsetIcon as Jt, FlagIcon as ps, CurrencyDollarIcon as Wn, CaretRightIcon as bs, ArrowLeftIcon as Xn, FileIcon as vs, ImageIcon as qn, SpeakerHighIcon as Kn, VideoCameraIcon as xs, FileMdIcon as Zn, FileTextIcon as Jn, FileZipIcon as Qn, FilePptIcon as ea, FileCsvIcon as ta, FileXlsIcon as sa, FileDocIcon as na, FilePdfIcon as aa, CircleNotchIcon as ve, PlayIcon as rt, PauseIcon as ra, LinkIcon as ia, DownloadSimpleIcon as Ce, XIcon as ht, CaretLeftIcon as oa, GiftIcon as la, ThumbsUpIcon as ca, ThumbsDownIcon as da, WarningCircleIcon as ua, MegaphoneIcon as ma, ChecksIcon as ha, PencilSimpleIcon as fa, TrashSimpleIcon as ga, ArrowUpIcon as pa, SparkleIcon as ba, ProhibitIcon as va } from "@phosphor-icons/react";
8
+ import { isOfficialChannel as xa, OFFICIAL_SENDER_USER_ID as _a, MESSAGE_CUSTOM_TYPE as le, isDmAgentSystemType as Qt, isAgeSafetySystemType as wa, selectEnabledFaqs as Na } from "@linktr.ee/messaging-taxonomy";
9
+ import { MessageActions as ya, DefaultDropdownActionButton as _s } from "stream-chat-react/experimental";
10
+ const ws = mt({
11
11
  service: null,
12
12
  client: null,
13
13
  isConnected: !1,
@@ -17,7 +17,7 @@ const ps = lt({
17
17
  refreshConnection: async () => {
18
18
  },
19
19
  debug: !1
20
- }), dt = () => ke(ps), Ho = ({
20
+ }), ft = () => ke(ws), il = ({
21
21
  children: e,
22
22
  user: t,
23
23
  serviceConfig: n,
@@ -39,7 +39,7 @@ const ps = lt({
39
39
  serviceConfig: !!n,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, m] = B(null), [f, u] = B(null), [g, c] = B(!1), [x, _] = B(!1), [b, p] = B(null), v = H(!1), w = H(null), C = H(n);
42
+ const [d, m] = F(null), [f, u] = F(null), [g, c] = F(!1), [x, _] = F(!1), [b, p] = F(null), v = H(!1), w = H(null), C = H(n);
43
43
  C.current = n;
44
44
  const T = H(i);
45
45
  T.current = i;
@@ -65,7 +65,7 @@ const ps = lt({
65
65
  capabilities: r
66
66
  };
67
67
  const z = H(null);
68
- !l && a && ((k = z.current) == null ? void 0 : k.apiKey) !== a && (z.current = { apiKey: a, client: new nn(a) });
68
+ !l && a && ((k = z.current) == null ? void 0 : k.apiKey) !== a && (z.current = { apiKey: a, client: new cn(a) });
69
69
  const $ = l || (a ? ((E = z.current) == null ? void 0 : E.client) ?? null : null);
70
70
  Y(() => {
71
71
  const I = R.current, A = C.current;
@@ -84,7 +84,7 @@ const ps = lt({
84
84
  renderCount: I,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
- const U = new sn({
87
+ const U = new ln({
88
88
  ...A,
89
89
  apiKey: a,
90
90
  debug: T.current,
@@ -95,7 +95,7 @@ const ps = lt({
95
95
  serviceInstance: !!U
96
96
  });
97
97
  }, [a, $, l]);
98
- const L = H(null);
98
+ const M = H(null);
99
99
  Y(() => {
100
100
  var A, U;
101
101
  if (o("🔗 USER CONNECTION EFFECT TRIGGERED", {
@@ -115,7 +115,7 @@ const ps = lt({
115
115
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
116
116
  return;
117
117
  }
118
- if (((A = L.current) == null ? void 0 : A.serviceId) === d && ((U = L.current) == null ? void 0 : U.userId) === t.id) {
118
+ if (((A = M.current) == null ? void 0 : A.serviceId) === d && ((U = M.current) == null ? void 0 : U.userId) === t.id) {
119
119
  o(
120
120
  "⚠️ USER CONNECTION SKIPPED",
121
121
  "Already connected this user with this service"
@@ -127,15 +127,15 @@ const ps = lt({
127
127
  try {
128
128
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
129
  const j = await d.connectUser(t);
130
- u(j), c(!0), L.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
130
+ u(j), c(!0), M.current = { serviceId: d, userId: t.id }, o("✅ USER CONNECTION SUCCESS", {
131
131
  userId: t.id,
132
132
  clientId: j.userID
133
133
  });
134
134
  } catch (j) {
135
- const q = j instanceof Error ? j.message : "Connection failed";
136
- p(q), o("❌ USER CONNECTION ERROR", {
135
+ const X = j instanceof Error ? j.message : "Connection failed";
136
+ p(X), o("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
- error: q
138
+ error: X
139
139
  });
140
140
  } finally {
141
141
  _(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
@@ -148,7 +148,7 @@ const ps = lt({
148
148
  const I = $;
149
149
  return () => {
150
150
  var A;
151
- I && (L.current = null, (A = w.current) == null || A.disconnectUser().catch(console.error));
151
+ I && (M.current = null, (A = w.current) == null || A.disconnectUser().catch(console.error));
152
152
  };
153
153
  }, [$]);
154
154
  const S = W(async () => {
@@ -175,7 +175,7 @@ const ps = lt({
175
175
  _(!1), o("🔄 CONNECTION REFRESH FINISHED", { userId: t.id });
176
176
  }
177
177
  }
178
- }, [d, t, o, l]), P = F.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
178
+ }, [d, t, o, l]), P = B.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!d,
180
180
  hasClient: !!f,
181
181
  isConnected: g,
@@ -215,8 +215,8 @@ const ps = lt({
215
215
  renderCount: R.current,
216
216
  willRenderChat: !!$,
217
217
  contextValueReady: !!P
218
- }), /* @__PURE__ */ s(ps.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
- an,
218
+ }), /* @__PURE__ */ s(ws.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
+ dn,
220
220
  {
221
221
  client: $,
222
222
  customClasses: {
@@ -225,9 +225,9 @@ const ps = lt({
225
225
  children: e
226
226
  }
227
227
  ) : e });
228
- }, xa = () => dt(), bs = (e) => {
228
+ }, Ca = () => ft(), Ns = (e) => {
229
229
  var a, r;
230
- const [t, n] = B(
230
+ const [t, n] = F(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
232
232
  );
233
233
  return Y(() => {
@@ -248,13 +248,13 @@ const ps = lt({
248
248
  };
249
249
  }, [e]), t;
250
250
  };
251
- function vs(e, t, n) {
251
+ function ys(e, t, n) {
252
252
  const a = Object.values(e || {});
253
- if (fa(n)) {
253
+ if (xa(n)) {
254
254
  const r = a.find(
255
255
  (i) => {
256
256
  var l;
257
- return ((l = i.user) == null ? void 0 : l.id) === ga;
257
+ return ((l = i.user) == null ? void 0 : l.id) === _a;
258
258
  }
259
259
  );
260
260
  if (r) return r;
@@ -266,18 +266,18 @@ function vs(e, t, n) {
266
266
  }
267
267
  );
268
268
  }
269
- const _a = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
270
- function wa(e) {
271
- return _a.test(e.trim());
269
+ const ka = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
270
+ function Sa(e) {
271
+ return ka.test(e.trim());
272
272
  }
273
- function Kt(e, t) {
273
+ function es(e, t) {
274
274
  const n = e == null ? void 0 : e.trim();
275
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !wa(n);
275
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !Sa(n);
276
276
  }
277
- function xs(e) {
278
- return Kt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Kt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
277
+ function Cs(e) {
278
+ return es(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : es(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
279
279
  }
280
- const Zt = [
280
+ const ts = [
281
281
  { emoji: "🍎", bgColor: "#FFD1DD" },
282
282
  // Apple
283
283
  { emoji: "🍌", bgColor: "#FFF1C9" },
@@ -305,7 +305,7 @@ const Zt = [
305
305
  { emoji: "🍈", bgColor: "#D9F7E1" }
306
306
  // Melon
307
307
  ];
308
- function Na(e) {
308
+ function Ea(e) {
309
309
  let t = 0;
310
310
  for (let n = 0; n < e.length; n++) {
311
311
  const a = e.charCodeAt(n);
@@ -313,14 +313,14 @@ function Na(e) {
313
313
  }
314
314
  return Math.abs(t);
315
315
  }
316
- function _s(e) {
317
- return Zt[Na(e) % Zt.length];
316
+ function ks(e) {
317
+ return ts[Ea(e) % ts.length];
318
318
  }
319
- function ya(e) {
320
- return _s(e).emoji;
319
+ function Ia(e) {
320
+ return ks(e).emoji;
321
321
  }
322
- function Ca(e) {
323
- return _s(e).bgColor;
322
+ function Ta(e) {
323
+ return ks(e).bgColor;
324
324
  }
325
325
  const _e = ({
326
326
  id: e,
@@ -331,7 +331,7 @@ const _e = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: l = !1
333
333
  }) => {
334
- const o = ya(e), d = Ca(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
334
+ const o = Ia(e), d = Ta(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, g = n >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, x = /* @__PURE__ */ s("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ s(
335
335
  "img",
336
336
  {
337
337
  src: t,
@@ -369,7 +369,7 @@ const _e = ({
369
369
  {
370
370
  "aria-hidden": "true",
371
371
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
372
- children: /* @__PURE__ */ s(st, { className: "size-3 text-yellow-600", weight: "duotone" })
372
+ children: /* @__PURE__ */ s(at, { className: "size-3 text-yellow-600", weight: "duotone" })
373
373
  }
374
374
  ),
375
375
  /* @__PURE__ */ s(
@@ -395,7 +395,7 @@ const _e = ({
395
395
  ]
396
396
  }
397
397
  );
398
- }, ka = "https://linktr.ee/s/about/trust-center/report", Sa = ({
398
+ }, Aa = "https://linktr.ee/s/about/trust-center/report", Ma = ({
399
399
  channel: e,
400
400
  participant: t,
401
401
  showBlockParticipant: n = !0,
@@ -409,7 +409,7 @@ const _e = ({
409
409
  logLabel: f = "useChannelModerationActions"
410
410
  }) => {
411
411
  var P;
412
- const { service: u, debug: g } = dt(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [_, b] = B(!1), [p, v] = B(null), [w, C] = B(!1), [T, O] = B(!1), R = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
412
+ const { service: u, debug: g } = ft(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [_, b] = F(!1), [p, v] = F(null), [w, C] = F(!1), [T, O] = F(!1), R = x && ((p == null ? void 0 : p.participantId) !== c || (p == null ? void 0 : p.service) !== u);
413
413
  return Y(() => {
414
414
  if (!x || !u || !c) {
415
415
  b(!1), v(null);
@@ -479,7 +479,7 @@ const _e = ({
479
479
  }
480
480
  },
481
481
  handleReportUser: () => {
482
- d == null || d(), m == null || m(), window.open(ka, "_blank", "noopener,noreferrer");
482
+ d == null || d(), m == null || m(), window.open(Aa, "_blank", "noopener,noreferrer");
483
483
  }
484
484
  };
485
485
  }, we = ({
@@ -499,7 +499,7 @@ const _e = ({
499
499
  ...a,
500
500
  children: n
501
501
  }
502
- ), Ea = ({
502
+ ), La = ({
503
503
  channel: e,
504
504
  participant: t,
505
505
  showDeleteConversation: n = !0,
@@ -513,7 +513,7 @@ const _e = ({
513
513
  customChannelActions: f,
514
514
  triggerClassName: u
515
515
  }) => {
516
- const [g, c] = B(!1), x = H(null), _ = en(), b = W(() => c(!1), []), {
516
+ const [g, c] = F(!1), x = H(null), _ = rn(), b = W(() => c(!1), []), {
517
517
  isParticipantBlocked: p,
518
518
  isCheckingBlockedStatus: v,
519
519
  isLeaving: w,
@@ -522,7 +522,7 @@ const _e = ({
522
522
  handleBlockUser: O,
523
523
  handleUnblockUser: R,
524
524
  handleReportUser: z
525
- } = Sa({
525
+ } = Ma({
526
526
  channel: e,
527
527
  participant: t,
528
528
  showBlockParticipant: a,
@@ -537,13 +537,13 @@ const _e = ({
537
537
  });
538
538
  return Y(() => {
539
539
  if (!g) return;
540
- const L = (P) => {
540
+ const M = (P) => {
541
541
  x.current && !x.current.contains(P.target) && c(!1);
542
542
  }, S = (P) => {
543
543
  P.key === "Escape" && c(!1);
544
544
  };
545
- return document.addEventListener("mousedown", L), document.addEventListener("keydown", S), () => {
546
- document.removeEventListener("mousedown", L), document.removeEventListener("keydown", S);
545
+ return document.addEventListener("mousedown", M), document.addEventListener("keydown", S), () => {
546
+ document.removeEventListener("mousedown", M), document.removeEventListener("keydown", S);
547
547
  };
548
548
  }, [g]), !t || !(n || a || r || !!f) ? null : /* @__PURE__ */ h("div", { ref: x, className: "relative", children: [
549
549
  /* @__PURE__ */ h(
@@ -554,9 +554,9 @@ const _e = ({
554
554
  "aria-haspopup": "true",
555
555
  "aria-expanded": g,
556
556
  "aria-controls": g ? _ : void 0,
557
- onClick: () => c((L) => !L),
557
+ onClick: () => c((M) => !M),
558
558
  children: [
559
- /* @__PURE__ */ s($n, { className: "size-5 text-black/90" }),
559
+ /* @__PURE__ */ s(Gn, { className: "size-5 text-black/90" }),
560
560
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
561
561
  ]
562
562
  }
@@ -578,7 +578,7 @@ const _e = ({
578
578
  disabled: w,
579
579
  "aria-busy": w,
580
580
  children: [
581
- w ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Un, { className: "h-5 w-5" }),
581
+ w ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Yn, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
583
583
  ]
584
584
  }
@@ -597,7 +597,7 @@ const _e = ({
597
597
  disabled: C,
598
598
  "aria-busy": C,
599
599
  children: [
600
- C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
600
+ C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Jt, { className: "h-5 w-5" }),
601
601
  /* @__PURE__ */ s("span", { children: "Unblock" })
602
602
  ]
603
603
  }
@@ -608,13 +608,13 @@ const _e = ({
608
608
  disabled: C,
609
609
  "aria-busy": C,
610
610
  children: [
611
- C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(qt, { className: "h-5 w-5" }),
611
+ C ? /* @__PURE__ */ s(De, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Jt, { className: "h-5 w-5" }),
612
612
  /* @__PURE__ */ s("span", { children: "Block" })
613
613
  ]
614
614
  }
615
615
  ) }),
616
616
  r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ h(we, { variant: "danger", onClick: z, children: [
617
- /* @__PURE__ */ s(us, { className: "h-5 w-5" }),
617
+ /* @__PURE__ */ s(ps, { className: "h-5 w-5" }),
618
618
  /* @__PURE__ */ s("span", { children: "Report" })
619
619
  ] }) }),
620
620
  f
@@ -622,7 +622,7 @@ const _e = ({
622
622
  }
623
623
  )
624
624
  ] });
625
- }, We = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Ia = "CUSTOMER_PAID", Ta = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ia, Aa = ({
625
+ }, Ye = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Ra = "CUSTOMER_PAID", Da = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ra, Pa = ({
626
626
  className: e,
627
627
  onBack: t,
628
628
  showBackButton: n,
@@ -641,17 +641,17 @@ const _e = ({
641
641
  onParticipantNameClick: _
642
642
  }) => {
643
643
  var S, P, k, E;
644
- const { channel: b } = he(), { client: p } = Se(), v = F.useMemo(
644
+ const { channel: b } = he(), { client: p } = Se(), v = B.useMemo(
645
645
  () => {
646
646
  var I;
647
- return vs(
647
+ return ys(
648
648
  (I = b.state) == null ? void 0 : I.members,
649
649
  p == null ? void 0 : p.userID,
650
650
  b.type
651
651
  );
652
652
  },
653
653
  [(S = b.state) == null ? void 0 : S.members, p == null ? void 0 : p.userID, b.type]
654
- ), w = xs(v == null ? void 0 : v.user), C = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, T = bs(b), O = Ta((k = b.data) == null ? void 0 : k.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, R = a && T, z = O || R || !!_, $ = async () => {
654
+ ), w = Cs(v == null ? void 0 : v.user), C = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, T = Ns(b), O = Da((k = b.data) == null ? void 0 : k.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, R = a && T, z = O || R || !!_, $ = async () => {
655
655
  try {
656
656
  T ? await b.unpin() : await b.pin();
657
657
  } catch (I) {
@@ -660,7 +660,7 @@ const _e = ({
660
660
  I
661
661
  );
662
662
  }
663
- }, L = /* @__PURE__ */ h(J, { children: [
663
+ }, M = /* @__PURE__ */ h(J, { children: [
664
664
  /* @__PURE__ */ s(
665
665
  _e,
666
666
  {
@@ -687,7 +687,7 @@ const _e = ({
687
687
  {
688
688
  "aria-label": "Paid customer",
689
689
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
690
- children: /* @__PURE__ */ s(Vn, { className: "size-2.5", weight: "bold" })
690
+ children: /* @__PURE__ */ s(Wn, { className: "size-2.5", weight: "bold" })
691
691
  }
692
692
  ),
693
693
  R && /* @__PURE__ */ s(
@@ -695,11 +695,11 @@ const _e = ({
695
695
  {
696
696
  "aria-label": "Starred conversation",
697
697
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
698
- children: /* @__PURE__ */ s(st, { className: "size-2.5", weight: "fill" })
698
+ children: /* @__PURE__ */ s(at, { className: "size-2.5", weight: "fill" })
699
699
  }
700
700
  ),
701
701
  _ && /* @__PURE__ */ s(
702
- ms,
702
+ bs,
703
703
  {
704
704
  "aria-hidden": "true",
705
705
  className: "size-4 shrink-0 text-black/65",
@@ -723,14 +723,14 @@ const _e = ({
723
723
  "button",
724
724
  {
725
725
  className: y(
726
- We,
726
+ Ye,
727
727
  "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
728
728
  ),
729
729
  onClick: t || (() => {
730
730
  }),
731
731
  type: "button",
732
732
  "aria-label": "Back to conversations",
733
- children: /* @__PURE__ */ s(jn, { className: "size-5 text-black/90" })
733
+ children: /* @__PURE__ */ s(Xn, { className: "size-5 text-black/90" })
734
734
  }
735
735
  ) }),
736
736
  /* @__PURE__ */ s("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: _ ? /* @__PURE__ */ s(
@@ -740,20 +740,20 @@ const _e = ({
740
740
  onClick: _,
741
741
  "aria-label": `View details for ${w}`,
742
742
  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",
743
- children: L
743
+ children: M
744
744
  }
745
- ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: L }) }),
745
+ ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: M }) }),
746
746
  /* @__PURE__ */ h("div", { className: "flex items-start justify-end gap-2", children: [
747
747
  a && /* @__PURE__ */ s(
748
748
  "button",
749
749
  {
750
- className: We,
750
+ className: Ye,
751
751
  onClick: $,
752
752
  type: "button",
753
753
  "aria-pressed": T,
754
754
  "aria-label": T ? "Unstar conversation" : "Star conversation",
755
755
  children: /* @__PURE__ */ s(
756
- st,
756
+ at,
757
757
  {
758
758
  className: y("size-5", {
759
759
  "text-[#FFD60A]": T,
@@ -765,7 +765,7 @@ const _e = ({
765
765
  }
766
766
  ),
767
767
  x && (c !== void 0 ? c : /* @__PURE__ */ s(
768
- Ea,
768
+ La,
769
769
  {
770
770
  channel: b,
771
771
  participant: v,
@@ -778,27 +778,27 @@ const _e = ({
778
778
  onBlockParticipantClick: f,
779
779
  onReportParticipantClick: u,
780
780
  customChannelActions: g,
781
- triggerClassName: We
781
+ triggerClassName: Ye
782
782
  }
783
783
  ))
784
784
  ] })
785
785
  ] })
786
786
  }
787
787
  );
788
- }, La = (e) => /* @__PURE__ */ s(rn, { ...e, position: "center" }), at = "vote_up", rt = "vote_down";
789
- function Ma(e) {
790
- return e != null && e.length ? e.some((t) => t.type === rt) ? "down" : e.some((t) => t.type === at) ? "up" : null : null;
788
+ }, Oa = (e) => /* @__PURE__ */ s(un, { ...e, position: "center" }), it = "vote_up", ot = "vote_down";
789
+ function za(e) {
790
+ return e != null && e.length ? e.some((t) => t.type === ot) ? "down" : e.some((t) => t.type === it) ? "up" : null : null;
791
791
  }
792
- function Ra(e) {
792
+ function Fa(e) {
793
793
  const { channel: t } = he(), { client: n } = Se("useMessageVote"), a = ne(
794
- () => Ma(e.own_reactions),
794
+ () => za(e.own_reactions),
795
795
  [e.own_reactions]
796
796
  ), r = W(async () => {
797
797
  if (n != null && n.userID)
798
798
  try {
799
- a === "up" ? await t.deleteReaction(e.id, at) : await t.sendReaction(
799
+ a === "up" ? await t.deleteReaction(e.id, it) : await t.sendReaction(
800
800
  e.id,
801
- { type: at },
801
+ { type: it },
802
802
  { enforce_unique: !0, skip_push: !0 }
803
803
  );
804
804
  } catch {
@@ -806,9 +806,9 @@ function Ra(e) {
806
806
  }, [t, n == null ? void 0 : n.userID, e.id, a]), i = W(async () => {
807
807
  if (n != null && n.userID)
808
808
  try {
809
- a === "down" ? await t.deleteReaction(e.id, rt) : await t.sendReaction(
809
+ a === "down" ? await t.deleteReaction(e.id, ot) : await t.sendReaction(
810
810
  e.id,
811
- { type: rt },
811
+ { type: ot },
812
812
  { enforce_unique: !0, skip_push: !0 }
813
813
  );
814
814
  } catch {
@@ -816,39 +816,39 @@ function Ra(e) {
816
816
  }, [t, n == null ? void 0 : n.userID, e.id, a]);
817
817
  return { selected: a, voteUp: r, voteDown: i };
818
818
  }
819
- function Da(e) {
819
+ function Ba(e) {
820
820
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
821
821
  }
822
- function ws({
822
+ function Ss({
823
823
  message: e,
824
824
  viewerLanguage: t
825
825
  }) {
826
826
  var r;
827
- const n = e == null ? void 0 : e.text, a = Da(t);
827
+ const n = e == null ? void 0 : e.text, a = Ba(t);
828
828
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
829
829
  }
830
- const Pa = ["linktr.ee"], Jt = "messaging-attachment-v1_0";
831
- function Oa(e) {
830
+ const $a = ["linktr.ee"], ss = "messaging-attachment-v1_0";
831
+ function Ua(e) {
832
832
  try {
833
833
  return new URL(e).hostname.toLowerCase();
834
834
  } catch {
835
835
  return null;
836
836
  }
837
837
  }
838
- function za(e) {
839
- return Pa.some(
838
+ function Va(e) {
839
+ return $a.some(
840
840
  (t) => e === t || e.endsWith(`.${t}`)
841
841
  );
842
842
  }
843
843
  function me(e) {
844
844
  const t = e == null ? void 0 : e.trim();
845
845
  if (!t) return;
846
- const n = Oa(t);
847
- if (!n || !za(n)) return t;
846
+ const n = Ua(t);
847
+ if (!n || !Va(n)) return t;
848
848
  const a = new URL(t);
849
- return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Jt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Jt), a.toString());
849
+ return a.searchParams.get("io") === "true" && a.searchParams.get("size") === ss ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", ss), a.toString());
850
850
  }
851
- const Ba = [
851
+ const ja = [
852
852
  [/pdf/, "pdf"],
853
853
  [/wordprocessingml|msword|\.doc/, "doc"],
854
854
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -861,39 +861,39 @@ const Ba = [
861
861
  function ce(e) {
862
862
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
863
863
  }
864
- function Ns(e) {
865
- const t = Ba.find(
864
+ function Es(e) {
865
+ const t = ja.find(
866
866
  ([n]) => n.test(e)
867
867
  );
868
868
  return t ? t[1] : "generic";
869
869
  }
870
- const Fa = {
871
- video: fs,
872
- audio: Gn,
873
- image: Hn,
874
- document: hs
875
- }, $a = {
876
- pdf: Qn,
877
- doc: Jn,
878
- xls: Zn,
879
- csv: Kn,
880
- ppt: Xn,
881
- zip: qn,
882
- text: Wn,
883
- markdown: Yn,
884
- generic: hs
870
+ const Ha = {
871
+ video: xs,
872
+ audio: Kn,
873
+ image: qn,
874
+ document: vs
875
+ }, Ga = {
876
+ pdf: aa,
877
+ doc: na,
878
+ xls: sa,
879
+ csv: ta,
880
+ ppt: ea,
881
+ zip: Qn,
882
+ text: Jn,
883
+ markdown: Zn,
884
+ generic: vs
885
885
  };
886
- function Ua(e) {
886
+ function Ya(e) {
887
887
  const t = ce(e);
888
- return t !== "document" ? Fa[t] : $a[Ns(e)];
888
+ return t !== "document" ? Ha[t] : Ga[Es(e)];
889
889
  }
890
890
  function xe(e, t) {
891
- return F.createElement(Ua(e), t);
891
+ return B.createElement(Ya(e), t);
892
892
  }
893
- const Va = (e) => {
893
+ const Wa = (e) => {
894
894
  var t, n;
895
895
  return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((n = e.changedTouches[0]) == null ? void 0 : n.clientX) ?? 0 : e.clientX;
896
- }, ja = ({
896
+ }, Xa = ({
897
897
  source: e,
898
898
  mimeType: t,
899
899
  poster: n,
@@ -905,23 +905,23 @@ const Va = (e) => {
905
905
  muted: d = !1,
906
906
  onContainerClick: m
907
907
  }) => {
908
- const f = ce(t), u = H(null), g = H(null), c = H(null), x = H(r), [_, b] = B(a), [p, v] = B(0), [w, C] = B(!1), [T, O] = B(!1), [R, z] = B(!1), [$, L] = B(!1), [S, P] = B(!0), [k, E] = B(null), I = W(() => {
908
+ const f = ce(t), u = H(null), g = H(null), c = H(null), x = H(r), [_, b] = F(a), [p, v] = F(0), [w, C] = F(!1), [T, O] = F(!1), [R, z] = F(!1), [$, M] = F(!1), [S, P] = F(!0), [k, E] = F(null), I = W(() => {
909
909
  z(!1), b(!0);
910
910
  }, []), A = W((N) => {
911
- const M = g.current;
912
- if (!M) return 0;
913
- const G = M.getBoundingClientRect();
911
+ const L = g.current;
912
+ if (!L) return 0;
913
+ const G = L.getBoundingClientRect();
914
914
  return Math.max(
915
915
  0,
916
- Math.min(1, (Va(N) - G.left) / G.width)
916
+ Math.min(1, (Wa(N) - G.left) / G.width)
917
917
  );
918
918
  }, []), U = W((N) => {
919
- const M = u.current;
920
- M && M.duration && (M.currentTime = N * M.duration);
919
+ const L = u.current;
920
+ L && L.duration && (L.currentTime = N * L.duration);
921
921
  }, []), j = (N) => {
922
922
  N.stopPropagation(), C(!0);
923
- const M = A(N);
924
- v(M), U(M);
923
+ const L = A(N);
924
+ v(L), U(L);
925
925
  };
926
926
  Y(() => {
927
927
  r !== void 0 && r !== x.current && (x.current = r, b(r));
@@ -931,40 +931,40 @@ const Va = (e) => {
931
931
  return;
932
932
  }
933
933
  const N = () => {
934
- const M = u.current;
935
- M && M.duration && !w && v(M.currentTime / M.duration), c.current = requestAnimationFrame(N);
934
+ const L = u.current;
935
+ L && L.duration && !w && v(L.currentTime / L.duration), c.current = requestAnimationFrame(N);
936
936
  };
937
937
  return c.current = requestAnimationFrame(N), () => {
938
938
  c.current !== null && cancelAnimationFrame(c.current);
939
939
  };
940
940
  }, [_, w]), Y(() => {
941
941
  const N = u.current;
942
- N && (_ ? N.play().catch((M) => {
942
+ N && (_ ? N.play().catch((L) => {
943
943
  b(!1), z(!0);
944
944
  }) : N.pause());
945
945
  }, [_]), Y(() => {
946
946
  if (!w) return;
947
- const N = (G) => v(A(G)), M = (G) => {
947
+ const N = (G) => v(A(G)), L = (G) => {
948
948
  C(!1), U(A(G));
949
949
  };
950
- return window.addEventListener("mousemove", N), window.addEventListener("mouseup", M), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", M), () => {
951
- window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", M), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", M);
950
+ return window.addEventListener("mousemove", N), window.addEventListener("mouseup", L), window.addEventListener("touchmove", N, { passive: !0 }), window.addEventListener("touchend", L), () => {
951
+ window.removeEventListener("mousemove", N), window.removeEventListener("mouseup", L), window.removeEventListener("touchmove", N), window.removeEventListener("touchend", L);
952
952
  };
953
953
  }, [w, A, U]);
954
- const q = k ? { aspectRatio: String(k) } : void 0, Q = k ? "" : " aspect-video", K = Math.round(p * 100);
954
+ const X = k ? { aspectRatio: String(k) } : void 0, Q = k ? "" : " aspect-video", K = Math.round(p * 100);
955
955
  return /* @__PURE__ */ h(
956
956
  "div",
957
957
  {
958
958
  role: "button",
959
959
  tabIndex: 0,
960
960
  className: `relative cursor-pointer overflow-hidden bg-black ${Q}`,
961
- style: q,
961
+ style: X,
962
962
  onClick: (N) => {
963
963
  if (m) {
964
964
  m(N);
965
965
  return;
966
966
  }
967
- R || l && b((M) => !M);
967
+ R || l && b((L) => !L);
968
968
  },
969
969
  onKeyDown: (N) => {
970
970
  if (!(N.key !== "Enter" && N.key !== " ")) {
@@ -972,7 +972,7 @@ const Va = (e) => {
972
972
  m(N);
973
973
  return;
974
974
  }
975
- R || l && b((M) => !M);
975
+ R || l && b((L) => !L);
976
976
  }
977
977
  },
978
978
  children: [
@@ -996,11 +996,11 @@ const Va = (e) => {
996
996
  loop: i,
997
997
  muted: d,
998
998
  style: { width: "100%", height: "100%" },
999
- onLoadStart: () => L(!0),
999
+ onLoadStart: () => M(!0),
1000
1000
  onCanPlay: () => {
1001
- L(!1), P(!1);
1001
+ M(!1), P(!1);
1002
1002
  },
1003
- onWaiting: () => L(!0),
1003
+ onWaiting: () => M(!0),
1004
1004
  onPlay: () => z(!1),
1005
1005
  onEnded: () => {
1006
1006
  i || (b(!1), v(0));
@@ -1016,11 +1016,11 @@ const Va = (e) => {
1016
1016
  muted: d,
1017
1017
  playsInline: !0,
1018
1018
  style: { width: "100%", height: "100%" },
1019
- onLoadStart: () => L(!0),
1019
+ onLoadStart: () => M(!0),
1020
1020
  onCanPlay: () => {
1021
- L(!1), P(!1);
1021
+ M(!1), P(!1);
1022
1022
  },
1023
- onWaiting: () => L(!0),
1023
+ onWaiting: () => M(!0),
1024
1024
  onPlay: () => z(!1),
1025
1025
  onLoadedMetadata: () => {
1026
1026
  const N = u.current;
@@ -1052,7 +1052,7 @@ const Va = (e) => {
1052
1052
  onKeyDown: (N) => {
1053
1053
  N.key !== "Enter" && N.key !== " " || (N.preventDefault(), N.stopPropagation(), I());
1054
1054
  },
1055
- children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(nt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1055
+ children: /* @__PURE__ */ s("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ s(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
1056
1056
  }
1057
1057
  ),
1058
1058
  o && !l && /* @__PURE__ */ s("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ s(
@@ -1087,11 +1087,11 @@ const Va = (e) => {
1087
1087
  {
1088
1088
  type: "button",
1089
1089
  onClick: (N) => {
1090
- N.stopPropagation(), b((M) => !M);
1090
+ N.stopPropagation(), b((L) => !L);
1091
1091
  },
1092
1092
  className: "shrink-0 text-white",
1093
1093
  "aria-label": _ ? "Pause" : "Play",
1094
- children: _ ? /* @__PURE__ */ s(ea, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(nt, { className: "size-5 translate-x-px", weight: "fill" })
1094
+ children: _ ? /* @__PURE__ */ s(ra, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(rt, { className: "size-5 translate-x-px", weight: "fill" })
1095
1095
  }
1096
1096
  ),
1097
1097
  /* @__PURE__ */ h(
@@ -1141,7 +1141,7 @@ const Va = (e) => {
1141
1141
  ]
1142
1142
  }
1143
1143
  );
1144
- }, Qt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ha = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ys = ({
1144
+ }, ns = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", qa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Is = ({
1145
1145
  mimeType: e,
1146
1146
  sourceUrl: t,
1147
1147
  thumbnailUrl: n,
@@ -1150,9 +1150,9 @@ const Va = (e) => {
1150
1150
  mediaPlayerProps: i,
1151
1151
  containedImage: l = !1
1152
1152
  }) => {
1153
- const o = ce(e), [d, m] = B(!1), f = me(t), u = me(n);
1153
+ const o = ce(e), [d, m] = F(!1), f = me(t), u = me(n);
1154
1154
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1155
- ja,
1155
+ Xa,
1156
1156
  {
1157
1157
  source: t,
1158
1158
  mimeType: e,
@@ -1199,11 +1199,11 @@ const Va = (e) => {
1199
1199
  {
1200
1200
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1201
1201
  children: xe(e, {
1202
- className: Qt(r),
1202
+ className: ns(r),
1203
1203
  weight: "regular"
1204
1204
  })
1205
1205
  }
1206
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ha(r)}`, children: /* @__PURE__ */ s(
1206
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${qa(r)}`, children: /* @__PURE__ */ s(
1207
1207
  "img",
1208
1208
  {
1209
1209
  src: u ?? n,
@@ -1216,12 +1216,12 @@ const Va = (e) => {
1216
1216
  {
1217
1217
  className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
1218
1218
  children: xe(e, {
1219
- className: Qt(r),
1219
+ className: ns(r),
1220
1220
  weight: "regular"
1221
1221
  })
1222
1222
  }
1223
1223
  );
1224
- }, Cs = ({
1224
+ }, Ts = ({
1225
1225
  variant: e,
1226
1226
  thumbnail: t,
1227
1227
  title: n,
@@ -1287,29 +1287,29 @@ const Va = (e) => {
1287
1287
  }
1288
1288
  );
1289
1289
  };
1290
- function ks(e) {
1290
+ function As(e) {
1291
1291
  return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
1292
1292
  }
1293
- function ut(e) {
1293
+ function gt(e) {
1294
1294
  return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
1295
1295
  }
1296
- function Ga(e) {
1296
+ function Ka(e) {
1297
1297
  return e ? "bg-white/10" : "bg-black/5";
1298
1298
  }
1299
- function Ya(e) {
1299
+ function Za(e) {
1300
1300
  return e ? "text-white" : "text-black";
1301
1301
  }
1302
- function Wa(e) {
1302
+ function Ja(e) {
1303
1303
  return e ? "text-white/55" : "text-black/55";
1304
1304
  }
1305
- function qa(e) {
1305
+ function Qa(e) {
1306
1306
  return e ? "text-white/40" : "text-black/40";
1307
1307
  }
1308
- function Xa(e) {
1308
+ function er(e) {
1309
1309
  return e ? "text-white/20" : "text-black/20";
1310
1310
  }
1311
- const mt = ({ attachment: e, isMyMessage: t }) => {
1312
- const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(F.Fragment, { children: [
1311
+ const pt = ({ attachment: e, isMyMessage: t }) => {
1312
+ const { title: n, text: a, image_url: r, og_scrape_url: i, title_link: l } = e, o = i ?? l, d = typeof o == "string" && o.trim() !== "" ? o : void 0, m = /* @__PURE__ */ h(B.Fragment, { children: [
1313
1313
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1314
1314
  "img",
1315
1315
  {
@@ -1320,26 +1320,26 @@ const mt = ({ attachment: e, isMyMessage: t }) => {
1320
1320
  ) : /* @__PURE__ */ s(
1321
1321
  "div",
1322
1322
  {
1323
- className: `aspect-video w-full rounded-[20px] ${Ga(t)} flex items-center justify-center`,
1324
- children: /* @__PURE__ */ s(ta, { className: `size-12 ${Xa(t)}` })
1323
+ className: `aspect-video w-full rounded-[20px] ${Ka(t)} flex items-center justify-center`,
1324
+ children: /* @__PURE__ */ s(ia, { className: `size-12 ${er(t)}` })
1325
1325
  }
1326
1326
  ) }),
1327
1327
  /* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
1328
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Ya(t)}`, children: n }),
1329
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Wa(t)}`, children: a }),
1330
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${qa(t)}`, children: d })
1328
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Za(t)}`, children: n }),
1329
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ja(t)}`, children: a }),
1330
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Qa(t)}`, children: d })
1331
1331
  ] })
1332
1332
  ] });
1333
1333
  return d ? /* @__PURE__ */ s("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ s("div", { className: "block", children: m });
1334
1334
  };
1335
- function Ss(e) {
1335
+ function Ms(e) {
1336
1336
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1337
1337
  }
1338
- function ht(e) {
1338
+ function bt(e) {
1339
1339
  var t;
1340
- return (t = e.attachments) == null ? void 0 : t.find(Ss);
1340
+ return (t = e.attachments) == null ? void 0 : t.find(Ms);
1341
1341
  }
1342
- async function Ka(e, t) {
1342
+ async function tr(e, t) {
1343
1343
  let n;
1344
1344
  try {
1345
1345
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1351,11 +1351,11 @@ async function Ka(e, t) {
1351
1351
  const r = await a.blob(), i = URL.createObjectURL(r), l = document.createElement("a");
1352
1352
  l.href = i, l.download = n, l.style.display = "none", document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(i);
1353
1353
  }
1354
- const Za = ({
1354
+ const sr = ({
1355
1355
  url: e,
1356
1356
  filename: t
1357
1357
  }) => {
1358
- const [n, a] = B(!1);
1358
+ const [n, a] = F(!1);
1359
1359
  return /* @__PURE__ */ s(
1360
1360
  "button",
1361
1361
  {
@@ -1363,7 +1363,7 @@ const Za = ({
1363
1363
  onClick: (i) => {
1364
1364
  i.stopPropagation();
1365
1365
  const l = window.open("", "_blank", "noopener,noreferrer");
1366
- a(!0), Ka(e, t).then(() => {
1366
+ a(!0), tr(e, t).then(() => {
1367
1367
  l == null || l.close();
1368
1368
  }).catch(() => {
1369
1369
  l && (l.location.href = e);
@@ -1371,14 +1371,14 @@ const Za = ({
1371
1371
  },
1372
1372
  disabled: n,
1373
1373
  className: "mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full bg-[#121110] px-4 text-sm font-medium leading-none text-white hover:bg-[#2a2928] disabled:opacity-70",
1374
- children: n ? /* @__PURE__ */ s(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(F.Fragment, { children: [
1374
+ children: n ? /* @__PURE__ */ s(ve, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ h(B.Fragment, { children: [
1375
1375
  /* @__PURE__ */ s(Ce, { className: "size-4 text-white", weight: "bold" }),
1376
1376
  "Download"
1377
1377
  ] })
1378
1378
  }
1379
1379
  );
1380
1380
  };
1381
- function ft(e) {
1381
+ function vt(e) {
1382
1382
  var u, g, c, x;
1383
1383
  const t = (u = e.attachments) == null ? void 0 : u.find(
1384
1384
  (_) => _.type === "video" && _.asset_url
@@ -1399,16 +1399,16 @@ function ft(e) {
1399
1399
  thumbnailUrl: f
1400
1400
  };
1401
1401
  }
1402
- const Es = ({
1402
+ const Ls = ({
1403
1403
  resolvedUrl: e,
1404
1404
  resolvedType: t,
1405
1405
  title: n,
1406
1406
  fileSize: a,
1407
1407
  thumbnailUrl: r
1408
1408
  }) => {
1409
- const i = a !== void 0 ? ks(a) : void 0;
1409
+ const i = a !== void 0 ? As(a) : void 0;
1410
1410
  return /* @__PURE__ */ s(
1411
- Cs,
1411
+ Ts,
1412
1412
  {
1413
1413
  variant: "dark",
1414
1414
  title: n,
@@ -1416,7 +1416,7 @@ const Es = ({
1416
1416
  mimeType: t,
1417
1417
  detail: i,
1418
1418
  thumbnail: /* @__PURE__ */ s(
1419
- ys,
1419
+ Is,
1420
1420
  {
1421
1421
  mimeType: t,
1422
1422
  sourceUrl: e,
@@ -1427,23 +1427,23 @@ const Es = ({
1427
1427
  )
1428
1428
  }
1429
1429
  );
1430
- }, Is = ({
1430
+ }, Rs = ({
1431
1431
  resolvedUrl: e,
1432
1432
  resolvedType: t,
1433
1433
  title: n,
1434
1434
  fileSize: a,
1435
1435
  thumbnailUrl: r
1436
1436
  }) => {
1437
- const i = ce(t), l = a !== void 0 ? ks(a) : void 0;
1437
+ const i = ce(t), l = a !== void 0 ? As(a) : void 0;
1438
1438
  return /* @__PURE__ */ s(
1439
- Cs,
1439
+ Ts,
1440
1440
  {
1441
1441
  variant: "light",
1442
1442
  title: n,
1443
1443
  mimeType: t,
1444
1444
  detail: l,
1445
1445
  thumbnail: /* @__PURE__ */ s(
1446
- ys,
1446
+ Is,
1447
1447
  {
1448
1448
  mimeType: t,
1449
1449
  sourceUrl: e,
@@ -1453,14 +1453,14 @@ const Es = ({
1453
1453
  containedImage: i === "image" || i === "document"
1454
1454
  }
1455
1455
  ),
1456
- action: /* @__PURE__ */ s(Za, { url: e, filename: n })
1456
+ action: /* @__PURE__ */ s(sr, { url: e, filename: n })
1457
1457
  }
1458
1458
  );
1459
- }, Ja = ({
1459
+ }, nr = ({
1460
1460
  message: e,
1461
1461
  isMyMessage: t = !1
1462
1462
  }) => {
1463
- const n = ht(e), a = ft(e);
1463
+ const n = bt(e), a = vt(e);
1464
1464
  return !n && !a ? null : /* @__PURE__ */ h("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
1465
1465
  !t && e.user && /* @__PURE__ */ s(
1466
1466
  _e,
@@ -1482,41 +1482,41 @@ const Es = ({
1482
1482
  className: "str-chat__message-bubble",
1483
1483
  "data-attachment-bubble": "true",
1484
1484
  style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
1485
- children: n ? /* @__PURE__ */ s("div", { className: ut(t), children: /* @__PURE__ */ s(mt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Es, { ...a }) : /* @__PURE__ */ s(Is, { ...a })
1485
+ children: n ? /* @__PURE__ */ s("div", { className: gt(t), children: /* @__PURE__ */ s(pt, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Ls, { ...a }) : /* @__PURE__ */ s(Rs, { ...a })
1486
1486
  }
1487
1487
  ) })
1488
1488
  }
1489
1489
  )
1490
1490
  ] });
1491
- }, Qa = ({
1491
+ }, ar = ({
1492
1492
  message: e
1493
1493
  }) => {
1494
- const t = ht(e);
1494
+ const t = bt(e);
1495
1495
  if (t)
1496
- return /* @__PURE__ */ s("div", { className: ut(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !0 }) });
1497
- const n = ft(e);
1498
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Es, { ...n }) }) : null;
1499
- }, er = ({
1496
+ return /* @__PURE__ */ s("div", { className: gt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(pt, { attachment: t, isMyMessage: !0 }) });
1497
+ const n = vt(e);
1498
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ls, { ...n }) }) : null;
1499
+ }, rr = ({
1500
1500
  message: e
1501
1501
  }) => {
1502
- const t = ht(e);
1502
+ const t = bt(e);
1503
1503
  if (t)
1504
- return /* @__PURE__ */ s("div", { className: ut(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(mt, { attachment: t, isMyMessage: !1 }) });
1505
- const n = ft(e);
1506
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Is, { ...n }) }) : null;
1507
- }, Go = Object.assign(Ja, {
1508
- Creator: Qa,
1509
- Visitor: er
1510
- }), tr = {
1504
+ return /* @__PURE__ */ s("div", { className: gt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(pt, { attachment: t, isMyMessage: !1 }) });
1505
+ const n = vt(e);
1506
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Rs, { ...n }) }) : null;
1507
+ }, ol = Object.assign(nr, {
1508
+ Creator: ar,
1509
+ Visitor: rr
1510
+ }), ir = {
1511
1511
  dark: "bg-[#1e2330]",
1512
1512
  light: "bg-[#f2f1ef]"
1513
- }, sr = {
1513
+ }, or = {
1514
1514
  dark: "text-white",
1515
1515
  light: "text-[#000000]"
1516
- }, nr = {
1516
+ }, lr = {
1517
1517
  dark: "border-white/[0.08]",
1518
1518
  light: "border-black/[0.08]"
1519
- }, ar = (e) => e === "dark" ? "sender" : "receiver", rr = {
1519
+ }, cr = (e) => e === "dark" ? "sender" : "receiver", dr = {
1520
1520
  sender: {
1521
1521
  single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
1522
1522
  first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
@@ -1541,7 +1541,7 @@ const Es = ({
1541
1541
  children: d,
1542
1542
  "data-testid": m
1543
1543
  }) => {
1544
- const f = t != null && t !== "", u = l ?? rr[ar(e)][a];
1544
+ const f = t != null && t !== "", u = l ?? dr[cr(e)][a];
1545
1545
  return /* @__PURE__ */ h(
1546
1546
  "div",
1547
1547
  {
@@ -1570,10 +1570,10 @@ const Es = ({
1570
1570
  // there is no ambiguity to resolve.
1571
1571
  f && "pb-0",
1572
1572
  u,
1573
- tr[e],
1574
- sr[e],
1573
+ ir[e],
1574
+ or[e],
1575
1575
  n && "border",
1576
- n && nr[e],
1576
+ n && lr[e],
1577
1577
  o
1578
1578
  ),
1579
1579
  children: [
@@ -1617,18 +1617,18 @@ const Es = ({
1617
1617
  "flex size-6 items-center justify-center rounded-full text-white",
1618
1618
  t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
1619
1619
  ),
1620
- children: /* @__PURE__ */ s(ct, { className: "size-3", weight: "bold" })
1620
+ children: /* @__PURE__ */ s(ht, { className: "size-3", weight: "bold" })
1621
1621
  }
1622
- ), Te = (e) => e === "received" ? "light" : "dark", ir = ({
1622
+ ), Te = (e) => e === "received" ? "light" : "dark", ur = ({
1623
1623
  firstOfGroup: e,
1624
1624
  endOfGroup: t,
1625
1625
  groupedByUser: n
1626
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", or = ({
1626
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", mr = ({
1627
1627
  src: e,
1628
1628
  mimeType: t,
1629
1629
  filename: n,
1630
1630
  items: a
1631
- }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], lr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1631
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], hr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1632
1632
  /* @__PURE__ */ s(
1633
1633
  "audio",
1634
1634
  {
@@ -1640,7 +1640,7 @@ const Es = ({
1640
1640
  }
1641
1641
  ),
1642
1642
  n ?? null
1643
- ] }), gt = ({
1643
+ ] }), xt = ({
1644
1644
  state: e,
1645
1645
  src: t,
1646
1646
  mimeType: n,
@@ -1651,7 +1651,7 @@ const Es = ({
1651
1651
  preload: o,
1652
1652
  onDismiss: d
1653
1653
  }) => {
1654
- const m = Te(e), f = e === "composer" && !!d, u = or({ src: t, mimeType: n, filename: a, items: r });
1654
+ const m = Te(e), f = e === "composer" && !!d, u = mr({ src: t, mimeType: n, filename: a, items: r });
1655
1655
  if (u.length === 0)
1656
1656
  return null;
1657
1657
  const g = o ?? (u.length > 1 ? "none" : "metadata");
@@ -1663,7 +1663,7 @@ const Es = ({
1663
1663
  groupPosition: l,
1664
1664
  "data-testid": "audio-attachment",
1665
1665
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ s(
1666
- lr,
1666
+ hr,
1667
1667
  {
1668
1668
  item: c,
1669
1669
  preload: g,
@@ -1677,15 +1677,15 @@ const Es = ({
1677
1677
  )) })
1678
1678
  }
1679
1679
  );
1680
- }, cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), dr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), ur = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), mr = {
1681
- Composer: cr,
1682
- Sent: dr,
1683
- Received: ur
1680
+ }, fr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), gr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), pr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), br = {
1681
+ Composer: fr,
1682
+ Sent: gr,
1683
+ Received: pr
1684
1684
  };
1685
- function hr(e) {
1685
+ function vr(e) {
1686
1686
  return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
1687
1687
  }
1688
- const fr = {
1688
+ const xr = {
1689
1689
  pdf: "PDF",
1690
1690
  doc: "DOC",
1691
1691
  xls: "XLS",
@@ -1695,7 +1695,7 @@ const fr = {
1695
1695
  text: "TXT",
1696
1696
  markdown: "MD"
1697
1697
  };
1698
- function gr(e, t) {
1698
+ function _r(e, t) {
1699
1699
  if (t) {
1700
1700
  const r = t.lastIndexOf(".");
1701
1701
  if (r > 0 && r < t.length - 1) {
@@ -1705,7 +1705,7 @@ function gr(e, t) {
1705
1705
  }
1706
1706
  if (!e) return;
1707
1707
  if (ce(e) === "document") {
1708
- const r = Ns(e), i = fr[r];
1708
+ const r = Es(e), i = xr[r];
1709
1709
  if (i) return i;
1710
1710
  if (e === "application/octet-stream") return;
1711
1711
  }
@@ -1713,8 +1713,8 @@ function gr(e, t) {
1713
1713
  if (!(!a || a === "*"))
1714
1714
  return a.toUpperCase();
1715
1715
  }
1716
- function pr(e, t, n) {
1717
- const a = gr(e, t), r = typeof n == "number" && n > 0 ? hr(n) : void 0;
1716
+ function wr(e, t, n) {
1717
+ const a = _r(e, t), r = typeof n == "number" && n > 0 ? vr(n) : void 0;
1718
1718
  return [a, r].filter(Boolean).join(" · ") || void 0;
1719
1719
  }
1720
1720
  function ae(e) {
@@ -1725,16 +1725,16 @@ function ae(e) {
1725
1725
  return "download";
1726
1726
  }
1727
1727
  }
1728
- const br = {
1728
+ const Nr = {
1729
1729
  dark: "text-white/55",
1730
1730
  light: "text-black/65"
1731
- }, vr = {
1731
+ }, yr = {
1732
1732
  dark: "bg-white/10",
1733
1733
  light: "bg-black/5"
1734
- }, xr = {
1734
+ }, Cr = {
1735
1735
  dark: "text-white/85",
1736
1736
  light: "text-black/85"
1737
- }, Ts = ({
1737
+ }, Ds = ({
1738
1738
  variant: e,
1739
1739
  filename: t,
1740
1740
  title: n,
@@ -1744,16 +1744,16 @@ const br = {
1744
1744
  activateLabel: l,
1745
1745
  trailingAction: o
1746
1746
  }) => {
1747
- const d = n ?? t ?? "File", m = pr(a, t, r), f = /* @__PURE__ */ s(
1747
+ const d = n ?? t ?? "File", m = wr(a, t, r), f = /* @__PURE__ */ s(
1748
1748
  "div",
1749
1749
  {
1750
1750
  className: y(
1751
1751
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1752
- vr[e]
1752
+ yr[e]
1753
1753
  ),
1754
1754
  "aria-hidden": !0,
1755
1755
  children: xe(a, {
1756
- className: y("size-6", xr[e]),
1756
+ className: y("size-6", Cr[e]),
1757
1757
  weight: "regular"
1758
1758
  })
1759
1759
  }
@@ -1764,7 +1764,7 @@ const br = {
1764
1764
  {
1765
1765
  className: y(
1766
1766
  "truncate text-xs leading-4",
1767
- br[e]
1767
+ Nr[e]
1768
1768
  ),
1769
1769
  children: m
1770
1770
  }
@@ -1793,7 +1793,7 @@ const br = {
1793
1793
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1794
1794
  ] });
1795
1795
  };
1796
- async function As(e, t) {
1796
+ async function Ps(e, t) {
1797
1797
  const n = t ?? ae(e);
1798
1798
  try {
1799
1799
  const a = await fetch(e, { mode: "cors" });
@@ -1807,14 +1807,14 @@ async function As(e, t) {
1807
1807
  }
1808
1808
  }
1809
1809
  }
1810
- const _r = ({
1810
+ const kr = ({
1811
1811
  src: e,
1812
1812
  filename: t,
1813
1813
  fileSize: n,
1814
1814
  mimeType: a,
1815
1815
  title: r,
1816
1816
  items: i
1817
- }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], wr = ({
1817
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], Sr = ({
1818
1818
  variant: e,
1819
1819
  item: t,
1820
1820
  index: n,
@@ -1823,7 +1823,7 @@ const _r = ({
1823
1823
  }) => {
1824
1824
  const i = t.filename ?? ae(t.src);
1825
1825
  return /* @__PURE__ */ s(
1826
- Ts,
1826
+ Ds,
1827
1827
  {
1828
1828
  variant: e,
1829
1829
  filename: i,
@@ -1835,7 +1835,7 @@ const _r = ({
1835
1835
  trailingAction: r
1836
1836
  }
1837
1837
  );
1838
- }, pt = ({
1838
+ }, _t = ({
1839
1839
  state: e,
1840
1840
  src: t,
1841
1841
  filename: n,
@@ -1848,7 +1848,7 @@ const _r = ({
1848
1848
  onClick: m,
1849
1849
  onDismiss: f
1850
1850
  }) => {
1851
- const u = Te(e), g = e === "composer" && !!f, c = _r({
1851
+ const u = Te(e), g = e === "composer" && !!f, c = kr({
1852
1852
  src: t,
1853
1853
  filename: n,
1854
1854
  fileSize: a,
@@ -1860,7 +1860,7 @@ const _r = ({
1860
1860
  const p = c[b];
1861
1861
  if (!p) return;
1862
1862
  const v = p.filename ?? ae(p.src);
1863
- As(p.src, v);
1863
+ Ps(p.src, v);
1864
1864
  };
1865
1865
  if (c.length === 0)
1866
1866
  return null;
@@ -1883,7 +1883,7 @@ const _r = ({
1883
1883
  groupPosition: d,
1884
1884
  "data-testid": "file-attachment",
1885
1885
  children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((b, p) => /* @__PURE__ */ s(
1886
- wr,
1886
+ Sr,
1887
1887
  {
1888
1888
  variant: u,
1889
1889
  item: b,
@@ -1895,11 +1895,11 @@ const _r = ({
1895
1895
  )) })
1896
1896
  }
1897
1897
  );
1898
- }, Nr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "composer" }), yr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "sent" }), Cr = (e) => /* @__PURE__ */ s(pt, { ...e, state: "received" }), kr = {
1899
- Composer: Nr,
1900
- Sent: yr,
1901
- Received: Cr
1902
- }, bt = ({
1898
+ }, Er = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), Ir = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), Tr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), Ar = {
1899
+ Composer: Er,
1900
+ Sent: Ir,
1901
+ Received: Tr
1902
+ }, wt = ({
1903
1903
  onPrev: e,
1904
1904
  onNext: t,
1905
1905
  prevLabel: n = "Previous",
@@ -1912,7 +1912,7 @@ const _r = ({
1912
1912
  onClick: e,
1913
1913
  "aria-label": n,
1914
1914
  className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
1915
- children: /* @__PURE__ */ s(sa, { size: 20, weight: "bold", "aria-hidden": !0 })
1915
+ children: /* @__PURE__ */ s(oa, { size: 20, weight: "bold", "aria-hidden": !0 })
1916
1916
  }
1917
1917
  ),
1918
1918
  /* @__PURE__ */ s(
@@ -1922,10 +1922,10 @@ const _r = ({
1922
1922
  onClick: t,
1923
1923
  "aria-label": a,
1924
1924
  className: "mes-media-viewer__nav mes-media-viewer__nav--next",
1925
- children: /* @__PURE__ */ s(ms, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
+ children: /* @__PURE__ */ s(bs, { size: 20, weight: "bold", "aria-hidden": !0 })
1926
1926
  }
1927
1927
  )
1928
- ] }), Ls = ({
1928
+ ] }), Os = ({
1929
1929
  url: e,
1930
1930
  filename: t,
1931
1931
  variant: n = "pill",
@@ -1934,9 +1934,9 @@ const _r = ({
1934
1934
  tone: i = "dark",
1935
1935
  onTriggered: l
1936
1936
  }) => {
1937
- const [o, d] = B(!1), m = W(
1937
+ const [o, d] = F(!1), m = W(
1938
1938
  (c) => {
1939
- c.stopPropagation(), !o && (d(!0), As(e, t).catch(() => {
1939
+ c.stopPropagation(), !o && (d(!0), Ps(e, t).catch(() => {
1940
1940
  }).finally(() => {
1941
1941
  d(!1), l == null || l();
1942
1942
  }));
@@ -2010,16 +2010,16 @@ const _r = ({
2010
2010
  ]
2011
2011
  }
2012
2012
  );
2013
- }, qe = (e, t, n) => Math.min(Math.max(e, t), n), vt = ({
2013
+ }, We = (e, t, n) => Math.min(Math.max(e, t), n), Nt = ({
2014
2014
  length: e,
2015
2015
  initialIndex: t,
2016
2016
  open: n
2017
2017
  }) => {
2018
- const a = qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
2018
+ const a = We(t, 0, Math.max(e - 1, 0)), [r, i] = F(a);
2019
2019
  Y(() => {
2020
- n && i(qe(t, 0, Math.max(e - 1, 0)));
2020
+ n && i(We(t, 0, Math.max(e - 1, 0)));
2021
2021
  }, [n, t, e]), Y(() => {
2022
- i((d) => qe(d, 0, Math.max(e - 1, 0)));
2022
+ i((d) => We(d, 0, Math.max(e - 1, 0)));
2023
2023
  }, [e]);
2024
2024
  const l = W(() => {
2025
2025
  e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
@@ -2035,7 +2035,7 @@ const _r = ({
2035
2035
  };
2036
2036
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
2037
2037
  }, [n, e, l, o]), { index: r, prev: l, next: o };
2038
- }, xt = ({
2038
+ }, yt = ({
2039
2039
  open: e,
2040
2040
  onClose: t,
2041
2041
  ariaLabel: n,
@@ -2116,7 +2116,7 @@ const _r = ({
2116
2116
  onClick: t,
2117
2117
  "aria-label": "Close viewer",
2118
2118
  className: "mes-media-viewer__action",
2119
- children: /* @__PURE__ */ s(ct, { size: 20, weight: "bold", "aria-hidden": !0 })
2119
+ children: /* @__PURE__ */ s(ht, { size: 20, weight: "bold", "aria-hidden": !0 })
2120
2120
  }
2121
2121
  )
2122
2122
  ] })
@@ -2125,13 +2125,13 @@ const _r = ({
2125
2125
  ]
2126
2126
  }
2127
2127
  );
2128
- }, Ms = ({
2128
+ }, zs = ({
2129
2129
  open: e,
2130
2130
  items: t,
2131
2131
  initialIndex: n = 0,
2132
2132
  onClose: a
2133
2133
  }) => {
2134
- const { index: r, prev: i, next: l } = vt({
2134
+ const { index: r, prev: i, next: l } = Nt({
2135
2135
  length: t.length,
2136
2136
  initialIndex: n,
2137
2137
  open: e
@@ -2140,14 +2140,14 @@ const _r = ({
2140
2140
  [o]
2141
2141
  );
2142
2142
  return o ? /* @__PURE__ */ h(
2143
- xt,
2143
+ yt,
2144
2144
  {
2145
2145
  open: e,
2146
2146
  onClose: a,
2147
2147
  ariaLabel: d,
2148
2148
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2149
2149
  actions: /* @__PURE__ */ s(
2150
- Ls,
2150
+ Os,
2151
2151
  {
2152
2152
  url: o.src,
2153
2153
  filename: d,
@@ -2170,7 +2170,7 @@ const _r = ({
2170
2170
  `${r}:${o.src}`
2171
2171
  ) : null,
2172
2172
  t.length > 1 ? /* @__PURE__ */ s(
2173
- bt,
2173
+ wt,
2174
2174
  {
2175
2175
  onPrev: i,
2176
2176
  onNext: l,
@@ -2181,7 +2181,7 @@ const _r = ({
2181
2181
  ]
2182
2182
  }
2183
2183
  ) : null;
2184
- }, Sr = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", Er = {
2184
+ }, Mr = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", Lr = {
2185
2185
  1: ["rounded-[18px]"],
2186
2186
  2: ["rounded-l-[18px]", "rounded-r-[18px]"],
2187
2187
  3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
@@ -2191,7 +2191,7 @@ const _r = ({
2191
2191
  "rounded-bl-[18px]",
2192
2192
  "rounded-br-[18px]"
2193
2193
  ]
2194
- }, Ir = "--mes-single-width-cap", Tr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Ar = 436, Rs = ({
2194
+ }, Rr = "--mes-single-width-cap", Dr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Pr = 436, Fs = ({
2195
2195
  tiles: e,
2196
2196
  onTileActivate: t,
2197
2197
  maxVisible: n = 4,
@@ -2203,9 +2203,9 @@ const _r = ({
2203
2203
  const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (f, u, g) => {
2204
2204
  var x;
2205
2205
  const c = y(
2206
- Sr,
2206
+ Mr,
2207
2207
  "h-full w-full",
2208
- (x = Er[l.length]) == null ? void 0 : x[u]
2208
+ (x = Lr[l.length]) == null ? void 0 : x[u]
2209
2209
  );
2210
2210
  return t ? /* @__PURE__ */ h(
2211
2211
  "button",
@@ -2230,14 +2230,14 @@ const _r = ({
2230
2230
  aspectRatio: a,
2231
2231
  // Hundredths keep the emitted declaration readable in devtools;
2232
2232
  // the rounding error is well under a device pixel.
2233
- width: `min(var(${Ir}), ${Math.round(Ar * a * 100) / 100}px)`,
2233
+ width: `min(var(${Rr}), ${Math.round(Pr * a * 100) / 100}px)`,
2234
2234
  // Only bites in a container narrower than the width cap.
2235
2235
  maxWidth: "100%"
2236
2236
  }), l.length === 1 ? /* @__PURE__ */ s(
2237
2237
  "div",
2238
2238
  {
2239
2239
  className: y(
2240
- a ? Tr : "aspect-square w-full",
2240
+ a ? Dr : "aspect-square w-full",
2241
2241
  r
2242
2242
  ),
2243
2243
  style: m,
@@ -2293,14 +2293,14 @@ const _r = ({
2293
2293
  }
2294
2294
  );
2295
2295
  }, Ae = (e) => {
2296
- const [t, n] = B(!1), [a, r] = B(0), i = W(
2296
+ const [t, n] = F(!1), [a, r] = F(0), i = W(
2297
2297
  (o) => {
2298
2298
  (e == null ? void 0 : e(o)) !== !1 && (r(o), n(!0));
2299
2299
  },
2300
2300
  [e]
2301
2301
  ), l = W(() => n(!1), []);
2302
2302
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2303
- }, Lr = ({
2303
+ }, Or = ({
2304
2304
  item: e,
2305
2305
  index: t,
2306
2306
  totalCount: n,
@@ -2328,15 +2328,15 @@ const _r = ({
2328
2328
  }
2329
2329
  )
2330
2330
  )
2331
- }), Mr = ({
2331
+ }), zr = ({
2332
2332
  src: e,
2333
2333
  alt: t,
2334
2334
  items: n
2335
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ds = (e, t) => e.map((n, a) => ({
2335
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Bs = (e, t) => e.map((n, a) => ({
2336
2336
  src: n.src,
2337
2337
  alt: n.alt,
2338
2338
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2339
- })), Rr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2339
+ })), Fr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2340
2340
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Ae(
2341
2341
  r
2342
2342
  );
@@ -2363,17 +2363,17 @@ const _r = ({
2363
2363
  ),
2364
2364
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ie, { onClick: i }) }) : null,
2365
2365
  /* @__PURE__ */ s(
2366
- Ms,
2366
+ zs,
2367
2367
  {
2368
2368
  open: l,
2369
- items: Ds([{ src: e, alt: t }], n),
2369
+ items: Bs([{ src: e, alt: t }], n),
2370
2370
  initialIndex: o,
2371
2371
  onClose: m
2372
2372
  }
2373
2373
  )
2374
2374
  ] });
2375
- }, Dr = 326 / 246, Pr = (e) => {
2376
- const t = e == null ? void 0 : e.src, [n, a] = F.useState(), r = F.useCallback(
2375
+ }, Br = 326 / 246, $r = (e) => {
2376
+ const t = e == null ? void 0 : e.src, [n, a] = B.useState(), r = B.useCallback(
2377
2377
  (d) => {
2378
2378
  if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
2379
2379
  const m = d.naturalWidth / d.naturalHeight;
@@ -2382,16 +2382,16 @@ const _r = ({
2382
2382
  );
2383
2383
  },
2384
2384
  [t]
2385
- ), i = F.useCallback(
2385
+ ), i = B.useCallback(
2386
2386
  (d) => r(d.currentTarget),
2387
2387
  [r]
2388
2388
  ), l = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, o = n && n.src === t ? n.ratio : void 0;
2389
2389
  return {
2390
- ratio: l ?? o ?? Dr,
2390
+ ratio: l ?? o ?? Br,
2391
2391
  imgRef: r,
2392
2392
  onLoad: i
2393
2393
  };
2394
- }, Ps = ({
2394
+ }, $s = ({
2395
2395
  state: e,
2396
2396
  src: t,
2397
2397
  alt: n,
@@ -2402,13 +2402,13 @@ const _r = ({
2402
2402
  loading: o = "lazy",
2403
2403
  onClick: d
2404
2404
  }) => {
2405
- const m = Mr({ src: t, alt: n, items: r }), f = Te(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Ae(
2405
+ const m = zr({ src: t, alt: n, items: r }), f = Te(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: x } = Ae(
2406
2406
  d
2407
- ), _ = m.length === 1, b = Pr(_ ? m[0] : void 0);
2407
+ ), _ = m.length === 1, b = $r(_ ? m[0] : void 0);
2408
2408
  if (m.length === 0)
2409
2409
  return null;
2410
2410
  const p = m.map(
2411
- (v, w) => Lr({
2411
+ (v, w) => Or({
2412
2412
  item: v,
2413
2413
  index: w,
2414
2414
  totalCount: m.length,
@@ -2430,7 +2430,7 @@ const _r = ({
2430
2430
  "data-testid": "image-attachment",
2431
2431
  children: [
2432
2432
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2433
- Rs,
2433
+ Fs,
2434
2434
  {
2435
2435
  tiles: p,
2436
2436
  onTileActivate: c,
@@ -2438,10 +2438,10 @@ const _r = ({
2438
2438
  }
2439
2439
  ) }),
2440
2440
  /* @__PURE__ */ s(
2441
- Ms,
2441
+ zs,
2442
2442
  {
2443
2443
  open: u,
2444
- items: Ds(m, a),
2444
+ items: Bs(m, a),
2445
2445
  initialIndex: g,
2446
2446
  onClose: x
2447
2447
  }
@@ -2449,17 +2449,17 @@ const _r = ({
2449
2449
  ]
2450
2450
  }
2451
2451
  );
2452
- }, Or = (e) => /* @__PURE__ */ s(Rr, { ...e }), zr = (e) => /* @__PURE__ */ s(Ps, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ s(Ps, { ...e, state: "received" }), Fr = {
2453
- Composer: Or,
2454
- Sent: zr,
2455
- Received: Br
2456
- }, $r = ({
2452
+ }, Ur = (e) => /* @__PURE__ */ s(Fr, { ...e }), Vr = (e) => /* @__PURE__ */ s($s, { ...e, state: "sent" }), jr = (e) => /* @__PURE__ */ s($s, { ...e, state: "received" }), Hr = {
2453
+ Composer: Ur,
2454
+ Sent: Vr,
2455
+ Received: jr
2456
+ }, Gr = ({
2457
2457
  open: e,
2458
2458
  items: t,
2459
2459
  initialIndex: n = 0,
2460
2460
  onClose: a
2461
2461
  }) => {
2462
- const { index: r, prev: i, next: l } = vt({
2462
+ const { index: r, prev: i, next: l } = Nt({
2463
2463
  length: t.length,
2464
2464
  initialIndex: n,
2465
2465
  open: e
@@ -2467,11 +2467,11 @@ const _r = ({
2467
2467
  () => (o == null ? void 0 : o.filename) ?? (o ? ae(o.src) : "document"),
2468
2468
  [o]
2469
2469
  ), m = ne(
2470
- () => o ? Ur(o.src) : void 0,
2470
+ () => o ? Yr(o.src) : void 0,
2471
2471
  [o]
2472
2472
  );
2473
2473
  return !o || !m ? null : /* @__PURE__ */ h(
2474
- xt,
2474
+ yt,
2475
2475
  {
2476
2476
  open: e,
2477
2477
  onClose: a,
@@ -2490,7 +2490,7 @@ const _r = ({
2490
2490
  `${r}:${o.src}`
2491
2491
  ),
2492
2492
  t.length > 1 ? /* @__PURE__ */ s(
2493
- bt,
2493
+ wt,
2494
2494
  {
2495
2495
  onPrev: i,
2496
2496
  onNext: l,
@@ -2501,16 +2501,16 @@ const _r = ({
2501
2501
  ]
2502
2502
  }
2503
2503
  );
2504
- }, Ur = (e) => {
2504
+ }, Yr = (e) => {
2505
2505
  const t = e.indexOf("#"), n = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
2506
2506
  return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${n}#${r.toString()}`;
2507
- }, Vr = ({
2507
+ }, Wr = ({
2508
2508
  src: e,
2509
2509
  filename: t,
2510
2510
  fileSize: n,
2511
2511
  title: a,
2512
2512
  items: r
2513
- }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], jr = ({
2513
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Xr = ({
2514
2514
  variant: e,
2515
2515
  item: t,
2516
2516
  index: n,
@@ -2519,7 +2519,7 @@ const _r = ({
2519
2519
  }) => {
2520
2520
  const i = t.filename ?? ae(t.src);
2521
2521
  return /* @__PURE__ */ s(
2522
- Ts,
2522
+ Ds,
2523
2523
  {
2524
2524
  variant: e,
2525
2525
  filename: i,
@@ -2531,7 +2531,7 @@ const _r = ({
2531
2531
  trailingAction: r
2532
2532
  }
2533
2533
  );
2534
- }, _t = ({
2534
+ }, Ct = ({
2535
2535
  state: e,
2536
2536
  src: t,
2537
2537
  filename: n,
@@ -2543,7 +2543,7 @@ const _r = ({
2543
2543
  onClick: d,
2544
2544
  onDismiss: m
2545
2545
  }) => {
2546
- const f = Te(e), u = Vr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2546
+ const f = Te(e), u = Wr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2547
2547
  d
2548
2548
  ), b = e === "composer" && !!m;
2549
2549
  if (u.length === 0)
@@ -2562,7 +2562,7 @@ const _r = ({
2562
2562
  children: [
2563
2563
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((v, w) => {
2564
2564
  const C = v.filename ?? ae(v.src), T = b && w === 0 ? /* @__PURE__ */ s(Ie, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2565
- Ls,
2565
+ Os,
2566
2566
  {
2567
2567
  url: v.src,
2568
2568
  filename: C,
@@ -2572,7 +2572,7 @@ const _r = ({
2572
2572
  }
2573
2573
  );
2574
2574
  return /* @__PURE__ */ s(
2575
- jr,
2575
+ Xr,
2576
2576
  {
2577
2577
  variant: f,
2578
2578
  item: v,
@@ -2584,7 +2584,7 @@ const _r = ({
2584
2584
  );
2585
2585
  }) }),
2586
2586
  /* @__PURE__ */ s(
2587
- $r,
2587
+ Gr,
2588
2588
  {
2589
2589
  open: g,
2590
2590
  items: p,
@@ -2595,17 +2595,17 @@ const _r = ({
2595
2595
  ]
2596
2596
  }
2597
2597
  );
2598
- }, Hr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "composer" }), Gr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "sent" }), Yr = (e) => /* @__PURE__ */ s(_t, { ...e, state: "received" }), Wr = {
2599
- Composer: Hr,
2600
- Sent: Gr,
2601
- Received: Yr
2602
- }, Os = ({
2598
+ }, qr = (e) => /* @__PURE__ */ s(Ct, { ...e, state: "composer" }), Kr = (e) => /* @__PURE__ */ s(Ct, { ...e, state: "sent" }), Zr = (e) => /* @__PURE__ */ s(Ct, { ...e, state: "received" }), Jr = {
2599
+ Composer: qr,
2600
+ Sent: Kr,
2601
+ Received: Zr
2602
+ }, Us = ({
2603
2603
  open: e,
2604
2604
  items: t,
2605
2605
  initialIndex: n = 0,
2606
2606
  onClose: a
2607
2607
  }) => {
2608
- const { index: r, prev: i, next: l } = vt({
2608
+ const { index: r, prev: i, next: l } = Nt({
2609
2609
  length: t.length,
2610
2610
  initialIndex: n,
2611
2611
  open: e
@@ -2614,7 +2614,7 @@ const _r = ({
2614
2614
  [o]
2615
2615
  );
2616
2616
  return o ? /* @__PURE__ */ h(
2617
- xt,
2617
+ yt,
2618
2618
  {
2619
2619
  open: e,
2620
2620
  onClose: a,
@@ -2638,7 +2638,7 @@ const _r = ({
2638
2638
  `${r}:${o.src}`
2639
2639
  ),
2640
2640
  t.length > 1 ? /* @__PURE__ */ s(
2641
- bt,
2641
+ wt,
2642
2642
  {
2643
2643
  onPrev: i,
2644
2644
  onNext: l,
@@ -2649,7 +2649,7 @@ const _r = ({
2649
2649
  ]
2650
2650
  }
2651
2651
  ) : null;
2652
- }, qr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(nt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), zs = ({
2652
+ }, Qr = () => /* @__PURE__ */ s("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ s(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Vs = ({
2653
2653
  item: e,
2654
2654
  index: t
2655
2655
  }) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
@@ -2664,30 +2664,30 @@ const _r = ({
2664
2664
  className: "absolute inset-0 size-full object-cover"
2665
2665
  }
2666
2666
  ) : /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(
2667
- fs,
2667
+ xs,
2668
2668
  {
2669
2669
  className: "size-16 text-white/30",
2670
2670
  weight: "regular",
2671
2671
  "aria-hidden": !0
2672
2672
  }
2673
2673
  ) }),
2674
- /* @__PURE__ */ s(qr, {})
2675
- ] }), Xr = (e, t, n) => ({
2674
+ /* @__PURE__ */ s(Qr, {})
2675
+ ] }), ei = (e, t, n) => ({
2676
2676
  ariaLabel: `Play video ${t + 1} of ${n}`,
2677
- content: /* @__PURE__ */ s(zs, { item: e, index: t })
2678
- }), Kr = ({
2677
+ content: /* @__PURE__ */ s(Vs, { item: e, index: t })
2678
+ }), ti = ({
2679
2679
  src: e,
2680
2680
  poster: t,
2681
2681
  mimeType: n,
2682
2682
  preload: a,
2683
2683
  items: r
2684
- }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], Bs = (e, t) => e.map((n, a) => ({
2684
+ }) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: n, preload: a }] : [], js = (e, t) => e.map((n, a) => ({
2685
2685
  src: n.src,
2686
2686
  poster: n.poster,
2687
2687
  mimeType: n.mimeType,
2688
2688
  preload: n.preload,
2689
2689
  filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
2690
- })), Zr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2690
+ })), si = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2691
2691
  const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: f } = Ae(
2692
2692
  i
2693
2693
  );
@@ -2699,15 +2699,15 @@ const _r = ({
2699
2699
  onClick: () => m(0),
2700
2700
  "aria-label": "Play video",
2701
2701
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2702
- children: /* @__PURE__ */ s(zs, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2702
+ children: /* @__PURE__ */ s(Vs, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2703
2703
  }
2704
2704
  ),
2705
2705
  l ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Ie, { onClick: l }) }) : null,
2706
2706
  /* @__PURE__ */ s(
2707
- Os,
2707
+ Us,
2708
2708
  {
2709
2709
  open: o,
2710
- items: Bs(
2710
+ items: js(
2711
2711
  [{ src: e, poster: t, mimeType: n, preload: r }],
2712
2712
  a
2713
2713
  ),
@@ -2716,7 +2716,7 @@ const _r = ({
2716
2716
  }
2717
2717
  )
2718
2718
  ] });
2719
- }, Fs = ({
2719
+ }, Hs = ({
2720
2720
  state: e,
2721
2721
  src: t,
2722
2722
  poster: n,
@@ -2728,13 +2728,13 @@ const _r = ({
2728
2728
  preload: d,
2729
2729
  onClick: m
2730
2730
  }) => {
2731
- const f = Kr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Te(e), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2731
+ const f = ti({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Te(e), { viewerOpen: g, viewerIndex: c, handleActivate: x, closeViewer: _ } = Ae(
2732
2732
  m
2733
2733
  );
2734
2734
  if (f.length === 0)
2735
2735
  return null;
2736
2736
  const b = f.map(
2737
- (p, v) => Xr(p, v, f.length)
2737
+ (p, v) => ei(p, v, f.length)
2738
2738
  );
2739
2739
  return /* @__PURE__ */ h(
2740
2740
  Ee,
@@ -2744,12 +2744,12 @@ const _r = ({
2744
2744
  groupPosition: o,
2745
2745
  "data-testid": "video-attachment",
2746
2746
  children: [
2747
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Rs, { tiles: b, onTileActivate: x }) }),
2747
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Fs, { tiles: b, onTileActivate: x }) }),
2748
2748
  /* @__PURE__ */ s(
2749
- Os,
2749
+ Us,
2750
2750
  {
2751
2751
  open: g,
2752
- items: Bs(f, r),
2752
+ items: js(f, r),
2753
2753
  initialIndex: c,
2754
2754
  onClose: _
2755
2755
  }
@@ -2757,31 +2757,31 @@ const _r = ({
2757
2757
  ]
2758
2758
  }
2759
2759
  );
2760
- }, Jr = (e) => /* @__PURE__ */ s(Zr, { ...e }), Qr = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "sent" }), ei = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "received" }), ti = {
2761
- Composer: Jr,
2762
- Sent: Qr,
2763
- Received: ei
2760
+ }, ni = (e) => /* @__PURE__ */ s(si, { ...e }), ai = (e) => /* @__PURE__ */ s(Hs, { ...e, state: "sent" }), ri = (e) => /* @__PURE__ */ s(Hs, { ...e, state: "received" }), ii = {
2761
+ Composer: ni,
2762
+ Sent: ai,
2763
+ Received: ri
2764
2764
  }, Ne = {
2765
- Image: Fr,
2766
- Video: ti,
2767
- Audio: mr,
2768
- Pdf: Wr,
2769
- File: kr
2770
- }, si = {
2765
+ Image: Hr,
2766
+ Video: ii,
2767
+ Audio: br,
2768
+ Pdf: Jr,
2769
+ File: Ar
2770
+ }, oi = {
2771
2771
  isUnlocking: () => !1
2772
- }, ni = {
2773
- LockedAttachment: si
2774
- }, $s = lt({}), Yo = $s.Provider;
2775
- function ai(e) {
2776
- return ke($s)[e] ?? ni[e];
2772
+ }, li = {
2773
+ LockedAttachment: oi
2774
+ }, Gs = mt({}), ll = Gs.Provider;
2775
+ function ci(e) {
2776
+ return ke(Gs)[e] ?? li[e];
2777
2777
  }
2778
- const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import("./Card-Cgn2G-VJ.js")), oi = () => /* @__PURE__ */ s(
2778
+ const di = B.lazy(() => import("./Card-qS17qnN0.js")), ui = B.lazy(() => import("./Card-DcyixIfP.js")), mi = () => /* @__PURE__ */ s(
2779
2779
  "div",
2780
2780
  {
2781
2781
  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)]",
2782
2782
  "aria-hidden": !0
2783
2783
  }
2784
- ), Pe = (e) => /* @__PURE__ */ s(tn, { fallback: /* @__PURE__ */ s(oi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(ri, { ...e }) : /* @__PURE__ */ s(ii, { ...e }) }), li = ({ size: e = 15 }) => /* @__PURE__ */ s(
2784
+ ), Pe = (e) => /* @__PURE__ */ s(on, { fallback: /* @__PURE__ */ s(mi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(di, { ...e }) : /* @__PURE__ */ s(ui, { ...e }) }), hi = ({ size: e = 15 }) => /* @__PURE__ */ s(
2785
2785
  "svg",
2786
2786
  {
2787
2787
  width: e,
@@ -2798,27 +2798,27 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2798
2798
  }
2799
2799
  )
2800
2800
  }
2801
- ), ci = (e) => {
2801
+ ), fi = (e) => {
2802
2802
  var t;
2803
2803
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.TIP;
2804
- }, Us = (e) => {
2804
+ }, Ys = (e) => {
2805
2805
  var t;
2806
2806
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.PAID;
2807
- }, Be = (e) => {
2807
+ }, ze = (e) => {
2808
2808
  var t;
2809
2809
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.CHATBOT;
2810
- }, wt = (e) => {
2810
+ }, kt = (e) => {
2811
2811
  var t;
2812
2812
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === le.ATTACHMENT;
2813
- }, di = (e) => {
2813
+ }, gi = (e) => {
2814
2814
  var t;
2815
- return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2816
- }, ui = (e) => {
2815
+ return kt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2816
+ }, pi = (e) => {
2817
2817
  var t;
2818
- return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2819
- }, Vs = (e) => ci(e) || Us(e), mi = (e) => {
2818
+ return kt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2819
+ }, Ws = (e) => fi(e) || Ys(e), bi = (e) => {
2820
2820
  var t;
2821
- return Vs(e) && !((t = e.text) != null && t.trim());
2821
+ return Ws(e) && !((t = e.text) != null && t.trim());
2822
2822
  }, Xe = ({
2823
2823
  message: e,
2824
2824
  standalone: t = !1,
@@ -2826,15 +2826,15 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2826
2826
  hasAttachment: a = !1
2827
2827
  }) => {
2828
2828
  var u;
2829
- const r = Vs(e), i = Be(e);
2829
+ const r = Ws(e), i = ze(e);
2830
2830
  if (!r && !i)
2831
2831
  return null;
2832
2832
  if (r) {
2833
2833
  const g = (u = e.metadata) == null ? void 0 : u.amount_text;
2834
2834
  if (!g) return null;
2835
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = Us(e) ? "message" : "tip", _ = t ? `${g} ${x}` : `Delivered with ${g} ${x}`;
2835
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = Ys(e) ? "message" : "tip", _ = t ? `${g} ${x}` : `Delivered with ${g} ${x}`;
2836
2836
  return /* @__PURE__ */ h("div", { className: c, children: [
2837
- /* @__PURE__ */ s(na, { size: t ? 14 : 12 }),
2837
+ /* @__PURE__ */ s(la, { size: t ? 14 : 12 }),
2838
2838
  /* @__PURE__ */ s("span", { children: _ })
2839
2839
  ] });
2840
2840
  }
@@ -2842,7 +2842,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2842
2842
  "message-chatbot-indicator",
2843
2843
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2844
2844
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2845
- ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(li, { size: l ? 12 : 15 }) });
2845
+ ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), f = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(hi, { size: l ? 12 : 15 }) });
2846
2846
  return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ h(J, { children: [
2847
2847
  m,
2848
2848
  f
@@ -2850,7 +2850,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2850
2850
  f,
2851
2851
  m
2852
2852
  ] }) });
2853
- }, hi = ({
2853
+ }, vi = ({
2854
2854
  selected: e,
2855
2855
  onVoteUp: t,
2856
2856
  onVoteDown: n
@@ -2866,7 +2866,7 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2866
2866
  "aria-label": "Good response",
2867
2867
  "aria-pressed": e === "up",
2868
2868
  "data-tooltip": "Good response",
2869
- children: /* @__PURE__ */ s(aa, { size: 16, weight: e === "up" ? "fill" : "regular" })
2869
+ children: /* @__PURE__ */ s(ca, { size: 16, weight: e === "up" ? "fill" : "regular" })
2870
2870
  }
2871
2871
  ),
2872
2872
  /* @__PURE__ */ s(
@@ -2880,10 +2880,10 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2880
2880
  "aria-label": "Bad response",
2881
2881
  "aria-pressed": e === "down",
2882
2882
  "data-tooltip": "Bad response",
2883
- children: /* @__PURE__ */ s(ra, { size: 16, weight: e === "down" ? "fill" : "regular" })
2883
+ children: /* @__PURE__ */ s(da, { size: 16, weight: e === "down" ? "fill" : "regular" })
2884
2884
  }
2885
2885
  )
2886
- ] }), Nt = () => {
2886
+ ] }), St = () => {
2887
2887
  const { message: e } = fe("SentMessageDeliveryStatus"), { messages: t } = he("SentMessageDeliveryStatus"), n = (() => {
2888
2888
  if (t)
2889
2889
  for (let a = t.length - 1; a >= 0; a -= 1) {
@@ -2893,10 +2893,10 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2893
2893
  }
2894
2894
  })();
2895
2895
  return e.id === n;
2896
- }, Ke = () => Nt() ? /* @__PURE__ */ h(J, { children: [
2897
- /* @__PURE__ */ s(la, { weight: "bold", "aria-hidden": "true" }),
2896
+ }, qe = () => St() ? /* @__PURE__ */ h(J, { children: [
2897
+ /* @__PURE__ */ s(ha, { weight: "bold", "aria-hidden": "true" }),
2898
2898
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2899
- ] }) : null, fi = () => Nt() ? /* @__PURE__ */ h(J, { children: [
2899
+ ] }) : null, xi = () => St() ? /* @__PURE__ */ h(J, { children: [
2900
2900
  /* @__PURE__ */ s(
2901
2901
  ve,
2902
2902
  {
@@ -2906,13 +2906,13 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2906
2906
  }
2907
2907
  ),
2908
2908
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
2909
- ] }) : null, gi = ({
2909
+ ] }) : null, _i = ({
2910
2910
  broadcastId: e,
2911
2911
  broadcastName: t,
2912
2912
  onBroadcastClick: n
2913
2913
  }) => {
2914
2914
  const a = t || "Broadcast", r = /* @__PURE__ */ h(J, { children: [
2915
- /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(oa, { weight: "fill" }) }),
2915
+ /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(ma, { weight: "fill" }) }),
2916
2916
  /* @__PURE__ */ s(
2917
2917
  "span",
2918
2918
  {
@@ -2935,36 +2935,36 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2935
2935
  children: r
2936
2936
  }
2937
2937
  ) : r;
2938
- }, pi = () => /* @__PURE__ */ h("span", { className: "str-chat__message-status sent-message-status--failed", children: [
2939
- /* @__PURE__ */ s(ia, { weight: "bold", "aria-hidden": "true" }),
2938
+ }, wi = () => /* @__PURE__ */ h("span", { className: "str-chat__message-status sent-message-status--failed", children: [
2939
+ /* @__PURE__ */ s(ua, { weight: "bold", "aria-hidden": "true" }),
2940
2940
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
2941
- ] }), bi = ({
2941
+ ] }), Ni = ({
2942
2942
  onBroadcastClick: e
2943
2943
  }) => {
2944
2944
  var f, u;
2945
2945
  const { isMyMessage: t, message: n, threadList: a } = fe(
2946
2946
  "SentMessageDeliveryStatus"
2947
- ), r = t(), i = Nt();
2947
+ ), r = t(), i = St();
2948
2948
  if (a)
2949
2949
  return null;
2950
2950
  if (n.status === "failed" && r && n.type !== "error")
2951
- return /* @__PURE__ */ s(pi, {});
2951
+ return /* @__PURE__ */ s(wi, {});
2952
2952
  if (!r)
2953
2953
  return null;
2954
2954
  const l = (f = n.metadata) == null ? void 0 : f.broadcast_id, o = (u = n.metadata) == null ? void 0 : u.broadcast_name, d = n.status !== "sending" && n.status !== "failed" && l ? /* @__PURE__ */ s(
2955
- gi,
2955
+ _i,
2956
2956
  {
2957
2957
  broadcastId: l,
2958
2958
  broadcastName: o,
2959
2959
  onBroadcastClick: e
2960
2960
  }
2961
2961
  ) : null, m = /* @__PURE__ */ s(
2962
- on,
2962
+ mn,
2963
2963
  {
2964
- MessageSentStatus: Ke,
2965
- MessageDeliveredStatus: Ke,
2966
- MessageReadStatus: Ke,
2967
- MessageSendingStatus: fi
2964
+ MessageSentStatus: qe,
2965
+ MessageDeliveredStatus: qe,
2966
+ MessageReadStatus: qe,
2967
+ MessageSendingStatus: xi
2968
2968
  }
2969
2969
  );
2970
2970
  return d ? /* @__PURE__ */ h("span", { className: "sent-message-status-row", children: [
@@ -2979,26 +2979,26 @@ const ri = F.lazy(() => import("./Card-qS17qnN0.js")), ii = F.lazy(() => import(
2979
2979
  ),
2980
2980
  d
2981
2981
  ] }) : m;
2982
- }, vi = /^([a-z][a-z0-9+.-]*):/i, xi = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2983
- function yt(e) {
2982
+ }, yi = /^([a-z][a-z0-9+.-]*):/i, Ci = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
2983
+ function Et(e) {
2984
2984
  if (typeof e != "string") return;
2985
2985
  const t = e.trim();
2986
2986
  if (t === "") return;
2987
- const n = vi.exec(t);
2987
+ const n = yi.exec(t);
2988
2988
  if (n) {
2989
2989
  const a = n[1].toLowerCase();
2990
- return xi.has(a) ? t : void 0;
2990
+ return Ci.has(a) ? t : void 0;
2991
2991
  }
2992
2992
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
2993
2993
  }
2994
- const _i = {
2994
+ const ki = {
2995
2995
  dark: "bg-white text-[#121110] hover:bg-white/90",
2996
2996
  light: "bg-[#121110] text-white hover:bg-[#2a2928]"
2997
- }, wi = ({ variant: e, cta: t }) => {
2997
+ }, Si = ({ variant: e, cta: t }) => {
2998
2998
  const n = y(
2999
2999
  "mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3000
- _i[e]
3001
- ), a = yt(t.href);
3000
+ ki[e]
3001
+ ), a = Et(t.href);
3002
3002
  return a ? /* @__PURE__ */ s(
3003
3003
  "a",
3004
3004
  {
@@ -3024,52 +3024,53 @@ const _i = {
3024
3024
  children: t.label
3025
3025
  }
3026
3026
  );
3027
- }, Ni = {
3027
+ }, Ei = {
3028
3028
  dark: "text-white",
3029
3029
  light: "text-black/90"
3030
- }, yi = "text-white/30", Ci = {
3030
+ }, Ii = "text-white/30", Ti = {
3031
3031
  dark: "text-white/55",
3032
3032
  light: "text-black/55"
3033
- }, ki = {
3033
+ }, Ai = {
3034
3034
  dark: "bg-white/25",
3035
3035
  light: "bg-black/15"
3036
- }, Ct = ({
3036
+ }, It = ({
3037
3037
  variant: e,
3038
- title: t,
3039
- placeholderTitle: n,
3040
- description: a,
3041
- url: r,
3042
- appIcon: i,
3043
- cta: l,
3044
- trailingAction: o,
3045
- chinTextColor: d,
3038
+ chinTextColor: t,
3039
+ title: n,
3040
+ placeholderTitle: a,
3041
+ description: r,
3042
+ url: i,
3043
+ appIcon: l,
3044
+ cta: o,
3045
+ trailingAction: d,
3046
3046
  isLoading: m = !1
3047
3047
  }) => {
3048
- const f = e === "dark", u = t ?? (f ? n : void 0) ?? "", g = u.trim() !== "", c = a != null && a.trim() !== "", x = typeof r == "string" ? r.trim() : "", _ = x !== "", b = l != null;
3048
+ const f = e === "dark", u = n ?? (f ? a : void 0) ?? "", g = u.trim() !== "", c = r != null && r.trim() !== "", x = typeof i == "string" ? i.trim() : "", _ = x !== "", b = o != null;
3049
3049
  if (!m && !g && !c && !_ && !b)
3050
3050
  return null;
3051
- const p = f && !t, v = y(
3051
+ const p = f && !n, v = y(
3052
3052
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
3053
- d == null && (p ? yi : Ni[e])
3053
+ t == null && (p ? Ii : Ei[e])
3054
3054
  ), w = y(
3055
3055
  "truncate text-[12px] leading-4 tracking-[0.24px]",
3056
- d == null && Ci[e]
3057
- ), C = d ? { color: d } : void 0;
3056
+ t == null && Ti[e]
3057
+ );
3058
3058
  if (m) {
3059
3059
  const T = y(
3060
3060
  "animate-pulse rounded",
3061
- ki[e]
3061
+ Ai[e]
3062
3062
  );
3063
3063
  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: [
3064
3064
  /* @__PURE__ */ s("div", { className: y("h-5 w-3/4", T), "aria-hidden": !0 }),
3065
3065
  /* @__PURE__ */ s("div", { className: y("h-4 w-1/2", T), "aria-hidden": !0 })
3066
3066
  ] }) });
3067
3067
  }
3068
+ const C = t ? { color: t } : void 0;
3068
3069
  return /* @__PURE__ */ h("div", { className: "shrink-0 px-4 py-3", children: [
3069
3070
  /* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
3070
3071
  /* @__PURE__ */ h("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
3071
3072
  g && /* @__PURE__ */ h("div", { className: "flex min-w-0 items-center gap-2", children: [
3072
- i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
3073
+ l ? /* @__PURE__ */ s("span", { className: "shrink-0", children: l }) : null,
3073
3074
  /* @__PURE__ */ s(
3074
3075
  "p",
3075
3076
  {
@@ -3079,19 +3080,19 @@ const _i = {
3079
3080
  }
3080
3081
  )
3081
3082
  ] }),
3082
- c && /* @__PURE__ */ s("p", { className: w, style: C, children: a }),
3083
+ c && /* @__PURE__ */ s("p", { className: w, style: C, children: r }),
3083
3084
  !b && _ && /* @__PURE__ */ s("p", { className: w, style: C, children: x })
3084
3085
  ] }),
3085
- o && /* @__PURE__ */ s("div", { className: "shrink-0", children: o })
3086
+ d && /* @__PURE__ */ s("div", { className: "shrink-0", children: d })
3086
3087
  ] }),
3087
- l && /* @__PURE__ */ s(wi, { variant: e, cta: l })
3088
+ o && /* @__PURE__ */ s(Si, { variant: e, cta: o })
3088
3089
  ] });
3089
- }, Si = "Loading link preview", Ei = y(
3090
+ }, Mi = "Loading link preview", Li = y(
3090
3091
  "relative w-[290px] select-none overflow-hidden",
3091
3092
  // 20px corners — no token exists for it in the component-library preset,
3092
3093
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
3093
3094
  "rounded-[20px]"
3094
- ), Ii = "flex h-[250px] flex-col", Fe = ({
3095
+ ), Ri = "flex h-[250px] flex-col", Fe = ({
3095
3096
  variant: e,
3096
3097
  children: t,
3097
3098
  href: n,
@@ -3106,17 +3107,33 @@ const _i = {
3106
3107
  "data-testid": u
3107
3108
  }) => {
3108
3109
  const g = n != null || a != null, c = y(
3109
- Ei,
3110
- m ? Ii : "block",
3110
+ Li,
3111
+ m ? Ri : "block",
3111
3112
  // Kept underneath `accentStyle` rather than swapped out: the inline
3112
3113
  // background wins on specificity, and leaving the class in place means
3113
3114
  // an accent that somehow doesn't paint still lands on a sane surface.
3114
- o ?? (e === "dark" ? "bg-shade" : "bg-white"),
3115
+ //
3116
+ // MUST be an arbitrary value, not a theme token. This package ships no
3117
+ // Tailwind utilities — `dist/assets/index.css` is only the hand-written
3118
+ // `.str-chat`/`.mes-*` CSS — so consumers generate our classes by scanning
3119
+ // `messaging-react/dist` against *their own* theme. `shade` comes from the
3120
+ // component-library preset that this package builds with; frontyard builds
3121
+ // on the Arbor preset and has no such colour, so `bg-shade` was silently
3122
+ // dropped, the chin rendered transparent, and the own-message `color: white`
3123
+ // left the title and URL invisible (MES-1388). An arbitrary value is
3124
+ // generated from the class name alone and cannot depend on consumer theme.
3125
+ //
3126
+ // Both values are the plain message bubble's own fill, so a card with no
3127
+ // usable accent matches the text bubbles around it: `#1e2330` is
3128
+ // `--str-chat__own-message-bubble-background-color` and `#f1f0ee` is
3129
+ // `--str-chat__message-bubble-background-color`. Mirrored in
3130
+ // `chinContrast.BUBBLE_BG_BY_VARIANT`, which the bubble tail reads.
3131
+ o ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"),
3115
3132
  // `focus-ring` is a design-system utility from the component-library
3116
3133
  // tailwind preset — outline-none + a black 2px focus-visible ring
3117
3134
  // with offset, so keyboard users can see the focused card.
3118
3135
  g ? "cursor-pointer no-underline focus-ring" : null
3119
- ), x = f ? { role: "status", "aria-busy": !0, "aria-label": Si } : void 0, _ = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3136
+ ), x = f ? { role: "status", "aria-busy": !0, "aria-label": Mi } : void 0, _ = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3120
3137
  return n ? /* @__PURE__ */ h(
3121
3138
  "a",
3122
3139
  {
@@ -3164,17 +3181,17 @@ const _i = {
3164
3181
  ]
3165
3182
  }
3166
3183
  );
3167
- }, es = {
3184
+ }, as = {
3168
3185
  dark: "bg-white/10",
3169
3186
  light: "bg-black/5"
3170
- }, Ti = {
3187
+ }, Di = {
3171
3188
  dark: "size-16 text-white/25",
3172
3189
  light: "size-16 text-black/25"
3173
- }, Le = (e, t) => !!t && !!e && ce(e) === "audio", kt = (e, t) => {
3190
+ }, Me = (e, t) => !!t && !!e && ce(e) === "audio", Tt = (e, t) => {
3174
3191
  if (!t || !e) return !1;
3175
3192
  const n = ce(e);
3176
3193
  return n === "video" || n === "audio";
3177
- }, St = "bg-[#F2F3F4]", $e = ({
3194
+ }, Pi = "#F2F3F4", At = "bg-[#F2F3F4]", Be = ({
3178
3195
  variant: e,
3179
3196
  thumbnailUrl: t,
3180
3197
  sourceUrl: n,
@@ -3186,7 +3203,7 @@ const _i = {
3186
3203
  onImageError: d
3187
3204
  }) => {
3188
3205
  const m = ce(r), f = !!n && m === "video", u = me(t);
3189
- return !o && Le(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
3206
+ return !o && Me(r, n) ? /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s(
3190
3207
  "audio",
3191
3208
  {
3192
3209
  src: n,
@@ -3208,7 +3225,7 @@ const _i = {
3208
3225
  children: [
3209
3226
  o ? (
3210
3227
  // Reuses the placeholder fill: a fixed `bg-black/[0.06]` would be
3211
- // invisible on the dark card's `bg-shade` surface. Stock Tailwind only
3228
+ // invisible on the dark card's dark surface. Stock Tailwind only
3212
3229
  // — `animate-shimmer` exists in this package's own tailwind config but
3213
3230
  // not in either consumer's, so it would compile to nothing in
3214
3231
  // frontyard and profiles while looking right in this Storybook.
@@ -3217,7 +3234,7 @@ const _i = {
3217
3234
  {
3218
3235
  className: y(
3219
3236
  "h-full w-full animate-pulse",
3220
- es[e]
3237
+ as[e]
3221
3238
  ),
3222
3239
  "aria-hidden": !0
3223
3240
  }
@@ -3261,10 +3278,10 @@ const _i = {
3261
3278
  {
3262
3279
  className: y(
3263
3280
  "flex h-full w-full items-center justify-center",
3264
- es[e]
3281
+ as[e]
3265
3282
  ),
3266
3283
  children: xe(r, {
3267
- className: Ti[e],
3284
+ className: Di[e],
3268
3285
  weight: "regular"
3269
3286
  })
3270
3287
  }
@@ -3274,45 +3291,121 @@ const _i = {
3274
3291
  ]
3275
3292
  }
3276
3293
  );
3277
- }, Oe = "#FFFFFF", ts = "#040403", Ai = "#1e2330", Li = 3, Mi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3278
- function Ri(e) {
3279
- if (typeof e != "string" || !Mi.test(e.trim())) return;
3280
- const t = e.trim().replace(/^#/, ""), n = t.length === Li ? t.replace(/./g, (a) => a + a) : t;
3294
+ }, Oi = 4.5, zi = {
3295
+ dark: "#1e2330",
3296
+ light: "#f1f0ee"
3297
+ }, Fi = 3, Bi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3298
+ function $i(e) {
3299
+ if (typeof e != "string" || !Bi.test(e.trim())) return;
3300
+ const t = e.trim().replace(/^#/, ""), n = t.length === Fi ? t.replace(/./g, (a) => a + a) : t;
3281
3301
  return [
3282
3302
  Number.parseInt(n.slice(0, 2), 16),
3283
3303
  Number.parseInt(n.slice(2, 4), 16),
3284
3304
  Number.parseInt(n.slice(4, 6), 16)
3285
3305
  ];
3286
3306
  }
3287
- function Ze(e) {
3307
+ function Ke(e) {
3288
3308
  const t = e / 255;
3289
3309
  return t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
3290
3310
  }
3291
- function it(e) {
3292
- const t = Ri(e);
3293
- return t ? 0.2126 * Ze(t[0]) + 0.7152 * Ze(t[1]) + 0.0722 * Ze(t[2]) : Number.NaN;
3311
+ function Ui(e) {
3312
+ return 0.2126 * Ke(e[0]) + 0.7152 * Ke(e[1]) + 0.0722 * Ke(e[2]);
3313
+ }
3314
+ function rs(e) {
3315
+ const t = $i(e);
3316
+ return t ? Ui(t) : Number.NaN;
3294
3317
  }
3295
- function ss(e, t) {
3296
- const n = it(e), a = it(t);
3297
- if (Number.isNaN(n) || Number.isNaN(a)) return Number.NaN;
3298
- const r = Math.max(n, a), i = Math.min(n, a);
3299
- return (r + 0.05) / (i + 0.05);
3318
+ function Vi(e, t) {
3319
+ return Number.isNaN(e) || Number.isNaN(t) ? Number.NaN : (Math.max(e, t) + 0.05) / (Math.min(e, t) + 0.05);
3300
3320
  }
3301
- function Di(e) {
3302
- if (e == null) return Oe;
3303
- const t = ss(e, Oe);
3304
- return Number.isNaN(t) || t >= ss(e, ts) ? Oe : ts;
3321
+ function lt(e, t) {
3322
+ return Vi(rs(e), rs(t));
3305
3323
  }
3306
- function Pi(e) {
3307
- if (e == null || Number.isNaN(it(e))) return;
3308
- const t = e.trim();
3309
- return t.startsWith("#") ? t : `#${t}`;
3324
+ const ct = "#FFFFFF", dt = "#040403";
3325
+ function ji(e) {
3326
+ const t = lt(e, dt);
3327
+ if (!Number.isNaN(t))
3328
+ return t >= lt(e, ct) ? dt : ct;
3310
3329
  }
3311
- const Oi = {
3312
- dark: Ai,
3313
- light: "#ffffff"
3314
- };
3315
- function Et({
3330
+ const Hi = {
3331
+ dark: 0.3,
3332
+ light: 0.9
3333
+ }, Gi = {
3334
+ dark: ct,
3335
+ light: dt
3336
+ }, Yi = 3, Wi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i, is = 0.5, Xi = 25;
3337
+ function qi(e) {
3338
+ if (typeof e != "string" || !Wi.test(e.trim())) return;
3339
+ const t = e.trim().replace(/^#/, ""), n = t.length === Yi ? t.replace(/./g, (a) => a + a) : t;
3340
+ return [
3341
+ Number.parseInt(n.slice(0, 2), 16),
3342
+ Number.parseInt(n.slice(2, 4), 16),
3343
+ Number.parseInt(n.slice(4, 6), 16)
3344
+ ];
3345
+ }
3346
+ function Ki(e) {
3347
+ return `#${e.map(
3348
+ (t) => Math.round(Math.min(255, Math.max(0, t))).toString(16).padStart(2, "0")
3349
+ ).join("")}`;
3350
+ }
3351
+ function Ze(e) {
3352
+ return e <= 0.04045 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
3353
+ }
3354
+ function Je(e) {
3355
+ return e <= 31308e-7 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - 0.055;
3356
+ }
3357
+ function Zi(e) {
3358
+ const t = Ze(e[0] / 255), n = Ze(e[1] / 255), a = Ze(e[2] / 255), r = Math.cbrt(
3359
+ 0.4122214708 * t + 0.5363325363 * n + 0.0514459929 * a
3360
+ ), i = Math.cbrt(
3361
+ 0.2119034982 * t + 0.6806995451 * n + 0.1073969566 * a
3362
+ ), l = Math.cbrt(
3363
+ 0.0883024619 * t + 0.2817188376 * n + 0.6299787005 * a
3364
+ ), o = 0.2104542553 * r + 0.793617785 * i - 0.0040720468 * l, d = 1.9779984951 * r - 2.428592205 * i + 0.4505937099 * l, m = 0.0259040371 * r + 0.7827717662 * i - 0.808675766 * l;
3365
+ return [
3366
+ o,
3367
+ Math.hypot(d, m),
3368
+ (Math.atan2(m, d) * 180 / Math.PI + 360) % 360
3369
+ ];
3370
+ }
3371
+ function Qe([e, t, n]) {
3372
+ const a = n * Math.PI / 180, r = t * Math.cos(a), i = t * Math.sin(a), l = (e + 0.3963377774 * r + 0.2158037573 * i) ** 3, o = (e - 0.1055613458 * r - 0.0638541728 * i) ** 3, d = (e - 0.0894841775 * r - 1.291485548 * i) ** 3;
3373
+ return [
3374
+ 255 * Je(
3375
+ 4.0767416621 * l - 3.3077115913 * o + 0.2309699292 * d
3376
+ ),
3377
+ 255 * Je(
3378
+ -1.2684380046 * l + 2.6097574011 * o - 0.3413193965 * d
3379
+ ),
3380
+ 255 * Je(
3381
+ -0.0041960863 * l - 0.7034186147 * o + 1.707614701 * d
3382
+ )
3383
+ ];
3384
+ }
3385
+ function os(e) {
3386
+ return e.every(
3387
+ (t) => t >= -is && t <= 255 + is
3388
+ );
3389
+ }
3390
+ function Ji(e, t) {
3391
+ if (e == null) return;
3392
+ const n = qi(e);
3393
+ if (!n) return;
3394
+ const [, a, r] = Zi(n), i = Hi[t];
3395
+ let l = 0;
3396
+ if (os(Qe([i, a, r])))
3397
+ l = a;
3398
+ else {
3399
+ let d = 0, m = a;
3400
+ for (let f = 0; f < Xi; f++) {
3401
+ const u = (d + m) / 2;
3402
+ os(Qe([i, u, r])) ? (l = u, d = u) : m = u;
3403
+ }
3404
+ }
3405
+ const o = Ki(Qe([i, l, r]));
3406
+ return lt(o, Gi[t]) >= Oi ? o : void 0;
3407
+ }
3408
+ function Mt({
3316
3409
  variant: e,
3317
3410
  accentColor: t,
3318
3411
  status: n = "ready",
@@ -3321,23 +3414,23 @@ function Et({
3321
3414
  mimeType: i,
3322
3415
  sourceUrl: l
3323
3416
  }) {
3324
- const [o, d] = F.useState(!1);
3325
- F.useEffect(() => {
3417
+ const [o, d] = B.useState(!1);
3418
+ B.useEffect(() => {
3326
3419
  d(!1);
3327
3420
  }, [r]);
3328
- const m = F.useCallback(() => {
3421
+ const m = B.useCallback(() => {
3329
3422
  d(!0);
3330
- }, []), u = a === "featured" && !!r && !Le(i, l) && !o && n === "ready" ? Pi(t) : void 0;
3423
+ }, []), f = a === "featured" && !!r && !o, u = Me(i, l), g = f && n === "ready" ? Ji(t, e) : void 0, c = g ?? (u ? Pi : zi[e]);
3331
3424
  return {
3332
3425
  thumbnailUrl: o ? void 0 : r,
3333
- accentStyle: u ? { backgroundColor: u } : void 0,
3334
- chinTextColor: u ? Di(u) : void 0,
3335
- tailColor: u ?? Oi[e],
3426
+ accentStyle: g ? { backgroundColor: g } : void 0,
3427
+ chinTextColor: ji(c),
3428
+ tailColor: c,
3336
3429
  isLoading: n === "loading",
3337
3430
  onImageError: m
3338
3431
  };
3339
3432
  }
3340
- const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Bi = "relative before:absolute before:-inset-[10px] before:content-['']", Fi = ({
3433
+ const Qi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", eo = "relative before:absolute before:-inset-[10px] before:content-['']", to = ({
3341
3434
  title: e,
3342
3435
  placeholderTitle: t,
3343
3436
  description: n,
@@ -3354,7 +3447,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3354
3447
  onEditClick: c,
3355
3448
  dismissLabel: x = "Dismiss attachment"
3356
3449
  }) => {
3357
- const _ = o === "classic", b = Le(r, l), p = Et({
3450
+ const _ = o === "classic", b = Me(r, l), p = Mt({
3358
3451
  variant: "dark",
3359
3452
  accentColor: f,
3360
3453
  status: u,
@@ -3369,10 +3462,10 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3369
3462
  onClick: g,
3370
3463
  "aria-label": x,
3371
3464
  className: y(
3372
- zi,
3373
- !b && Bi
3465
+ Qi,
3466
+ !b && eo
3374
3467
  ),
3375
- children: /* @__PURE__ */ s(ct, { className: "size-3", weight: "bold" })
3468
+ children: /* @__PURE__ */ s(ht, { className: "size-3", weight: "bold" })
3376
3469
  }
3377
3470
  ) : void 0, w = c ? /* @__PURE__ */ s(
3378
3471
  "button",
@@ -3381,12 +3474,12 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3381
3474
  onClick: c,
3382
3475
  "aria-label": "Edit attachment",
3383
3476
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3384
- children: /* @__PURE__ */ s(ca, { className: "size-5", weight: "regular" })
3477
+ children: /* @__PURE__ */ s(fa, { className: "size-5", weight: "regular" })
3385
3478
  }
3386
3479
  ) : void 0;
3387
- return b && !p.isLoading ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: St, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3480
+ return b && !p.isLoading ? /* @__PURE__ */ s(Fe, { variant: "dark", bgClassName: At, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
3388
3481
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3389
- $e,
3482
+ Be,
3390
3483
  {
3391
3484
  variant: "dark",
3392
3485
  sourceUrl: l,
@@ -3405,7 +3498,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3405
3498
  topRight: _ ? v : void 0,
3406
3499
  children: [
3407
3500
  !_ && /* @__PURE__ */ s(
3408
- $e,
3501
+ Be,
3409
3502
  {
3410
3503
  variant: "dark",
3411
3504
  thumbnailUrl: p.thumbnailUrl,
@@ -3418,8 +3511,9 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3418
3511
  }
3419
3512
  ),
3420
3513
  /* @__PURE__ */ s(
3421
- Ct,
3514
+ It,
3422
3515
  {
3516
+ chinTextColor: p.chinTextColor,
3423
3517
  variant: "dark",
3424
3518
  title: e,
3425
3519
  placeholderTitle: t,
@@ -3428,14 +3522,13 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3428
3522
  appIcon: d,
3429
3523
  cta: m,
3430
3524
  trailingAction: w,
3431
- chinTextColor: p.chinTextColor,
3432
3525
  isLoading: p.isLoading
3433
3526
  }
3434
3527
  )
3435
3528
  ]
3436
3529
  }
3437
3530
  );
3438
- }, js = ({
3531
+ }, Xs = ({
3439
3532
  color: e,
3440
3533
  side: t,
3441
3534
  visible: n,
@@ -3459,7 +3552,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3459
3552
  }
3460
3553
  )
3461
3554
  ] })
3462
- ) : /* @__PURE__ */ s(J, { children: a }), $i = ({
3555
+ ) : /* @__PURE__ */ s(J, { children: a }), so = ({
3463
3556
  title: e,
3464
3557
  description: t,
3465
3558
  url: n,
@@ -3474,13 +3567,13 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3474
3567
  onClick: u,
3475
3568
  groupPosition: g = "single"
3476
3569
  }) => {
3477
- const c = kt(a, i), x = yt(n), _ = d == null && x != null && !c ? x : void 0, b = d == null && !c ? u : void 0, p = f !== "loading" && Le(a, i) ? St : void 0, v = d && u ? {
3570
+ const c = Tt(a, i), x = Et(n), _ = d == null && x != null && !c ? x : void 0, b = d == null && !c ? u : void 0, p = f !== "loading" && Me(a, i) ? At : void 0, v = d && u ? {
3478
3571
  ...d,
3479
3572
  onClick: () => {
3480
3573
  var C;
3481
3574
  u(), (C = d.onClick) == null || C.call(d);
3482
3575
  }
3483
- } : d, w = Et({
3576
+ } : d, w = Mt({
3484
3577
  variant: "light",
3485
3578
  accentColor: m,
3486
3579
  status: f,
@@ -3490,7 +3583,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3490
3583
  sourceUrl: i
3491
3584
  });
3492
3585
  return /* @__PURE__ */ s(
3493
- js,
3586
+ Xs,
3494
3587
  {
3495
3588
  color: w.tailColor,
3496
3589
  side: "receiver",
@@ -3509,7 +3602,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3509
3602
  "data-testid": "link-attachment",
3510
3603
  children: [
3511
3604
  l === "featured" && /* @__PURE__ */ s(
3512
- $e,
3605
+ Be,
3513
3606
  {
3514
3607
  variant: "light",
3515
3608
  thumbnailUrl: w.thumbnailUrl,
@@ -3521,15 +3614,15 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3521
3614
  }
3522
3615
  ),
3523
3616
  /* @__PURE__ */ s(
3524
- Ct,
3617
+ It,
3525
3618
  {
3619
+ chinTextColor: w.chinTextColor,
3526
3620
  variant: "light",
3527
3621
  title: e,
3528
3622
  description: t,
3529
3623
  url: n,
3530
3624
  appIcon: o,
3531
3625
  cta: v,
3532
- chinTextColor: w.chinTextColor,
3533
3626
  isLoading: w.isLoading
3534
3627
  }
3535
3628
  )
@@ -3538,7 +3631,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3538
3631
  )
3539
3632
  }
3540
3633
  );
3541
- }, Ui = ({
3634
+ }, no = ({
3542
3635
  title: e,
3543
3636
  placeholderTitle: t,
3544
3637
  description: n,
@@ -3554,7 +3647,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3554
3647
  onClick: g,
3555
3648
  groupPosition: c = "single"
3556
3649
  }) => {
3557
- const x = kt(r, l), _ = yt(a), b = m == null && _ != null && !x ? _ : void 0, p = m == null && !x && b != null ? g : void 0, v = u !== "loading" && Le(r, l), w = Et({
3650
+ const x = Tt(r, l), _ = Et(a), b = m == null && _ != null && !x ? _ : void 0, p = m == null && !x && b != null ? g : void 0, v = u !== "loading" && Me(r, l), w = Mt({
3558
3651
  variant: "dark",
3559
3652
  accentColor: f,
3560
3653
  status: u,
@@ -3564,7 +3657,7 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3564
3657
  sourceUrl: l
3565
3658
  });
3566
3659
  return /* @__PURE__ */ s(
3567
- js,
3660
+ Xs,
3568
3661
  {
3569
3662
  color: w.tailColor,
3570
3663
  side: "sender",
@@ -3578,10 +3671,10 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3578
3671
  fixedHeight: o === "featured" && !v,
3579
3672
  accentStyle: w.accentStyle,
3580
3673
  busy: w.isLoading,
3581
- bgClassName: v ? St : void 0,
3674
+ bgClassName: v ? At : void 0,
3582
3675
  children: [
3583
3676
  o === "featured" && /* @__PURE__ */ s(
3584
- $e,
3677
+ Be,
3585
3678
  {
3586
3679
  variant: "dark",
3587
3680
  thumbnailUrl: w.thumbnailUrl,
@@ -3593,8 +3686,9 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3593
3686
  }
3594
3687
  ),
3595
3688
  /* @__PURE__ */ s(
3596
- Ct,
3689
+ It,
3597
3690
  {
3691
+ chinTextColor: w.chinTextColor,
3598
3692
  variant: "dark",
3599
3693
  title: e,
3600
3694
  placeholderTitle: t,
@@ -3602,7 +3696,6 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3602
3696
  url: a,
3603
3697
  appIcon: d,
3604
3698
  cta: m,
3605
- chinTextColor: w.chinTextColor,
3606
3699
  isLoading: w.isLoading
3607
3700
  }
3608
3701
  )
@@ -3611,22 +3704,22 @@ const zi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3611
3704
  )
3612
3705
  }
3613
3706
  );
3614
- }, ot = {
3615
- Composer: Fi,
3616
- Sent: Ui,
3617
- Received: $i
3707
+ }, ut = {
3708
+ Composer: to,
3709
+ Sent: no,
3710
+ Received: so
3618
3711
  };
3619
3712
  function D(e) {
3620
3713
  const t = e == null ? void 0 : e.trim();
3621
3714
  return t || void 0;
3622
3715
  }
3623
- function ns(e) {
3716
+ function ls(e) {
3624
3717
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3625
3718
  }
3626
- function Vi(e, t) {
3719
+ function ao(e, t) {
3627
3720
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3628
3721
  return !1;
3629
- const n = ns(e), a = ns(t);
3722
+ const n = ls(e), a = ls(t);
3630
3723
  if (n === a)
3631
3724
  return !0;
3632
3725
  if (!n.includes(a))
@@ -3634,7 +3727,7 @@ function Vi(e, t) {
3634
3727
  const r = n.split(a).join("");
3635
3728
  return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
3636
3729
  }
3637
- function as(e) {
3730
+ function cs(e) {
3638
3731
  const t = D(e.og_scrape_url) ?? D(e.title_link), n = D(e.image_url) ?? D(e.thumb_url), a = D(e.asset_url), r = D(e.mime_type);
3639
3732
  return {
3640
3733
  title: D(e.title),
@@ -3644,7 +3737,7 @@ function as(e) {
3644
3737
  // Playable clip embedded in a link preview — lets LinkAttachment render its
3645
3738
  // native video/audio player in the hero instead of a static thumbnail.
3646
3739
  sourceUrl: a,
3647
- layout: n || kt(r, a) ? "featured" : "classic",
3740
+ layout: n || Tt(r, a) ? "featured" : "classic",
3648
3741
  mimeType: r,
3649
3742
  // Dominant colour of the image, resolved by the sender at stage time and
3650
3743
  // persisted on the attachment (`stream-custom-data.ts`), so every viewer
@@ -3656,15 +3749,15 @@ function as(e) {
3656
3749
  status: "ready"
3657
3750
  };
3658
3751
  }
3659
- function ji(e) {
3752
+ function ro(e) {
3660
3753
  var t;
3661
- return Hs(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;
3754
+ return qs(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;
3662
3755
  }
3663
- function Hs(e) {
3756
+ function qs(e) {
3664
3757
  const t = D(e.og_scrape_url);
3665
3758
  return e.type === "link" || !!t && !e.asset_url;
3666
3759
  }
3667
- function Gs(e) {
3760
+ function Ks(e) {
3668
3761
  if (!(e != null && e.length)) return [];
3669
3762
  const t = [], n = (r, i) => {
3670
3763
  const l = t[t.length - 1];
@@ -3682,25 +3775,25 @@ function Gs(e) {
3682
3775
  t.push({ type: "link", attachments: [r] });
3683
3776
  };
3684
3777
  for (const r of e) {
3685
- if (Hs(r)) {
3778
+ if (qs(r)) {
3686
3779
  a(r);
3687
3780
  continue;
3688
3781
  }
3689
- const i = ji(r);
3782
+ const i = ro(r);
3690
3783
  i && n(i, r);
3691
3784
  }
3692
3785
  return t;
3693
3786
  }
3694
- function Hi(e) {
3787
+ function io(e) {
3695
3788
  return e.filter((t) => t.type === "media").length;
3696
3789
  }
3697
- function Gi(e, t, n) {
3790
+ function oo(e, t, n) {
3698
3791
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3699
3792
  }
3700
- function rs(e) {
3793
+ function ds(e) {
3701
3794
  return D(e.image_url) ?? D(e.asset_url) ?? "";
3702
3795
  }
3703
- function Yi(e) {
3796
+ function lo(e) {
3704
3797
  switch (e) {
3705
3798
  case "image":
3706
3799
  return Ne.Image;
@@ -3714,13 +3807,13 @@ function Yi(e) {
3714
3807
  return Ne.File;
3715
3808
  }
3716
3809
  }
3717
- function Wi(e, t) {
3810
+ function co(e, t) {
3718
3811
  if (t.length > 1)
3719
3812
  switch (e) {
3720
3813
  case "image":
3721
3814
  return {
3722
3815
  items: t.map((a) => ({
3723
- src: rs(a),
3816
+ src: ds(a),
3724
3817
  alt: D(a.title)
3725
3818
  }))
3726
3819
  };
@@ -3765,7 +3858,7 @@ function Wi(e, t) {
3765
3858
  switch (e) {
3766
3859
  case "image":
3767
3860
  return {
3768
- src: rs(n),
3861
+ src: ds(n),
3769
3862
  alt: D(n.title)
3770
3863
  };
3771
3864
  case "video":
@@ -3797,49 +3890,49 @@ function Wi(e, t) {
3797
3890
  };
3798
3891
  }
3799
3892
  }
3800
- function qi({
3893
+ function uo({
3801
3894
  groupPosition: e,
3802
3895
  isMyMessage: t,
3803
3896
  segment: n
3804
3897
  }) {
3805
- const a = Yi(n.kind), r = {
3806
- ...Wi(n.kind, n.attachments),
3898
+ const a = lo(n.kind), r = {
3899
+ ...co(n.kind, n.attachments),
3807
3900
  groupPosition: e
3808
3901
  };
3809
3902
  return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3810
3903
  }
3811
- const Xi = ({
3904
+ const mo = ({
3812
3905
  groupPosition: e,
3813
3906
  isMyMessage: t,
3814
3907
  message: n,
3815
3908
  renderText: a
3816
3909
  }) => {
3817
3910
  var _;
3818
- const r = Gs(n.attachments);
3911
+ const r = Ks(n.attachments);
3819
3912
  if (r.length === 0) return null;
3820
- const i = Hi(r), l = (_ = n.text) == null ? void 0 : _.trim(), o = r.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? as(o.attachments[0] ?? {}).url : void 0, m = l && Vi(l, d) ? void 0 : l;
3913
+ const i = io(r), l = (_ = n.text) == null ? void 0 : _.trim(), o = r.find((b) => b.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? cs(o.attachments[0] ?? {}).url : void 0, m = l && ao(l, d) ? void 0 : l;
3821
3914
  let f = 0;
3822
3915
  const u = [], g = m ? "middle" : e, c = (b, p, v) => {
3823
- const w = t ? ot.Sent : ot.Received;
3916
+ const w = t ? ut.Sent : ut.Received;
3824
3917
  u.push(
3825
3918
  /* @__PURE__ */ s(
3826
3919
  w,
3827
3920
  {
3828
- ...as(b),
3921
+ ...cs(b),
3829
3922
  groupPosition: v ? g : "middle"
3830
3923
  },
3831
3924
  p
3832
3925
  )
3833
3926
  );
3834
3927
  }, x = (b, p) => {
3835
- const v = Gi(
3928
+ const v = oo(
3836
3929
  f,
3837
3930
  i,
3838
3931
  e
3839
3932
  );
3840
3933
  f += 1, u.push(
3841
3934
  /* @__PURE__ */ s(
3842
- qi,
3935
+ uo,
3843
3936
  {
3844
3937
  groupPosition: v,
3845
3938
  isMyMessage: t,
@@ -3876,17 +3969,17 @@ const Xi = ({
3876
3969
  },
3877
3970
  children: [
3878
3971
  u,
3879
- !m && /* @__PURE__ */ s(tt, {})
3972
+ !m && /* @__PURE__ */ s(nt, {})
3880
3973
  ]
3881
3974
  }
3882
3975
  ),
3883
3976
  m ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
3884
- /* @__PURE__ */ s(ze, { message: n, renderText: a }),
3885
- /* @__PURE__ */ s(tt, {})
3977
+ /* @__PURE__ */ s(Oe, { message: n, renderText: a }),
3978
+ /* @__PURE__ */ s(nt, {})
3886
3979
  ] }) : null
3887
3980
  ] });
3888
- }, Ki = (e) => {
3889
- var Dt, Pt, Ot, zt, Bt, Ft, $t, Ut, Vt, jt;
3981
+ }, ho = (e) => {
3982
+ var Ft, Bt, $t, Ut, Vt, jt, Ht, Gt, Yt, Wt;
3890
3983
  const {
3891
3984
  additionalMessageInputProps: t,
3892
3985
  chatbotVotingEnabled: n,
@@ -3905,79 +3998,79 @@ const Xi = ({
3905
3998
  threadList: _,
3906
3999
  viewerLanguage: b,
3907
4000
  onBroadcastClick: p
3908
- } = e, { client: v } = Se("CustomMessage"), { channel: w } = he("CustomMessage"), { isUnlocking: C, onUnlockClick: T, onFetchSource: O, onDownloadClick: R } = ai("LockedAttachment"), [z, $] = B(!1), L = cn(c.id), { selected: S, voteUp: P, voteDown: k } = Ra(c), {
3909
- Attachment: E = dn,
3910
- EditMessageModal: I = un,
4001
+ } = e, { client: v } = Se("CustomMessage"), { channel: w } = he("CustomMessage"), { isUnlocking: C, onUnlockClick: T, onFetchSource: O, onDownloadClick: R } = ci("LockedAttachment"), [z, $] = F(!1), M = fn(c.id), { selected: S, voteUp: P, voteDown: k } = Fa(c), {
4002
+ Attachment: E = gn,
4003
+ EditMessageModal: I = pn,
3911
4004
  MessageActions: A,
3912
- MessageBlocked: U = mn,
3913
- MessageBouncePrompt: j = hn,
3914
- MessageDeleted: q = fn,
3915
- MessageIsThreadReplyInChannelButtonIndicator: Q = gn,
3916
- MessageRepliesCountButton: K = pn,
3917
- ReminderNotification: N = bn,
3918
- StreamedMessageText: M = vn,
4005
+ MessageBlocked: U = bn,
4006
+ MessageBouncePrompt: j = vn,
4007
+ MessageDeleted: X = xn,
4008
+ MessageIsThreadReplyInChannelButtonIndicator: Q = _n,
4009
+ MessageRepliesCountButton: K = wn,
4010
+ ReminderNotification: N = Nn,
4011
+ StreamedMessageText: L = yn,
3919
4012
  PinIndicator: G
3920
- } = ds("CustomMessage"), X = xn(c), se = _n(c), Z = ne(
4013
+ } = gs("CustomMessage"), q = Cn(c), se = kn(c), Z = ne(
3921
4014
  () => u == null ? void 0 : u(c),
3922
4015
  [u, c]
3923
4016
  ), V = ne(() => {
3924
4017
  const ue = c.attachments ?? [], be = c.shared_location ? [c.shared_location, ...ue] : ue;
3925
- if (!Be(c)) return be;
3926
- const Ht = be.filter((Gt) => !("type" in Gt) || !Ss(Gt));
3927
- return Ht.length === be.length ? be : Ht;
4018
+ if (!ze(c)) return be;
4019
+ const Xt = be.filter((qt) => !("type" in qt) || !Ms(qt));
4020
+ return Xt.length === be.length ? be : Xt;
3928
4021
  }, [c]), ee = ne(
3929
- () => Gs(V),
4022
+ () => Ks(V),
3930
4023
  [V]
3931
4024
  ), re = ne(() => {
3932
- const ue = ws({ message: c, viewerLanguage: b });
4025
+ const ue = Ss({ message: c, viewerLanguage: b });
3933
4026
  return ue === c.text ? c : { ...c, text: ue };
3934
- }, [c, b]), Me = ee.length > 0, Re = ee.reduce(
4027
+ }, [c, b]), Le = ee.length > 0, Re = ee.reduce(
3935
4028
  (ue, be) => ue + be.attachments.length,
3936
4029
  0
3937
- ) === ((V == null ? void 0 : V.length) ?? 0), ie = ir({
4030
+ ) === ((V == null ? void 0 : V.length) ?? 0), ie = ur({
3938
4031
  endOfGroup: r,
3939
4032
  firstOfGroup: i,
3940
4033
  groupedByUser: l
3941
4034
  });
3942
- if (wn(c))
4035
+ if (Sn(c))
3943
4036
  return null;
3944
4037
  if (c.deleted_at || c.type === "deleted")
3945
- return /* @__PURE__ */ s(q, { message: c });
3946
- if (Nn(c))
4038
+ return /* @__PURE__ */ s(X, { message: c });
4039
+ if (En(c))
3947
4040
  return /* @__PURE__ */ s(U, {});
3948
- const de = !_ && !!c.reply_count, oe = !_ && c.show_in_channel && c.parent_id, It = c.status === "failed" && ((Dt = c.error) == null ? void 0 : Dt.status) !== 403, Tt = yn(c);
4041
+ const de = !_ && !!c.reply_count, oe = !_ && c.show_in_channel && c.parent_id, Lt = c.status === "failed" && ((Ft = c.error) == null ? void 0 : Ft.status) !== 403, Rt = In(c);
3949
4042
  let ge;
3950
- It ? ge = () => m(c) : Tt && (ge = () => $(!0));
3951
- const te = g(), Zs = y(
4043
+ Lt ? ge = () => m(c) : Rt && (ge = () => $(!0));
4044
+ const te = g(), sn = y(
3952
4045
  "str-chat__message str-chat__message-simple",
3953
4046
  `str-chat__message--${c.type}`,
3954
4047
  `str-chat__message--${c.status}`,
3955
4048
  te ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other",
3956
4049
  c.text ? "str-chat__message--has-text" : "has-no-text",
3957
4050
  {
3958
- "str-chat__message--has-attachment": X,
4051
+ "str-chat__message--has-attachment": q,
3959
4052
  "str-chat__message--highlighted": f,
3960
4053
  "str-chat__message--pinned pinned-message": c.pinned,
3961
4054
  "str-chat__message--with-reactions": se,
3962
- "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Pt = c == null ? void 0 : c.error) == null ? void 0 : Pt.status) !== 403,
4055
+ "str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Bt = c == null ? void 0 : c.error) == null ? void 0 : Bt.status) !== 403,
3963
4056
  "str-chat__message-with-thread-link": de || oe,
3964
4057
  "str-chat__virtual-message__wrapper--end": r,
3965
4058
  "str-chat__virtual-message__wrapper--first": i,
3966
4059
  "str-chat__virtual-message__wrapper--group": l
3967
4060
  }
3968
- ), je = c.poll_id && v.polls.fromState(c.poll_id), At = mi(c), pe = Be(c), Js = wt(c), He = !!(V != null && V.length && !c.quoted_message), Lt = pe && te && He, Qs = Me && Re && !c.quoted_message && !je && !Z && !pe, Mt = {
4061
+ ), Ve = c.poll_id && v.polls.fromState(c.poll_id), Dt = bi(c), pe = ze(c), nn = kt(c), je = !!(V != null && V.length && !c.quoted_message), Pt = pe && te && je, an = Le && Re && !c.quoted_message && !Ve && !Z && !pe, Ot = {
3969
4062
  contentType: "text",
3970
- amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
3971
- paymentStatus: (zt = c.metadata) == null ? void 0 : zt.payment_status,
3972
- renderedText: c.text && /* @__PURE__ */ s(ze, { message: re, renderText: x })
3973
- }, Rt = {
4063
+ amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
4064
+ paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
4065
+ renderedText: c.text && /* @__PURE__ */ s(Oe, { message: re, renderText: x })
4066
+ }, zt = {
3974
4067
  contentType: "media",
3975
- title: (Bt = c.metadata) == null ? void 0 : Bt.attachment_title,
3976
- mimeType: (Ft = c.metadata) == null ? void 0 : Ft.attachment_mime_type,
3977
- thumbnailUrl: ($t = c.metadata) == null ? void 0 : $t.attachment_thumbnail,
3978
- amountText: (Ut = c.metadata) == null ? void 0 : Ut.amount_text,
3979
- detail: (Vt = c.metadata) == null ? void 0 : Vt.attachment_detail,
3980
- paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
4068
+ title: (Vt = c.metadata) == null ? void 0 : Vt.attachment_title,
4069
+ mimeType: (jt = c.metadata) == null ? void 0 : jt.attachment_mime_type,
4070
+ thumbnailUrl: (Ht = c.metadata) == null ? void 0 : Ht.attachment_thumbnail,
4071
+ amountText: (Gt = c.metadata) == null ? void 0 : Gt.amount_text,
4072
+ detail: (Yt = c.metadata) == null ? void 0 : Yt.attachment_detail,
4073
+ paymentStatus: (Wt = c.metadata) == null ? void 0 : Wt.payment_status,
3981
4074
  onFetchSource: O ? () => O(c, w) : void 0
3982
4075
  };
3983
4076
  return /* @__PURE__ */ h(J, { children: [
@@ -3988,7 +4081,7 @@ const Xi = ({
3988
4081
  }
3989
4082
  ),
3990
4083
  z && /* @__PURE__ */ s(
3991
- Cn,
4084
+ Tn,
3992
4085
  {
3993
4086
  MessageBouncePrompt: j,
3994
4087
  onClose: () => $(!1),
@@ -3998,12 +4091,12 @@ const Xi = ({
3998
4091
  /* @__PURE__ */ h(
3999
4092
  "div",
4000
4093
  {
4001
- className: Zs,
4094
+ className: sn,
4002
4095
  "data-message-id": c.id,
4003
4096
  "data-dd-privacy": "mask",
4004
4097
  children: [
4005
4098
  G && /* @__PURE__ */ s(G, {}),
4006
- !!L && /* @__PURE__ */ s(N, { reminder: L }),
4099
+ !!M && /* @__PURE__ */ s(N, { reminder: M }),
4007
4100
  c.user && /* @__PURE__ */ s(
4008
4101
  _e,
4009
4102
  {
@@ -4020,7 +4113,7 @@ const Xi = ({
4020
4113
  "div",
4021
4114
  {
4022
4115
  className: y("str-chat__message-inner", {
4023
- "str-chat__simple-message--error-failed": It || Tt
4116
+ "str-chat__simple-message--error-failed": Lt || Rt
4024
4117
  }),
4025
4118
  "data-testid": "message-inner",
4026
4119
  onClick: ge,
@@ -4033,38 +4126,38 @@ const Xi = ({
4033
4126
  marginInlineEnd: 0,
4034
4127
  marginInlineStart: 0
4035
4128
  },
4036
- children: At ? /* @__PURE__ */ s(Xe, { message: c, standalone: !0 }) : di(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4129
+ children: Dt ? /* @__PURE__ */ s(Xe, { message: c, standalone: !0 }) : gi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4037
4130
  te && A && /* @__PURE__ */ s(A, {}),
4038
4131
  te ? /* @__PURE__ */ s(
4039
4132
  Pe,
4040
4133
  {
4041
- ...Mt,
4134
+ ...Ot,
4042
4135
  isMine: !0
4043
4136
  }
4044
4137
  ) : /* @__PURE__ */ s(
4045
4138
  Pe,
4046
4139
  {
4047
- ...Mt,
4140
+ ...Ot,
4048
4141
  isMine: !1,
4049
4142
  isUnlocking: C(c.id),
4050
4143
  onUnlockClick: () => T == null ? void 0 : T(c, w)
4051
4144
  }
4052
4145
  ),
4053
4146
  !te && A && /* @__PURE__ */ s(A, {})
4054
- ] }) }) : ui(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
4147
+ ] }) }) : pi(c) ? /* @__PURE__ */ h("div", { className: "str-chat__message-bubble-wrapper", children: [
4055
4148
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
4056
4149
  te && A && /* @__PURE__ */ s(A, {}),
4057
4150
  te ? /* @__PURE__ */ s(
4058
4151
  Pe,
4059
4152
  {
4060
- ...Rt,
4153
+ ...zt,
4061
4154
  isMine: !0,
4062
4155
  onPreviewClick: () => T ? T(c, w) : void 0
4063
4156
  }
4064
4157
  ) : /* @__PURE__ */ s(
4065
4158
  Pe,
4066
4159
  {
4067
- ...Rt,
4160
+ ...zt,
4068
4161
  isMine: !1,
4069
4162
  isUnlocking: C(c.id),
4070
4163
  onUnlockClick: () => T ? T(c, w) : void 0,
@@ -4074,14 +4167,14 @@ const Xi = ({
4074
4167
  !te && A && /* @__PURE__ */ s(A, {})
4075
4168
  ] }),
4076
4169
  c.text && /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s(
4077
- ze,
4170
+ Oe,
4078
4171
  {
4079
4172
  message: re,
4080
4173
  renderText: x
4081
4174
  }
4082
4175
  ) })
4083
- ] }) : Qs ? /* @__PURE__ */ s(
4084
- Xi,
4176
+ ] }) : an ? /* @__PURE__ */ s(
4177
+ mo,
4085
4178
  {
4086
4179
  groupPosition: ie,
4087
4180
  isMyMessage: te,
@@ -4096,15 +4189,15 @@ const Xi = ({
4096
4189
  renderText: x
4097
4190
  }
4098
4191
  ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ h("div", { className: "str-chat__message-bubble", children: [
4099
- pe && !Lt && /* @__PURE__ */ s(
4192
+ pe && !Pt && /* @__PURE__ */ s(
4100
4193
  Xe,
4101
4194
  {
4102
4195
  message: c,
4103
- hasAttachment: He,
4196
+ hasAttachment: je,
4104
4197
  isMyMessage: te
4105
4198
  }
4106
4199
  ),
4107
- je && /* @__PURE__ */ s(kn, { poll: je }),
4200
+ Ve && /* @__PURE__ */ s(An, { poll: Ve }),
4108
4201
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ s(
4109
4202
  E,
4110
4203
  {
@@ -4113,33 +4206,33 @@ const Xi = ({
4113
4206
  }
4114
4207
  ) : null,
4115
4208
  Z ? /* @__PURE__ */ s(
4116
- M,
4209
+ L,
4117
4210
  {
4118
4211
  message: re,
4119
4212
  renderText: x
4120
4213
  }
4121
4214
  ) : /* @__PURE__ */ s(
4122
- ze,
4215
+ Oe,
4123
4216
  {
4124
4217
  message: re,
4125
4218
  renderText: x
4126
4219
  }
4127
4220
  ),
4128
- /* @__PURE__ */ s(tt, {})
4221
+ /* @__PURE__ */ s(nt, {})
4129
4222
  ] }) })
4130
4223
  }
4131
4224
  ),
4132
- !Js && !At && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
4133
- (!pe || Lt) && /* @__PURE__ */ s(
4225
+ !nn && !Dt && /* @__PURE__ */ h("div", { className: "str-chat__message-footer", children: [
4226
+ (!pe || Pt) && /* @__PURE__ */ s(
4134
4227
  Xe,
4135
4228
  {
4136
4229
  message: c,
4137
- hasAttachment: He,
4230
+ hasAttachment: je,
4138
4231
  isMyMessage: te
4139
4232
  }
4140
4233
  ),
4141
4234
  n && pe && /* @__PURE__ */ s(
4142
- hi,
4235
+ vi,
4143
4236
  {
4144
4237
  selected: S,
4145
4238
  onVoteUp: P,
@@ -4147,7 +4240,7 @@ const Xi = ({
4147
4240
  }
4148
4241
  )
4149
4242
  ] }),
4150
- /* @__PURE__ */ s(bi, { onBroadcastClick: p }),
4243
+ /* @__PURE__ */ s(Ni, { onBroadcastClick: p }),
4151
4244
  de && /* @__PURE__ */ s(
4152
4245
  K,
4153
4246
  {
@@ -4161,57 +4254,57 @@ const Xi = ({
4161
4254
  c.id
4162
4255
  )
4163
4256
  ] });
4164
- }, Zi = F.memo(
4165
- Ki,
4166
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick ? !1 : ln(e, t)
4167
- ), Ji = (e) => {
4257
+ }, fo = B.memo(
4258
+ ho,
4259
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick ? !1 : hn(e, t)
4260
+ ), go = (e) => {
4168
4261
  const t = fe("CustomMessage");
4169
- return /* @__PURE__ */ s(Zi, { ...t, ...e });
4170
- }, Qi = () => {
4262
+ return /* @__PURE__ */ s(fo, { ...t, ...e });
4263
+ }, po = () => {
4171
4264
  var n;
4172
4265
  const { handleDelete: e, message: t } = fe("CustomMessageActions");
4173
4266
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
4174
- gs,
4267
+ _s,
4175
4268
  {
4176
4269
  onClick: e,
4177
4270
  "aria-label": "Delete",
4178
4271
  title: "Delete",
4179
4272
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4180
- children: /* @__PURE__ */ s(da, { size: 16, weight: "light", "aria-hidden": !0 })
4273
+ children: /* @__PURE__ */ s(ga, { size: 16, weight: "light", "aria-hidden": !0 })
4181
4274
  }
4182
4275
  );
4183
- }, eo = () => {
4276
+ }, bo = () => {
4184
4277
  const { handleFlag: e } = fe("CustomMessageActions");
4185
4278
  return /* @__PURE__ */ s(
4186
- gs,
4279
+ _s,
4187
4280
  {
4188
4281
  onClick: e,
4189
4282
  "aria-label": "Report",
4190
4283
  title: "Report",
4191
4284
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4192
- children: /* @__PURE__ */ s(us, { size: 16, weight: "light", "aria-hidden": !0 })
4285
+ children: /* @__PURE__ */ s(ps, { size: 16, weight: "light", "aria-hidden": !0 })
4193
4286
  }
4194
4287
  );
4195
- }, to = () => {
4288
+ }, vo = () => {
4196
4289
  var t;
4197
4290
  const { message: e } = fe("CustomMessageActions");
4198
4291
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== le.ATTACHMENT ? null : /* @__PURE__ */ s(
4199
- va,
4292
+ ya,
4200
4293
  {
4201
4294
  messageActionSet: [
4202
- { Component: Qi, placement: "quick", type: "delete" },
4203
- { Component: eo, placement: "quick", type: "flag" }
4295
+ { Component: po, placement: "quick", type: "delete" },
4296
+ { Component: bo, placement: "quick", type: "flag" }
4204
4297
  ]
4205
4298
  }
4206
4299
  );
4207
- }, so = (e) => ({
4300
+ }, xo = (e) => ({
4208
4301
  linkPreviews: Array.from(e.previews.values()).filter(
4209
- (t) => et.previewIsLoaded(t) || et.previewIsLoading(t)
4302
+ (t) => st.previewIsLoaded(t) || st.previewIsLoading(t)
4210
4303
  )
4211
- }), no = () => {
4212
- const { linkPreviewsManager: e } = Sn(), { linkPreviews: t } = En(
4304
+ }), _o = () => {
4305
+ const { linkPreviewsManager: e } = Mn(), { linkPreviews: t } = Ln(
4213
4306
  e.state,
4214
- so
4307
+ xo
4215
4308
  ), n = (r) => {
4216
4309
  e.dismissPreview(r);
4217
4310
  };
@@ -4259,9 +4352,9 @@ const Xi = ({
4259
4352
  // past the fold, reachable by scrolling. That residue belongs to whoever
4260
4353
  // owns the mobile layout contract, not to this component.
4261
4354
  /* @__PURE__ */ s("div", { className: "messaging-link-preview-list flex min-h-0 flex-col items-stretch w-full gap-2 overflow-y-auto overscroll-contain", children: t.map((r) => {
4262
- const i = et.previewIsLoading(r);
4355
+ const i = st.previewIsLoading(r);
4263
4356
  return /* @__PURE__ */ s("div", { className: "w-full shrink-0", children: /* @__PURE__ */ s(
4264
- ot.Composer,
4357
+ ut.Composer,
4265
4358
  {
4266
4359
  title: r.title,
4267
4360
  url: r.og_scrape_url,
@@ -4273,7 +4366,7 @@ const Xi = ({
4273
4366
  ) }, r.og_scrape_url);
4274
4367
  }) })
4275
4368
  ) : null;
4276
- }, Ue = F.createContext(!1), ao = 200, Wo = () => ke(Ue), ro = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
4369
+ }, $e = B.createContext(!1), wo = 200, cl = () => ke($e), No = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
4277
4370
  "button",
4278
4371
  {
4279
4372
  ...n,
@@ -4282,13 +4375,13 @@ const Xi = ({
4282
4375
  disabled: t,
4283
4376
  onPointerDown: (a) => a.preventDefault(),
4284
4377
  onClick: e,
4285
- children: /* @__PURE__ */ s(ua, { weight: "bold", className: "size-4" })
4378
+ children: /* @__PURE__ */ s(pa, { weight: "bold", className: "size-4" })
4286
4379
  }
4287
- ), is = () => {
4288
- const e = ke(Ue), { handleSubmit: t } = In(), n = Tn(), a = e || !n, {
4289
- SendButton: r = ro,
4290
- AttachmentPreviewList: i = An
4291
- } = ds("CustomMessageInput");
4380
+ ), us = () => {
4381
+ const e = ke($e), { handleSubmit: t } = Rn(), n = Dn(), a = e || !n, {
4382
+ SendButton: r = No,
4383
+ AttachmentPreviewList: i = Pn
4384
+ } = gs("CustomMessageInput");
4292
4385
  return (
4293
4386
  // min-h-0 lets the composer shrink under keyboard squeeze (the link
4294
4387
  // preview list inside is the scrollable region); the textarea + send row
@@ -4318,13 +4411,13 @@ const Xi = ({
4318
4411
  "data-dd-privacy": "mask",
4319
4412
  children: [
4320
4413
  /* @__PURE__ */ h("div", { className: "messaging-composer-previews empty:hidden flex min-h-0 flex-col gap-2 px-2 pt-2", children: [
4321
- /* @__PURE__ */ s(Ln, {}),
4322
- /* @__PURE__ */ s(no, {}),
4414
+ /* @__PURE__ */ s(On, {}),
4415
+ /* @__PURE__ */ s(_o, {}),
4323
4416
  /* @__PURE__ */ s(i, {})
4324
4417
  ] }),
4325
4418
  /* @__PURE__ */ h("div", { className: "messaging-composer-row flex shrink-0 items-start", children: [
4326
4419
  /* @__PURE__ */ s(
4327
- Mn,
4420
+ zn,
4328
4421
  {
4329
4422
  "aria-disabled": e || void 0,
4330
4423
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4352,7 +4445,7 @@ const Xi = ({
4352
4445
  }
4353
4446
  )
4354
4447
  );
4355
- }, os = ({
4448
+ }, ms = ({
4356
4449
  renderActions: e,
4357
4450
  renderHeader: t,
4358
4451
  renderFooter: n,
@@ -4361,8 +4454,8 @@ const Xi = ({
4361
4454
  composerInput: i
4362
4455
  }) => {
4363
4456
  var f;
4364
- const { channel: l } = he(), o = ((f = l == null ? void 0 : l.data) == null ? void 0 : f.frozen) === !0, d = !!i, m = F.useRef(null);
4365
- return F.useEffect(() => {
4457
+ const { channel: l } = he(), o = ((f = l == null ? void 0 : l.data) == null ? void 0 : f.frozen) === !0, d = !!i, m = B.useRef(null);
4458
+ return B.useEffect(() => {
4366
4459
  if (!d)
4367
4460
  return;
4368
4461
  const u = m.current, g = u == null ? void 0 : u.parentElement;
@@ -4374,7 +4467,7 @@ const Xi = ({
4374
4467
  c = b;
4375
4468
  const v = Array.from(
4376
4469
  g.querySelectorAll(".str-chat__list")
4377
- ).find((C) => C.scrollHeight > C.clientHeight) ?? null, w = v ? v.scrollHeight - v.scrollTop - v.clientHeight < ao : !1;
4470
+ ).find((C) => C.scrollHeight > C.clientHeight) ?? null, w = v ? v.scrollHeight - v.scrollTop - v.clientHeight < wo : !1;
4378
4471
  g.style.setProperty(
4379
4472
  "--messaging-composer-height",
4380
4473
  `${b}px`
@@ -4436,7 +4529,7 @@ const Xi = ({
4436
4529
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4437
4530
  children: [
4438
4531
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4439
- /* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(Yt, { Input: i ?? is }) })
4532
+ /* @__PURE__ */ s($e.Provider, { value: o, children: /* @__PURE__ */ s(Kt, { Input: i ?? us }) })
4440
4533
  ]
4441
4534
  }
4442
4535
  ),
@@ -4455,67 +4548,67 @@ const Xi = ({
4455
4548
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
4456
4549
  children: [
4457
4550
  e && /* @__PURE__ */ s("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
4458
- /* @__PURE__ */ s(Ue.Provider, { value: o, children: /* @__PURE__ */ s(Yt, { Input: is }) })
4551
+ /* @__PURE__ */ s($e.Provider, { value: o, children: /* @__PURE__ */ s(Kt, { Input: us }) })
4459
4552
  ]
4460
4553
  }
4461
4554
  ),
4462
4555
  n == null ? void 0 : n()
4463
4556
  ] });
4464
- }, io = {
4557
+ }, yo = {
4465
4558
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
4466
4559
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4467
- }, oo = ["SYSTEM_AGE_SAFETY_BLOCKED"], lo = {
4560
+ }, Co = ["SYSTEM_AGE_SAFETY_BLOCKED"], ko = {
4468
4561
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4469
- }, Je = "age safety guidelines.", co = "https://linktr.ee/s/about/contact", uo = (e) => oo.includes(
4562
+ }, et = "age safety guidelines.", So = "https://linktr.ee/s/about/contact", Eo = (e) => Co.includes(
4470
4563
  e
4471
- ), mo = (e) => {
4564
+ ), Io = (e) => {
4472
4565
  var t;
4473
- return uo((t = e.metadata) == null ? void 0 : t.custom_type);
4474
- }, ho = (e) => {
4566
+ return Eo((t = e.metadata) == null ? void 0 : t.custom_type);
4567
+ }, To = (e) => {
4475
4568
  var a;
4476
4569
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
4477
- if (Xt(t))
4570
+ if (Qt(t))
4478
4571
  return {
4479
4572
  kind: "dm-agent",
4480
4573
  type: t
4481
4574
  };
4482
- if (pa(t))
4575
+ if (wa(t))
4483
4576
  return {
4484
4577
  kind: "age-safety",
4485
4578
  type: t
4486
4579
  };
4487
4580
  const n = e.dm_agent_system_type;
4488
- if (Xt(n))
4581
+ if (Qt(n))
4489
4582
  return {
4490
4583
  kind: "dm-agent",
4491
4584
  type: n
4492
4585
  };
4493
- }, fo = (e) => {
4494
- const t = e.indexOf(Je);
4586
+ }, Ao = (e) => {
4587
+ const t = e.indexOf(et);
4495
4588
  if (t === -1)
4496
4589
  return e;
4497
- const n = t + Je.length;
4590
+ const n = t + et.length;
4498
4591
  return /* @__PURE__ */ h(J, { children: [
4499
4592
  e.slice(0, t),
4500
4593
  /* @__PURE__ */ s(
4501
4594
  "a",
4502
4595
  {
4503
- href: co,
4596
+ href: So,
4504
4597
  target: "_blank",
4505
4598
  rel: "noopener noreferrer",
4506
4599
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
4507
- children: Je
4600
+ children: et
4508
4601
  }
4509
4602
  ),
4510
4603
  e.slice(n)
4511
4604
  ] });
4512
- }, go = (e) => {
4605
+ }, Mo = (e) => {
4513
4606
  var a, r;
4514
- const t = !mo(e.message), n = ho(
4607
+ const t = !Io(e.message), n = To(
4515
4608
  e.message
4516
4609
  );
4517
4610
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
4518
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || io[n.type];
4611
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || yo[n.type];
4519
4612
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4520
4613
  /* @__PURE__ */ h(
4521
4614
  "div",
@@ -4525,7 +4618,7 @@ const Xi = ({
4525
4618
  "data-dm-agent-system-type": n.type,
4526
4619
  children: [
4527
4620
  /* @__PURE__ */ s(
4528
- ma,
4621
+ ba,
4529
4622
  {
4530
4623
  size: 16,
4531
4624
  weight: "regular",
@@ -4537,11 +4630,11 @@ const Xi = ({
4537
4630
  ]
4538
4631
  }
4539
4632
  ),
4540
- !t && /* @__PURE__ */ s(Ge, { message: e.message })
4633
+ !t && /* @__PURE__ */ s(He, { message: e.message })
4541
4634
  ] });
4542
4635
  }
4543
4636
  if ((n == null ? void 0 : n.kind) === "age-safety") {
4544
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || lo[n.type];
4637
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || ko[n.type];
4545
4638
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4546
4639
  /* @__PURE__ */ h(
4547
4640
  "div",
@@ -4551,7 +4644,7 @@ const Xi = ({
4551
4644
  "data-age-safety-system-type": n.type,
4552
4645
  children: [
4553
4646
  /* @__PURE__ */ s(
4554
- ha,
4647
+ va,
4555
4648
  {
4556
4649
  size: 24,
4557
4650
  weight: "duotone",
@@ -4560,11 +4653,11 @@ const Xi = ({
4560
4653
  "data-testid": "age-safety-system-message-icon"
4561
4654
  }
4562
4655
  ),
4563
- /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: fo(i) }) })
4656
+ /* @__PURE__ */ s("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ s("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Ao(i) }) })
4564
4657
  ]
4565
4658
  }
4566
4659
  ),
4567
- !t && /* @__PURE__ */ s(Ge, { message: e.message })
4660
+ !t && /* @__PURE__ */ s(He, { message: e.message })
4568
4661
  ] });
4569
4662
  }
4570
4663
  return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
@@ -4573,9 +4666,9 @@ const Xi = ({
4573
4666
  /* @__PURE__ */ s("p", { children: e.message.text }),
4574
4667
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
4575
4668
  ] }),
4576
- !t && /* @__PURE__ */ s(Ge, { message: e.message })
4669
+ !t && /* @__PURE__ */ s(He, { message: e.message })
4577
4670
  ] });
4578
- }, Ys = lt(!1), Qe = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4671
+ }, Zs = mt(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4579
4672
  "animateTransform",
4580
4673
  {
4581
4674
  attributeName: "transform",
@@ -4585,17 +4678,17 @@ const Xi = ({
4585
4678
  begin: `${120 * t}ms`,
4586
4679
  repeatCount: "indefinite"
4587
4680
  }
4588
- ) }), po = /* @__PURE__ */ new Set([
4589
- Ye.Thinking,
4590
- Ye.Generating,
4591
- Ye.ExternalSources
4592
- ]), bo = ({ threadList: e }) => {
4681
+ ) }), Lo = /* @__PURE__ */ new Set([
4682
+ Ge.Thinking,
4683
+ Ge.Generating,
4684
+ Ge.ExternalSources
4685
+ ]), Ro = ({ threadList: e }) => {
4593
4686
  var x, _;
4594
- const { channel: t, channelConfig: n, thread: a } = he(), { client: r } = Se(), { typing: i = {} } = Rn(), { aiState: l } = Dn(t), o = ke(Ys);
4595
- if (!e && o && po.has(l)) {
4596
- const b = vo(t, (x = r.user) == null ? void 0 : x.id);
4687
+ const { channel: t, channelConfig: n, thread: a } = he(), { client: r } = Se(), { typing: i = {} } = Fn(), { aiState: l } = Bn(t), o = ke(Zs);
4688
+ if (!e && o && Lo.has(l)) {
4689
+ const b = Do(t, (x = r.user) == null ? void 0 : x.id);
4597
4690
  return /* @__PURE__ */ s(
4598
- ls,
4691
+ hs,
4599
4692
  {
4600
4693
  avatarId: (b == null ? void 0 : b.id) ?? "ai-agent",
4601
4694
  avatarName: (b == null ? void 0 : b.name) ?? (b == null ? void 0 : b.id) ?? "Agent",
@@ -4621,7 +4714,7 @@ const Xi = ({
4621
4714
  return null;
4622
4715
  const g = (_ = u[0]) == null ? void 0 : _.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4623
4716
  return /* @__PURE__ */ s(
4624
- ls,
4717
+ hs,
4625
4718
  {
4626
4719
  avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4627
4720
  avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
@@ -4629,7 +4722,7 @@ const Xi = ({
4629
4722
  testId: "typing-indicator"
4630
4723
  }
4631
4724
  );
4632
- }, ls = ({
4725
+ }, hs = ({
4633
4726
  avatarId: e,
4634
4727
  avatarName: t,
4635
4728
  avatarImage: n,
@@ -4664,16 +4757,16 @@ const Xi = ({
4664
4757
  height: "13",
4665
4758
  overflow: "visible",
4666
4759
  children: [
4667
- /* @__PURE__ */ s(Qe, { cx: "4", index: 0 }),
4668
- /* @__PURE__ */ s(Qe, { cx: "16", index: 1 }),
4669
- /* @__PURE__ */ s(Qe, { cx: "28", index: 2 })
4760
+ /* @__PURE__ */ s(tt, { cx: "4", index: 0 }),
4761
+ /* @__PURE__ */ s(tt, { cx: "16", index: 1 }),
4762
+ /* @__PURE__ */ s(tt, { cx: "28", index: 2 })
4670
4763
  ]
4671
4764
  }
4672
4765
  ) }) }) }) }) })
4673
4766
  ] })
4674
4767
  }
4675
4768
  );
4676
- function vo(e, t) {
4769
+ function Do(e, t) {
4677
4770
  var a;
4678
4771
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4679
4772
  for (const r of Object.values(n)) {
@@ -4682,7 +4775,7 @@ function vo(e, t) {
4682
4775
  return i;
4683
4776
  }
4684
4777
  }
4685
- const xo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ h(
4778
+ const Po = () => null, Oo = ({ className: e, message: t }) => /* @__PURE__ */ h(
4686
4779
  "div",
4687
4780
  {
4688
4781
  className: y("flex items-center justify-center h-full", e),
@@ -4725,12 +4818,12 @@ const xo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ h(
4725
4818
  t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
4726
4819
  ]
4727
4820
  }
4728
- ), Ve = F.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
4729
- /* @__PURE__ */ s(_o, { className: "w-6 h-6" }),
4821
+ ), Ue = B.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
4822
+ /* @__PURE__ */ s(Oo, { className: "w-6 h-6" }),
4730
4823
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4731
4824
  ] }) }));
4732
- Ve.displayName = "LoadingState";
4733
- const wo = ({
4825
+ Ue.displayName = "LoadingState";
4826
+ const zo = ({
4734
4827
  onBack: e,
4735
4828
  showBackButton: t,
4736
4829
  renderMessageInputActions: n,
@@ -4758,17 +4851,17 @@ const wo = ({
4758
4851
  onBroadcastClick: z,
4759
4852
  composerInput: $
4760
4853
  }) => {
4761
- const { channel: L } = he(), S = H(z);
4854
+ const { channel: M } = he(), S = H(z);
4762
4855
  Y(() => {
4763
4856
  S.current = z;
4764
4857
  }, [z]);
4765
4858
  const P = W((j) => {
4766
- var q;
4767
- (q = S.current) == null || q.call(S, j);
4768
- }, []), k = z ? P : void 0, E = L.state.messages.some(
4859
+ var X;
4860
+ (X = S.current) == null || X.call(S, j);
4861
+ }, []), k = z ? P : void 0, E = M.state.messages.some(
4769
4862
  (j) => j.type !== "deleted"
4770
- ), I = p ? /* @__PURE__ */ s(F.Fragment, { children: p() }, "lt-channel-banner") : null, A = /* @__PURE__ */ s(
4771
- Aa,
4863
+ ), I = p ? /* @__PURE__ */ s(B.Fragment, { children: p() }, "lt-channel-banner") : null, A = /* @__PURE__ */ s(
4864
+ Pa,
4772
4865
  {
4773
4866
  className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
4774
4867
  onBack: e,
@@ -4789,8 +4882,8 @@ const wo = ({
4789
4882
  }
4790
4883
  ), U = W(
4791
4884
  (j) => {
4792
- const { message: q } = fe("ChannelView"), Q = /* @__PURE__ */ s(
4793
- Ji,
4885
+ const { message: X } = fe("ChannelView"), Q = /* @__PURE__ */ s(
4886
+ go,
4794
4887
  {
4795
4888
  ...j,
4796
4889
  chatbotVotingEnabled: b,
@@ -4798,20 +4891,20 @@ const wo = ({
4798
4891
  onBroadcastClick: k
4799
4892
  }
4800
4893
  );
4801
- return !C || !q ? Q : C(Q, q);
4894
+ return !C || !X ? Q : C(Q, X);
4802
4895
  },
4803
4896
  [b, k, C, T]
4804
4897
  );
4805
4898
  return /* @__PURE__ */ s(J, { children: /* @__PURE__ */ s(
4806
- On,
4899
+ Un,
4807
4900
  {
4808
4901
  overrides: {
4809
4902
  Message: U,
4810
- MessageActions: to,
4903
+ MessageActions: vo,
4811
4904
  UnreadMessagesNotification: () => null,
4812
4905
  UnreadMessagesSeparator: () => null
4813
4906
  },
4814
- children: /* @__PURE__ */ s(zn, { children: $ ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4907
+ children: /* @__PURE__ */ s(Vn, { children: $ ? /* @__PURE__ */ h("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4815
4908
  /* @__PURE__ */ h(
4816
4909
  "div",
4817
4910
  {
@@ -4822,7 +4915,7 @@ const wo = ({
4822
4915
  I
4823
4916
  ] }) }),
4824
4917
  /* @__PURE__ */ s(
4825
- Wt,
4918
+ Zt,
4826
4919
  {
4827
4920
  head: E ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4828
4921
  A,
@@ -4837,15 +4930,15 @@ const wo = ({
4837
4930
  "lt-channel-message-list"
4838
4931
  ),
4839
4932
  /* @__PURE__ */ s(
4840
- os,
4933
+ ms,
4841
4934
  {
4842
4935
  ...n && {
4843
- renderActions: () => n == null ? void 0 : n(L)
4936
+ renderActions: () => n == null ? void 0 : n(M)
4844
4937
  },
4845
4938
  ...r && {
4846
- renderHeader: () => r(L)
4939
+ renderHeader: () => r(M)
4847
4940
  },
4848
- renderFooter: () => a == null ? void 0 : a(L),
4941
+ renderFooter: () => a == null ? void 0 : a(M),
4849
4942
  disabled: c,
4850
4943
  disabledReason: x,
4851
4944
  composerInput: $
@@ -4863,7 +4956,7 @@ const wo = ({
4863
4956
  I
4864
4957
  ] }) }),
4865
4958
  /* @__PURE__ */ s(
4866
- Wt,
4959
+ Zt,
4867
4960
  {
4868
4961
  head: E ? /* @__PURE__ */ h("div", { className: "sticky top-0 z-10", children: [
4869
4962
  A,
@@ -4877,14 +4970,14 @@ const wo = ({
4877
4970
  },
4878
4971
  "lt-channel-message-list"
4879
4972
  ),
4880
- r ? /* @__PURE__ */ s(F.Fragment, { children: r(L) }, "lt-channel-conversation-footer") : null,
4973
+ r ? /* @__PURE__ */ s(B.Fragment, { children: r(M) }, "lt-channel-conversation-footer") : null,
4881
4974
  /* @__PURE__ */ s(
4882
- os,
4975
+ ms,
4883
4976
  {
4884
4977
  ...n && {
4885
- renderActions: () => n == null ? void 0 : n(L)
4978
+ renderActions: () => n == null ? void 0 : n(M)
4886
4979
  },
4887
- renderFooter: () => a == null ? void 0 : a(L),
4980
+ renderFooter: () => a == null ? void 0 : a(M),
4888
4981
  disabled: c,
4889
4982
  disabledReason: x,
4890
4983
  composerInput: $
@@ -4894,7 +4987,7 @@ const wo = ({
4894
4987
  ] }) })
4895
4988
  }
4896
4989
  ) });
4897
- }, Ws = F.memo(
4990
+ }, Js = B.memo(
4898
4991
  ({
4899
4992
  channel: e,
4900
4993
  onBack: t,
@@ -4905,7 +4998,7 @@ const wo = ({
4905
4998
  onLeaveConversation: l,
4906
4999
  onBlockParticipant: o,
4907
5000
  className: d,
4908
- CustomChannelEmptyState: m = xo,
5001
+ CustomChannelEmptyState: m = Po,
4909
5002
  showDeleteConversation: f = !0,
4910
5003
  onDeleteConversationClick: u,
4911
5004
  onBlockParticipantClick: g,
@@ -4922,7 +5015,7 @@ const wo = ({
4922
5015
  renderChannelBanner: R,
4923
5016
  customChannelActions: z,
4924
5017
  renderChannelActions: $,
4925
- renderMessage: L,
5018
+ renderMessage: M,
4926
5019
  onMessageLinkClick: S,
4927
5020
  sendButton: P,
4928
5021
  attachmentPreviewList: k,
@@ -4932,12 +5025,12 @@ const wo = ({
4932
5025
  onBroadcastClick: U,
4933
5026
  composerInput: j
4934
5027
  }) => {
4935
- const q = W(
4936
- async (K, N, M) => {
5028
+ const X = W(
5029
+ async (K, N, L) => {
4937
5030
  var ee;
4938
- const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, X = v && !G, se = {
5031
+ const G = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, q = v && !G, se = {
4939
5032
  ...N,
4940
- ...X && { silent: !0 },
5033
+ ...q && { silent: !0 },
4941
5034
  ...w && {
4942
5035
  metadata: {
4943
5036
  ...N.metadata ?? {},
@@ -4945,8 +5038,8 @@ const wo = ({
4945
5038
  }
4946
5039
  }
4947
5040
  }, Z = {
4948
- ...M,
4949
- ...X && { skip_push: !0 }
5041
+ ...L,
5042
+ ...q && { skip_push: !0 }
4950
5043
  }, V = await e.sendMessage(se, Z);
4951
5044
  return C == null || C(V), V;
4952
5045
  },
@@ -4956,10 +5049,10 @@ const wo = ({
4956
5049
  if (!S) return;
4957
5050
  const K = Q.current;
4958
5051
  if (!K) return;
4959
- const N = (M) => {
4960
- const G = M.target, X = G == null ? void 0 : G.closest("a[href]"), se = X == null ? void 0 : X.getAttribute("href");
5052
+ const N = (L) => {
5053
+ const G = L.target, q = G == null ? void 0 : G.closest("a[href]"), se = q == null ? void 0 : q.getAttribute("href");
4961
5054
  if (!se) return;
4962
- const Z = X == null ? void 0 : X.closest("[data-message-id]"), V = Z == null ? void 0 : Z.getAttribute("data-message-id"), ee = V ? e.state.messages.find((re) => re.id === V) : void 0;
5055
+ const Z = q == null ? void 0 : q.closest("[data-message-id]"), V = Z == null ? void 0 : Z.getAttribute("data-message-id"), ee = V ? e.state.messages.find((re) => re.id === V) : void 0;
4963
5056
  S(se, ee);
4964
5057
  };
4965
5058
  return K.addEventListener("click", N), () => K.removeEventListener("click", N);
@@ -4971,20 +5064,20 @@ const wo = ({
4971
5064
  "messaging-channel-view h-full flex flex-col",
4972
5065
  d
4973
5066
  ),
4974
- children: /* @__PURE__ */ s(Ys.Provider, { value: v ?? !1, children: /* @__PURE__ */ s(
4975
- Pn,
5067
+ children: /* @__PURE__ */ s(Zs.Provider, { value: v ?? !1, children: /* @__PURE__ */ s(
5068
+ $n,
4976
5069
  {
4977
5070
  channel: e,
4978
- MessageSystem: go,
5071
+ MessageSystem: Mo,
4979
5072
  EmptyStateIndicator: m,
4980
- LoadingIndicator: Ve,
4981
- DateSeparator: La,
4982
- TypingIndicator: bo,
4983
- doSendMessageRequest: q,
5073
+ LoadingIndicator: Ue,
5074
+ DateSeparator: Oa,
5075
+ TypingIndicator: Ro,
5076
+ doSendMessageRequest: X,
4984
5077
  ...P ? { SendButton: P } : {},
4985
5078
  ...k ? { AttachmentPreviewList: k } : {},
4986
5079
  children: /* @__PURE__ */ s(
4987
- wo,
5080
+ zo,
4988
5081
  {
4989
5082
  onBack: t,
4990
5083
  showBackButton: n,
@@ -5007,7 +5100,7 @@ const wo = ({
5007
5100
  renderChannelBanner: R,
5008
5101
  customChannelActions: z,
5009
5102
  renderChannelActions: $,
5010
- renderMessage: L,
5103
+ renderMessage: M,
5011
5104
  viewerLanguage: E,
5012
5105
  showChannelInfo: I,
5013
5106
  onParticipantNameClick: A,
@@ -5021,8 +5114,8 @@ const wo = ({
5021
5114
  );
5022
5115
  }
5023
5116
  );
5024
- Ws.displayName = "ChannelView";
5025
- const ye = F.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: [
5117
+ Js.displayName = "ChannelView";
5118
+ const ye = B.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: [
5026
5119
  /* @__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: "⚠️" }) }),
5027
5120
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
5028
5121
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -5037,7 +5130,7 @@ const ye = F.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
5037
5130
  )
5038
5131
  ] }) }));
5039
5132
  ye.displayName = "ErrorState";
5040
- const qo = ({
5133
+ const dl = ({
5041
5134
  capabilities: e = {},
5042
5135
  renderMessageInputActions: t,
5043
5136
  renderConversationFooter: n,
@@ -5066,15 +5159,15 @@ const qo = ({
5066
5159
  client: R,
5067
5160
  isConnected: z,
5068
5161
  isLoading: $,
5069
- error: L,
5162
+ error: M,
5070
5163
  refreshConnection: S,
5071
5164
  service: P,
5072
5165
  debug: k
5073
- } = xa(), [E, I] = B(null), [A, U] = B(null), [j, q] = B(!1), { showDeleteConversation: Q = !0 } = e, K = H(l);
5166
+ } = Ca(), [E, I] = F(null), [A, U] = F(null), [j, X] = F(!1), { showDeleteConversation: Q = !0 } = e, K = H(l);
5074
5167
  K.current = l;
5075
5168
  const N = H(a);
5076
5169
  N.current = a;
5077
- const M = H(null), G = H(null);
5170
+ const L = H(null), G = H(null);
5078
5171
  Y(() => {
5079
5172
  G.current = E;
5080
5173
  }, [E]), Y(() => {
@@ -5082,13 +5175,13 @@ const qo = ({
5082
5175
  const Z = R.userID;
5083
5176
  if (!Z) return;
5084
5177
  const V = `${Z}::${i}`;
5085
- if (M.current === V) return;
5086
- M.current = V;
5178
+ if (L.current === V) return;
5179
+ L.current = V;
5087
5180
  const ee = () => {
5088
- M.current === V && (M.current = null);
5181
+ L.current === V && (L.current = null);
5089
5182
  };
5090
5183
  (async () => {
5091
- var Me, Re;
5184
+ var Le, Re;
5092
5185
  try {
5093
5186
  k && console.log(
5094
5187
  "[MessagingShell] Loading initial conversation with:",
@@ -5103,7 +5196,7 @@ const qo = ({
5103
5196
  { limit: 1 }
5104
5197
  );
5105
5198
  if (ie.length > 0) {
5106
- I(ie[0]), U(null), (Me = N.current) == null || Me.call(N, ie[0]), k && console.log(
5199
+ I(ie[0]), U(null), (Le = N.current) == null || Le.call(N, ie[0]), k && console.log(
5107
5200
  "[MessagingShell] Initial conversation loaded:",
5108
5201
  ie[0].id
5109
5202
  );
@@ -5141,20 +5234,20 @@ const qo = ({
5141
5234
  }
5142
5235
  })();
5143
5236
  }, [i, R, z, P, k]);
5144
- const X = H(r);
5145
- X.current = r;
5237
+ const q = H(r);
5238
+ q.current = r;
5146
5239
  const se = W(() => {
5147
5240
  var Z;
5148
- I(null), q(!0), (Z = X.current) == null || Z.call(X);
5241
+ I(null), X(!0), (Z = q.current) == null || Z.call(q);
5149
5242
  }, []);
5150
- return $ ? /* @__PURE__ */ s(Ve, {}) : L ? /* @__PURE__ */ s(ye, { message: L, onBack: S }) : !z || !R ? /* @__PURE__ */ s(
5243
+ return $ ? /* @__PURE__ */ s(Ue, {}) : M ? /* @__PURE__ */ s(ye, { message: M, onBack: S }) : !z || !R ? /* @__PURE__ */ s(
5151
5244
  ye,
5152
5245
  {
5153
5246
  message: "Not connected to messaging service",
5154
5247
  onBack: S
5155
5248
  }
5156
5249
  ) : A ? /* @__PURE__ */ s(ye, { message: A }) : j && !E ? /* @__PURE__ */ s(ye, { message: "Conversation ended" }) : E ? /* @__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(
5157
- Ws,
5250
+ Js,
5158
5251
  {
5159
5252
  channel: E,
5160
5253
  renderMessageInputActions: t,
@@ -5180,15 +5273,15 @@ const qo = ({
5180
5273
  composerInput: O
5181
5274
  },
5182
5275
  E.id
5183
- ) }) }) : /* @__PURE__ */ s(Ve, {});
5276
+ ) }) }) : /* @__PURE__ */ s(Ue, {});
5184
5277
  };
5185
- function No(e) {
5278
+ function Fo(e) {
5186
5279
  const t = e.state.pending_messages;
5187
5280
  if (t != null && t.length)
5188
5281
  for (const n of t)
5189
5282
  e.state.addMessageSorted(n.message);
5190
5283
  }
5191
- const qs = F.createContext({
5284
+ const Qs = B.createContext({
5192
5285
  selectedChannel: void 0,
5193
5286
  onChannelSelect: () => {
5194
5287
  },
@@ -5196,18 +5289,18 @@ const qs = F.createContext({
5196
5289
  renderMessagePreview: void 0,
5197
5290
  channelPreview: void 0,
5198
5291
  viewerLanguage: void 0
5199
- }), yo = qs.Provider, Co = () => F.useContext(qs), ko = (e, t) => {
5292
+ }), Bo = Qs.Provider, $o = () => B.useContext(Qs), Uo = (e, t) => {
5200
5293
  const n = new Date(
5201
5294
  Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
5202
5295
  ), r = new Date(
5203
5296
  Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
5204
5297
  ).getTime() - n.getTime();
5205
5298
  return Math.floor(r / (1e3 * 60 * 60 * 24));
5206
- }, So = (e) => {
5299
+ }, Vo = (e) => {
5207
5300
  const t = /* @__PURE__ */ new Date();
5208
5301
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
5209
5302
  return "Just now";
5210
- const a = ko(e, t);
5303
+ const a = Uo(e, t);
5211
5304
  return a === 0 ? e.toLocaleTimeString([], {
5212
5305
  hour: "numeric",
5213
5306
  minute: "2-digit",
@@ -5217,9 +5310,9 @@ const qs = F.createContext({
5217
5310
  month: "short",
5218
5311
  year: "2-digit"
5219
5312
  });
5220
- }, Xs = F.memo(
5313
+ }, en = B.memo(
5221
5314
  (e) => {
5222
- var z, $, L;
5315
+ var z, $, M;
5223
5316
  const { channel: t, unread: n } = e, {
5224
5317
  selectedChannel: a,
5225
5318
  onChannelSelect: r,
@@ -5227,7 +5320,7 @@ const qs = F.createContext({
5227
5320
  channelPreview: l,
5228
5321
  renderMessagePreview: o,
5229
5322
  viewerLanguage: d
5230
- } = Co(), { client: m } = Se(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = bs(t);
5323
+ } = $o(), { client: m } = Se(), f = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = Ns(t);
5231
5324
  if (l)
5232
5325
  return /* @__PURE__ */ s(
5233
5326
  l,
@@ -5244,11 +5337,11 @@ const qs = F.createContext({
5244
5337
  }, c = (S) => {
5245
5338
  const P = S.key === "Enter" || S.key === " ", k = S.repeat;
5246
5339
  !P || k || (S.preventDefault(), g());
5247
- }, x = vs(
5340
+ }, x = ys(
5248
5341
  (z = t == null ? void 0 : t.state) == null ? void 0 : z.members,
5249
5342
  m == null ? void 0 : m.userID,
5250
5343
  t == null ? void 0 : t.type
5251
- ), _ = xs(x == null ? void 0 : x.user), b = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, p = (() => {
5344
+ ), _ = Cs(x == null ? void 0 : x.user), b = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, p = (() => {
5252
5345
  var P;
5253
5346
  const S = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages;
5254
5347
  if (S != null && S.length) {
@@ -5257,7 +5350,7 @@ const qs = F.createContext({
5257
5350
  }
5258
5351
  })(), w = (() => {
5259
5352
  var I;
5260
- const S = ws({
5353
+ const S = Ss({
5261
5354
  message: p,
5262
5355
  viewerLanguage: d
5263
5356
  }), { custom_type: P, attachment_content_type: k } = (p == null ? void 0 : p.metadata) || {};
@@ -5274,7 +5367,7 @@ const qs = F.createContext({
5274
5367
  if (S) return S;
5275
5368
  const E = (I = p == null ? void 0 : p.attachments) == null ? void 0 : I[0];
5276
5369
  return E ? E.og_scrape_url ? E.og_scrape_url : E.type === "image" ? "📷 Sent an image" : E.type === "video" ? "🎥 Sent a video" : E.type === "audio" ? "🎵 Sent audio" : E.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5277
- })(), C = p != null && p.created_at ? So(new Date(p.created_at)) : "", T = p ? Be(p) : !1, O = o ? o(p, w) : `${T ? "✨ " : ""}${w}`, R = n ?? 0;
5370
+ })(), C = p != null && p.created_at ? Vo(new Date(p.created_at)) : "", T = p ? ze(p) : !1, O = o ? o(p, w) : `${T ? "✨ " : ""}${w}`, R = n ?? 0;
5278
5371
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5279
5372
  channelId: t == null ? void 0 : t.id,
5280
5373
  isSelected: f,
@@ -5300,7 +5393,7 @@ const qs = F.createContext({
5300
5393
  /* @__PURE__ */ s(
5301
5394
  _e,
5302
5395
  {
5303
- id: ((L = x == null ? void 0 : x.user) == null ? void 0 : L.id) || t.id || "unknown",
5396
+ id: ((M = x == null ? void 0 : x.user) == null ? void 0 : M.id) || t.id || "unknown",
5304
5397
  name: _,
5305
5398
  image: b,
5306
5399
  size: 48,
@@ -5333,18 +5426,18 @@ const qs = F.createContext({
5333
5426
  );
5334
5427
  }
5335
5428
  );
5336
- Xs.displayName = "CustomChannelPreview";
5337
- const Eo = { last_message_at: -1 }, Io = F.memo(
5429
+ en.displayName = "CustomChannelPreview";
5430
+ const jo = { last_message_at: -1 }, Ho = B.memo(
5338
5431
  ({
5339
5432
  onChannelSelect: e,
5340
5433
  selectedChannel: t,
5341
5434
  filters: n,
5342
5435
  allowNewMessagesFromUnfilteredChannels: a = !1,
5343
5436
  channelRenderFilterFn: r,
5344
- sort: i = Eo,
5437
+ sort: i = jo,
5345
5438
  className: l,
5346
5439
  customEmptyStateIndicator: o,
5347
- channelListPaginator: d = Fn,
5440
+ channelListPaginator: d = Hn,
5348
5441
  channelPreview: m,
5349
5442
  renderMessagePreview: f,
5350
5443
  viewerLanguage: u,
@@ -5355,12 +5448,12 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5355
5448
  onAddedToChannel: b,
5356
5449
  onChannelUpdated: p
5357
5450
  }) => {
5358
- const v = F.useRef(0);
5451
+ const v = B.useRef(0);
5359
5452
  v.current++;
5360
- const { debug: w = !1 } = dt(), C = F.useCallback(
5453
+ const { debug: w = !1 } = ft(), C = B.useCallback(
5361
5454
  (O) => {
5362
5455
  for (const R of O)
5363
- No(R);
5456
+ Fo(R);
5364
5457
  return r ? r(O) : O;
5365
5458
  },
5366
5459
  [r]
@@ -5370,7 +5463,7 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5370
5463
  selectedChannelId: t == null ? void 0 : t.id,
5371
5464
  filters: n
5372
5465
  });
5373
- const T = F.useMemo(
5466
+ const T = B.useMemo(
5374
5467
  () => ({
5375
5468
  selectedChannel: t,
5376
5469
  onChannelSelect: e,
@@ -5395,8 +5488,8 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5395
5488
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5396
5489
  l
5397
5490
  ),
5398
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(yo, { value: T, children: /* @__PURE__ */ s(
5399
- Bn,
5491
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Bo, { value: T, children: /* @__PURE__ */ s(
5492
+ jn,
5400
5493
  {
5401
5494
  filters: n,
5402
5495
  sort: i,
@@ -5410,7 +5503,7 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5410
5503
  onAddedToChannel: b,
5411
5504
  onChannelUpdated: p,
5412
5505
  Paginator: d,
5413
- Preview: Xs,
5506
+ Preview: en,
5414
5507
  EmptyStateIndicator: o
5415
5508
  },
5416
5509
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5419,11 +5512,11 @@ const Eo = { last_message_at: -1 }, Io = F.memo(
5419
5512
  );
5420
5513
  }
5421
5514
  );
5422
- Io.displayName = "ChannelList";
5423
- const cs = `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%`, To = {
5515
+ Ho.displayName = "ChannelList";
5516
+ const fs = `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%`, Go = {
5424
5517
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5425
5518
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5426
- }, Ao = ({ variant: e }) => /* @__PURE__ */ s(
5519
+ }, Yo = ({ variant: e }) => /* @__PURE__ */ s(
5427
5520
  "span",
5428
5521
  {
5429
5522
  "aria-hidden": "true",
@@ -5433,12 +5526,12 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5433
5526
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5434
5527
  transform: e === "received" ? "scaleX(-1)" : void 0,
5435
5528
  transformOrigin: "center",
5436
- backgroundColor: To[e],
5437
- WebkitMask: cs,
5438
- mask: cs
5529
+ backgroundColor: Go[e],
5530
+ WebkitMask: fs,
5531
+ mask: fs
5439
5532
  }
5440
5533
  }
5441
- ), Lo = {
5534
+ ), Wo = {
5442
5535
  sent: {
5443
5536
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5444
5537
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5447,7 +5540,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5447
5540
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5448
5541
  color: "var(--str-chat__message-bubble-color, #000000)"
5449
5542
  }
5450
- }, Ks = ({
5543
+ }, tn = ({
5451
5544
  variant: e,
5452
5545
  text: t,
5453
5546
  tail: n = !0,
@@ -5463,23 +5556,23 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5463
5556
  r
5464
5557
  ),
5465
5558
  style: {
5466
- ...Lo[e],
5559
+ ...Wo[e],
5467
5560
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5468
5561
  isolation: "isolate"
5469
5562
  },
5470
5563
  children: [
5471
5564
  a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5472
5565
  /* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
5473
- n && /* @__PURE__ */ s(Ao, { variant: e })
5566
+ n && /* @__PURE__ */ s(Yo, { variant: e })
5474
5567
  ]
5475
5568
  }
5476
- ), Mo = ({
5569
+ ), Xo = ({
5477
5570
  text: e,
5478
5571
  tail: t,
5479
5572
  header: n,
5480
5573
  className: a
5481
5574
  }) => /* @__PURE__ */ s(
5482
- Ks,
5575
+ tn,
5483
5576
  {
5484
5577
  variant: "received",
5485
5578
  text: e,
@@ -5487,10 +5580,10 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5487
5580
  header: n,
5488
5581
  className: a
5489
5582
  }
5490
- ), Ro = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Ks, { variant: "sent", text: e, tail: t, className: n }), Xo = {
5491
- Sent: Ro,
5492
- Received: Mo
5493
- }, Do = ({
5583
+ ), qo = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(tn, { variant: "sent", text: e, tail: t, className: n }), ul = {
5584
+ Sent: qo,
5585
+ Received: Xo
5586
+ }, Ko = ({
5494
5587
  question: e,
5495
5588
  onClick: t,
5496
5589
  loading: n = !1,
@@ -5512,7 +5605,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5512
5605
  ),
5513
5606
  children: e
5514
5607
  }
5515
- ), Ko = ({
5608
+ ), ml = ({
5516
5609
  faqs: e,
5517
5610
  onFaqClick: t,
5518
5611
  loadingFaqId: n,
@@ -5521,7 +5614,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5521
5614
  avatarImage: i,
5522
5615
  avatarName: l
5523
5616
  }) => {
5524
- const o = ba(e);
5617
+ const o = Na(e);
5525
5618
  return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ h("div", { className: "flex gap-3 items-end", children: [
5526
5619
  (i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5527
5620
  _e,
@@ -5541,7 +5634,7 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5541
5634
  children: [
5542
5635
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5543
5636
  o.map((d) => /* @__PURE__ */ s(
5544
- Do,
5637
+ Ko,
5545
5638
  {
5546
5639
  question: d.question,
5547
5640
  onClick: () => t(d.id),
@@ -5555,42 +5648,42 @@ const cs = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
5555
5648
  ] }) });
5556
5649
  };
5557
5650
  export {
5558
- ys as A,
5559
- ft as B,
5560
- xo as C,
5561
- xs as D,
5562
- Wo as E,
5563
- Ko as F,
5564
- ai as G,
5565
- Ra as H,
5566
- xa as I,
5567
- ot as L,
5568
- Go as M,
5651
+ Is as A,
5652
+ vt as B,
5653
+ Po as C,
5654
+ Cs as D,
5655
+ cl as E,
5656
+ ml as F,
5657
+ ci as G,
5658
+ Fa as H,
5659
+ Ca as I,
5660
+ ut as L,
5661
+ ol as M,
5569
5662
  we as a,
5570
5663
  _e as b,
5571
- Io as c,
5572
- Ws as d,
5573
- Yo as e,
5574
- Do as f,
5664
+ Ho as c,
5665
+ Js as d,
5666
+ ll as e,
5667
+ Ko as f,
5575
5668
  ce as g,
5576
5669
  Pe as h,
5577
5670
  Ne as i,
5578
- Xo as j,
5579
- hi as k,
5580
- Ho as l,
5581
- qo as m,
5582
- pr as n,
5671
+ ul as j,
5672
+ vi as k,
5673
+ il as l,
5674
+ dl as m,
5675
+ wr as n,
5583
5676
  me as o,
5584
- hr as p,
5585
- So as q,
5677
+ vr as p,
5678
+ Vo as q,
5586
5679
  xe as r,
5587
- gr as s,
5588
- ws as t,
5589
- Ss as u,
5590
- wa as v,
5591
- ir as w,
5592
- Da as x,
5593
- vs as y,
5594
- ht as z
5680
+ _r as s,
5681
+ Ss as t,
5682
+ Ms as u,
5683
+ Sa as v,
5684
+ ur as w,
5685
+ Ba as x,
5686
+ ys as y,
5687
+ bt as z
5595
5688
  };
5596
- //# sourceMappingURL=index-Daw6ObfN.js.map
5689
+ //# sourceMappingURL=index-DSQieSNh.js.map