@linktr.ee/messaging-react 4.4.7-rc-1788243598 → 4.4.7

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.
package/dist/index.js CHANGED
@@ -2,30 +2,30 @@ import { a as e, i as t, n, o as r, r as i, s as a } from "./AttachmentCard-DSek
2
2
  import o, { Suspense as s, createContext as c, useCallback as l, useContext as u, useEffect as d, useId as f, useMemo as p, useRef as m, useState as h } from "react";
3
3
  import { StreamChatService as g } from "@linktr.ee/messaging-core";
4
4
  import { LinkPreviewsManager as _, StreamChat as v } from "stream-chat";
5
- import { AIStates as y, Attachment as b, AttachmentPreviewList as x, Channel as S, ChannelList as C, Chat as w, DateSeparator as T, EditMessageModal as E, InfiniteScroll as D, MessageBlocked as O, MessageBounceModal as k, MessageBouncePrompt as A, MessageDeleted as j, MessageErrorIcon as M, MessageInput as N, MessageIsThreadReplyInChannelButtonIndicator as P, MessageList as F, MessageRepliesCountButton as I, MessageStatus as L, MessageText as R, MessageTimestamp as z, Poll as ee, QuotedMessagePreview as te, ReminderNotification as ne, StreamedMessageText as re, TextareaComposer as ie, Window as B, WithComponents as ae, areMessageUIPropsEqual as oe, isDateSeparatorMessage as se, isMessageBlocked as ce, isMessageBounced as le, messageHasAttachments as ue, messageHasReactions as de, useAIState as fe, useActiveAudioPlayer as pe, useChannelStateContext as me, useChatContext as he, useComponentContext as ge, useMessageComposer as _e, useMessageComposerHasSendableData as ve, useMessageContext as V, useMessageInputContext as ye, useMessageReminder as be, useStateStore as xe, useTypingContext as Se } from "stream-chat-react";
6
- import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
- import { MESSAGE_CUSTOM_TYPE as G, OFFICIAL_SENDER_USER_ID as K, isAgeSafetySystemType as q, isDmAgentSystemType as Ce, isOfficialChannel as we, resolveRichCardImagePresentation as Te, selectEnabledFaqs as Ee } from "@linktr.ee/messaging-taxonomy";
8
- import J from "classnames";
9
- import { ArrowLeftIcon as De, ArrowUpIcon as Oe, CaretLeftIcon as ke, CaretRightIcon as Ae, ChecksIcon as je, CircleNotchIcon as Me, CurrencyDollarIcon as Ne, DotsThreeIcon as Pe, DownloadSimpleIcon as Y, FlagIcon as X, GiftIcon as Fe, MegaphoneIcon as Ie, PencilSimpleIcon as Le, PlayIcon as Re, ProhibitIcon as ze, ProhibitInsetIcon as Be, SignOutIcon as Ve, SparkleIcon as He, SpinnerGapIcon as Ue, StarIcon as We, TrashSimpleIcon as Ge, VideoCameraIcon as Ke, WarningCircleIcon as qe, XIcon as Je } from "@phosphor-icons/react";
10
- import { DefaultDropdownActionButton as Ye, MessageActions as Xe } from "stream-chat-react/experimental";
5
+ import { AIStates as y, Attachment as b, AttachmentPreviewList as x, Channel as S, ChannelList as C, Chat as w, DateSeparator as T, EditMessageModal as E, InfiniteScroll as D, MessageBlocked as O, MessageBounceModal as k, MessageBouncePrompt as A, MessageDeleted as j, MessageErrorIcon as M, MessageInput as N, MessageIsThreadReplyInChannelButtonIndicator as P, MessageList as F, MessageRepliesCountButton as I, MessageStatus as L, MessageText as R, MessageTimestamp as z, Poll as ee, QuotedMessagePreview as te, ReminderNotification as ne, StreamedMessageText as re, TextareaComposer as ie, Window as B, WithComponents as ae, areMessageUIPropsEqual as oe, isDateSeparatorMessage as se, isMessageBlocked as ce, isMessageBounced as le, messageHasAttachments as ue, messageHasReactions as de, useAIState as fe, useActiveAudioPlayer as pe, useChannelStateContext as V, useChatContext as me, useComponentContext as he, useMessageComposer as ge, useMessageComposerHasSendableData as _e, useMessageContext as H, useMessageInputContext as ve, useMessageReminder as ye, useStateStore as be, useTypingContext as xe } from "stream-chat-react";
6
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
7
+ import { MESSAGE_CUSTOM_TYPE as K, OFFICIAL_SENDER_USER_ID as q, isAgeSafetySystemType as J, isDmAgentSystemType as Se, isOfficialChannel as Ce, resolveRichCardImagePresentation as we, selectEnabledFaqs as Te } from "@linktr.ee/messaging-taxonomy";
8
+ import Y from "classnames";
9
+ import { ArrowLeftIcon as Ee, ArrowUpIcon as De, CaretLeftIcon as Oe, CaretRightIcon as ke, ChecksIcon as Ae, CircleNotchIcon as je, CurrencyDollarIcon as Me, DotsThreeIcon as Ne, DownloadSimpleIcon as X, FlagIcon as Z, GiftIcon as Pe, MegaphoneIcon as Fe, PencilSimpleIcon as Ie, PlayIcon as Le, ProhibitIcon as Re, ProhibitInsetIcon as ze, SignOutIcon as Be, SparkleIcon as Ve, SpinnerGapIcon as He, StarIcon as Ue, TrashSimpleIcon as We, VideoCameraIcon as Ge, WarningCircleIcon as Ke, XIcon as qe } from "@phosphor-icons/react";
10
+ import { DefaultDropdownActionButton as Je, MessageActions as Ye } from "stream-chat-react/experimental";
11
11
  //#region src/logging/index.tsx
12
- var Ze = {
12
+ var Xe = {
13
13
  debug: (e, ...t) => console.log(e, ...t),
14
14
  info: (e, ...t) => console.log(e, ...t),
15
15
  warn: (e, ...t) => console.warn(e, ...t),
16
16
  error: (e, ...t) => console.error(e, ...t)
17
- }, Qe = (e) => ({
18
- debug: e?.debug ?? Ze.debug,
19
- info: e?.info ?? Ze.info,
20
- warn: e?.warn ?? Ze.warn,
21
- error: e?.error ?? Ze.error
22
- }), $e = c(Ze), et = ({ logger: e, children: t }) => {
23
- let n = p(() => Qe(e), [e]);
24
- return /* @__PURE__ */ U($e.Provider, {
17
+ }, Ze = (e) => ({
18
+ debug: e?.debug ?? Xe.debug,
19
+ info: e?.info ?? Xe.info,
20
+ warn: e?.warn ?? Xe.warn,
21
+ error: e?.error ?? Xe.error
22
+ }), Qe = c(Xe), $e = ({ logger: e, children: t }) => {
23
+ let n = p(() => Ze(e), [e]);
24
+ return /* @__PURE__ */ W(Qe.Provider, {
25
25
  value: n,
26
26
  children: t
27
27
  });
28
- }, tt = () => u($e), nt = c({
28
+ }, et = () => u(Qe), tt = c({
29
29
  service: null,
30
30
  client: null,
31
31
  isConnected: !1,
@@ -34,7 +34,7 @@ var Ze = {
34
34
  capabilities: {},
35
35
  refreshConnection: async () => {},
36
36
  debug: !1
37
- }), rt = () => u(nt), it = ({ children: e, user: t, serviceConfig: n, apiKey: r, capabilities: i = {}, debug: a = !1, client: s, logger: c }) => {
37
+ }), nt = () => u(tt), rt = ({ children: e, user: t, serviceConfig: n, apiKey: r, capabilities: i = {}, debug: a = !1, client: s, logger: c }) => {
38
38
  let u = l((e, ...t) => {
39
39
  a && console.log(`🔥 [MessagingProvider] ${e}`, ...t);
40
40
  }, [a]);
@@ -102,7 +102,7 @@ var Ze = {
102
102
  apiKey: r,
103
103
  debug: A.current,
104
104
  client: F,
105
- ...t.logger || !j.current ? {} : { logger: Qe(j.current) }
105
+ ...t.logger || !j.current ? {} : { logger: Ze(j.current) }
106
106
  });
107
107
  O.current = n, p(n), u("✅ SERVICE SET", {
108
108
  renderCount: e,
@@ -237,18 +237,18 @@ var Ze = {
237
237
  renderCount: N.current,
238
238
  willRenderChat: !!F,
239
239
  contextValueReady: !!R
240
- }), /* @__PURE__ */ U(et, {
240
+ }), /* @__PURE__ */ W($e, {
241
241
  logger: c,
242
- children: /* @__PURE__ */ U(nt.Provider, {
242
+ children: /* @__PURE__ */ W(tt.Provider, {
243
243
  value: R,
244
- children: F ? /* @__PURE__ */ U(w, {
244
+ children: F ? /* @__PURE__ */ W(w, {
245
245
  client: F,
246
246
  customClasses: { channelList: "str-chat__channel-list str-chat__channel-list-react bg-transparent lg:border-r-2 border-r-0 border-[#0000000A]" },
247
247
  children: e
248
248
  }) : e
249
249
  })
250
250
  });
251
- }, at = () => rt(), ot = (e) => {
251
+ }, it = () => nt(), at = (e) => {
252
252
  let [t, n] = h(!!e?.state?.membership?.pinned_at);
253
253
  return d(() => {
254
254
  if (!e) {
@@ -266,30 +266,30 @@ var Ze = {
266
266
  };
267
267
  //#endregion
268
268
  //#region src/utils/resolveConversationParticipant.ts
269
- function st(e, t, n) {
269
+ function ot(e, t, n) {
270
270
  let r = Object.values(e || {});
271
- if (we(n)) {
272
- let e = r.find((e) => e.user?.id === K);
271
+ if (Ce(n)) {
272
+ let e = r.find((e) => e.user?.id === q);
273
273
  if (e) return e;
274
274
  }
275
275
  return r.find((e) => e.user?.id && e.user.id !== t);
276
276
  }
277
277
  //#endregion
278
278
  //#region src/utils/resolveParticipantDisplayName.ts
279
- var ct = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
280
- function lt(e) {
281
- return ct.test(e.trim());
279
+ var st = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
280
+ function ct(e) {
281
+ return st.test(e.trim());
282
282
  }
283
- function ut(e, t) {
283
+ function lt(e, t) {
284
284
  let n = e?.trim();
285
- return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !lt(n);
285
+ return !n || t && n === t || t && n === `Follower ${t}` ? !1 : !ct(n);
286
286
  }
287
- function dt(e) {
288
- return ut(e?.name, e?.id) ? e.name.trim() : ut(e?.username, e?.id) ? e.username.trim() : "Unknown member";
287
+ function ut(e) {
288
+ return lt(e?.name, e?.id) ? e.name.trim() : lt(e?.username, e?.id) ? e.username.trim() : "Unknown member";
289
289
  }
290
290
  //#endregion
291
291
  //#region src/components/Avatar/getAvatarEmoji.ts
292
- var ft = [
292
+ var dt = [
293
293
  {
294
294
  emoji: "🍎",
295
295
  bgColor: "#FFD1DD"
@@ -343,7 +343,7 @@ var ft = [
343
343
  bgColor: "#D9F7E1"
344
344
  }
345
345
  ];
346
- function pt(e) {
346
+ function ft(e) {
347
347
  let t = 0;
348
348
  for (let n = 0; n < e.length; n++) {
349
349
  let r = e.charCodeAt(n);
@@ -351,30 +351,30 @@ function pt(e) {
351
351
  }
352
352
  return Math.abs(t);
353
353
  }
354
+ function pt(e) {
355
+ return dt[ft(e) % dt.length];
356
+ }
354
357
  function mt(e) {
355
- return ft[pt(e) % ft.length];
358
+ return pt(e).emoji;
356
359
  }
357
360
  function ht(e) {
358
- return mt(e).emoji;
359
- }
360
- function gt(e) {
361
- return mt(e).bgColor;
361
+ return pt(e).bgColor;
362
362
  }
363
363
  //#endregion
364
364
  //#region src/components/Avatar/index.tsx
365
- var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
366
- let s = ht(e), c = gt(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ U("div", {
365
+ var gt = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape: a = "squircle", dmAgentEnabled: o = !1 }) => {
366
+ let s = mt(e), c = ht(e), l = n < 32 ? Math.round(n * .45) : n < 56 ? 14 : n < 120 ? 18 : 36, u = n >= 40 ? 2 : 1, d = a === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ W("div", {
367
367
  "data-testid": "avatar-inner",
368
368
  className: "h-full w-full overflow-hidden",
369
369
  style: d,
370
- children: t ? /* @__PURE__ */ U("img", {
370
+ children: t ? /* @__PURE__ */ W("img", {
371
371
  src: t,
372
372
  alt: "",
373
373
  className: "h-full w-full object-cover"
374
- }) : /* @__PURE__ */ U("div", {
374
+ }) : /* @__PURE__ */ W("div", {
375
375
  "aria-hidden": "true",
376
376
  "data-testid": "avatar-fallback",
377
- className: J("avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"),
377
+ className: Y("avatar-fallback flex h-full w-full items-center justify-center font-semibold select-none transition-colors"),
378
378
  style: {
379
379
  fontSize: l,
380
380
  lineHeight: 1
@@ -382,9 +382,9 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
382
382
  children: s
383
383
  })
384
384
  });
385
- return /* @__PURE__ */ W("div", {
385
+ return /* @__PURE__ */ G("div", {
386
386
  "data-testid": "avatar",
387
- className: J("relative flex-shrink-0", r),
387
+ className: Y("relative flex-shrink-0", r),
388
388
  style: {
389
389
  "--str-chat__avatar-size": `${n}px`,
390
390
  width: `${n}px`,
@@ -392,17 +392,17 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
392
392
  backgroundColor: t ? void 0 : c,
393
393
  ...d
394
394
  },
395
- children: [i && /* @__PURE__ */ U("div", {
395
+ children: [i && /* @__PURE__ */ W("div", {
396
396
  "aria-hidden": "true",
397
397
  "data-testid": "avatar-star",
398
398
  className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
399
- children: /* @__PURE__ */ U(We, {
399
+ children: /* @__PURE__ */ W(Ue, {
400
400
  className: "size-3 text-yellow-600",
401
401
  weight: "duotone"
402
402
  })
403
- }), /* @__PURE__ */ U("div", {
403
+ }), /* @__PURE__ */ W("div", {
404
404
  "data-testid": "avatar-ring",
405
- className: J("h-full w-full", "bg-transparent"),
405
+ className: Y("h-full w-full", "bg-transparent"),
406
406
  style: {
407
407
  ...d,
408
408
  ...o && {
@@ -416,7 +416,7 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
416
416
  })]
417
417
  });
418
418
  }, _t = "https://linktr.ee/s/about/trust-center/report", vt = ({ channel: e, participant: t, showBlockParticipant: n = !0, enabled: r = !0, onLeaveConversation: i, onBlockParticipant: a, onDeleteConversationClick: o, onBlockParticipantClick: s, onReportParticipantClick: c, onActionComplete: l, logLabel: u = "useChannelModerationActions" }) => {
419
- let { service: f, debug: p } = rt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
419
+ let { service: f, debug: p } = nt(), m = t?.user?.id, g = !!(r && n && f && m), [_, v] = h(!1), [y, b] = h(null), [x, S] = h(!1), [C, w] = h(!1), T = g && (y?.participantId !== m || y?.service !== f);
420
420
  return d(() => {
421
421
  if (!g || !f || !m) {
422
422
  v(!1), b(null);
@@ -490,9 +490,9 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
490
490
  c?.(), l?.(), window.open(_t, "_blank", "noopener,noreferrer");
491
491
  }
492
492
  };
493
- }, yt = ({ variant: e = "default", className: t, children: n, ...r }) => /* @__PURE__ */ U("button", {
493
+ }, yt = ({ variant: e = "default", className: t, children: n, ...r }) => /* @__PURE__ */ W("button", {
494
494
  type: "button",
495
- className: J("flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60", e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand", t),
495
+ className: Y("flex w-full items-center gap-3 rounded-lg px-4 py-3 text-left text-sm transition-colors focus-ring disabled:cursor-not-allowed disabled:opacity-60", e === "danger" ? "text-danger hover:bg-danger/50" : "text-charcoal hover:bg-sand", t),
496
496
  ...r,
497
497
  children: n
498
498
  }), bt = ({ channel: e, participant: t, showDeleteConversation: n = !0, showBlockParticipant: r = !0, showReportParticipant: i = !0, onLeaveConversation: a, onBlockParticipant: o, onDeleteConversationClick: s, onBlockParticipantClick: c, onReportParticipantClick: u, customChannelActions: p, triggerClassName: g }) => {
@@ -519,52 +519,52 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
519
519
  return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
520
520
  document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
521
521
  };
522
- }, [_]), !t || !(n || r || i || p) ? null : /* @__PURE__ */ W("div", {
522
+ }, [_]), !t || !(n || r || i || p) ? null : /* @__PURE__ */ G("div", {
523
523
  ref: y,
524
524
  className: "relative",
525
- children: [/* @__PURE__ */ W("button", {
525
+ children: [/* @__PURE__ */ G("button", {
526
526
  className: g,
527
527
  type: "button",
528
528
  "aria-haspopup": "true",
529
529
  "aria-expanded": _,
530
530
  "aria-controls": _ ? b : void 0,
531
531
  onClick: () => v((e) => !e),
532
- children: [/* @__PURE__ */ U(Pe, { className: "size-5 text-black/90" }), /* @__PURE__ */ U("span", {
532
+ children: [/* @__PURE__ */ W(Ne, { className: "size-5 text-black/90" }), /* @__PURE__ */ W("span", {
533
533
  className: "sr-only",
534
534
  children: "More options"
535
535
  })]
536
- }), _ && /* @__PURE__ */ U("div", {
536
+ }), _ && /* @__PURE__ */ W("div", {
537
537
  id: b,
538
538
  "aria-label": "Conversation options",
539
- className: J("absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden", "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"),
540
- children: /* @__PURE__ */ W("ul", {
539
+ className: Y("absolute right-0 top-full z-50 mt-2 w-56 overflow-hidden", "rounded-lg border border-sand bg-white p-1 shadow-max-elevation-light"),
540
+ children: /* @__PURE__ */ G("ul", {
541
541
  className: "flex flex-col gap-1",
542
542
  children: [
543
- n && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(yt, {
543
+ n && /* @__PURE__ */ W("li", { children: /* @__PURE__ */ G(yt, {
544
544
  onClick: T,
545
545
  disabled: C,
546
546
  "aria-busy": C,
547
- children: [C ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Ve, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Delete Conversation" })]
547
+ children: [C ? /* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ W(Be, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Delete Conversation" })]
548
548
  }) }),
549
- r && /* @__PURE__ */ U("li", { children: S ? /* @__PURE__ */ W(yt, {
549
+ r && /* @__PURE__ */ W("li", { children: S ? /* @__PURE__ */ G(yt, {
550
550
  disabled: !0,
551
551
  "aria-busy": !0,
552
- children: [/* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ U("span", { children: "Block" })]
553
- }) : x ? /* @__PURE__ */ W(yt, {
552
+ children: [/* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }), /* @__PURE__ */ W("span", { children: "Block" })]
553
+ }) : x ? /* @__PURE__ */ G(yt, {
554
554
  onClick: D,
555
555
  disabled: w,
556
556
  "aria-busy": w,
557
- children: [w ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Unblock" })]
558
- }) : /* @__PURE__ */ W(yt, {
557
+ children: [w ? /* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ W(ze, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Unblock" })]
558
+ }) : /* @__PURE__ */ G(yt, {
559
559
  onClick: E,
560
560
  disabled: w,
561
561
  "aria-busy": w,
562
- children: [w ? /* @__PURE__ */ U(Ue, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ U(Be, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Block" })]
562
+ children: [w ? /* @__PURE__ */ W(He, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ W(ze, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Block" })]
563
563
  }) }),
564
- i && /* @__PURE__ */ U("li", { children: /* @__PURE__ */ W(yt, {
564
+ i && /* @__PURE__ */ W("li", { children: /* @__PURE__ */ G(yt, {
565
565
  variant: "danger",
566
566
  onClick: O,
567
- children: [/* @__PURE__ */ U(X, { className: "h-5 w-5" }), /* @__PURE__ */ U("span", { children: "Report" })]
567
+ children: [/* @__PURE__ */ W(Z, { className: "h-5 w-5" }), /* @__PURE__ */ W("span", { children: "Report" })]
568
568
  }) }),
569
569
  p
570
570
  ]
@@ -572,53 +572,53 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
572
572
  })]
573
573
  });
574
574
  }, xt = "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", St = "CUSTOMER_PAID", Ct = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === St, wt = ({ className: e, onBack: t, showBackButton: n, showStarButton: r = !1, onLeaveConversation: i, onBlockParticipant: a, showDeleteConversation: s = !0, showBlockParticipant: c = !0, showReportParticipant: l = !0, onDeleteConversationClick: u, onBlockParticipantClick: d, onReportParticipantClick: f, customChannelActions: p, renderChannelActions: m, showChannelInfo: h = !0, onParticipantNameClick: g }) => {
575
- let { channel: _ } = me(), { client: v } = he(), y = o.useMemo(() => st(_.state?.members, v?.userID, _.type), [
575
+ let { channel: _ } = V(), { client: v } = me(), y = o.useMemo(() => ot(_.state?.members, v?.userID, _.type), [
576
576
  _.state?.members,
577
577
  v?.userID,
578
578
  _.type
579
- ]), b = dt(y?.user), x = y?.user?.image, S = ot(_), C = Ct(_.data?.customer_tag) && y?.is_follower === !0, w = r && S, T = C || w || !!g, E = async () => {
579
+ ]), b = ut(y?.user), x = y?.user?.image, S = at(_), C = Ct(_.data?.customer_tag) && y?.is_follower === !0, w = r && S, T = C || w || !!g, E = async () => {
580
580
  try {
581
581
  S ? await _.unpin() : await _.pin();
582
582
  } catch (e) {
583
583
  console.error("[ChannelHeaderRedesign] Failed to update pinned status:", e);
584
584
  }
585
- }, D = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Z, {
585
+ }, D = /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(gt, {
586
586
  id: y?.user?.id || _.id || "unknown",
587
587
  name: b,
588
588
  image: x,
589
589
  shape: "circle",
590
590
  size: 48,
591
591
  className: "-mb-2"
592
- }), /* @__PURE__ */ U("span", {
593
- className: J("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", T ? "pl-3 pr-2" : "px-3"),
594
- children: /* @__PURE__ */ W("span", {
592
+ }), /* @__PURE__ */ W("span", {
593
+ className: Y("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", T ? "pl-3 pr-2" : "px-3"),
594
+ children: /* @__PURE__ */ G("span", {
595
595
  className: "flex max-w-full items-center justify-center",
596
- children: [/* @__PURE__ */ U("span", {
596
+ children: [/* @__PURE__ */ W("span", {
597
597
  className: "min-w-0 truncate text-sm font-bold leading-[1.43] tracking-[0.28px] text-black/90",
598
598
  children: b
599
- }), T && /* @__PURE__ */ W("span", {
599
+ }), T && /* @__PURE__ */ G("span", {
600
600
  className: "ml-2 flex gap-1",
601
601
  children: [
602
- C && /* @__PURE__ */ U("span", {
602
+ C && /* @__PURE__ */ W("span", {
603
603
  "aria-label": "Paid customer",
604
604
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
605
- children: /* @__PURE__ */ U(Ne, {
605
+ children: /* @__PURE__ */ W(Me, {
606
606
  className: "size-2.5",
607
607
  weight: "bold"
608
608
  })
609
609
  }),
610
- w && /* @__PURE__ */ U("span", {
610
+ w && /* @__PURE__ */ W("span", {
611
611
  className: "messaging-header-star-badge flex overflow-hidden",
612
- children: /* @__PURE__ */ U("span", {
612
+ children: /* @__PURE__ */ W("span", {
613
613
  "aria-label": "Starred conversation",
614
614
  className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
615
- children: /* @__PURE__ */ U(We, {
615
+ children: /* @__PURE__ */ W(Ue, {
616
616
  className: "size-2.5",
617
617
  weight: "fill"
618
618
  })
619
619
  })
620
620
  }),
621
- g && /* @__PURE__ */ U(Ae, {
621
+ g && /* @__PURE__ */ W(ke, {
622
622
  "aria-hidden": "true",
623
623
  className: "size-4 shrink-0 text-black/65",
624
624
  weight: "bold"
@@ -627,51 +627,51 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
627
627
  })]
628
628
  })
629
629
  })] });
630
- return /* @__PURE__ */ U("div", {
631
- className: J("@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", e),
632
- children: /* @__PURE__ */ W("div", {
630
+ return /* @__PURE__ */ W("div", {
631
+ className: Y("@container bg-[linear-gradient(180deg,#FBFAF9_0%,rgba(251,250,249,0.92)_58%,rgba(251,250,249,0)_100%)]", e),
632
+ children: /* @__PURE__ */ G("div", {
633
633
  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",
634
634
  children: [
635
- /* @__PURE__ */ U("div", {
635
+ /* @__PURE__ */ W("div", {
636
636
  className: "flex items-start",
637
- children: n && /* @__PURE__ */ U("button", {
638
- className: J(xt, "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"),
637
+ children: n && /* @__PURE__ */ W("button", {
638
+ className: Y(xt, "messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"),
639
639
  onClick: t || (() => {}),
640
640
  type: "button",
641
641
  "aria-label": "Back to conversations",
642
- children: /* @__PURE__ */ U(De, { className: "size-5 text-black/90" })
642
+ children: /* @__PURE__ */ W(Ee, { className: "size-5 text-black/90" })
643
643
  })
644
644
  }),
645
- /* @__PURE__ */ U("div", {
645
+ /* @__PURE__ */ W("div", {
646
646
  className: "flex min-w-0 justify-center",
647
647
  "data-dd-privacy": "mask",
648
- children: g ? /* @__PURE__ */ U("button", {
648
+ children: g ? /* @__PURE__ */ W("button", {
649
649
  type: "button",
650
650
  onClick: g,
651
651
  "aria-label": `View details for ${b}`,
652
652
  className: "group flex min-w-0 max-w-full appearance-none flex-col items-center border-0 bg-transparent px-2 focus-ring focus-visible:outline-none",
653
653
  children: D
654
- }) : /* @__PURE__ */ U("div", {
654
+ }) : /* @__PURE__ */ W("div", {
655
655
  className: "flex min-w-0 max-w-full flex-col items-center px-2",
656
656
  children: D
657
657
  })
658
658
  }),
659
- /* @__PURE__ */ W("div", {
659
+ /* @__PURE__ */ G("div", {
660
660
  className: "flex items-start justify-end gap-2",
661
- children: [r && /* @__PURE__ */ U("button", {
661
+ children: [r && /* @__PURE__ */ W("button", {
662
662
  className: xt,
663
663
  onClick: E,
664
664
  type: "button",
665
665
  "aria-pressed": S,
666
666
  "aria-label": S ? "Unstar conversation" : "Star conversation",
667
- children: /* @__PURE__ */ U(We, {
668
- className: J("size-5", {
667
+ children: /* @__PURE__ */ W(Ue, {
668
+ className: Y("size-5", {
669
669
  "text-[#FFD60A]": S,
670
670
  "text-black/90": !S
671
671
  }),
672
672
  weight: S ? "fill" : "regular"
673
673
  })
674
- }), h && (m === void 0 ? /* @__PURE__ */ U(bt, {
674
+ }), h && (m === void 0 ? /* @__PURE__ */ W(bt, {
675
675
  channel: _,
676
676
  participant: y,
677
677
  showDeleteConversation: s,
@@ -689,7 +689,7 @@ var Z = ({ id: e, image: t, size: n = 40, className: r, starred: i = !1, shape:
689
689
  ]
690
690
  })
691
691
  });
692
- }, Tt = (e) => /* @__PURE__ */ U(T, {
692
+ }, Tt = (e) => /* @__PURE__ */ W(T, {
693
693
  ...e,
694
694
  position: "center"
695
695
  });
@@ -734,11 +734,11 @@ var jt = {
734
734
  secondary: "bg-black/[0.06] text-[#121110] hover:bg-black/10"
735
735
  }
736
736
  }, Mt = ({ variant: e, cta: t, fullWidth: n = !0, standalone: r = !1 }) => {
737
- let i = t.variant ?? "primary", a = J("inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors", n ? "w-full" : "min-w-0", !r && "mt-2", jt[e][i]), o = n ? t.label : /* @__PURE__ */ U("span", {
737
+ let i = t.variant ?? "primary", a = Y("inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors", n ? "w-full" : "min-w-0", !r && "mt-2", jt[e][i]), o = n ? t.label : /* @__PURE__ */ W("span", {
738
738
  className: "min-w-0 truncate",
739
739
  children: t.label
740
740
  }), s = At(t.href);
741
- return s ? /* @__PURE__ */ U("a", {
741
+ return s ? /* @__PURE__ */ W("a", {
742
742
  href: s,
743
743
  target: "_blank",
744
744
  rel: "noopener noreferrer",
@@ -747,7 +747,7 @@ var jt = {
747
747
  },
748
748
  className: `${a} no-underline`,
749
749
  children: o
750
- }) : /* @__PURE__ */ U("button", {
750
+ }) : /* @__PURE__ */ W("button", {
751
751
  type: "button",
752
752
  onClick: (e) => {
753
753
  e.stopPropagation(), t.onClick?.();
@@ -767,20 +767,20 @@ var jt = {
767
767
  }, Lt = ({ variant: e, ctaSurface: t, chinTextColor: n, title: r, placeholderTitle: i, description: a, descriptionLines: o = 1, url: s, appIcon: c, cta: l, trailingAction: u, isLoading: d = !1 }) => {
768
768
  let f = e === "dark", p = r ?? (f ? i : void 0) ?? "", m = p.trim() !== "", h = a != null && a.trim() !== "", g = typeof s == "string" ? s.trim() : "", _ = g !== "", v = l != null;
769
769
  if (!d && !m && !h && !_ && !v) return null;
770
- let y = J("line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", n == null && (f && !r ? Pt : Nt[e])), b = J("truncate text-[12px] leading-4 tracking-[0.24px]", n == null && Ft[e]), x = J("text-[12px] leading-4 tracking-[0.24px]", o <= 1 && "truncate", n == null && Ft[e]);
770
+ let y = Y("line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]", n == null && (f && !r ? Pt : Nt[e])), b = Y("truncate text-[12px] leading-4 tracking-[0.24px]", n == null && Ft[e]), x = Y("text-[12px] leading-4 tracking-[0.24px]", o <= 1 && "truncate", n == null && Ft[e]);
771
771
  if (d) {
772
- let t = J("animate-pulse rounded", It[e]);
773
- return /* @__PURE__ */ U("div", {
772
+ let t = Y("animate-pulse rounded", It[e]);
773
+ return /* @__PURE__ */ W("div", {
774
774
  className: "shrink-0 px-4 py-3",
775
- children: /* @__PURE__ */ W("div", {
775
+ children: /* @__PURE__ */ G("div", {
776
776
  className: "flex min-w-0 flex-col gap-[2px]",
777
- children: [/* @__PURE__ */ U("div", {
777
+ children: [/* @__PURE__ */ W("div", {
778
778
  "data-testid": "card-body-skeleton-bar",
779
- className: J("h-5 w-3/4", t),
779
+ className: Y("h-5 w-3/4", t),
780
780
  "aria-hidden": !0
781
- }), /* @__PURE__ */ U("div", {
781
+ }), /* @__PURE__ */ W("div", {
782
782
  "data-testid": "card-body-skeleton-bar",
783
- className: J("h-4 w-1/2", t),
783
+ className: Y("h-4 w-1/2", t),
784
784
  "aria-hidden": !0
785
785
  })]
786
786
  })
@@ -793,56 +793,56 @@ var jt = {
793
793
  WebkitLineClamp: o,
794
794
  overflow: "hidden"
795
795
  } : S;
796
- return /* @__PURE__ */ W("div", {
796
+ return /* @__PURE__ */ G("div", {
797
797
  className: "shrink-0 px-4 py-3",
798
- children: [/* @__PURE__ */ W("div", {
798
+ children: [/* @__PURE__ */ G("div", {
799
799
  className: "flex items-end gap-3",
800
- children: [/* @__PURE__ */ W("div", {
800
+ children: [/* @__PURE__ */ G("div", {
801
801
  className: "flex min-w-0 flex-1 flex-col gap-[2px]",
802
802
  children: [
803
- m && /* @__PURE__ */ W("div", {
803
+ m && /* @__PURE__ */ G("div", {
804
804
  className: "flex min-w-0 items-center gap-2",
805
- children: [c ? /* @__PURE__ */ U("span", {
805
+ children: [c ? /* @__PURE__ */ W("span", {
806
806
  className: "shrink-0",
807
807
  children: c
808
- }) : null, /* @__PURE__ */ U("p", {
809
- className: J("min-w-0", y),
808
+ }) : null, /* @__PURE__ */ W("p", {
809
+ className: Y("min-w-0", y),
810
810
  style: S,
811
811
  children: p
812
812
  })]
813
813
  }),
814
- h && /* @__PURE__ */ U("p", {
814
+ h && /* @__PURE__ */ W("p", {
815
815
  className: x,
816
816
  style: C,
817
817
  children: a
818
818
  }),
819
- !v && _ && /* @__PURE__ */ U("p", {
819
+ !v && _ && /* @__PURE__ */ W("p", {
820
820
  className: b,
821
821
  style: S,
822
822
  "data-testid": "link-attachment-url",
823
823
  children: g
824
824
  })
825
825
  ]
826
- }), u && /* @__PURE__ */ U("div", {
826
+ }), u && /* @__PURE__ */ W("div", {
827
827
  className: "shrink-0",
828
828
  children: u
829
829
  })]
830
- }), l && /* @__PURE__ */ U(Mt, {
830
+ }), l && /* @__PURE__ */ W(Mt, {
831
831
  variant: t ?? e,
832
832
  cta: l
833
833
  })]
834
834
  });
835
- }, Rt = "Loading link preview", zt = J("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), Bt = "flex h-[250px] flex-col", Vt = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d = "link-card" }) => {
836
- let f = J("messaging-link-card", zt, l ? Bt : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
835
+ }, Rt = "Loading link preview", zt = Y("relative w-[var(--lt-msg-card-width,290px)] max-w-full select-none overflow-hidden", "rounded-[20px]"), Bt = "flex h-[250px] flex-col", Vt = ({ variant: e, children: t, href: n, onClick: r, ariaLabel: i, rootRef: a, topRight: o, bgClassName: s, accentHex: c, fixedHeight: l = !1, busy: u = !1, "data-testid": d = "link-card" }) => {
836
+ let f = Y("messaging-link-card", zt, l ? Bt : "block", s ?? (e === "dark" ? "bg-[#1e2330]" : "bg-[#f1f0ee]"), n != null || r != null ? "cursor-pointer no-underline focus-ring" : null), p = u ? {
837
837
  role: "status",
838
838
  "aria-busy": !0,
839
839
  "aria-label": Rt
840
- } : void 0, m = c ? { "--accent": c } : void 0, h = o ? /* @__PURE__ */ U("div", {
840
+ } : void 0, m = c ? { "--accent": c } : void 0, h = o ? /* @__PURE__ */ W("div", {
841
841
  "data-testid": "card-shell-top-right",
842
842
  className: "pointer-events-auto absolute right-3 top-3 z-10",
843
843
  children: o
844
844
  }) : null;
845
- return n ? /* @__PURE__ */ W("a", {
845
+ return n ? /* @__PURE__ */ G("a", {
846
846
  ref: a,
847
847
  href: n,
848
848
  target: "_blank",
@@ -854,18 +854,18 @@ var jt = {
854
854
  style: m,
855
855
  ...p,
856
856
  children: [t, h]
857
- }) : r ? /* @__PURE__ */ W("button", {
857
+ }) : r ? /* @__PURE__ */ G("button", {
858
858
  ref: a,
859
859
  type: "button",
860
860
  onClick: r,
861
861
  "aria-label": i,
862
862
  "data-testid": d,
863
863
  "data-variant": e,
864
- className: J(f, "text-left"),
864
+ className: Y(f, "text-left"),
865
865
  style: m,
866
866
  ...p,
867
867
  children: [t, h]
868
- }) : /* @__PURE__ */ W("div", {
868
+ }) : /* @__PURE__ */ G("div", {
869
869
  ref: a,
870
870
  "data-testid": d,
871
871
  "data-variant": e,
@@ -886,26 +886,26 @@ var jt = {
886
886
  return r === "video" || r === "audio";
887
887
  }, Kt = "bg-[#F2F3F4]", qt = ({ variant: r, thumbnailUrl: i, sourceUrl: o, title: s, mimeType: c = "image/*", topLeft: l, topRight: u, isLoading: d = !1, onImageError: f }) => {
888
888
  let p = t(c), m = !!o && p === "video", h = a(i);
889
- return !d && Wt(c, o) ? /* @__PURE__ */ U("div", {
889
+ return !d && Wt(c, o) ? /* @__PURE__ */ W("div", {
890
890
  className: "p-3",
891
- children: /* @__PURE__ */ U("audio", {
891
+ children: /* @__PURE__ */ W("audio", {
892
892
  ...e,
893
893
  "data-testid": "card-thumbnail-audio",
894
894
  src: o,
895
895
  controls: !0,
896
896
  preload: "metadata",
897
897
  className: "block w-full",
898
- children: /* @__PURE__ */ U("track", { kind: "captions" })
898
+ children: /* @__PURE__ */ W("track", { kind: "captions" })
899
899
  })
900
- }) : /* @__PURE__ */ W("div", {
900
+ }) : /* @__PURE__ */ G("div", {
901
901
  "data-testid": "card-thumbnail-hero",
902
- className: J("relative min-h-0 w-full flex-1 overflow-hidden", m && "bg-black"),
902
+ className: Y("relative min-h-0 w-full flex-1 overflow-hidden", m && "bg-black"),
903
903
  children: [
904
- d ? /* @__PURE__ */ U("div", {
904
+ d ? /* @__PURE__ */ W("div", {
905
905
  "data-testid": "card-thumbnail-skeleton",
906
- className: J("h-full w-full animate-pulse", Ht[r]),
906
+ className: Y("h-full w-full animate-pulse", Ht[r]),
907
907
  "aria-hidden": !0
908
- }) : m ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("video", {
908
+ }) : m ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("video", {
909
909
  "data-testid": "card-thumbnail-video",
910
910
  src: o,
911
911
  poster: h,
@@ -913,14 +913,14 @@ var jt = {
913
913
  playsInline: !0,
914
914
  preload: "metadata",
915
915
  className: "absolute inset-0 h-full w-full object-contain",
916
- children: /* @__PURE__ */ U("track", { kind: "captions" })
917
- }), h && f ? /* @__PURE__ */ U("img", {
916
+ children: /* @__PURE__ */ W("track", { kind: "captions" })
917
+ }), h && f ? /* @__PURE__ */ W("img", {
918
918
  src: h,
919
919
  alt: "",
920
920
  "aria-hidden": !0,
921
921
  onError: f,
922
922
  className: "hidden"
923
- }) : null] }) : i ? /* @__PURE__ */ U("img", {
923
+ }) : null] }) : i ? /* @__PURE__ */ W("img", {
924
924
  src: h ?? i,
925
925
  alt: s ?? "",
926
926
  draggable: !1,
@@ -928,20 +928,20 @@ var jt = {
928
928
  decoding: "async",
929
929
  onError: f,
930
930
  className: "absolute inset-0 h-full w-full object-cover"
931
- }) : /* @__PURE__ */ U("div", {
931
+ }) : /* @__PURE__ */ W("div", {
932
932
  "data-testid": "card-thumbnail-placeholder",
933
- className: J("flex h-full w-full items-center justify-center", Ht[r]),
933
+ className: Y("flex h-full w-full items-center justify-center", Ht[r]),
934
934
  children: n(c, {
935
935
  className: Ut[r],
936
936
  weight: "regular"
937
937
  })
938
938
  }),
939
- l ? /* @__PURE__ */ U("div", {
939
+ l ? /* @__PURE__ */ W("div", {
940
940
  "data-testid": "card-thumbnail-top-left",
941
941
  className: "pointer-events-auto absolute left-3 top-3 z-10",
942
942
  children: l
943
943
  }) : null,
944
- u ? /* @__PURE__ */ U("div", {
944
+ u ? /* @__PURE__ */ W("div", {
945
945
  "data-testid": "card-thumbnail-top-right",
946
946
  className: "pointer-events-auto absolute right-3 top-3 z-10",
947
947
  children: u
@@ -987,50 +987,50 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
987
987
  thumbnailUrl: o,
988
988
  mimeType: a,
989
989
  sourceUrl: s
990
- }), y = p ? /* @__PURE__ */ U("button", {
990
+ }), y = p ? /* @__PURE__ */ W("button", {
991
991
  type: "button",
992
992
  onClick: p,
993
993
  "aria-label": h,
994
- className: J(en, !_ && tn),
995
- children: /* @__PURE__ */ U(Je, {
994
+ className: Y(en, !_ && tn),
995
+ children: /* @__PURE__ */ W(qe, {
996
996
  className: "size-3",
997
997
  weight: "bold"
998
998
  })
999
- }) : void 0, b = m ? /* @__PURE__ */ U("button", {
999
+ }) : void 0, b = m ? /* @__PURE__ */ W("button", {
1000
1000
  type: "button",
1001
1001
  onClick: m,
1002
1002
  "aria-label": "Edit attachment",
1003
1003
  className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
1004
- children: /* @__PURE__ */ U(Le, {
1004
+ children: /* @__PURE__ */ W(Ie, {
1005
1005
  className: "size-5",
1006
1006
  weight: "regular"
1007
1007
  })
1008
1008
  }) : void 0;
1009
- return _ && !v.isLoading ? /* @__PURE__ */ U(Vt, {
1009
+ return _ && !v.isLoading ? /* @__PURE__ */ W(Vt, {
1010
1010
  variant: "dark",
1011
1011
  bgClassName: Kt,
1012
- children: /* @__PURE__ */ W("div", {
1012
+ children: /* @__PURE__ */ G("div", {
1013
1013
  className: "flex items-center gap-2 pr-3",
1014
- children: [/* @__PURE__ */ U("div", {
1014
+ children: [/* @__PURE__ */ W("div", {
1015
1015
  className: "min-w-0 flex-1",
1016
- children: /* @__PURE__ */ U(qt, {
1016
+ children: /* @__PURE__ */ W(qt, {
1017
1017
  variant: "dark",
1018
1018
  sourceUrl: s,
1019
1019
  title: e,
1020
1020
  mimeType: a
1021
1021
  })
1022
- }), y && /* @__PURE__ */ U("div", {
1022
+ }), y && /* @__PURE__ */ W("div", {
1023
1023
  className: "shrink-0",
1024
1024
  children: y
1025
1025
  })]
1026
1026
  })
1027
- }) : /* @__PURE__ */ W(Vt, {
1027
+ }) : /* @__PURE__ */ G(Vt, {
1028
1028
  variant: "dark",
1029
1029
  fixedHeight: !g,
1030
1030
  accentHex: v.accentHex,
1031
1031
  busy: v.isLoading,
1032
1032
  topRight: g ? y : void 0,
1033
- children: [!g && /* @__PURE__ */ U(qt, {
1033
+ children: [!g && /* @__PURE__ */ W(qt, {
1034
1034
  variant: "dark",
1035
1035
  thumbnailUrl: v.thumbnailUrl,
1036
1036
  sourceUrl: s,
@@ -1039,7 +1039,7 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1039
1039
  topRight: y,
1040
1040
  isLoading: v.isLoading,
1041
1041
  onImageError: v.onImageError
1042
- }), /* @__PURE__ */ U(Lt, {
1042
+ }), /* @__PURE__ */ W(Lt, {
1043
1043
  chinTextColor: v.chinTextColor,
1044
1044
  variant: "dark",
1045
1045
  ctaSurface: v.surface,
@@ -1054,16 +1054,16 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1054
1054
  isLoading: v.isLoading
1055
1055
  })]
1056
1056
  });
1057
- }, rn = ({ accentHex: e, side: t, visible: n, children: r }) => n ? /* @__PURE__ */ W("div", {
1057
+ }, rn = ({ accentHex: e, side: t, visible: n, children: r }) => n ? /* @__PURE__ */ G("div", {
1058
1058
  className: "relative isolate w-fit",
1059
- children: [r, /* @__PURE__ */ U("span", {
1059
+ children: [r, /* @__PURE__ */ W("span", {
1060
1060
  "aria-hidden": !0,
1061
1061
  "data-testid": "link-card-tail",
1062
1062
  "data-variant": t === "sender" ? "dark" : "light",
1063
1063
  style: e ? { "--accent": e } : void 0,
1064
- className: J("messaging-link-card-tail", t === "receiver" && "messaging-link-card-tail--received")
1064
+ className: Y("messaging-link-card-tail", t === "receiver" && "messaging-link-card-tail--received")
1065
1065
  })]
1066
- }) : /* @__PURE__ */ U(H, { children: r }), an = {
1066
+ }) : /* @__PURE__ */ W(U, { children: r }), an = {
1067
1067
  Composer: nn,
1068
1068
  Sent: ({ title: e, placeholderTitle: t, description: n, descriptionLines: r, url: i, mimeType: a, thumbnailUrl: o, sourceUrl: s, layout: c = "featured", appIcon: l, cta: u, accentColor: d, status: f = "ready", onClick: p, groupPosition: m = "single" }) => {
1069
1069
  let h = Gt(a, s), g = At(i), _ = u == null && g != null && !h ? g : void 0, v = u == null && !h && _ != null ? p : void 0, y = f !== "loading" && Wt(a, s), b = $t({
@@ -1075,11 +1075,11 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1075
1075
  mimeType: a,
1076
1076
  sourceUrl: s
1077
1077
  });
1078
- return /* @__PURE__ */ U(rn, {
1078
+ return /* @__PURE__ */ W(rn, {
1079
1079
  accentHex: b.accentHex,
1080
1080
  side: "sender",
1081
1081
  visible: !y && (m === "single" || m === "end"),
1082
- children: /* @__PURE__ */ W(Vt, {
1082
+ children: /* @__PURE__ */ G(Vt, {
1083
1083
  variant: "dark",
1084
1084
  href: _,
1085
1085
  onClick: v,
@@ -1087,7 +1087,7 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1087
1087
  accentHex: b.accentHex,
1088
1088
  busy: b.isLoading,
1089
1089
  bgClassName: y ? Kt : void 0,
1090
- children: [c === "featured" && /* @__PURE__ */ U(qt, {
1090
+ children: [c === "featured" && /* @__PURE__ */ W(qt, {
1091
1091
  variant: "dark",
1092
1092
  thumbnailUrl: b.thumbnailUrl,
1093
1093
  sourceUrl: s,
@@ -1095,7 +1095,7 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1095
1095
  mimeType: a,
1096
1096
  isLoading: b.isLoading,
1097
1097
  onImageError: b.onImageError
1098
- }), /* @__PURE__ */ U(Lt, {
1098
+ }), /* @__PURE__ */ W(Lt, {
1099
1099
  chinTextColor: b.chinTextColor,
1100
1100
  variant: "dark",
1101
1101
  ctaSurface: b.surface,
@@ -1126,11 +1126,11 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1126
1126
  mimeType: i,
1127
1127
  sourceUrl: o
1128
1128
  });
1129
- return /* @__PURE__ */ U(rn, {
1129
+ return /* @__PURE__ */ W(rn, {
1130
1130
  accentHex: b.accentHex,
1131
1131
  side: "receiver",
1132
1132
  visible: v == null && (p === "single" || p === "end"),
1133
- children: /* @__PURE__ */ W(Vt, {
1133
+ children: /* @__PURE__ */ G(Vt, {
1134
1134
  variant: "light",
1135
1135
  href: g,
1136
1136
  onClick: _,
@@ -1140,7 +1140,7 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1140
1140
  busy: b.isLoading,
1141
1141
  bgClassName: v,
1142
1142
  "data-testid": "link-attachment",
1143
- children: [s === "featured" && /* @__PURE__ */ U(qt, {
1143
+ children: [s === "featured" && /* @__PURE__ */ W(qt, {
1144
1144
  variant: "light",
1145
1145
  thumbnailUrl: b.thumbnailUrl,
1146
1146
  sourceUrl: o,
@@ -1148,7 +1148,7 @@ var en = "flex size-6 items-center justify-center rounded-full bg-[#121110] text
1148
1148
  mimeType: i,
1149
1149
  isLoading: b.isLoading,
1150
1150
  onImageError: b.onImageError
1151
- }), /* @__PURE__ */ U(Lt, {
1151
+ }), /* @__PURE__ */ W(Lt, {
1152
1152
  chinTextColor: b.chinTextColor,
1153
1153
  variant: "light",
1154
1154
  ctaSurface: b.surface,
@@ -1177,53 +1177,53 @@ function un(e) {
1177
1177
  }
1178
1178
  //#endregion
1179
1179
  //#region src/components/CustomMessage/LockedAttachment/index.tsx
1180
- var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import("./Card-BhwBkgxI.js")), pn = () => /* @__PURE__ */ U("div", {
1180
+ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import("./Card-BhwBkgxI.js")), pn = () => /* @__PURE__ */ W("div", {
1181
1181
  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)]",
1182
1182
  "aria-hidden": !0
1183
- }), mn = (e) => /* @__PURE__ */ U(s, {
1184
- fallback: /* @__PURE__ */ U(pn, {}),
1185
- children: e.contentType === "text" ? /* @__PURE__ */ U(dn, { ...e }) : /* @__PURE__ */ U(fn, { ...e })
1186
- }), hn = ({ size: e = 15 }) => /* @__PURE__ */ U("svg", {
1183
+ }), mn = (e) => /* @__PURE__ */ W(s, {
1184
+ fallback: /* @__PURE__ */ W(pn, {}),
1185
+ children: e.contentType === "text" ? /* @__PURE__ */ W(dn, { ...e }) : /* @__PURE__ */ W(fn, { ...e })
1186
+ }), hn = ({ size: e = 15 }) => /* @__PURE__ */ W("svg", {
1187
1187
  width: e,
1188
1188
  height: e,
1189
1189
  viewBox: "0 0 15 15",
1190
1190
  fill: "none",
1191
1191
  "aria-hidden": "true",
1192
- children: /* @__PURE__ */ U("path", {
1192
+ children: /* @__PURE__ */ W("path", {
1193
1193
  d: "M12.003 9a.985.985 0 0 1-.652.934l-3.223 1.191-1.188 3.226a.995.995 0 0 1-1.867 0l-1.195-3.226L.65 9.937a.995.995 0 0 1 0-1.867l3.227-1.195 1.187-3.226a.995.995 0 0 1 1.868 0l1.195 3.226 3.226 1.187a.99.99 0 0 1 .649.938m3-5.83a.52.52 0 0 1-.344.492l-1.702.63-.627 1.703a.525.525 0 0 1-.986 0l-.63-1.704-1.704-.627a.525.525 0 0 1 0-.986l1.703-.63.627-1.704a.526.526 0 0 1 .986 0l.631 1.703 1.704.627a.52.52 0 0 1 .342.495",
1194
1194
  fill: "currentColor",
1195
1195
  fillOpacity: .55
1196
1196
  })
1197
- }), gn = (e) => e.metadata?.custom_type === G.PAID, _n = (e) => e.metadata?.custom_type === G.CHATBOT, vn = (e) => e.metadata?.custom_type === G.ATTACHMENT, yn = (e) => vn(e) && e.metadata?.attachment_content_type === "text", bn = (e) => vn(e) && e.metadata?.attachment_content_type !== "text", xn = (e) => gn(e) && !!e.metadata?.amount_text, Sn = ({ message: e, isMyMessage: t = !1, hasAttachment: n = !1 }) => {
1197
+ }), gn = (e) => e.metadata?.custom_type === K.PAID, _n = (e) => e.metadata?.custom_type === K.CHATBOT, vn = (e) => e.metadata?.custom_type === K.ATTACHMENT, yn = (e) => vn(e) && e.metadata?.attachment_content_type === "text", bn = (e) => vn(e) && e.metadata?.attachment_content_type !== "text", xn = (e) => gn(e) && !!e.metadata?.amount_text, Sn = ({ message: e, isMyMessage: t = !1, hasAttachment: n = !1 }) => {
1198
1198
  let r = gn(e), i = _n(e);
1199
1199
  if (!r && !i) return null;
1200
1200
  if (r) {
1201
1201
  let t = e.metadata?.amount_text;
1202
- return t ? /* @__PURE__ */ W("div", {
1202
+ return t ? /* @__PURE__ */ G("div", {
1203
1203
  className: "message-tag--paid inline-flex items-center gap-1 text-[12px] font-medium leading-[2] text-[#016630]",
1204
- children: [/* @__PURE__ */ U(Fe, { size: 12 }), /* @__PURE__ */ W("span", { children: [
1204
+ children: [/* @__PURE__ */ W(Pe, { size: 12 }), /* @__PURE__ */ G("span", { children: [
1205
1205
  "Delivered with ",
1206
1206
  t,
1207
1207
  " message"
1208
1208
  ] })]
1209
1209
  }) : null;
1210
1210
  }
1211
- let a = t && n, o = a ? "Sent with AI" : "Sent by AI Assistant", s = a ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", c = /* @__PURE__ */ U("span", {
1211
+ let a = t && n, o = a ? "Sent with AI" : "Sent by AI Assistant", s = a ? "justify-end gap-2 text-black/30" : t ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", c = /* @__PURE__ */ W("span", {
1212
1212
  className: "text-left",
1213
1213
  children: o
1214
- }), l = /* @__PURE__ */ U("span", {
1214
+ }), l = /* @__PURE__ */ W("span", {
1215
1215
  className: "inline-flex items-center leading-none",
1216
- children: /* @__PURE__ */ U(hn, { size: a ? 12 : 15 })
1216
+ children: /* @__PURE__ */ W(hn, { size: a ? 12 : 15 })
1217
1217
  });
1218
- return /* @__PURE__ */ U("div", {
1218
+ return /* @__PURE__ */ W("div", {
1219
1219
  className: `inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px] ${s}`,
1220
1220
  "data-testid": "message-chatbot-indicator",
1221
- children: t && !a ? /* @__PURE__ */ W(H, { children: [c, l] }) : /* @__PURE__ */ W(H, { children: [l, c] })
1221
+ children: t && !a ? /* @__PURE__ */ G(U, { children: [c, l] }) : /* @__PURE__ */ G(U, { children: [l, c] })
1222
1222
  });
1223
1223
  }, Cn = "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%", wn = {
1224
1224
  me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
1225
1225
  other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
1226
- }, Tn = ({ side: e }) => /* @__PURE__ */ U("span", {
1226
+ }, Tn = ({ side: e }) => /* @__PURE__ */ W("span", {
1227
1227
  "aria-hidden": "true",
1228
1228
  className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
1229
1229
  style: {
@@ -1260,85 +1260,85 @@ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import(".
1260
1260
  }, An = (e, t) => {
1261
1261
  let n = On(e, t), [r, i] = h(n);
1262
1262
  return kn(r, n) ? r : (i(n), n);
1263
- }, jn = (e) => e.metadata?.custom_type === G.TIP, Mn = ({ message: e }) => {
1263
+ }, jn = (e) => e.metadata?.custom_type === K.TIP, Mn = ({ message: e }) => {
1264
1264
  let t = e.metadata?.amount_text;
1265
- return t ? /* @__PURE__ */ W("div", {
1265
+ return t ? /* @__PURE__ */ G("div", {
1266
1266
  className: "message-tip-pill inline-flex items-end gap-0.5 max-w-[520px] rounded-[1.5rem] bg-[#43e660] px-4 py-3 text-white",
1267
- children: [/* @__PURE__ */ U("span", {
1267
+ children: [/* @__PURE__ */ W("span", {
1268
1268
  className: "flex h-5 items-center text-[20px] leading-none",
1269
1269
  "aria-hidden": "true",
1270
1270
  children: "🎁"
1271
- }), /* @__PURE__ */ W("span", {
1271
+ }), /* @__PURE__ */ G("span", {
1272
1272
  className: "text-[14px] font-bold leading-[1.43] tracking-[0.28px] text-[rgba(4,4,3,0.9)]",
1273
1273
  children: [t, " tip!"]
1274
1274
  })]
1275
1275
  }) : null;
1276
1276
  }, Nn = () => {
1277
- let { message: e } = V("SentMessageDeliveryStatus"), { messages: t } = me("SentMessageDeliveryStatus"), n = (() => {
1277
+ let { message: e } = H("SentMessageDeliveryStatus"), { messages: t } = V("SentMessageDeliveryStatus"), n = (() => {
1278
1278
  if (t) for (let e = t.length - 1; e >= 0; --e) {
1279
1279
  let n = t[e];
1280
1280
  if (n.type !== "system" && n.type !== "ephemeral" && n.type !== "deleted") return n.id;
1281
1281
  }
1282
1282
  })();
1283
1283
  return e.id === n;
1284
- }, Pn = () => Nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(je, {
1284
+ }, Pn = () => Nn() ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(Ae, {
1285
1285
  weight: "bold",
1286
1286
  "aria-hidden": "true"
1287
- }), /* @__PURE__ */ U("span", {
1287
+ }), /* @__PURE__ */ W("span", {
1288
1288
  "data-testid": "sent-message-delivery-status",
1289
1289
  children: "Delivered"
1290
- })] }) : null, Fn = () => Nn() ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Me, {
1290
+ })] }) : null, Fn = () => Nn() ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(je, {
1291
1291
  className: "sent-message-status__spinner animate-spin",
1292
1292
  weight: "bold",
1293
1293
  "aria-hidden": "true"
1294
- }), /* @__PURE__ */ U("span", {
1294
+ }), /* @__PURE__ */ W("span", {
1295
1295
  "data-testid": "sent-message-sending-status",
1296
1296
  children: "Sending"
1297
1297
  })] }) : null, In = ({ outbound: e, onOutboundClick: t }) => {
1298
- let n = e.name || "Broadcast", r = /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("span", {
1298
+ let n = e.name || "Broadcast", r = /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
1299
1299
  className: "sent-message-outbound-badge",
1300
1300
  "aria-hidden": "true",
1301
- children: /* @__PURE__ */ U(Ie, { weight: "fill" })
1302
- }), /* @__PURE__ */ U("span", {
1303
- className: J("sent-message-outbound-name", { "underline [text-decoration-skip-ink:auto]": !!t }),
1301
+ children: /* @__PURE__ */ W(Fe, { weight: "fill" })
1302
+ }), /* @__PURE__ */ W("span", {
1303
+ className: Y("sent-message-outbound-name", { "underline [text-decoration-skip-ink:auto]": !!t }),
1304
1304
  "data-testid": "sent-message-outbound-status",
1305
1305
  children: n
1306
1306
  })] });
1307
- return t ? /* @__PURE__ */ U("button", {
1307
+ return t ? /* @__PURE__ */ W("button", {
1308
1308
  type: "button",
1309
1309
  className: "inline-flex cursor-pointer items-center gap-1 border-0 bg-transparent p-0 text-inherit [font:inherit]",
1310
1310
  "aria-label": `View broadcast ${n}`,
1311
1311
  onClick: () => t(e),
1312
1312
  children: r
1313
1313
  }) : r;
1314
- }, Ln = () => /* @__PURE__ */ W("span", {
1314
+ }, Ln = () => /* @__PURE__ */ G("span", {
1315
1315
  className: "str-chat__message-status sent-message-status--failed",
1316
- children: [/* @__PURE__ */ U(qe, {
1316
+ children: [/* @__PURE__ */ W(Ke, {
1317
1317
  weight: "bold",
1318
1318
  "aria-hidden": "true"
1319
- }), /* @__PURE__ */ U("span", {
1319
+ }), /* @__PURE__ */ W("span", {
1320
1320
  "data-testid": "sent-message-failed-status",
1321
1321
  children: "Failed to send"
1322
1322
  })]
1323
1323
  }), Rn = ({ onOutboundClick: e, resolvedOutbound: t }) => {
1324
- let { isMyMessage: n, message: r, threadList: i } = V("SentMessageDeliveryStatus"), a = n(), o = Nn();
1324
+ let { isMyMessage: n, message: r, threadList: i } = H("SentMessageDeliveryStatus"), a = n(), o = Nn();
1325
1325
  if (i) return null;
1326
- if (r.status === "failed" && a && r.type !== "error") return /* @__PURE__ */ U(Ln, {});
1326
+ if (r.status === "failed" && a && r.type !== "error") return /* @__PURE__ */ W(Ln, {});
1327
1327
  if (!a) return null;
1328
- let s = r.metadata?.outbound_id, c = r.status !== "sending" && r.status !== "failed" && s && t ? /* @__PURE__ */ U(In, {
1328
+ let s = r.metadata?.outbound_id, c = r.status !== "sending" && r.status !== "failed" && s && t ? /* @__PURE__ */ W(In, {
1329
1329
  outbound: t,
1330
1330
  onOutboundClick: e
1331
- }) : null, l = xn(r) ? null : /* @__PURE__ */ U(L, {
1331
+ }) : null, l = xn(r) ? null : /* @__PURE__ */ W(L, {
1332
1332
  MessageSentStatus: Pn,
1333
1333
  MessageDeliveredStatus: Pn,
1334
1334
  MessageReadStatus: Pn,
1335
1335
  MessageSendingStatus: jn(r) ? Pn : Fn
1336
1336
  });
1337
- return c ? /* @__PURE__ */ W("span", {
1337
+ return c ? /* @__PURE__ */ G("span", {
1338
1338
  className: "sent-message-status-row",
1339
1339
  children: [
1340
1340
  l,
1341
- l && o && /* @__PURE__ */ U("span", {
1341
+ l && o && /* @__PURE__ */ W("span", {
1342
1342
  className: "sent-message-outbound-separator",
1343
1343
  "aria-hidden": "true",
1344
1344
  children: "•"
@@ -1370,23 +1370,23 @@ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import(".
1370
1370
  }
1371
1371
  }, Wn = ({ variant: e, text: t, bordered: n = !0, groupPosition: r = "single", widthClassName: i = "w-[280px]", paddingClassName: a = "px-2 py-2", radiusClassName: o, className: s, children: c, "data-testid": l }) => {
1372
1372
  let u = t != null && t !== "", d = o ?? Un[Hn(e)][r];
1373
- return /* @__PURE__ */ W("div", {
1373
+ return /* @__PURE__ */ G("div", {
1374
1374
  "data-testid": l,
1375
1375
  "data-group-position": r,
1376
- className: J("relative", i, "overflow-hidden", a, u && "pb-0", d, zn[e], Bn[e], n && "border", n && Vn[e], s),
1377
- children: [c, u ? /* @__PURE__ */ U("p", {
1378
- className: J("whitespace-pre-wrap break-words leading-snug hyphens-manual", "pb-2 pt-2", "px-2"),
1376
+ className: Y("relative", i, "overflow-hidden", a, u && "pb-0", d, zn[e], Bn[e], n && "border", n && Vn[e], s),
1377
+ children: [c, u ? /* @__PURE__ */ W("p", {
1378
+ className: Y("whitespace-pre-wrap break-words leading-snug hyphens-manual", "pb-2 pt-2", "px-2"),
1379
1379
  children: t
1380
1380
  }) : null]
1381
1381
  });
1382
- }, Gn = ({ onClick: e, variant: t = "overlay", ariaLabel: n = "Dismiss attachment" }) => /* @__PURE__ */ U("button", {
1382
+ }, Gn = ({ onClick: e, variant: t = "overlay", ariaLabel: n = "Dismiss attachment" }) => /* @__PURE__ */ W("button", {
1383
1383
  type: "button",
1384
1384
  onClick: (t) => {
1385
1385
  t.stopPropagation(), e();
1386
1386
  },
1387
1387
  "aria-label": n,
1388
- className: J("flex size-6 items-center justify-center rounded-full text-white", t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"),
1389
- children: /* @__PURE__ */ U(Je, {
1388
+ className: Y("flex size-6 items-center justify-center rounded-full text-white", t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"),
1389
+ children: /* @__PURE__ */ W(qe, {
1390
1390
  className: "size-3",
1391
1391
  weight: "bold"
1392
1392
  })
@@ -1394,15 +1394,15 @@ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import(".
1394
1394
  src: e,
1395
1395
  mimeType: t,
1396
1396
  filename: n
1397
- }] : [], Yn = ({ item: t, preload: n, trailingAction: r }) => /* @__PURE__ */ W("div", {
1397
+ }] : [], Yn = ({ item: t, preload: n, trailingAction: r }) => /* @__PURE__ */ G("div", {
1398
1398
  className: "flex items-center gap-2",
1399
- children: [/* @__PURE__ */ U("audio", {
1399
+ children: [/* @__PURE__ */ W("audio", {
1400
1400
  ...e,
1401
1401
  src: t.src,
1402
1402
  controls: !0,
1403
1403
  preload: t.preload ?? n,
1404
1404
  className: "block min-w-0 flex-1",
1405
- children: t.mimeType ? /* @__PURE__ */ U("source", {
1405
+ children: t.mimeType ? /* @__PURE__ */ W("source", {
1406
1406
  src: t.src,
1407
1407
  type: t.mimeType
1408
1408
  }) : null
@@ -1416,17 +1416,17 @@ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import(".
1416
1416
  });
1417
1417
  if (d.length === 0) return null;
1418
1418
  let f = s ?? (d.length > 1 ? "none" : "metadata");
1419
- return /* @__PURE__ */ U(Wn, {
1419
+ return /* @__PURE__ */ W(Wn, {
1420
1420
  variant: l,
1421
1421
  text: a,
1422
1422
  groupPosition: o,
1423
1423
  "data-testid": "audio-attachment",
1424
- children: /* @__PURE__ */ U("div", {
1424
+ children: /* @__PURE__ */ W("div", {
1425
1425
  className: "flex flex-col gap-2",
1426
- children: d.map((e, t) => /* @__PURE__ */ U(Yn, {
1426
+ children: d.map((e, t) => /* @__PURE__ */ W(Yn, {
1427
1427
  item: e,
1428
1428
  preload: f,
1429
- trailingAction: u && t === 0 ? /* @__PURE__ */ U(Gn, {
1429
+ trailingAction: u && t === 0 ? /* @__PURE__ */ W(Gn, {
1430
1430
  onClick: c,
1431
1431
  variant: "inline"
1432
1432
  }) : void 0
@@ -1434,15 +1434,15 @@ var dn = o.lazy(() => import("./Card-C7uLQbYz.js")), fn = o.lazy(() => import(".
1434
1434
  })
1435
1435
  });
1436
1436
  }, Zn = {
1437
- Composer: (e) => /* @__PURE__ */ U(Xn, {
1437
+ Composer: (e) => /* @__PURE__ */ W(Xn, {
1438
1438
  ...e,
1439
1439
  state: "composer"
1440
1440
  }),
1441
- Sent: (e) => /* @__PURE__ */ U(Xn, {
1441
+ Sent: (e) => /* @__PURE__ */ W(Xn, {
1442
1442
  ...e,
1443
1443
  state: "sent"
1444
1444
  }),
1445
- Received: (e) => /* @__PURE__ */ U(Xn, {
1445
+ Received: (e) => /* @__PURE__ */ W(Xn, {
1446
1446
  ...e,
1447
1447
  state: "received"
1448
1448
  })
@@ -1502,32 +1502,32 @@ var nr = {
1502
1502
  dark: "text-white/85",
1503
1503
  light: "text-black/85"
1504
1504
  }, ar = ({ variant: e, filename: t, title: r, mimeType: i = "application/octet-stream", fileSize: a, onActivate: o, activateLabel: s, trailingAction: c }) => {
1505
- let l = r ?? t ?? "File", u = tr(i, t, a), d = /* @__PURE__ */ U("div", {
1506
- className: J("flex size-10 shrink-0 items-center justify-center rounded-sm", rr[e]),
1505
+ let l = r ?? t ?? "File", u = tr(i, t, a), d = /* @__PURE__ */ W("div", {
1506
+ className: Y("flex size-10 shrink-0 items-center justify-center rounded-sm", rr[e]),
1507
1507
  "aria-hidden": !0,
1508
1508
  children: n(i, {
1509
- className: J("size-6", ir[e]),
1509
+ className: Y("size-6", ir[e]),
1510
1510
  weight: "regular"
1511
1511
  })
1512
- }), f = /* @__PURE__ */ W("div", {
1512
+ }), f = /* @__PURE__ */ G("div", {
1513
1513
  className: "flex min-w-0 flex-1 flex-col text-left",
1514
- children: [/* @__PURE__ */ U("p", {
1514
+ children: [/* @__PURE__ */ W("p", {
1515
1515
  className: "truncate font-medium leading-snug",
1516
1516
  children: l
1517
- }), u ? /* @__PURE__ */ U("p", {
1518
- className: J("truncate text-xs leading-4", nr[e]),
1517
+ }), u ? /* @__PURE__ */ W("p", {
1518
+ className: Y("truncate text-xs leading-4", nr[e]),
1519
1519
  children: u
1520
1520
  }) : null]
1521
- }), p = o ? /* @__PURE__ */ W("button", {
1521
+ }), p = o ? /* @__PURE__ */ G("button", {
1522
1522
  type: "button",
1523
1523
  onClick: o,
1524
1524
  "aria-label": s,
1525
- className: J("flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors", e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"),
1525
+ className: Y("flex min-w-0 flex-1 items-center gap-3 rounded-sm text-left transition-colors", e === "dark" ? "hover:bg-white/[0.04]" : "hover:bg-black/[0.04]"),
1526
1526
  children: [d, f]
1527
- }) : /* @__PURE__ */ W(H, { children: [d, f] });
1528
- return /* @__PURE__ */ W("div", {
1527
+ }) : /* @__PURE__ */ G(U, { children: [d, f] });
1528
+ return /* @__PURE__ */ G("div", {
1529
1529
  className: "flex items-center gap-3 px-3 py-2",
1530
- children: [p, c ? /* @__PURE__ */ U("div", {
1530
+ children: [p, c ? /* @__PURE__ */ W("div", {
1531
1531
  className: "shrink-0",
1532
1532
  children: c
1533
1533
  }) : null]
@@ -1559,7 +1559,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1559
1559
  title: i
1560
1560
  }] : [], cr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
1561
1561
  let a = t.filename ?? Q(t.src);
1562
- return /* @__PURE__ */ U(ar, {
1562
+ return /* @__PURE__ */ W(ar, {
1563
1563
  variant: e,
1564
1564
  filename: a,
1565
1565
  title: t.title,
@@ -1585,27 +1585,27 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1585
1585
  or(t.src, n);
1586
1586
  };
1587
1587
  if (p.length === 0) return null;
1588
- let h = /* @__PURE__ */ U("span", {
1589
- className: J("flex size-8 items-center justify-center rounded-full", d === "dark" ? "text-white/70" : "text-black/70"),
1588
+ let h = /* @__PURE__ */ W("span", {
1589
+ className: Y("flex size-8 items-center justify-center rounded-full", d === "dark" ? "text-white/70" : "text-black/70"),
1590
1590
  "aria-hidden": !0,
1591
- children: /* @__PURE__ */ U(Y, {
1591
+ children: /* @__PURE__ */ W(X, {
1592
1592
  className: "size-5",
1593
1593
  weight: "bold"
1594
1594
  })
1595
1595
  });
1596
- return /* @__PURE__ */ U(Wn, {
1596
+ return /* @__PURE__ */ W(Wn, {
1597
1597
  variant: d,
1598
1598
  text: s,
1599
1599
  groupPosition: c,
1600
1600
  "data-testid": "file-attachment",
1601
- children: /* @__PURE__ */ U("div", {
1601
+ children: /* @__PURE__ */ W("div", {
1602
1602
  className: "flex flex-col gap-2",
1603
- children: p.map((e, t) => /* @__PURE__ */ U(cr, {
1603
+ children: p.map((e, t) => /* @__PURE__ */ W(cr, {
1604
1604
  variant: d,
1605
1605
  item: e,
1606
1606
  index: t,
1607
1607
  onActivate: m,
1608
- trailingAction: f && t === 0 ? /* @__PURE__ */ U(Gn, {
1608
+ trailingAction: f && t === 0 ? /* @__PURE__ */ W(Gn, {
1609
1609
  onClick: u,
1610
1610
  variant: "inline"
1611
1611
  }) : h
@@ -1613,34 +1613,34 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1613
1613
  })
1614
1614
  });
1615
1615
  }, ur = {
1616
- Composer: (e) => /* @__PURE__ */ U(lr, {
1616
+ Composer: (e) => /* @__PURE__ */ W(lr, {
1617
1617
  ...e,
1618
1618
  state: "composer"
1619
1619
  }),
1620
- Sent: (e) => /* @__PURE__ */ U(lr, {
1620
+ Sent: (e) => /* @__PURE__ */ W(lr, {
1621
1621
  ...e,
1622
1622
  state: "sent"
1623
1623
  }),
1624
- Received: (e) => /* @__PURE__ */ U(lr, {
1624
+ Received: (e) => /* @__PURE__ */ W(lr, {
1625
1625
  ...e,
1626
1626
  state: "received"
1627
1627
  })
1628
- }, dr = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", fr = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", pr = ({ onPrev: e, onNext: t, prevLabel: n = "Previous", nextLabel: r = "Next" }) => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("button", {
1628
+ }, dr = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", fr = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", pr = ({ onPrev: e, onNext: t, prevLabel: n = "Previous", nextLabel: r = "Next" }) => /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("button", {
1629
1629
  type: "button",
1630
1630
  onClick: e,
1631
1631
  "aria-label": n,
1632
1632
  className: `${fr} left-4`,
1633
- children: /* @__PURE__ */ U(ke, {
1633
+ children: /* @__PURE__ */ W(Oe, {
1634
1634
  size: 20,
1635
1635
  weight: "bold",
1636
1636
  "aria-hidden": !0
1637
1637
  })
1638
- }), /* @__PURE__ */ U("button", {
1638
+ }), /* @__PURE__ */ W("button", {
1639
1639
  type: "button",
1640
1640
  onClick: t,
1641
1641
  "aria-label": r,
1642
1642
  className: `${fr} right-4`,
1643
- children: /* @__PURE__ */ U(Ae, {
1643
+ children: /* @__PURE__ */ W(ke, {
1644
1644
  size: 20,
1645
1645
  weight: "bold",
1646
1646
  "aria-hidden": !0
@@ -1656,49 +1656,49 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1656
1656
  t,
1657
1657
  o
1658
1658
  ]), d = i ?? n !== "pill", f = {
1659
- className: J(n === "pill" ? "size-4" : "size-5", "shrink-0"),
1659
+ className: Y(n === "pill" ? "size-4" : "size-5", "shrink-0"),
1660
1660
  weight: "bold"
1661
1661
  };
1662
- return n === "inline" ? /* @__PURE__ */ U("button", {
1662
+ return n === "inline" ? /* @__PURE__ */ W("button", {
1663
1663
  type: "button",
1664
1664
  onClick: u,
1665
1665
  disabled: s,
1666
1666
  "aria-label": r,
1667
- className: J("flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70", {
1667
+ className: Y("flex size-8 shrink-0 items-center justify-center rounded-full transition-colors disabled:opacity-70", {
1668
1668
  dark: "text-white/70 hover:bg-white/[0.08] hover:text-white",
1669
1669
  light: "text-black/70 hover:bg-black/[0.08] hover:text-black"
1670
1670
  }[a]),
1671
- children: s ? /* @__PURE__ */ U(Me, {
1671
+ children: s ? /* @__PURE__ */ W(je, {
1672
1672
  className: "size-4 animate-spin",
1673
1673
  weight: "bold",
1674
1674
  "aria-hidden": !0
1675
- }) : /* @__PURE__ */ U(Y, {
1675
+ }) : /* @__PURE__ */ W(X, {
1676
1676
  className: "size-5 shrink-0",
1677
1677
  weight: "bold",
1678
1678
  "aria-hidden": !0
1679
1679
  })
1680
- }) : n === "viewer" ? /* @__PURE__ */ U("button", {
1680
+ }) : n === "viewer" ? /* @__PURE__ */ W("button", {
1681
1681
  type: "button",
1682
1682
  onClick: u,
1683
1683
  disabled: s,
1684
1684
  "aria-label": r,
1685
1685
  className: dr,
1686
- children: U(s ? Me : Y, {
1686
+ children: W(s ? je : X, {
1687
1687
  size: 20,
1688
1688
  weight: "bold",
1689
1689
  "aria-hidden": !0
1690
1690
  })
1691
- }) : /* @__PURE__ */ W("button", {
1691
+ }) : /* @__PURE__ */ G("button", {
1692
1692
  type: "button",
1693
1693
  onClick: u,
1694
1694
  disabled: s,
1695
1695
  "aria-label": d ? r : void 0,
1696
- className: J("mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70", a === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"),
1697
- children: [s ? /* @__PURE__ */ U(Me, {
1696
+ className: Y("mt-3 inline-flex h-10 w-full items-center justify-center gap-2 rounded-full px-4 text-sm font-medium leading-none transition-colors disabled:opacity-70", a === "dark" ? "bg-[#121110] text-white hover:bg-[#2a2928]" : "bg-white text-[#121110] hover:bg-white/90"),
1697
+ children: [s ? /* @__PURE__ */ W(je, {
1698
1698
  className: "size-4 animate-spin",
1699
1699
  weight: "bold",
1700
1700
  "aria-hidden": !0
1701
- }) : /* @__PURE__ */ U(Y, {
1701
+ }) : /* @__PURE__ */ W(X, {
1702
1702
  ...f,
1703
1703
  "aria-hidden": !0
1704
1704
  }), d ? null : r]
@@ -1773,7 +1773,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1773
1773
  else t.removeAttribute("open");
1774
1774
  }
1775
1775
  }
1776
- }, [e]), /* @__PURE__ */ W("dialog", {
1776
+ }, [e]), /* @__PURE__ */ G("dialog", {
1777
1777
  ref: s,
1778
1778
  className: "mes-media-viewer",
1779
1779
  "aria-label": n ?? "Attachment viewer",
@@ -1784,27 +1784,27 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1784
1784
  onClick: (e) => {
1785
1785
  e.target === s.current && t();
1786
1786
  },
1787
- children: [/* @__PURE__ */ W("div", {
1787
+ children: [/* @__PURE__ */ G("div", {
1788
1788
  className: "pointer-events-none absolute inset-x-3 top-3 z-[1] flex items-center justify-between gap-3",
1789
- children: [r ? /* @__PURE__ */ U("span", {
1789
+ children: [r ? /* @__PURE__ */ W("span", {
1790
1790
  className: "pointer-events-auto inline-flex items-center rounded-full bg-white/[0.12] px-3 py-1.5 text-[13px] font-medium leading-none tabular-nums text-white",
1791
1791
  children: r
1792
- }) : null, /* @__PURE__ */ W("div", {
1792
+ }) : null, /* @__PURE__ */ G("div", {
1793
1793
  className: "pointer-events-auto ml-auto inline-flex items-center gap-2",
1794
- children: [i, /* @__PURE__ */ U("button", {
1794
+ children: [i, /* @__PURE__ */ W("button", {
1795
1795
  ref: c,
1796
1796
  type: "button",
1797
1797
  onClick: t,
1798
1798
  "aria-label": "Close viewer",
1799
1799
  className: dr,
1800
- children: /* @__PURE__ */ U(Je, {
1800
+ children: /* @__PURE__ */ W(qe, {
1801
1801
  size: 20,
1802
1802
  weight: "bold",
1803
1803
  "aria-hidden": !0
1804
1804
  })
1805
1805
  })]
1806
1806
  })]
1807
- }), /* @__PURE__ */ U("div", {
1807
+ }), /* @__PURE__ */ W("div", {
1808
1808
  className: "box-border flex h-full w-full items-center justify-center px-6 py-16",
1809
1809
  children: a
1810
1810
  })]
@@ -1815,25 +1815,25 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1815
1815
  initialIndex: n,
1816
1816
  open: e
1817
1817
  }), s = t[i], c = p(() => s?.filename ?? (s ? Q(s.src) : "image"), [s]);
1818
- return s ? /* @__PURE__ */ W(_r, {
1818
+ return s ? /* @__PURE__ */ G(_r, {
1819
1819
  open: e,
1820
1820
  onClose: r,
1821
1821
  ariaLabel: c,
1822
1822
  counter: t.length > 1 ? `${i + 1} / ${t.length}` : void 0,
1823
- actions: /* @__PURE__ */ U(mr, {
1823
+ actions: /* @__PURE__ */ W(mr, {
1824
1824
  url: s.src,
1825
1825
  filename: c,
1826
1826
  variant: "viewer",
1827
1827
  label: `Download ${c}`
1828
1828
  }),
1829
1829
  "data-testid": "image-viewer",
1830
- children: [e ? /* @__PURE__ */ U("img", {
1830
+ children: [e ? /* @__PURE__ */ W("img", {
1831
1831
  src: s.src,
1832
1832
  alt: s.alt ?? c,
1833
1833
  draggable: !1,
1834
1834
  decoding: "async",
1835
1835
  className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] select-none object-contain"
1836
- }, `${i}:${s.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(pr, {
1836
+ }, `${i}:${s.src}`) : null, t.length > 1 ? /* @__PURE__ */ W(pr, {
1837
1837
  onPrev: a,
1838
1838
  onNext: o,
1839
1839
  prevLabel: "Previous image",
@@ -1857,19 +1857,19 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1857
1857
  }, xr = "--mes-single-width-cap", Sr = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", Cr = 436, wr = ({ tiles: e, onTileActivate: t, maxVisible: n = 4, singleAspectRatio: r, className: i }) => {
1858
1858
  let a = e.length;
1859
1859
  if (a === 0) return null;
1860
- let o = e.slice(0, Math.min(a, n)), s = a - o.length, c = s > 0 ? /* @__PURE__ */ W("div", {
1860
+ let o = e.slice(0, Math.min(a, n)), s = a - o.length, c = s > 0 ? /* @__PURE__ */ G("div", {
1861
1861
  "aria-hidden": !0,
1862
1862
  className: "absolute inset-0 flex items-center justify-center bg-[#040403]/50 text-2xl font-bold leading-[28px] tracking-[-0.24px] text-white",
1863
1863
  children: ["+", s]
1864
1864
  }) : null, l = (e, n, r) => {
1865
- let i = J(yr, "h-full w-full", br[o.length]?.[n]);
1866
- return t ? /* @__PURE__ */ W("button", {
1865
+ let i = Y(yr, "h-full w-full", br[o.length]?.[n]);
1866
+ return t ? /* @__PURE__ */ G("button", {
1867
1867
  type: "button",
1868
1868
  onClick: () => t(n),
1869
1869
  "aria-label": e.ariaLabel ?? `Open media ${n + 1}`,
1870
- className: J(i, e.cursorClassName ?? "cursor-zoom-in"),
1870
+ className: Y(i, e.cursorClassName ?? "cursor-zoom-in"),
1871
1871
  children: [e.content, r]
1872
- }, n) : /* @__PURE__ */ W("div", {
1872
+ }, n) : /* @__PURE__ */ G("div", {
1873
1873
  className: i,
1874
1874
  children: [e.content, r]
1875
1875
  }, n);
@@ -1878,25 +1878,25 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1878
1878
  aspectRatio: r,
1879
1879
  width: `min(var(${xr}), ${Math.round(Cr * r * 100) / 100}px)`,
1880
1880
  maxWidth: "100%"
1881
- }), o.length === 1 ? /* @__PURE__ */ U("div", {
1882
- className: J(r ? Sr : "aspect-square w-full", i),
1881
+ }), o.length === 1 ? /* @__PURE__ */ W("div", {
1882
+ className: Y(r ? Sr : "aspect-square w-full", i),
1883
1883
  style: u,
1884
1884
  children: l(o[0], 0, c)
1885
- }) : o.length === 2 ? /* @__PURE__ */ U("div", {
1886
- className: J("grid aspect-[16/9] w-full grid-cols-2 gap-0.5", i),
1885
+ }) : o.length === 2 ? /* @__PURE__ */ W("div", {
1886
+ className: Y("grid aspect-[16/9] w-full grid-cols-2 gap-0.5", i),
1887
1887
  children: o.map((e, t) => l(e, t, t === o.length - 1 ? c : null))
1888
- }) : o.length === 3 ? /* @__PURE__ */ W("div", {
1889
- className: J("grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1888
+ }) : o.length === 3 ? /* @__PURE__ */ G("div", {
1889
+ className: Y("grid aspect-[4/3] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1890
1890
  children: [
1891
- /* @__PURE__ */ U("div", {
1891
+ /* @__PURE__ */ W("div", {
1892
1892
  className: "row-span-2",
1893
1893
  children: l(o[0], 0)
1894
1894
  }),
1895
1895
  l(o[1], 1),
1896
1896
  l(o[2], 2, c)
1897
1897
  ]
1898
- }) : /* @__PURE__ */ U("div", {
1899
- className: J("grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1898
+ }) : /* @__PURE__ */ W("div", {
1899
+ className: Y("grid aspect-[379/286] w-full grid-cols-2 grid-rows-2 gap-0.5", i),
1900
1900
  children: o.map((e, t) => {
1901
1901
  let n = s > 0 && t === o.length - 1;
1902
1902
  return l(e, t, n ? c : null);
@@ -1928,7 +1928,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1928
1928
  };
1929
1929
  }, Dr = ({ item: e, index: t, totalCount: n, fallbackLoading: r, imgRef: i, onLoad: o }) => ({
1930
1930
  ariaLabel: `Open image ${t + 1} of ${n}`,
1931
- content: /* @__PURE__ */ U("img", {
1931
+ content: /* @__PURE__ */ W("img", {
1932
1932
  ref: i,
1933
1933
  src: a(e.src) ?? e.src,
1934
1934
  alt: e.alt ?? "",
@@ -1949,15 +1949,15 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1949
1949
  filename: t && e.length === 1 ? t : t ? `${t} (${r + 1})` : void 0
1950
1950
  })), Ar = ({ src: e, alt: t, filename: n, loading: r = "lazy", onClick: i, onDismiss: o }) => {
1951
1951
  let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Er(i);
1952
- return /* @__PURE__ */ W("div", {
1952
+ return /* @__PURE__ */ G("div", {
1953
1953
  className: "relative w-fit",
1954
1954
  children: [
1955
- /* @__PURE__ */ U("button", {
1955
+ /* @__PURE__ */ W("button", {
1956
1956
  type: "button",
1957
1957
  onClick: () => l(0),
1958
1958
  "aria-label": "Open image",
1959
1959
  className: "block size-[280px] cursor-zoom-in overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
1960
- children: /* @__PURE__ */ U("img", {
1960
+ children: /* @__PURE__ */ W("img", {
1961
1961
  src: a(e) ?? e,
1962
1962
  alt: t ?? "",
1963
1963
  draggable: !1,
@@ -1966,11 +1966,11 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
1966
1966
  className: "size-full object-cover"
1967
1967
  })
1968
1968
  }),
1969
- o ? /* @__PURE__ */ U("div", {
1969
+ o ? /* @__PURE__ */ W("div", {
1970
1970
  className: "absolute right-2 top-2 z-10",
1971
- children: /* @__PURE__ */ U(Gn, { onClick: o })
1971
+ children: /* @__PURE__ */ W(Gn, { onClick: o })
1972
1972
  }) : null,
1973
- /* @__PURE__ */ U(vr, {
1973
+ /* @__PURE__ */ W(vr, {
1974
1974
  open: s,
1975
1975
  items: kr([{
1976
1976
  src: e,
@@ -2000,7 +2000,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2000
2000
  imgRef: h ? _.imgRef : void 0,
2001
2001
  onLoad: h ? _.onLoad : void 0
2002
2002
  }));
2003
- return /* @__PURE__ */ W(Wn, {
2003
+ return /* @__PURE__ */ G(Wn, {
2004
2004
  variant: u,
2005
2005
  text: a,
2006
2006
  groupPosition: o,
@@ -2009,14 +2009,14 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2009
2009
  paddingClassName: "p-0.5",
2010
2010
  radiusClassName: "rounded-[20px]",
2011
2011
  "data-testid": "image-attachment",
2012
- children: [/* @__PURE__ */ U("div", {
2012
+ children: [/* @__PURE__ */ W("div", {
2013
2013
  className: "relative",
2014
- children: /* @__PURE__ */ U(wr, {
2014
+ children: /* @__PURE__ */ W(wr, {
2015
2015
  tiles: v,
2016
2016
  onTileActivate: p,
2017
2017
  singleAspectRatio: h ? _.ratio : void 0
2018
2018
  })
2019
- }), /* @__PURE__ */ U(vr, {
2019
+ }), /* @__PURE__ */ W(vr, {
2020
2020
  open: d,
2021
2021
  items: kr(l, r),
2022
2022
  initialIndex: f,
@@ -2024,12 +2024,12 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2024
2024
  })]
2025
2025
  });
2026
2026
  }, Nr = {
2027
- Composer: (e) => /* @__PURE__ */ U(Ar, { ...e }),
2028
- Sent: (e) => /* @__PURE__ */ U(Mr, {
2027
+ Composer: (e) => /* @__PURE__ */ W(Ar, { ...e }),
2028
+ Sent: (e) => /* @__PURE__ */ W(Mr, {
2029
2029
  ...e,
2030
2030
  state: "sent"
2031
2031
  }),
2032
- Received: (e) => /* @__PURE__ */ U(Mr, {
2032
+ Received: (e) => /* @__PURE__ */ W(Mr, {
2033
2033
  ...e,
2034
2034
  state: "received"
2035
2035
  })
@@ -2039,18 +2039,18 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2039
2039
  initialIndex: n,
2040
2040
  open: e
2041
2041
  }), s = t[i], c = p(() => s?.filename ?? (s ? Q(s.src) : "document"), [s]), l = p(() => s ? Fr(s.src) : void 0, [s]);
2042
- return !s || !l ? null : /* @__PURE__ */ W(_r, {
2042
+ return !s || !l ? null : /* @__PURE__ */ G(_r, {
2043
2043
  open: e,
2044
2044
  onClose: r,
2045
2045
  ariaLabel: c,
2046
2046
  counter: t.length > 1 ? `${i + 1} / ${t.length}` : void 0,
2047
2047
  "data-testid": "pdf-viewer",
2048
- children: [/* @__PURE__ */ U("iframe", {
2048
+ children: [/* @__PURE__ */ W("iframe", {
2049
2049
  src: l,
2050
2050
  title: c,
2051
2051
  className: "block h-[calc(100dvh-128px)] w-[min(96vw,1400px)] border-0 bg-white",
2052
2052
  sandbox: "allow-scripts allow-forms allow-popups allow-downloads"
2053
- }, `${i}:${s.src}`), t.length > 1 ? /* @__PURE__ */ U(pr, {
2053
+ }, `${i}:${s.src}`), t.length > 1 ? /* @__PURE__ */ W(pr, {
2054
2054
  onPrev: a,
2055
2055
  onNext: o,
2056
2056
  prevLabel: "Previous document",
@@ -2067,7 +2067,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2067
2067
  title: r
2068
2068
  }] : [], Lr = ({ variant: e, item: t, index: n, onActivate: r, trailingAction: i }) => {
2069
2069
  let a = t.filename ?? Q(t.src);
2070
- return /* @__PURE__ */ U(ar, {
2070
+ return /* @__PURE__ */ W(ar, {
2071
2071
  variant: e,
2072
2072
  filename: a,
2073
2073
  title: t.title,
@@ -2090,25 +2090,25 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2090
2090
  src: e.src,
2091
2091
  filename: e.filename ?? Q(e.src)
2092
2092
  }));
2093
- return /* @__PURE__ */ W(Wn, {
2093
+ return /* @__PURE__ */ G(Wn, {
2094
2094
  variant: u,
2095
2095
  text: o,
2096
2096
  groupPosition: s,
2097
2097
  "data-testid": "pdf-attachment",
2098
- children: [/* @__PURE__ */ U("div", {
2098
+ children: [/* @__PURE__ */ W("div", {
2099
2099
  className: "flex flex-col gap-2",
2100
2100
  children: d.map((t, n) => {
2101
- let r = t.filename ?? Q(t.src), i = g && n === 0 ? /* @__PURE__ */ U(Gn, {
2101
+ let r = t.filename ?? Q(t.src), i = g && n === 0 ? /* @__PURE__ */ W(Gn, {
2102
2102
  onClick: l,
2103
2103
  variant: "inline"
2104
- }) : e === "composer" ? void 0 : /* @__PURE__ */ U(mr, {
2104
+ }) : e === "composer" ? void 0 : /* @__PURE__ */ W(mr, {
2105
2105
  url: t.src,
2106
2106
  filename: r,
2107
2107
  variant: "inline",
2108
2108
  label: `Download ${r}`,
2109
2109
  tone: u
2110
2110
  });
2111
- return /* @__PURE__ */ U(Lr, {
2111
+ return /* @__PURE__ */ W(Lr, {
2112
2112
  variant: u,
2113
2113
  item: t,
2114
2114
  index: n,
@@ -2116,7 +2116,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2116
2116
  trailingAction: i
2117
2117
  }, `${t.src}-${n}`);
2118
2118
  })
2119
- }), /* @__PURE__ */ U(Pr, {
2119
+ }), /* @__PURE__ */ W(Pr, {
2120
2120
  open: f,
2121
2121
  items: _,
2122
2122
  initialIndex: p,
@@ -2124,15 +2124,15 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2124
2124
  })]
2125
2125
  });
2126
2126
  }, zr = {
2127
- Composer: (e) => /* @__PURE__ */ U(Rr, {
2127
+ Composer: (e) => /* @__PURE__ */ W(Rr, {
2128
2128
  ...e,
2129
2129
  state: "composer"
2130
2130
  }),
2131
- Sent: (e) => /* @__PURE__ */ U(Rr, {
2131
+ Sent: (e) => /* @__PURE__ */ W(Rr, {
2132
2132
  ...e,
2133
2133
  state: "sent"
2134
2134
  }),
2135
- Received: (e) => /* @__PURE__ */ U(Rr, {
2135
+ Received: (e) => /* @__PURE__ */ W(Rr, {
2136
2136
  ...e,
2137
2137
  state: "received"
2138
2138
  })
@@ -2153,13 +2153,13 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2153
2153
  return () => window.clearTimeout(t);
2154
2154
  }, [e, u]);
2155
2155
  let g = t[a], _ = p(() => g?.filename ?? (g ? Q(g.src) : "video"), [g]);
2156
- return g ? /* @__PURE__ */ W(_r, {
2156
+ return g ? /* @__PURE__ */ G(_r, {
2157
2157
  open: e,
2158
2158
  onClose: i,
2159
2159
  ariaLabel: _,
2160
2160
  counter: t.length > 1 ? `${a + 1} / ${t.length}` : void 0,
2161
2161
  "data-testid": "video-viewer",
2162
- children: [u ? /* @__PURE__ */ U("video", {
2162
+ children: [u ? /* @__PURE__ */ W("video", {
2163
2163
  ref: c,
2164
2164
  "data-testid": "video-viewer-media",
2165
2165
  src: g.src,
@@ -2170,22 +2170,22 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2170
2170
  playsInline: !0,
2171
2171
  preload: g.preload ?? "metadata",
2172
2172
  className: "block h-auto max-h-[calc(100dvh-128px)] w-auto max-w-[min(96vw,1400px)] bg-black",
2173
- children: g.mimeType ? /* @__PURE__ */ U("source", {
2173
+ children: g.mimeType ? /* @__PURE__ */ W("source", {
2174
2174
  src: g.src,
2175
2175
  type: g.mimeType
2176
2176
  }) : null
2177
- }, `${a}:${g.src}`) : null, t.length > 1 ? /* @__PURE__ */ U(pr, {
2177
+ }, `${a}:${g.src}`) : null, t.length > 1 ? /* @__PURE__ */ W(pr, {
2178
2178
  onPrev: o,
2179
2179
  onNext: s,
2180
2180
  prevLabel: "Previous video",
2181
2181
  nextLabel: "Next video"
2182
2182
  }) : null]
2183
2183
  }) : null;
2184
- }, Hr = 1, Ur = 4 / 5, Wr = 16 / 9, Gr = () => /* @__PURE__ */ U("div", {
2184
+ }, Hr = 1, Ur = 4 / 5, Wr = 16 / 9, Gr = () => /* @__PURE__ */ W("div", {
2185
2185
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
2186
- children: /* @__PURE__ */ U("span", {
2186
+ children: /* @__PURE__ */ W("span", {
2187
2187
  className: "flex size-12 items-center justify-center rounded-full bg-black/25 text-white backdrop-blur-[20px]",
2188
- children: /* @__PURE__ */ U(Re, {
2188
+ children: /* @__PURE__ */ W(Le, {
2189
2189
  className: "size-6",
2190
2190
  weight: "fill",
2191
2191
  "aria-hidden": !0
@@ -2196,9 +2196,9 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2196
2196
  if (t === -1) return `${e}#t=0.001`;
2197
2197
  let n = e.slice(t + 1);
2198
2198
  return /(^|&)t=/.test(n) ? e : `${e}&t=0.001`;
2199
- }, qr = ({ item: e, index: t, showPlayBadge: n = !0, imgRef: r, onLoad: i }) => /* @__PURE__ */ W("div", {
2199
+ }, qr = ({ item: e, index: t, showPlayBadge: n = !0, imgRef: r, onLoad: i }) => /* @__PURE__ */ G("div", {
2200
2200
  className: "absolute inset-0 size-full bg-[#0d0d0d]",
2201
- children: [e.poster ? /* @__PURE__ */ U("img", {
2201
+ children: [e.poster ? /* @__PURE__ */ W("img", {
2202
2202
  ref: r,
2203
2203
  src: e.poster,
2204
2204
  alt: `Video ${t + 1} thumbnail`,
@@ -2207,25 +2207,25 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2207
2207
  decoding: "async",
2208
2208
  onLoad: i,
2209
2209
  className: "absolute inset-0 size-full object-cover"
2210
- }) : e.src && e.preload !== "none" ? /* @__PURE__ */ U("video", {
2210
+ }) : e.src && e.preload !== "none" ? /* @__PURE__ */ W("video", {
2211
2211
  src: Kr(e.src),
2212
2212
  muted: !0,
2213
2213
  playsInline: !0,
2214
2214
  preload: "metadata",
2215
2215
  "aria-label": `Video ${t + 1} thumbnail`,
2216
2216
  className: "absolute inset-0 size-full object-cover"
2217
- }) : /* @__PURE__ */ U("div", {
2217
+ }) : /* @__PURE__ */ W("div", {
2218
2218
  className: "absolute inset-0 flex items-center justify-center",
2219
- children: /* @__PURE__ */ U(Ke, {
2219
+ children: /* @__PURE__ */ W(Ge, {
2220
2220
  className: "size-16 text-white/30",
2221
2221
  weight: "regular",
2222
2222
  "aria-hidden": !0
2223
2223
  })
2224
- }), n ? /* @__PURE__ */ U(Gr, {}) : null]
2224
+ }), n ? /* @__PURE__ */ W(Gr, {}) : null]
2225
2225
  }), Jr = ({ item: e, index: t, totalCount: n, isOverflowTile: r, imgRef: i, onLoad: a }) => ({
2226
2226
  ariaLabel: `Play video ${t + 1} of ${n}`,
2227
2227
  cursorClassName: "cursor-pointer",
2228
- content: /* @__PURE__ */ U(qr, {
2228
+ content: /* @__PURE__ */ W(qr, {
2229
2229
  item: e,
2230
2230
  index: t,
2231
2231
  showPlayBadge: !r,
@@ -2249,15 +2249,15 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2249
2249
  filename: t && e.length === 1 ? t : t ? `${t} (${r + 1})` : void 0
2250
2250
  })), Zr = ({ src: e, poster: t, mimeType: n, filename: r, preload: i, onClick: a, onDismiss: o }) => {
2251
2251
  let { viewerOpen: s, viewerIndex: c, handleActivate: l, closeViewer: u } = Er(a);
2252
- return /* @__PURE__ */ W("div", {
2252
+ return /* @__PURE__ */ G("div", {
2253
2253
  className: "relative w-fit",
2254
2254
  children: [
2255
- /* @__PURE__ */ U("button", {
2255
+ /* @__PURE__ */ W("button", {
2256
2256
  type: "button",
2257
2257
  onClick: () => l(0),
2258
2258
  "aria-label": "Play video",
2259
2259
  className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
2260
- children: /* @__PURE__ */ U(qr, {
2260
+ children: /* @__PURE__ */ W(qr, {
2261
2261
  item: {
2262
2262
  src: e,
2263
2263
  poster: t,
@@ -2267,11 +2267,11 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2267
2267
  index: 0
2268
2268
  })
2269
2269
  }),
2270
- o ? /* @__PURE__ */ U("div", {
2270
+ o ? /* @__PURE__ */ W("div", {
2271
2271
  className: "absolute right-2 top-2 z-10",
2272
- children: /* @__PURE__ */ U(Gn, { onClick: o })
2272
+ children: /* @__PURE__ */ W(Gn, { onClick: o })
2273
2273
  }) : null,
2274
- /* @__PURE__ */ U(Vr, {
2274
+ /* @__PURE__ */ W(Vr, {
2275
2275
  open: s,
2276
2276
  items: Xr([{
2277
2277
  src: e,
@@ -2306,7 +2306,7 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2306
2306
  imgRef: _ ? y.imgRef : void 0,
2307
2307
  onLoad: _ ? y.onLoad : void 0
2308
2308
  })), S = Math.min(Math.max(y.ratio, Ur), Wr);
2309
- return /* @__PURE__ */ W(Wn, {
2309
+ return /* @__PURE__ */ G(Wn, {
2310
2310
  variant: f,
2311
2311
  text: o,
2312
2312
  groupPosition: s,
@@ -2315,14 +2315,14 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2315
2315
  paddingClassName: "p-0.5",
2316
2316
  radiusClassName: s && s !== "single" ? void 0 : "rounded-[20px]",
2317
2317
  "data-testid": "video-attachment",
2318
- children: [/* @__PURE__ */ U("div", {
2318
+ children: [/* @__PURE__ */ W("div", {
2319
2319
  className: "relative",
2320
- children: /* @__PURE__ */ U(wr, {
2320
+ children: /* @__PURE__ */ W(wr, {
2321
2321
  tiles: x,
2322
2322
  onTileActivate: h,
2323
2323
  singleAspectRatio: _ ? S : void 0
2324
2324
  })
2325
- }), /* @__PURE__ */ U(Vr, {
2325
+ }), /* @__PURE__ */ W(Vr, {
2326
2326
  open: p,
2327
2327
  items: Xr(d, i),
2328
2328
  initialIndex: m,
@@ -2332,12 +2332,12 @@ var sr = ({ src: e, filename: t, fileSize: n, mimeType: r, title: i, items: a })
2332
2332
  }, $r = {
2333
2333
  Image: Nr,
2334
2334
  Video: {
2335
- Composer: (e) => /* @__PURE__ */ U(Zr, { ...e }),
2336
- Sent: (e) => /* @__PURE__ */ U(Qr, {
2335
+ Composer: (e) => /* @__PURE__ */ W(Zr, { ...e }),
2336
+ Sent: (e) => /* @__PURE__ */ W(Qr, {
2337
2337
  ...e,
2338
2338
  state: "sent"
2339
2339
  }),
2340
- Received: (e) => /* @__PURE__ */ U(Qr, {
2340
+ Received: (e) => /* @__PURE__ */ W(Qr, {
2341
2341
  ...e,
2342
2342
  state: "received"
2343
2343
  })
@@ -2475,20 +2475,20 @@ function fi({ groupPosition: e, isMyMessage: t, segment: n }) {
2475
2475
  ...di(n.kind, n.attachments),
2476
2476
  groupPosition: e
2477
2477
  };
2478
- return U(t ? r.Sent : r.Received, { ...i });
2478
+ return W(t ? r.Sent : r.Received, { ...i });
2479
2479
  }
2480
2480
  var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2481
2481
  let i = ai(n.attachments);
2482
2482
  if (i.length === 0) return null;
2483
2483
  let a = oi(i), o = n.text?.trim(), s = i.find((e) => e.type === "link"), c = s?.type === "link" ? ri(s.attachments[0] ?? {}).url : void 0, l = o && ni(o, c) ? void 0 : o, u = 0, d = [], f = l ? "middle" : e, p = e === "single" || e === "end", m = (e, n, r) => {
2484
2484
  let i = t ? an.Sent : an.Received;
2485
- d.push(/* @__PURE__ */ U(i, {
2485
+ d.push(/* @__PURE__ */ W(i, {
2486
2486
  ...ri(e),
2487
2487
  groupPosition: r ? f : "middle"
2488
2488
  }, n));
2489
2489
  }, h = (n, r) => {
2490
2490
  let i = si(u, a, e);
2491
- u += 1, d.push(/* @__PURE__ */ U(fi, {
2491
+ u += 1, d.push(/* @__PURE__ */ W(fi, {
2492
2492
  groupPosition: i,
2493
2493
  isMyMessage: t,
2494
2494
  segment: n
@@ -2503,9 +2503,9 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2503
2503
  return;
2504
2504
  }
2505
2505
  h(e, `media-${t}`);
2506
- }), /* @__PURE__ */ W("div", {
2506
+ }), /* @__PURE__ */ G("div", {
2507
2507
  className: "str-chat__message-bubble-wrapper",
2508
- children: [/* @__PURE__ */ W("div", {
2508
+ children: [/* @__PURE__ */ G("div", {
2509
2509
  className: "str-chat__message-bubble",
2510
2510
  "data-attachment-bubble": "true",
2511
2511
  "data-testid": "message-attachment-bubble",
@@ -2515,34 +2515,34 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2515
2515
  overflow: "visible",
2516
2516
  padding: 0
2517
2517
  },
2518
- children: [/* @__PURE__ */ U("div", {
2518
+ children: [/* @__PURE__ */ W("div", {
2519
2519
  "data-testid": "message-attachment-rows",
2520
- className: J("flex flex-col gap-[4px]", t ? "items-end" : "items-start"),
2520
+ className: Y("flex flex-col gap-[4px]", t ? "items-end" : "items-start"),
2521
2521
  children: d
2522
- }), !l && /* @__PURE__ */ U(M, {})]
2523
- }), l ? /* @__PURE__ */ W("div", {
2522
+ }), !l && /* @__PURE__ */ W(M, {})]
2523
+ }), l ? /* @__PURE__ */ G("div", {
2524
2524
  "data-testid": "message-caption-bubble",
2525
- className: J("str-chat__message-bubble", { "relative isolate": p }),
2525
+ className: Y("str-chat__message-bubble", { "relative isolate": p }),
2526
2526
  children: [
2527
- /* @__PURE__ */ U(R, {
2527
+ /* @__PURE__ */ W(R, {
2528
2528
  message: n,
2529
2529
  renderText: r
2530
2530
  }),
2531
- /* @__PURE__ */ U(M, {}),
2532
- p && /* @__PURE__ */ U(Tn, { side: t ? "me" : "other" })
2531
+ /* @__PURE__ */ W(M, {}),
2532
+ p && /* @__PURE__ */ W(Tn, { side: t ? "me" : "other" })
2533
2533
  ]
2534
2534
  }) : null]
2535
2535
  });
2536
2536
  }, mi = o.memo((e) => {
2537
- let { additionalMessageInputProps: t, editing: n, endOfGroup: r, firstOfGroup: i, groupStyles: a, groupedByUser: o, handleAction: s, handleOpenThread: c, handleRetry: l, highlighted: u, isMessageAIGenerated: d, isMyMessage: f, message: m, renderText: g, threadList: _, viewerLanguage: v, onOutboundClick: y, resolvedOutbound: x } = e, { client: S } = he("CustomMessage"), { channel: C } = me("CustomMessage"), { isUnlocking: w, onUnlockClick: T, onFetchSource: D, onDownloadClick: N } = un("LockedAttachment"), [F, L] = h(!1), z = be(m.id), { Attachment: te = b, EditMessageModal: ie = E, MessageActions: B, MessageBlocked: ae = O, MessageBouncePrompt: oe = A, MessageDeleted: fe = j, MessageIsThreadReplyInChannelButtonIndicator: pe = P, MessageRepliesCountButton: _e = I, ReminderNotification: ve = ne, StreamedMessageText: V = re, PinIndicator: ye } = ge("CustomMessage"), xe = ue(m), Se = de(m), G = p(() => d?.(m), [d, m]), K = p(() => {
2537
+ let { additionalMessageInputProps: t, editing: n, endOfGroup: r, firstOfGroup: i, groupStyles: a, groupedByUser: o, handleAction: s, handleOpenThread: c, handleRetry: l, highlighted: u, isMessageAIGenerated: d, isMyMessage: f, message: m, renderText: g, threadList: _, viewerLanguage: v, onOutboundClick: y, resolvedOutbound: x } = e, { client: S } = me("CustomMessage"), { channel: C } = V("CustomMessage"), { isUnlocking: w, onUnlockClick: T, onFetchSource: D, onDownloadClick: N } = un("LockedAttachment"), [F, L] = h(!1), z = ye(m.id), { Attachment: te = b, EditMessageModal: ie = E, MessageActions: B, MessageBlocked: ae = O, MessageBouncePrompt: oe = A, MessageDeleted: fe = j, MessageIsThreadReplyInChannelButtonIndicator: pe = P, MessageRepliesCountButton: ge = I, ReminderNotification: _e = ne, StreamedMessageText: H = re, PinIndicator: ve } = he("CustomMessage"), be = ue(m), xe = de(m), K = p(() => d?.(m), [d, m]), q = p(() => {
2538
2538
  let e = m.attachments ?? [], t = m.shared_location ? [m.shared_location, ...e] : e;
2539
2539
  if (!_n(m)) return t;
2540
2540
  let n = t.filter((e) => !("type" in e) || !on(e));
2541
2541
  return n.length === t.length ? t : n;
2542
- }, [m]), q = p(() => (m.attachments ?? []).filter(on), [m]), Ce = p(() => {
2542
+ }, [m]), J = p(() => (m.attachments ?? []).filter(on), [m]), Se = p(() => {
2543
2543
  let e = m.text?.trim();
2544
- return e ? ni(e, q[0] ? ri(q[0]).url : void 0) ? void 0 : e : void 0;
2545
- }, [m, q]), we = p(() => ai(K), [K]), Te = p(() => {
2544
+ return e ? ni(e, J[0] ? ri(J[0]).url : void 0) ? void 0 : e : void 0;
2545
+ }, [m, J]), Ce = p(() => ai(q), [q]), we = p(() => {
2546
2546
  let e = Dt({
2547
2547
  message: m,
2548
2548
  viewerLanguage: v
@@ -2551,31 +2551,31 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2551
2551
  ...m,
2552
2552
  text: e
2553
2553
  };
2554
- }, [m, v]), Ee = we.length > 0, De = we.reduce((e, t) => e + t.attachments.length, 0) === (K?.length ?? 0), Oe = a?.[0] ?? "", ke = Oe === "top" ? "first" : Oe === "middle" ? "middle" : Oe === "bottom" ? "end" : "single", Ae = Oe === "single" || Oe === "bottom";
2554
+ }, [m, v]), Te = Ce.length > 0, Ee = Ce.reduce((e, t) => e + t.attachments.length, 0) === (q?.length ?? 0), De = a?.[0] ?? "", Oe = De === "top" ? "first" : De === "middle" ? "middle" : De === "bottom" ? "end" : "single", ke = De === "single" || De === "bottom";
2555
2555
  if (se(m)) return null;
2556
- if (m.deleted_at || m.type === "deleted") return /* @__PURE__ */ U(fe, { message: m });
2557
- if (ce(m)) return /* @__PURE__ */ U(ae, {});
2558
- let je = !_ && !!m.reply_count, Me = !_ && m.show_in_channel && m.parent_id, Ne = m.status === "failed" && m.error?.status !== 403, Pe = le(m), Y;
2559
- Ne ? Y = () => l(m) : Pe && (Y = () => L(!0));
2560
- let X = f(), Fe = J("str-chat__message str-chat__message-simple", `str-chat__message--${m.type}`, `str-chat__message--${m.status}`, X ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other", m.text ? "str-chat__message--has-text" : "has-no-text", {
2561
- "str-chat__message--has-attachment": xe,
2556
+ if (m.deleted_at || m.type === "deleted") return /* @__PURE__ */ W(fe, { message: m });
2557
+ if (ce(m)) return /* @__PURE__ */ W(ae, {});
2558
+ let Ae = !_ && !!m.reply_count, je = !_ && m.show_in_channel && m.parent_id, Me = m.status === "failed" && m.error?.status !== 403, Ne = le(m), X;
2559
+ Me ? X = () => l(m) : Ne && (X = () => L(!0));
2560
+ let Z = f(), Pe = Y("str-chat__message str-chat__message-simple", `str-chat__message--${m.type}`, `str-chat__message--${m.status}`, Z ? "str-chat__message--me str-chat__message-simple--me" : "str-chat__message--other", m.text ? "str-chat__message--has-text" : "has-no-text", {
2561
+ "str-chat__message--has-attachment": be,
2562
2562
  "str-chat__message--highlighted": u,
2563
2563
  "str-chat__message--pinned pinned-message": m.pinned,
2564
- "str-chat__message--with-reactions": Se,
2564
+ "str-chat__message--with-reactions": xe,
2565
2565
  "str-chat__message-send-can-be-retried": m?.status === "failed" && m?.error?.status !== 403,
2566
- "str-chat__message-with-thread-link": je || Me,
2566
+ "str-chat__message-with-thread-link": Ae || je,
2567
2567
  "str-chat__virtual-message__wrapper--end": r,
2568
2568
  "str-chat__virtual-message__wrapper--first": i,
2569
2569
  "str-chat__virtual-message__wrapper--group": o
2570
- }), Ie = m.poll_id && S.polls.fromState(m.poll_id), Le = jn(m), Re = _n(m), ze = vn(m), Be = !!(K?.length && !m.quoted_message), Ve = Re && X && Be, He = Ee && De && !m.quoted_message && !Ie && !G && !Re, Ue = {
2570
+ }), Fe = m.poll_id && S.polls.fromState(m.poll_id), Ie = jn(m), Le = _n(m), Re = vn(m), ze = !!(q?.length && !m.quoted_message), Be = Le && Z && ze, Ve = Te && Ee && !m.quoted_message && !Fe && !K && !Le, He = {
2571
2571
  contentType: "text",
2572
2572
  amountText: m.metadata?.amount_text,
2573
2573
  paymentStatus: m.metadata?.payment_status,
2574
- renderedText: m.text && /* @__PURE__ */ U(R, {
2575
- message: Te,
2574
+ renderedText: m.text && /* @__PURE__ */ W(R, {
2575
+ message: we,
2576
2576
  renderText: g
2577
2577
  })
2578
- }, We = {
2578
+ }, Ue = {
2579
2579
  contentType: "media",
2580
2580
  title: m.metadata?.attachment_title,
2581
2581
  mimeType: m.metadata?.attachment_mime_type,
@@ -2584,191 +2584,191 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2584
2584
  detail: m.metadata?.attachment_detail,
2585
2585
  paymentStatus: m.metadata?.payment_status,
2586
2586
  onFetchSource: D ? () => D(m, C) : void 0
2587
- }, Ge = /* @__PURE__ */ W("div", {
2588
- className: J("str-chat__message-bubble", { "relative isolate": Ae }),
2589
- children: [/* @__PURE__ */ U(R, {
2590
- message: Te,
2587
+ }, We = /* @__PURE__ */ G("div", {
2588
+ className: Y("str-chat__message-bubble", { "relative isolate": ke }),
2589
+ children: [/* @__PURE__ */ W(R, {
2590
+ message: we,
2591
2591
  renderText: g
2592
- }), Ae && /* @__PURE__ */ U(Tn, { side: X ? "me" : "other" })]
2593
- }), Ke = q.length > 0 && /* @__PURE__ */ U("div", {
2594
- className: J("flex flex-col gap-[4px]", X ? "items-end" : "items-start"),
2595
- children: q.map((e, t) => {
2596
- let n = X ? an.Sent : an.Received, r = t === q.length - 1 && !Ce;
2597
- return /* @__PURE__ */ U(n, {
2592
+ }), ke && /* @__PURE__ */ W(Tn, { side: Z ? "me" : "other" })]
2593
+ }), Ge = J.length > 0 && /* @__PURE__ */ W("div", {
2594
+ className: Y("flex flex-col gap-[4px]", Z ? "items-end" : "items-start"),
2595
+ children: J.map((e, t) => {
2596
+ let n = Z ? an.Sent : an.Received, r = t === J.length - 1 && !Se;
2597
+ return /* @__PURE__ */ W(n, {
2598
2598
  ...ri(e),
2599
- groupPosition: r ? ke : "middle"
2599
+ groupPosition: r ? Oe : "middle"
2600
2600
  }, `locked-link-${t}`);
2601
2601
  })
2602
2602
  });
2603
- return /* @__PURE__ */ W(H, { children: [
2604
- n && /* @__PURE__ */ U(ie, { additionalMessageInputProps: t }),
2605
- F && /* @__PURE__ */ U(k, {
2603
+ return /* @__PURE__ */ G(U, { children: [
2604
+ n && /* @__PURE__ */ W(ie, { additionalMessageInputProps: t }),
2605
+ F && /* @__PURE__ */ W(k, {
2606
2606
  MessageBouncePrompt: oe,
2607
2607
  onClose: () => L(!1),
2608
2608
  open: F
2609
2609
  }),
2610
- /* @__PURE__ */ W("div", {
2611
- className: Fe,
2610
+ /* @__PURE__ */ G("div", {
2611
+ className: Pe,
2612
2612
  "data-message-id": m.id,
2613
2613
  "data-dd-privacy": "mask",
2614
2614
  children: [
2615
- ye && /* @__PURE__ */ U(ye, {}),
2616
- !!z && /* @__PURE__ */ U(ve, { reminder: z }),
2617
- m.user && /* @__PURE__ */ U(Z, {
2615
+ ve && /* @__PURE__ */ W(ve, {}),
2616
+ !!z && /* @__PURE__ */ W(_e, { reminder: z }),
2617
+ m.user && /* @__PURE__ */ W(gt, {
2618
2618
  className: "str-chat__avatar str-chat__message-sender-avatar",
2619
2619
  id: m.user.id,
2620
2620
  image: m.user.image,
2621
2621
  name: m.user.name || m.user.id,
2622
2622
  size: 24,
2623
2623
  shape: "circle",
2624
- dmAgentEnabled: Re
2624
+ dmAgentEnabled: Le
2625
2625
  }),
2626
- /* @__PURE__ */ U("div", {
2627
- className: J("str-chat__message-inner", { "str-chat__simple-message--error-failed": Ne || Pe }),
2626
+ /* @__PURE__ */ W("div", {
2627
+ className: Y("str-chat__message-inner", { "str-chat__simple-message--error-failed": Me || Ne }),
2628
2628
  "data-testid": "message-inner",
2629
- onClick: Y,
2630
- onKeyDown: Y,
2631
- role: Y ? "button" : void 0,
2632
- tabIndex: Y ? 0 : void 0,
2629
+ onClick: X,
2630
+ onKeyDown: X,
2631
+ role: X ? "button" : void 0,
2632
+ tabIndex: X ? 0 : void 0,
2633
2633
  style: {
2634
2634
  marginInlineEnd: 0,
2635
2635
  marginInlineStart: 0
2636
2636
  },
2637
- children: Le ? /* @__PURE__ */ W("div", {
2637
+ children: Ie ? /* @__PURE__ */ G("div", {
2638
2638
  className: "str-chat__message-bubble-wrapper message-tip-wrapper",
2639
- children: [/* @__PURE__ */ U(Mn, { message: m }), m.text?.trim() && Ge]
2639
+ children: [/* @__PURE__ */ W(Mn, { message: m }), m.text?.trim() && We]
2640
2640
  }) : yn(m) ? /* @__PURE__ */ W("div", {
2641
2641
  className: "str-chat__message-bubble-wrapper",
2642
- children: [/* @__PURE__ */ W("div", {
2642
+ children: /* @__PURE__ */ G("div", {
2643
2643
  className: "flex items-center gap-2",
2644
2644
  children: [
2645
- X && B && /* @__PURE__ */ U(B, {}),
2646
- X ? /* @__PURE__ */ U(mn, {
2647
- ...Ue,
2645
+ Z && B && /* @__PURE__ */ W(B, {}),
2646
+ Z ? /* @__PURE__ */ W(mn, {
2647
+ ...He,
2648
2648
  isMine: !0
2649
- }) : /* @__PURE__ */ U(mn, {
2650
- ...Ue,
2649
+ }) : /* @__PURE__ */ W(mn, {
2650
+ ...He,
2651
2651
  isMine: !1,
2652
2652
  isUnlocking: w(m.id),
2653
2653
  onUnlockClick: () => T?.(m, C)
2654
2654
  }),
2655
- !X && B && /* @__PURE__ */ U(B, {})
2655
+ !Z && B && /* @__PURE__ */ W(B, {})
2656
2656
  ]
2657
- }), Ke]
2658
- }) : bn(m) ? /* @__PURE__ */ W("div", {
2657
+ })
2658
+ }) : bn(m) ? /* @__PURE__ */ G("div", {
2659
2659
  className: "str-chat__message-bubble-wrapper message-locked-attachment-wrapper",
2660
2660
  children: [
2661
- /* @__PURE__ */ W("div", {
2661
+ /* @__PURE__ */ G("div", {
2662
2662
  className: "flex items-center gap-2",
2663
2663
  children: [
2664
- X && B && /* @__PURE__ */ U(B, {}),
2665
- X ? /* @__PURE__ */ U(mn, {
2666
- ...We,
2664
+ Z && B && /* @__PURE__ */ W(B, {}),
2665
+ Z ? /* @__PURE__ */ W(mn, {
2666
+ ...Ue,
2667
2667
  isMine: !0,
2668
2668
  onPreviewClick: () => T ? T(m, C) : void 0
2669
- }) : /* @__PURE__ */ U(mn, {
2670
- ...We,
2669
+ }) : /* @__PURE__ */ W(mn, {
2670
+ ...Ue,
2671
2671
  isMine: !1,
2672
2672
  isUnlocking: w(m.id),
2673
2673
  onUnlockClick: () => T ? T(m, C) : void 0,
2674
2674
  onDownloadClick: () => N ? N(m, C) : void 0
2675
2675
  }),
2676
- !X && B && /* @__PURE__ */ U(B, {})
2676
+ !Z && B && /* @__PURE__ */ W(B, {})
2677
2677
  ]
2678
2678
  }),
2679
- Ke,
2680
- Ce && Ge
2679
+ Ge,
2680
+ Se && We
2681
2681
  ]
2682
- }) : He ? /* @__PURE__ */ U(pi, {
2683
- groupPosition: ke,
2684
- isMyMessage: X,
2682
+ }) : Ve ? /* @__PURE__ */ W(pi, {
2683
+ groupPosition: Oe,
2684
+ isMyMessage: Z,
2685
2685
  message: {
2686
- ...Te,
2687
- attachments: K,
2686
+ ...we,
2687
+ attachments: q,
2688
2688
  i18n: void 0
2689
2689
  },
2690
2690
  renderText: g
2691
- }) : /* @__PURE__ */ U("div", {
2691
+ }) : /* @__PURE__ */ W("div", {
2692
2692
  className: "str-chat__message-bubble-wrapper",
2693
- children: /* @__PURE__ */ W("div", {
2694
- className: J("str-chat__message-bubble", { "relative isolate": Ae }),
2693
+ children: /* @__PURE__ */ G("div", {
2694
+ className: Y("str-chat__message-bubble", { "relative isolate": ke }),
2695
2695
  children: [
2696
- Re && !Ve && /* @__PURE__ */ U(Sn, {
2696
+ Le && !Be && /* @__PURE__ */ W(Sn, {
2697
2697
  message: m,
2698
- hasAttachment: Be,
2699
- isMyMessage: X
2698
+ hasAttachment: ze,
2699
+ isMyMessage: Z
2700
2700
  }),
2701
- Ie && /* @__PURE__ */ U(ee, { poll: Ie }),
2702
- K?.length && !m.quoted_message ? /* @__PURE__ */ U(te, {
2701
+ Fe && /* @__PURE__ */ W(ee, { poll: Fe }),
2702
+ q?.length && !m.quoted_message ? /* @__PURE__ */ W(te, {
2703
2703
  actionHandler: s,
2704
- attachments: K
2704
+ attachments: q
2705
2705
  }) : null,
2706
- U(G ? V : R, {
2707
- message: Te,
2706
+ W(K ? H : R, {
2707
+ message: we,
2708
2708
  renderText: g
2709
2709
  }),
2710
- /* @__PURE__ */ U(M, {}),
2711
- Ae && /* @__PURE__ */ U(Tn, { side: X ? "me" : "other" })
2710
+ /* @__PURE__ */ W(M, {}),
2711
+ ke && /* @__PURE__ */ W(Tn, { side: Z ? "me" : "other" })
2712
2712
  ]
2713
2713
  })
2714
2714
  })
2715
2715
  }),
2716
- !ze && !Le && /* @__PURE__ */ U("div", {
2716
+ !Re && !Ie && /* @__PURE__ */ W("div", {
2717
2717
  className: "str-chat__message-footer",
2718
- children: (!Re || Ve) && /* @__PURE__ */ U(Sn, {
2718
+ children: (!Le || Be) && /* @__PURE__ */ W(Sn, {
2719
2719
  message: m,
2720
- hasAttachment: Be,
2721
- isMyMessage: X
2720
+ hasAttachment: ze,
2721
+ isMyMessage: Z
2722
2722
  })
2723
2723
  }),
2724
- /* @__PURE__ */ U(Rn, {
2724
+ /* @__PURE__ */ W(Rn, {
2725
2725
  onOutboundClick: y,
2726
2726
  resolvedOutbound: x
2727
2727
  }),
2728
- je && /* @__PURE__ */ U(_e, {
2728
+ Ae && /* @__PURE__ */ W(ge, {
2729
2729
  onClick: c,
2730
2730
  reply_count: m.reply_count
2731
2731
  }),
2732
- Me && /* @__PURE__ */ U(pe, {})
2732
+ je && /* @__PURE__ */ W(pe, {})
2733
2733
  ]
2734
2734
  }, m.id)
2735
2735
  ] });
2736
2736
  }, (e, t) => e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || e.resolvedOutbound?.id !== t.resolvedOutbound?.id || e.resolvedOutbound?.name !== t.resolvedOutbound?.name ? !1 : oe(e, t)), hi = (e) => {
2737
- let t = V("CustomMessage"), n = u(En), r = t.message.metadata?.outbound_id, i = typeof r == "string" ? n?.[r] : void 0;
2738
- return /* @__PURE__ */ U(mi, {
2737
+ let t = H("CustomMessage"), n = u(En), r = t.message.metadata?.outbound_id, i = typeof r == "string" ? n?.[r] : void 0;
2738
+ return /* @__PURE__ */ W(mi, {
2739
2739
  ...t,
2740
2740
  ...e,
2741
2741
  resolvedOutbound: i
2742
2742
  });
2743
2743
  }, gi = () => {
2744
- let { handleDelete: e, message: t } = V("CustomMessageActions");
2745
- return t.metadata?.payment_status === "paid" ? null : /* @__PURE__ */ U(Ye, {
2744
+ let { handleDelete: e, message: t } = H("CustomMessageActions");
2745
+ return t.metadata?.payment_status === "paid" ? null : /* @__PURE__ */ W(Je, {
2746
2746
  onClick: e,
2747
2747
  "aria-label": "Delete",
2748
2748
  title: "Delete",
2749
2749
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
2750
- children: /* @__PURE__ */ U(Ge, {
2750
+ children: /* @__PURE__ */ W(We, {
2751
2751
  size: 16,
2752
2752
  weight: "light",
2753
2753
  "aria-hidden": !0
2754
2754
  })
2755
2755
  });
2756
2756
  }, _i = () => {
2757
- let { handleFlag: e } = V("CustomMessageActions");
2758
- return /* @__PURE__ */ U(Ye, {
2757
+ let { handleFlag: e } = H("CustomMessageActions");
2758
+ return /* @__PURE__ */ W(Je, {
2759
2759
  onClick: e,
2760
2760
  "aria-label": "Report",
2761
2761
  title: "Report",
2762
2762
  className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
2763
- children: /* @__PURE__ */ U(X, {
2763
+ children: /* @__PURE__ */ W(Z, {
2764
2764
  size: 16,
2765
2765
  weight: "light",
2766
2766
  "aria-hidden": !0
2767
2767
  })
2768
2768
  });
2769
2769
  }, vi = () => {
2770
- let { message: e } = V("CustomMessageActions");
2771
- return e.metadata?.custom_type === G.ATTACHMENT ? /* @__PURE__ */ U(Xe, { messageActionSet: [{
2770
+ let { message: e } = H("CustomMessageActions");
2771
+ return e.metadata?.custom_type === K.ATTACHMENT ? /* @__PURE__ */ W(Ye, { messageActionSet: [{
2772
2772
  Component: gi,
2773
2773
  placement: "quick",
2774
2774
  type: "delete"
@@ -2778,15 +2778,15 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2778
2778
  type: "flag"
2779
2779
  }] }) : null;
2780
2780
  }, yi = (e) => ({ linkPreviews: Array.from(e.previews.values()).filter((e) => _.previewIsLoaded(e) || _.previewIsLoading(e)) }), bi = () => {
2781
- let { linkPreviewsManager: e } = _e(), { linkPreviews: t } = xe(e.state, yi), n = (t) => {
2781
+ let { linkPreviewsManager: e } = ge(), { linkPreviews: t } = be(e.state, yi), n = (t) => {
2782
2782
  e.dismissPreview(t);
2783
2783
  };
2784
- return t.length > 0 ? /* @__PURE__ */ U("div", {
2784
+ return t.length > 0 ? /* @__PURE__ */ W("div", {
2785
2785
  "data-testid": "link-preview-list",
2786
2786
  className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2",
2787
2787
  children: t.map((e) => {
2788
2788
  let t = _.previewIsLoading(e);
2789
- return /* @__PURE__ */ U(an.Composer, {
2789
+ return /* @__PURE__ */ W(an.Composer, {
2790
2790
  title: e.title,
2791
2791
  url: e.og_scrape_url,
2792
2792
  thumbnailUrl: e.image_url,
@@ -2796,19 +2796,19 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2796
2796
  }, e.og_scrape_url);
2797
2797
  })
2798
2798
  }) : null;
2799
- }, xi = o.createContext(!1), Si = 200, Ci = () => u(xi), wi = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ U("button", {
2799
+ }, xi = o.createContext(!1), Si = 200, Ci = () => u(xi), wi = ({ sendMessage: e, disabled: t, ...n }) => /* @__PURE__ */ W("button", {
2800
2800
  ...n,
2801
2801
  type: "button",
2802
2802
  "aria-label": "Send",
2803
2803
  disabled: t,
2804
2804
  onPointerDown: (e) => e.preventDefault(),
2805
2805
  onClick: e,
2806
- children: /* @__PURE__ */ U(Oe, {
2806
+ children: /* @__PURE__ */ W(De, {
2807
2807
  weight: "bold",
2808
2808
  className: "size-4"
2809
2809
  })
2810
2810
  }), Ti = () => {
2811
- let e = u(xi), { handleSubmit: t } = ye(), n = ve(), r = e || !n, { SendButton: i = wi, AttachmentPreviewList: a = x } = ge("CustomMessageInput"), s = o.useRef(null);
2811
+ let e = u(xi), { handleSubmit: t } = ve(), n = _e(), r = e || !n, { SendButton: i = wi, AttachmentPreviewList: a = x } = he("CustomMessageInput"), s = o.useRef(null);
2812
2812
  return o.useEffect(() => {
2813
2813
  let e = s.current;
2814
2814
  if (!e || typeof ResizeObserver > "u") return;
@@ -2823,23 +2823,23 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2823
2823
  Array.from(e.clipboardData?.items ?? []).some((e) => e.kind === "file") || e.stopPropagation();
2824
2824
  };
2825
2825
  return e.addEventListener("paste", t), () => e.removeEventListener("paste", t);
2826
- }, []), /* @__PURE__ */ W("div", {
2826
+ }, []), /* @__PURE__ */ G("div", {
2827
2827
  ref: s,
2828
2828
  "data-testid": "composer-card",
2829
2829
  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",
2830
2830
  "data-dd-privacy": "mask",
2831
- children: [/* @__PURE__ */ W("div", {
2831
+ children: [/* @__PURE__ */ G("div", {
2832
2832
  "data-testid": "composer-previews",
2833
2833
  className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2",
2834
2834
  children: [
2835
- /* @__PURE__ */ U(te, {}),
2836
- /* @__PURE__ */ U(bi, {}),
2837
- /* @__PURE__ */ U(a, {})
2835
+ /* @__PURE__ */ W(te, {}),
2836
+ /* @__PURE__ */ W(bi, {}),
2837
+ /* @__PURE__ */ W(a, {})
2838
2838
  ]
2839
- }), /* @__PURE__ */ W("div", {
2839
+ }), /* @__PURE__ */ G("div", {
2840
2840
  "data-testid": "composer-row",
2841
2841
  className: "messaging-composer-row flex items-start",
2842
- children: [/* @__PURE__ */ U(ie, {
2842
+ children: [/* @__PURE__ */ W(ie, {
2843
2843
  "aria-disabled": e || void 0,
2844
2844
  containerClassName: "min-w-0 flex-1 leading-[0]",
2845
2845
  className: "w-full resize-none overflow-hidden bg-transparent py-3.5 pl-4 pr-4 outline-none leading-5 placeholder:text-black/30 text-sm",
@@ -2848,10 +2848,10 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2848
2848
  maxRows: Infinity,
2849
2849
  readOnly: e,
2850
2850
  tabIndex: e ? -1 : void 0
2851
- }), /* @__PURE__ */ U("div", {
2851
+ }), /* @__PURE__ */ W("div", {
2852
2852
  "data-testid": "send-button-wrapper",
2853
2853
  className: "sticky bottom-2 mt-auto mb-2 mr-2 shrink-0 pt-2",
2854
- children: /* @__PURE__ */ U(i, {
2854
+ children: /* @__PURE__ */ W(i, {
2855
2855
  sendMessage: t,
2856
2856
  "aria-label": "Send",
2857
2857
  className: "str-chat__send-button relative flex justify-center items-center rounded-full size-8 bg-[#121110] disabled:bg-[#F1F0EE] disabled:text-black/20 text-white focus-ring before:absolute before:-inset-2 before:content-['']",
@@ -2862,19 +2862,19 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2862
2862
  })]
2863
2863
  })]
2864
2864
  });
2865
- }, Ei = () => /* @__PURE__ */ W("div", {
2865
+ }, Ei = () => /* @__PURE__ */ G("div", {
2866
2866
  className: "messaging-composer-backdrop",
2867
2867
  "aria-hidden": "true",
2868
2868
  children: [
2869
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2870
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2871
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2872
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2873
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-blur" }),
2874
- /* @__PURE__ */ U("div", { className: "messaging-composer-backdrop-gradient" })
2869
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2870
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2871
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2872
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2873
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-blur" }),
2874
+ /* @__PURE__ */ W("div", { className: "messaging-composer-backdrop-gradient" })
2875
2875
  ]
2876
2876
  }), Di = ({ renderActions: e, renderHeader: t, renderFooter: n, disabled: r = !1, disabledReason: i, composerInput: a }) => {
2877
- let { channel: s } = me(), c = s?.data?.frozen === !0, l = !!a, u = o.useRef(null);
2877
+ let { channel: s } = V(), c = s?.data?.frozen === !0, l = !!a, u = o.useRef(null);
2878
2878
  return o.useEffect(() => {
2879
2879
  if (!l) return;
2880
2880
  let e = u.current, t = e?.parentElement;
@@ -2890,18 +2890,18 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2890
2890
  return i.observe(e), () => {
2891
2891
  i.disconnect(), t.style.removeProperty("--messaging-composer-height");
2892
2892
  };
2893
- }, [l]), r ? l ? /* @__PURE__ */ W("div", {
2893
+ }, [l]), r ? l ? /* @__PURE__ */ G("div", {
2894
2894
  ref: u,
2895
2895
  "data-testid": "composer-chrome",
2896
2896
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
2897
- children: [/* @__PURE__ */ U(Ei, {}), /* @__PURE__ */ W("div", {
2897
+ children: [/* @__PURE__ */ W(Ei, {}), /* @__PURE__ */ G("div", {
2898
2898
  className: "relative z-10 flex flex-col",
2899
2899
  children: [
2900
2900
  t?.(),
2901
- /* @__PURE__ */ U("div", {
2901
+ /* @__PURE__ */ W("div", {
2902
2902
  "data-testid": "composer-locked-panel",
2903
2903
  className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4",
2904
- children: i ? /* @__PURE__ */ U("p", {
2904
+ children: i ? /* @__PURE__ */ W("p", {
2905
2905
  className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40",
2906
2906
  children: i
2907
2907
  }) : null
@@ -2909,55 +2909,55 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2909
2909
  n?.()
2910
2910
  ]
2911
2911
  })]
2912
- }) : /* @__PURE__ */ W(H, { children: [
2912
+ }) : /* @__PURE__ */ G(U, { children: [
2913
2913
  t?.(),
2914
- /* @__PURE__ */ U("div", {
2914
+ /* @__PURE__ */ W("div", {
2915
2915
  "data-testid": "composer-locked-panel",
2916
2916
  className: "messaging-composer-locked-panel flex w-full flex-col items-center justify-center gap-3 px-6 py-4",
2917
- children: i ? /* @__PURE__ */ U("p", {
2917
+ children: i ? /* @__PURE__ */ W("p", {
2918
2918
  className: "max-w-[345px] text-center text-xs font-normal leading-[1.3] tracking-[0.12px] text-black/40",
2919
2919
  children: i
2920
2920
  }) : null
2921
2921
  }),
2922
2922
  n?.()
2923
- ] }) : l ? /* @__PURE__ */ W("div", {
2923
+ ] }) : l ? /* @__PURE__ */ G("div", {
2924
2924
  ref: u,
2925
2925
  "data-testid": "composer-chrome",
2926
2926
  className: "messaging-composer-chrome messaging-composer-chrome--floating",
2927
- children: [/* @__PURE__ */ U(Ei, {}), /* @__PURE__ */ W("div", {
2927
+ children: [/* @__PURE__ */ W(Ei, {}), /* @__PURE__ */ G("div", {
2928
2928
  className: "relative z-10 flex min-h-0 flex-col",
2929
- children: [t?.(), /* @__PURE__ */ W("div", {
2929
+ children: [t?.(), /* @__PURE__ */ G("div", {
2930
2930
  className: "flex min-h-0 flex-col gap-4 p-3 pb-5 md:p-5",
2931
- children: [/* @__PURE__ */ W("div", {
2931
+ children: [/* @__PURE__ */ G("div", {
2932
2932
  inert: c ? "" : void 0,
2933
2933
  "aria-disabled": c || void 0,
2934
2934
  "data-testid": "message-input",
2935
2935
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
2936
- children: [e && /* @__PURE__ */ U("div", {
2936
+ children: [e && /* @__PURE__ */ W("div", {
2937
2937
  className: "flex h-12 shrink-0 items-center justify-center",
2938
2938
  children: e()
2939
- }), /* @__PURE__ */ U(xi.Provider, {
2939
+ }), /* @__PURE__ */ W(xi.Provider, {
2940
2940
  value: c,
2941
- children: /* @__PURE__ */ U(N, { Input: a ?? Ti })
2941
+ children: /* @__PURE__ */ W(N, { Input: a ?? Ti })
2942
2942
  })]
2943
2943
  }), n?.()]
2944
2944
  })]
2945
2945
  })]
2946
- }) : /* @__PURE__ */ W("div", {
2946
+ }) : /* @__PURE__ */ G("div", {
2947
2947
  className: "flex min-h-0 flex-col gap-4 p-4",
2948
2948
  children: [
2949
2949
  t?.(),
2950
- /* @__PURE__ */ W("div", {
2950
+ /* @__PURE__ */ G("div", {
2951
2951
  inert: c ? "" : void 0,
2952
2952
  "aria-disabled": c || void 0,
2953
2953
  "data-testid": "message-input",
2954
2954
  className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
2955
- children: [e && /* @__PURE__ */ U("div", {
2955
+ children: [e && /* @__PURE__ */ W("div", {
2956
2956
  className: "flex h-12 shrink-0 items-center justify-center",
2957
2957
  children: e()
2958
- }), /* @__PURE__ */ U(xi.Provider, {
2958
+ }), /* @__PURE__ */ W(xi.Provider, {
2959
2959
  value: c,
2960
- children: /* @__PURE__ */ U(N, { Input: Ti })
2960
+ children: /* @__PURE__ */ W(N, { Input: Ti })
2961
2961
  })]
2962
2962
  }),
2963
2963
  n?.()
@@ -2968,16 +2968,16 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2968
2968
  SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
2969
2969
  }, ki = ["SYSTEM_AGE_SAFETY_BLOCKED"], Ai = { SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines." }, ji = "age safety guidelines.", Mi = "https://linktr.ee/s/about/contact", Ni = (e) => ki.includes(e), Pi = (e) => Ni(e.metadata?.custom_type), Fi = (e) => {
2970
2970
  let t = e.metadata?.custom_type;
2971
- if (Ce(t)) return {
2971
+ if (Se(t)) return {
2972
2972
  kind: "dm-agent",
2973
2973
  type: t
2974
2974
  };
2975
- if (q(t)) return {
2975
+ if (J(t)) return {
2976
2976
  kind: "age-safety",
2977
2977
  type: t
2978
2978
  };
2979
2979
  let n = e.dm_agent_system_type;
2980
- if (Ce(n)) return {
2980
+ if (Se(n)) return {
2981
2981
  kind: "dm-agent",
2982
2982
  type: n
2983
2983
  };
@@ -2985,9 +2985,9 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
2985
2985
  let t = e.indexOf(ji);
2986
2986
  if (t === -1) return e;
2987
2987
  let n = t + 22;
2988
- return /* @__PURE__ */ W(H, { children: [
2988
+ return /* @__PURE__ */ G(U, { children: [
2989
2989
  e.slice(0, t),
2990
- /* @__PURE__ */ U("a", {
2990
+ /* @__PURE__ */ W("a", {
2991
2991
  href: Mi,
2992
2992
  target: "_blank",
2993
2993
  rel: "noopener noreferrer",
@@ -3000,68 +3000,68 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3000
3000
  let t = !Pi(e.message), n = Fi(e.message);
3001
3001
  if (n?.kind === "dm-agent") {
3002
3002
  let r = e.message.text?.trim() || Oi[n.type];
3003
- return /* @__PURE__ */ W("div", {
3003
+ return /* @__PURE__ */ G("div", {
3004
3004
  className: "str-chat__message--system",
3005
3005
  "data-testid": "message-system",
3006
- children: [/* @__PURE__ */ W("div", {
3006
+ children: [/* @__PURE__ */ G("div", {
3007
3007
  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)]",
3008
3008
  "data-testid": "dm-agent-system-message",
3009
3009
  "data-dm-agent-system-type": n.type,
3010
- children: [/* @__PURE__ */ U(He, {
3010
+ children: [/* @__PURE__ */ W(Ve, {
3011
3011
  size: 16,
3012
3012
  weight: "regular",
3013
3013
  "aria-hidden": !0,
3014
3014
  className: "mes-dm-agent-system-message__sparkle shrink-0"
3015
- }), /* @__PURE__ */ U("p", {
3015
+ }), /* @__PURE__ */ W("p", {
3016
3016
  className: "mes-dm-agent-system-message__text m-0 text-center text-[14px] font-normal leading-5 tracking-[0.21px]",
3017
3017
  children: r
3018
3018
  })]
3019
- }), !t && /* @__PURE__ */ U(z, { message: e.message })]
3019
+ }), !t && /* @__PURE__ */ W(z, { message: e.message })]
3020
3020
  });
3021
3021
  }
3022
3022
  if (n?.kind === "age-safety") {
3023
3023
  let r = e.message.text?.trim() || Ai[n.type];
3024
- return /* @__PURE__ */ W("div", {
3024
+ return /* @__PURE__ */ G("div", {
3025
3025
  className: "str-chat__message--system",
3026
3026
  "data-testid": "message-system",
3027
- children: [/* @__PURE__ */ W("div", {
3027
+ children: [/* @__PURE__ */ G("div", {
3028
3028
  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)]",
3029
3029
  "data-testid": "age-safety-system-message",
3030
3030
  "data-age-safety-system-type": n.type,
3031
- children: [/* @__PURE__ */ U(ze, {
3031
+ children: [/* @__PURE__ */ W(Re, {
3032
3032
  size: 24,
3033
3033
  weight: "duotone",
3034
3034
  "aria-hidden": !0,
3035
3035
  className: "mes-age-safety-system-message__icon shrink-0 text-[color:var(--text-warning-on-warning,#894b00)]",
3036
3036
  "data-testid": "age-safety-system-message-icon"
3037
- }), /* @__PURE__ */ U("div", {
3037
+ }), /* @__PURE__ */ W("div", {
3038
3038
  className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]",
3039
- children: /* @__PURE__ */ U("p", {
3039
+ children: /* @__PURE__ */ W("p", {
3040
3040
  className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]",
3041
3041
  children: Ii(r)
3042
3042
  })
3043
3043
  })]
3044
- }), !t && /* @__PURE__ */ U(z, { message: e.message })]
3044
+ }), !t && /* @__PURE__ */ W(z, { message: e.message })]
3045
3045
  });
3046
3046
  }
3047
- return /* @__PURE__ */ W("div", {
3047
+ return /* @__PURE__ */ G("div", {
3048
3048
  className: "str-chat__message--system",
3049
3049
  "data-testid": "message-system",
3050
- children: [/* @__PURE__ */ W("div", {
3050
+ children: [/* @__PURE__ */ G("div", {
3051
3051
  className: "str-chat__message--system__text",
3052
3052
  children: [
3053
- /* @__PURE__ */ U("div", { className: "str-chat__message--system__line" }),
3054
- /* @__PURE__ */ U("p", { children: e.message.text }),
3055
- /* @__PURE__ */ U("div", { className: "str-chat__message--system__line" })
3053
+ /* @__PURE__ */ W("div", { className: "str-chat__message--system__line" }),
3054
+ /* @__PURE__ */ W("p", { children: e.message.text }),
3055
+ /* @__PURE__ */ W("div", { className: "str-chat__message--system__line" })
3056
3056
  ]
3057
- }), !t && /* @__PURE__ */ U(z, { message: e.message })]
3057
+ }), !t && /* @__PURE__ */ W(z, { message: e.message })]
3058
3058
  });
3059
- }, Ri = c(!1), zi = ({ cx: e, index: t }) => /* @__PURE__ */ U("circle", {
3059
+ }, Ri = c(!1), zi = ({ cx: e, index: t }) => /* @__PURE__ */ W("circle", {
3060
3060
  cx: e,
3061
3061
  cy: "6.15",
3062
3062
  r: "3.9",
3063
3063
  fill: "#A0A0A0",
3064
- children: /* @__PURE__ */ U("animateTransform", {
3064
+ children: /* @__PURE__ */ W("animateTransform", {
3065
3065
  attributeName: "transform",
3066
3066
  type: "translate",
3067
3067
  values: "0 0; 0 -2.25; 0 0;",
@@ -3074,10 +3074,10 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3074
3074
  y.Generating,
3075
3075
  y.ExternalSources
3076
3076
  ]), Vi = ({ threadList: e }) => {
3077
- let { channel: t, channelConfig: n, thread: r } = me(), { client: i } = he(), { typing: a = {} } = Se(), { aiState: o } = fe(t), s = u(Ri);
3077
+ let { channel: t, channelConfig: n, thread: r } = V(), { client: i } = me(), { typing: a = {} } = xe(), { aiState: o } = fe(t), s = u(Ri);
3078
3078
  if (!e && s && Bi.has(o)) {
3079
3079
  let e = Ui(t, i.user?.id);
3080
- return /* @__PURE__ */ U(Hi, {
3080
+ return /* @__PURE__ */ W(Hi, {
3081
3081
  avatarId: e?.id ?? "ai-agent",
3082
3082
  avatarName: e?.name ?? e?.id ?? "Agent",
3083
3083
  avatarImage: e?.image,
@@ -3088,36 +3088,36 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3088
3088
  let c = e ? [] : Object.values(a).filter(({ parent_id: e, user: t }) => t?.id !== i.user?.id && !e), l = e ? Object.values(a).filter(({ parent_id: e, user: t }) => t?.id !== i.user?.id && e === r?.id) : [], d = e ? l : c;
3089
3089
  if (!d.length) return null;
3090
3090
  let f = d[0]?.user, p = f?.id && t.state.members[f.id] ? t.state.members[f.id].user : void 0;
3091
- return /* @__PURE__ */ U(Hi, {
3091
+ return /* @__PURE__ */ W(Hi, {
3092
3092
  avatarId: f?.id ?? p?.id ?? "typing-user",
3093
3093
  avatarName: f?.name ?? p?.name ?? f?.id ?? "Typing user",
3094
3094
  avatarImage: f?.image ?? p?.image,
3095
3095
  testId: "typing-indicator"
3096
3096
  });
3097
- }, Hi = ({ avatarId: e, avatarName: t, avatarImage: n, testId: r }) => /* @__PURE__ */ U("div", {
3097
+ }, Hi = ({ avatarId: e, avatarName: t, avatarImage: n, testId: r }) => /* @__PURE__ */ W("div", {
3098
3098
  className: "str-chat__li str-chat__li--single str-chat__typing-indicator !static",
3099
3099
  "data-testid": r,
3100
3100
  style: { marginBottom: "var(--messaging-channel-input-spacer-height, 80px)" },
3101
- children: /* @__PURE__ */ W("div", {
3101
+ children: /* @__PURE__ */ G("div", {
3102
3102
  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",
3103
- children: [/* @__PURE__ */ U(Z, {
3103
+ children: [/* @__PURE__ */ W(gt, {
3104
3104
  className: "str-chat__avatar str-chat__message-sender-avatar",
3105
3105
  id: e,
3106
3106
  name: t,
3107
3107
  image: n ?? void 0,
3108
3108
  size: 24,
3109
3109
  shape: "circle"
3110
- }), /* @__PURE__ */ U("div", {
3110
+ }), /* @__PURE__ */ W("div", {
3111
3111
  className: "str-chat__message-inner mx-0",
3112
- children: /* @__PURE__ */ U("div", {
3112
+ children: /* @__PURE__ */ W("div", {
3113
3113
  className: "str-chat__message-bubble-wrapper",
3114
- children: /* @__PURE__ */ W("div", {
3114
+ children: /* @__PURE__ */ G("div", {
3115
3115
  className: "str-chat__message-bubble relative isolate",
3116
- children: [/* @__PURE__ */ U("div", {
3116
+ children: [/* @__PURE__ */ W("div", {
3117
3117
  className: "str-chat__message-text min-h-11 flex items-center",
3118
- children: /* @__PURE__ */ U("div", {
3118
+ children: /* @__PURE__ */ W("div", {
3119
3119
  className: "str-chat__message-text-inner str-chat__message-simple-text-inner",
3120
- children: /* @__PURE__ */ W("svg", {
3120
+ children: /* @__PURE__ */ G("svg", {
3121
3121
  "aria-hidden": "true",
3122
3122
  className: "block overflow-visible",
3123
3123
  viewBox: "0 0 32 12.3",
@@ -3125,22 +3125,22 @@ var pi = ({ groupPosition: e, isMyMessage: t, message: n, renderText: r }) => {
3125
3125
  height: "13",
3126
3126
  overflow: "visible",
3127
3127
  children: [
3128
- /* @__PURE__ */ U(zi, {
3128
+ /* @__PURE__ */ W(zi, {
3129
3129
  cx: "4",
3130
3130
  index: 0
3131
3131
  }),
3132
- /* @__PURE__ */ U(zi, {
3132
+ /* @__PURE__ */ W(zi, {
3133
3133
  cx: "16",
3134
3134
  index: 1
3135
3135
  }),
3136
- /* @__PURE__ */ U(zi, {
3136
+ /* @__PURE__ */ W(zi, {
3137
3137
  cx: "28",
3138
3138
  index: 2
3139
3139
  })
3140
3140
  ]
3141
3141
  })
3142
3142
  })
3143
- }), /* @__PURE__ */ U(Tn, { side: "other" })]
3143
+ }), /* @__PURE__ */ W(Tn, { side: "other" })]
3144
3144
  })
3145
3145
  })
3146
3146
  })]
@@ -3155,18 +3155,18 @@ function Ui(e, t) {
3155
3155
  }
3156
3156
  //#endregion
3157
3157
  //#region src/components/MessagingShell/ChannelEmptyState.tsx
3158
- var Wi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ W("div", {
3159
- className: J("flex items-center justify-center h-full", e),
3160
- children: [/* @__PURE__ */ W("svg", {
3158
+ var Wi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ G("div", {
3159
+ className: Y("flex items-center justify-center h-full", e),
3160
+ children: [/* @__PURE__ */ G("svg", {
3161
3161
  viewBox: "0 0 100 100",
3162
3162
  className: "size-8 fill-pebble",
3163
3163
  stroke: "none",
3164
3164
  children: [
3165
- /* @__PURE__ */ U("circle", {
3165
+ /* @__PURE__ */ W("circle", {
3166
3166
  cx: "6",
3167
3167
  cy: "50",
3168
3168
  r: "6",
3169
- children: /* @__PURE__ */ U("animateTransform", {
3169
+ children: /* @__PURE__ */ W("animateTransform", {
3170
3170
  attributeName: "transform",
3171
3171
  dur: "1s",
3172
3172
  type: "translate",
@@ -3175,11 +3175,11 @@ var Wi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3175
3175
  begin: "0.1"
3176
3176
  })
3177
3177
  }),
3178
- /* @__PURE__ */ U("circle", {
3178
+ /* @__PURE__ */ W("circle", {
3179
3179
  cx: "30",
3180
3180
  cy: "50",
3181
3181
  r: "6",
3182
- children: /* @__PURE__ */ U("animateTransform", {
3182
+ children: /* @__PURE__ */ W("animateTransform", {
3183
3183
  attributeName: "transform",
3184
3184
  dur: "1s",
3185
3185
  type: "translate",
@@ -3188,11 +3188,11 @@ var Wi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3188
3188
  begin: "0.2"
3189
3189
  })
3190
3190
  }),
3191
- /* @__PURE__ */ U("circle", {
3191
+ /* @__PURE__ */ W("circle", {
3192
3192
  cx: "54",
3193
3193
  cy: "50",
3194
3194
  r: "6",
3195
- children: /* @__PURE__ */ U("animateTransform", {
3195
+ children: /* @__PURE__ */ W("animateTransform", {
3196
3196
  attributeName: "transform",
3197
3197
  dur: "1s",
3198
3198
  type: "translate",
@@ -3202,15 +3202,15 @@ var Wi = () => null, Gi = ({ className: e, message: t }) => /* @__PURE__ */ W("d
3202
3202
  })
3203
3203
  })
3204
3204
  ]
3205
- }), t && /* @__PURE__ */ U("span", {
3205
+ }), t && /* @__PURE__ */ W("span", {
3206
3206
  className: "text-stone",
3207
3207
  children: t
3208
3208
  })]
3209
- }), Ki = o.memo(() => /* @__PURE__ */ U("div", {
3209
+ }), Ki = o.memo(() => /* @__PURE__ */ W("div", {
3210
3210
  className: "messaging-loading-state flex items-center justify-center h-full",
3211
- children: /* @__PURE__ */ W("div", {
3211
+ children: /* @__PURE__ */ G("div", {
3212
3212
  className: "flex items-center",
3213
- children: [/* @__PURE__ */ U(Gi, { className: "w-6 h-6" }), /* @__PURE__ */ U("span", {
3213
+ children: [/* @__PURE__ */ W(Gi, { className: "w-6 h-6" }), /* @__PURE__ */ W("span", {
3214
3214
  className: "text-sm text-stone",
3215
3215
  children: "Loading messages"
3216
3216
  })]
@@ -3220,13 +3220,13 @@ Ki.displayName = "LoadingState";
3220
3220
  //#endregion
3221
3221
  //#region src/components/ChannelView.tsx
3222
3222
  var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMessageInputFooter: r, renderConversationFooter: i, onLeaveConversation: a, onBlockParticipant: s, showDeleteConversation: c = !0, onDeleteConversationClick: u, onBlockParticipantClick: f, onReportParticipantClick: p, showBlockParticipant: h = !0, showReportParticipant: g = !0, composerDisabled: _ = !1, composerDisabledReason: v, showStarButton: y = !1, renderChannelBanner: b, customChannelActions: x, renderChannelActions: S, renderMessage: C, viewerLanguage: w, showChannelInfo: T = !0, onParticipantNameClick: E, onOutboundClick: D, resolveOutbound: O, composerInput: k }) => {
3223
- let { channel: A, messages: j } = me(), M = m(D);
3223
+ let { channel: A, messages: j } = V(), M = m(D);
3224
3224
  d(() => {
3225
3225
  M.current = D;
3226
3226
  }, [D]);
3227
3227
  let N = l((e) => {
3228
3228
  M.current?.(e);
3229
- }, []), P = D ? N : void 0, I = An(j, O), L = A.state.messages.some((e) => e.type !== "deleted"), R = b ? /* @__PURE__ */ U(o.Fragment, { children: b() }, "lt-channel-banner") : null, z = /* @__PURE__ */ U(wt, {
3229
+ }, []), P = D ? N : void 0, I = An(j, O), L = A.state.messages.some((e) => e.type !== "deleted"), R = b ? /* @__PURE__ */ W(o.Fragment, { children: b() }, "lt-channel-banner") : null, z = /* @__PURE__ */ W(wt, {
3230
3230
  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%)]",
3231
3231
  onBack: e,
3232
3232
  showBackButton: t,
@@ -3244,7 +3244,7 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3244
3244
  renderChannelActions: S,
3245
3245
  onParticipantNameClick: E
3246
3246
  }), ee = l((e) => {
3247
- let { message: t } = V("ChannelView"), n = /* @__PURE__ */ U(hi, {
3247
+ let { message: t } = H("ChannelView"), n = /* @__PURE__ */ W(hi, {
3248
3248
  ...e,
3249
3249
  viewerLanguage: w,
3250
3250
  onOutboundClick: P
@@ -3255,34 +3255,34 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3255
3255
  C,
3256
3256
  w
3257
3257
  ]);
3258
- return /* @__PURE__ */ U(En.Provider, {
3258
+ return /* @__PURE__ */ W(En.Provider, {
3259
3259
  value: I,
3260
- children: /* @__PURE__ */ U(ae, {
3260
+ children: /* @__PURE__ */ W(ae, {
3261
3261
  overrides: {
3262
3262
  Message: ee,
3263
3263
  MessageActions: vi,
3264
3264
  UnreadMessagesNotification: () => null,
3265
3265
  UnreadMessagesSeparator: () => null
3266
3266
  },
3267
- children: /* @__PURE__ */ U(B, { children: k ? /* @__PURE__ */ W("div", {
3267
+ children: /* @__PURE__ */ W(B, { children: k ? /* @__PURE__ */ G("div", {
3268
3268
  className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col",
3269
- children: [/* @__PURE__ */ W("div", {
3269
+ children: [/* @__PURE__ */ G("div", {
3270
3270
  className: "messaging-channel-message-list messaging-channel-message-list--floating relative min-h-0 flex-1 overflow-hidden",
3271
- children: [!L && /* @__PURE__ */ U("div", {
3271
+ children: [!L && /* @__PURE__ */ W("div", {
3272
3272
  className: "str-chat__list",
3273
- children: /* @__PURE__ */ W("div", {
3273
+ children: /* @__PURE__ */ G("div", {
3274
3274
  className: "str-chat__message-list-scroll",
3275
3275
  children: [z, R]
3276
3276
  })
3277
- }), /* @__PURE__ */ U(F, {
3278
- head: L ? /* @__PURE__ */ W("div", {
3277
+ }), /* @__PURE__ */ W(F, {
3278
+ head: L ? /* @__PURE__ */ G("div", {
3279
3279
  className: "sticky top-0 z-10",
3280
3280
  children: [z, R]
3281
3281
  }) : void 0,
3282
3282
  hideDeletedMessages: !0,
3283
3283
  hideNewMessageSeparator: !1
3284
3284
  })]
3285
- }, "lt-channel-message-list"), /* @__PURE__ */ U(Di, {
3285
+ }, "lt-channel-message-list"), /* @__PURE__ */ W(Di, {
3286
3286
  ...n && { renderActions: () => n?.(A) },
3287
3287
  ...i && { renderHeader: () => i(A) },
3288
3288
  renderFooter: () => r?.(A),
@@ -3290,17 +3290,17 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3290
3290
  disabledReason: v,
3291
3291
  composerInput: k
3292
3292
  }, "lt-channel-message-input")]
3293
- }) : /* @__PURE__ */ W(H, { children: [
3294
- /* @__PURE__ */ W("div", {
3293
+ }) : /* @__PURE__ */ G(U, { children: [
3294
+ /* @__PURE__ */ G("div", {
3295
3295
  className: "flex-1 overflow-hidden relative",
3296
- children: [!L && /* @__PURE__ */ U("div", {
3296
+ children: [!L && /* @__PURE__ */ W("div", {
3297
3297
  className: "str-chat__list",
3298
- children: /* @__PURE__ */ W("div", {
3298
+ children: /* @__PURE__ */ G("div", {
3299
3299
  className: "str-chat__message-list-scroll",
3300
3300
  children: [z, R]
3301
3301
  })
3302
- }), /* @__PURE__ */ U(F, {
3303
- head: L ? /* @__PURE__ */ W("div", {
3302
+ }), /* @__PURE__ */ W(F, {
3303
+ head: L ? /* @__PURE__ */ G("div", {
3304
3304
  className: "sticky top-0 z-10",
3305
3305
  children: [z, R]
3306
3306
  }) : void 0,
@@ -3308,8 +3308,8 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3308
3308
  hideNewMessageSeparator: !1
3309
3309
  })]
3310
3310
  }, "lt-channel-message-list"),
3311
- i ? /* @__PURE__ */ U(o.Fragment, { children: i(A) }, "lt-channel-conversation-footer") : null,
3312
- /* @__PURE__ */ U(Di, {
3311
+ i ? /* @__PURE__ */ W(o.Fragment, { children: i(A) }, "lt-channel-conversation-footer") : null,
3312
+ /* @__PURE__ */ W(Di, {
3313
3313
  ...n && { renderActions: () => n?.(A) },
3314
3314
  renderFooter: () => r?.(A),
3315
3315
  disabled: _,
@@ -3351,15 +3351,15 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3351
3351
  };
3352
3352
  return t.addEventListener("click", n), () => t.removeEventListener("click", n);
3353
3353
  }, [A, e]);
3354
- let te = we(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
3355
- return /* @__PURE__ */ U("div", {
3354
+ let te = Ce(e.type) ? { "--lt-msg-card-width": "368px" } : void 0;
3355
+ return /* @__PURE__ */ W("div", {
3356
3356
  ref: ee,
3357
3357
  "data-testid": "channel-view",
3358
- className: J("messaging-channel-view h-full flex flex-col", c),
3358
+ className: Y("messaging-channel-view h-full flex flex-col", c),
3359
3359
  style: te,
3360
- children: /* @__PURE__ */ U(Ri.Provider, {
3360
+ children: /* @__PURE__ */ W(Ri.Provider, {
3361
3361
  value: x ?? !1,
3362
- children: /* @__PURE__ */ U(S, {
3362
+ children: /* @__PURE__ */ W(S, {
3363
3363
  channel: e,
3364
3364
  MessageSystem: Li,
3365
3365
  EmptyStateIndicator: u,
@@ -3369,7 +3369,7 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3369
3369
  doSendMessageRequest: z,
3370
3370
  ...j ? { SendButton: j } : {},
3371
3371
  ...M ? { AttachmentPreviewList: M } : {},
3372
- children: /* @__PURE__ */ U(qi, {
3372
+ children: /* @__PURE__ */ W(qi, {
3373
3373
  onBack: t,
3374
3374
  showBackButton: n,
3375
3375
  renderMessageInputActions: r,
@@ -3405,27 +3405,27 @@ var qi = ({ onBack: e, showBackButton: t, renderMessageInputActions: n, renderMe
3405
3405
  Ji.displayName = "ChannelView";
3406
3406
  //#endregion
3407
3407
  //#region src/components/MessagingShell/ErrorState.tsx
3408
- var Yi = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ U("div", {
3408
+ var Yi = o.memo(({ message: e, onBack: t }) => /* @__PURE__ */ W("div", {
3409
3409
  className: "messaging-error-state flex items-center justify-center h-full p-8",
3410
- children: /* @__PURE__ */ W("div", {
3410
+ children: /* @__PURE__ */ G("div", {
3411
3411
  className: "text-center max-w-sm",
3412
3412
  children: [
3413
- /* @__PURE__ */ U("div", {
3413
+ /* @__PURE__ */ W("div", {
3414
3414
  className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6",
3415
- children: /* @__PURE__ */ U("span", {
3415
+ children: /* @__PURE__ */ W("span", {
3416
3416
  className: "text-4xl",
3417
3417
  children: "⚠️"
3418
3418
  })
3419
3419
  }),
3420
- /* @__PURE__ */ U("h2", {
3420
+ /* @__PURE__ */ W("h2", {
3421
3421
  className: "font-semibold text-charcoal mb-2",
3422
3422
  children: "Oops!"
3423
3423
  }),
3424
- /* @__PURE__ */ U("p", {
3424
+ /* @__PURE__ */ W("p", {
3425
3425
  className: "text-stone text-sm mb-6",
3426
3426
  children: e
3427
3427
  }),
3428
- t && /* @__PURE__ */ U("button", {
3428
+ t && /* @__PURE__ */ W("button", {
3429
3429
  type: "button",
3430
3430
  onClick: t,
3431
3431
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-[#7f22fe] hover:bg-primary-alt rounded-lg transition-colors focus-ring",
@@ -3438,7 +3438,7 @@ Yi.displayName = "ErrorState";
3438
3438
  //#endregion
3439
3439
  //#region src/components/MessagingShell/index.tsx
3440
3440
  var Xi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversationFooter: n, onChannelSelect: r, onExitConversation: i, initialParticipantFilter: a, initialParticipantData: o, CustomChannelEmptyState: s, onBlockParticipantClick: c, onReportParticipantClick: u, dmAgentEnabled: f, onMessageSent: p, viewerLanguage: g, renderChannelBanner: _, customChannelActions: v, renderChannelActions: y, onParticipantNameClick: b, onOutboundClick: x, resolveOutbound: S, renderMessage: C, onMessageLinkClick: w, showChannelInfo: T, composerInput: E, attachmentPreviewList: D }) => {
3441
- let { client: O, isConnected: k, isLoading: A, error: j, refreshConnection: M, service: N, debug: P } = at(), [F, I] = h(null), [L, R] = h(null), [z, ee] = h(!1), { showDeleteConversation: te = !0 } = e, ne = m(o);
3441
+ let { client: O, isConnected: k, isLoading: A, error: j, refreshConnection: M, service: N, debug: P } = it(), [F, I] = h(null), [L, R] = h(null), [z, ee] = h(!1), { showDeleteConversation: te = !0 } = e, ne = m(o);
3442
3442
  ne.current = o;
3443
3443
  let re = m(r);
3444
3444
  re.current = r;
@@ -3497,17 +3497,17 @@ var Xi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversati
3497
3497
  let oe = l(() => {
3498
3498
  I(null), ee(!0), ae.current?.();
3499
3499
  }, []);
3500
- return A ? /* @__PURE__ */ U(Ki, {}) : j ? /* @__PURE__ */ U(Yi, {
3500
+ return A ? /* @__PURE__ */ W(Ki, {}) : j ? /* @__PURE__ */ W(Yi, {
3501
3501
  message: j,
3502
3502
  onBack: M
3503
- }) : !k || !O ? /* @__PURE__ */ U(Yi, {
3503
+ }) : !k || !O ? /* @__PURE__ */ W(Yi, {
3504
3504
  message: "Not connected to messaging service",
3505
3505
  onBack: M
3506
- }) : L ? /* @__PURE__ */ U(Yi, { message: L }) : z && !F ? /* @__PURE__ */ U(Yi, { message: "Conversation ended" }) : F ? /* @__PURE__ */ U("div", {
3506
+ }) : L ? /* @__PURE__ */ W(Yi, { message: L }) : z && !F ? /* @__PURE__ */ W(Yi, { message: "Conversation ended" }) : F ? /* @__PURE__ */ W("div", {
3507
3507
  className: "messaging-shell h-full bg-background-primary overflow-hidden",
3508
- children: /* @__PURE__ */ U("div", {
3508
+ children: /* @__PURE__ */ W("div", {
3509
3509
  className: "flex h-full min-h-0 flex-col",
3510
- children: /* @__PURE__ */ U(Ji, {
3510
+ children: /* @__PURE__ */ W(Ji, {
3511
3511
  channel: F,
3512
3512
  renderMessageInputActions: t,
3513
3513
  renderConversationFooter: n,
@@ -3533,7 +3533,7 @@ var Xi = ({ capabilities: e = {}, renderMessageInputActions: t, renderConversati
3533
3533
  attachmentPreviewList: D
3534
3534
  }, F.id)
3535
3535
  })
3536
- }) : /* @__PURE__ */ U(Ki, {});
3536
+ }) : /* @__PURE__ */ W(Ki, {});
3537
3537
  };
3538
3538
  //#endregion
3539
3539
  //#region src/hooks/useRestorePendingMessages.ts
@@ -3570,8 +3570,8 @@ var Qi = o.createContext({
3570
3570
  year: "numeric"
3571
3571
  });
3572
3572
  }, ra = o.memo((e) => {
3573
- let { channel: t, unread: n } = e, { selectedChannel: r, onChannelSelect: i, debug: a, channelPreview: o, renderMessagePreview: s, viewerLanguage: c } = ea(), { client: l } = he(), u = r?.id === t?.id, d = ot(t);
3574
- if (o) return /* @__PURE__ */ U(o, {
3573
+ let { channel: t, unread: n } = e, { selectedChannel: r, onChannelSelect: i, debug: a, channelPreview: o, renderMessagePreview: s, viewerLanguage: c } = ea(), { client: l } = me(), u = r?.id === t?.id, d = at(t);
3574
+ if (o) return /* @__PURE__ */ W(o, {
3575
3575
  ...e,
3576
3576
  active: u,
3577
3577
  selectedChannel: r,
@@ -3583,7 +3583,7 @@ var Qi = o.createContext({
3583
3583
  }, p = (e) => {
3584
3584
  let t = e.key === "Enter" || e.key === " ", n = e.repeat;
3585
3585
  !t || n || (e.preventDefault(), f());
3586
- }, m = st(t?.state?.members, l?.userID, t?.type), h = dt(m?.user), g = m?.user?.image, _ = (() => {
3586
+ }, m = ot(t?.state?.members, l?.userID, t?.type), h = ut(m?.user), g = m?.user?.image, _ = (() => {
3587
3587
  let e = t?.state?.messages;
3588
3588
  if (e?.length) {
3589
3589
  for (let t = e.length - 1; t >= 0; t--) if (e[t].type !== "system") return e[t];
@@ -3593,9 +3593,9 @@ var Qi = o.createContext({
3593
3593
  message: _,
3594
3594
  viewerLanguage: c
3595
3595
  }), { custom_type: t, attachment_content_type: n } = _?.metadata || {};
3596
- if (t === G.TIP) return e || "Sent a tip";
3597
- if (t === G.PAID) return e || "Sent a message";
3598
- if (t === G.ATTACHMENT) {
3596
+ if (t === K.TIP) return e || "Sent a tip";
3597
+ if (t === K.PAID) return e || "Sent a message";
3598
+ if (t === K.ATTACHMENT) {
3599
3599
  if (n === "text") return "🔒 Sent a locked message";
3600
3600
  if (n === "media") return "🔒 Sent a locked attachment";
3601
3601
  }
@@ -3609,45 +3609,45 @@ var Qi = o.createContext({
3609
3609
  participantName: h,
3610
3610
  unreadCount: S,
3611
3611
  hasTimestamp: !!y
3612
- }), /* @__PURE__ */ U("div", {
3612
+ }), /* @__PURE__ */ W("div", {
3613
3613
  role: "button",
3614
3614
  tabIndex: 0,
3615
3615
  onClick: f,
3616
3616
  onKeyDown: p,
3617
- className: J("group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2", {
3617
+ className: Y("group w-full px-4 py-3 transition-colors text-left max-w-full overflow-hidden focus-ring rounded-[12px] [&+&]:mt-2", {
3618
3618
  "bg-black/[0.04]": u,
3619
3619
  "hover:bg-black/[0.02]": !u
3620
3620
  }),
3621
3621
  "data-dd-privacy": "mask",
3622
- children: /* @__PURE__ */ W("div", {
3622
+ children: /* @__PURE__ */ G("div", {
3623
3623
  className: "flex items-start gap-4",
3624
- children: [/* @__PURE__ */ U(Z, {
3624
+ children: [/* @__PURE__ */ W(gt, {
3625
3625
  id: m?.user?.id || t.id || "unknown",
3626
3626
  name: h,
3627
3627
  image: g,
3628
3628
  size: 48,
3629
3629
  starred: d
3630
- }), /* @__PURE__ */ W("div", {
3630
+ }), /* @__PURE__ */ G("div", {
3631
3631
  className: "flex-1 min-w-0 flex flex-col gap-1",
3632
- children: [/* @__PURE__ */ W("div", {
3632
+ children: [/* @__PURE__ */ G("div", {
3633
3633
  className: "flex items-center justify-between gap-2",
3634
- children: [/* @__PURE__ */ W("h3", {
3635
- className: J("text-sm font-medium truncate text-[#191918]"),
3636
- children: [d && /* @__PURE__ */ U("span", {
3634
+ children: [/* @__PURE__ */ G("h3", {
3635
+ className: Y("text-sm font-medium truncate text-[#191918]"),
3636
+ children: [d && /* @__PURE__ */ W("span", {
3637
3637
  className: "sr-only",
3638
3638
  children: "Starred conversation. "
3639
3639
  }), h]
3640
- }), y && /* @__PURE__ */ U("span", {
3640
+ }), y && /* @__PURE__ */ W("span", {
3641
3641
  "data-testid": "channel-preview-timestamp",
3642
3642
  className: "text-xs text-[#717070] flex-shrink-0",
3643
3643
  children: y
3644
3644
  })]
3645
- }), /* @__PURE__ */ W("div", {
3645
+ }), /* @__PURE__ */ G("div", {
3646
3646
  className: "flex items-center justify-between gap-2 min-w-0",
3647
- children: [/* @__PURE__ */ U("p", {
3647
+ children: [/* @__PURE__ */ W("p", {
3648
3648
  className: "text-sm text-[#717070] flex-1 line-clamp-1",
3649
3649
  children: x
3650
- }), S > 0 && /* @__PURE__ */ U("span", {
3650
+ }), S > 0 && /* @__PURE__ */ W("span", {
3651
3651
  "data-testid": "channel-preview-unread-badge",
3652
3652
  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",
3653
3653
  children: S > 99 ? "99+" : S
@@ -3663,7 +3663,7 @@ ra.displayName = "CustomChannelPreview";
3663
3663
  var ia = { last_message_at: -1 }, aa = o.memo(({ onChannelSelect: e, selectedChannel: t, filters: n, allowNewMessagesFromUnfilteredChannels: r = !1, channelRenderFilterFn: i, sort: a = ia, className: s, customEmptyStateIndicator: c, channelListPaginator: l = D, channelPreview: u, renderMessagePreview: d, viewerLanguage: f, lockChannelOrder: p, onMessageNewHandler: m, onMessageNew: h, onChannelVisible: g, onAddedToChannel: _, onChannelUpdated: v }) => {
3664
3664
  let y = o.useRef(0);
3665
3665
  y.current++;
3666
- let { debug: b = !1 } = rt(), x = o.useCallback((e) => {
3666
+ let { debug: b = !1 } = nt(), x = o.useCallback((e) => {
3667
3667
  for (let t of e) Zi(t);
3668
3668
  return i ? i(e) : e;
3669
3669
  }, [i]);
@@ -3687,13 +3687,13 @@ var ia = { last_message_at: -1 }, aa = o.memo(({ onChannelSelect: e, selectedCha
3687
3687
  d,
3688
3688
  f
3689
3689
  ]);
3690
- return /* @__PURE__ */ U("div", {
3691
- className: J("messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden", s),
3692
- children: /* @__PURE__ */ U("div", {
3690
+ return /* @__PURE__ */ W("div", {
3691
+ className: Y("messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden", s),
3692
+ children: /* @__PURE__ */ W("div", {
3693
3693
  className: "flex-1 overflow-hidden min-w-0",
3694
- children: /* @__PURE__ */ U($i, {
3694
+ children: /* @__PURE__ */ W($i, {
3695
3695
  value: S,
3696
- children: /* @__PURE__ */ U(C, {
3696
+ children: /* @__PURE__ */ W(C, {
3697
3697
  filters: n,
3698
3698
  sort: a,
3699
3699
  options: { limit: 30 },
@@ -3716,15 +3716,15 @@ var ia = { last_message_at: -1 }, aa = o.memo(({ onChannelSelect: e, selectedCha
3716
3716
  aa.displayName = "ChannelList";
3717
3717
  //#endregion
3718
3718
  //#region src/components/RichCard/RichCardBody.tsx
3719
- var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa = "text-[14px] leading-5 tracking-[0.02em]", ca = () => /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
3719
+ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa = "text-[14px] leading-5 tracking-[0.02em]", ca = () => /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("br", {}), /* @__PURE__ */ W("span", {
3720
3720
  "aria-hidden": !0,
3721
3721
  className: "block h-1.5"
3722
- })] }), la = (e) => e.split(/\r?\n/).map((e, t, n) => /* @__PURE__ */ W(o.Fragment, { children: [e, t < n.length - 1 ? /* @__PURE__ */ U(ca, {}) : null] }, t)), ua = ({ surface: e, actions: t, layout: n }) => {
3722
+ })] }), la = (e) => e.split(/\r?\n/).map((e, t, n) => /* @__PURE__ */ G(o.Fragment, { children: [e, t < n.length - 1 ? /* @__PURE__ */ W(ca, {}) : null] }, t)), ua = ({ surface: e, actions: t, layout: n }) => {
3723
3723
  if (t == null || t.length === 0) return null;
3724
3724
  let r = n === "stacked";
3725
- return /* @__PURE__ */ U("div", {
3726
- className: J("flex gap-2", r ? "mt-4 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"),
3727
- children: t.map((t, n) => /* @__PURE__ */ U(Mt, {
3725
+ return /* @__PURE__ */ W("div", {
3726
+ className: Y("flex gap-2", r ? "mt-4 flex-col" : "min-w-0 max-w-[60%] flex-row flex-wrap justify-end"),
3727
+ children: t.map((t, n) => /* @__PURE__ */ W(Mt, {
3728
3728
  variant: e,
3729
3729
  cta: t,
3730
3730
  fullWidth: r,
@@ -3740,35 +3740,35 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3740
3740
  WebkitBoxOrient: "vertical",
3741
3741
  WebkitLineClamp: i,
3742
3742
  overflow: "hidden"
3743
- } : u, f = l && (o?.[0]?.variant ?? "primary") === "secondary", p = /* @__PURE__ */ W("div", {
3743
+ } : u, f = l && (o?.[0]?.variant ?? "primary") === "secondary", p = /* @__PURE__ */ G("div", {
3744
3744
  className: "flex min-w-0 flex-1 flex-col gap-4",
3745
- children: [s && /* @__PURE__ */ W("div", {
3745
+ children: [s && /* @__PURE__ */ G("div", {
3746
3746
  className: "flex min-w-0 items-center gap-2",
3747
- children: [a ? /* @__PURE__ */ U("span", {
3747
+ children: [a ? /* @__PURE__ */ W("span", {
3748
3748
  className: "shrink-0",
3749
3749
  children: a
3750
- }) : null, /* @__PURE__ */ U("p", {
3751
- className: J("min-w-0", oa),
3750
+ }) : null, /* @__PURE__ */ W("p", {
3751
+ className: Y("min-w-0", oa),
3752
3752
  style: u,
3753
3753
  children: n
3754
3754
  })]
3755
- }), c && /* @__PURE__ */ U("p", {
3756
- className: J(sa, i <= 1 && "truncate"),
3755
+ }), c && /* @__PURE__ */ W("p", {
3756
+ className: Y(sa, i <= 1 && "truncate"),
3757
3757
  style: d,
3758
3758
  children: i > 1 ? la(r ?? "") : r
3759
3759
  })]
3760
3760
  });
3761
- return /* @__PURE__ */ U("div", {
3761
+ return /* @__PURE__ */ W("div", {
3762
3762
  className: "shrink-0 px-4 py-3",
3763
- children: f ? /* @__PURE__ */ W("div", {
3763
+ children: f ? /* @__PURE__ */ G("div", {
3764
3764
  "data-testid": "rich-card-chin-row",
3765
3765
  className: "flex items-center justify-between gap-3",
3766
- children: [p, /* @__PURE__ */ U(ua, {
3766
+ children: [p, /* @__PURE__ */ W(ua, {
3767
3767
  surface: e,
3768
3768
  actions: o,
3769
3769
  layout: "row"
3770
3770
  })]
3771
- }) : /* @__PURE__ */ W(H, { children: [p, /* @__PURE__ */ U(ua, {
3771
+ }) : /* @__PURE__ */ G(U, { children: [p, /* @__PURE__ */ W(ua, {
3772
3772
  surface: e,
3773
3773
  actions: o,
3774
3774
  layout: "stacked"
@@ -3816,9 +3816,9 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3816
3816
  src: e,
3817
3817
  index: t
3818
3818
  })).filter(({ index: e }) => !n[e]), u = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, d = pa[u], f = ma[u], p = ha[u], m = ga[u];
3819
- return /* @__PURE__ */ U("div", {
3820
- className: J("relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden", fa[e]),
3821
- children: l.map(({ src: e, index: t }, n) => /* @__PURE__ */ U("img", {
3819
+ return /* @__PURE__ */ W("div", {
3820
+ className: Y("relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden", fa[e]),
3821
+ children: l.map(({ src: e, index: t }, n) => /* @__PURE__ */ W("img", {
3822
3822
  src: a(e) ?? e,
3823
3823
  alt: "",
3824
3824
  draggable: !1,
@@ -3835,12 +3835,12 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3835
3835
  }
3836
3836
  }, `${e}-${t}`))
3837
3837
  });
3838
- }, va = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", ya = ({ variant: e, presentation: t, images: n, title: r, heroUrl: i, onHeroError: a }) => /* @__PURE__ */ U("div", {
3838
+ }, va = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", ya = ({ variant: e, presentation: t, images: n, title: r, heroUrl: i, onHeroError: a }) => /* @__PURE__ */ W("div", {
3839
3839
  className: va,
3840
- children: t === "fan" ? /* @__PURE__ */ U(_a, {
3840
+ children: t === "fan" ? /* @__PURE__ */ W(_a, {
3841
3841
  variant: e,
3842
3842
  images: n
3843
- }) : /* @__PURE__ */ U(qt, {
3843
+ }) : /* @__PURE__ */ W(qt, {
3844
3844
  variant: e,
3845
3845
  thumbnailUrl: i,
3846
3846
  title: r,
@@ -3848,7 +3848,7 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3848
3848
  onImageError: a
3849
3849
  })
3850
3850
  }), ba = ({ variant: e, title: t, subtitle: n, subtitleLines: r, images: i = [], imagePresentation: a, actions: o, appIcon: s, accentColor: c, groupPosition: l = "single" }) => {
3851
- let u = Te({
3851
+ let u = we({
3852
3852
  imagePresentation: a,
3853
3853
  images: i
3854
3854
  }), d = i.length > 0, f = d && u === "hero", p = $t({
@@ -3857,22 +3857,22 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3857
3857
  layout: "featured",
3858
3858
  thumbnailUrl: f ? i[0] : void 0
3859
3859
  }), m = l === "single" || l === "end";
3860
- return /* @__PURE__ */ U(rn, {
3860
+ return /* @__PURE__ */ W(rn, {
3861
3861
  accentHex: p.accentHex,
3862
3862
  side: e === "dark" ? "sender" : "receiver",
3863
3863
  visible: m,
3864
- children: /* @__PURE__ */ W(Vt, {
3864
+ children: /* @__PURE__ */ G(Vt, {
3865
3865
  variant: e,
3866
3866
  accentHex: p.accentHex,
3867
3867
  "data-testid": "rich-card",
3868
- children: [d && /* @__PURE__ */ U(ya, {
3868
+ children: [d && /* @__PURE__ */ W(ya, {
3869
3869
  variant: e,
3870
3870
  presentation: u,
3871
3871
  images: i,
3872
3872
  title: t,
3873
3873
  heroUrl: f ? p.thumbnailUrl : void 0,
3874
3874
  onHeroError: p.onImageError
3875
- }), /* @__PURE__ */ U(da, {
3875
+ }), /* @__PURE__ */ W(da, {
3876
3876
  ctaSurface: p.surface,
3877
3877
  chinTextColor: p.chinTextColor,
3878
3878
  title: t,
@@ -3884,18 +3884,18 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3884
3884
  })
3885
3885
  });
3886
3886
  }, xa = {
3887
- Sent: (e) => /* @__PURE__ */ U(ba, {
3887
+ Sent: (e) => /* @__PURE__ */ W(ba, {
3888
3888
  ...e,
3889
3889
  variant: "dark"
3890
3890
  }),
3891
- Received: (e) => /* @__PURE__ */ U(ba, {
3891
+ Received: (e) => /* @__PURE__ */ W(ba, {
3892
3892
  ...e,
3893
3893
  variant: "light"
3894
3894
  })
3895
3895
  }, Sa = "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%", Ca = {
3896
3896
  sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
3897
3897
  received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
3898
- }, wa = ({ variant: e }) => /* @__PURE__ */ U("span", {
3898
+ }, wa = ({ variant: e }) => /* @__PURE__ */ W("span", {
3899
3899
  "aria-hidden": "true",
3900
3900
  className: "pointer-events-none absolute bottom-0 z-[-1] h-[1.4375rem] w-5",
3901
3901
  style: {
@@ -3916,73 +3916,73 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3916
3916
  backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
3917
3917
  color: "var(--str-chat__message-bubble-color, #000000)"
3918
3918
  }
3919
- }, Ea = ({ variant: e, text: t, tail: n = !0, header: r, className: i }) => /* @__PURE__ */ W("div", {
3919
+ }, Ea = ({ variant: e, text: t, tail: n = !0, header: r, className: i }) => /* @__PURE__ */ G("div", {
3920
3920
  "data-dd-privacy": "mask",
3921
- className: J("relative px-4 py-3", "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]", i),
3921
+ className: Y("relative px-4 py-3", "text-[0.875rem] leading-[1.3125rem] tracking-[0.14px]", i),
3922
3922
  style: {
3923
3923
  ...Ta[e],
3924
3924
  borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
3925
3925
  isolation: "isolate"
3926
3926
  },
3927
3927
  children: [
3928
- r != null && /* @__PURE__ */ U("div", {
3928
+ r != null && /* @__PURE__ */ W("div", {
3929
3929
  className: "mb-1 font-medium",
3930
3930
  "data-testid": "message-bubble-header",
3931
3931
  children: r
3932
3932
  }),
3933
- /* @__PURE__ */ U("p", {
3933
+ /* @__PURE__ */ W("p", {
3934
3934
  className: "m-0 whitespace-pre-wrap break-words hyphens-manual",
3935
3935
  children: t
3936
3936
  }),
3937
- n && /* @__PURE__ */ U(wa, { variant: e })
3937
+ n && /* @__PURE__ */ W(wa, { variant: e })
3938
3938
  ]
3939
3939
  }), Da = {
3940
- Sent: ({ text: e, tail: t, className: n }) => /* @__PURE__ */ U(Ea, {
3940
+ Sent: ({ text: e, tail: t, className: n }) => /* @__PURE__ */ W(Ea, {
3941
3941
  variant: "sent",
3942
3942
  text: e,
3943
3943
  tail: t,
3944
3944
  className: n
3945
3945
  }),
3946
- Received: ({ text: e, tail: t, header: n, className: r }) => /* @__PURE__ */ U(Ea, {
3946
+ Received: ({ text: e, tail: t, header: n, className: r }) => /* @__PURE__ */ W(Ea, {
3947
3947
  variant: "received",
3948
3948
  text: e,
3949
3949
  tail: t,
3950
3950
  header: n,
3951
3951
  className: r
3952
3952
  })
3953
- }, Oa = ({ question: e, onClick: t, loading: n = !1, className: r }) => /* @__PURE__ */ U("button", {
3953
+ }, Oa = ({ question: e, onClick: t, loading: n = !1, className: r }) => /* @__PURE__ */ W("button", {
3954
3954
  type: "button",
3955
3955
  onClick: t,
3956
3956
  disabled: n,
3957
3957
  style: { backgroundColor: "#E6E5E3" },
3958
- className: J("w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring", {
3958
+ className: Y("w-full text-center p-4 rounded-xl text-charcoal font-medium transition-colors focus-ring", {
3959
3959
  "hover:brightness-95 active:brightness-90": !n,
3960
3960
  "opacity-50 cursor-not-allowed": n
3961
3961
  }, r),
3962
3962
  children: e
3963
3963
  }), ka = ({ faqs: e, onFaqClick: t, loadingFaqId: n, headerText: r, className: i, avatarImage: a, avatarName: o }) => {
3964
- let s = Ee(e);
3965
- return s.length === 0 ? null : /* @__PURE__ */ U("div", {
3964
+ let s = Te(e);
3965
+ return s.length === 0 ? null : /* @__PURE__ */ W("div", {
3966
3966
  className: i,
3967
- children: /* @__PURE__ */ W("div", {
3967
+ children: /* @__PURE__ */ G("div", {
3968
3968
  className: "flex gap-3 items-end",
3969
- children: [(a || o) && /* @__PURE__ */ U("div", {
3969
+ children: [(a || o) && /* @__PURE__ */ W("div", {
3970
3970
  className: "flex-none",
3971
- children: /* @__PURE__ */ U(Z, {
3971
+ children: /* @__PURE__ */ W(gt, {
3972
3972
  id: o || "account",
3973
3973
  name: o || "Account",
3974
3974
  image: a,
3975
3975
  size: 24,
3976
3976
  shape: "circle"
3977
3977
  })
3978
- }), /* @__PURE__ */ W("div", {
3978
+ }), /* @__PURE__ */ G("div", {
3979
3979
  className: "flex-1 flex flex-col gap-3 rounded-lg p-4",
3980
3980
  style: { backgroundColor: "#F1F0EE" },
3981
- children: [r && /* @__PURE__ */ U("p", {
3981
+ children: [r && /* @__PURE__ */ W("p", {
3982
3982
  "data-testid": "faq-list-header",
3983
3983
  className: "text-md text-charcoal mb-4",
3984
3984
  children: r
3985
- }), s.map((e) => /* @__PURE__ */ U(Oa, {
3985
+ }), s.map((e) => /* @__PURE__ */ W(Oa, {
3986
3986
  question: e.question,
3987
3987
  onClick: () => t(e.id),
3988
3988
  loading: n === e.id
@@ -3992,6 +3992,6 @@ var oa = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.02em]", sa
3992
3992
  });
3993
3993
  };
3994
3994
  //#endregion
3995
- export { yt as ActionButton, Z as Avatar, Wi as ChannelEmptyState, aa as ChannelList, Ji as ChannelView, ln as CustomMessageProvider, ka as FaqList, Oa as FaqListItem, an as LinkAttachment, mn as LockedAttachment, $r as MessageAttachment, Da as MessageBubble, et as MessagingLoggerProvider, it as MessagingProvider, Xi as MessagingShell, xa as RichCard, Mn as TipMessage, tr as buildCompactMetaLabel, Qn as formatFileSize, na as formatRelativeTime, er as getFileExtensionLabel, Dt as getMessageDisplayText, on as isLinkAttachment, jn as isTipMessage, lt as isUuidLike, qn as messageAttachmentGroupPositionFromStream, Et as normalizeLanguageCode, a as optimizeMessagingAttachmentUrl, st as resolveConversationParticipant, dt as resolveParticipantDisplayName, Ci as useComposerLocked, un as useCustomMessage, at as useMessaging, tt as useMessagingLogger };
3995
+ export { yt as ActionButton, gt as Avatar, Wi as ChannelEmptyState, aa as ChannelList, Ji as ChannelView, ln as CustomMessageProvider, ka as FaqList, Oa as FaqListItem, an as LinkAttachment, mn as LockedAttachment, $r as MessageAttachment, Da as MessageBubble, $e as MessagingLoggerProvider, rt as MessagingProvider, Xi as MessagingShell, xa as RichCard, Mn as TipMessage, tr as buildCompactMetaLabel, Qn as formatFileSize, na as formatRelativeTime, er as getFileExtensionLabel, Dt as getMessageDisplayText, on as isLinkAttachment, jn as isTipMessage, ct as isUuidLike, qn as messageAttachmentGroupPositionFromStream, Et as normalizeLanguageCode, a as optimizeMessagingAttachmentUrl, ot as resolveConversationParticipant, ut as resolveParticipantDisplayName, Ci as useComposerLocked, un as useCustomMessage, it as useMessaging, et as useMessagingLogger };
3996
3996
 
3997
3997
  //# sourceMappingURL=index.js.map