@linktr.ee/messaging-react 3.36.0 → 3.37.0-rc-1786161722

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { jsx as s, jsxs as g, Fragment as J } from "react/jsx-runtime";
2
- import z, { createContext as Ve, useContext as _e, useCallback as q, useState as U, useRef as H, useEffect as Y, useId as tn, useMemo as ae, Suspense as sn } from "react";
3
- import { StreamChatService as nn } from "@linktr.ee/messaging-core";
4
- import { StreamChat as an, LinkPreviewsManager as tt } from "stream-chat";
5
- import { Chat as rn, useChannelStateContext as fe, useChatContext as Te, DateSeparator as on, useMessageContext as ge, MessageStatus as ln, MessageErrorIcon as st, MessageText as Be, areMessageUIPropsEqual as cn, useMessageReminder as dn, useComponentContext as ls, Attachment as un, EditMessageModal as mn, MessageBlocked as hn, MessageBouncePrompt as fn, MessageDeleted as gn, MessageIsThreadReplyInChannelButtonIndicator as pn, MessageRepliesCountButton as bn, ReminderNotification as vn, StreamedMessageText as xn, messageHasAttachments as wn, messageHasReactions as _n, isDateSeparatorMessage as yn, isMessageBlocked as Nn, isMessageBounced as kn, MessageBounceModal as Cn, Poll as Sn, useMessageComposer as En, useStateStore as In, MessageInput as Gt, useMessageInputContext as Tn, useMessageComposerHasSendableData as An, AttachmentPreviewList as Rn, QuotedMessagePreview as Ln, TextareaComposer as Mn, MessageTimestamp as We, AIStates as qe, useTypingContext as Dn, useAIState as On, Channel as Pn, WithComponents as zn, Window as Fn, MessageList as Yt, ChannelList as Bn, InfiniteScroll as $n } from "stream-chat-react";
1
+ import { jsx as s, jsxs as f, Fragment as J } from "react/jsx-runtime";
2
+ import z, { createContext as Ve, useContext as _e, useCallback as q, useState as U, useRef as H, useEffect as Y, useId as sn, useMemo as ae, Suspense as nn } from "react";
3
+ import { StreamChatService as an } from "@linktr.ee/messaging-core";
4
+ import { StreamChat as rn, LinkPreviewsManager as tt } from "stream-chat";
5
+ import { Chat as on, useChannelStateContext as fe, useChatContext as Te, DateSeparator as ln, useMessageContext as ge, MessageStatus as cn, MessageErrorIcon as st, MessageText as Be, areMessageUIPropsEqual as dn, useMessageReminder as un, useComponentContext as cs, Attachment as mn, EditMessageModal as hn, MessageBlocked as fn, MessageBouncePrompt as gn, MessageDeleted as pn, MessageIsThreadReplyInChannelButtonIndicator as bn, MessageRepliesCountButton as vn, ReminderNotification as xn, StreamedMessageText as wn, messageHasAttachments as _n, messageHasReactions as yn, isDateSeparatorMessage as Nn, isMessageBlocked as kn, isMessageBounced as Cn, MessageBounceModal as Sn, Poll as En, useMessageComposer as In, useStateStore as Tn, MessageInput as Gt, useMessageInputContext as An, useMessageComposerHasSendableData as Rn, AttachmentPreviewList as Ln, QuotedMessagePreview as Mn, TextareaComposer as Dn, MessageTimestamp as We, AIStates as qe, useTypingContext as On, useAIState as Pn, Channel as zn, WithComponents as Fn, Window as Bn, MessageList as Yt, ChannelList as $n, InfiniteScroll as Un } from "stream-chat-react";
6
6
  import k from "classnames";
7
- import { StarIcon as nt, DotsThreeIcon as Un, SpinnerGapIcon as ze, SignOutIcon as jn, ProhibitInsetIcon as Wt, FlagIcon as cs, CurrencyDollarIcon as Vn, CaretRightIcon as ds, ArrowLeftIcon as Hn, FileIcon as us, ImageIcon as Gn, SpeakerHighIcon as Yn, VideoCameraIcon as ms, FileMdIcon as Wn, FileTextIcon as qn, FileZipIcon as Xn, FilePptIcon as Kn, FileCsvIcon as Zn, FileXlsIcon as Jn, FileDocIcon as Qn, FilePdfIcon as ea, CircleNotchIcon as xe, PlayIcon as at, PauseIcon as ta, LinkIcon as sa, DownloadSimpleIcon as Se, XIcon as lt, CaretLeftIcon as na, GiftIcon as aa, ThumbsUpIcon as ra, ThumbsDownIcon as ia, WarningCircleIcon as oa, MegaphoneIcon as la, ChecksIcon as ca, PencilSimpleIcon as da, TrashSimpleIcon as ua, ArrowUpIcon as ma, SparkleIcon as ha, ProhibitIcon as fa } from "@phosphor-icons/react";
8
- import { isOfficialChannel as ga, OFFICIAL_SENDER_USER_ID as pa, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as qt, isAgeSafetySystemType as ba, resolveRichCardImagePresentation as va, selectEnabledFaqs as xa } from "@linktr.ee/messaging-taxonomy";
9
- import { MessageActions as wa, DefaultDropdownActionButton as hs } from "stream-chat-react/experimental";
10
- const fs = Ve({
7
+ import { StarIcon as nt, DotsThreeIcon as jn, SpinnerGapIcon as ze, SignOutIcon as Vn, ProhibitInsetIcon as Wt, FlagIcon as ds, CurrencyDollarIcon as Hn, CaretRightIcon as us, ArrowLeftIcon as Gn, FileIcon as ms, ImageIcon as Yn, SpeakerHighIcon as Wn, VideoCameraIcon as hs, FileMdIcon as qn, FileTextIcon as Xn, FileZipIcon as Kn, FilePptIcon as Zn, FileCsvIcon as Jn, FileXlsIcon as Qn, FileDocIcon as ea, FilePdfIcon as ta, CircleNotchIcon as xe, PlayIcon as at, PauseIcon as sa, LinkIcon as na, DownloadSimpleIcon as Se, XIcon as lt, CaretLeftIcon as aa, GiftIcon as ra, ThumbsUpIcon as ia, ThumbsDownIcon as oa, WarningCircleIcon as la, MegaphoneIcon as ca, ChecksIcon as da, PencilSimpleIcon as ua, TrashSimpleIcon as ma, ArrowUpIcon as ha, SparkleIcon as fa, ProhibitIcon as ga } from "@phosphor-icons/react";
8
+ import { isOfficialChannel as pa, OFFICIAL_SENDER_USER_ID as ba, MESSAGE_CUSTOM_TYPE as ce, isDmAgentSystemType as qt, isAgeSafetySystemType as va, resolveRichCardImagePresentation as xa, selectEnabledFaqs as wa } from "@linktr.ee/messaging-taxonomy";
9
+ import { MessageActions as _a, DefaultDropdownActionButton as fs } from "stream-chat-react/experimental";
10
+ const gs = Ve({
11
11
  service: null,
12
12
  client: null,
13
13
  isConnected: !1,
@@ -17,7 +17,7 @@ const fs = Ve({
17
17
  refreshConnection: async () => {
18
18
  },
19
19
  debug: !1
20
- }), ct = () => _e(fs), nl = ({
20
+ }), ct = () => _e(gs), rl = ({
21
21
  children: e,
22
22
  user: t,
23
23
  serviceConfig: n,
@@ -39,7 +39,7 @@ const fs = Ve({
39
39
  serviceConfig: !!n,
40
40
  capabilities: Object.keys(r)
41
41
  });
42
- const [d, m] = U(null), [h, u] = U(null), [f, c] = U(!1), [x, w] = U(!1), [p, v] = U(null), b = H(!1), N = H(null), _ = H(n);
42
+ const [d, m] = U(null), [h, u] = U(null), [g, c] = U(!1), [b, w] = U(!1), [p, x] = U(null), v = H(!1), N = H(null), _ = H(n);
43
43
  _.current = n;
44
44
  const A = H(i);
45
45
  A.current = i;
@@ -65,12 +65,12 @@ const fs = Ve({
65
65
  capabilities: r
66
66
  };
67
67
  const D = H(null);
68
- !l && a && ((S = D.current) == null ? void 0 : S.apiKey) !== a && (D.current = { apiKey: a, client: new an(a) });
68
+ !l && a && ((S = D.current) == null ? void 0 : S.apiKey) !== a && (D.current = { apiKey: a, client: new rn(a) });
69
69
  const $ = l || (a ? ((T = D.current) == null ? void 0 : T.client) ?? null : null);
70
70
  Y(() => {
71
71
  const E = L.current, B = _.current;
72
72
  if (l) {
73
- N.current = null, m(null), u(null), c(!1), v(null), w(!1);
73
+ N.current = null, m(null), u(null), c(!1), x(null), w(!1);
74
74
  return;
75
75
  }
76
76
  if (!a || !$ || !B) {
@@ -84,7 +84,7 @@ const fs = Ve({
84
84
  renderCount: E,
85
85
  apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
86
86
  });
87
- const F = new nn({
87
+ const F = new an({
88
88
  ...B,
89
89
  apiKey: a,
90
90
  debug: A.current,
@@ -102,8 +102,8 @@ const fs = Ve({
102
102
  hasService: !!d,
103
103
  hasUser: !!t,
104
104
  userId: t == null ? void 0 : t.id,
105
- isConnecting: b.current,
106
- isConnected: f,
105
+ isConnecting: v.current,
106
+ isConnected: g,
107
107
  dependencies: { service: !!d, userId: t == null ? void 0 : t.id }
108
108
  }), l)
109
109
  return;
@@ -111,7 +111,7 @@ const fs = Ve({
111
111
  o("⚠️ USER CONNECTION SKIPPED", "Missing service or user");
112
112
  return;
113
113
  }
114
- if (b.current) {
114
+ if (v.current) {
115
115
  o("⚠️ USER CONNECTION SKIPPED", "Already connecting");
116
116
  return;
117
117
  }
@@ -123,7 +123,7 @@ const fs = Ve({
123
123
  return;
124
124
  }
125
125
  (async () => {
126
- o("🚀 STARTING USER CONNECTION", { userId: t.id }), b.current = !0, w(!0), v(null);
126
+ o("🚀 STARTING USER CONNECTION", { userId: t.id }), v.current = !0, w(!0), x(null);
127
127
  try {
128
128
  o("📞 CALLING SERVICE.CONNECTUSER", { userId: t.id });
129
129
  const j = await d.connectUser(t);
@@ -133,18 +133,18 @@ const fs = Ve({
133
133
  });
134
134
  } catch (j) {
135
135
  const K = j instanceof Error ? j.message : "Connection failed";
136
- v(K), o("❌ USER CONNECTION ERROR", {
136
+ x(K), o("❌ USER CONNECTION ERROR", {
137
137
  userId: t.id,
138
138
  error: K
139
139
  });
140
140
  } finally {
141
- w(!1), b.current = !1, o("🔄 USER CONNECTION FINISHED", {
141
+ w(!1), v.current = !1, o("🔄 USER CONNECTION FINISHED", {
142
142
  userId: t.id,
143
- isConnected: f
143
+ isConnected: g
144
144
  });
145
145
  }
146
146
  })();
147
- }, [d, t, o, f, l]), Y(() => {
147
+ }, [d, t, o, g, l]), Y(() => {
148
148
  const E = $;
149
149
  return () => {
150
150
  var B;
@@ -164,10 +164,10 @@ const fs = Ve({
164
164
  try {
165
165
  o("🔌 DISCONNECTING FOR REFRESH"), await d.disconnectUser(), o("📞 RECONNECTING FOR REFRESH");
166
166
  const E = await d.connectUser(t);
167
- u(E), c(!0), v(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
167
+ u(E), c(!0), x(null), o("✅ CONNECTION REFRESH SUCCESS", { userId: t.id });
168
168
  } catch (E) {
169
169
  const B = E instanceof Error ? E.message : "Refresh failed";
170
- v(B), o("❌ CONNECTION REFRESH ERROR", {
170
+ x(B), o("❌ CONNECTION REFRESH ERROR", {
171
171
  userId: t.id,
172
172
  error: B
173
173
  });
@@ -178,8 +178,8 @@ const fs = Ve({
178
178
  }, [d, t, o, l]), P = z.useMemo(() => (o("💫 CONTEXT VALUE MEMOIZATION", {
179
179
  hasService: !!d,
180
180
  hasClient: !!h,
181
- isConnected: f,
182
- isLoading: x,
181
+ isConnected: g,
182
+ isLoading: b,
183
183
  hasError: !!p,
184
184
  capabilitiesKeys: Object.keys(r)
185
185
  }), {
@@ -193,8 +193,8 @@ const fs = Ve({
193
193
  // path's `client`/`isLoading`/`error` (from connectUser) must not leak
194
194
  // through if the same provider previously attempted an apiKey connect.
195
195
  client: l ?? h,
196
- isConnected: l ? !0 : f,
197
- isLoading: l ? !1 : x,
196
+ isConnected: l ? !0 : g,
197
+ isLoading: l ? !1 : b,
198
198
  error: l ? null : p,
199
199
  capabilities: r,
200
200
  refreshConnection: C,
@@ -203,8 +203,8 @@ const fs = Ve({
203
203
  d,
204
204
  h,
205
205
  l,
206
- f,
207
- x,
206
+ g,
207
+ b,
208
208
  p,
209
209
  r,
210
210
  C,
@@ -215,8 +215,8 @@ const fs = Ve({
215
215
  renderCount: L.current,
216
216
  willRenderChat: !!$,
217
217
  contextValueReady: !!P
218
- }), /* @__PURE__ */ s(fs.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
- rn,
218
+ }), /* @__PURE__ */ s(gs.Provider, { value: P, children: $ ? /* @__PURE__ */ s(
219
+ on,
220
220
  {
221
221
  client: $,
222
222
  customClasses: {
@@ -225,7 +225,7 @@ const fs = Ve({
225
225
  children: e
226
226
  }
227
227
  ) : e });
228
- }, _a = () => ct(), gs = (e) => {
228
+ }, ya = () => ct(), ps = (e) => {
229
229
  var a, r;
230
230
  const [t, n] = U(
231
231
  !!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
@@ -248,13 +248,13 @@ const fs = Ve({
248
248
  };
249
249
  }, [e]), t;
250
250
  };
251
- function ps(e, t, n) {
251
+ function bs(e, t, n) {
252
252
  const a = Object.values(e || {});
253
- if (ga(n)) {
253
+ if (pa(n)) {
254
254
  const r = a.find(
255
255
  (i) => {
256
256
  var l;
257
- return ((l = i.user) == null ? void 0 : l.id) === pa;
257
+ return ((l = i.user) == null ? void 0 : l.id) === ba;
258
258
  }
259
259
  );
260
260
  if (r) return r;
@@ -266,15 +266,15 @@ function ps(e, t, n) {
266
266
  }
267
267
  );
268
268
  }
269
- const ya = /^[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 Na(e) {
271
- return ya.test(e.trim());
269
+ const Na = /^[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 ka(e) {
271
+ return Na.test(e.trim());
272
272
  }
273
273
  function Xt(e, t) {
274
274
  const n = e == null ? void 0 : e.trim();
275
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !Na(n);
275
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !ka(n);
276
276
  }
277
- function bs(e) {
277
+ function vs(e) {
278
278
  return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
279
279
  }
280
280
  const Kt = [
@@ -305,7 +305,7 @@ const Kt = [
305
305
  { emoji: "🍈", bgColor: "#D9F7E1" }
306
306
  // Melon
307
307
  ];
308
- function ka(e) {
308
+ function Ca(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 ka(e) {
313
313
  }
314
314
  return Math.abs(t);
315
315
  }
316
- function vs(e) {
317
- return Kt[ka(e) % Kt.length];
318
- }
319
- function Ca(e) {
320
- return vs(e).emoji;
316
+ function xs(e) {
317
+ return Kt[Ca(e) % Kt.length];
321
318
  }
322
319
  function Sa(e) {
323
- return vs(e).bgColor;
320
+ return xs(e).emoji;
321
+ }
322
+ function Ea(e) {
323
+ return xs(e).bgColor;
324
324
  }
325
325
  const ye = ({
326
326
  id: e,
@@ -331,7 +331,7 @@ const ye = ({
331
331
  shape: i = "squircle",
332
332
  dmAgentEnabled: l = !1
333
333
  }) => {
334
- const o = Ca(e), d = Sa(e), m = 0.45, u = n < 32 ? Math.round(n * m) : n < 56 ? 14 : n < 120 ? 18 : 36, f = 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 = Sa(e), d = Ea(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" }, b = /* @__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,
@@ -349,7 +349,7 @@ const ye = ({
349
349
  children: o
350
350
  }
351
351
  ) });
352
- return /* @__PURE__ */ g(
352
+ return /* @__PURE__ */ f(
353
353
  "div",
354
354
  {
355
355
  className: k(
@@ -383,19 +383,19 @@ const ye = ({
383
383
  style: {
384
384
  ...c,
385
385
  ...l && {
386
- borderWidth: `${f}px`,
386
+ borderWidth: `${g}px`,
387
387
  borderStyle: "solid",
388
388
  borderColor: "var(--AI-Gradient, #7F22FE)",
389
389
  boxShadow: "inset 0 1px 2px 0 rgba(255, 255, 255, 0.5)"
390
390
  }
391
391
  },
392
- children: x
392
+ children: b
393
393
  }
394
394
  )
395
395
  ]
396
396
  }
397
397
  );
398
- }, Ea = "https://linktr.ee/s/about/trust-center/report", Ia = ({
398
+ }, Ia = "https://linktr.ee/s/about/trust-center/report", Ta = ({
399
399
  channel: e,
400
400
  participant: t,
401
401
  showBlockParticipant: n = !0,
@@ -409,10 +409,10 @@ const ye = ({
409
409
  logLabel: h = "useChannelModerationActions"
410
410
  }) => {
411
411
  var P;
412
- const { service: u, debug: f } = ct(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, x = !!(a && n && u && c), [w, p] = U(!1), [v, b] = U(null), [N, _] = U(!1), [A, R] = U(!1), L = x && ((v == null ? void 0 : v.participantId) !== c || (v == null ? void 0 : v.service) !== u);
412
+ const { service: u, debug: g } = ct(), c = (P = t == null ? void 0 : t.user) == null ? void 0 : P.id, b = !!(a && n && u && c), [w, p] = U(!1), [x, v] = U(null), [N, _] = U(!1), [A, R] = U(!1), L = b && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== u);
413
413
  return Y(() => {
414
- if (!x || !u || !c) {
415
- p(!1), b(null);
414
+ if (!b || !u || !c) {
415
+ p(!1), v(null);
416
416
  return;
417
417
  }
418
418
  let S = !1;
@@ -428,12 +428,12 @@ const ye = ({
428
428
  } catch (T) {
429
429
  S || console.error(`[${h}] Failed to check blocked status:`, T);
430
430
  } finally {
431
- S || b({ participantId: c, service: u });
431
+ S || v({ participantId: c, service: u });
432
432
  }
433
433
  })(), () => {
434
434
  S = !0;
435
435
  };
436
- }, [x, u, c, h]), {
436
+ }, [b, u, c, h]), {
437
437
  isParticipantBlocked: w,
438
438
  isCheckingBlockedStatus: L,
439
439
  isLeaving: N,
@@ -441,7 +441,7 @@ const ye = ({
441
441
  handleLeaveConversation: async () => {
442
442
  var S;
443
443
  if (!N) {
444
- l == null || l(), f && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
444
+ l == null || l(), g && console.log(`[${h}] Leave conversation`, e.cid), _(!0);
445
445
  try {
446
446
  const T = ((S = e._client) == null ? void 0 : S.userID) ?? null;
447
447
  await e.hide(T, !1), r && await r(e), m == null || m();
@@ -455,7 +455,7 @@ const ye = ({
455
455
  handleBlockUser: async () => {
456
456
  var S, T, E;
457
457
  if (!(A || !u)) {
458
- o == null || o(), f && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
458
+ o == null || o(), g && console.log(`[${h}] Block member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
459
459
  try {
460
460
  await u.blockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
461
461
  } catch (B) {
@@ -468,7 +468,7 @@ const ye = ({
468
468
  handleUnblockUser: async () => {
469
469
  var S, T, E;
470
470
  if (!(A || !u)) {
471
- o == null || o(), f && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
471
+ o == null || o(), g && console.log(`[${h}] Unblock member`, (S = t == null ? void 0 : t.user) == null ? void 0 : S.id), R(!0);
472
472
  try {
473
473
  await u.unBlockUser((T = t == null ? void 0 : t.user) == null ? void 0 : T.id), i && await i((E = t == null ? void 0 : t.user) == null ? void 0 : E.id), m == null || m();
474
474
  } catch (B) {
@@ -479,7 +479,7 @@ const ye = ({
479
479
  }
480
480
  },
481
481
  handleReportUser: () => {
482
- d == null || d(), m == null || m(), window.open(Ea, "_blank", "noopener,noreferrer");
482
+ d == null || d(), m == null || m(), window.open(Ia, "_blank", "noopener,noreferrer");
483
483
  }
484
484
  };
485
485
  }, Ne = ({
@@ -499,7 +499,7 @@ const ye = ({
499
499
  ...a,
500
500
  children: n
501
501
  }
502
- ), Ta = ({
502
+ ), Aa = ({
503
503
  channel: e,
504
504
  participant: t,
505
505
  showDeleteConversation: n = !0,
@@ -513,20 +513,20 @@ const ye = ({
513
513
  customChannelActions: h,
514
514
  triggerClassName: u
515
515
  }) => {
516
- const [f, c] = U(!1), x = H(null), w = tn(), p = q(() => c(!1), []), {
517
- isParticipantBlocked: v,
518
- isCheckingBlockedStatus: b,
516
+ const [g, c] = U(!1), b = H(null), w = sn(), p = q(() => c(!1), []), {
517
+ isParticipantBlocked: x,
518
+ isCheckingBlockedStatus: v,
519
519
  isLeaving: N,
520
520
  isUpdatingBlockStatus: _,
521
521
  handleLeaveConversation: A,
522
522
  handleBlockUser: R,
523
523
  handleUnblockUser: L,
524
524
  handleReportUser: D
525
- } = Ia({
525
+ } = Ta({
526
526
  channel: e,
527
527
  participant: t,
528
528
  showBlockParticipant: a,
529
- enabled: f,
529
+ enabled: g,
530
530
  onLeaveConversation: i,
531
531
  onBlockParticipant: l,
532
532
  onDeleteConversationClick: o,
@@ -536,32 +536,32 @@ const ye = ({
536
536
  logLabel: "ChannelActionsMenu"
537
537
  });
538
538
  return Y(() => {
539
- if (!f) return;
539
+ if (!g) return;
540
540
  const O = (P) => {
541
- x.current && !x.current.contains(P.target) && c(!1);
541
+ b.current && !b.current.contains(P.target) && c(!1);
542
542
  }, C = (P) => {
543
543
  P.key === "Escape" && c(!1);
544
544
  };
545
545
  return document.addEventListener("mousedown", O), document.addEventListener("keydown", C), () => {
546
546
  document.removeEventListener("mousedown", O), document.removeEventListener("keydown", C);
547
547
  };
548
- }, [f]), !t || !(n || a || r || !!h) ? null : /* @__PURE__ */ g("div", { ref: x, className: "relative", children: [
549
- /* @__PURE__ */ g(
548
+ }, [g]), !t || !(n || a || r || !!h) ? null : /* @__PURE__ */ f("div", { ref: b, className: "relative", children: [
549
+ /* @__PURE__ */ f(
550
550
  "button",
551
551
  {
552
552
  className: u,
553
553
  type: "button",
554
554
  "aria-haspopup": "true",
555
- "aria-expanded": f,
556
- "aria-controls": f ? w : void 0,
555
+ "aria-expanded": g,
556
+ "aria-controls": g ? w : void 0,
557
557
  onClick: () => c((O) => !O),
558
558
  children: [
559
- /* @__PURE__ */ s(Un, { className: "size-5 text-black/90" }),
559
+ /* @__PURE__ */ s(jn, { className: "size-5 text-black/90" }),
560
560
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
561
561
  ]
562
562
  }
563
563
  ),
564
- f && /* @__PURE__ */ s(
564
+ g && /* @__PURE__ */ s(
565
565
  "div",
566
566
  {
567
567
  id: w,
@@ -570,27 +570,27 @@ const ye = ({
570
570
  "absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden",
571
571
  "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"
572
572
  ),
573
- children: /* @__PURE__ */ g("ul", { className: "flex flex-col gap-1", children: [
574
- n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ g(
573
+ children: /* @__PURE__ */ f("ul", { className: "flex flex-col gap-1", children: [
574
+ n && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ f(
575
575
  Ne,
576
576
  {
577
577
  onClick: A,
578
578
  disabled: N,
579
579
  "aria-busy": N,
580
580
  children: [
581
- N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(jn, { className: "h-5 w-5" }),
581
+ N ? /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ s(Vn, { className: "h-5 w-5" }),
582
582
  /* @__PURE__ */ s("span", { children: "Delete Conversation" })
583
583
  ]
584
584
  }
585
585
  ) }),
586
- a && /* @__PURE__ */ s("li", { children: b ? (
586
+ a && /* @__PURE__ */ s("li", { children: v ? (
587
587
  // Block status not yet resolved — show a disabled placeholder
588
588
  // so a premature click can't act on a stale block state.
589
- /* @__PURE__ */ g(Ne, { disabled: !0, "aria-busy": !0, children: [
589
+ /* @__PURE__ */ f(Ne, { disabled: !0, "aria-busy": !0, children: [
590
590
  /* @__PURE__ */ s(ze, { className: "h-5 w-5 animate-spin" }),
591
591
  /* @__PURE__ */ s("span", { children: "Block" })
592
592
  ] })
593
- ) : v ? /* @__PURE__ */ g(
593
+ ) : x ? /* @__PURE__ */ f(
594
594
  Ne,
595
595
  {
596
596
  onClick: L,
@@ -601,7 +601,7 @@ const ye = ({
601
601
  /* @__PURE__ */ s("span", { children: "Unblock" })
602
602
  ]
603
603
  }
604
- ) : /* @__PURE__ */ g(
604
+ ) : /* @__PURE__ */ f(
605
605
  Ne,
606
606
  {
607
607
  onClick: R,
@@ -613,8 +613,8 @@ const ye = ({
613
613
  ]
614
614
  }
615
615
  ) }),
616
- r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ g(Ne, { variant: "danger", onClick: D, children: [
617
- /* @__PURE__ */ s(cs, { className: "h-5 w-5" }),
616
+ r && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ f(Ne, { variant: "danger", onClick: D, children: [
617
+ /* @__PURE__ */ s(ds, { className: "h-5 w-5" }),
618
618
  /* @__PURE__ */ s("span", { children: "Report" })
619
619
  ] }) }),
620
620
  h
@@ -622,7 +622,7 @@ const ye = ({
622
622
  }
623
623
  )
624
624
  ] });
625
- }, Xe = "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", Aa = "CUSTOMER_PAID", Ra = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Aa, La = ({
625
+ }, Xe = "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", La = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ra, Ma = ({
626
626
  className: e,
627
627
  onBack: t,
628
628
  showBackButton: n,
@@ -635,23 +635,23 @@ const ye = ({
635
635
  onDeleteConversationClick: m,
636
636
  onBlockParticipantClick: h,
637
637
  onReportParticipantClick: u,
638
- customChannelActions: f,
638
+ customChannelActions: g,
639
639
  renderChannelActions: c,
640
- showChannelInfo: x = !0,
640
+ showChannelInfo: b = !0,
641
641
  onParticipantNameClick: w
642
642
  }) => {
643
643
  var C, P, S, T;
644
- const { channel: p } = fe(), { client: v } = Te(), b = z.useMemo(
644
+ const { channel: p } = fe(), { client: x } = Te(), v = z.useMemo(
645
645
  () => {
646
646
  var E;
647
- return ps(
647
+ return bs(
648
648
  (E = p.state) == null ? void 0 : E.members,
649
- v == null ? void 0 : v.userID,
649
+ x == null ? void 0 : x.userID,
650
650
  p.type
651
651
  );
652
652
  },
653
- [(C = p.state) == null ? void 0 : C.members, v == null ? void 0 : v.userID, p.type]
654
- ), N = bs(b == null ? void 0 : b.user), _ = (P = b == null ? void 0 : b.user) == null ? void 0 : P.image, A = gs(p), R = Ra((S = p.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, L = a && A, D = R || L || !!w, $ = async () => {
653
+ [(C = p.state) == null ? void 0 : C.members, x == null ? void 0 : x.userID, p.type]
654
+ ), N = vs(v == null ? void 0 : v.user), _ = (P = v == null ? void 0 : v.user) == null ? void 0 : P.image, A = ps(p), R = La((S = p.data) == null ? void 0 : S.customer_tag) && (v == null ? void 0 : v.is_follower) === !0, L = a && A, D = R || L || !!w, $ = async () => {
655
655
  try {
656
656
  A ? await p.unpin() : await p.pin();
657
657
  } catch (E) {
@@ -660,11 +660,11 @@ const ye = ({
660
660
  E
661
661
  );
662
662
  }
663
- }, O = /* @__PURE__ */ g(J, { children: [
663
+ }, O = /* @__PURE__ */ f(J, { children: [
664
664
  /* @__PURE__ */ s(
665
665
  ye,
666
666
  {
667
- id: ((T = b == null ? void 0 : b.user) == null ? void 0 : T.id) || p.id || "unknown",
667
+ id: ((T = v == null ? void 0 : v.user) == null ? void 0 : T.id) || p.id || "unknown",
668
668
  name: N,
669
669
  image: _,
670
670
  shape: "circle",
@@ -679,15 +679,15 @@ const ye = ({
679
679
  "relative z-10 flex max-w-full flex-col items-center justify-center rounded-full border border-white/10 bg-white/65 py-1.5 shadow-[0px_0px_0px_0px_rgba(0,0,0,0.04),0px_1px_2px_0px_rgba(0,0,0,0.04),0px_8px_32px_0px_rgba(0,0,0,0.1)] backdrop-blur-[2px] transition-filter duration-150 group-hover:brightness-95",
680
680
  D ? "pl-3 pr-2" : "px-3"
681
681
  ),
682
- children: /* @__PURE__ */ g("span", { className: "flex max-w-full items-center justify-center", children: [
682
+ children: /* @__PURE__ */ f("span", { className: "flex max-w-full items-center justify-center", children: [
683
683
  /* @__PURE__ */ s("span", { className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90", children: N }),
684
- D && /* @__PURE__ */ g("span", { className: "ml-2 flex gap-1", children: [
684
+ D && /* @__PURE__ */ f("span", { className: "ml-2 flex gap-1", children: [
685
685
  R && /* @__PURE__ */ s(
686
686
  "span",
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(Hn, { className: "size-2.5", weight: "bold" })
691
691
  }
692
692
  ),
693
693
  L && /* @__PURE__ */ s(
@@ -699,7 +699,7 @@ const ye = ({
699
699
  }
700
700
  ),
701
701
  w && /* @__PURE__ */ s(
702
- ds,
702
+ us,
703
703
  {
704
704
  "aria-hidden": "true",
705
705
  className: "size-4 shrink-0 text-black/65",
@@ -718,7 +718,7 @@ const ye = ({
718
718
  "@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]",
719
719
  e
720
720
  ),
721
- children: /* @__PURE__ */ g("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
721
+ children: /* @__PURE__ */ f("div", { className: "grid min-h-[100px] grid-cols-[minmax(40px,1fr)_auto_minmax(40px,1fr)] items-start pb-2 pt-5 @lg:min-h-[104px] @lg:pt-6", children: [
722
722
  /* @__PURE__ */ s("div", { className: "flex items-start", children: n && /* @__PURE__ */ s(
723
723
  "button",
724
724
  {
@@ -730,7 +730,7 @@ const ye = ({
730
730
  }),
731
731
  type: "button",
732
732
  "aria-label": "Back to conversations",
733
- children: /* @__PURE__ */ s(Hn, { className: "size-5 text-black/90" })
733
+ children: /* @__PURE__ */ s(Gn, { 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: w ? /* @__PURE__ */ s(
@@ -743,7 +743,7 @@ const ye = ({
743
743
  children: O
744
744
  }
745
745
  ) : /* @__PURE__ */ s("div", { className: "flex min-w-0 max-w-full flex-col items-center px-2", children: O }) }),
746
- /* @__PURE__ */ g("div", { className: "flex items-start justify-end gap-2", children: [
746
+ /* @__PURE__ */ f("div", { className: "flex items-start justify-end gap-2", children: [
747
747
  a && /* @__PURE__ */ s(
748
748
  "button",
749
749
  {
@@ -764,11 +764,11 @@ const ye = ({
764
764
  )
765
765
  }
766
766
  ),
767
- x && (c !== void 0 ? c : /* @__PURE__ */ s(
768
- Ta,
767
+ b && (c !== void 0 ? c : /* @__PURE__ */ s(
768
+ Aa,
769
769
  {
770
770
  channel: p,
771
- participant: b,
771
+ participant: v,
772
772
  showDeleteConversation: l,
773
773
  showBlockParticipant: o,
774
774
  showReportParticipant: d,
@@ -777,7 +777,7 @@ const ye = ({
777
777
  onDeleteConversationClick: m,
778
778
  onBlockParticipantClick: h,
779
779
  onReportParticipantClick: u,
780
- customChannelActions: f,
780
+ customChannelActions: g,
781
781
  triggerClassName: Xe
782
782
  }
783
783
  ))
@@ -785,13 +785,13 @@ const ye = ({
785
785
  ] })
786
786
  }
787
787
  );
788
- }, Ma = (e) => /* @__PURE__ */ s(on, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
789
- function Da(e) {
788
+ }, Da = (e) => /* @__PURE__ */ s(ln, { ...e, position: "center" }), rt = "vote_up", it = "vote_down";
789
+ function Oa(e) {
790
790
  return e != null && e.length ? e.some((t) => t.type === it) ? "down" : e.some((t) => t.type === rt) ? "up" : null : null;
791
791
  }
792
- function Oa(e) {
792
+ function Pa(e) {
793
793
  const { channel: t } = fe(), { client: n } = Te("useMessageVote"), a = ae(
794
- () => Da(e.own_reactions),
794
+ () => Oa(e.own_reactions),
795
795
  [e.own_reactions]
796
796
  ), r = q(async () => {
797
797
  if (n != null && n.userID)
@@ -816,39 +816,39 @@ function Oa(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 Pa(e) {
819
+ function za(e) {
820
820
  return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
821
821
  }
822
- function xs({
822
+ function ws({
823
823
  message: e,
824
824
  viewerLanguage: t
825
825
  }) {
826
826
  var r;
827
- const n = e == null ? void 0 : e.text, a = Pa(t);
827
+ const n = e == null ? void 0 : e.text, a = za(t);
828
828
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
829
829
  }
830
- const za = ["linktr.ee"], Zt = "messaging-attachment-v1_0";
831
- function Fa(e) {
830
+ const Fa = ["linktr.ee"], Zt = "messaging-attachment-v1_0";
831
+ function Ba(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 Ba(e) {
839
- return za.some(
838
+ function $a(e) {
839
+ return Fa.some(
840
840
  (t) => e === t || e.endsWith(`.${t}`)
841
841
  );
842
842
  }
843
843
  function de(e) {
844
844
  const t = e == null ? void 0 : e.trim();
845
845
  if (!t) return;
846
- const n = Fa(t);
847
- if (!n || !Ba(n)) return t;
846
+ const n = Ba(t);
847
+ if (!n || !$a(n)) return t;
848
848
  const a = new URL(t);
849
849
  return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Zt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Zt), a.toString());
850
850
  }
851
- const $a = [
851
+ const Ua = [
852
852
  [/pdf/, "pdf"],
853
853
  [/wordprocessingml|msword|\.doc/, "doc"],
854
854
  [/spreadsheetml|ms-excel|\.xls/, "xls"],
@@ -861,39 +861,39 @@ const $a = [
861
861
  function ue(e) {
862
862
  return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
863
863
  }
864
- function ws(e) {
865
- const t = $a.find(
864
+ function _s(e) {
865
+ const t = Ua.find(
866
866
  ([n]) => n.test(e)
867
867
  );
868
868
  return t ? t[1] : "generic";
869
869
  }
870
- const Ua = {
871
- video: ms,
872
- audio: Yn,
873
- image: Gn,
874
- document: us
875
- }, ja = {
876
- pdf: ea,
877
- doc: Qn,
878
- xls: Jn,
879
- csv: Zn,
880
- ppt: Kn,
881
- zip: Xn,
882
- text: qn,
883
- markdown: Wn,
884
- generic: us
870
+ const ja = {
871
+ video: hs,
872
+ audio: Wn,
873
+ image: Yn,
874
+ document: ms
875
+ }, Va = {
876
+ pdf: ta,
877
+ doc: ea,
878
+ xls: Qn,
879
+ csv: Jn,
880
+ ppt: Zn,
881
+ zip: Kn,
882
+ text: Xn,
883
+ markdown: qn,
884
+ generic: ms
885
885
  };
886
- function Va(e) {
886
+ function Ha(e) {
887
887
  const t = ue(e);
888
- return t !== "document" ? Ua[t] : ja[ws(e)];
888
+ return t !== "document" ? ja[t] : Va[_s(e)];
889
889
  }
890
890
  function we(e, t) {
891
- return z.createElement(Va(e), t);
891
+ return z.createElement(Ha(e), t);
892
892
  }
893
- const Ha = (e) => {
893
+ const Ga = (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
- }, Ga = ({
896
+ }, Ya = ({
897
897
  source: e,
898
898
  mimeType: t,
899
899
  poster: n,
@@ -905,15 +905,15 @@ const Ha = (e) => {
905
905
  muted: d = !1,
906
906
  onContainerClick: m
907
907
  }) => {
908
- const h = ue(t), u = H(null), f = H(null), c = H(null), x = H(r), [w, p] = U(a), [v, b] = U(0), [N, _] = U(!1), [A, R] = U(!1), [L, D] = U(!1), [$, O] = U(!1), [C, P] = U(!0), [S, T] = U(null), E = q(() => {
908
+ const h = ue(t), u = H(null), g = H(null), c = H(null), b = H(r), [w, p] = U(a), [x, v] = U(0), [N, _] = U(!1), [A, R] = U(!1), [L, D] = U(!1), [$, O] = U(!1), [C, P] = U(!0), [S, T] = U(null), E = q(() => {
909
909
  D(!1), p(!0);
910
910
  }, []), B = q((y) => {
911
- const I = f.current;
911
+ const I = g.current;
912
912
  if (!I) return 0;
913
913
  const W = I.getBoundingClientRect();
914
914
  return Math.max(
915
915
  0,
916
- Math.min(1, (Ha(y) - W.left) / W.width)
916
+ Math.min(1, (Ga(y) - W.left) / W.width)
917
917
  );
918
918
  }, []), F = q((y) => {
919
919
  const I = u.current;
@@ -921,10 +921,10 @@ const Ha = (e) => {
921
921
  }, []), j = (y) => {
922
922
  y.stopPropagation(), _(!0);
923
923
  const I = B(y);
924
- b(I), F(I);
924
+ v(I), F(I);
925
925
  };
926
926
  Y(() => {
927
- r !== void 0 && r !== x.current && (x.current = r, p(r));
927
+ r !== void 0 && r !== b.current && (b.current = r, p(r));
928
928
  }, [r]), Y(() => {
929
929
  if (!w) {
930
930
  c.current !== null && (cancelAnimationFrame(c.current), c.current = null);
@@ -932,7 +932,7 @@ const Ha = (e) => {
932
932
  }
933
933
  const y = () => {
934
934
  const I = u.current;
935
- I && I.duration && !N && b(I.currentTime / I.duration), c.current = requestAnimationFrame(y);
935
+ I && I.duration && !N && v(I.currentTime / I.duration), c.current = requestAnimationFrame(y);
936
936
  };
937
937
  return c.current = requestAnimationFrame(y), () => {
938
938
  c.current !== null && cancelAnimationFrame(c.current);
@@ -944,15 +944,15 @@ const Ha = (e) => {
944
944
  }) : y.pause());
945
945
  }, [w]), Y(() => {
946
946
  if (!N) return;
947
- const y = (W) => b(B(W)), I = (W) => {
947
+ const y = (W) => v(B(W)), I = (W) => {
948
948
  _(!1), F(B(W));
949
949
  };
950
950
  return window.addEventListener("mousemove", y), window.addEventListener("mouseup", I), window.addEventListener("touchmove", y, { passive: !0 }), window.addEventListener("touchend", I), () => {
951
951
  window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", I), window.removeEventListener("touchmove", y), window.removeEventListener("touchend", I);
952
952
  };
953
953
  }, [N, B, F]);
954
- const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(v * 100);
955
- return /* @__PURE__ */ g(
954
+ const K = S ? { aspectRatio: String(S) } : void 0, se = S ? "" : " aspect-video", G = Math.round(x * 100);
955
+ return /* @__PURE__ */ f(
956
956
  "div",
957
957
  {
958
958
  role: "button",
@@ -1003,7 +1003,7 @@ const Ha = (e) => {
1003
1003
  onWaiting: () => O(!0),
1004
1004
  onPlay: () => D(!1),
1005
1005
  onEnded: () => {
1006
- i || (p(!1), b(0));
1006
+ i || (p(!1), v(0));
1007
1007
  },
1008
1008
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1009
1009
  }
@@ -1027,7 +1027,7 @@ const Ha = (e) => {
1027
1027
  y instanceof HTMLVideoElement && y.videoWidth && y.videoHeight && T(y.videoWidth / y.videoHeight);
1028
1028
  },
1029
1029
  onEnded: () => {
1030
- i || (p(!1), b(0));
1030
+ i || (p(!1), v(0));
1031
1031
  },
1032
1032
  children: /* @__PURE__ */ s("track", { kind: "captions" })
1033
1033
  }
@@ -1064,13 +1064,13 @@ const Ha = (e) => {
1064
1064
  "aria-valuemin": 0,
1065
1065
  "aria-valuemax": 100,
1066
1066
  tabIndex: 0,
1067
- ref: f,
1067
+ ref: g,
1068
1068
  className: "relative flex h-4 w-full cursor-pointer items-center",
1069
1069
  onMouseDown: j,
1070
1070
  onTouchStart: j,
1071
1071
  onClick: (y) => y.stopPropagation(),
1072
1072
  onKeyDown: (y) => {
1073
- y.key === "ArrowRight" && F(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
1073
+ y.key === "ArrowRight" && F(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, x - 0.05));
1074
1074
  },
1075
1075
  children: /* @__PURE__ */ s("div", { className: "w-full overflow-hidden rounded-full bg-white/30 h-1", children: /* @__PURE__ */ s(
1076
1076
  "div",
@@ -1081,7 +1081,7 @@ const Ha = (e) => {
1081
1081
  ) })
1082
1082
  }
1083
1083
  ) }),
1084
- l && /* @__PURE__ */ g("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1084
+ l && /* @__PURE__ */ f("div", { className: "absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/60 to-transparent px-3 pb-2.5 pt-6 transition-all duration-200", children: [
1085
1085
  /* @__PURE__ */ s(
1086
1086
  "button",
1087
1087
  {
@@ -1091,10 +1091,10 @@ const Ha = (e) => {
1091
1091
  },
1092
1092
  className: "shrink-0 text-white",
1093
1093
  "aria-label": w ? "Pause" : "Play",
1094
- children: w ? /* @__PURE__ */ s(ta, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(at, { className: "size-5 translate-x-px", weight: "fill" })
1094
+ children: w ? /* @__PURE__ */ s(sa, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ s(at, { className: "size-5 translate-x-px", weight: "fill" })
1095
1095
  }
1096
1096
  ),
1097
- /* @__PURE__ */ g(
1097
+ /* @__PURE__ */ f(
1098
1098
  "div",
1099
1099
  {
1100
1100
  role: "slider",
@@ -1103,7 +1103,7 @@ const Ha = (e) => {
1103
1103
  "aria-valuemin": 0,
1104
1104
  "aria-valuemax": 100,
1105
1105
  tabIndex: 0,
1106
- ref: f,
1106
+ ref: g,
1107
1107
  className: "relative flex h-4 w-full cursor-pointer items-center",
1108
1108
  onMouseDown: j,
1109
1109
  onTouchStart: j,
@@ -1111,7 +1111,7 @@ const Ha = (e) => {
1111
1111
  onMouseEnter: () => R(!0),
1112
1112
  onMouseLeave: () => R(!1),
1113
1113
  onKeyDown: (y) => {
1114
- y.key === "ArrowRight" && F(Math.min(1, v + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, v - 0.05));
1114
+ y.key === "ArrowRight" && F(Math.min(1, x + 0.05)), y.key === "ArrowLeft" && F(Math.max(0, x - 0.05));
1115
1115
  },
1116
1116
  children: [
1117
1117
  /* @__PURE__ */ s(
@@ -1141,7 +1141,7 @@ const Ha = (e) => {
1141
1141
  ]
1142
1142
  }
1143
1143
  );
1144
- }, Jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ya = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", _s = ({
1144
+ }, Jt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Wa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", ys = ({
1145
1145
  mimeType: e,
1146
1146
  sourceUrl: t,
1147
1147
  thumbnailUrl: n,
@@ -1152,7 +1152,7 @@ const Ha = (e) => {
1152
1152
  }) => {
1153
1153
  const o = ue(e), [d, m] = U(!1), h = de(t), u = de(n);
1154
1154
  return t && (o === "video" || o === "audio") ? /* @__PURE__ */ s(
1155
- Ga,
1155
+ Ya,
1156
1156
  {
1157
1157
  source: t,
1158
1158
  mimeType: e,
@@ -1203,7 +1203,7 @@ const Ha = (e) => {
1203
1203
  weight: "regular"
1204
1204
  })
1205
1205
  }
1206
- ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Ya(r)}`, children: /* @__PURE__ */ s(
1206
+ ) : n ? /* @__PURE__ */ s("div", { className: `relative ${Wa(r)}`, children: /* @__PURE__ */ s(
1207
1207
  "img",
1208
1208
  {
1209
1209
  src: u ?? n,
@@ -1221,7 +1221,7 @@ const Ha = (e) => {
1221
1221
  })
1222
1222
  }
1223
1223
  );
1224
- }, ys = ({
1224
+ }, Ns = ({
1225
1225
  variant: e,
1226
1226
  thumbnail: t,
1227
1227
  title: n,
@@ -1235,37 +1235,37 @@ const Ha = (e) => {
1235
1235
  rootRef: h,
1236
1236
  "data-testid": u
1237
1237
  }) => {
1238
- const f = e === "dark", c = f ? n ?? a : n ?? "", x = f && !n;
1239
- return /* @__PURE__ */ g(
1238
+ const g = e === "dark", c = g ? n ?? a : n ?? "", b = g && !n;
1239
+ return /* @__PURE__ */ f(
1240
1240
  "div",
1241
1241
  {
1242
1242
  ref: h,
1243
1243
  "data-testid": u,
1244
1244
  className: k(
1245
1245
  "relative w-[280px] select-none overflow-hidden rounded-[24px] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
1246
- f ? "bg-[#1e2330]" : "bg-white"
1246
+ g ? "bg-[#1e2330]" : "bg-white"
1247
1247
  ),
1248
1248
  children: [
1249
1249
  d ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute left-3 top-3 z-50", children: d }) : null,
1250
1250
  m ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-50", children: m }) : null,
1251
1251
  t,
1252
- /* @__PURE__ */ g("div", { className: "px-4 pb-3 pt-3", children: [
1252
+ /* @__PURE__ */ f("div", { className: "px-4 pb-3 pt-3", children: [
1253
1253
  c.trim() !== "" && /* @__PURE__ */ s(
1254
1254
  "p",
1255
1255
  {
1256
1256
  className: k("mb-0.5 truncate text-base font-medium", {
1257
- "text-black": !f,
1258
- "text-white/30": f && x,
1259
- "text-white": f && !x
1257
+ "text-black": !g,
1258
+ "text-white/30": g && b,
1259
+ "text-white": g && !b
1260
1260
  }),
1261
1261
  children: c
1262
1262
  }
1263
1263
  ),
1264
- /* @__PURE__ */ g("div", { className: "flex flex-wrap items-center gap-1", children: [
1264
+ /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center gap-1", children: [
1265
1265
  we(r, {
1266
1266
  className: k(
1267
1267
  "size-5 shrink-0",
1268
- f ? "text-white/55" : "text-black/55"
1268
+ g ? "text-white/55" : "text-black/55"
1269
1269
  ),
1270
1270
  weight: "regular"
1271
1271
  }),
@@ -1274,7 +1274,7 @@ const Ha = (e) => {
1274
1274
  {
1275
1275
  className: k(
1276
1276
  "text-xs font-medium",
1277
- f ? "text-white/55" : "text-black/55"
1277
+ g ? "text-white/55" : "text-black/55"
1278
1278
  ),
1279
1279
  children: i
1280
1280
  }
@@ -1287,29 +1287,29 @@ const Ha = (e) => {
1287
1287
  }
1288
1288
  );
1289
1289
  };
1290
- function Ns(e) {
1290
+ function ks(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
1293
  function dt(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 Wa(e) {
1296
+ function qa(e) {
1297
1297
  return e ? "bg-white/10" : "bg-black/5";
1298
1298
  }
1299
- function qa(e) {
1299
+ function Xa(e) {
1300
1300
  return e ? "text-white" : "text-black";
1301
1301
  }
1302
- function Xa(e) {
1302
+ function Ka(e) {
1303
1303
  return e ? "text-white/55" : "text-black/55";
1304
1304
  }
1305
- function Ka(e) {
1305
+ function Za(e) {
1306
1306
  return e ? "text-white/40" : "text-black/40";
1307
1307
  }
1308
- function Za(e) {
1308
+ function Ja(e) {
1309
1309
  return e ? "text-white/20" : "text-black/20";
1310
1310
  }
1311
1311
  const ut = ({ 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__ */ g(z.Fragment, { children: [
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__ */ f(z.Fragment, { children: [
1313
1313
  /* @__PURE__ */ s("div", { className: "p-2", children: r ? /* @__PURE__ */ s(
1314
1314
  "img",
1315
1315
  {
@@ -1320,26 +1320,26 @@ const ut = ({ attachment: e, isMyMessage: t }) => {
1320
1320
  ) : /* @__PURE__ */ s(
1321
1321
  "div",
1322
1322
  {
1323
- className: `aspect-video w-full rounded-[20px] ${Wa(t)} flex items-center justify-center`,
1324
- children: /* @__PURE__ */ s(sa, { className: `size-12 ${Za(t)}` })
1323
+ className: `aspect-video w-full rounded-[20px] ${qa(t)} flex items-center justify-center`,
1324
+ children: /* @__PURE__ */ s(na, { className: `size-12 ${Ja(t)}` })
1325
1325
  }
1326
1326
  ) }),
1327
- /* @__PURE__ */ g("div", { className: "px-3 pb-3", children: [
1328
- n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${qa(t)}`, children: n }),
1329
- a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Xa(t)}`, children: a }),
1330
- d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Ka(t)}`, children: d })
1327
+ /* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
1328
+ n && /* @__PURE__ */ s("p", { className: `truncate text-[14px] font-medium leading-5 ${Xa(t)}`, children: n }),
1329
+ a && /* @__PURE__ */ s("p", { className: `truncate text-[12px] leading-4 ${Ka(t)}`, children: a }),
1330
+ d && /* @__PURE__ */ s("p", { className: `mt-1 truncate text-[12px] leading-4 ${Za(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 ks(e) {
1335
+ function Cs(e) {
1336
1336
  return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
1337
1337
  }
1338
1338
  function mt(e) {
1339
1339
  var t;
1340
- return (t = e.attachments) == null ? void 0 : t.find(ks);
1340
+ return (t = e.attachments) == null ? void 0 : t.find(Cs);
1341
1341
  }
1342
- async function Ja(e, t) {
1342
+ async function Qa(e, t) {
1343
1343
  let n;
1344
1344
  try {
1345
1345
  n = t ?? new URL(e).pathname.split("/").pop() ?? "download";
@@ -1351,7 +1351,7 @@ async function Ja(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 Qa = ({
1354
+ const er = ({
1355
1355
  url: e,
1356
1356
  filename: t
1357
1357
  }) => {
@@ -1363,7 +1363,7 @@ const Qa = ({
1363
1363
  onClick: (i) => {
1364
1364
  i.stopPropagation();
1365
1365
  const l = window.open("", "_blank", "noopener,noreferrer");
1366
- a(!0), Ja(e, t).then(() => {
1366
+ a(!0), Qa(e, t).then(() => {
1367
1367
  l == null || l.close();
1368
1368
  }).catch(() => {
1369
1369
  l && (l.location.href = e);
@@ -1371,7 +1371,7 @@ const Qa = ({
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(xe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ g(z.Fragment, { children: [
1374
+ children: n ? /* @__PURE__ */ s(xe, { className: "size-4 animate-spin text-white", weight: "bold" }) : /* @__PURE__ */ f(z.Fragment, { children: [
1375
1375
  /* @__PURE__ */ s(Se, { className: "size-4 text-white", weight: "bold" }),
1376
1376
  "Download"
1377
1377
  ] })
@@ -1379,14 +1379,14 @@ const Qa = ({
1379
1379
  );
1380
1380
  };
1381
1381
  function ht(e) {
1382
- var u, f, c, x;
1382
+ var u, g, c, b;
1383
1383
  const t = (u = e.attachments) == null ? void 0 : u.find(
1384
1384
  (w) => w.type === "video" && w.asset_url
1385
- ), n = (f = e.attachments) == null ? void 0 : f.find(
1385
+ ), n = (g = e.attachments) == null ? void 0 : g.find(
1386
1386
  (w) => w.type === "image" && w.image_url
1387
1387
  ), a = (c = e.attachments) == null ? void 0 : c.find(
1388
1388
  (w) => w.type === "audio" && w.asset_url
1389
- ), r = (x = e.attachments) == null ? void 0 : x.find(
1389
+ ), r = (b = e.attachments) == null ? void 0 : b.find(
1390
1390
  (w) => w.type === "file" && w.asset_url
1391
1391
  ), i = t ?? n ?? a ?? r, l = (t == null ? void 0 : t.asset_url) ?? (n == null ? void 0 : n.image_url) ?? (a == null ? void 0 : a.asset_url) ?? (r == null ? void 0 : r.asset_url);
1392
1392
  if (!l) return null;
@@ -1399,16 +1399,16 @@ function ht(e) {
1399
1399
  thumbnailUrl: h
1400
1400
  };
1401
1401
  }
1402
- const Cs = ({
1402
+ const Ss = ({
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 ? Ns(a) : void 0;
1409
+ const i = a !== void 0 ? ks(a) : void 0;
1410
1410
  return /* @__PURE__ */ s(
1411
- ys,
1411
+ Ns,
1412
1412
  {
1413
1413
  variant: "dark",
1414
1414
  title: n,
@@ -1416,7 +1416,7 @@ const Cs = ({
1416
1416
  mimeType: t,
1417
1417
  detail: i,
1418
1418
  thumbnail: /* @__PURE__ */ s(
1419
- _s,
1419
+ ys,
1420
1420
  {
1421
1421
  mimeType: t,
1422
1422
  sourceUrl: e,
@@ -1427,23 +1427,23 @@ const Cs = ({
1427
1427
  )
1428
1428
  }
1429
1429
  );
1430
- }, Ss = ({
1430
+ }, Es = ({
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 = ue(t), l = a !== void 0 ? Ns(a) : void 0;
1437
+ const i = ue(t), l = a !== void 0 ? ks(a) : void 0;
1438
1438
  return /* @__PURE__ */ s(
1439
- ys,
1439
+ Ns,
1440
1440
  {
1441
1441
  variant: "light",
1442
1442
  title: n,
1443
1443
  mimeType: t,
1444
1444
  detail: l,
1445
1445
  thumbnail: /* @__PURE__ */ s(
1446
- _s,
1446
+ ys,
1447
1447
  {
1448
1448
  mimeType: t,
1449
1449
  sourceUrl: e,
@@ -1453,15 +1453,15 @@ const Cs = ({
1453
1453
  containedImage: i === "image" || i === "document"
1454
1454
  }
1455
1455
  ),
1456
- action: /* @__PURE__ */ s(Qa, { url: e, filename: n })
1456
+ action: /* @__PURE__ */ s(er, { url: e, filename: n })
1457
1457
  }
1458
1458
  );
1459
- }, er = ({
1459
+ }, tr = ({
1460
1460
  message: e,
1461
1461
  isMyMessage: t = !1
1462
1462
  }) => {
1463
1463
  const n = mt(e), a = ht(e);
1464
- return !n && !a ? null : /* @__PURE__ */ g("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: [
1464
+ return !n && !a ? null : /* @__PURE__ */ f("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
  ye,
1467
1467
  {
@@ -1482,41 +1482,41 @@ const Cs = ({
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: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Cs, { ...a }) : /* @__PURE__ */ s(Ss, { ...a })
1485
+ children: n ? /* @__PURE__ */ s("div", { className: dt(t), children: /* @__PURE__ */ s(ut, { attachment: n, isMyMessage: t }) }) : t ? /* @__PURE__ */ s(Ss, { ...a }) : /* @__PURE__ */ s(Es, { ...a })
1486
1486
  }
1487
1487
  ) })
1488
1488
  }
1489
1489
  )
1490
1490
  ] });
1491
- }, tr = ({
1491
+ }, sr = ({
1492
1492
  message: e
1493
1493
  }) => {
1494
1494
  const t = mt(e);
1495
1495
  if (t)
1496
1496
  return /* @__PURE__ */ s("div", { className: dt(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !0 }) });
1497
1497
  const n = ht(e);
1498
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Cs, { ...n }) }) : null;
1499
- }, sr = ({
1498
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ss, { ...n }) }) : null;
1499
+ }, nr = ({
1500
1500
  message: e
1501
1501
  }) => {
1502
1502
  const t = mt(e);
1503
1503
  if (t)
1504
1504
  return /* @__PURE__ */ s("div", { className: dt(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ s(ut, { attachment: t, isMyMessage: !1 }) });
1505
1505
  const n = ht(e);
1506
- return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Ss, { ...n }) }) : null;
1507
- }, al = Object.assign(er, {
1508
- Creator: tr,
1509
- Visitor: sr
1510
- }), nr = {
1506
+ return n ? /* @__PURE__ */ s("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ s(Es, { ...n }) }) : null;
1507
+ }, il = Object.assign(tr, {
1508
+ Creator: sr,
1509
+ Visitor: nr
1510
+ }), ar = {
1511
1511
  dark: "bg-[#1e2330]",
1512
1512
  light: "bg-[#f2f1ef]"
1513
- }, ar = {
1513
+ }, rr = {
1514
1514
  dark: "text-white",
1515
1515
  light: "text-[#000000]"
1516
- }, rr = {
1516
+ }, ir = {
1517
1517
  dark: "border-white/[0.08]",
1518
1518
  light: "border-black/[0.08]"
1519
- }, ir = (e) => e === "dark" ? "sender" : "receiver", or = {
1519
+ }, or = (e) => e === "dark" ? "sender" : "receiver", lr = {
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,8 +1541,8 @@ const Cs = ({
1541
1541
  children: d,
1542
1542
  "data-testid": m
1543
1543
  }) => {
1544
- const h = t != null && t !== "", u = l ?? or[ir(e)][a];
1545
- return /* @__PURE__ */ g(
1544
+ const h = t != null && t !== "", u = l ?? lr[or(e)][a];
1545
+ return /* @__PURE__ */ f(
1546
1546
  "div",
1547
1547
  {
1548
1548
  "data-testid": m,
@@ -1570,10 +1570,10 @@ const Cs = ({
1570
1570
  // there is no ambiguity to resolve.
1571
1571
  h && "pb-0",
1572
1572
  u,
1573
- nr[e],
1574
1573
  ar[e],
1574
+ rr[e],
1575
1575
  n && "border",
1576
- n && rr[e],
1576
+ n && ir[e],
1577
1577
  o
1578
1578
  ),
1579
1579
  children: [
@@ -1619,16 +1619,16 @@ const Cs = ({
1619
1619
  ),
1620
1620
  children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
1621
1621
  }
1622
- ), Le = (e) => e === "received" ? "light" : "dark", lr = ({
1622
+ ), Le = (e) => e === "received" ? "light" : "dark", cr = ({
1623
1623
  firstOfGroup: e,
1624
1624
  endOfGroup: t,
1625
1625
  groupedByUser: n
1626
- }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", cr = ({
1626
+ }) => !n || e && t ? "single" : e ? "first" : t ? "end" : "middle", dr = ({
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 }] : [], dr = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
1631
+ }) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: n }] : [], ur = ({ item: e, preload: t, trailingAction: n }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
1632
1632
  /* @__PURE__ */ s(
1633
1633
  "audio",
1634
1634
  {
@@ -1651,10 +1651,10 @@ const Cs = ({
1651
1651
  preload: o,
1652
1652
  onDismiss: d
1653
1653
  }) => {
1654
- const m = Le(e), h = e === "composer" && !!d, u = cr({ src: t, mimeType: n, filename: a, items: r });
1654
+ const m = Le(e), h = e === "composer" && !!d, u = dr({ src: t, mimeType: n, filename: a, items: r });
1655
1655
  if (u.length === 0)
1656
1656
  return null;
1657
- const f = o ?? (u.length > 1 ? "none" : "metadata");
1657
+ const g = o ?? (u.length > 1 ? "none" : "metadata");
1658
1658
  return /* @__PURE__ */ s(
1659
1659
  Ae,
1660
1660
  {
@@ -1662,30 +1662,30 @@ const Cs = ({
1662
1662
  text: i,
1663
1663
  groupPosition: l,
1664
1664
  "data-testid": "audio-attachment",
1665
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, x) => /* @__PURE__ */ s(
1666
- dr,
1665
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((c, b) => /* @__PURE__ */ s(
1666
+ ur,
1667
1667
  {
1668
1668
  item: c,
1669
- preload: f,
1669
+ preload: g,
1670
1670
  trailingAction: (
1671
1671
  // Composer only supports a single attachment, so the
1672
1672
  // dismiss control sits on the only player.
1673
- h && x === 0 ? /* @__PURE__ */ s(Re, { onClick: d, variant: "inline" }) : void 0
1673
+ h && b === 0 ? /* @__PURE__ */ s(Re, { onClick: d, variant: "inline" }) : void 0
1674
1674
  )
1675
1675
  },
1676
- `${c.src}-${x}`
1676
+ `${c.src}-${b}`
1677
1677
  )) })
1678
1678
  }
1679
1679
  );
1680
- }, ur = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), mr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), hr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), fr = {
1681
- Composer: ur,
1682
- Sent: mr,
1683
- Received: hr
1680
+ }, mr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "composer" }), hr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "sent" }), fr = (e) => /* @__PURE__ */ s(ft, { ...e, state: "received" }), gr = {
1681
+ Composer: mr,
1682
+ Sent: hr,
1683
+ Received: fr
1684
1684
  };
1685
- function gr(e) {
1685
+ function pr(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 pr = {
1688
+ const br = {
1689
1689
  pdf: "PDF",
1690
1690
  doc: "DOC",
1691
1691
  xls: "XLS",
@@ -1695,7 +1695,7 @@ const pr = {
1695
1695
  text: "TXT",
1696
1696
  markdown: "MD"
1697
1697
  };
1698
- function br(e, t) {
1698
+ function vr(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 br(e, t) {
1705
1705
  }
1706
1706
  if (!e) return;
1707
1707
  if (ue(e) === "document") {
1708
- const r = ws(e), i = pr[r];
1708
+ const r = _s(e), i = br[r];
1709
1709
  if (i) return i;
1710
1710
  if (e === "application/octet-stream") return;
1711
1711
  }
@@ -1713,8 +1713,8 @@ function br(e, t) {
1713
1713
  if (!(!a || a === "*"))
1714
1714
  return a.toUpperCase();
1715
1715
  }
1716
- function vr(e, t, n) {
1717
- const a = br(e, t), r = typeof n == "number" && n > 0 ? gr(n) : void 0;
1716
+ function xr(e, t, n) {
1717
+ const a = vr(e, t), r = typeof n == "number" && n > 0 ? pr(n) : void 0;
1718
1718
  return [a, r].filter(Boolean).join(" · ") || void 0;
1719
1719
  }
1720
1720
  function re(e) {
@@ -1725,16 +1725,16 @@ function re(e) {
1725
1725
  return "download";
1726
1726
  }
1727
1727
  }
1728
- const xr = {
1728
+ const wr = {
1729
1729
  dark: "text-white/55",
1730
1730
  light: "text-black/65"
1731
- }, wr = {
1731
+ }, _r = {
1732
1732
  dark: "bg-white/10",
1733
1733
  light: "bg-black/5"
1734
- }, _r = {
1734
+ }, yr = {
1735
1735
  dark: "text-white/85",
1736
1736
  light: "text-black/85"
1737
- }, Es = ({
1737
+ }, Is = ({
1738
1738
  variant: e,
1739
1739
  filename: t,
1740
1740
  title: n,
@@ -1744,32 +1744,32 @@ const xr = {
1744
1744
  activateLabel: l,
1745
1745
  trailingAction: o
1746
1746
  }) => {
1747
- const d = n ?? t ?? "File", m = vr(a, t, r), h = /* @__PURE__ */ s(
1747
+ const d = n ?? t ?? "File", m = xr(a, t, r), h = /* @__PURE__ */ s(
1748
1748
  "div",
1749
1749
  {
1750
1750
  className: k(
1751
1751
  "flex size-10 shrink-0 items-center justify-center rounded-sm",
1752
- wr[e]
1752
+ _r[e]
1753
1753
  ),
1754
1754
  "aria-hidden": !0,
1755
1755
  children: we(a, {
1756
- className: k("size-6", _r[e]),
1756
+ className: k("size-6", yr[e]),
1757
1757
  weight: "regular"
1758
1758
  })
1759
1759
  }
1760
- ), u = /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1760
+ ), u = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col text-left", children: [
1761
1761
  /* @__PURE__ */ s("p", { className: "truncate font-medium leading-snug", children: d }),
1762
1762
  m ? /* @__PURE__ */ s(
1763
1763
  "p",
1764
1764
  {
1765
1765
  className: k(
1766
1766
  "truncate text-xs leading-4",
1767
- xr[e]
1767
+ wr[e]
1768
1768
  ),
1769
1769
  children: m
1770
1770
  }
1771
1771
  ) : null
1772
- ] }), f = i ? /* @__PURE__ */ g(
1772
+ ] }), g = i ? /* @__PURE__ */ f(
1773
1773
  "button",
1774
1774
  {
1775
1775
  type: "button",
@@ -1784,16 +1784,16 @@ const xr = {
1784
1784
  u
1785
1785
  ]
1786
1786
  }
1787
- ) : /* @__PURE__ */ g(J, { children: [
1787
+ ) : /* @__PURE__ */ f(J, { children: [
1788
1788
  h,
1789
1789
  u
1790
1790
  ] });
1791
- return /* @__PURE__ */ g("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1792
- f,
1791
+ return /* @__PURE__ */ f("div", { className: "flex items-center gap-3 px-3 py-2", children: [
1792
+ g,
1793
1793
  o ? /* @__PURE__ */ s("div", { className: "shrink-0", children: o }) : null
1794
1794
  ] });
1795
1795
  };
1796
- async function Is(e, t) {
1796
+ async function Ts(e, t) {
1797
1797
  const n = t ?? re(e);
1798
1798
  try {
1799
1799
  const a = await fetch(e, { mode: "cors" });
@@ -1807,14 +1807,14 @@ async function Is(e, t) {
1807
1807
  }
1808
1808
  }
1809
1809
  }
1810
- const yr = ({
1810
+ const Nr = ({
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 }] : [], Nr = ({
1817
+ }) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: n, mimeType: a, title: r }] : [], kr = ({
1818
1818
  variant: e,
1819
1819
  item: t,
1820
1820
  index: n,
@@ -1823,7 +1823,7 @@ const yr = ({
1823
1823
  }) => {
1824
1824
  const i = t.filename ?? re(t.src);
1825
1825
  return /* @__PURE__ */ s(
1826
- Es,
1826
+ Is,
1827
1827
  {
1828
1828
  variant: e,
1829
1829
  filename: i,
@@ -1848,19 +1848,19 @@ const yr = ({
1848
1848
  onClick: m,
1849
1849
  onDismiss: h
1850
1850
  }) => {
1851
- const u = Le(e), f = e === "composer" && !!h, c = yr({
1851
+ const u = Le(e), g = e === "composer" && !!h, c = Nr({
1852
1852
  src: t,
1853
1853
  filename: n,
1854
1854
  fileSize: a,
1855
1855
  mimeType: r,
1856
1856
  title: i,
1857
1857
  items: l
1858
- }), x = (p) => {
1858
+ }), b = (p) => {
1859
1859
  if ((m == null ? void 0 : m(p)) === !1) return;
1860
- const v = c[p];
1861
- if (!v) return;
1862
- const b = v.filename ?? re(v.src);
1863
- Is(v.src, b);
1860
+ const x = c[p];
1861
+ if (!x) return;
1862
+ const v = x.filename ?? re(x.src);
1863
+ Ts(x.src, v);
1864
1864
  };
1865
1865
  if (c.length === 0)
1866
1866
  return null;
@@ -1882,29 +1882,29 @@ const yr = ({
1882
1882
  text: o,
1883
1883
  groupPosition: d,
1884
1884
  "data-testid": "file-attachment",
1885
- children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, v) => /* @__PURE__ */ s(
1886
- Nr,
1885
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: c.map((p, x) => /* @__PURE__ */ s(
1886
+ kr,
1887
1887
  {
1888
1888
  variant: u,
1889
1889
  item: p,
1890
- index: v,
1891
- onActivate: x,
1892
- trailingAction: f && v === 0 ? /* @__PURE__ */ s(Re, { onClick: h, variant: "inline" }) : w
1890
+ index: x,
1891
+ onActivate: b,
1892
+ trailingAction: g && x === 0 ? /* @__PURE__ */ s(Re, { onClick: h, variant: "inline" }) : w
1893
1893
  },
1894
- `${p.src}-${v}`
1894
+ `${p.src}-${x}`
1895
1895
  )) })
1896
1896
  }
1897
1897
  );
1898
- }, kr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), Er = {
1899
- Composer: kr,
1900
- Sent: Cr,
1901
- Received: Sr
1898
+ }, Cr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "composer" }), Sr = (e) => /* @__PURE__ */ s(gt, { ...e, state: "sent" }), Er = (e) => /* @__PURE__ */ s(gt, { ...e, state: "received" }), Ir = {
1899
+ Composer: Cr,
1900
+ Sent: Sr,
1901
+ Received: Er
1902
1902
  }, pt = ({
1903
1903
  onPrev: e,
1904
1904
  onNext: t,
1905
1905
  prevLabel: n = "Previous",
1906
1906
  nextLabel: a = "Next"
1907
- }) => /* @__PURE__ */ g(J, { children: [
1907
+ }) => /* @__PURE__ */ f(J, { children: [
1908
1908
  /* @__PURE__ */ s(
1909
1909
  "button",
1910
1910
  {
@@ -1912,7 +1912,7 @@ const yr = ({
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(na, { size: 20, weight: "bold", "aria-hidden": !0 })
1915
+ children: /* @__PURE__ */ s(aa, { size: 20, weight: "bold", "aria-hidden": !0 })
1916
1916
  }
1917
1917
  ),
1918
1918
  /* @__PURE__ */ s(
@@ -1922,10 +1922,10 @@ const yr = ({
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(ds, { size: 20, weight: "bold", "aria-hidden": !0 })
1925
+ children: /* @__PURE__ */ s(us, { size: 20, weight: "bold", "aria-hidden": !0 })
1926
1926
  }
1927
1927
  )
1928
- ] }), Ts = ({
1928
+ ] }), As = ({
1929
1929
  url: e,
1930
1930
  filename: t,
1931
1931
  variant: n = "pill",
@@ -1936,13 +1936,13 @@ const yr = ({
1936
1936
  }) => {
1937
1937
  const [o, d] = U(!1), m = q(
1938
1938
  (c) => {
1939
- c.stopPropagation(), !o && (d(!0), Is(e, t).catch(() => {
1939
+ c.stopPropagation(), !o && (d(!0), Ts(e, t).catch(() => {
1940
1940
  }).finally(() => {
1941
1941
  d(!1), l == null || l();
1942
1942
  }));
1943
1943
  },
1944
1944
  [o, e, t, l]
1945
- ), h = r ?? n !== "pill", f = { className: k(
1945
+ ), h = r ?? n !== "pill", g = { className: k(
1946
1946
  n === "pill" ? "size-4" : "size-5",
1947
1947
  "shrink-0"
1948
1948
  ), weight: "bold" };
@@ -1986,7 +1986,7 @@ const yr = ({
1986
1986
  className: "mes-media-viewer__action",
1987
1987
  children: o ? /* @__PURE__ */ s(xe, { size: 20, weight: "bold", "aria-hidden": !0 }) : /* @__PURE__ */ s(Se, { size: 20, weight: "bold", "aria-hidden": !0 })
1988
1988
  }
1989
- ) : /* @__PURE__ */ g(
1989
+ ) : /* @__PURE__ */ f(
1990
1990
  "button",
1991
1991
  {
1992
1992
  type: "button",
@@ -2005,7 +2005,7 @@ const yr = ({
2005
2005
  weight: "bold",
2006
2006
  "aria-hidden": !0
2007
2007
  }
2008
- ) : /* @__PURE__ */ s(Se, { ...f, "aria-hidden": !0 }),
2008
+ ) : /* @__PURE__ */ s(Se, { ...g, "aria-hidden": !0 }),
2009
2009
  h ? null : a
2010
2010
  ]
2011
2011
  }
@@ -2046,7 +2046,7 @@ const yr = ({
2046
2046
  }) => {
2047
2047
  const o = H(null), d = H(null);
2048
2048
  return Y(() => {
2049
- var f;
2049
+ var g;
2050
2050
  const u = o.current;
2051
2051
  if (u) {
2052
2052
  if (e) {
@@ -2060,7 +2060,7 @@ const yr = ({
2060
2060
  else
2061
2061
  u.setAttribute("open", "");
2062
2062
  const c = typeof document < "u" ? document.activeElement : null;
2063
- return (f = d.current) == null || f.focus(), () => {
2063
+ return (g = d.current) == null || g.focus(), () => {
2064
2064
  if (u.open)
2065
2065
  if (typeof u.close == "function")
2066
2066
  try {
@@ -2090,7 +2090,7 @@ const yr = ({
2090
2090
  // `jsx-a11y` rules below don't model `<dialog>` as interactive, so
2091
2091
  // we silence them locally with the rationale captured here.
2092
2092
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
2093
- /* @__PURE__ */ g(
2093
+ /* @__PURE__ */ f(
2094
2094
  "dialog",
2095
2095
  {
2096
2096
  ref: o,
@@ -2104,9 +2104,9 @@ const yr = ({
2104
2104
  u.target === o.current && t();
2105
2105
  },
2106
2106
  children: [
2107
- /* @__PURE__ */ g("div", { className: "mes-media-viewer__chrome", children: [
2107
+ /* @__PURE__ */ f("div", { className: "mes-media-viewer__chrome", children: [
2108
2108
  a ? /* @__PURE__ */ s("span", { className: "mes-media-viewer__counter", children: a }) : null,
2109
- /* @__PURE__ */ g("div", { className: "mes-media-viewer__actions", children: [
2109
+ /* @__PURE__ */ f("div", { className: "mes-media-viewer__actions", children: [
2110
2110
  r,
2111
2111
  /* @__PURE__ */ s(
2112
2112
  "button",
@@ -2125,7 +2125,7 @@ const yr = ({
2125
2125
  ]
2126
2126
  }
2127
2127
  );
2128
- }, As = ({
2128
+ }, Rs = ({
2129
2129
  open: e,
2130
2130
  items: t,
2131
2131
  initialIndex: n = 0,
@@ -2139,7 +2139,7 @@ const yr = ({
2139
2139
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "image"),
2140
2140
  [o]
2141
2141
  );
2142
- return o ? /* @__PURE__ */ g(
2142
+ return o ? /* @__PURE__ */ f(
2143
2143
  vt,
2144
2144
  {
2145
2145
  open: e,
@@ -2147,7 +2147,7 @@ const yr = ({
2147
2147
  ariaLabel: d,
2148
2148
  counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
2149
2149
  actions: /* @__PURE__ */ s(
2150
- Ts,
2150
+ As,
2151
2151
  {
2152
2152
  url: o.src,
2153
2153
  filename: d,
@@ -2181,7 +2181,7 @@ const yr = ({
2181
2181
  ]
2182
2182
  }
2183
2183
  ) : null;
2184
- }, Ir = "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", Tr = {
2184
+ }, Tr = "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", Ar = {
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 yr = ({
2191
2191
  "rounded-bl-[18px]",
2192
2192
  "rounded-br-[18px]"
2193
2193
  ]
2194
- }, Ar = "--mes-single-width-cap", Rr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Lr = 436, Rs = ({
2194
+ }, Rr = "--mes-single-width-cap", Lr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Mr = 436, Ls = ({
2195
2195
  tiles: e,
2196
2196
  onTileActivate: t,
2197
2197
  maxVisible: n = 4,
@@ -2200,14 +2200,14 @@ const yr = ({
2200
2200
  }) => {
2201
2201
  const i = e.length;
2202
2202
  if (i === 0) return null;
2203
- const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (h, u, f) => {
2204
- var x;
2203
+ const l = e.slice(0, Math.min(i, n)), o = i - l.length, d = (h, u, g) => {
2204
+ var b;
2205
2205
  const c = k(
2206
- Ir,
2206
+ Tr,
2207
2207
  "h-full w-full",
2208
- (x = Tr[l.length]) == null ? void 0 : x[u]
2208
+ (b = Ar[l.length]) == null ? void 0 : b[u]
2209
2209
  );
2210
- return t ? /* @__PURE__ */ g(
2210
+ return t ? /* @__PURE__ */ f(
2211
2211
  "button",
2212
2212
  {
2213
2213
  type: "button",
@@ -2216,13 +2216,13 @@ const yr = ({
2216
2216
  className: k(c, "cursor-zoom-in"),
2217
2217
  children: [
2218
2218
  h.content,
2219
- f
2219
+ g
2220
2220
  ]
2221
2221
  },
2222
2222
  u
2223
- ) : /* @__PURE__ */ g("div", { className: c, children: [
2223
+ ) : /* @__PURE__ */ f("div", { className: c, children: [
2224
2224
  h.content,
2225
- f
2225
+ g
2226
2226
  ] }, u);
2227
2227
  };
2228
2228
  let m;
@@ -2230,14 +2230,14 @@ const yr = ({
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(${Ar}), ${Math.round(Lr * a * 100) / 100}px)`,
2233
+ width: `min(var(${Rr}), ${Math.round(Mr * 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: k(
2240
- a ? Rr : "aspect-square w-full",
2240
+ a ? Lr : "aspect-square w-full",
2241
2241
  r
2242
2242
  ),
2243
2243
  style: m,
@@ -2252,7 +2252,7 @@ const yr = ({
2252
2252
  ),
2253
2253
  children: l.map((h, u) => d(h, u))
2254
2254
  }
2255
- ) : l.length === 3 ? /* @__PURE__ */ g(
2255
+ ) : l.length === 3 ? /* @__PURE__ */ f(
2256
2256
  "div",
2257
2257
  {
2258
2258
  className: k(
@@ -2280,11 +2280,11 @@ const yr = ({
2280
2280
  r
2281
2281
  ),
2282
2282
  children: l.map((h, u) => {
2283
- const f = o > 0 && u === l.length - 1;
2283
+ const g = o > 0 && u === l.length - 1;
2284
2284
  return d(
2285
2285
  h,
2286
2286
  u,
2287
- f ? /* @__PURE__ */ g("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2287
+ g ? /* @__PURE__ */ f("div", { className: "absolute inset-0 flex items-center justify-center bg-black/55 text-2xl font-semibold text-white", children: [
2288
2288
  "+",
2289
2289
  o
2290
2290
  ] }) : null
@@ -2300,7 +2300,7 @@ const yr = ({
2300
2300
  [e]
2301
2301
  ), l = q(() => n(!1), []);
2302
2302
  return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: l };
2303
- }, Mr = ({
2303
+ }, Dr = ({
2304
2304
  item: e,
2305
2305
  index: t,
2306
2306
  totalCount: n,
@@ -2328,19 +2328,19 @@ const yr = ({
2328
2328
  }
2329
2329
  )
2330
2330
  )
2331
- }), Dr = ({
2331
+ }), Or = ({
2332
2332
  src: e,
2333
2333
  alt: t,
2334
2334
  items: n
2335
- }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ls = (e, t) => e.map((n, a) => ({
2335
+ }) => n && n.length > 0 ? n : e ? [{ src: e, alt: t }] : [], Ms = (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
- })), Or = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2339
+ })), Pr = ({ src: e, alt: t, filename: n, loading: a = "lazy", onClick: r, onDismiss: i }) => {
2340
2340
  const { viewerOpen: l, viewerIndex: o, handleActivate: d, closeViewer: m } = Me(
2341
2341
  r
2342
2342
  );
2343
- return /* @__PURE__ */ g("div", { className: "relative w-fit", children: [
2343
+ return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
2344
2344
  /* @__PURE__ */ s(
2345
2345
  "button",
2346
2346
  {
@@ -2363,16 +2363,16 @@ const yr = ({
2363
2363
  ),
2364
2364
  i ? /* @__PURE__ */ s("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ s(Re, { onClick: i }) }) : null,
2365
2365
  /* @__PURE__ */ s(
2366
- As,
2366
+ Rs,
2367
2367
  {
2368
2368
  open: l,
2369
- items: Ls([{ src: e, alt: t }], n),
2369
+ items: Ms([{ src: e, alt: t }], n),
2370
2370
  initialIndex: o,
2371
2371
  onClose: m
2372
2372
  }
2373
2373
  )
2374
2374
  ] });
2375
- }, Pr = 326 / 246, zr = (e) => {
2375
+ }, zr = 326 / 246, Fr = (e) => {
2376
2376
  const t = e == null ? void 0 : e.src, [n, a] = z.useState(), r = z.useCallback(
2377
2377
  (d) => {
2378
2378
  if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
@@ -2387,11 +2387,11 @@ const yr = ({
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 ?? Pr,
2390
+ ratio: l ?? o ?? zr,
2391
2391
  imgRef: r,
2392
2392
  onLoad: i
2393
2393
  };
2394
- }, Ms = ({
2394
+ }, Ds = ({
2395
2395
  state: e,
2396
2396
  src: t,
2397
2397
  alt: n,
@@ -2402,14 +2402,14 @@ const yr = ({
2402
2402
  loading: o = "lazy",
2403
2403
  onClick: d
2404
2404
  }) => {
2405
- const m = Dr({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: x } = Me(
2405
+ const m = Or({ src: t, alt: n, items: r }), h = Le(e), { viewerOpen: u, viewerIndex: g, handleActivate: c, closeViewer: b } = Me(
2406
2406
  d
2407
- ), w = m.length === 1, p = zr(w ? m[0] : void 0);
2407
+ ), w = m.length === 1, p = Fr(w ? m[0] : void 0);
2408
2408
  if (m.length === 0)
2409
2409
  return null;
2410
- const v = m.map(
2411
- (b, N) => Mr({
2412
- item: b,
2410
+ const x = m.map(
2411
+ (v, N) => Dr({
2412
+ item: v,
2413
2413
  index: N,
2414
2414
  totalCount: m.length,
2415
2415
  fallbackLoading: o,
@@ -2417,7 +2417,7 @@ const yr = ({
2417
2417
  onLoad: w ? p.onLoad : void 0
2418
2418
  })
2419
2419
  );
2420
- return /* @__PURE__ */ g(
2420
+ return /* @__PURE__ */ f(
2421
2421
  Ae,
2422
2422
  {
2423
2423
  variant: h,
@@ -2430,30 +2430,30 @@ const yr = ({
2430
2430
  "data-testid": "image-attachment",
2431
2431
  children: [
2432
2432
  /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(
2433
- Rs,
2433
+ Ls,
2434
2434
  {
2435
- tiles: v,
2435
+ tiles: x,
2436
2436
  onTileActivate: c,
2437
2437
  singleAspectRatio: w ? p.ratio : void 0
2438
2438
  }
2439
2439
  ) }),
2440
2440
  /* @__PURE__ */ s(
2441
- As,
2441
+ Rs,
2442
2442
  {
2443
2443
  open: u,
2444
- items: Ls(m, a),
2445
- initialIndex: f,
2446
- onClose: x
2444
+ items: Ms(m, a),
2445
+ initialIndex: g,
2446
+ onClose: b
2447
2447
  }
2448
2448
  )
2449
2449
  ]
2450
2450
  }
2451
2451
  );
2452
- }, Fr = (e) => /* @__PURE__ */ s(Or, { ...e }), Br = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "sent" }), $r = (e) => /* @__PURE__ */ s(Ms, { ...e, state: "received" }), Ur = {
2453
- Composer: Fr,
2454
- Sent: Br,
2455
- Received: $r
2456
- }, jr = ({
2452
+ }, Br = (e) => /* @__PURE__ */ s(Pr, { ...e }), $r = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "sent" }), Ur = (e) => /* @__PURE__ */ s(Ds, { ...e, state: "received" }), jr = {
2453
+ Composer: Br,
2454
+ Sent: $r,
2455
+ Received: Ur
2456
+ }, Vr = ({
2457
2457
  open: e,
2458
2458
  items: t,
2459
2459
  initialIndex: n = 0,
@@ -2467,10 +2467,10 @@ const yr = ({
2467
2467
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "document"),
2468
2468
  [o]
2469
2469
  ), m = ae(
2470
- () => o ? Vr(o.src) : void 0,
2470
+ () => o ? Hr(o.src) : void 0,
2471
2471
  [o]
2472
2472
  );
2473
- return !o || !m ? null : /* @__PURE__ */ g(
2473
+ return !o || !m ? null : /* @__PURE__ */ f(
2474
2474
  vt,
2475
2475
  {
2476
2476
  open: e,
@@ -2501,16 +2501,16 @@ const yr = ({
2501
2501
  ]
2502
2502
  }
2503
2503
  );
2504
- }, Vr = (e) => {
2504
+ }, Hr = (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
- }, Hr = ({
2507
+ }, Gr = ({
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 }] : [], Gr = ({
2513
+ }) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: n, title: a }] : [], Yr = ({
2514
2514
  variant: e,
2515
2515
  item: t,
2516
2516
  index: n,
@@ -2519,7 +2519,7 @@ const yr = ({
2519
2519
  }) => {
2520
2520
  const i = t.filename ?? re(t.src);
2521
2521
  return /* @__PURE__ */ s(
2522
- Es,
2522
+ Is,
2523
2523
  {
2524
2524
  variant: e,
2525
2525
  filename: i,
@@ -2543,16 +2543,16 @@ const yr = ({
2543
2543
  onClick: d,
2544
2544
  onDismiss: m
2545
2545
  }) => {
2546
- const h = Le(e), u = Hr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
2546
+ const h = Le(e), u = Gr({ src: t, filename: n, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: w } = Me(
2547
2547
  d
2548
2548
  ), p = e === "composer" && !!m;
2549
2549
  if (u.length === 0)
2550
2550
  return null;
2551
- const v = u.map((b) => ({
2552
- src: b.src,
2553
- filename: b.filename ?? re(b.src)
2551
+ const x = u.map((v) => ({
2552
+ src: v.src,
2553
+ filename: v.filename ?? re(v.src)
2554
2554
  }));
2555
- return /* @__PURE__ */ g(
2555
+ return /* @__PURE__ */ f(
2556
2556
  Ae,
2557
2557
  {
2558
2558
  variant: h,
@@ -2560,11 +2560,11 @@ const yr = ({
2560
2560
  groupPosition: o,
2561
2561
  "data-testid": "pdf-attachment",
2562
2562
  children: [
2563
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((b, N) => {
2564
- const _ = b.filename ?? re(b.src), A = p && N === 0 ? /* @__PURE__ */ s(Re, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2565
- Ts,
2563
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: u.map((v, N) => {
2564
+ const _ = v.filename ?? re(v.src), A = p && N === 0 ? /* @__PURE__ */ s(Re, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ s(
2565
+ As,
2566
2566
  {
2567
- url: b.src,
2567
+ url: v.src,
2568
2568
  filename: _,
2569
2569
  variant: "inline",
2570
2570
  label: `Download ${_}`,
@@ -2572,22 +2572,22 @@ const yr = ({
2572
2572
  }
2573
2573
  );
2574
2574
  return /* @__PURE__ */ s(
2575
- Gr,
2575
+ Yr,
2576
2576
  {
2577
2577
  variant: h,
2578
- item: b,
2578
+ item: v,
2579
2579
  index: N,
2580
- onActivate: x,
2580
+ onActivate: b,
2581
2581
  trailingAction: A
2582
2582
  },
2583
- `${b.src}-${N}`
2583
+ `${v.src}-${N}`
2584
2584
  );
2585
2585
  }) }),
2586
2586
  /* @__PURE__ */ s(
2587
- jr,
2587
+ Vr,
2588
2588
  {
2589
- open: f,
2590
- items: v,
2589
+ open: g,
2590
+ items: x,
2591
2591
  initialIndex: c,
2592
2592
  onClose: w
2593
2593
  }
@@ -2595,11 +2595,11 @@ const yr = ({
2595
2595
  ]
2596
2596
  }
2597
2597
  );
2598
- }, Yr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), Wr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), qr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Xr = {
2599
- Composer: Yr,
2600
- Sent: Wr,
2601
- Received: qr
2602
- }, Ds = ({
2598
+ }, Wr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "composer" }), qr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ s(xt, { ...e, state: "received" }), Kr = {
2599
+ Composer: Wr,
2600
+ Sent: qr,
2601
+ Received: Xr
2602
+ }, Os = ({
2603
2603
  open: e,
2604
2604
  items: t,
2605
2605
  initialIndex: n = 0,
@@ -2613,7 +2613,7 @@ const yr = ({
2613
2613
  () => (o == null ? void 0 : o.filename) ?? (o ? re(o.src) : "video"),
2614
2614
  [o]
2615
2615
  );
2616
- return o ? /* @__PURE__ */ g(
2616
+ return o ? /* @__PURE__ */ f(
2617
2617
  vt,
2618
2618
  {
2619
2619
  open: e,
@@ -2649,10 +2649,10 @@ const yr = ({
2649
2649
  ]
2650
2650
  }
2651
2651
  ) : null;
2652
- }, Kr = () => /* @__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(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Os = ({
2652
+ }, Zr = () => /* @__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(at, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Ps = ({
2653
2653
  item: e,
2654
2654
  index: t
2655
- }) => /* @__PURE__ */ g("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2655
+ }) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
2656
2656
  e.poster ? /* @__PURE__ */ s(
2657
2657
  "img",
2658
2658
  {
@@ -2664,34 +2664,34 @@ const yr = ({
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
- ms,
2667
+ hs,
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(Kr, {})
2675
- ] }), Zr = (e, t, n) => ({
2674
+ /* @__PURE__ */ s(Zr, {})
2675
+ ] }), Jr = (e, t, n) => ({
2676
2676
  ariaLabel: `Play video ${t + 1} of ${n}`,
2677
- content: /* @__PURE__ */ s(Os, { item: e, index: t })
2678
- }), Jr = ({
2677
+ content: /* @__PURE__ */ s(Ps, { item: e, index: t })
2678
+ }), Qr = ({
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 }] : [], Ps = (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 }] : [], zs = (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
- })), Qr = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2690
+ })), ei = ({ src: e, poster: t, mimeType: n, filename: a, preload: r, onClick: i, onDismiss: l }) => {
2691
2691
  const { viewerOpen: o, viewerIndex: d, handleActivate: m, closeViewer: h } = Me(
2692
2692
  i
2693
2693
  );
2694
- return /* @__PURE__ */ g("div", { className: "relative w-fit", children: [
2694
+ return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
2695
2695
  /* @__PURE__ */ s(
2696
2696
  "button",
2697
2697
  {
@@ -2699,15 +2699,15 @@ const yr = ({
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(Os, { item: { src: e, poster: t, mimeType: n }, index: 0 })
2702
+ children: /* @__PURE__ */ s(Ps, { 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(Re, { onClick: l }) }) : null,
2706
2706
  /* @__PURE__ */ s(
2707
- Ds,
2707
+ Os,
2708
2708
  {
2709
2709
  open: o,
2710
- items: Ps(
2710
+ items: zs(
2711
2711
  [{ src: e, poster: t, mimeType: n, preload: r }],
2712
2712
  a
2713
2713
  ),
@@ -2716,7 +2716,7 @@ const yr = ({
2716
2716
  }
2717
2717
  )
2718
2718
  ] });
2719
- }, zs = ({
2719
+ }, Fs = ({
2720
2720
  state: e,
2721
2721
  src: t,
2722
2722
  poster: n,
@@ -2728,15 +2728,15 @@ const yr = ({
2728
2728
  preload: d,
2729
2729
  onClick: m
2730
2730
  }) => {
2731
- const h = Jr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: f, viewerIndex: c, handleActivate: x, closeViewer: w } = Me(
2731
+ const h = Qr({ src: t, poster: n, mimeType: a, preload: d, items: i }), u = Le(e), { viewerOpen: g, viewerIndex: c, handleActivate: b, closeViewer: w } = Me(
2732
2732
  m
2733
2733
  );
2734
2734
  if (h.length === 0)
2735
2735
  return null;
2736
2736
  const p = h.map(
2737
- (v, b) => Zr(v, b, h.length)
2737
+ (x, v) => Jr(x, v, h.length)
2738
2738
  );
2739
- return /* @__PURE__ */ g(
2739
+ return /* @__PURE__ */ f(
2740
2740
  Ae,
2741
2741
  {
2742
2742
  variant: u,
@@ -2744,12 +2744,12 @@ const yr = ({
2744
2744
  groupPosition: o,
2745
2745
  "data-testid": "video-attachment",
2746
2746
  children: [
2747
- /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Rs, { tiles: p, onTileActivate: x }) }),
2747
+ /* @__PURE__ */ s("div", { className: "relative", children: /* @__PURE__ */ s(Ls, { tiles: p, onTileActivate: b }) }),
2748
2748
  /* @__PURE__ */ s(
2749
- Ds,
2749
+ Os,
2750
2750
  {
2751
- open: f,
2752
- items: Ps(h, r),
2751
+ open: g,
2752
+ items: zs(h, r),
2753
2753
  initialIndex: c,
2754
2754
  onClose: w
2755
2755
  }
@@ -2757,27 +2757,27 @@ const yr = ({
2757
2757
  ]
2758
2758
  }
2759
2759
  );
2760
- }, ei = (e) => /* @__PURE__ */ s(Qr, { ...e }), ti = (e) => /* @__PURE__ */ s(zs, { ...e, state: "sent" }), si = (e) => /* @__PURE__ */ s(zs, { ...e, state: "received" }), ni = {
2761
- Composer: ei,
2762
- Sent: ti,
2763
- Received: si
2760
+ }, ti = (e) => /* @__PURE__ */ s(ei, { ...e }), si = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ s(Fs, { ...e, state: "received" }), ai = {
2761
+ Composer: ti,
2762
+ Sent: si,
2763
+ Received: ni
2764
2764
  }, ke = {
2765
- Image: Ur,
2766
- Video: ni,
2767
- Audio: fr,
2768
- Pdf: Xr,
2769
- File: Er
2770
- }, Fs = Ve(void 0), ai = (e) => {
2765
+ Image: jr,
2766
+ Video: ai,
2767
+ Audio: gr,
2768
+ Pdf: Kr,
2769
+ File: Ir
2770
+ }, Bs = Ve(void 0), ri = (e) => {
2771
2771
  var n;
2772
2772
  const t = (n = e.metadata) == null ? void 0 : n.broadcast_id;
2773
2773
  return typeof t == "string" ? t : void 0;
2774
- }, ri = (e, t) => {
2774
+ }, ii = (e, t) => {
2775
2775
  if (!t || !(e != null && e.length))
2776
2776
  return;
2777
2777
  const n = /* @__PURE__ */ new Set();
2778
2778
  let a;
2779
2779
  for (const r of e) {
2780
- const i = ai(r);
2780
+ const i = ri(r);
2781
2781
  if (!i || n.has(i))
2782
2782
  continue;
2783
2783
  n.add(i);
@@ -2785,31 +2785,31 @@ const yr = ({
2785
2785
  l && (a ?? (a = {}), a[i] = l);
2786
2786
  }
2787
2787
  return a;
2788
- }, ii = (e, t) => {
2788
+ }, oi = (e, t) => {
2789
2789
  if (e === t)
2790
2790
  return !0;
2791
2791
  if (!e || !t)
2792
2792
  return !1;
2793
2793
  const n = Object.keys(e), a = Object.keys(t);
2794
2794
  return n.length !== a.length ? !1 : n.every((r) => e[r] === t[r]);
2795
- }, oi = (e, t) => {
2796
- const n = ri(e, t), [a, r] = U(n);
2797
- return ii(a, n) ? a : (r(n), n);
2798
- }, li = {
2799
- isUnlocking: () => !1
2795
+ }, li = (e, t) => {
2796
+ const n = ii(e, t), [a, r] = U(n);
2797
+ return oi(a, n) ? a : (r(n), n);
2800
2798
  }, ci = {
2801
- LockedAttachment: li
2802
- }, Bs = Ve({}), rl = Bs.Provider;
2803
- function di(e) {
2804
- return _e(Bs)[e] ?? ci[e];
2799
+ isUnlocking: () => !1
2800
+ }, di = {
2801
+ LockedAttachment: ci
2802
+ }, $s = Ve({}), ol = $s.Provider;
2803
+ function ui(e) {
2804
+ return _e($s)[e] ?? di[e];
2805
2805
  }
2806
- const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import("./Card-B4qcC_0B.js")), hi = () => /* @__PURE__ */ s(
2806
+ const mi = z.lazy(() => import("./Card-qS17qnN0.js")), hi = z.lazy(() => import("./Card-D4PPD5qa.js")), fi = () => /* @__PURE__ */ s(
2807
2807
  "div",
2808
2808
  {
2809
2809
  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)]",
2810
2810
  "aria-hidden": !0
2811
2811
  }
2812
- ), Fe = (e) => /* @__PURE__ */ s(sn, { fallback: /* @__PURE__ */ s(hi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(ui, { ...e }) : /* @__PURE__ */ s(mi, { ...e }) }), fi = ({ size: e = 15 }) => /* @__PURE__ */ s(
2812
+ ), Fe = (e) => /* @__PURE__ */ s(nn, { fallback: /* @__PURE__ */ s(fi, {}), children: e.contentType === "text" ? /* @__PURE__ */ s(mi, { ...e }) : /* @__PURE__ */ s(hi, { ...e }) }), gi = ({ size: e = 15 }) => /* @__PURE__ */ s(
2813
2813
  "svg",
2814
2814
  {
2815
2815
  width: e,
@@ -2826,10 +2826,10 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2826
2826
  }
2827
2827
  )
2828
2828
  }
2829
- ), gi = (e) => {
2829
+ ), pi = (e) => {
2830
2830
  var t;
2831
2831
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.TIP;
2832
- }, $s = (e) => {
2832
+ }, Us = (e) => {
2833
2833
  var t;
2834
2834
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.PAID;
2835
2835
  }, $e = (e) => {
@@ -2838,15 +2838,15 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2838
2838
  }, wt = (e) => {
2839
2839
  var t;
2840
2840
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === ce.ATTACHMENT;
2841
- }, pi = (e) => {
2841
+ }, bi = (e) => {
2842
2842
  var t;
2843
2843
  return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2844
- }, bi = (e) => {
2844
+ }, vi = (e) => {
2845
2845
  var t;
2846
2846
  return wt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2847
- }, Us = (e) => gi(e) || $s(e), vi = (e) => {
2847
+ }, js = (e) => pi(e) || Us(e), xi = (e) => {
2848
2848
  var t;
2849
- return Us(e) && !((t = e.text) != null && t.trim());
2849
+ return js(e) && !((t = e.text) != null && t.trim());
2850
2850
  }, Ze = ({
2851
2851
  message: e,
2852
2852
  standalone: t = !1,
@@ -2854,15 +2854,15 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2854
2854
  hasAttachment: a = !1
2855
2855
  }) => {
2856
2856
  var u;
2857
- const r = Us(e), i = $e(e);
2857
+ const r = js(e), i = $e(e);
2858
2858
  if (!r && !i)
2859
2859
  return null;
2860
2860
  if (r) {
2861
- const f = (u = e.metadata) == null ? void 0 : u.amount_text;
2862
- if (!f) return null;
2863
- const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", x = $s(e) ? "message" : "tip", w = t ? `${f} ${x}` : `Delivered with ${f} ${x}`;
2864
- return /* @__PURE__ */ g("div", { className: c, children: [
2865
- /* @__PURE__ */ s(aa, { size: t ? 14 : 12 }),
2861
+ const g = (u = e.metadata) == null ? void 0 : u.amount_text;
2862
+ if (!g) return null;
2863
+ const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", b = Us(e) ? "message" : "tip", w = t ? `${g} ${b}` : `Delivered with ${g} ${b}`;
2864
+ return /* @__PURE__ */ f("div", { className: c, children: [
2865
+ /* @__PURE__ */ s(ra, { size: t ? 14 : 12 }),
2866
2866
  /* @__PURE__ */ s("span", { children: w })
2867
2867
  ] });
2868
2868
  }
@@ -2870,19 +2870,19 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2870
2870
  "message-chatbot-indicator",
2871
2871
  n ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
2872
2872
  l ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
2873
- ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), h = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(fi, { size: l ? 12 : 15 }) });
2874
- return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ g(J, { children: [
2873
+ ].join(" "), m = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__label", children: o }), h = /* @__PURE__ */ s("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ s(gi, { size: l ? 12 : 15 }) });
2874
+ return /* @__PURE__ */ s("div", { className: d, "data-testid": "message-chatbot-indicator", children: n && !l ? /* @__PURE__ */ f(J, { children: [
2875
2875
  m,
2876
2876
  h
2877
- ] }) : /* @__PURE__ */ g(J, { children: [
2877
+ ] }) : /* @__PURE__ */ f(J, { children: [
2878
2878
  h,
2879
2879
  m
2880
2880
  ] }) });
2881
- }, xi = ({
2881
+ }, wi = ({
2882
2882
  selected: e,
2883
2883
  onVoteUp: t,
2884
2884
  onVoteDown: n
2885
- }) => /* @__PURE__ */ g("div", { className: "message-vote-buttons", children: [
2885
+ }) => /* @__PURE__ */ f("div", { className: "message-vote-buttons", children: [
2886
2886
  /* @__PURE__ */ s(
2887
2887
  "button",
2888
2888
  {
@@ -2894,7 +2894,7 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2894
2894
  "aria-label": "Good response",
2895
2895
  "aria-pressed": e === "up",
2896
2896
  "data-tooltip": "Good response",
2897
- children: /* @__PURE__ */ s(ra, { size: 16, weight: e === "up" ? "fill" : "regular" })
2897
+ children: /* @__PURE__ */ s(ia, { size: 16, weight: e === "up" ? "fill" : "regular" })
2898
2898
  }
2899
2899
  ),
2900
2900
  /* @__PURE__ */ s(
@@ -2908,7 +2908,7 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2908
2908
  "aria-label": "Bad response",
2909
2909
  "aria-pressed": e === "down",
2910
2910
  "data-tooltip": "Bad response",
2911
- children: /* @__PURE__ */ s(ia, { size: 16, weight: e === "down" ? "fill" : "regular" })
2911
+ children: /* @__PURE__ */ s(oa, { size: 16, weight: e === "down" ? "fill" : "regular" })
2912
2912
  }
2913
2913
  )
2914
2914
  ] }), _t = () => {
@@ -2921,10 +2921,10 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2921
2921
  }
2922
2922
  })();
2923
2923
  return e.id === n;
2924
- }, Je = () => _t() ? /* @__PURE__ */ g(J, { children: [
2925
- /* @__PURE__ */ s(ca, { weight: "bold", "aria-hidden": "true" }),
2924
+ }, Je = () => _t() ? /* @__PURE__ */ f(J, { children: [
2925
+ /* @__PURE__ */ s(da, { weight: "bold", "aria-hidden": "true" }),
2926
2926
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
2927
- ] }) : null, wi = () => _t() ? /* @__PURE__ */ g(J, { children: [
2927
+ ] }) : null, _i = () => _t() ? /* @__PURE__ */ f(J, { children: [
2928
2928
  /* @__PURE__ */ s(
2929
2929
  xe,
2930
2930
  {
@@ -2934,14 +2934,14 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2934
2934
  }
2935
2935
  ),
2936
2936
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
2937
- ] }) : null, _i = ({
2937
+ ] }) : null, yi = ({
2938
2938
  broadcastId: e,
2939
2939
  broadcastName: t,
2940
2940
  resolvedBroadcastName: n,
2941
2941
  onBroadcastClick: a
2942
2942
  }) => {
2943
- const r = n || t, i = r || "Broadcast", l = /* @__PURE__ */ g(J, { children: [
2944
- /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(la, { weight: "fill" }) }),
2943
+ const r = n || t, i = r || "Broadcast", l = /* @__PURE__ */ f(J, { children: [
2944
+ /* @__PURE__ */ s("span", { className: "sent-message-broadcast-badge", "aria-hidden": "true", children: /* @__PURE__ */ s(ca, { weight: "fill" }) }),
2945
2945
  /* @__PURE__ */ s(
2946
2946
  "span",
2947
2947
  {
@@ -2964,25 +2964,25 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2964
2964
  children: l
2965
2965
  }
2966
2966
  ) : l;
2967
- }, yi = () => /* @__PURE__ */ g("span", { className: "str-chat__message-status sent-message-status--failed", children: [
2968
- /* @__PURE__ */ s(oa, { weight: "bold", "aria-hidden": "true" }),
2967
+ }, Ni = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
2968
+ /* @__PURE__ */ s(la, { weight: "bold", "aria-hidden": "true" }),
2969
2969
  /* @__PURE__ */ s("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
2970
- ] }), Ni = ({
2970
+ ] }), ki = ({
2971
2971
  onBroadcastClick: e,
2972
2972
  resolvedBroadcastName: t
2973
2973
  }) => {
2974
- var u, f;
2974
+ var u, g;
2975
2975
  const { isMyMessage: n, message: a, threadList: r } = ge(
2976
2976
  "SentMessageDeliveryStatus"
2977
2977
  ), i = n(), l = _t();
2978
2978
  if (r)
2979
2979
  return null;
2980
2980
  if (a.status === "failed" && i && a.type !== "error")
2981
- return /* @__PURE__ */ s(yi, {});
2981
+ return /* @__PURE__ */ s(Ni, {});
2982
2982
  if (!i)
2983
2983
  return null;
2984
- const o = (u = a.metadata) == null ? void 0 : u.broadcast_id, d = (f = a.metadata) == null ? void 0 : f.broadcast_name, m = a.status !== "sending" && a.status !== "failed" && o ? /* @__PURE__ */ s(
2985
- _i,
2984
+ const o = (u = a.metadata) == null ? void 0 : u.broadcast_id, d = (g = a.metadata) == null ? void 0 : g.broadcast_name, m = a.status !== "sending" && a.status !== "failed" && o ? /* @__PURE__ */ s(
2985
+ yi,
2986
2986
  {
2987
2987
  broadcastId: o,
2988
2988
  broadcastName: d,
@@ -2990,15 +2990,15 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
2990
2990
  onBroadcastClick: e
2991
2991
  }
2992
2992
  ) : null, h = /* @__PURE__ */ s(
2993
- ln,
2993
+ cn,
2994
2994
  {
2995
2995
  MessageSentStatus: Je,
2996
2996
  MessageDeliveredStatus: Je,
2997
2997
  MessageReadStatus: Je,
2998
- MessageSendingStatus: wi
2998
+ MessageSendingStatus: _i
2999
2999
  }
3000
3000
  );
3001
- return m ? /* @__PURE__ */ g("span", { className: "sent-message-status-row", children: [
3001
+ return m ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
3002
3002
  h,
3003
3003
  l && /* @__PURE__ */ s(
3004
3004
  "span",
@@ -3010,19 +3010,19 @@ const ui = z.lazy(() => import("./Card-qS17qnN0.js")), mi = z.lazy(() => import(
3010
3010
  ),
3011
3011
  m
3012
3012
  ] }) : h;
3013
- }, ki = /^([a-z][a-z0-9+.-]*):/i, Ci = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3013
+ }, Ci = /^([a-z][a-z0-9+.-]*):/i, Si = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
3014
3014
  function yt(e) {
3015
3015
  if (typeof e != "string") return;
3016
3016
  const t = e.trim();
3017
3017
  if (t === "") return;
3018
- const n = ki.exec(t);
3018
+ const n = Ci.exec(t);
3019
3019
  if (n) {
3020
3020
  const a = n[1].toLowerCase();
3021
- return Ci.has(a) ? t : void 0;
3021
+ return Si.has(a) ? t : void 0;
3022
3022
  }
3023
3023
  return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
3024
3024
  }
3025
- const Si = {
3025
+ const Ei = {
3026
3026
  dark: {
3027
3027
  primary: "bg-white text-[#121110] hover:bg-white/90",
3028
3028
  secondary: "bg-white/15 text-white hover:bg-white/25"
@@ -3031,7 +3031,7 @@ const Si = {
3031
3031
  primary: "bg-[#121110] text-white hover:bg-[#2a2928]",
3032
3032
  secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
3033
3033
  }
3034
- }, js = ({
3034
+ }, Vs = ({
3035
3035
  variant: e,
3036
3036
  cta: t,
3037
3037
  fullWidth: n = !0,
@@ -3039,42 +3039,42 @@ const Si = {
3039
3039
  }) => {
3040
3040
  const r = t.variant ?? "primary", i = k(
3041
3041
  "inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
3042
- n && "w-full",
3042
+ n ? "w-full" : "min-w-0",
3043
3043
  !a && "mt-2",
3044
- Si[e][r]
3045
- ), l = yt(t.href);
3046
- return l ? /* @__PURE__ */ s(
3044
+ Ei[e][r]
3045
+ ), l = n ? t.label : /* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: t.label }), o = yt(t.href);
3046
+ return o ? /* @__PURE__ */ s(
3047
3047
  "a",
3048
3048
  {
3049
- href: l,
3049
+ href: o,
3050
3050
  target: "_blank",
3051
3051
  rel: "noopener noreferrer",
3052
- onClick: (o) => {
3053
- var d;
3054
- o.stopPropagation(), (d = t.onClick) == null || d.call(t);
3052
+ onClick: (d) => {
3053
+ var m;
3054
+ d.stopPropagation(), (m = t.onClick) == null || m.call(t);
3055
3055
  },
3056
3056
  className: `${i} no-underline`,
3057
- children: t.label
3057
+ children: l
3058
3058
  }
3059
3059
  ) : /* @__PURE__ */ s(
3060
3060
  "button",
3061
3061
  {
3062
3062
  type: "button",
3063
- onClick: (o) => {
3064
- var d;
3065
- o.stopPropagation(), (d = t.onClick) == null || d.call(t);
3063
+ onClick: (d) => {
3064
+ var m;
3065
+ d.stopPropagation(), (m = t.onClick) == null || m.call(t);
3066
3066
  },
3067
3067
  className: i,
3068
- children: t.label
3068
+ children: l
3069
3069
  }
3070
3070
  );
3071
- }, Ei = {
3071
+ }, Ii = {
3072
3072
  dark: "text-white",
3073
3073
  light: "text-black/90"
3074
- }, Ii = "text-white/30", Qt = {
3074
+ }, Ti = "text-white/30", Qt = {
3075
3075
  dark: "text-white/55",
3076
3076
  light: "text-black/55"
3077
- }, Ti = {
3077
+ }, Ai = {
3078
3078
  dark: "bg-white/25",
3079
3079
  light: "bg-black/15"
3080
3080
  }, Nt = ({
@@ -3091,12 +3091,12 @@ const Si = {
3091
3091
  trailingAction: h,
3092
3092
  isLoading: u = !1
3093
3093
  }) => {
3094
- const f = e === "dark", c = a ?? (f ? r : void 0) ?? "", x = c.trim() !== "", w = i != null && i.trim() !== "", p = typeof o == "string" ? o.trim() : "", v = p !== "", b = m != null;
3095
- if (!u && !x && !w && !v && !b)
3094
+ const g = e === "dark", c = a ?? (g ? r : void 0) ?? "", b = c.trim() !== "", w = i != null && i.trim() !== "", p = typeof o == "string" ? o.trim() : "", x = p !== "", v = m != null;
3095
+ if (!u && !b && !w && !x && !v)
3096
3096
  return null;
3097
- const N = f && !a, _ = k(
3097
+ const N = g && !a, _ = k(
3098
3098
  "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
3099
- n == null && (N ? Ii : Ei[e])
3099
+ n == null && (N ? Ti : Ii[e])
3100
3100
  ), A = k(
3101
3101
  "truncate text-[12px] leading-4 tracking-[0.24px]",
3102
3102
  n == null && Qt[e]
@@ -3108,9 +3108,9 @@ const Si = {
3108
3108
  if (u) {
3109
3109
  const $ = k(
3110
3110
  "animate-pulse rounded",
3111
- Ti[e]
3111
+ Ai[e]
3112
3112
  );
3113
- return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
3113
+ return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
3114
3114
  /* @__PURE__ */ s("div", { className: k("h-5 w-3/4", $), "aria-hidden": !0 }),
3115
3115
  /* @__PURE__ */ s("div", { className: k("h-4 w-1/2", $), "aria-hidden": !0 })
3116
3116
  ] }) });
@@ -3122,10 +3122,10 @@ const Si = {
3122
3122
  WebkitLineClamp: l,
3123
3123
  overflow: "hidden"
3124
3124
  } : L;
3125
- return /* @__PURE__ */ g("div", { className: "shrink-0 px-4 py-3", children: [
3126
- /* @__PURE__ */ g("div", { className: "flex items-end gap-3", children: [
3127
- /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
3128
- x && /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center gap-2", children: [
3125
+ return /* @__PURE__ */ f("div", { className: "shrink-0 px-4 py-3", children: [
3126
+ /* @__PURE__ */ f("div", { className: "flex items-end gap-3", children: [
3127
+ /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
3128
+ b && /* @__PURE__ */ f("div", { className: "flex min-w-0 items-center gap-2", children: [
3129
3129
  d ? /* @__PURE__ */ s("span", { className: "shrink-0", children: d }) : null,
3130
3130
  /* @__PURE__ */ s(
3131
3131
  "p",
@@ -3137,18 +3137,18 @@ const Si = {
3137
3137
  )
3138
3138
  ] }),
3139
3139
  w && /* @__PURE__ */ s("p", { className: R, style: D, children: i }),
3140
- !b && v && /* @__PURE__ */ s("p", { className: A, style: L, children: p })
3140
+ !v && x && /* @__PURE__ */ s("p", { className: A, style: L, children: p })
3141
3141
  ] }),
3142
3142
  h && /* @__PURE__ */ s("div", { className: "shrink-0", children: h })
3143
3143
  ] }),
3144
- m && /* @__PURE__ */ s(js, { variant: t ?? e, cta: m })
3144
+ m && /* @__PURE__ */ s(Vs, { variant: t ?? e, cta: m })
3145
3145
  ] });
3146
- }, Ai = "Loading link preview", Ri = k(
3146
+ }, Ri = "Loading link preview", Li = k(
3147
3147
  "relative w-[290px] select-none overflow-hidden",
3148
3148
  // 20px corners — no token exists for it in the component-library preset,
3149
3149
  // whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
3150
3150
  "rounded-[20px]"
3151
- ), Li = "flex h-[250px] flex-col", Ee = ({
3151
+ ), Mi = "flex h-[250px] flex-col", Ee = ({
3152
3152
  variant: e,
3153
3153
  children: t,
3154
3154
  href: n,
@@ -3162,10 +3162,10 @@ const Si = {
3162
3162
  busy: h = !1,
3163
3163
  "data-testid": u
3164
3164
  }) => {
3165
- const f = n != null || a != null, c = k(
3165
+ const g = n != null || a != null, c = k(
3166
3166
  "messaging-link-card",
3167
- Ri,
3168
- m ? Li : "block",
3167
+ Li,
3168
+ m ? Mi : "block",
3169
3169
  // The plain fallback fill, kept underneath the `--accent` derivation: the
3170
3170
  // `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
3171
3171
  // this single class, so a published accent paints over it and an unset one
@@ -3186,9 +3186,9 @@ const Si = {
3186
3186
  // `focus-ring` is a design-system utility from the component-library
3187
3187
  // tailwind preset — outline-none + a black 2px focus-visible ring
3188
3188
  // with offset, so keyboard users can see the focused card.
3189
- f ? "cursor-pointer no-underline focus-ring" : null
3190
- ), x = h ? { role: "status", "aria-busy": !0, "aria-label": Ai } : void 0, w = d ? { "--accent": d } : void 0, p = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3191
- return n ? /* @__PURE__ */ g(
3189
+ g ? "cursor-pointer no-underline focus-ring" : null
3190
+ ), b = h ? { role: "status", "aria-busy": !0, "aria-label": Ri } : void 0, w = d ? { "--accent": d } : void 0, p = l ? /* @__PURE__ */ s("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: l }) : null;
3191
+ return n ? /* @__PURE__ */ f(
3192
3192
  "a",
3193
3193
  {
3194
3194
  ref: i,
@@ -3200,13 +3200,13 @@ const Si = {
3200
3200
  "data-variant": e,
3201
3201
  className: c,
3202
3202
  style: w,
3203
- ...x,
3203
+ ...b,
3204
3204
  children: [
3205
3205
  t,
3206
3206
  p
3207
3207
  ]
3208
3208
  }
3209
- ) : a ? /* @__PURE__ */ g(
3209
+ ) : a ? /* @__PURE__ */ f(
3210
3210
  "button",
3211
3211
  {
3212
3212
  ref: i,
@@ -3217,13 +3217,13 @@ const Si = {
3217
3217
  "data-variant": e,
3218
3218
  className: k(c, "text-left"),
3219
3219
  style: w,
3220
- ...x,
3220
+ ...b,
3221
3221
  children: [
3222
3222
  t,
3223
3223
  p
3224
3224
  ]
3225
3225
  }
3226
- ) : /* @__PURE__ */ g(
3226
+ ) : /* @__PURE__ */ f(
3227
3227
  "div",
3228
3228
  {
3229
3229
  ref: i,
@@ -3231,7 +3231,7 @@ const Si = {
3231
3231
  "data-variant": e,
3232
3232
  className: c,
3233
3233
  style: w,
3234
- ...x,
3234
+ ...b,
3235
3235
  children: [
3236
3236
  t,
3237
3237
  p
@@ -3241,7 +3241,7 @@ const Si = {
3241
3241
  }, es = {
3242
3242
  dark: "bg-white/10",
3243
3243
  light: "bg-black/5"
3244
- }, Mi = {
3244
+ }, Di = {
3245
3245
  dark: "size-16 text-white/25",
3246
3246
  light: "size-16 text-black/25"
3247
3247
  }, De = (e, t) => !!t && !!e && ue(e) === "audio", kt = (e, t) => {
@@ -3269,7 +3269,7 @@ const Si = {
3269
3269
  className: "block w-full",
3270
3270
  children: /* @__PURE__ */ s("track", { kind: "captions" })
3271
3271
  }
3272
- ) }) : /* @__PURE__ */ g(
3272
+ ) }) : /* @__PURE__ */ f(
3273
3273
  "div",
3274
3274
  {
3275
3275
  className: k(
@@ -3296,7 +3296,7 @@ const Si = {
3296
3296
  "aria-hidden": !0
3297
3297
  }
3298
3298
  )
3299
- ) : h ? /* @__PURE__ */ g(J, { children: [
3299
+ ) : h ? /* @__PURE__ */ f(J, { children: [
3300
3300
  /* @__PURE__ */ s(
3301
3301
  "video",
3302
3302
  {
@@ -3338,7 +3338,7 @@ const Si = {
3338
3338
  es[e]
3339
3339
  ),
3340
3340
  children: we(r, {
3341
- className: Mi[e],
3341
+ className: Di[e],
3342
3342
  weight: "regular"
3343
3343
  })
3344
3344
  }
@@ -3348,14 +3348,14 @@ const Si = {
3348
3348
  ]
3349
3349
  }
3350
3350
  );
3351
- }, Di = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3352
- function Oi(e) {
3351
+ }, Oi = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
3352
+ function Pi(e) {
3353
3353
  const t = e.trim();
3354
3354
  return t.startsWith("#") ? t : `#${t}`;
3355
3355
  }
3356
- const Pi = "#FFFFFF", Vs = "#040403", zi = {
3357
- dark: Pi,
3358
- light: Vs
3356
+ const zi = "#FFFFFF", Hs = "#040403", Fi = {
3357
+ dark: zi,
3358
+ light: Hs
3359
3359
  };
3360
3360
  function He({
3361
3361
  variant: e,
@@ -3372,17 +3372,17 @@ function He({
3372
3372
  }, [r]);
3373
3373
  const m = z.useCallback(() => {
3374
3374
  d(!0);
3375
- }, []), h = De(i, l), c = a === "featured" && !!r && !h && !o && n === "ready" && t != null && Di.test(t.trim()) ? Oi(t) : void 0, x = h ? Vs : zi[e];
3375
+ }, []), h = De(i, l), c = a === "featured" && !!r && !h && !o && n === "ready" && t != null && Oi.test(t.trim()) ? Pi(t) : void 0, b = h ? Hs : Fi[e];
3376
3376
  return {
3377
3377
  thumbnailUrl: o ? void 0 : r,
3378
3378
  accentHex: c,
3379
- chinTextColor: x,
3379
+ chinTextColor: b,
3380
3380
  surface: h ? "light" : e,
3381
3381
  isLoading: n === "loading",
3382
3382
  onImageError: m
3383
3383
  };
3384
3384
  }
3385
- const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Bi = "relative before:absolute before:-inset-[10px] before:content-['']", $i = ({
3385
+ const Bi = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", $i = "relative before:absolute before:-inset-[10px] before:content-['']", Ui = ({
3386
3386
  title: e,
3387
3387
  placeholderTitle: t,
3388
3388
  description: n,
@@ -3395,15 +3395,15 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3395
3395
  appIcon: m,
3396
3396
  cta: h,
3397
3397
  accentColor: u,
3398
- status: f = "ready",
3398
+ status: g = "ready",
3399
3399
  onDismiss: c,
3400
- onEditClick: x,
3400
+ onEditClick: b,
3401
3401
  dismissLabel: w = "Dismiss attachment"
3402
3402
  }) => {
3403
- const p = d === "classic", v = De(i, o), b = He({
3403
+ const p = d === "classic", x = De(i, o), v = He({
3404
3404
  variant: "dark",
3405
3405
  accentColor: u,
3406
- status: f,
3406
+ status: g,
3407
3407
  layout: d,
3408
3408
  thumbnailUrl: l,
3409
3409
  mimeType: i,
@@ -3415,22 +3415,22 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3415
3415
  onClick: c,
3416
3416
  "aria-label": w,
3417
3417
  className: k(
3418
- Fi,
3419
- !v && Bi
3418
+ Bi,
3419
+ !x && $i
3420
3420
  ),
3421
3421
  children: /* @__PURE__ */ s(lt, { className: "size-3", weight: "bold" })
3422
3422
  }
3423
- ) : void 0, _ = x ? /* @__PURE__ */ s(
3423
+ ) : void 0, _ = b ? /* @__PURE__ */ s(
3424
3424
  "button",
3425
3425
  {
3426
3426
  type: "button",
3427
- onClick: x,
3427
+ onClick: b,
3428
3428
  "aria-label": "Edit attachment",
3429
3429
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
3430
- children: /* @__PURE__ */ s(da, { className: "size-5", weight: "regular" })
3430
+ children: /* @__PURE__ */ s(ua, { className: "size-5", weight: "regular" })
3431
3431
  }
3432
3432
  ) : void 0;
3433
- return v && !b.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2 pr-3", children: [
3433
+ return x && !v.isLoading ? /* @__PURE__ */ s(Ee, { variant: "dark", bgClassName: Ct, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
3434
3434
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ s(
3435
3435
  Ie,
3436
3436
  {
@@ -3441,34 +3441,34 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3441
3441
  }
3442
3442
  ) }),
3443
3443
  N && /* @__PURE__ */ s("div", { className: "shrink-0", children: N })
3444
- ] }) }) : /* @__PURE__ */ g(
3444
+ ] }) }) : /* @__PURE__ */ f(
3445
3445
  Ee,
3446
3446
  {
3447
3447
  variant: "dark",
3448
3448
  fixedHeight: !p,
3449
- accentHex: b.accentHex,
3450
- busy: b.isLoading,
3449
+ accentHex: v.accentHex,
3450
+ busy: v.isLoading,
3451
3451
  topRight: p ? N : void 0,
3452
3452
  children: [
3453
3453
  !p && /* @__PURE__ */ s(
3454
3454
  Ie,
3455
3455
  {
3456
3456
  variant: "dark",
3457
- thumbnailUrl: b.thumbnailUrl,
3457
+ thumbnailUrl: v.thumbnailUrl,
3458
3458
  sourceUrl: o,
3459
3459
  title: e,
3460
3460
  mimeType: i,
3461
3461
  topRight: N,
3462
- isLoading: b.isLoading,
3463
- onImageError: b.onImageError
3462
+ isLoading: v.isLoading,
3463
+ onImageError: v.onImageError
3464
3464
  }
3465
3465
  ),
3466
3466
  /* @__PURE__ */ s(
3467
3467
  Nt,
3468
3468
  {
3469
- chinTextColor: b.chinTextColor,
3469
+ chinTextColor: v.chinTextColor,
3470
3470
  variant: "dark",
3471
- ctaSurface: b.surface,
3471
+ ctaSurface: v.surface,
3472
3472
  title: e,
3473
3473
  placeholderTitle: t,
3474
3474
  description: n,
@@ -3477,7 +3477,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3477
3477
  appIcon: m,
3478
3478
  cta: h,
3479
3479
  trailingAction: _,
3480
- isLoading: b.isLoading
3480
+ isLoading: v.isLoading
3481
3481
  }
3482
3482
  )
3483
3483
  ]
@@ -3492,7 +3492,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3492
3492
  // `isolate` keeps the tail's negative z-index from escaping behind the
3493
3493
  // thread background; `w-fit` stops the wrapper from stretching in the
3494
3494
  // composer's flex list.
3495
- /* @__PURE__ */ g("div", { className: "relative isolate w-fit", children: [
3495
+ /* @__PURE__ */ f("div", { className: "relative isolate w-fit", children: [
3496
3496
  a,
3497
3497
  /* @__PURE__ */ s(
3498
3498
  "span",
@@ -3508,7 +3508,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3508
3508
  }
3509
3509
  )
3510
3510
  ] })
3511
- ) : /* @__PURE__ */ s(J, { children: a }), Ui = ({
3511
+ ) : /* @__PURE__ */ s(J, { children: a }), ji = ({
3512
3512
  title: e,
3513
3513
  description: t,
3514
3514
  descriptionLines: n,
@@ -3521,14 +3521,14 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3521
3521
  cta: m,
3522
3522
  accentColor: h,
3523
3523
  status: u = "ready",
3524
- onClick: f,
3524
+ onClick: g,
3525
3525
  groupPosition: c = "single"
3526
3526
  }) => {
3527
- const x = kt(r, l), w = yt(a), p = m == null && w != null && !x ? w : void 0, v = m == null && !x ? f : void 0, b = u !== "loading" && De(r, l) ? Ct : void 0, N = m && f ? {
3527
+ const b = kt(r, l), w = yt(a), p = m == null && w != null && !b ? w : void 0, x = m == null && !b ? g : void 0, v = u !== "loading" && De(r, l) ? Ct : void 0, N = m && g ? {
3528
3528
  ...m,
3529
3529
  onClick: () => {
3530
3530
  var A;
3531
- f(), (A = m.onClick) == null || A.call(m);
3531
+ g(), (A = m.onClick) == null || A.call(m);
3532
3532
  }
3533
3533
  } : m, _ = He({
3534
3534
  variant: "light",
@@ -3544,18 +3544,18 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3544
3544
  {
3545
3545
  accentHex: _.accentHex,
3546
3546
  side: "receiver",
3547
- visible: b == null && (c === "single" || c === "end"),
3548
- children: /* @__PURE__ */ g(
3547
+ visible: v == null && (c === "single" || c === "end"),
3548
+ children: /* @__PURE__ */ f(
3549
3549
  Ee,
3550
3550
  {
3551
3551
  variant: "light",
3552
3552
  href: p,
3553
- onClick: v,
3553
+ onClick: x,
3554
3554
  ariaLabel: e ?? "Open attachment preview",
3555
- fixedHeight: o === "featured" && b == null,
3555
+ fixedHeight: o === "featured" && v == null,
3556
3556
  accentHex: _.accentHex,
3557
3557
  busy: _.isLoading,
3558
- bgClassName: b,
3558
+ bgClassName: v,
3559
3559
  "data-testid": "link-attachment",
3560
3560
  children: [
3561
3561
  o === "featured" && /* @__PURE__ */ s(
@@ -3590,7 +3590,7 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3590
3590
  )
3591
3591
  }
3592
3592
  );
3593
- }, ji = ({
3593
+ }, Vi = ({
3594
3594
  title: e,
3595
3595
  placeholderTitle: t,
3596
3596
  description: n,
@@ -3603,14 +3603,14 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3603
3603
  appIcon: m,
3604
3604
  cta: h,
3605
3605
  accentColor: u,
3606
- status: f = "ready",
3606
+ status: g = "ready",
3607
3607
  onClick: c,
3608
- groupPosition: x = "single"
3608
+ groupPosition: b = "single"
3609
3609
  }) => {
3610
- const w = kt(i, o), p = yt(r), v = h == null && p != null && !w ? p : void 0, b = h == null && !w && v != null ? c : void 0, N = f !== "loading" && De(i, o), _ = He({
3610
+ const w = kt(i, o), p = yt(r), x = h == null && p != null && !w ? p : void 0, v = h == null && !w && x != null ? c : void 0, N = g !== "loading" && De(i, o), _ = He({
3611
3611
  variant: "dark",
3612
3612
  accentColor: u,
3613
- status: f,
3613
+ status: g,
3614
3614
  layout: d,
3615
3615
  thumbnailUrl: l,
3616
3616
  mimeType: i,
@@ -3621,13 +3621,13 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3621
3621
  {
3622
3622
  accentHex: _.accentHex,
3623
3623
  side: "sender",
3624
- visible: !N && (x === "single" || x === "end"),
3625
- children: /* @__PURE__ */ g(
3624
+ visible: !N && (b === "single" || b === "end"),
3625
+ children: /* @__PURE__ */ f(
3626
3626
  Ee,
3627
3627
  {
3628
3628
  variant: "dark",
3629
- href: v,
3630
- onClick: b,
3629
+ href: x,
3630
+ onClick: v,
3631
3631
  fixedHeight: d === "featured" && !N,
3632
3632
  accentHex: _.accentHex,
3633
3633
  busy: _.isLoading,
@@ -3667,9 +3667,9 @@ const Fi = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
3667
3667
  }
3668
3668
  );
3669
3669
  }, ot = {
3670
- Composer: $i,
3671
- Sent: ji,
3672
- Received: Ui
3670
+ Composer: Ui,
3671
+ Sent: Vi,
3672
+ Received: ji
3673
3673
  };
3674
3674
  function M(e) {
3675
3675
  const t = e == null ? void 0 : e.trim();
@@ -3678,7 +3678,7 @@ function M(e) {
3678
3678
  function ts(e) {
3679
3679
  return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
3680
3680
  }
3681
- function Vi(e, t) {
3681
+ function Hi(e, t) {
3682
3682
  if (!(e != null && e.trim()) || !(t != null && t.trim()))
3683
3683
  return !1;
3684
3684
  const n = ts(e), a = ts(t);
@@ -3711,15 +3711,15 @@ function ss(e) {
3711
3711
  status: "ready"
3712
3712
  };
3713
3713
  }
3714
- function Hi(e) {
3714
+ function Gi(e) {
3715
3715
  var t;
3716
- 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;
3716
+ return Gs(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;
3717
3717
  }
3718
- function Hs(e) {
3718
+ function Gs(e) {
3719
3719
  const t = M(e.og_scrape_url);
3720
3720
  return e.type === "link" || !!t && !e.asset_url;
3721
3721
  }
3722
- function Gs(e) {
3722
+ function Ys(e) {
3723
3723
  if (!(e != null && e.length)) return [];
3724
3724
  const t = [], n = (r, i) => {
3725
3725
  const l = t[t.length - 1];
@@ -3737,25 +3737,25 @@ function Gs(e) {
3737
3737
  t.push({ type: "link", attachments: [r] });
3738
3738
  };
3739
3739
  for (const r of e) {
3740
- if (Hs(r)) {
3740
+ if (Gs(r)) {
3741
3741
  a(r);
3742
3742
  continue;
3743
3743
  }
3744
- const i = Hi(r);
3744
+ const i = Gi(r);
3745
3745
  i && n(i, r);
3746
3746
  }
3747
3747
  return t;
3748
3748
  }
3749
- function Gi(e) {
3749
+ function Yi(e) {
3750
3750
  return e.filter((t) => t.type === "media").length;
3751
3751
  }
3752
- function Yi(e, t, n) {
3752
+ function Wi(e, t, n) {
3753
3753
  return t <= 1 ? n : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
3754
3754
  }
3755
3755
  function ns(e) {
3756
3756
  return M(e.image_url) ?? M(e.asset_url) ?? "";
3757
3757
  }
3758
- function Wi(e) {
3758
+ function qi(e) {
3759
3759
  switch (e) {
3760
3760
  case "image":
3761
3761
  return ke.Image;
@@ -3769,7 +3769,7 @@ function Wi(e) {
3769
3769
  return ke.File;
3770
3770
  }
3771
3771
  }
3772
- function qi(e, t) {
3772
+ function Xi(e, t) {
3773
3773
  if (t.length > 1)
3774
3774
  switch (e) {
3775
3775
  case "image":
@@ -3852,73 +3852,73 @@ function qi(e, t) {
3852
3852
  };
3853
3853
  }
3854
3854
  }
3855
- function Xi({
3855
+ function Ki({
3856
3856
  groupPosition: e,
3857
3857
  isMyMessage: t,
3858
3858
  segment: n
3859
3859
  }) {
3860
- const a = Wi(n.kind), r = {
3861
- ...qi(n.kind, n.attachments),
3860
+ const a = qi(n.kind), r = {
3861
+ ...Xi(n.kind, n.attachments),
3862
3862
  groupPosition: e
3863
3863
  };
3864
3864
  return t ? /* @__PURE__ */ s(a.Sent, { ...r }) : /* @__PURE__ */ s(a.Received, { ...r });
3865
3865
  }
3866
- const Ki = ({
3866
+ const Zi = ({
3867
3867
  groupPosition: e,
3868
3868
  isMyMessage: t,
3869
3869
  message: n,
3870
3870
  renderText: a
3871
3871
  }) => {
3872
3872
  var w;
3873
- const r = Gs(n.attachments);
3873
+ const r = Ys(n.attachments);
3874
3874
  if (r.length === 0) return null;
3875
- const i = Gi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((p) => p.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, m = l && Vi(l, d) ? void 0 : l;
3875
+ const i = Yi(r), l = (w = n.text) == null ? void 0 : w.trim(), o = r.find((p) => p.type === "link"), d = (o == null ? void 0 : o.type) === "link" ? ss(o.attachments[0] ?? {}).url : void 0, m = l && Hi(l, d) ? void 0 : l;
3876
3876
  let h = 0;
3877
- const u = [], f = m ? "middle" : e, c = (p, v, b) => {
3877
+ const u = [], g = m ? "middle" : e, c = (p, x, v) => {
3878
3878
  const N = t ? ot.Sent : ot.Received;
3879
3879
  u.push(
3880
3880
  /* @__PURE__ */ s(
3881
3881
  N,
3882
3882
  {
3883
3883
  ...ss(p),
3884
- groupPosition: b ? f : "middle"
3884
+ groupPosition: v ? g : "middle"
3885
3885
  },
3886
- v
3886
+ x
3887
3887
  )
3888
3888
  );
3889
- }, x = (p, v) => {
3890
- const b = Yi(
3889
+ }, b = (p, x) => {
3890
+ const v = Wi(
3891
3891
  h,
3892
3892
  i,
3893
3893
  e
3894
3894
  );
3895
3895
  h += 1, u.push(
3896
3896
  /* @__PURE__ */ s(
3897
- Xi,
3897
+ Ki,
3898
3898
  {
3899
- groupPosition: b,
3899
+ groupPosition: v,
3900
3900
  isMyMessage: t,
3901
3901
  segment: p
3902
3902
  },
3903
- v
3903
+ x
3904
3904
  )
3905
3905
  );
3906
3906
  };
3907
- return r.forEach((p, v) => {
3908
- const b = v === r.length - 1;
3907
+ return r.forEach((p, x) => {
3908
+ const v = x === r.length - 1;
3909
3909
  if (p.type === "link") {
3910
3910
  p.attachments.forEach((N, _) => {
3911
3911
  c(
3912
3912
  N,
3913
- `link-${v}-${_}`,
3914
- b && _ === p.attachments.length - 1
3913
+ `link-${x}-${_}`,
3914
+ v && _ === p.attachments.length - 1
3915
3915
  );
3916
3916
  });
3917
3917
  return;
3918
3918
  }
3919
- x(p, `media-${v}`);
3920
- }), /* @__PURE__ */ g("div", { className: "str-chat__message-bubble-wrapper", children: [
3921
- /* @__PURE__ */ g(
3919
+ b(p, `media-${x}`);
3920
+ }), /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
3921
+ /* @__PURE__ */ f(
3922
3922
  "div",
3923
3923
  {
3924
3924
  className: "str-chat__message-bubble",
@@ -3935,12 +3935,12 @@ const Ki = ({
3935
3935
  ]
3936
3936
  }
3937
3937
  ),
3938
- m ? /* @__PURE__ */ g("div", { className: "str-chat__message-bubble", children: [
3938
+ m ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble", children: [
3939
3939
  /* @__PURE__ */ s(Be, { message: n, renderText: a }),
3940
3940
  /* @__PURE__ */ s(st, {})
3941
3941
  ] }) : null
3942
3942
  ] });
3943
- }, Zi = (e) => {
3943
+ }, Ji = (e) => {
3944
3944
  var Mt, Dt, Ot, Pt, zt, Ft, Bt, $t, Ut, jt;
3945
3945
  const {
3946
3946
  additionalMessageInputProps: t,
@@ -3954,57 +3954,57 @@ const Ki = ({
3954
3954
  handleRetry: m,
3955
3955
  highlighted: h,
3956
3956
  isMessageAIGenerated: u,
3957
- isMyMessage: f,
3957
+ isMyMessage: g,
3958
3958
  message: c,
3959
- renderText: x,
3959
+ renderText: b,
3960
3960
  threadList: w,
3961
3961
  viewerLanguage: p,
3962
- onBroadcastClick: v,
3963
- resolvedBroadcastName: b
3964
- } = e, { client: N } = Te("CustomMessage"), { channel: _ } = fe("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: L, onDownloadClick: D } = di("LockedAttachment"), [$, O] = U(!1), C = dn(c.id), { selected: P, voteUp: S, voteDown: T } = Oa(c), {
3965
- Attachment: E = un,
3966
- EditMessageModal: B = mn,
3962
+ onBroadcastClick: x,
3963
+ resolvedBroadcastName: v
3964
+ } = e, { client: N } = Te("CustomMessage"), { channel: _ } = fe("CustomMessage"), { isUnlocking: A, onUnlockClick: R, onFetchSource: L, onDownloadClick: D } = ui("LockedAttachment"), [$, O] = U(!1), C = un(c.id), { selected: P, voteUp: S, voteDown: T } = Pa(c), {
3965
+ Attachment: E = mn,
3966
+ EditMessageModal: B = hn,
3967
3967
  MessageActions: F,
3968
- MessageBlocked: j = hn,
3969
- MessageBouncePrompt: K = fn,
3970
- MessageDeleted: se = gn,
3971
- MessageIsThreadReplyInChannelButtonIndicator: G = pn,
3972
- MessageRepliesCountButton: y = bn,
3973
- ReminderNotification: I = vn,
3974
- StreamedMessageText: W = xn,
3968
+ MessageBlocked: j = fn,
3969
+ MessageBouncePrompt: K = gn,
3970
+ MessageDeleted: se = pn,
3971
+ MessageIsThreadReplyInChannelButtonIndicator: G = bn,
3972
+ MessageRepliesCountButton: y = vn,
3973
+ ReminderNotification: I = xn,
3974
+ StreamedMessageText: W = wn,
3975
3975
  PinIndicator: Q
3976
- } = ls("CustomMessage"), X = wn(c), ne = _n(c), Z = ae(
3976
+ } = cs("CustomMessage"), X = _n(c), ne = yn(c), Z = ae(
3977
3977
  () => u == null ? void 0 : u(c),
3978
3978
  [u, c]
3979
3979
  ), V = ae(() => {
3980
3980
  const he = c.attachments ?? [], ve = c.shared_location ? [c.shared_location, ...he] : he;
3981
3981
  if (!$e(c)) return ve;
3982
- const Vt = ve.filter((Ht) => !("type" in Ht) || !ks(Ht));
3982
+ const Vt = ve.filter((Ht) => !("type" in Ht) || !Cs(Ht));
3983
3983
  return Vt.length === ve.length ? ve : Vt;
3984
3984
  }, [c]), ee = ae(
3985
- () => Gs(V),
3985
+ () => Ys(V),
3986
3986
  [V]
3987
3987
  ), ie = ae(() => {
3988
- const he = xs({ message: c, viewerLanguage: p });
3988
+ const he = ws({ message: c, viewerLanguage: p });
3989
3989
  return he === c.text ? c : { ...c, text: he };
3990
3990
  }, [c, p]), Oe = ee.length > 0, Pe = ee.reduce(
3991
3991
  (he, ve) => he + ve.attachments.length,
3992
3992
  0
3993
- ) === ((V == null ? void 0 : V.length) ?? 0), oe = lr({
3993
+ ) === ((V == null ? void 0 : V.length) ?? 0), oe = cr({
3994
3994
  endOfGroup: r,
3995
3995
  firstOfGroup: i,
3996
3996
  groupedByUser: l
3997
3997
  });
3998
- if (yn(c))
3998
+ if (Nn(c))
3999
3999
  return null;
4000
4000
  if (c.deleted_at || c.type === "deleted")
4001
4001
  return /* @__PURE__ */ s(se, { message: c });
4002
- if (Nn(c))
4002
+ if (kn(c))
4003
4003
  return /* @__PURE__ */ s(j, {});
4004
- const me = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, Et = c.status === "failed" && ((Mt = c.error) == null ? void 0 : Mt.status) !== 403, It = kn(c);
4004
+ const me = !w && !!c.reply_count, le = !w && c.show_in_channel && c.parent_id, Et = c.status === "failed" && ((Mt = c.error) == null ? void 0 : Mt.status) !== 403, It = Cn(c);
4005
4005
  let pe;
4006
4006
  Et ? pe = () => m(c) : It && (pe = () => O(!0));
4007
- const te = f(), Js = k(
4007
+ const te = g(), Qs = k(
4008
4008
  "str-chat__message str-chat__message-simple",
4009
4009
  `str-chat__message--${c.type}`,
4010
4010
  `str-chat__message--${c.status}`,
@@ -4021,11 +4021,11 @@ const Ki = ({
4021
4021
  "str-chat__virtual-message__wrapper--first": i,
4022
4022
  "str-chat__virtual-message__wrapper--group": l
4023
4023
  }
4024
- ), Ge = c.poll_id && N.polls.fromState(c.poll_id), Tt = vi(c), be = $e(c), Qs = wt(c), Ye = !!(V != null && V.length && !c.quoted_message), At = be && te && Ye, en = Oe && Pe && !c.quoted_message && !Ge && !Z && !be, Rt = {
4024
+ ), Ge = c.poll_id && N.polls.fromState(c.poll_id), Tt = xi(c), be = $e(c), en = wt(c), Ye = !!(V != null && V.length && !c.quoted_message), At = be && te && Ye, tn = Oe && Pe && !c.quoted_message && !Ge && !Z && !be, Rt = {
4025
4025
  contentType: "text",
4026
4026
  amountText: (Ot = c.metadata) == null ? void 0 : Ot.amount_text,
4027
4027
  paymentStatus: (Pt = c.metadata) == null ? void 0 : Pt.payment_status,
4028
- renderedText: c.text && /* @__PURE__ */ s(Be, { message: ie, renderText: x })
4028
+ renderedText: c.text && /* @__PURE__ */ s(Be, { message: ie, renderText: b })
4029
4029
  }, Lt = {
4030
4030
  contentType: "media",
4031
4031
  title: (zt = c.metadata) == null ? void 0 : zt.attachment_title,
@@ -4036,7 +4036,7 @@ const Ki = ({
4036
4036
  paymentStatus: (jt = c.metadata) == null ? void 0 : jt.payment_status,
4037
4037
  onFetchSource: L ? () => L(c, _) : void 0
4038
4038
  };
4039
- return /* @__PURE__ */ g(J, { children: [
4039
+ return /* @__PURE__ */ f(J, { children: [
4040
4040
  a && /* @__PURE__ */ s(
4041
4041
  B,
4042
4042
  {
@@ -4044,17 +4044,17 @@ const Ki = ({
4044
4044
  }
4045
4045
  ),
4046
4046
  $ && /* @__PURE__ */ s(
4047
- Cn,
4047
+ Sn,
4048
4048
  {
4049
4049
  MessageBouncePrompt: K,
4050
4050
  onClose: () => O(!1),
4051
4051
  open: $
4052
4052
  }
4053
4053
  ),
4054
- /* @__PURE__ */ g(
4054
+ /* @__PURE__ */ f(
4055
4055
  "div",
4056
4056
  {
4057
- className: Js,
4057
+ className: Qs,
4058
4058
  "data-message-id": c.id,
4059
4059
  "data-dd-privacy": "mask",
4060
4060
  children: [
@@ -4089,7 +4089,7 @@ const Ki = ({
4089
4089
  marginInlineEnd: 0,
4090
4090
  marginInlineStart: 0
4091
4091
  },
4092
- children: Tt ? /* @__PURE__ */ s(Ze, { message: c, standalone: !0 }) : pi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
4092
+ children: Tt ? /* @__PURE__ */ s(Ze, { message: c, standalone: !0 }) : bi(c) ? /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4093
4093
  te && F && /* @__PURE__ */ s(F, {}),
4094
4094
  te ? /* @__PURE__ */ s(
4095
4095
  Fe,
@@ -4107,8 +4107,8 @@ const Ki = ({
4107
4107
  }
4108
4108
  ),
4109
4109
  !te && F && /* @__PURE__ */ s(F, {})
4110
- ] }) }) : bi(c) ? /* @__PURE__ */ g("div", { className: "str-chat__message-bubble-wrapper", children: [
4111
- /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
4110
+ ] }) }) : vi(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
4111
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
4112
4112
  te && F && /* @__PURE__ */ s(F, {}),
4113
4113
  te ? /* @__PURE__ */ s(
4114
4114
  Fe,
@@ -4133,11 +4133,11 @@ const Ki = ({
4133
4133
  Be,
4134
4134
  {
4135
4135
  message: ie,
4136
- renderText: x
4136
+ renderText: b
4137
4137
  }
4138
4138
  ) })
4139
- ] }) : en ? /* @__PURE__ */ s(
4140
- Ki,
4139
+ ] }) : tn ? /* @__PURE__ */ s(
4140
+ Zi,
4141
4141
  {
4142
4142
  groupPosition: oe,
4143
4143
  isMyMessage: te,
@@ -4149,9 +4149,9 @@ const Ki = ({
4149
4149
  // the caption uses displayMessage.text from viewerLanguage.
4150
4150
  i18n: void 0
4151
4151
  },
4152
- renderText: x
4152
+ renderText: b
4153
4153
  }
4154
- ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ g("div", { className: "str-chat__message-bubble", children: [
4154
+ ) : /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "str-chat__message-bubble", children: [
4155
4155
  be && !At && /* @__PURE__ */ s(
4156
4156
  Ze,
4157
4157
  {
@@ -4160,7 +4160,7 @@ const Ki = ({
4160
4160
  isMyMessage: te
4161
4161
  }
4162
4162
  ),
4163
- Ge && /* @__PURE__ */ s(Sn, { poll: Ge }),
4163
+ Ge && /* @__PURE__ */ s(En, { poll: Ge }),
4164
4164
  V != null && V.length && !c.quoted_message ? /* @__PURE__ */ s(
4165
4165
  E,
4166
4166
  {
@@ -4172,20 +4172,20 @@ const Ki = ({
4172
4172
  W,
4173
4173
  {
4174
4174
  message: ie,
4175
- renderText: x
4175
+ renderText: b
4176
4176
  }
4177
4177
  ) : /* @__PURE__ */ s(
4178
4178
  Be,
4179
4179
  {
4180
4180
  message: ie,
4181
- renderText: x
4181
+ renderText: b
4182
4182
  }
4183
4183
  ),
4184
4184
  /* @__PURE__ */ s(st, {})
4185
4185
  ] }) })
4186
4186
  }
4187
4187
  ),
4188
- !Qs && !Tt && /* @__PURE__ */ g("div", { className: "str-chat__message-footer", children: [
4188
+ !en && !Tt && /* @__PURE__ */ f("div", { className: "str-chat__message-footer", children: [
4189
4189
  (!be || At) && /* @__PURE__ */ s(
4190
4190
  Ze,
4191
4191
  {
@@ -4195,7 +4195,7 @@ const Ki = ({
4195
4195
  }
4196
4196
  ),
4197
4197
  n && be && /* @__PURE__ */ s(
4198
- xi,
4198
+ wi,
4199
4199
  {
4200
4200
  selected: P,
4201
4201
  onVoteUp: S,
@@ -4204,10 +4204,10 @@ const Ki = ({
4204
4204
  )
4205
4205
  ] }),
4206
4206
  /* @__PURE__ */ s(
4207
- Ni,
4207
+ ki,
4208
4208
  {
4209
- onBroadcastClick: v,
4210
- resolvedBroadcastName: b
4209
+ onBroadcastClick: x,
4210
+ resolvedBroadcastName: v
4211
4211
  }
4212
4212
  ),
4213
4213
  me && /* @__PURE__ */ s(
@@ -4223,65 +4223,65 @@ const Ki = ({
4223
4223
  c.id
4224
4224
  )
4225
4225
  ] });
4226
- }, Ji = z.memo(
4227
- Zi,
4228
- (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || e.resolvedBroadcastName !== t.resolvedBroadcastName ? !1 : cn(e, t)
4229
- ), Qi = (e) => {
4226
+ }, Qi = z.memo(
4227
+ Ji,
4228
+ (e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage || e.onBroadcastClick !== t.onBroadcastClick || e.resolvedBroadcastName !== t.resolvedBroadcastName ? !1 : dn(e, t)
4229
+ ), eo = (e) => {
4230
4230
  var i;
4231
- const t = ge("CustomMessage"), n = _e(Fs), a = (i = t.message.metadata) == null ? void 0 : i.broadcast_id, r = typeof a == "string" ? n == null ? void 0 : n[a] : void 0;
4231
+ const t = ge("CustomMessage"), n = _e(Bs), a = (i = t.message.metadata) == null ? void 0 : i.broadcast_id, r = typeof a == "string" ? n == null ? void 0 : n[a] : void 0;
4232
4232
  return /* @__PURE__ */ s(
4233
- Ji,
4233
+ Qi,
4234
4234
  {
4235
4235
  ...t,
4236
4236
  ...e,
4237
4237
  resolvedBroadcastName: r
4238
4238
  }
4239
4239
  );
4240
- }, eo = () => {
4240
+ }, to = () => {
4241
4241
  var n;
4242
4242
  const { handleDelete: e, message: t } = ge("CustomMessageActions");
4243
4243
  return ((n = t.metadata) == null ? void 0 : n.payment_status) === "paid" ? null : /* @__PURE__ */ s(
4244
- hs,
4244
+ fs,
4245
4245
  {
4246
4246
  onClick: e,
4247
4247
  "aria-label": "Delete",
4248
4248
  title: "Delete",
4249
4249
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4250
- children: /* @__PURE__ */ s(ua, { size: 16, weight: "light", "aria-hidden": !0 })
4250
+ children: /* @__PURE__ */ s(ma, { size: 16, weight: "light", "aria-hidden": !0 })
4251
4251
  }
4252
4252
  );
4253
- }, to = () => {
4253
+ }, so = () => {
4254
4254
  const { handleFlag: e } = ge("CustomMessageActions");
4255
4255
  return /* @__PURE__ */ s(
4256
- hs,
4256
+ fs,
4257
4257
  {
4258
4258
  onClick: e,
4259
4259
  "aria-label": "Report",
4260
4260
  title: "Report",
4261
4261
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
4262
- children: /* @__PURE__ */ s(cs, { size: 16, weight: "light", "aria-hidden": !0 })
4262
+ children: /* @__PURE__ */ s(ds, { size: 16, weight: "light", "aria-hidden": !0 })
4263
4263
  }
4264
4264
  );
4265
- }, so = () => {
4265
+ }, no = () => {
4266
4266
  var t;
4267
4267
  const { message: e } = ge("CustomMessageActions");
4268
4268
  return ((t = e.metadata) == null ? void 0 : t.custom_type) !== ce.ATTACHMENT ? null : /* @__PURE__ */ s(
4269
- wa,
4269
+ _a,
4270
4270
  {
4271
4271
  messageActionSet: [
4272
- { Component: eo, placement: "quick", type: "delete" },
4273
- { Component: to, placement: "quick", type: "flag" }
4272
+ { Component: to, placement: "quick", type: "delete" },
4273
+ { Component: so, placement: "quick", type: "flag" }
4274
4274
  ]
4275
4275
  }
4276
4276
  );
4277
- }, no = (e) => ({
4277
+ }, ao = (e) => ({
4278
4278
  linkPreviews: Array.from(e.previews.values()).filter(
4279
4279
  (t) => tt.previewIsLoaded(t) || tt.previewIsLoading(t)
4280
4280
  )
4281
- }), ao = () => {
4282
- const { linkPreviewsManager: e } = En(), { linkPreviews: t } = In(
4281
+ }), ro = () => {
4282
+ const { linkPreviewsManager: e } = In(), { linkPreviews: t } = Tn(
4283
4283
  e.state,
4284
- no
4284
+ ao
4285
4285
  ), n = (r) => {
4286
4286
  e.dismissPreview(r);
4287
4287
  };
@@ -4345,7 +4345,7 @@ const Ki = ({
4345
4345
  );
4346
4346
  }) })
4347
4347
  ) : null;
4348
- }, Ue = z.createContext(!1), ro = 200, il = () => _e(Ue), io = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
4348
+ }, Ue = z.createContext(!1), io = 200, ll = () => _e(Ue), oo = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ s(
4349
4349
  "button",
4350
4350
  {
4351
4351
  ...n,
@@ -4354,13 +4354,13 @@ const Ki = ({
4354
4354
  disabled: t,
4355
4355
  onPointerDown: (a) => a.preventDefault(),
4356
4356
  onClick: e,
4357
- children: /* @__PURE__ */ s(ma, { weight: "bold", className: "size-4" })
4357
+ children: /* @__PURE__ */ s(ha, { weight: "bold", className: "size-4" })
4358
4358
  }
4359
4359
  ), as = () => {
4360
- const e = _e(Ue), { handleSubmit: t } = Tn(), n = An(), a = e || !n, {
4361
- SendButton: r = io,
4362
- AttachmentPreviewList: i = Rn
4363
- } = ls("CustomMessageInput"), l = z.useRef(null);
4360
+ const e = _e(Ue), { handleSubmit: t } = An(), n = Rn(), a = e || !n, {
4361
+ SendButton: r = oo,
4362
+ AttachmentPreviewList: i = Ln
4363
+ } = cs("CustomMessageInput"), l = z.useRef(null);
4364
4364
  return z.useEffect(() => {
4365
4365
  const o = l.current;
4366
4366
  if (!o || typeof ResizeObserver > "u")
@@ -4376,7 +4376,7 @@ const Ki = ({
4376
4376
  const d = (m) => {
4377
4377
  var u;
4378
4378
  Array.from(((u = m.clipboardData) == null ? void 0 : u.items) ?? []).some(
4379
- (f) => f.kind === "file"
4379
+ (g) => g.kind === "file"
4380
4380
  ) || m.stopPropagation();
4381
4381
  };
4382
4382
  return o.addEventListener("paste", d), () => o.removeEventListener("paste", d);
@@ -4415,21 +4415,21 @@ const Ki = ({
4415
4415
  // than through this React tree, bypassing the two wrappers below. The
4416
4416
  // `[&>:not(...)]:p-2` variant restores the container's old inset for any
4417
4417
  // such foreign direct child, without re-adding it to our own wrappers.
4418
- /* @__PURE__ */ g(
4418
+ /* @__PURE__ */ f(
4419
4419
  "div",
4420
4420
  {
4421
4421
  ref: l,
4422
4422
  className: "central-container flex flex-col min-w-0 w-full max-h-[calc(var(--messaging-surface-height,100dvh)*0.5)] overflow-y-auto overscroll-contain bg-white rounded-[1.5rem] shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)] [&>:not(.messaging-composer-previews):not(.messaging-composer-row)]:p-2",
4423
4423
  "data-dd-privacy": "mask",
4424
4424
  children: [
4425
- /* @__PURE__ */ g("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
4426
- /* @__PURE__ */ s(Ln, {}),
4427
- /* @__PURE__ */ s(ao, {}),
4425
+ /* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
4426
+ /* @__PURE__ */ s(Mn, {}),
4427
+ /* @__PURE__ */ s(ro, {}),
4428
4428
  /* @__PURE__ */ s(i, {})
4429
4429
  ] }),
4430
- /* @__PURE__ */ g("div", { className: "messaging-composer-row flex items-start", children: [
4430
+ /* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
4431
4431
  /* @__PURE__ */ s(
4432
- Mn,
4432
+ Dn,
4433
4433
  {
4434
4434
  "aria-disabled": e || void 0,
4435
4435
  containerClassName: "min-w-0 flex-1 leading-[0]",
@@ -4469,34 +4469,34 @@ const Ki = ({
4469
4469
  return z.useEffect(() => {
4470
4470
  if (!d)
4471
4471
  return;
4472
- const u = m.current, f = u == null ? void 0 : u.parentElement;
4473
- if (!u || !f)
4472
+ const u = m.current, g = u == null ? void 0 : u.parentElement;
4473
+ if (!u || !g)
4474
4474
  return;
4475
4475
  let c = u.offsetHeight;
4476
- const x = () => {
4477
- const p = u.offsetHeight, v = p > c;
4476
+ const b = () => {
4477
+ const p = u.offsetHeight, x = p > c;
4478
4478
  c = p;
4479
- const b = Array.from(
4480
- f.querySelectorAll(".str-chat__list")
4481
- ).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < ro : !1;
4482
- f.style.setProperty(
4479
+ const v = Array.from(
4480
+ g.querySelectorAll(".str-chat__list")
4481
+ ).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = v ? v.scrollHeight - v.scrollTop - v.clientHeight < io : !1;
4482
+ g.style.setProperty(
4483
4483
  "--messaging-composer-height",
4484
4484
  `${p}px`
4485
- ), v && N && b && (b.scrollTop = b.scrollHeight);
4485
+ ), x && N && v && (v.scrollTop = v.scrollHeight);
4486
4486
  };
4487
- if (x(), typeof ResizeObserver > "u")
4487
+ if (b(), typeof ResizeObserver > "u")
4488
4488
  return;
4489
- const w = new ResizeObserver(x);
4489
+ const w = new ResizeObserver(b);
4490
4490
  return w.observe(u), () => {
4491
- w.disconnect(), f.style.removeProperty("--messaging-composer-height");
4491
+ w.disconnect(), g.style.removeProperty("--messaging-composer-height");
4492
4492
  };
4493
- }, [d]), a ? d ? /* @__PURE__ */ g(
4493
+ }, [d]), a ? d ? /* @__PURE__ */ f(
4494
4494
  "div",
4495
4495
  {
4496
4496
  ref: m,
4497
4497
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
4498
4498
  children: [
4499
- /* @__PURE__ */ g("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
4499
+ /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
4500
4500
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
4501
4501
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
4502
4502
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
@@ -4504,24 +4504,24 @@ const Ki = ({
4504
4504
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
4505
4505
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-gradient" })
4506
4506
  ] }),
4507
- /* @__PURE__ */ g("div", { className: "relative z-10 flex flex-col", children: [
4507
+ /* @__PURE__ */ f("div", { className: "relative z-10 flex flex-col", children: [
4508
4508
  t == null ? void 0 : t(),
4509
4509
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
4510
4510
  n == null ? void 0 : n()
4511
4511
  ] })
4512
4512
  ]
4513
4513
  }
4514
- ) : /* @__PURE__ */ g(J, { children: [
4514
+ ) : /* @__PURE__ */ f(J, { children: [
4515
4515
  t == null ? void 0 : t(),
4516
4516
  /* @__PURE__ */ s("div", { className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4", children: r ? /* @__PURE__ */ s("p", { className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40", children: r }) : null }),
4517
4517
  n == null ? void 0 : n()
4518
- ] }) : d ? /* @__PURE__ */ g(
4518
+ ] }) : d ? /* @__PURE__ */ f(
4519
4519
  "div",
4520
4520
  {
4521
4521
  ref: m,
4522
4522
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
4523
4523
  children: [
4524
- /* @__PURE__ */ g("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
4524
+ /* @__PURE__ */ f("div", { className: "messaging-composer-backdrop", "aria-hidden": "true", children: [
4525
4525
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
4526
4526
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
4527
4527
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
@@ -4529,10 +4529,10 @@ const Ki = ({
4529
4529
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-blur" }),
4530
4530
  /* @__PURE__ */ s("div", { className: "messaging-composer-backdrop-gradient" })
4531
4531
  ] }),
4532
- /* @__PURE__ */ g("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
4532
+ /* @__PURE__ */ f("div", { className: "relative z-10 flex min-h-0 flex-col", children: [
4533
4533
  t == null ? void 0 : t(),
4534
- /* @__PURE__ */ g("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
4535
- /* @__PURE__ */ g(
4534
+ /* @__PURE__ */ f("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
4535
+ /* @__PURE__ */ f(
4536
4536
  "div",
4537
4537
  {
4538
4538
  inert: o ? "" : void 0,
@@ -4549,9 +4549,9 @@ const Ki = ({
4549
4549
  ] })
4550
4550
  ]
4551
4551
  }
4552
- ) : /* @__PURE__ */ g("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
4552
+ ) : /* @__PURE__ */ f("div", { className: "flex min-h-0 flex-col gap-4 p-4", children: [
4553
4553
  t == null ? void 0 : t(),
4554
- /* @__PURE__ */ g(
4554
+ /* @__PURE__ */ f(
4555
4555
  "div",
4556
4556
  {
4557
4557
  inert: o ? "" : void 0,
@@ -4565,17 +4565,17 @@ const Ki = ({
4565
4565
  ),
4566
4566
  n == null ? void 0 : n()
4567
4567
  ] });
4568
- }, oo = {
4568
+ }, lo = {
4569
4569
  SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
4570
4570
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
4571
- }, lo = ["SYSTEM_AGE_SAFETY_BLOCKED"], co = {
4571
+ }, co = ["SYSTEM_AGE_SAFETY_BLOCKED"], uo = {
4572
4572
  SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
4573
- }, Qe = "age safety guidelines.", uo = "https://linktr.ee/s/about/contact", mo = (e) => lo.includes(
4573
+ }, Qe = "age safety guidelines.", mo = "https://linktr.ee/s/about/contact", ho = (e) => co.includes(
4574
4574
  e
4575
- ), ho = (e) => {
4575
+ ), fo = (e) => {
4576
4576
  var t;
4577
- return mo((t = e.metadata) == null ? void 0 : t.custom_type);
4578
- }, fo = (e) => {
4577
+ return ho((t = e.metadata) == null ? void 0 : t.custom_type);
4578
+ }, go = (e) => {
4579
4579
  var a;
4580
4580
  const t = (a = e.metadata) == null ? void 0 : a.custom_type;
4581
4581
  if (qt(t))
@@ -4583,7 +4583,7 @@ const Ki = ({
4583
4583
  kind: "dm-agent",
4584
4584
  type: t
4585
4585
  };
4586
- if (ba(t))
4586
+ if (va(t))
4587
4587
  return {
4588
4588
  kind: "age-safety",
4589
4589
  type: t
@@ -4594,17 +4594,17 @@ const Ki = ({
4594
4594
  kind: "dm-agent",
4595
4595
  type: n
4596
4596
  };
4597
- }, go = (e) => {
4597
+ }, po = (e) => {
4598
4598
  const t = e.indexOf(Qe);
4599
4599
  if (t === -1)
4600
4600
  return e;
4601
4601
  const n = t + Qe.length;
4602
- return /* @__PURE__ */ g(J, { children: [
4602
+ return /* @__PURE__ */ f(J, { children: [
4603
4603
  e.slice(0, t),
4604
4604
  /* @__PURE__ */ s(
4605
4605
  "a",
4606
4606
  {
4607
- href: uo,
4607
+ href: mo,
4608
4608
  target: "_blank",
4609
4609
  rel: "noopener noreferrer",
4610
4610
  className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
@@ -4613,15 +4613,15 @@ const Ki = ({
4613
4613
  ),
4614
4614
  e.slice(n)
4615
4615
  ] });
4616
- }, po = (e) => {
4616
+ }, bo = (e) => {
4617
4617
  var a, r;
4618
- const t = !ho(e.message), n = fo(
4618
+ const t = !fo(e.message), n = go(
4619
4619
  e.message
4620
4620
  );
4621
4621
  if ((n == null ? void 0 : n.kind) === "dm-agent") {
4622
- const i = ((a = e.message.text) == null ? void 0 : a.trim()) || oo[n.type];
4623
- return /* @__PURE__ */ g("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4624
- /* @__PURE__ */ g(
4622
+ const i = ((a = e.message.text) == null ? void 0 : a.trim()) || lo[n.type];
4623
+ return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4624
+ /* @__PURE__ */ f(
4625
4625
  "div",
4626
4626
  {
4627
4627
  className: "mes-dm-agent-system-message mx-auto mb-2 inline-flex w-fit max-w-[min(100%,480px)] items-center justify-center gap-[10px] rounded-[12px] border border-[rgba(0,0,0,0.08)] p-3 text-[rgba(0,0,0,0.55)]",
@@ -4629,7 +4629,7 @@ const Ki = ({
4629
4629
  "data-dm-agent-system-type": n.type,
4630
4630
  children: [
4631
4631
  /* @__PURE__ */ s(
4632
- ha,
4632
+ fa,
4633
4633
  {
4634
4634
  size: 16,
4635
4635
  weight: "regular",
@@ -4645,9 +4645,9 @@ const Ki = ({
4645
4645
  ] });
4646
4646
  }
4647
4647
  if ((n == null ? void 0 : n.kind) === "age-safety") {
4648
- const i = ((r = e.message.text) == null ? void 0 : r.trim()) || co[n.type];
4649
- return /* @__PURE__ */ g("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4650
- /* @__PURE__ */ g(
4648
+ const i = ((r = e.message.text) == null ? void 0 : r.trim()) || uo[n.type];
4649
+ return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4650
+ /* @__PURE__ */ f(
4651
4651
  "div",
4652
4652
  {
4653
4653
  className: "mes-age-safety-system-message box-border mx-auto mb-2 flex w-full max-w-[329px] items-start justify-center gap-3 rounded-[12px] border border-[var(--border-secondary,rgba(0,0,0,0.08))] bg-[var(--bg-warning-subtle,#fef3c6)] px-2 py-4 pl-5 text-[color:var(--text-warning-on-warning,#894b00)]",
@@ -4655,7 +4655,7 @@ const Ki = ({
4655
4655
  "data-age-safety-system-type": n.type,
4656
4656
  children: [
4657
4657
  /* @__PURE__ */ s(
4658
- fa,
4658
+ ga,
4659
4659
  {
4660
4660
  size: 24,
4661
4661
  weight: "duotone",
@@ -4664,22 +4664,22 @@ const Ki = ({
4664
4664
  "data-testid": "age-safety-system-message-icon"
4665
4665
  }
4666
4666
  ),
4667
- /* @__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: go(i) }) })
4667
+ /* @__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: po(i) }) })
4668
4668
  ]
4669
4669
  }
4670
4670
  ),
4671
4671
  !t && /* @__PURE__ */ s(We, { message: e.message })
4672
4672
  ] });
4673
4673
  }
4674
- return /* @__PURE__ */ g("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4675
- /* @__PURE__ */ g("div", { className: "str-chat__message--system__text", children: [
4674
+ return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
4675
+ /* @__PURE__ */ f("div", { className: "str-chat__message--system__text", children: [
4676
4676
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" }),
4677
4677
  /* @__PURE__ */ s("p", { children: e.message.text }),
4678
4678
  /* @__PURE__ */ s("div", { className: "str-chat__message--system__line" })
4679
4679
  ] }),
4680
4680
  !t && /* @__PURE__ */ s(We, { message: e.message })
4681
4681
  ] });
4682
- }, Ys = Ve(!1), et = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4682
+ }, Ws = Ve(!1), et = ({ cx: e, index: t }) => /* @__PURE__ */ s("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ s(
4683
4683
  "animateTransform",
4684
4684
  {
4685
4685
  attributeName: "transform",
@@ -4689,15 +4689,15 @@ const Ki = ({
4689
4689
  begin: `${120 * t}ms`,
4690
4690
  repeatCount: "indefinite"
4691
4691
  }
4692
- ) }), bo = /* @__PURE__ */ new Set([
4692
+ ) }), vo = /* @__PURE__ */ new Set([
4693
4693
  qe.Thinking,
4694
4694
  qe.Generating,
4695
4695
  qe.ExternalSources
4696
- ]), vo = ({ threadList: e }) => {
4697
- var x, w;
4698
- const { channel: t, channelConfig: n, thread: a } = fe(), { client: r } = Te(), { typing: i = {} } = Dn(), { aiState: l } = On(t), o = _e(Ys);
4699
- if (!e && o && bo.has(l)) {
4700
- const p = xo(t, (x = r.user) == null ? void 0 : x.id);
4696
+ ]), xo = ({ threadList: e }) => {
4697
+ var b, w;
4698
+ const { channel: t, channelConfig: n, thread: a } = fe(), { client: r } = Te(), { typing: i = {} } = On(), { aiState: l } = Pn(t), o = _e(Ws);
4699
+ if (!e && o && vo.has(l)) {
4700
+ const p = wo(t, (b = r.user) == null ? void 0 : b.id);
4701
4701
  return /* @__PURE__ */ s(
4702
4702
  is,
4703
4703
  {
@@ -4711,25 +4711,25 @@ const Ki = ({
4711
4711
  if ((n == null ? void 0 : n.typing_events) === !1)
4712
4712
  return null;
4713
4713
  const m = e ? [] : Object.values(i).filter(
4714
- ({ parent_id: p, user: v }) => {
4715
- var b;
4716
- return (v == null ? void 0 : v.id) !== ((b = r.user) == null ? void 0 : b.id) && !p;
4714
+ ({ parent_id: p, user: x }) => {
4715
+ var v;
4716
+ return (x == null ? void 0 : x.id) !== ((v = r.user) == null ? void 0 : v.id) && !p;
4717
4717
  }
4718
4718
  ), h = e ? Object.values(i).filter(
4719
- ({ parent_id: p, user: v }) => {
4720
- var b;
4721
- return (v == null ? void 0 : v.id) !== ((b = r.user) == null ? void 0 : b.id) && p === (a == null ? void 0 : a.id);
4719
+ ({ parent_id: p, user: x }) => {
4720
+ var v;
4721
+ return (x == null ? void 0 : x.id) !== ((v = r.user) == null ? void 0 : v.id) && p === (a == null ? void 0 : a.id);
4722
4722
  }
4723
4723
  ) : [], u = e ? h : m;
4724
4724
  if (!u.length)
4725
4725
  return null;
4726
- const f = (w = u[0]) == null ? void 0 : w.user, c = f != null && f.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
4726
+ const g = (w = u[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
4727
4727
  return /* @__PURE__ */ s(
4728
4728
  is,
4729
4729
  {
4730
- avatarId: (f == null ? void 0 : f.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4731
- avatarName: (f == null ? void 0 : f.name) ?? (c == null ? void 0 : c.name) ?? (f == null ? void 0 : f.id) ?? "Typing user",
4732
- avatarImage: (f == null ? void 0 : f.image) ?? (c == null ? void 0 : c.image),
4730
+ avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
4731
+ avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
4732
+ avatarImage: (g == null ? void 0 : g.image) ?? (c == null ? void 0 : c.image),
4733
4733
  testId: "typing-indicator"
4734
4734
  }
4735
4735
  );
@@ -4746,7 +4746,7 @@ const Ki = ({
4746
4746
  style: {
4747
4747
  marginBottom: "var(--messaging-channel-input-spacer-height, 80px)"
4748
4748
  },
4749
- children: /* @__PURE__ */ g("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4749
+ children: /* @__PURE__ */ f("div", { className: "str-chat__message str-chat__message-simple str-chat__message--regular str-chat__message--received str-chat__message--other str-chat__message--has-text", children: [
4750
4750
  /* @__PURE__ */ s(
4751
4751
  ye,
4752
4752
  {
@@ -4758,7 +4758,7 @@ const Ki = ({
4758
4758
  shape: "circle"
4759
4759
  }
4760
4760
  ),
4761
- /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ g(
4761
+ /* @__PURE__ */ s("div", { className: "str-chat__message-inner mx-0", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ s("div", { className: "str-chat__message-bubble", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text min-h-11 flex items-center", children: /* @__PURE__ */ s("div", { className: "str-chat__message-text-inner str-chat__message-simple-text-inner", children: /* @__PURE__ */ f(
4762
4762
  "svg",
4763
4763
  {
4764
4764
  "aria-hidden": "true",
@@ -4777,7 +4777,7 @@ const Ki = ({
4777
4777
  ] })
4778
4778
  }
4779
4779
  );
4780
- function xo(e, t) {
4780
+ function wo(e, t) {
4781
4781
  var a;
4782
4782
  const n = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
4783
4783
  for (const r of Object.values(n)) {
@@ -4786,12 +4786,12 @@ function xo(e, t) {
4786
4786
  return i;
4787
4787
  }
4788
4788
  }
4789
- const wo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ g(
4789
+ const _o = () => null, yo = ({ className: e, message: t }) => /* @__PURE__ */ f(
4790
4790
  "div",
4791
4791
  {
4792
4792
  className: k("flex items-center justify-center h-full", e),
4793
4793
  children: [
4794
- /* @__PURE__ */ g("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4794
+ /* @__PURE__ */ f("svg", { viewBox: "0 0 100 100", className: "size-8 fill-pebble", stroke: "none", children: [
4795
4795
  /* @__PURE__ */ s("circle", { cx: "6", cy: "50", r: "6", children: /* @__PURE__ */ s(
4796
4796
  "animateTransform",
4797
4797
  {
@@ -4829,12 +4829,12 @@ const wo = () => null, _o = ({ className: e, message: t }) => /* @__PURE__ */ g(
4829
4829
  t && /* @__PURE__ */ s("span", { className: "text-stone", children: t })
4830
4830
  ]
4831
4831
  }
4832
- ), je = z.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ g("div", { className: "flex items-center", children: [
4833
- /* @__PURE__ */ s(_o, { className: "w-6 h-6" }),
4832
+ ), je = z.memo(() => /* @__PURE__ */ s("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
4833
+ /* @__PURE__ */ s(yo, { className: "w-6 h-6" }),
4834
4834
  /* @__PURE__ */ s("span", { className: "text-sm text-stone", children: "Loading messages" })
4835
4835
  ] }) }));
4836
4836
  je.displayName = "LoadingState";
4837
- const yo = ({
4837
+ const No = ({
4838
4838
  onBack: e,
4839
4839
  showBackButton: t,
4840
4840
  renderMessageInputActions: n,
@@ -4847,13 +4847,13 @@ const yo = ({
4847
4847
  onBlockParticipantClick: m,
4848
4848
  onReportParticipantClick: h,
4849
4849
  showBlockParticipant: u = !0,
4850
- showReportParticipant: f = !0,
4850
+ showReportParticipant: g = !0,
4851
4851
  composerDisabled: c = !1,
4852
- composerDisabledReason: x,
4852
+ composerDisabledReason: b,
4853
4853
  showStarButton: w = !1,
4854
4854
  chatbotVotingEnabled: p = !1,
4855
- renderChannelBanner: v,
4856
- customChannelActions: b,
4855
+ renderChannelBanner: x,
4856
+ customChannelActions: v,
4857
4857
  renderChannelActions: N,
4858
4858
  renderMessage: _,
4859
4859
  viewerLanguage: A,
@@ -4870,13 +4870,13 @@ const yo = ({
4870
4870
  const T = q((G) => {
4871
4871
  var y;
4872
4872
  (y = S.current) == null || y.call(S, G);
4873
- }, []), E = D ? T : void 0, B = oi(
4873
+ }, []), E = D ? T : void 0, B = li(
4874
4874
  P,
4875
4875
  $
4876
4876
  ), F = C.state.messages.some(
4877
4877
  (G) => G.type !== "deleted"
4878
- ), j = v ? /* @__PURE__ */ s(z.Fragment, { children: v() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
4879
- La,
4878
+ ), j = x ? /* @__PURE__ */ s(z.Fragment, { children: x() }, "lt-channel-banner") : null, K = /* @__PURE__ */ s(
4879
+ Ma,
4880
4880
  {
4881
4881
  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%)]",
4882
4882
  onBack: e,
@@ -4887,18 +4887,18 @@ const yo = ({
4887
4887
  onBlockParticipant: l,
4888
4888
  showDeleteConversation: o,
4889
4889
  showBlockParticipant: u,
4890
- showReportParticipant: f,
4890
+ showReportParticipant: g,
4891
4891
  onDeleteConversationClick: d,
4892
4892
  onBlockParticipantClick: m,
4893
4893
  onReportParticipantClick: h,
4894
- customChannelActions: b,
4894
+ customChannelActions: v,
4895
4895
  renderChannelActions: N,
4896
4896
  onParticipantNameClick: L
4897
4897
  }
4898
4898
  ), se = q(
4899
4899
  (G) => {
4900
4900
  const { message: y } = ge("ChannelView"), I = /* @__PURE__ */ s(
4901
- Qi,
4901
+ eo,
4902
4902
  {
4903
4903
  ...G,
4904
4904
  chatbotVotingEnabled: p,
@@ -4910,29 +4910,29 @@ const yo = ({
4910
4910
  },
4911
4911
  [p, E, _, A]
4912
4912
  );
4913
- return /* @__PURE__ */ s(Fs.Provider, { value: B, children: /* @__PURE__ */ s(
4914
- zn,
4913
+ return /* @__PURE__ */ s(Bs.Provider, { value: B, children: /* @__PURE__ */ s(
4914
+ Fn,
4915
4915
  {
4916
4916
  overrides: {
4917
4917
  Message: se,
4918
- MessageActions: so,
4918
+ MessageActions: no,
4919
4919
  UnreadMessagesNotification: () => null,
4920
4920
  UnreadMessagesSeparator: () => null
4921
4921
  },
4922
- children: /* @__PURE__ */ s(Fn, { children: O ? /* @__PURE__ */ g("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4923
- /* @__PURE__ */ g(
4922
+ children: /* @__PURE__ */ s(Bn, { children: O ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
4923
+ /* @__PURE__ */ f(
4924
4924
  "div",
4925
4925
  {
4926
4926
  className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
4927
4927
  children: [
4928
- !F && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ g("div", { className: "str-chat__message-list-scroll", children: [
4928
+ !F && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
4929
4929
  K,
4930
4930
  j
4931
4931
  ] }) }),
4932
4932
  /* @__PURE__ */ s(
4933
4933
  Yt,
4934
4934
  {
4935
- head: F ? /* @__PURE__ */ g("div", { className: "sticky top-0 z-10", children: [
4935
+ head: F ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4936
4936
  K,
4937
4937
  j
4938
4938
  ] }) : void 0,
@@ -4955,25 +4955,25 @@ const yo = ({
4955
4955
  },
4956
4956
  renderFooter: () => a == null ? void 0 : a(C),
4957
4957
  disabled: c,
4958
- disabledReason: x,
4958
+ disabledReason: b,
4959
4959
  composerInput: O
4960
4960
  },
4961
4961
  "lt-channel-message-input"
4962
4962
  )
4963
- ] }) : /* @__PURE__ */ g(J, { children: [
4964
- /* @__PURE__ */ g(
4963
+ ] }) : /* @__PURE__ */ f(J, { children: [
4964
+ /* @__PURE__ */ f(
4965
4965
  "div",
4966
4966
  {
4967
4967
  className: "flex-1 overflow-hidden relative",
4968
4968
  children: [
4969
- !F && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ g("div", { className: "str-chat__message-list-scroll", children: [
4969
+ !F && /* @__PURE__ */ s("div", { className: "str-chat__list", children: /* @__PURE__ */ f("div", { className: "str-chat__message-list-scroll", children: [
4970
4970
  K,
4971
4971
  j
4972
4972
  ] }) }),
4973
4973
  /* @__PURE__ */ s(
4974
4974
  Yt,
4975
4975
  {
4976
- head: F ? /* @__PURE__ */ g("div", { className: "sticky top-0 z-10", children: [
4976
+ head: F ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
4977
4977
  K,
4978
4978
  j
4979
4979
  ] }) : void 0,
@@ -4994,7 +4994,7 @@ const yo = ({
4994
4994
  },
4995
4995
  renderFooter: () => a == null ? void 0 : a(C),
4996
4996
  disabled: c,
4997
- disabledReason: x,
4997
+ disabledReason: b,
4998
4998
  composerInput: O
4999
4999
  },
5000
5000
  "lt-channel-message-input"
@@ -5002,7 +5002,7 @@ const yo = ({
5002
5002
  ] }) })
5003
5003
  }
5004
5004
  ) });
5005
- }, Ws = z.memo(
5005
+ }, qs = z.memo(
5006
5006
  ({
5007
5007
  channel: e,
5008
5008
  onBack: t,
@@ -5013,16 +5013,16 @@ const yo = ({
5013
5013
  onLeaveConversation: l,
5014
5014
  onBlockParticipant: o,
5015
5015
  className: d,
5016
- CustomChannelEmptyState: m = wo,
5016
+ CustomChannelEmptyState: m = _o,
5017
5017
  showDeleteConversation: h = !0,
5018
5018
  onDeleteConversationClick: u,
5019
- onBlockParticipantClick: f,
5019
+ onBlockParticipantClick: g,
5020
5020
  onReportParticipantClick: c,
5021
- showBlockParticipant: x = !0,
5021
+ showBlockParticipant: b = !0,
5022
5022
  showReportParticipant: w = !0,
5023
5023
  composerDisabled: p = !1,
5024
- composerDisabledReason: v,
5025
- dmAgentEnabled: b,
5024
+ composerDisabledReason: x,
5025
+ dmAgentEnabled: v,
5026
5026
  messageMetadata: N,
5027
5027
  onMessageSent: _,
5028
5028
  showStarButton: A = !1,
@@ -5044,7 +5044,7 @@ const yo = ({
5044
5044
  const se = q(
5045
5045
  async (y, I, W) => {
5046
5046
  var ee;
5047
- const Q = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, X = b && !Q, ne = {
5047
+ const Q = ((ee = e.data) == null ? void 0 : ee.chatbot_paused) === !0, X = v && !Q, ne = {
5048
5048
  ...I,
5049
5049
  ...X && { silent: !0 },
5050
5050
  ...N && {
@@ -5059,7 +5059,7 @@ const yo = ({
5059
5059
  }, V = await e.sendMessage(ne, Z);
5060
5060
  return _ == null || _(V), V;
5061
5061
  },
5062
- [e, b, N, _]
5062
+ [e, v, N, _]
5063
5063
  ), G = H(null);
5064
5064
  return Y(() => {
5065
5065
  if (!C) return;
@@ -5080,20 +5080,20 @@ const yo = ({
5080
5080
  "messaging-channel-view h-full flex flex-col",
5081
5081
  d
5082
5082
  ),
5083
- children: /* @__PURE__ */ s(Ys.Provider, { value: b ?? !1, children: /* @__PURE__ */ s(
5084
- Pn,
5083
+ children: /* @__PURE__ */ s(Ws.Provider, { value: v ?? !1, children: /* @__PURE__ */ s(
5084
+ zn,
5085
5085
  {
5086
5086
  channel: e,
5087
- MessageSystem: po,
5087
+ MessageSystem: bo,
5088
5088
  EmptyStateIndicator: m,
5089
5089
  LoadingIndicator: je,
5090
- DateSeparator: Ma,
5091
- TypingIndicator: vo,
5090
+ DateSeparator: Da,
5091
+ TypingIndicator: xo,
5092
5092
  doSendMessageRequest: se,
5093
5093
  ...P ? { SendButton: P } : {},
5094
5094
  ...S ? { AttachmentPreviewList: S } : {},
5095
5095
  children: /* @__PURE__ */ s(
5096
- yo,
5096
+ No,
5097
5097
  {
5098
5098
  onBack: t,
5099
5099
  showBackButton: n,
@@ -5105,12 +5105,12 @@ const yo = ({
5105
5105
  CustomChannelEmptyState: m,
5106
5106
  showDeleteConversation: h,
5107
5107
  onDeleteConversationClick: u,
5108
- onBlockParticipantClick: f,
5108
+ onBlockParticipantClick: g,
5109
5109
  onReportParticipantClick: c,
5110
- showBlockParticipant: x,
5110
+ showBlockParticipant: b,
5111
5111
  showReportParticipant: w,
5112
5112
  composerDisabled: p,
5113
- composerDisabledReason: v,
5113
+ composerDisabledReason: x,
5114
5114
  showStarButton: A,
5115
5115
  chatbotVotingEnabled: R,
5116
5116
  renderChannelBanner: L,
@@ -5131,8 +5131,8 @@ const yo = ({
5131
5131
  );
5132
5132
  }
5133
5133
  );
5134
- Ws.displayName = "ChannelView";
5135
- const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ g("div", { className: "text-center max-w-sm", children: [
5134
+ qs.displayName = "ChannelView";
5135
+ const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
5136
5136
  /* @__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: "⚠️" }) }),
5137
5137
  /* @__PURE__ */ s("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
5138
5138
  /* @__PURE__ */ s("p", { className: "text-stone text-sm mb-6", children: e }),
@@ -5147,7 +5147,7 @@ const Ce = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ s("div", { clas
5147
5147
  )
5148
5148
  ] }) }));
5149
5149
  Ce.displayName = "ErrorState";
5150
- const ol = ({
5150
+ const cl = ({
5151
5151
  capabilities: e = {},
5152
5152
  renderMessageInputActions: t,
5153
5153
  renderConversationFooter: n,
@@ -5160,13 +5160,13 @@ const ol = ({
5160
5160
  onReportParticipantClick: m,
5161
5161
  dmAgentEnabled: h,
5162
5162
  onMessageSent: u,
5163
- chatbotVotingEnabled: f = !1,
5163
+ chatbotVotingEnabled: g = !1,
5164
5164
  viewerLanguage: c,
5165
- renderChannelBanner: x,
5165
+ renderChannelBanner: b,
5166
5166
  customChannelActions: w,
5167
5167
  renderChannelActions: p,
5168
- onParticipantNameClick: v,
5169
- onBroadcastClick: b,
5168
+ onParticipantNameClick: x,
5169
+ onBroadcastClick: v,
5170
5170
  resolveBroadcastName: N,
5171
5171
  renderMessage: _,
5172
5172
  onMessageLinkClick: A,
@@ -5181,7 +5181,7 @@ const ol = ({
5181
5181
  refreshConnection: P,
5182
5182
  service: S,
5183
5183
  debug: T
5184
- } = _a(), [E, B] = U(null), [F, j] = U(null), [K, se] = U(!1), { showDeleteConversation: G = !0 } = e, y = H(l);
5184
+ } = ya(), [E, B] = U(null), [F, j] = U(null), [K, se] = U(!1), { showDeleteConversation: G = !0 } = e, y = H(l);
5185
5185
  y.current = l;
5186
5186
  const I = H(a);
5187
5187
  I.current = a;
@@ -5265,12 +5265,12 @@ const ol = ({
5265
5265
  onBack: P
5266
5266
  }
5267
5267
  ) : F ? /* @__PURE__ */ s(Ce, { message: F }) : K && !E ? /* @__PURE__ */ s(Ce, { 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(
5268
- Ws,
5268
+ qs,
5269
5269
  {
5270
5270
  channel: E,
5271
5271
  renderMessageInputActions: t,
5272
5272
  renderConversationFooter: n,
5273
- renderChannelBanner: x,
5273
+ renderChannelBanner: b,
5274
5274
  onLeaveConversation: ne,
5275
5275
  onBlockParticipant: ne,
5276
5276
  CustomChannelEmptyState: o,
@@ -5279,12 +5279,12 @@ const ol = ({
5279
5279
  onReportParticipantClick: m,
5280
5280
  dmAgentEnabled: h,
5281
5281
  onMessageSent: u,
5282
- chatbotVotingEnabled: f,
5282
+ chatbotVotingEnabled: g,
5283
5283
  viewerLanguage: c,
5284
5284
  customChannelActions: w,
5285
5285
  renderChannelActions: p,
5286
- onParticipantNameClick: v,
5287
- onBroadcastClick: b,
5286
+ onParticipantNameClick: x,
5287
+ onBroadcastClick: v,
5288
5288
  resolveBroadcastName: N,
5289
5289
  renderMessage: _,
5290
5290
  onMessageLinkClick: A,
@@ -5294,13 +5294,13 @@ const ol = ({
5294
5294
  E.id
5295
5295
  ) }) }) : /* @__PURE__ */ s(je, {});
5296
5296
  };
5297
- function No(e) {
5297
+ function ko(e) {
5298
5298
  const t = e.state.pending_messages;
5299
5299
  if (t != null && t.length)
5300
5300
  for (const n of t)
5301
5301
  e.state.addMessageSorted(n.message);
5302
5302
  }
5303
- const qs = z.createContext({
5303
+ const Xs = z.createContext({
5304
5304
  selectedChannel: void 0,
5305
5305
  onChannelSelect: () => {
5306
5306
  },
@@ -5308,14 +5308,14 @@ const qs = z.createContext({
5308
5308
  renderMessagePreview: void 0,
5309
5309
  channelPreview: void 0,
5310
5310
  viewerLanguage: void 0
5311
- }), ko = qs.Provider, Co = () => z.useContext(qs), So = (e, t) => {
5311
+ }), Co = Xs.Provider, So = () => z.useContext(Xs), Eo = (e, t) => {
5312
5312
  const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
5313
5313
  return Math.floor((a - n) / (1e3 * 60 * 60 * 24));
5314
- }, Eo = (e) => {
5314
+ }, Io = (e) => {
5315
5315
  const t = /* @__PURE__ */ new Date();
5316
5316
  if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
5317
5317
  return "Just now";
5318
- const a = So(e, t);
5318
+ const a = Eo(e, t);
5319
5319
  return a === 0 ? e.toLocaleTimeString([], {
5320
5320
  hour: "numeric",
5321
5321
  minute: "2-digit",
@@ -5328,7 +5328,7 @@ const qs = z.createContext({
5328
5328
  day: "numeric",
5329
5329
  year: "numeric"
5330
5330
  });
5331
- }, Xs = z.memo(
5331
+ }, Ks = z.memo(
5332
5332
  (e) => {
5333
5333
  var D, $, O;
5334
5334
  const { channel: t, unread: n } = e, {
@@ -5338,7 +5338,7 @@ const qs = z.createContext({
5338
5338
  channelPreview: l,
5339
5339
  renderMessagePreview: o,
5340
5340
  viewerLanguage: d
5341
- } = Co(), { client: m } = Te(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = gs(t);
5341
+ } = So(), { client: m } = Te(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), u = ps(t);
5342
5342
  if (l)
5343
5343
  return /* @__PURE__ */ s(
5344
5344
  l,
@@ -5350,16 +5350,16 @@ const qs = z.createContext({
5350
5350
  viewerLanguage: d
5351
5351
  }
5352
5352
  );
5353
- const f = () => {
5353
+ const g = () => {
5354
5354
  t && r(t);
5355
5355
  }, c = (C) => {
5356
5356
  const P = C.key === "Enter" || C.key === " ", S = C.repeat;
5357
- !P || S || (C.preventDefault(), f());
5358
- }, x = ps(
5357
+ !P || S || (C.preventDefault(), g());
5358
+ }, b = bs(
5359
5359
  (D = t == null ? void 0 : t.state) == null ? void 0 : D.members,
5360
5360
  m == null ? void 0 : m.userID,
5361
5361
  t == null ? void 0 : t.type
5362
- ), w = bs(x == null ? void 0 : x.user), p = ($ = x == null ? void 0 : x.user) == null ? void 0 : $.image, v = (() => {
5362
+ ), w = vs(b == null ? void 0 : b.user), p = ($ = b == null ? void 0 : b.user) == null ? void 0 : $.image, x = (() => {
5363
5363
  var P;
5364
5364
  const C = (P = t == null ? void 0 : t.state) == null ? void 0 : P.messages;
5365
5365
  if (C != null && C.length) {
@@ -5368,10 +5368,10 @@ const qs = z.createContext({
5368
5368
  }
5369
5369
  })(), N = (() => {
5370
5370
  var E;
5371
- const C = xs({
5372
- message: v,
5371
+ const C = ws({
5372
+ message: x,
5373
5373
  viewerLanguage: d
5374
- }), { custom_type: P, attachment_content_type: S } = (v == null ? void 0 : v.metadata) || {};
5374
+ }), { custom_type: P, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
5375
5375
  if (P === ce.TIP)
5376
5376
  return C || "Sent a tip";
5377
5377
  if (P === ce.PAID)
@@ -5383,9 +5383,9 @@ const qs = z.createContext({
5383
5383
  return "🔒 Sent a locked attachment";
5384
5384
  }
5385
5385
  if (C) return C;
5386
- const T = (E = v == null ? void 0 : v.attachments) == null ? void 0 : E[0];
5386
+ const T = (E = x == null ? void 0 : x.attachments) == null ? void 0 : E[0];
5387
5387
  return T ? T.og_scrape_url ? T.og_scrape_url : T.type === "image" ? "📷 Sent an image" : T.type === "video" ? "🎥 Sent a video" : T.type === "audio" ? "🎵 Sent audio" : T.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
5388
- })(), _ = v != null && v.created_at ? Eo(new Date(v.created_at)) : "", A = v ? $e(v) : !1, R = o ? o(v, N) : `${A ? "✨ " : ""}${N}`, L = n ?? 0;
5388
+ })(), _ = x != null && x.created_at ? Io(new Date(x.created_at)) : "", A = x ? $e(x) : !1, R = o ? o(x, N) : `${A ? "✨ " : ""}${N}`, L = n ?? 0;
5389
5389
  return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
5390
5390
  channelId: t == null ? void 0 : t.id,
5391
5391
  isSelected: h,
@@ -5397,7 +5397,7 @@ const qs = z.createContext({
5397
5397
  {
5398
5398
  role: "button",
5399
5399
  tabIndex: 0,
5400
- onClick: f,
5400
+ onClick: g,
5401
5401
  onKeyDown: c,
5402
5402
  className: k(
5403
5403
  "group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2",
@@ -5407,20 +5407,20 @@ const qs = z.createContext({
5407
5407
  }
5408
5408
  ),
5409
5409
  "data-dd-privacy": "mask",
5410
- children: /* @__PURE__ */ g("div", { className: "flex items-start gap-4", children: [
5410
+ children: /* @__PURE__ */ f("div", { className: "flex items-start gap-4", children: [
5411
5411
  /* @__PURE__ */ s(
5412
5412
  ye,
5413
5413
  {
5414
- id: ((O = x == null ? void 0 : x.user) == null ? void 0 : O.id) || t.id || "unknown",
5414
+ id: ((O = b == null ? void 0 : b.user) == null ? void 0 : O.id) || t.id || "unknown",
5415
5415
  name: w,
5416
5416
  image: p,
5417
5417
  size: 48,
5418
5418
  starred: u
5419
5419
  }
5420
5420
  ),
5421
- /* @__PURE__ */ g("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
5422
- /* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-2", children: [
5423
- /* @__PURE__ */ g(
5421
+ /* @__PURE__ */ f("div", { className: "flex-1 min-w-0 flex flex-col gap-1", children: [
5422
+ /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2", children: [
5423
+ /* @__PURE__ */ f(
5424
5424
  "h3",
5425
5425
  {
5426
5426
  className: k(
@@ -5434,7 +5434,7 @@ const qs = z.createContext({
5434
5434
  ),
5435
5435
  _ && /* @__PURE__ */ s("span", { className: "text-xs text-[#717070] flex-shrink-0", children: _ })
5436
5436
  ] }),
5437
- /* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5437
+ /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2 min-w-0", children: [
5438
5438
  /* @__PURE__ */ s("p", { className: "text-sm text-[#717070] flex-1 line-clamp-1", children: R }),
5439
5439
  L > 0 && /* @__PURE__ */ s("span", { className: "bg-[#7f22fe] text-white text-[10px] rounded-full h-4 flex items-center justify-center p-1 min-w-4 text-center flex-shrink-0", children: L > 99 ? "99+" : L })
5440
5440
  ] })
@@ -5444,40 +5444,40 @@ const qs = z.createContext({
5444
5444
  );
5445
5445
  }
5446
5446
  );
5447
- Xs.displayName = "CustomChannelPreview";
5448
- const Io = { last_message_at: -1 }, To = z.memo(
5447
+ Ks.displayName = "CustomChannelPreview";
5448
+ const To = { last_message_at: -1 }, Ao = z.memo(
5449
5449
  ({
5450
5450
  onChannelSelect: e,
5451
5451
  selectedChannel: t,
5452
5452
  filters: n,
5453
5453
  allowNewMessagesFromUnfilteredChannels: a = !1,
5454
5454
  channelRenderFilterFn: r,
5455
- sort: i = Io,
5455
+ sort: i = To,
5456
5456
  className: l,
5457
5457
  customEmptyStateIndicator: o,
5458
- channelListPaginator: d = $n,
5458
+ channelListPaginator: d = Un,
5459
5459
  channelPreview: m,
5460
5460
  renderMessagePreview: h,
5461
5461
  viewerLanguage: u,
5462
- lockChannelOrder: f,
5462
+ lockChannelOrder: g,
5463
5463
  onMessageNewHandler: c,
5464
- onMessageNew: x,
5464
+ onMessageNew: b,
5465
5465
  onChannelVisible: w,
5466
5466
  onAddedToChannel: p,
5467
- onChannelUpdated: v
5467
+ onChannelUpdated: x
5468
5468
  }) => {
5469
- const b = z.useRef(0);
5470
- b.current++;
5469
+ const v = z.useRef(0);
5470
+ v.current++;
5471
5471
  const { debug: N = !1 } = ct(), _ = z.useCallback(
5472
5472
  (R) => {
5473
5473
  for (const L of R)
5474
- No(L);
5474
+ ko(L);
5475
5475
  return r ? r(R) : R;
5476
5476
  },
5477
5477
  [r]
5478
5478
  );
5479
5479
  N && console.log("📺 [ChannelList] 🔄 RENDER START", {
5480
- renderCount: b.current,
5480
+ renderCount: v.current,
5481
5481
  selectedChannelId: t == null ? void 0 : t.id,
5482
5482
  filters: n
5483
5483
  });
@@ -5506,22 +5506,22 @@ const Io = { last_message_at: -1 }, To = z.memo(
5506
5506
  "messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
5507
5507
  l
5508
5508
  ),
5509
- children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(ko, { value: A, children: /* @__PURE__ */ s(
5510
- Bn,
5509
+ children: /* @__PURE__ */ s("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ s(Co, { value: A, children: /* @__PURE__ */ s(
5510
+ $n,
5511
5511
  {
5512
5512
  filters: n,
5513
5513
  sort: i,
5514
5514
  options: { limit: 30 },
5515
5515
  allowNewMessagesFromUnfilteredChannels: a,
5516
5516
  channelRenderFilterFn: _,
5517
- lockChannelOrder: f,
5517
+ lockChannelOrder: g,
5518
5518
  onMessageNewHandler: c,
5519
- onMessageNew: x,
5519
+ onMessageNew: b,
5520
5520
  onChannelVisible: w,
5521
5521
  onAddedToChannel: p,
5522
- onChannelUpdated: v,
5522
+ onChannelUpdated: x,
5523
5523
  Paginator: d,
5524
- Preview: Xs,
5524
+ Preview: Ks,
5525
5525
  EmptyStateIndicator: o
5526
5526
  },
5527
5527
  `${JSON.stringify(n)}:${JSON.stringify(i)}`
@@ -5530,26 +5530,30 @@ const Io = { last_message_at: -1 }, To = z.memo(
5530
5530
  );
5531
5531
  }
5532
5532
  );
5533
- To.displayName = "ChannelList";
5534
- const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", Ro = "text-[12px] leading-4 tracking-[0.24px]", Lo = ({ surface: e, actions: t }) => {
5533
+ Ao.displayName = "ChannelList";
5534
+ const Ro = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", Lo = "text-[12px] leading-4 tracking-[0.24px]", os = ({ surface: e, actions: t, layout: n }) => {
5535
5535
  if (t == null || t.length === 0) return null;
5536
- const n = (t[0].variant ?? "primary") === "secondary";
5536
+ const a = n === "stacked";
5537
5537
  return /* @__PURE__ */ s(
5538
5538
  "div",
5539
5539
  {
5540
5540
  className: k(
5541
- "mt-3 flex gap-2",
5542
- n ? "flex-row flex-wrap" : "flex-col"
5541
+ "flex gap-2",
5542
+ // `row` is capped (`max-w-[60%]`) and shrinkable (`min-w-0`) so a long
5543
+ // or localized secondary label can never grow the footer past the
5544
+ // card's width; the button truncates within it and the copy yields
5545
+ // first. `stacked` keeps the full-width buttons-below layout.
5546
+ a ? "mt-3 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"
5543
5547
  ),
5544
- children: t.map((a, r) => /* @__PURE__ */ s(
5545
- js,
5548
+ children: t.map((r, i) => /* @__PURE__ */ s(
5549
+ Vs,
5546
5550
  {
5547
5551
  variant: e,
5548
- cta: a,
5549
- fullWidth: !n,
5552
+ cta: r,
5553
+ fullWidth: a,
5550
5554
  standalone: !0
5551
5555
  },
5552
- `${a.label}-${r}`
5556
+ `${r.label}-${i}`
5553
5557
  ))
5554
5558
  }
5555
5559
  );
@@ -5562,6 +5566,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5562
5566
  appIcon: i,
5563
5567
  actions: l
5564
5568
  }) => {
5569
+ var b;
5565
5570
  const o = n != null && n.trim() !== "", d = a != null && a.trim() !== "", m = l != null && l.length > 0;
5566
5571
  if (!o && !d && !m) return null;
5567
5572
  const h = { color: t }, u = r > 1 ? {
@@ -5570,43 +5575,54 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5570
5575
  WebkitBoxOrient: "vertical",
5571
5576
  WebkitLineClamp: r,
5572
5577
  overflow: "hidden"
5573
- } : h;
5574
- return /* @__PURE__ */ g("div", { className: "shrink-0 px-4 py-3", children: [
5575
- /* @__PURE__ */ g("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
5576
- o && /* @__PURE__ */ g("div", { className: "flex min-w-0 items-center gap-2", children: [
5577
- i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
5578
- /* @__PURE__ */ s("p", { className: k("min-w-0", Ao), style: h, children: n })
5579
- ] }),
5580
- d && /* @__PURE__ */ s(
5581
- "p",
5582
- {
5583
- className: k(
5584
- Ro,
5585
- r <= 1 && "truncate"
5586
- ),
5587
- style: u,
5588
- children: a
5589
- }
5590
- )
5578
+ } : h, g = m && (((b = l == null ? void 0 : l[0]) == null ? void 0 : b.variant) ?? "primary") === "secondary", c = /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
5579
+ o && /* @__PURE__ */ f("div", { className: "flex min-w-0 items-center gap-2", children: [
5580
+ i ? /* @__PURE__ */ s("span", { className: "shrink-0", children: i }) : null,
5581
+ /* @__PURE__ */ s("p", { className: k("min-w-0", Ro), style: h, children: n })
5591
5582
  ] }),
5592
- /* @__PURE__ */ s(Lo, { surface: e, actions: l })
5583
+ d && /* @__PURE__ */ s(
5584
+ "p",
5585
+ {
5586
+ className: k(
5587
+ Lo,
5588
+ r <= 1 && "truncate"
5589
+ ),
5590
+ style: u,
5591
+ children: a
5592
+ }
5593
+ )
5593
5594
  ] });
5595
+ return /* @__PURE__ */ s("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
5596
+ c,
5597
+ /* @__PURE__ */ s(os, { surface: e, actions: l, layout: "row" })
5598
+ ] }) : /* @__PURE__ */ f(J, { children: [
5599
+ c,
5600
+ /* @__PURE__ */ s(os, { surface: e, actions: l, layout: "stacked" })
5601
+ ] }) });
5594
5602
  }, Do = {
5595
5603
  dark: "bg-white/[0.06]",
5596
5604
  light: "bg-black/[0.04]"
5597
5605
  }, Oo = {
5598
5606
  1: [0],
5599
5607
  2: [-10, 10],
5600
- 3: [-15, 0, 15]
5608
+ 3: [-13, 0, 13]
5601
5609
  }, Po = {
5602
5610
  1: [0],
5603
- 2: [-34, 34],
5604
- 3: [-58, 0, 58]
5605
- }, zo = ({ variant: e, images: t }) => {
5611
+ 2: [-30, 30],
5612
+ 3: [-44, 0, 44]
5613
+ }, zo = {
5614
+ 1: [0],
5615
+ 2: [0, 1],
5616
+ 3: [1, 3, 2]
5617
+ }, Fo = {
5618
+ 1: [1],
5619
+ 2: [1, 1],
5620
+ 3: [1, 1.08, 1]
5621
+ }, Bo = ({ variant: e, images: t }) => {
5606
5622
  const [n, a] = z.useState({}), r = t.join(`
5607
5623
  `), [i, l] = z.useState(r);
5608
5624
  r !== i && (l(r), a({}));
5609
- const o = t.slice(0, 3).map((u, f) => ({ src: u, index: f })).filter(({ index: u }) => !n[u]), d = o.length >= 3 ? 3 : o.length === 2 ? 2 : 1, m = Oo[d], h = Po[d];
5625
+ const o = t.slice(0, 3).map((c, b) => ({ src: c, index: b })).filter(({ index: c }) => !n[c]), d = o.length >= 3 ? 3 : o.length === 2 ? 2 : 1, m = Oo[d], h = Po[d], u = zo[d], g = Fo[d];
5610
5626
  return /* @__PURE__ */ s(
5611
5627
  "div",
5612
5628
  {
@@ -5614,33 +5630,33 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5614
5630
  "relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
5615
5631
  Do[e]
5616
5632
  ),
5617
- children: o.map(({ src: u, index: f }, c) => /* @__PURE__ */ s(
5633
+ children: o.map(({ src: c, index: b }, w) => /* @__PURE__ */ s(
5618
5634
  "img",
5619
5635
  {
5620
- src: de(u) ?? u,
5636
+ src: de(c) ?? c,
5621
5637
  alt: "",
5622
5638
  draggable: !1,
5623
5639
  loading: "lazy",
5624
5640
  decoding: "async",
5625
- onError: () => a((x) => ({ ...x, [f]: !0 })),
5626
- className: "absolute left-1/2 top-1/2 h-[82%] w-[46%] rounded-[12px] object-cover shadow-lg",
5641
+ onError: () => a((p) => ({ ...p, [b]: !0 })),
5642
+ className: "absolute left-1/2 top-1/2 h-[74%] w-[66%] rounded-[12px] object-cover shadow-lg",
5627
5643
  style: {
5628
- transform: `translate(-50%, -50%) translateX(${h[c]}px) rotate(${m[c]}deg)`,
5629
- zIndex: c
5644
+ transform: `translate(-50%, -50%) translateX(${h[w]}px) rotate(${m[w]}deg) scale(${g[w]})`,
5645
+ zIndex: u[w]
5630
5646
  }
5631
5647
  },
5632
- `${u}-${f}`
5648
+ `${c}-${b}`
5633
5649
  ))
5634
5650
  }
5635
5651
  );
5636
- }, Fo = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Bo = ({
5652
+ }, $o = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Uo = ({
5637
5653
  variant: e,
5638
5654
  presentation: t,
5639
5655
  images: n,
5640
5656
  title: a,
5641
5657
  heroUrl: r,
5642
5658
  onHeroError: i
5643
- }) => /* @__PURE__ */ s("div", { className: Fo, children: t === "fan" ? /* @__PURE__ */ s(zo, { variant: e, images: n }) : (
5659
+ }) => /* @__PURE__ */ s("div", { className: $o, children: t === "fan" ? /* @__PURE__ */ s(Bo, { variant: e, images: n }) : (
5644
5660
  // `heroUrl` is the palette-tracked source: it becomes `undefined` when the
5645
5661
  // hero image errors, so `CardThumbnail` falls through to its placeholder.
5646
5662
  // Do NOT `?? images[0]` here — that would re-instate the failed URL.
@@ -5654,7 +5670,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5654
5670
  onImageError: i
5655
5671
  }
5656
5672
  )
5657
- ) }), Ks = ({
5673
+ ) }), Zs = ({
5658
5674
  variant: e,
5659
5675
  title: t,
5660
5676
  subtitle: n,
@@ -5666,22 +5682,22 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5666
5682
  accentColor: d,
5667
5683
  groupPosition: m = "single"
5668
5684
  }) => {
5669
- const h = va({
5685
+ const h = xa({
5670
5686
  imagePresentation: i,
5671
5687
  images: r
5672
- }), u = r.length > 0, f = u && h === "hero", c = He({
5688
+ }), u = r.length > 0, g = u && h === "hero", c = He({
5673
5689
  variant: e,
5674
5690
  accentColor: d,
5675
5691
  layout: "featured",
5676
- thumbnailUrl: f ? r[0] : void 0
5677
- }), x = m === "single" || m === "end";
5692
+ thumbnailUrl: g ? r[0] : void 0
5693
+ }), b = m === "single" || m === "end";
5678
5694
  return /* @__PURE__ */ s(
5679
5695
  St,
5680
5696
  {
5681
5697
  accentHex: c.accentHex,
5682
5698
  side: e === "dark" ? "sender" : "receiver",
5683
- visible: x,
5684
- children: /* @__PURE__ */ g(
5699
+ visible: b,
5700
+ children: /* @__PURE__ */ f(
5685
5701
  Ee,
5686
5702
  {
5687
5703
  variant: e,
@@ -5689,13 +5705,13 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5689
5705
  "data-testid": "rich-card",
5690
5706
  children: [
5691
5707
  u && /* @__PURE__ */ s(
5692
- Bo,
5708
+ Uo,
5693
5709
  {
5694
5710
  variant: e,
5695
5711
  presentation: h,
5696
5712
  images: r,
5697
5713
  title: t,
5698
- heroUrl: f ? c.thumbnailUrl : void 0,
5714
+ heroUrl: g ? c.thumbnailUrl : void 0,
5699
5715
  onHeroError: c.onImageError
5700
5716
  }
5701
5717
  ),
@@ -5716,13 +5732,13 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5716
5732
  )
5717
5733
  }
5718
5734
  );
5719
- }, $o = (e) => /* @__PURE__ */ s(Ks, { ...e, variant: "dark" }), Uo = (e) => /* @__PURE__ */ s(Ks, { ...e, variant: "light" }), ll = {
5720
- Sent: $o,
5721
- Received: Uo
5722
- }, os = `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%`, jo = {
5735
+ }, jo = (e) => /* @__PURE__ */ s(Zs, { ...e, variant: "dark" }), Vo = (e) => /* @__PURE__ */ s(Zs, { ...e, variant: "light" }), dl = {
5736
+ Sent: jo,
5737
+ Received: Vo
5738
+ }, ls = `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%`, Ho = {
5723
5739
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5724
5740
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
5725
- }, Vo = ({ variant: e }) => /* @__PURE__ */ s(
5741
+ }, Go = ({ variant: e }) => /* @__PURE__ */ s(
5726
5742
  "span",
5727
5743
  {
5728
5744
  "aria-hidden": "true",
@@ -5732,12 +5748,12 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5732
5748
  insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
5733
5749
  transform: e === "received" ? "scaleX(-1)" : void 0,
5734
5750
  transformOrigin: "center",
5735
- backgroundColor: jo[e],
5736
- WebkitMask: os,
5737
- mask: os
5751
+ backgroundColor: Ho[e],
5752
+ WebkitMask: ls,
5753
+ mask: ls
5738
5754
  }
5739
5755
  }
5740
- ), Ho = {
5756
+ ), Yo = {
5741
5757
  sent: {
5742
5758
  backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
5743
5759
  color: "var(--str-chat__own-message-bubble-color, #fff)"
@@ -5746,13 +5762,13 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5746
5762
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
5747
5763
  color: "var(--str-chat__message-bubble-color, #000000)"
5748
5764
  }
5749
- }, Zs = ({
5765
+ }, Js = ({
5750
5766
  variant: e,
5751
5767
  text: t,
5752
5768
  tail: n = !0,
5753
5769
  header: a,
5754
5770
  className: r
5755
- }) => /* @__PURE__ */ g(
5771
+ }) => /* @__PURE__ */ f(
5756
5772
  "div",
5757
5773
  {
5758
5774
  "data-dd-privacy": "mask",
@@ -5762,23 +5778,23 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5762
5778
  r
5763
5779
  ),
5764
5780
  style: {
5765
- ...Ho[e],
5781
+ ...Yo[e],
5766
5782
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
5767
5783
  isolation: "isolate"
5768
5784
  },
5769
5785
  children: [
5770
5786
  a != null && /* @__PURE__ */ s("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
5771
5787
  /* @__PURE__ */ s("p", { className: "m-0 whitespace-pre-wrap break-words", children: t }),
5772
- n && /* @__PURE__ */ s(Vo, { variant: e })
5788
+ n && /* @__PURE__ */ s(Go, { variant: e })
5773
5789
  ]
5774
5790
  }
5775
- ), Go = ({
5791
+ ), Wo = ({
5776
5792
  text: e,
5777
5793
  tail: t,
5778
5794
  header: n,
5779
5795
  className: a
5780
5796
  }) => /* @__PURE__ */ s(
5781
- Zs,
5797
+ Js,
5782
5798
  {
5783
5799
  variant: "received",
5784
5800
  text: e,
@@ -5786,10 +5802,10 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5786
5802
  header: n,
5787
5803
  className: a
5788
5804
  }
5789
- ), Yo = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Zs, { variant: "sent", text: e, tail: t, className: n }), cl = {
5790
- Sent: Yo,
5791
- Received: Go
5792
- }, Wo = ({
5805
+ ), qo = ({ text: e, tail: t, className: n }) => /* @__PURE__ */ s(Js, { variant: "sent", text: e, tail: t, className: n }), ul = {
5806
+ Sent: qo,
5807
+ Received: Wo
5808
+ }, Xo = ({
5793
5809
  question: e,
5794
5810
  onClick: t,
5795
5811
  loading: n = !1,
@@ -5811,7 +5827,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5811
5827
  ),
5812
5828
  children: e
5813
5829
  }
5814
- ), dl = ({
5830
+ ), ml = ({
5815
5831
  faqs: e,
5816
5832
  onFaqClick: t,
5817
5833
  loadingFaqId: n,
@@ -5820,8 +5836,8 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5820
5836
  avatarImage: i,
5821
5837
  avatarName: l
5822
5838
  }) => {
5823
- const o = xa(e);
5824
- return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ g("div", { className: "flex gap-3 items-end", children: [
5839
+ const o = wa(e);
5840
+ return o.length === 0 ? null : /* @__PURE__ */ s("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
5825
5841
  (i || l) && /* @__PURE__ */ s("div", { className: "flex-none", children: /* @__PURE__ */ s(
5826
5842
  ye,
5827
5843
  {
@@ -5832,7 +5848,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5832
5848
  shape: "circle"
5833
5849
  }
5834
5850
  ) }),
5835
- /* @__PURE__ */ g(
5851
+ /* @__PURE__ */ f(
5836
5852
  "div",
5837
5853
  {
5838
5854
  className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
@@ -5840,7 +5856,7 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5840
5856
  children: [
5841
5857
  a && /* @__PURE__ */ s("p", { className: "text-md text-charcoal mb-4", children: a }),
5842
5858
  o.map((d) => /* @__PURE__ */ s(
5843
- Wo,
5859
+ Xo,
5844
5860
  {
5845
5861
  question: d.question,
5846
5862
  onClick: () => t(d.id),
@@ -5854,43 +5870,43 @@ const Ao = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", R
5854
5870
  ] }) });
5855
5871
  };
5856
5872
  export {
5857
- _s as A,
5873
+ ys as A,
5858
5874
  ht as B,
5859
- wo as C,
5860
- bs as D,
5861
- il as E,
5862
- dl as F,
5863
- di as G,
5864
- Oa as H,
5865
- _a as I,
5875
+ _o as C,
5876
+ vs as D,
5877
+ ll as E,
5878
+ ml as F,
5879
+ ui as G,
5880
+ Pa as H,
5881
+ ya as I,
5866
5882
  ot as L,
5867
- al as M,
5868
- ll as R,
5883
+ il as M,
5884
+ dl as R,
5869
5885
  Ne as a,
5870
5886
  ye as b,
5871
- To as c,
5872
- Ws as d,
5873
- rl as e,
5874
- Wo as f,
5887
+ Ao as c,
5888
+ qs as d,
5889
+ ol as e,
5890
+ Xo as f,
5875
5891
  ue as g,
5876
5892
  Fe as h,
5877
5893
  ke as i,
5878
- cl as j,
5879
- xi as k,
5880
- nl as l,
5881
- ol as m,
5882
- vr as n,
5894
+ ul as j,
5895
+ wi as k,
5896
+ rl as l,
5897
+ cl as m,
5898
+ xr as n,
5883
5899
  de as o,
5884
- gr as p,
5885
- Eo as q,
5900
+ pr as p,
5901
+ Io as q,
5886
5902
  we as r,
5887
- br as s,
5888
- xs as t,
5889
- ks as u,
5890
- Na as v,
5891
- lr as w,
5892
- Pa as x,
5893
- ps as y,
5903
+ vr as s,
5904
+ ws as t,
5905
+ Cs as u,
5906
+ ka as v,
5907
+ cr as w,
5908
+ za as x,
5909
+ bs as y,
5894
5910
  mt as z
5895
5911
  };
5896
- //# sourceMappingURL=index-CrdAtOBl.js.map
5912
+ //# sourceMappingURL=index-DGmVyxHy.js.map