@linktr.ee/messaging-react 3.3.8 → 3.3.9-rc-1781245410
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/{Card-D4cn0k04.js → Card-B7QHTOm5.js} +2 -2
- package/dist/{Card-D4cn0k04.js.map → Card-B7QHTOm5.js.map} +1 -1
- package/dist/{Card-BlET8wE6.cjs → Card-BCm-99bg.cjs} +2 -2
- package/dist/{Card-BlET8wE6.cjs.map → Card-BCm-99bg.cjs.map} +1 -1
- package/dist/{Card-BnVoc-u7.cjs → Card-BJPVJHv-.cjs} +2 -2
- package/dist/{Card-BnVoc-u7.cjs.map → Card-BJPVJHv-.cjs.map} +1 -1
- package/dist/{Card-D-JLW3MJ.js → Card-C0jnPxly.js} +2 -2
- package/dist/{Card-D-JLW3MJ.js.map → Card-C0jnPxly.js.map} +1 -1
- package/dist/{Card-BDWTAZYS.js → Card-CokwQF6h.js} +3 -3
- package/dist/{Card-BDWTAZYS.js.map → Card-CokwQF6h.js.map} +1 -1
- package/dist/{Card-Dh2EXYNT.cjs → Card-cL9lwWhR.cjs} +2 -2
- package/dist/{Card-Dh2EXYNT.cjs.map → Card-cL9lwWhR.cjs.map} +1 -1
- package/dist/{LockedThumbnail-BYdGEl_B.cjs → LockedThumbnail-B8RE_L4Z.cjs} +2 -2
- package/dist/{LockedThumbnail-BYdGEl_B.cjs.map → LockedThumbnail-B8RE_L4Z.cjs.map} +1 -1
- package/dist/{LockedThumbnail-ZEMzCDoV.js → LockedThumbnail-Pum0IO0v.js} +2 -2
- package/dist/{LockedThumbnail-ZEMzCDoV.js.map → LockedThumbnail-Pum0IO0v.js.map} +1 -1
- package/dist/{index-DmimisTH.js → index-BYerDRXA.js} +287 -286
- package/dist/index-BYerDRXA.js.map +1 -0
- package/dist/{index-TLVquOE0.cjs → index-CR0b7198.cjs} +2 -2
- package/dist/index-CR0b7198.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/ChannelList/index.test.tsx +17 -1
- package/src/components/ChannelList/index.tsx +5 -1
- package/dist/index-DmimisTH.js.map +0 -1
- package/dist/index-TLVquOE0.cjs.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
|
|
2
2
|
import $, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as H, useEffect as Y, useId as En, useMemo as ee, Suspense as He } from "react";
|
|
3
3
|
import { StreamChatService as Sn } from "@linktr.ee/messaging-core";
|
|
4
|
-
import { Chat as In, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs } from "stream-chat-react";
|
|
5
|
-
import { StarIcon as Fe, DotsThreeIcon as
|
|
4
|
+
import { Chat as In, DateSeparator as Tn, useChannelStateContext as ce, useChatContext as Ye, areMessageUIPropsEqual as An, useMessageReminder as Mn, useComponentContext as Ut, Attachment as Rn, EditMessageModal as Ln, MessageBlocked as Dn, MessageBouncePrompt as Pn, MessageDeleted as On, MessageIsThreadReplyInChannelButtonIndicator as zn, MessageRepliesCountButton as $n, ReminderNotification as Fn, StreamedMessageText as Bn, messageHasAttachments as Un, messageHasReactions as jn, isDateSeparatorMessage as Vn, isMessageBlocked as Gn, isMessageBounced as Hn, MessageBounceModal as Yn, MessageText as Tt, Poll as qn, MessageErrorIcon as Wn, useMessageContext as pe, useMessageComposer as Xn, useStateStore as Kn, MessageInput as Jn, useMessageInputContext as Zn, useMessageComposerHasSendableData as Qn, AttachmentPreviewList as es, QuotedMessagePreview as ts, TextareaComposer as ns, MessageTimestamp as Le, AIStates as De, useTypingContext as ss, useAIState as as, Channel as rs, WithComponents as is, Window as os, MessageList as ls, ChannelList as cs, InfiniteScroll as ds } from "stream-chat-react";
|
|
5
|
+
import { StarIcon as Fe, DotsThreeIcon as us, SpinnerGapIcon as Ce, SignOutIcon as ms, ProhibitInsetIcon as At, FlagIcon as jt, FileIcon as Vt, ImageIcon as hs, SpeakerHighIcon as fs, VideoCameraIcon as Gt, FileMdIcon as gs, FileTextIcon as bs, FileZipIcon as ps, FilePptIcon as vs, FileCsvIcon as xs, FileXlsIcon as ws, FileDocIcon as _s, FilePdfIcon as Ns, CircleNotchIcon as ge, PlayIcon as Be, PauseIcon as ys, LinkIcon as Cs, DownloadSimpleIcon as be, GiftIcon as ks, ThumbsUpIcon as Es, ThumbsDownIcon as Ss, TrashSimpleIcon as Is, XIcon as Ae, ArrowUpIcon as Ts, SparkleIcon as Ue, ProhibitIcon as As, ArrowLeftIcon as Mt, PencilSimpleIcon as Ms, CaretLeftIcon as Rs, CaretRightIcon as Ls } from "@phosphor-icons/react";
|
|
6
6
|
import y from "classnames";
|
|
7
|
-
import { MessageActions as
|
|
7
|
+
import { MessageActions as Ds, DefaultDropdownActionButton as Ht } from "stream-chat-react/experimental";
|
|
8
8
|
import { LinkPreviewsManager as Rt } from "stream-chat";
|
|
9
9
|
const Yt = Ge({
|
|
10
10
|
service: null,
|
|
@@ -16,7 +16,7 @@ const Yt = Ge({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), qe = () => Te(Yt),
|
|
19
|
+
}), qe = () => Te(Yt), _i = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -217,7 +217,7 @@ const Yt = Ge({
|
|
|
217
217
|
children: e
|
|
218
218
|
}
|
|
219
219
|
) : e });
|
|
220
|
-
},
|
|
220
|
+
}, Ps = () => qe(), qt = (e) => {
|
|
221
221
|
var a, r;
|
|
222
222
|
const [t, s] = P(
|
|
223
223
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -239,13 +239,13 @@ const Yt = Ge({
|
|
|
239
239
|
e.off("member.updated", i);
|
|
240
240
|
};
|
|
241
241
|
}, [e]), t;
|
|
242
|
-
},
|
|
243
|
-
function
|
|
244
|
-
return
|
|
242
|
+
}, Os = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
243
|
+
function zs(e) {
|
|
244
|
+
return Os.test(e.trim());
|
|
245
245
|
}
|
|
246
246
|
function Lt(e, t) {
|
|
247
247
|
const s = e == null ? void 0 : e.trim();
|
|
248
|
-
return !s || t && s === t ? !1 : !
|
|
248
|
+
return !s || t && s === t ? !1 : !zs(s);
|
|
249
249
|
}
|
|
250
250
|
function Wt(e) {
|
|
251
251
|
return Lt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Lt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
@@ -278,7 +278,7 @@ const Dt = [
|
|
|
278
278
|
"🍈"
|
|
279
279
|
// Melon
|
|
280
280
|
];
|
|
281
|
-
function
|
|
281
|
+
function $s(e) {
|
|
282
282
|
let t = 0;
|
|
283
283
|
for (let s = 0; s < e.length; s++) {
|
|
284
284
|
const a = e.charCodeAt(s);
|
|
@@ -286,8 +286,8 @@ function zs(e) {
|
|
|
286
286
|
}
|
|
287
287
|
return Math.abs(t);
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
const s =
|
|
289
|
+
function Fs(e) {
|
|
290
|
+
const s = $s(e) % Dt.length;
|
|
291
291
|
return Dt[s];
|
|
292
292
|
}
|
|
293
293
|
const ae = ({
|
|
@@ -299,7 +299,7 @@ const ae = ({
|
|
|
299
299
|
shape: i = "squircle",
|
|
300
300
|
dmAgentEnabled: o = !1
|
|
301
301
|
}) => {
|
|
302
|
-
const l =
|
|
302
|
+
const l = Fs(e), m = s < 32 ? "text-xs" : s < 56 ? "text-sm" : s < 120 ? "text-lg" : "text-4xl", b = s >= 40 ? 2 : 1, u = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, f = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: u, children: t ? /* @__PURE__ */ n(
|
|
303
303
|
"img",
|
|
304
304
|
{
|
|
305
305
|
src: t,
|
|
@@ -361,7 +361,7 @@ const ae = ({
|
|
|
361
361
|
]
|
|
362
362
|
}
|
|
363
363
|
);
|
|
364
|
-
},
|
|
364
|
+
}, Bs = "https://linktr.ee/s/about/trust-center/report", Us = ({
|
|
365
365
|
channel: e,
|
|
366
366
|
participant: t,
|
|
367
367
|
showBlockParticipant: s = !0,
|
|
@@ -445,7 +445,7 @@ const ae = ({
|
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
handleReportUser: () => {
|
|
448
|
-
d == null || d(), m == null || m(), window.open(
|
|
448
|
+
d == null || d(), m == null || m(), window.open(Bs, "_blank", "noopener,noreferrer");
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
}, he = ({
|
|
@@ -488,7 +488,7 @@ const ae = ({
|
|
|
488
488
|
handleBlockUser: D,
|
|
489
489
|
handleUnblockUser: k,
|
|
490
490
|
handleReportUser: T
|
|
491
|
-
} =
|
|
491
|
+
} = Us({
|
|
492
492
|
channel: e,
|
|
493
493
|
participant: t,
|
|
494
494
|
showBlockParticipant: a,
|
|
@@ -522,7 +522,7 @@ const ae = ({
|
|
|
522
522
|
"aria-controls": f ? p : void 0,
|
|
523
523
|
onClick: () => c((I) => !I),
|
|
524
524
|
children: [
|
|
525
|
-
/* @__PURE__ */ n(
|
|
525
|
+
/* @__PURE__ */ n(us, { className: "size-5 text-black/90" }),
|
|
526
526
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
527
527
|
]
|
|
528
528
|
}
|
|
@@ -544,7 +544,7 @@ const ae = ({
|
|
|
544
544
|
disabled: S,
|
|
545
545
|
"aria-busy": S,
|
|
546
546
|
children: [
|
|
547
|
-
S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
547
|
+
S ? /* @__PURE__ */ n(Ce, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(ms, { className: "h-5 w-5" }),
|
|
548
548
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
549
549
|
]
|
|
550
550
|
}
|
|
@@ -588,13 +588,13 @@ const ae = ({
|
|
|
588
588
|
}
|
|
589
589
|
)
|
|
590
590
|
] });
|
|
591
|
-
},
|
|
592
|
-
function
|
|
591
|
+
}, js = (e) => /* @__PURE__ */ n(Tn, { ...e, position: "center" }), je = "vote_up", Ve = "vote_down";
|
|
592
|
+
function Vs(e) {
|
|
593
593
|
return e != null && e.length ? e.some((t) => t.type === Ve) ? "down" : e.some((t) => t.type === je) ? "up" : null : null;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Gs(e) {
|
|
596
596
|
const { channel: t } = ce(), { client: s } = Ye("useMessageVote"), a = ee(
|
|
597
|
-
() =>
|
|
597
|
+
() => Vs(e.own_reactions),
|
|
598
598
|
[e.own_reactions]
|
|
599
599
|
), r = W(async () => {
|
|
600
600
|
if (s != null && s.userID)
|
|
@@ -619,7 +619,7 @@ function Vs(e) {
|
|
|
619
619
|
}, [t, s == null ? void 0 : s.userID, e.id, a]);
|
|
620
620
|
return { selected: a, voteUp: r, voteDown: i };
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function Hs(e) {
|
|
623
623
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
624
624
|
}
|
|
625
625
|
function Xt({
|
|
@@ -627,16 +627,16 @@ function Xt({
|
|
|
627
627
|
viewerLanguage: t
|
|
628
628
|
}) {
|
|
629
629
|
var r;
|
|
630
|
-
const s = e == null ? void 0 : e.text, a =
|
|
630
|
+
const s = e == null ? void 0 : e.text, a = Hs(t);
|
|
631
631
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
632
632
|
}
|
|
633
|
-
const
|
|
633
|
+
const Ys = $.lazy(() => import("./Card-C0jnPxly.js")), qs = $.lazy(() => import("./Card-B7QHTOm5.js")), Ws = $.lazy(() => import("./Card-CokwQF6h.js")), We = () => /* @__PURE__ */ n(
|
|
634
634
|
"div",
|
|
635
635
|
{
|
|
636
636
|
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)]",
|
|
637
637
|
"aria-hidden": !0
|
|
638
638
|
}
|
|
639
|
-
),
|
|
639
|
+
), Xs = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ys, { ...e }) }), Kt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(qs, { ...e }) }), Jt = (e) => /* @__PURE__ */ n(He, { fallback: /* @__PURE__ */ n(We, {}), children: /* @__PURE__ */ n(Ws, { ...e }) }), Ks = Kt, Js = Jt, Ot = { Composer: Xs, Sent: Kt, Received: Jt, Creator: Ks, Visitor: Js }, Zs = [
|
|
640
640
|
[/pdf/, "pdf"],
|
|
641
641
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
642
642
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -650,38 +650,38 @@ function ne(e) {
|
|
|
650
650
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
651
651
|
}
|
|
652
652
|
function Zt(e) {
|
|
653
|
-
const t =
|
|
653
|
+
const t = Zs.find(
|
|
654
654
|
([s]) => s.test(e)
|
|
655
655
|
);
|
|
656
656
|
return t ? t[1] : "generic";
|
|
657
657
|
}
|
|
658
|
-
const
|
|
658
|
+
const Qs = {
|
|
659
659
|
video: Gt,
|
|
660
|
-
audio:
|
|
661
|
-
image:
|
|
660
|
+
audio: fs,
|
|
661
|
+
image: hs,
|
|
662
662
|
document: Vt
|
|
663
|
-
},
|
|
664
|
-
pdf:
|
|
665
|
-
doc:
|
|
666
|
-
xls:
|
|
667
|
-
csv:
|
|
668
|
-
ppt:
|
|
669
|
-
zip:
|
|
670
|
-
text:
|
|
671
|
-
markdown:
|
|
663
|
+
}, ea = {
|
|
664
|
+
pdf: Ns,
|
|
665
|
+
doc: _s,
|
|
666
|
+
xls: ws,
|
|
667
|
+
csv: xs,
|
|
668
|
+
ppt: vs,
|
|
669
|
+
zip: ps,
|
|
670
|
+
text: bs,
|
|
671
|
+
markdown: gs,
|
|
672
672
|
generic: Vt
|
|
673
673
|
};
|
|
674
|
-
function
|
|
674
|
+
function ta(e) {
|
|
675
675
|
const t = ne(e);
|
|
676
|
-
return t !== "document" ?
|
|
676
|
+
return t !== "document" ? Qs[t] : ea[Zt(e)];
|
|
677
677
|
}
|
|
678
678
|
function le(e, t) {
|
|
679
|
-
return $.createElement(
|
|
679
|
+
return $.createElement(ta(e), t);
|
|
680
680
|
}
|
|
681
|
-
const
|
|
681
|
+
const na = (e) => {
|
|
682
682
|
var t, s;
|
|
683
683
|
return "touches" in e ? ((t = e.touches[0]) == null ? void 0 : t.clientX) ?? ((s = e.changedTouches[0]) == null ? void 0 : s.clientX) ?? 0 : e.clientX;
|
|
684
|
-
},
|
|
684
|
+
}, sa = ({
|
|
685
685
|
source: e,
|
|
686
686
|
mimeType: t,
|
|
687
687
|
poster: s,
|
|
@@ -701,7 +701,7 @@ const ta = (e) => {
|
|
|
701
701
|
const j = C.getBoundingClientRect();
|
|
702
702
|
return Math.max(
|
|
703
703
|
0,
|
|
704
|
-
Math.min(1, (
|
|
704
|
+
Math.min(1, (na(w) - j.left) / j.width)
|
|
705
705
|
);
|
|
706
706
|
}, []), B = W((w) => {
|
|
707
707
|
const C = u.current;
|
|
@@ -879,7 +879,7 @@ const ta = (e) => {
|
|
|
879
879
|
},
|
|
880
880
|
className: "shrink-0 text-white",
|
|
881
881
|
"aria-label": p ? "Pause" : "Play",
|
|
882
|
-
children: p ? /* @__PURE__ */ n(
|
|
882
|
+
children: p ? /* @__PURE__ */ n(ys, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(Be, { className: "size-5 translate-x-px", weight: "fill" })
|
|
883
883
|
}
|
|
884
884
|
),
|
|
885
885
|
/* @__PURE__ */ h(
|
|
@@ -929,7 +929,7 @@ const ta = (e) => {
|
|
|
929
929
|
]
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
|
-
}, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20",
|
|
932
|
+
}, zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", aa = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", Qt = ({
|
|
933
933
|
mimeType: e,
|
|
934
934
|
sourceUrl: t,
|
|
935
935
|
thumbnailUrl: s,
|
|
@@ -940,7 +940,7 @@ const ta = (e) => {
|
|
|
940
940
|
}) => {
|
|
941
941
|
const l = ne(e), [d, m] = P(!1);
|
|
942
942
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
943
|
-
|
|
943
|
+
sa,
|
|
944
944
|
{
|
|
945
945
|
source: t,
|
|
946
946
|
mimeType: e,
|
|
@@ -991,7 +991,7 @@ const ta = (e) => {
|
|
|
991
991
|
weight: "regular"
|
|
992
992
|
})
|
|
993
993
|
}
|
|
994
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
994
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${aa(r)}`, children: /* @__PURE__ */ n(
|
|
995
995
|
"img",
|
|
996
996
|
{
|
|
997
997
|
src: s,
|
|
@@ -1081,19 +1081,19 @@ function tn(e) {
|
|
|
1081
1081
|
function Xe(e) {
|
|
1082
1082
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#121110]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function ra(e) {
|
|
1085
1085
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function ia(e) {
|
|
1088
1088
|
return e ? "text-white" : "text-black";
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function oa(e) {
|
|
1091
1091
|
return e ? "text-white/55" : "text-black/55";
|
|
1092
1092
|
}
|
|
1093
|
-
function
|
|
1093
|
+
function la(e) {
|
|
1094
1094
|
return e ? "text-white/40" : "text-black/40";
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1096
|
+
function ca(e) {
|
|
1097
1097
|
return e ? "text-white/20" : "text-black/20";
|
|
1098
1098
|
}
|
|
1099
1099
|
const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
@@ -1108,14 +1108,14 @@ const Ke = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1108
1108
|
) : /* @__PURE__ */ n(
|
|
1109
1109
|
"div",
|
|
1110
1110
|
{
|
|
1111
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1112
|
-
children: /* @__PURE__ */ n(
|
|
1111
|
+
className: `aspect-video w-full rounded-[20px] ${ra(t)} flex items-center justify-center`,
|
|
1112
|
+
children: /* @__PURE__ */ n(Cs, { className: `size-12 ${ca(t)}` })
|
|
1113
1113
|
}
|
|
1114
1114
|
) }),
|
|
1115
1115
|
/* @__PURE__ */ h("div", { className: "px-3 pb-3", children: [
|
|
1116
|
-
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${
|
|
1117
|
-
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${
|
|
1118
|
-
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1116
|
+
s && /* @__PURE__ */ n("p", { className: `truncate text-[14px] font-medium leading-5 ${ia(t)}`, children: s }),
|
|
1117
|
+
a && /* @__PURE__ */ n("p", { className: `truncate text-[12px] leading-4 ${oa(t)}`, children: a }),
|
|
1118
|
+
d && /* @__PURE__ */ n("p", { className: `mt-1 truncate text-[12px] leading-4 ${la(t)}`, children: d })
|
|
1119
1119
|
] })
|
|
1120
1120
|
] });
|
|
1121
1121
|
return d ? /* @__PURE__ */ n("a", { href: d, target: "_blank", rel: "noopener noreferrer", className: "block no-underline", children: m }) : /* @__PURE__ */ n("div", { className: "block", children: m });
|
|
@@ -1127,7 +1127,7 @@ function Je(e) {
|
|
|
1127
1127
|
var t;
|
|
1128
1128
|
return (t = e.attachments) == null ? void 0 : t.find(nn);
|
|
1129
1129
|
}
|
|
1130
|
-
async function
|
|
1130
|
+
async function da(e, t) {
|
|
1131
1131
|
let s;
|
|
1132
1132
|
try {
|
|
1133
1133
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1139,7 +1139,7 @@ async function ca(e, t) {
|
|
|
1139
1139
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1140
1140
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1141
1141
|
}
|
|
1142
|
-
const
|
|
1142
|
+
const ua = ({
|
|
1143
1143
|
url: e,
|
|
1144
1144
|
filename: t
|
|
1145
1145
|
}) => {
|
|
@@ -1151,7 +1151,7 @@ const da = ({
|
|
|
1151
1151
|
onClick: (i) => {
|
|
1152
1152
|
i.stopPropagation();
|
|
1153
1153
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1154
|
-
a(!0),
|
|
1154
|
+
a(!0), da(e, t).then(() => {
|
|
1155
1155
|
o == null || o.close();
|
|
1156
1156
|
}).catch(() => {
|
|
1157
1157
|
o && (o.location.href = e);
|
|
@@ -1241,10 +1241,10 @@ const sn = ({
|
|
|
1241
1241
|
containedImage: i === "image" || i === "document"
|
|
1242
1242
|
}
|
|
1243
1243
|
),
|
|
1244
|
-
action: /* @__PURE__ */ n(
|
|
1244
|
+
action: /* @__PURE__ */ n(ua, { url: e, filename: s })
|
|
1245
1245
|
}
|
|
1246
1246
|
);
|
|
1247
|
-
},
|
|
1247
|
+
}, ma = ({
|
|
1248
1248
|
message: e,
|
|
1249
1249
|
isMyMessage: t = !1
|
|
1250
1250
|
}) => {
|
|
@@ -1275,7 +1275,7 @@ const sn = ({
|
|
|
1275
1275
|
}
|
|
1276
1276
|
)
|
|
1277
1277
|
] });
|
|
1278
|
-
},
|
|
1278
|
+
}, ha = ({
|
|
1279
1279
|
message: e
|
|
1280
1280
|
}) => {
|
|
1281
1281
|
const t = Je(e);
|
|
@@ -1283,7 +1283,7 @@ const sn = ({
|
|
|
1283
1283
|
return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
|
|
1284
1284
|
const s = Ze(e);
|
|
1285
1285
|
return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
|
|
1286
|
-
},
|
|
1286
|
+
}, fa = ({
|
|
1287
1287
|
message: e
|
|
1288
1288
|
}) => {
|
|
1289
1289
|
const t = Je(e);
|
|
@@ -1291,18 +1291,18 @@ const sn = ({
|
|
|
1291
1291
|
return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
|
|
1292
1292
|
const s = Ze(e);
|
|
1293
1293
|
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1294
|
-
},
|
|
1295
|
-
Creator:
|
|
1296
|
-
Visitor:
|
|
1297
|
-
}),
|
|
1294
|
+
}, Ni = Object.assign(ma, {
|
|
1295
|
+
Creator: ha,
|
|
1296
|
+
Visitor: fa
|
|
1297
|
+
}), ga = {
|
|
1298
1298
|
isUnlocking: () => !1
|
|
1299
|
-
},
|
|
1300
|
-
LockedAttachment:
|
|
1301
|
-
}, rn = Ge({}),
|
|
1302
|
-
function
|
|
1303
|
-
return Te(rn)[e] ??
|
|
1299
|
+
}, ba = {
|
|
1300
|
+
LockedAttachment: ga
|
|
1301
|
+
}, rn = Ge({}), yi = rn.Provider;
|
|
1302
|
+
function pa(e) {
|
|
1303
|
+
return Te(rn)[e] ?? ba[e];
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1305
|
+
const va = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1306
1306
|
"svg",
|
|
1307
1307
|
{
|
|
1308
1308
|
width: e,
|
|
@@ -1319,19 +1319,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1319
1319
|
}
|
|
1320
1320
|
)
|
|
1321
1321
|
}
|
|
1322
|
-
),
|
|
1322
|
+
), xa = (e) => {
|
|
1323
1323
|
var t;
|
|
1324
1324
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_TIP";
|
|
1325
|
-
},
|
|
1325
|
+
}, wa = (e) => {
|
|
1326
1326
|
var t;
|
|
1327
1327
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_PAID";
|
|
1328
1328
|
}, ke = (e) => {
|
|
1329
1329
|
var t;
|
|
1330
1330
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_CHATBOT";
|
|
1331
|
-
},
|
|
1331
|
+
}, _a = (e) => {
|
|
1332
1332
|
var t;
|
|
1333
1333
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
|
|
1334
|
-
}, on = (e) =>
|
|
1334
|
+
}, on = (e) => xa(e) || wa(e), Na = (e) => {
|
|
1335
1335
|
var t;
|
|
1336
1336
|
return on(e) && !((t = e.text) != null && t.trim());
|
|
1337
1337
|
}, Pe = ({
|
|
@@ -1349,7 +1349,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1349
1349
|
if (!f) return null;
|
|
1350
1350
|
const c = t ? "message-tip-standalone" : "message-tag message-tag--tip", g = t ? `${f} tip` : `Delivered with ${f} tip`;
|
|
1351
1351
|
return /* @__PURE__ */ h("div", { className: c, children: [
|
|
1352
|
-
/* @__PURE__ */ n(
|
|
1352
|
+
/* @__PURE__ */ n(ks, { size: t ? 14 : 12 }),
|
|
1353
1353
|
/* @__PURE__ */ n("span", { children: g })
|
|
1354
1354
|
] });
|
|
1355
1355
|
}
|
|
@@ -1357,7 +1357,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1357
1357
|
"message-chatbot-indicator",
|
|
1358
1358
|
s ? "message-chatbot-indicator--sender" : "message-chatbot-indicator--receiver",
|
|
1359
1359
|
o ? "message-chatbot-indicator--attachment" : "message-chatbot-indicator--text"
|
|
1360
|
-
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(
|
|
1360
|
+
].join(" "), m = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__label", children: l }), b = /* @__PURE__ */ n("span", { className: "message-chatbot-indicator__icon", children: /* @__PURE__ */ n(va, { size: o ? 12 : 15 }) });
|
|
1361
1361
|
return /* @__PURE__ */ n("div", { className: d, "data-testid": "message-chatbot-indicator", children: s && !o ? /* @__PURE__ */ h(te, { children: [
|
|
1362
1362
|
m,
|
|
1363
1363
|
b
|
|
@@ -1365,7 +1365,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1365
1365
|
b,
|
|
1366
1366
|
m
|
|
1367
1367
|
] }) });
|
|
1368
|
-
},
|
|
1368
|
+
}, ya = ({
|
|
1369
1369
|
selected: e,
|
|
1370
1370
|
onVoteUp: t,
|
|
1371
1371
|
onVoteDown: s
|
|
@@ -1381,7 +1381,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1381
1381
|
"aria-label": "Good response",
|
|
1382
1382
|
"aria-pressed": e === "up",
|
|
1383
1383
|
"data-tooltip": "Good response",
|
|
1384
|
-
children: /* @__PURE__ */ n(
|
|
1384
|
+
children: /* @__PURE__ */ n(Es, { size: 16, weight: e === "up" ? "fill" : "regular" })
|
|
1385
1385
|
}
|
|
1386
1386
|
),
|
|
1387
1387
|
/* @__PURE__ */ n(
|
|
@@ -1395,10 +1395,10 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1395
1395
|
"aria-label": "Bad response",
|
|
1396
1396
|
"aria-pressed": e === "down",
|
|
1397
1397
|
"data-tooltip": "Bad response",
|
|
1398
|
-
children: /* @__PURE__ */ n(
|
|
1398
|
+
children: /* @__PURE__ */ n(Ss, { size: 16, weight: e === "down" ? "fill" : "regular" })
|
|
1399
1399
|
}
|
|
1400
1400
|
)
|
|
1401
|
-
] }),
|
|
1401
|
+
] }), Ca = (e) => {
|
|
1402
1402
|
var ht, ft, gt, bt, pt, vt, xt, wt, _t, Nt, yt, Ct, kt, Et;
|
|
1403
1403
|
const {
|
|
1404
1404
|
additionalMessageInputProps: t,
|
|
@@ -1417,7 +1417,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1417
1417
|
renderText: g,
|
|
1418
1418
|
threadList: p,
|
|
1419
1419
|
viewerLanguage: v
|
|
1420
|
-
} = e, { client: _ } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: S, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } =
|
|
1420
|
+
} = e, { client: _ } = Ye("CustomMessage"), { channel: x } = ce("CustomMessage"), { isUnlocking: S, onUnlockClick: E, onFetchSource: M, onDownloadClick: D } = pa("LockedAttachment"), [k, T] = P(!1), N = Mn(c.id), { selected: I, voteUp: R, voteDown: F } = Gs(c), {
|
|
1421
1421
|
Attachment: A = Rn,
|
|
1422
1422
|
EditMessageModal: L = Ln,
|
|
1423
1423
|
MessageActions: z,
|
|
@@ -1467,7 +1467,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1467
1467
|
"str-chat__virtual-message__wrapper--first": i,
|
|
1468
1468
|
"str-chat__virtual-message__wrapper--group": o
|
|
1469
1469
|
}
|
|
1470
|
-
), ct = c.poll_id && _.polls.fromState(c.poll_id), dt =
|
|
1470
|
+
), ct = c.poll_id && _.polls.fromState(c.poll_id), dt = Na(c), ue = ke(c), ut = _a(c), Re = !!(K != null && K.length && !c.quoted_message), mt = ue && de && Re;
|
|
1471
1471
|
return /* @__PURE__ */ h(te, { children: [
|
|
1472
1472
|
a && /* @__PURE__ */ n(
|
|
1473
1473
|
L,
|
|
@@ -1608,7 +1608,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1608
1608
|
}
|
|
1609
1609
|
),
|
|
1610
1610
|
s && ue && /* @__PURE__ */ n(
|
|
1611
|
-
|
|
1611
|
+
ya,
|
|
1612
1612
|
{
|
|
1613
1613
|
selected: I,
|
|
1614
1614
|
onVoteUp: R,
|
|
@@ -1629,13 +1629,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1629
1629
|
c.id
|
|
1630
1630
|
)
|
|
1631
1631
|
] });
|
|
1632
|
-
},
|
|
1633
|
-
|
|
1632
|
+
}, ka = $.memo(
|
|
1633
|
+
Ca,
|
|
1634
1634
|
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
|
|
1635
|
-
),
|
|
1635
|
+
), Ea = (e) => {
|
|
1636
1636
|
const t = pe("CustomMessage");
|
|
1637
|
-
return /* @__PURE__ */ n(
|
|
1638
|
-
},
|
|
1637
|
+
return /* @__PURE__ */ n(ka, { ...t, ...e });
|
|
1638
|
+
}, Sa = () => {
|
|
1639
1639
|
var s;
|
|
1640
1640
|
const { handleDelete: e, message: t } = pe("CustomMessageActions");
|
|
1641
1641
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
@@ -1645,10 +1645,10 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1645
1645
|
"aria-label": "Delete",
|
|
1646
1646
|
title: "Delete",
|
|
1647
1647
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1648
|
-
children: /* @__PURE__ */ n(
|
|
1648
|
+
children: /* @__PURE__ */ n(Is, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1649
1649
|
}
|
|
1650
1650
|
);
|
|
1651
|
-
},
|
|
1651
|
+
}, Ia = () => {
|
|
1652
1652
|
const { handleFlag: e } = pe("CustomMessageActions");
|
|
1653
1653
|
return /* @__PURE__ */ n(
|
|
1654
1654
|
Ht,
|
|
@@ -1660,19 +1660,19 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1660
1660
|
children: /* @__PURE__ */ n(jt, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
1661
1661
|
}
|
|
1662
1662
|
);
|
|
1663
|
-
},
|
|
1663
|
+
}, Ta = () => {
|
|
1664
1664
|
var t;
|
|
1665
1665
|
const { message: e } = pe("CustomMessageActions");
|
|
1666
1666
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== "MESSAGE_ATTACHMENT" ? null : /* @__PURE__ */ n(
|
|
1667
|
-
|
|
1667
|
+
Ds,
|
|
1668
1668
|
{
|
|
1669
1669
|
messageActionSet: [
|
|
1670
|
-
{ Component:
|
|
1671
|
-
{ Component:
|
|
1670
|
+
{ Component: Sa, placement: "quick", type: "delete" },
|
|
1671
|
+
{ Component: Ia, placement: "quick", type: "flag" }
|
|
1672
1672
|
]
|
|
1673
1673
|
}
|
|
1674
1674
|
);
|
|
1675
|
-
},
|
|
1675
|
+
}, Aa = ({
|
|
1676
1676
|
link: e,
|
|
1677
1677
|
onDismiss: t
|
|
1678
1678
|
}) => {
|
|
@@ -1712,26 +1712,26 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1712
1712
|
]
|
|
1713
1713
|
}
|
|
1714
1714
|
);
|
|
1715
|
-
},
|
|
1715
|
+
}, Ma = (e) => ({
|
|
1716
1716
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
1717
1717
|
(t) => Rt.previewIsLoaded(t) || Rt.previewIsLoading(t)
|
|
1718
1718
|
)
|
|
1719
|
-
}),
|
|
1719
|
+
}), Ra = () => {
|
|
1720
1720
|
const { linkPreviewsManager: e } = Xn(), { linkPreviews: t } = Kn(
|
|
1721
1721
|
e.state,
|
|
1722
|
-
|
|
1722
|
+
Ma
|
|
1723
1723
|
), s = (r) => {
|
|
1724
1724
|
e.dismissPreview(r);
|
|
1725
1725
|
};
|
|
1726
1726
|
return t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center w-full gap-2 mb-4", children: t.map((r) => /* @__PURE__ */ n(
|
|
1727
|
-
|
|
1727
|
+
Aa,
|
|
1728
1728
|
{
|
|
1729
1729
|
link: r,
|
|
1730
1730
|
onDismiss: s
|
|
1731
1731
|
},
|
|
1732
1732
|
r.og_scrape_url
|
|
1733
1733
|
)) }) : null;
|
|
1734
|
-
}, ln = $.createContext(!1),
|
|
1734
|
+
}, ln = $.createContext(!1), La = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1735
1735
|
"button",
|
|
1736
1736
|
{
|
|
1737
1737
|
...s,
|
|
@@ -1739,16 +1739,16 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1739
1739
|
"aria-label": "Send",
|
|
1740
1740
|
disabled: t,
|
|
1741
1741
|
onClick: e,
|
|
1742
|
-
children: /* @__PURE__ */ n(
|
|
1742
|
+
children: /* @__PURE__ */ n(Ts, { weight: "bold", className: "size-4" })
|
|
1743
1743
|
}
|
|
1744
|
-
),
|
|
1744
|
+
), Da = () => {
|
|
1745
1745
|
const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
|
|
1746
|
-
SendButton: r =
|
|
1746
|
+
SendButton: r = La,
|
|
1747
1747
|
AttachmentPreviewList: i = es
|
|
1748
1748
|
} = Ut("CustomMessageInput");
|
|
1749
1749
|
return /* @__PURE__ */ h("div", { className: "central-container flex flex-col gap-2 min-w-0 w-full p-2 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)]", children: [
|
|
1750
1750
|
/* @__PURE__ */ n(ts, {}),
|
|
1751
|
-
/* @__PURE__ */ n(
|
|
1751
|
+
/* @__PURE__ */ n(Ra, {}),
|
|
1752
1752
|
/* @__PURE__ */ n(i, {}),
|
|
1753
1753
|
/* @__PURE__ */ h("div", { className: "flex", children: [
|
|
1754
1754
|
/* @__PURE__ */ n("div", { className: "w-full ml-2 mr-4 self-center leading-[0]", children: /* @__PURE__ */ n(
|
|
@@ -1775,7 +1775,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1775
1775
|
)
|
|
1776
1776
|
] })
|
|
1777
1777
|
] });
|
|
1778
|
-
},
|
|
1778
|
+
}, Pa = ({
|
|
1779
1779
|
renderActions: e,
|
|
1780
1780
|
renderFooter: t,
|
|
1781
1781
|
disabled: s = !1,
|
|
@@ -1795,23 +1795,23 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1795
1795
|
className: "message-input flex items-end gap-4 aria-disabled:opacity-40",
|
|
1796
1796
|
children: [
|
|
1797
1797
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
1798
|
-
/* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input:
|
|
1798
|
+
/* @__PURE__ */ n(ln.Provider, { value: i, children: /* @__PURE__ */ n(Jn, { Input: Da }) })
|
|
1799
1799
|
]
|
|
1800
1800
|
}
|
|
1801
1801
|
),
|
|
1802
1802
|
t == null ? void 0 : t()
|
|
1803
1803
|
] });
|
|
1804
|
-
},
|
|
1804
|
+
}, Oa = [
|
|
1805
1805
|
"SYSTEM_DM_AGENT_PAUSED",
|
|
1806
1806
|
"SYSTEM_DM_AGENT_RESUMED"
|
|
1807
|
-
],
|
|
1807
|
+
], za = {
|
|
1808
1808
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
1809
1809
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
1810
|
-
},
|
|
1810
|
+
}, $a = [
|
|
1811
1811
|
"SYSTEM_AGE_SAFETY_BLOCKED"
|
|
1812
|
-
],
|
|
1812
|
+
], Fa = {
|
|
1813
1813
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
1814
|
-
}, Oe = "age safety guidelines.",
|
|
1814
|
+
}, Oe = "age safety guidelines.", Ba = "https://linktr.ee/s/about/contact", $t = (e) => Oa.includes(e), Ua = (e) => $a.includes(e), ja = (e) => {
|
|
1815
1815
|
var a;
|
|
1816
1816
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
1817
1817
|
if ($t(t))
|
|
@@ -1819,7 +1819,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1819
1819
|
kind: "dm-agent",
|
|
1820
1820
|
type: t
|
|
1821
1821
|
};
|
|
1822
|
-
if (
|
|
1822
|
+
if (Ua(t))
|
|
1823
1823
|
return {
|
|
1824
1824
|
kind: "age-safety",
|
|
1825
1825
|
type: t
|
|
@@ -1830,7 +1830,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1830
1830
|
kind: "dm-agent",
|
|
1831
1831
|
type: s
|
|
1832
1832
|
};
|
|
1833
|
-
},
|
|
1833
|
+
}, Va = (e) => {
|
|
1834
1834
|
const t = e.indexOf(Oe);
|
|
1835
1835
|
if (t === -1)
|
|
1836
1836
|
return e;
|
|
@@ -1840,7 +1840,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1840
1840
|
/* @__PURE__ */ n(
|
|
1841
1841
|
"a",
|
|
1842
1842
|
{
|
|
1843
|
-
href:
|
|
1843
|
+
href: Ba,
|
|
1844
1844
|
target: "_blank",
|
|
1845
1845
|
rel: "noopener noreferrer",
|
|
1846
1846
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
@@ -1849,13 +1849,13 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1849
1849
|
),
|
|
1850
1850
|
e.slice(s)
|
|
1851
1851
|
] });
|
|
1852
|
-
},
|
|
1852
|
+
}, Ga = (e) => {
|
|
1853
1853
|
var a, r;
|
|
1854
|
-
const t = e.message.hide_date === !0, s =
|
|
1854
|
+
const t = e.message.hide_date === !0, s = ja(
|
|
1855
1855
|
e.message
|
|
1856
1856
|
);
|
|
1857
1857
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
1858
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
1858
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || za[s.type];
|
|
1859
1859
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1860
1860
|
/* @__PURE__ */ h(
|
|
1861
1861
|
"div",
|
|
@@ -1881,7 +1881,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1881
1881
|
] });
|
|
1882
1882
|
}
|
|
1883
1883
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
1884
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
1884
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || Fa[s.type];
|
|
1885
1885
|
return /* @__PURE__ */ h("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
1886
1886
|
/* @__PURE__ */ h(
|
|
1887
1887
|
"div",
|
|
@@ -1891,7 +1891,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1891
1891
|
"data-age-safety-system-type": s.type,
|
|
1892
1892
|
children: [
|
|
1893
1893
|
/* @__PURE__ */ n(
|
|
1894
|
-
|
|
1894
|
+
As,
|
|
1895
1895
|
{
|
|
1896
1896
|
size: 24,
|
|
1897
1897
|
weight: "duotone",
|
|
@@ -1900,7 +1900,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1900
1900
|
"data-testid": "age-safety-system-message-icon"
|
|
1901
1901
|
}
|
|
1902
1902
|
),
|
|
1903
|
-
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children:
|
|
1903
|
+
/* @__PURE__ */ n("div", { className: "mes-age-safety-system-message__content min-w-0 flex-[1_0_0]", children: /* @__PURE__ */ n("p", { className: "m-0 text-balance text-left text-[12px] font-normal leading-4 tracking-[0.21px] text-[color:var(--text-warning-on-warning,#894b00)]", children: Va(i) }) })
|
|
1904
1904
|
]
|
|
1905
1905
|
}
|
|
1906
1906
|
),
|
|
@@ -1925,15 +1925,15 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1925
1925
|
begin: `${120 * t}ms`,
|
|
1926
1926
|
repeatCount: "indefinite"
|
|
1927
1927
|
}
|
|
1928
|
-
) }),
|
|
1928
|
+
) }), Ha = /* @__PURE__ */ new Set([
|
|
1929
1929
|
De.Thinking,
|
|
1930
1930
|
De.Generating,
|
|
1931
1931
|
De.ExternalSources
|
|
1932
|
-
]),
|
|
1932
|
+
]), Ya = ({ threadList: e }) => {
|
|
1933
1933
|
var g, p;
|
|
1934
1934
|
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } = ss(), { aiState: o } = as(t), l = Te(cn);
|
|
1935
|
-
if (!e && l &&
|
|
1936
|
-
const v =
|
|
1935
|
+
if (!e && l && Ha.has(o)) {
|
|
1936
|
+
const v = qa(t, (g = r.user) == null ? void 0 : g.id);
|
|
1937
1937
|
return /* @__PURE__ */ n(
|
|
1938
1938
|
Ft,
|
|
1939
1939
|
{
|
|
@@ -2013,7 +2013,7 @@ const pa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
2013
2013
|
] })
|
|
2014
2014
|
}
|
|
2015
2015
|
);
|
|
2016
|
-
function
|
|
2016
|
+
function qa(e, t) {
|
|
2017
2017
|
var a;
|
|
2018
2018
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
2019
2019
|
for (const r of Object.values(s)) {
|
|
@@ -2022,7 +2022,7 @@ function Ya(e, t) {
|
|
|
2022
2022
|
return i;
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
|
-
const
|
|
2025
|
+
const Wa = () => null, Xa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
2026
2026
|
"div",
|
|
2027
2027
|
{
|
|
2028
2028
|
className: y("flex items-center justify-center h-full", e),
|
|
@@ -2066,11 +2066,11 @@ const qa = () => null, Wa = ({ className: e, message: t }) => /* @__PURE__ */ h(
|
|
|
2066
2066
|
]
|
|
2067
2067
|
}
|
|
2068
2068
|
), Ee = $.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ h("div", { className: "flex items-center", children: [
|
|
2069
|
-
/* @__PURE__ */ n(
|
|
2069
|
+
/* @__PURE__ */ n(Xa, { className: "w-6 h-6" }),
|
|
2070
2070
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
2071
2071
|
] }) }));
|
|
2072
2072
|
Ee.displayName = "LoadingState";
|
|
2073
|
-
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant",
|
|
2073
|
+
const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-center transition-colors duration-150 focus-ring", Bt = "Replies instantly with AI assistant", Ka = ({
|
|
2074
2074
|
onBack: e,
|
|
2075
2075
|
showBackButton: t,
|
|
2076
2076
|
showStarButton: s = !1,
|
|
@@ -2253,7 +2253,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2253
2253
|
] })
|
|
2254
2254
|
] })
|
|
2255
2255
|
] });
|
|
2256
|
-
},
|
|
2256
|
+
}, Ja = ({
|
|
2257
2257
|
onBack: e,
|
|
2258
2258
|
showBackButton: t,
|
|
2259
2259
|
renderMessageInputActions: s,
|
|
@@ -2298,7 +2298,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2298
2298
|
}, [(V = k._client) == null ? void 0 : V.userID, (B = k.state) == null ? void 0 : B.members]), I = ((U = N == null ? void 0 : N.user) == null ? void 0 : U.is_account) ?? (N == null ? void 0 : N.is_account), R = ((X = T == null ? void 0 : T.user) == null ? void 0 : X.is_account) ?? (T == null ? void 0 : T.is_account), F = E && I === !1 && R === !0, A = W(
|
|
2299
2299
|
(G) => {
|
|
2300
2300
|
const { message: O } = pe("ChannelView"), w = /* @__PURE__ */ n(
|
|
2301
|
-
|
|
2301
|
+
Ea,
|
|
2302
2302
|
{
|
|
2303
2303
|
...G,
|
|
2304
2304
|
chatbotVotingEnabled: v,
|
|
@@ -2314,11 +2314,11 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2314
2314
|
{
|
|
2315
2315
|
overrides: {
|
|
2316
2316
|
Message: A,
|
|
2317
|
-
MessageActions:
|
|
2317
|
+
MessageActions: Ta
|
|
2318
2318
|
},
|
|
2319
2319
|
children: /* @__PURE__ */ h(os, { children: [
|
|
2320
2320
|
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(
|
|
2321
|
-
|
|
2321
|
+
Ka,
|
|
2322
2322
|
{
|
|
2323
2323
|
onBack: e,
|
|
2324
2324
|
showBackButton: t,
|
|
@@ -2347,7 +2347,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2347
2347
|
),
|
|
2348
2348
|
r ? /* @__PURE__ */ n($.Fragment, { children: r(k) }, "lt-channel-conversation-footer") : null,
|
|
2349
2349
|
/* @__PURE__ */ n(
|
|
2350
|
-
|
|
2350
|
+
Pa,
|
|
2351
2351
|
{
|
|
2352
2352
|
...s && {
|
|
2353
2353
|
renderActions: () => s == null ? void 0 : s(k)
|
|
@@ -2372,7 +2372,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2372
2372
|
onLeaveConversation: o,
|
|
2373
2373
|
onBlockParticipant: l,
|
|
2374
2374
|
className: d,
|
|
2375
|
-
CustomChannelEmptyState: m =
|
|
2375
|
+
CustomChannelEmptyState: m = Wa,
|
|
2376
2376
|
showDeleteConversation: b = !0,
|
|
2377
2377
|
onDeleteConversationClick: u,
|
|
2378
2378
|
onBlockParticipantClick: f,
|
|
@@ -2438,16 +2438,16 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2438
2438
|
rs,
|
|
2439
2439
|
{
|
|
2440
2440
|
channel: e,
|
|
2441
|
-
MessageSystem:
|
|
2441
|
+
MessageSystem: Ga,
|
|
2442
2442
|
EmptyStateIndicator: m,
|
|
2443
2443
|
LoadingIndicator: Ee,
|
|
2444
|
-
DateSeparator:
|
|
2445
|
-
TypingIndicator:
|
|
2444
|
+
DateSeparator: js,
|
|
2445
|
+
TypingIndicator: Ya,
|
|
2446
2446
|
doSendMessageRequest: z,
|
|
2447
2447
|
...R ? { SendButton: R } : {},
|
|
2448
2448
|
...F ? { AttachmentPreviewList: F } : {},
|
|
2449
2449
|
children: /* @__PURE__ */ n(
|
|
2450
|
-
|
|
2450
|
+
Ja,
|
|
2451
2451
|
{
|
|
2452
2452
|
onBack: t,
|
|
2453
2453
|
showBackButton: s,
|
|
@@ -2497,7 +2497,7 @@ const fe = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
2497
2497
|
)
|
|
2498
2498
|
] }) }));
|
|
2499
2499
|
fe.displayName = "ErrorState";
|
|
2500
|
-
const
|
|
2500
|
+
const Ci = ({
|
|
2501
2501
|
capabilities: e = {},
|
|
2502
2502
|
renderMessageInputActions: t,
|
|
2503
2503
|
renderConversationFooter: s,
|
|
@@ -2526,7 +2526,7 @@ const yi = ({
|
|
|
2526
2526
|
refreshConnection: k,
|
|
2527
2527
|
service: T,
|
|
2528
2528
|
debug: N
|
|
2529
|
-
} =
|
|
2529
|
+
} = Ps(), [I, R] = P(null), [F, A] = P(null), [L, z] = P(!1), { showDeleteConversation: V = !0 } = e, B = H(o);
|
|
2530
2530
|
B.current = o;
|
|
2531
2531
|
const U = H(a);
|
|
2532
2532
|
U.current = a;
|
|
@@ -2634,7 +2634,7 @@ const yi = ({
|
|
|
2634
2634
|
I.id
|
|
2635
2635
|
) }) }) : /* @__PURE__ */ n(Ee, {});
|
|
2636
2636
|
};
|
|
2637
|
-
function
|
|
2637
|
+
function Za(e) {
|
|
2638
2638
|
const t = e.state.pending_messages;
|
|
2639
2639
|
if (t != null && t.length)
|
|
2640
2640
|
for (const s of t)
|
|
@@ -2647,18 +2647,18 @@ const un = $.createContext({
|
|
|
2647
2647
|
debug: !1,
|
|
2648
2648
|
renderMessagePreview: void 0,
|
|
2649
2649
|
viewerLanguage: void 0
|
|
2650
|
-
}),
|
|
2650
|
+
}), Qa = un.Provider, er = () => $.useContext(un), tr = (e, t) => {
|
|
2651
2651
|
const s = new Date(
|
|
2652
2652
|
Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate())
|
|
2653
2653
|
), r = new Date(
|
|
2654
2654
|
Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate())
|
|
2655
2655
|
).getTime() - s.getTime();
|
|
2656
2656
|
return Math.floor(r / (1e3 * 60 * 60 * 24));
|
|
2657
|
-
},
|
|
2657
|
+
}, nr = (e) => {
|
|
2658
2658
|
const t = /* @__PURE__ */ new Date();
|
|
2659
2659
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
2660
2660
|
return "Just now";
|
|
2661
|
-
const a =
|
|
2661
|
+
const a = tr(e, t);
|
|
2662
2662
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
2663
2663
|
hour: "numeric",
|
|
2664
2664
|
minute: "2-digit",
|
|
@@ -2677,7 +2677,7 @@ const un = $.createContext({
|
|
|
2677
2677
|
debug: r,
|
|
2678
2678
|
renderMessagePreview: i,
|
|
2679
2679
|
viewerLanguage: o
|
|
2680
|
-
} =
|
|
2680
|
+
} = er(), l = (s == null ? void 0 : s.id) === (e == null ? void 0 : e.id), d = () => {
|
|
2681
2681
|
e && a(e);
|
|
2682
2682
|
}, m = (N) => {
|
|
2683
2683
|
const I = N.key === "Enter" || N.key === " ", R = N.repeat;
|
|
@@ -2706,7 +2706,7 @@ const un = $.createContext({
|
|
|
2706
2706
|
if (N) return N;
|
|
2707
2707
|
const A = (B = g == null ? void 0 : g.attachments) == null ? void 0 : B[0];
|
|
2708
2708
|
return A ? A.og_scrape_url ? A.og_scrape_url : A.type === "image" ? "📷 Sent an image" : A.type === "video" ? "🎥 Sent a video" : A.type === "audio" ? "🎵 Sent audio" : A.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
2709
|
-
})(), _ = g != null && g.created_at ?
|
|
2709
|
+
})(), _ = g != null && g.created_at ? nr(new Date(g.created_at)) : "", x = g ? ke(g) : !1, S = i ? i(g, v) : `${x ? "✨ " : ""}${v}`, E = qt(e), M = t ?? 0;
|
|
2710
2710
|
return r && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
2711
2711
|
channelId: e == null ? void 0 : e.id,
|
|
2712
2712
|
isSelected: l,
|
|
@@ -2765,14 +2765,14 @@ const un = $.createContext({
|
|
|
2765
2765
|
}
|
|
2766
2766
|
);
|
|
2767
2767
|
mn.displayName = "CustomChannelPreview";
|
|
2768
|
-
const
|
|
2768
|
+
const sr = { last_message_at: -1 }, ar = $.memo(
|
|
2769
2769
|
({
|
|
2770
2770
|
onChannelSelect: e,
|
|
2771
2771
|
selectedChannel: t,
|
|
2772
2772
|
filters: s,
|
|
2773
2773
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
2774
2774
|
channelRenderFilterFn: r,
|
|
2775
|
-
sort: i =
|
|
2775
|
+
sort: i = sr,
|
|
2776
2776
|
className: o,
|
|
2777
2777
|
customEmptyStateIndicator: l,
|
|
2778
2778
|
renderMessagePreview: d,
|
|
@@ -2783,7 +2783,7 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2783
2783
|
const { debug: u = !1 } = qe(), f = $.useCallback(
|
|
2784
2784
|
(g) => {
|
|
2785
2785
|
for (const p of g)
|
|
2786
|
-
|
|
2786
|
+
Za(p);
|
|
2787
2787
|
return r ? r(g) : g;
|
|
2788
2788
|
},
|
|
2789
2789
|
[r]
|
|
@@ -2816,7 +2816,7 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2816
2816
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
2817
2817
|
o
|
|
2818
2818
|
),
|
|
2819
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
2819
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Qa, { value: c, children: /* @__PURE__ */ n(
|
|
2820
2820
|
cs,
|
|
2821
2821
|
{
|
|
2822
2822
|
filters: s,
|
|
@@ -2824,6 +2824,7 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2824
2824
|
options: { limit: 30 },
|
|
2825
2825
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2826
2826
|
channelRenderFilterFn: f,
|
|
2827
|
+
Paginator: ds,
|
|
2827
2828
|
Preview: mn,
|
|
2828
2829
|
EmptyStateIndicator: l
|
|
2829
2830
|
},
|
|
@@ -2833,26 +2834,26 @@ const nr = { last_message_at: -1 }, sr = $.memo(
|
|
|
2833
2834
|
);
|
|
2834
2835
|
}
|
|
2835
2836
|
);
|
|
2836
|
-
|
|
2837
|
-
const
|
|
2837
|
+
ar.displayName = "ChannelList";
|
|
2838
|
+
const rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2838
2839
|
function Qe(e) {
|
|
2839
2840
|
if (typeof e != "string") return;
|
|
2840
2841
|
const t = e.trim();
|
|
2841
2842
|
if (t === "") return;
|
|
2842
|
-
const s =
|
|
2843
|
+
const s = rr.exec(t);
|
|
2843
2844
|
if (s) {
|
|
2844
2845
|
const a = s[1].toLowerCase();
|
|
2845
|
-
return
|
|
2846
|
+
return ir.has(a) ? t : void 0;
|
|
2846
2847
|
}
|
|
2847
2848
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2848
2849
|
}
|
|
2849
|
-
const
|
|
2850
|
+
const or = {
|
|
2850
2851
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2851
2852
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2852
|
-
},
|
|
2853
|
+
}, lr = ({ variant: e, cta: t }) => {
|
|
2853
2854
|
const s = y(
|
|
2854
2855
|
"mt-2 inline-flex h-10 w-full items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
2855
|
-
|
|
2856
|
+
or[e]
|
|
2856
2857
|
), a = Qe(t.href);
|
|
2857
2858
|
return a ? /* @__PURE__ */ n(
|
|
2858
2859
|
"a",
|
|
@@ -2879,10 +2880,10 @@ const ir = {
|
|
|
2879
2880
|
children: t.label
|
|
2880
2881
|
}
|
|
2881
2882
|
);
|
|
2882
|
-
},
|
|
2883
|
+
}, cr = {
|
|
2883
2884
|
dark: "text-white",
|
|
2884
2885
|
light: "text-black/90"
|
|
2885
|
-
},
|
|
2886
|
+
}, dr = "text-white/30", ur = {
|
|
2886
2887
|
dark: "text-white/55",
|
|
2887
2888
|
light: "text-black/55"
|
|
2888
2889
|
}, et = ({
|
|
@@ -2899,10 +2900,10 @@ const ir = {
|
|
|
2899
2900
|
if (!b && !u && !c && !g) return null;
|
|
2900
2901
|
const v = y(
|
|
2901
2902
|
"truncate text-base font-medium leading-6",
|
|
2902
|
-
d && !t ?
|
|
2903
|
+
d && !t ? dr : cr[e]
|
|
2903
2904
|
), _ = y(
|
|
2904
2905
|
"truncate text-xs leading-4",
|
|
2905
|
-
|
|
2906
|
+
ur[e]
|
|
2906
2907
|
);
|
|
2907
2908
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2908
2909
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2918,9 +2919,9 @@ const ir = {
|
|
|
2918
2919
|
] }),
|
|
2919
2920
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2920
2921
|
] }),
|
|
2921
|
-
o && /* @__PURE__ */ n(
|
|
2922
|
+
o && /* @__PURE__ */ n(lr, { variant: e, cta: o })
|
|
2922
2923
|
] });
|
|
2923
|
-
},
|
|
2924
|
+
}, mr = y(
|
|
2924
2925
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2925
2926
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2926
2927
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2939,7 +2940,7 @@ const ir = {
|
|
|
2939
2940
|
"data-testid": d
|
|
2940
2941
|
}) => {
|
|
2941
2942
|
const m = s != null || a != null, b = y(
|
|
2942
|
-
|
|
2943
|
+
mr,
|
|
2943
2944
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2944
2945
|
// `focus-ring` is a design-system utility from the component-library
|
|
2945
2946
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2987,10 +2988,10 @@ const ir = {
|
|
|
2987
2988
|
]
|
|
2988
2989
|
}
|
|
2989
2990
|
);
|
|
2990
|
-
},
|
|
2991
|
+
}, hr = {
|
|
2991
2992
|
dark: "bg-white/10",
|
|
2992
2993
|
light: "bg-black/5"
|
|
2993
|
-
},
|
|
2994
|
+
}, fr = {
|
|
2994
2995
|
dark: "size-16 text-white/25",
|
|
2995
2996
|
light: "size-16 text-black/25"
|
|
2996
2997
|
}, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
|
|
@@ -3048,10 +3049,10 @@ const ir = {
|
|
|
3048
3049
|
{
|
|
3049
3050
|
className: y(
|
|
3050
3051
|
"flex h-full w-full items-center justify-center",
|
|
3051
|
-
|
|
3052
|
+
hr[e]
|
|
3052
3053
|
),
|
|
3053
3054
|
children: le(r, {
|
|
3054
|
-
className:
|
|
3055
|
+
className: fr[e],
|
|
3055
3056
|
weight: "regular"
|
|
3056
3057
|
})
|
|
3057
3058
|
}
|
|
@@ -3061,7 +3062,7 @@ const ir = {
|
|
|
3061
3062
|
]
|
|
3062
3063
|
}
|
|
3063
3064
|
);
|
|
3064
|
-
},
|
|
3065
|
+
}, gr = ({
|
|
3065
3066
|
title: e,
|
|
3066
3067
|
placeholderTitle: t,
|
|
3067
3068
|
description: s,
|
|
@@ -3091,7 +3092,7 @@ const ir = {
|
|
|
3091
3092
|
onClick: u,
|
|
3092
3093
|
"aria-label": "Edit attachment",
|
|
3093
3094
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3094
|
-
children: /* @__PURE__ */ n(
|
|
3095
|
+
children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
|
|
3095
3096
|
}
|
|
3096
3097
|
) : void 0;
|
|
3097
3098
|
return c ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3138,7 +3139,7 @@ const ir = {
|
|
|
3138
3139
|
]
|
|
3139
3140
|
}
|
|
3140
3141
|
);
|
|
3141
|
-
},
|
|
3142
|
+
}, br = ({
|
|
3142
3143
|
title: e,
|
|
3143
3144
|
description: t,
|
|
3144
3145
|
url: s,
|
|
@@ -3191,7 +3192,7 @@ const ir = {
|
|
|
3191
3192
|
]
|
|
3192
3193
|
}
|
|
3193
3194
|
);
|
|
3194
|
-
},
|
|
3195
|
+
}, pr = ({
|
|
3195
3196
|
title: e,
|
|
3196
3197
|
placeholderTitle: t,
|
|
3197
3198
|
description: s,
|
|
@@ -3238,20 +3239,20 @@ const ir = {
|
|
|
3238
3239
|
]
|
|
3239
3240
|
}
|
|
3240
3241
|
);
|
|
3241
|
-
},
|
|
3242
|
-
Composer:
|
|
3243
|
-
Sent:
|
|
3244
|
-
Received:
|
|
3245
|
-
},
|
|
3242
|
+
}, ki = {
|
|
3243
|
+
Composer: gr,
|
|
3244
|
+
Sent: pr,
|
|
3245
|
+
Received: br
|
|
3246
|
+
}, vr = {
|
|
3246
3247
|
dark: "bg-[#121110]",
|
|
3247
3248
|
light: "bg-[#e9eaed]"
|
|
3248
|
-
},
|
|
3249
|
+
}, xr = {
|
|
3249
3250
|
dark: "text-white",
|
|
3250
3251
|
light: "text-[#080707]"
|
|
3251
|
-
},
|
|
3252
|
+
}, wr = {
|
|
3252
3253
|
dark: "border-white/[0.08]",
|
|
3253
3254
|
light: "border-black/[0.08]"
|
|
3254
|
-
},
|
|
3255
|
+
}, _r = (e) => e === "dark" ? "sender" : "receiver", Nr = {
|
|
3255
3256
|
sender: {
|
|
3256
3257
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3257
3258
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3273,7 +3274,7 @@ const ir = {
|
|
|
3273
3274
|
children: i,
|
|
3274
3275
|
"data-testid": o
|
|
3275
3276
|
}) => {
|
|
3276
|
-
const l = t != null && t !== "", d = _r
|
|
3277
|
+
const l = t != null && t !== "", d = Nr[_r(e)][a];
|
|
3277
3278
|
return /* @__PURE__ */ h(
|
|
3278
3279
|
"div",
|
|
3279
3280
|
{
|
|
@@ -3288,10 +3289,10 @@ const ir = {
|
|
|
3288
3289
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3289
3290
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3290
3291
|
d,
|
|
3291
|
-
pr[e],
|
|
3292
3292
|
vr[e],
|
|
3293
|
+
xr[e],
|
|
3293
3294
|
s && "border",
|
|
3294
|
-
s &&
|
|
3295
|
+
s && wr[e],
|
|
3295
3296
|
r
|
|
3296
3297
|
),
|
|
3297
3298
|
children: [
|
|
@@ -3334,16 +3335,16 @@ const ir = {
|
|
|
3334
3335
|
),
|
|
3335
3336
|
children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
|
|
3336
3337
|
}
|
|
3337
|
-
), we = (e) => e === "received" ? "light" : "dark",
|
|
3338
|
+
), we = (e) => e === "received" ? "light" : "dark", Ei = ({
|
|
3338
3339
|
firstOfGroup: e,
|
|
3339
3340
|
endOfGroup: t,
|
|
3340
3341
|
groupedByUser: s
|
|
3341
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3342
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", yr = ({
|
|
3342
3343
|
src: e,
|
|
3343
3344
|
mimeType: t,
|
|
3344
3345
|
filename: s,
|
|
3345
3346
|
items: a
|
|
3346
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
3347
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Cr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
|
|
3347
3348
|
/* @__PURE__ */ n(
|
|
3348
3349
|
"audio",
|
|
3349
3350
|
{
|
|
@@ -3366,7 +3367,7 @@ const ir = {
|
|
|
3366
3367
|
preload: l,
|
|
3367
3368
|
onDismiss: d
|
|
3368
3369
|
}) => {
|
|
3369
|
-
const m = we(e), b = e === "composer" && !!d, u =
|
|
3370
|
+
const m = we(e), b = e === "composer" && !!d, u = yr({ src: t, mimeType: s, filename: a, items: r });
|
|
3370
3371
|
if (u.length === 0)
|
|
3371
3372
|
return null;
|
|
3372
3373
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3378,7 +3379,7 @@ const ir = {
|
|
|
3378
3379
|
groupPosition: o,
|
|
3379
3380
|
"data-testid": "audio-attachment",
|
|
3380
3381
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
|
|
3381
|
-
|
|
3382
|
+
Cr,
|
|
3382
3383
|
{
|
|
3383
3384
|
item: c,
|
|
3384
3385
|
preload: f,
|
|
@@ -3392,15 +3393,15 @@ const ir = {
|
|
|
3392
3393
|
)) })
|
|
3393
3394
|
}
|
|
3394
3395
|
);
|
|
3395
|
-
},
|
|
3396
|
-
Composer:
|
|
3397
|
-
Sent:
|
|
3398
|
-
Received:
|
|
3396
|
+
}, kr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "composer" }), Er = (e) => /* @__PURE__ */ n(nt, { ...e, state: "sent" }), Sr = (e) => /* @__PURE__ */ n(nt, { ...e, state: "received" }), Ir = {
|
|
3397
|
+
Composer: kr,
|
|
3398
|
+
Sent: Er,
|
|
3399
|
+
Received: Sr
|
|
3399
3400
|
};
|
|
3400
|
-
function
|
|
3401
|
+
function Tr(e) {
|
|
3401
3402
|
return !Number.isFinite(e) || e < 0 ? "" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
3402
3403
|
}
|
|
3403
|
-
const
|
|
3404
|
+
const Ar = {
|
|
3404
3405
|
pdf: "PDF",
|
|
3405
3406
|
doc: "DOC",
|
|
3406
3407
|
xls: "XLS",
|
|
@@ -3410,7 +3411,7 @@ const Tr = {
|
|
|
3410
3411
|
text: "TXT",
|
|
3411
3412
|
markdown: "MD"
|
|
3412
3413
|
};
|
|
3413
|
-
function
|
|
3414
|
+
function Mr(e, t) {
|
|
3414
3415
|
if (t) {
|
|
3415
3416
|
const r = t.lastIndexOf(".");
|
|
3416
3417
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3420,7 +3421,7 @@ function Ar(e, t) {
|
|
|
3420
3421
|
}
|
|
3421
3422
|
if (!e) return;
|
|
3422
3423
|
if (ne(e) === "document") {
|
|
3423
|
-
const r = Zt(e), i =
|
|
3424
|
+
const r = Zt(e), i = Ar[r];
|
|
3424
3425
|
if (i) return i;
|
|
3425
3426
|
if (e === "application/octet-stream") return;
|
|
3426
3427
|
}
|
|
@@ -3428,8 +3429,8 @@ function Ar(e, t) {
|
|
|
3428
3429
|
if (!(!a || a === "*"))
|
|
3429
3430
|
return a.toUpperCase();
|
|
3430
3431
|
}
|
|
3431
|
-
function
|
|
3432
|
-
const a =
|
|
3432
|
+
function Rr(e, t, s) {
|
|
3433
|
+
const a = Mr(e, t), r = typeof s == "number" && s > 0 ? Tr(s) : void 0;
|
|
3433
3434
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3434
3435
|
}
|
|
3435
3436
|
function Z(e) {
|
|
@@ -3440,13 +3441,13 @@ function Z(e) {
|
|
|
3440
3441
|
return "download";
|
|
3441
3442
|
}
|
|
3442
3443
|
}
|
|
3443
|
-
const
|
|
3444
|
+
const Lr = {
|
|
3444
3445
|
dark: "text-white/55",
|
|
3445
3446
|
light: "text-black/65"
|
|
3446
|
-
},
|
|
3447
|
+
}, Dr = {
|
|
3447
3448
|
dark: "bg-white/10",
|
|
3448
3449
|
light: "bg-black/5"
|
|
3449
|
-
},
|
|
3450
|
+
}, Pr = {
|
|
3450
3451
|
dark: "text-white/85",
|
|
3451
3452
|
light: "text-black/85"
|
|
3452
3453
|
}, fn = ({
|
|
@@ -3459,16 +3460,16 @@ const Rr = {
|
|
|
3459
3460
|
activateLabel: o,
|
|
3460
3461
|
trailingAction: l
|
|
3461
3462
|
}) => {
|
|
3462
|
-
const d = s ?? t ?? "File", m =
|
|
3463
|
+
const d = s ?? t ?? "File", m = Rr(a, t, r), b = /* @__PURE__ */ n(
|
|
3463
3464
|
"div",
|
|
3464
3465
|
{
|
|
3465
3466
|
className: y(
|
|
3466
3467
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3467
|
-
|
|
3468
|
+
Dr[e]
|
|
3468
3469
|
),
|
|
3469
3470
|
"aria-hidden": !0,
|
|
3470
3471
|
children: le(a, {
|
|
3471
|
-
className: y("size-6",
|
|
3472
|
+
className: y("size-6", Pr[e]),
|
|
3472
3473
|
weight: "regular"
|
|
3473
3474
|
})
|
|
3474
3475
|
}
|
|
@@ -3479,7 +3480,7 @@ const Rr = {
|
|
|
3479
3480
|
{
|
|
3480
3481
|
className: y(
|
|
3481
3482
|
"truncate text-xs leading-4",
|
|
3482
|
-
|
|
3483
|
+
Lr[e]
|
|
3483
3484
|
),
|
|
3484
3485
|
children: m
|
|
3485
3486
|
}
|
|
@@ -3522,14 +3523,14 @@ async function gn(e, t) {
|
|
|
3522
3523
|
}
|
|
3523
3524
|
}
|
|
3524
3525
|
}
|
|
3525
|
-
const
|
|
3526
|
+
const Or = ({
|
|
3526
3527
|
src: e,
|
|
3527
3528
|
filename: t,
|
|
3528
3529
|
fileSize: s,
|
|
3529
3530
|
mimeType: a,
|
|
3530
3531
|
title: r,
|
|
3531
3532
|
items: i
|
|
3532
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
3533
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], zr = ({
|
|
3533
3534
|
variant: e,
|
|
3534
3535
|
item: t,
|
|
3535
3536
|
index: s,
|
|
@@ -3563,7 +3564,7 @@ const Pr = ({
|
|
|
3563
3564
|
onClick: m,
|
|
3564
3565
|
onDismiss: b
|
|
3565
3566
|
}) => {
|
|
3566
|
-
const u = we(e), f = e === "composer" && !!b, c =
|
|
3567
|
+
const u = we(e), f = e === "composer" && !!b, c = Or({
|
|
3567
3568
|
src: t,
|
|
3568
3569
|
filename: s,
|
|
3569
3570
|
fileSize: a,
|
|
@@ -3598,7 +3599,7 @@ const Pr = ({
|
|
|
3598
3599
|
groupPosition: d,
|
|
3599
3600
|
"data-testid": "file-attachment",
|
|
3600
3601
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, _) => /* @__PURE__ */ n(
|
|
3601
|
-
|
|
3602
|
+
zr,
|
|
3602
3603
|
{
|
|
3603
3604
|
variant: u,
|
|
3604
3605
|
item: v,
|
|
@@ -3610,10 +3611,10 @@ const Pr = ({
|
|
|
3610
3611
|
)) })
|
|
3611
3612
|
}
|
|
3612
3613
|
);
|
|
3613
|
-
},
|
|
3614
|
-
Composer:
|
|
3615
|
-
Sent:
|
|
3616
|
-
Received:
|
|
3614
|
+
}, $r = (e) => /* @__PURE__ */ n(st, { ...e, state: "composer" }), Fr = (e) => /* @__PURE__ */ n(st, { ...e, state: "sent" }), Br = (e) => /* @__PURE__ */ n(st, { ...e, state: "received" }), Ur = {
|
|
3615
|
+
Composer: $r,
|
|
3616
|
+
Sent: Fr,
|
|
3617
|
+
Received: Br
|
|
3617
3618
|
}, at = ({
|
|
3618
3619
|
onPrev: e,
|
|
3619
3620
|
onNext: t,
|
|
@@ -3627,7 +3628,7 @@ const Pr = ({
|
|
|
3627
3628
|
onClick: e,
|
|
3628
3629
|
"aria-label": s,
|
|
3629
3630
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3630
|
-
children: /* @__PURE__ */ n(
|
|
3631
|
+
children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3631
3632
|
}
|
|
3632
3633
|
),
|
|
3633
3634
|
/* @__PURE__ */ n(
|
|
@@ -3637,7 +3638,7 @@ const Pr = ({
|
|
|
3637
3638
|
onClick: t,
|
|
3638
3639
|
"aria-label": a,
|
|
3639
3640
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3640
|
-
children: /* @__PURE__ */ n(
|
|
3641
|
+
children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3641
3642
|
}
|
|
3642
3643
|
)
|
|
3643
3644
|
] }), bn = ({
|
|
@@ -3896,7 +3897,7 @@ const Pr = ({
|
|
|
3896
3897
|
]
|
|
3897
3898
|
}
|
|
3898
3899
|
) : null;
|
|
3899
|
-
},
|
|
3900
|
+
}, jr = "relative block size-full overflow-hidden bg-black/5 outline-none focus-visible:ring-2 focus-visible:ring-white/80 focus-visible:ring-offset-2 focus-visible:ring-offset-black", vn = ({
|
|
3900
3901
|
tiles: e,
|
|
3901
3902
|
onTileActivate: t,
|
|
3902
3903
|
maxVisible: s = 4,
|
|
@@ -3905,7 +3906,7 @@ const Pr = ({
|
|
|
3905
3906
|
const r = e.length;
|
|
3906
3907
|
if (r === 0) return null;
|
|
3907
3908
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
|
|
3908
|
-
const u = y(
|
|
3909
|
+
const u = y(jr, "h-full w-full");
|
|
3909
3910
|
return t ? /* @__PURE__ */ h(
|
|
3910
3911
|
"button",
|
|
3911
3912
|
{
|
|
@@ -3974,7 +3975,7 @@ const Pr = ({
|
|
|
3974
3975
|
[e]
|
|
3975
3976
|
), o = W(() => s(!1), []);
|
|
3976
3977
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3977
|
-
},
|
|
3978
|
+
}, Vr = (e, t, s, a) => ({
|
|
3978
3979
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
3979
3980
|
content: /* @__PURE__ */ n(
|
|
3980
3981
|
"img",
|
|
@@ -3989,7 +3990,7 @@ const Pr = ({
|
|
|
3989
3990
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
3990
3991
|
}
|
|
3991
3992
|
)
|
|
3992
|
-
}),
|
|
3993
|
+
}), Gr = ({
|
|
3993
3994
|
src: e,
|
|
3994
3995
|
alt: t,
|
|
3995
3996
|
items: s
|
|
@@ -3997,7 +3998,7 @@ const Pr = ({
|
|
|
3997
3998
|
src: s.src,
|
|
3998
3999
|
alt: s.alt,
|
|
3999
4000
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4000
|
-
})),
|
|
4001
|
+
})), Hr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4001
4002
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
|
|
4002
4003
|
r
|
|
4003
4004
|
);
|
|
@@ -4044,13 +4045,13 @@ const Pr = ({
|
|
|
4044
4045
|
loading: l = "lazy",
|
|
4045
4046
|
onClick: d
|
|
4046
4047
|
}) => {
|
|
4047
|
-
const m =
|
|
4048
|
+
const m = Gr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
|
|
4048
4049
|
d
|
|
4049
4050
|
);
|
|
4050
4051
|
if (m.length === 0)
|
|
4051
4052
|
return null;
|
|
4052
4053
|
const p = m.map(
|
|
4053
|
-
(v, _) =>
|
|
4054
|
+
(v, _) => Vr(v, _, m.length, l)
|
|
4054
4055
|
);
|
|
4055
4056
|
return /* @__PURE__ */ h(
|
|
4056
4057
|
ve,
|
|
@@ -4073,11 +4074,11 @@ const Pr = ({
|
|
|
4073
4074
|
]
|
|
4074
4075
|
}
|
|
4075
4076
|
);
|
|
4076
|
-
},
|
|
4077
|
-
Composer:
|
|
4078
|
-
Sent:
|
|
4079
|
-
Received:
|
|
4080
|
-
},
|
|
4077
|
+
}, Yr = (e) => /* @__PURE__ */ n(Hr, { ...e }), qr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "sent" }), Wr = (e) => /* @__PURE__ */ n(wn, { ...e, state: "received" }), Xr = {
|
|
4078
|
+
Composer: Yr,
|
|
4079
|
+
Sent: qr,
|
|
4080
|
+
Received: Wr
|
|
4081
|
+
}, Kr = ({
|
|
4081
4082
|
open: e,
|
|
4082
4083
|
items: t,
|
|
4083
4084
|
initialIndex: s = 0,
|
|
@@ -4091,7 +4092,7 @@ const Pr = ({
|
|
|
4091
4092
|
() => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
|
|
4092
4093
|
[l]
|
|
4093
4094
|
), m = ee(
|
|
4094
|
-
() => l ?
|
|
4095
|
+
() => l ? Jr(l.src) : void 0,
|
|
4095
4096
|
[l]
|
|
4096
4097
|
);
|
|
4097
4098
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
@@ -4125,16 +4126,16 @@ const Pr = ({
|
|
|
4125
4126
|
]
|
|
4126
4127
|
}
|
|
4127
4128
|
);
|
|
4128
|
-
},
|
|
4129
|
+
}, Jr = (e) => {
|
|
4129
4130
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4130
4131
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4131
|
-
},
|
|
4132
|
+
}, Zr = ({
|
|
4132
4133
|
src: e,
|
|
4133
4134
|
filename: t,
|
|
4134
4135
|
fileSize: s,
|
|
4135
4136
|
title: a,
|
|
4136
4137
|
items: r
|
|
4137
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
4138
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Qr = ({
|
|
4138
4139
|
variant: e,
|
|
4139
4140
|
item: t,
|
|
4140
4141
|
index: s,
|
|
@@ -4167,7 +4168,7 @@ const Pr = ({
|
|
|
4167
4168
|
onClick: d,
|
|
4168
4169
|
onDismiss: m
|
|
4169
4170
|
}) => {
|
|
4170
|
-
const b = we(e), u =
|
|
4171
|
+
const b = we(e), u = Zr({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
|
|
4171
4172
|
d
|
|
4172
4173
|
), v = e === "composer" && !!m;
|
|
4173
4174
|
if (u.length === 0)
|
|
@@ -4196,7 +4197,7 @@ const Pr = ({
|
|
|
4196
4197
|
}
|
|
4197
4198
|
);
|
|
4198
4199
|
return /* @__PURE__ */ n(
|
|
4199
|
-
|
|
4200
|
+
Qr,
|
|
4200
4201
|
{
|
|
4201
4202
|
variant: b,
|
|
4202
4203
|
item: x,
|
|
@@ -4208,7 +4209,7 @@ const Pr = ({
|
|
|
4208
4209
|
);
|
|
4209
4210
|
}) }),
|
|
4210
4211
|
/* @__PURE__ */ n(
|
|
4211
|
-
|
|
4212
|
+
Kr,
|
|
4212
4213
|
{
|
|
4213
4214
|
open: f,
|
|
4214
4215
|
items: _,
|
|
@@ -4219,10 +4220,10 @@ const Pr = ({
|
|
|
4219
4220
|
]
|
|
4220
4221
|
}
|
|
4221
4222
|
);
|
|
4222
|
-
},
|
|
4223
|
-
Composer:
|
|
4224
|
-
Sent:
|
|
4225
|
-
Received:
|
|
4223
|
+
}, ei = (e) => /* @__PURE__ */ n(ot, { ...e, state: "composer" }), ti = (e) => /* @__PURE__ */ n(ot, { ...e, state: "sent" }), ni = (e) => /* @__PURE__ */ n(ot, { ...e, state: "received" }), si = {
|
|
4224
|
+
Composer: ei,
|
|
4225
|
+
Sent: ti,
|
|
4226
|
+
Received: ni
|
|
4226
4227
|
}, _n = ({
|
|
4227
4228
|
open: e,
|
|
4228
4229
|
items: t,
|
|
@@ -4273,7 +4274,7 @@ const Pr = ({
|
|
|
4273
4274
|
]
|
|
4274
4275
|
}
|
|
4275
4276
|
) : null;
|
|
4276
|
-
},
|
|
4277
|
+
}, ai = () => /* @__PURE__ */ n("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n("span", { className: "flex size-12 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur", children: /* @__PURE__ */ n(Be, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Nn = ({
|
|
4277
4278
|
item: e,
|
|
4278
4279
|
index: t
|
|
4279
4280
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4295,11 +4296,11 @@ const Pr = ({
|
|
|
4295
4296
|
"aria-hidden": !0
|
|
4296
4297
|
}
|
|
4297
4298
|
) }),
|
|
4298
|
-
/* @__PURE__ */ n(
|
|
4299
|
-
] }),
|
|
4299
|
+
/* @__PURE__ */ n(ai, {})
|
|
4300
|
+
] }), ri = (e, t, s) => ({
|
|
4300
4301
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4301
4302
|
content: /* @__PURE__ */ n(Nn, { item: e, index: t })
|
|
4302
|
-
}),
|
|
4303
|
+
}), ii = ({
|
|
4303
4304
|
src: e,
|
|
4304
4305
|
poster: t,
|
|
4305
4306
|
mimeType: s,
|
|
@@ -4311,7 +4312,7 @@ const Pr = ({
|
|
|
4311
4312
|
mimeType: s.mimeType,
|
|
4312
4313
|
preload: s.preload,
|
|
4313
4314
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4314
|
-
})),
|
|
4315
|
+
})), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4315
4316
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = _e(
|
|
4316
4317
|
i
|
|
4317
4318
|
);
|
|
@@ -4352,13 +4353,13 @@ const Pr = ({
|
|
|
4352
4353
|
preload: d,
|
|
4353
4354
|
onClick: m
|
|
4354
4355
|
}) => {
|
|
4355
|
-
const b =
|
|
4356
|
+
const b = ii({ src: t, poster: s, mimeType: a, preload: d, items: i }), u = we(e), { viewerOpen: f, viewerIndex: c, handleActivate: g, closeViewer: p } = _e(
|
|
4356
4357
|
m
|
|
4357
4358
|
);
|
|
4358
4359
|
if (b.length === 0)
|
|
4359
4360
|
return null;
|
|
4360
4361
|
const v = b.map(
|
|
4361
|
-
(_, x) =>
|
|
4362
|
+
(_, x) => ri(_, x, b.length)
|
|
4362
4363
|
);
|
|
4363
4364
|
return /* @__PURE__ */ h(
|
|
4364
4365
|
ve,
|
|
@@ -4388,17 +4389,17 @@ const Pr = ({
|
|
|
4388
4389
|
]
|
|
4389
4390
|
}
|
|
4390
4391
|
);
|
|
4391
|
-
},
|
|
4392
|
-
Composer:
|
|
4393
|
-
Sent:
|
|
4394
|
-
Received:
|
|
4395
|
-
},
|
|
4396
|
-
Image:
|
|
4397
|
-
Video:
|
|
4398
|
-
Audio:
|
|
4399
|
-
Pdf:
|
|
4400
|
-
File:
|
|
4401
|
-
},
|
|
4392
|
+
}, li = (e) => /* @__PURE__ */ n(oi, { ...e }), ci = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "sent" }), di = (e) => /* @__PURE__ */ n(Cn, { ...e, state: "received" }), ui = {
|
|
4393
|
+
Composer: li,
|
|
4394
|
+
Sent: ci,
|
|
4395
|
+
Received: di
|
|
4396
|
+
}, Si = {
|
|
4397
|
+
Image: Xr,
|
|
4398
|
+
Video: ui,
|
|
4399
|
+
Audio: Ir,
|
|
4400
|
+
Pdf: si,
|
|
4401
|
+
File: Ur
|
|
4402
|
+
}, mi = ({
|
|
4402
4403
|
question: e,
|
|
4403
4404
|
onClick: t,
|
|
4404
4405
|
loading: s = !1,
|
|
@@ -4420,7 +4421,7 @@ const Pr = ({
|
|
|
4420
4421
|
),
|
|
4421
4422
|
children: e
|
|
4422
4423
|
}
|
|
4423
|
-
),
|
|
4424
|
+
), Ii = ({
|
|
4424
4425
|
faqs: e,
|
|
4425
4426
|
onFaqClick: t,
|
|
4426
4427
|
loadingFaqId: s,
|
|
@@ -4449,7 +4450,7 @@ const Pr = ({
|
|
|
4449
4450
|
children: [
|
|
4450
4451
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4451
4452
|
l.map((d) => /* @__PURE__ */ n(
|
|
4452
|
-
|
|
4453
|
+
mi,
|
|
4453
4454
|
{
|
|
4454
4455
|
question: d.question,
|
|
4455
4456
|
onClick: () => t(d.id),
|
|
@@ -4464,37 +4465,37 @@ const Pr = ({
|
|
|
4464
4465
|
};
|
|
4465
4466
|
export {
|
|
4466
4467
|
Qt as A,
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4468
|
+
Gs as B,
|
|
4469
|
+
Wa as C,
|
|
4470
|
+
Ps as D,
|
|
4471
|
+
Ii as F,
|
|
4472
|
+
ki as L,
|
|
4473
|
+
Ni as M,
|
|
4473
4474
|
he as a,
|
|
4474
4475
|
ae as b,
|
|
4475
|
-
|
|
4476
|
+
ar as c,
|
|
4476
4477
|
dn as d,
|
|
4477
|
-
|
|
4478
|
-
|
|
4478
|
+
yi as e,
|
|
4479
|
+
mi as f,
|
|
4479
4480
|
ne as g,
|
|
4480
4481
|
Ot as h,
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4482
|
+
Si as i,
|
|
4483
|
+
ya as j,
|
|
4484
|
+
_i as k,
|
|
4485
|
+
Ci as l,
|
|
4486
|
+
Rr as m,
|
|
4487
|
+
Tr as n,
|
|
4488
|
+
nr as o,
|
|
4489
|
+
Mr as p,
|
|
4489
4490
|
Xt as q,
|
|
4490
4491
|
le as r,
|
|
4491
4492
|
nn as s,
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4493
|
+
zs as t,
|
|
4494
|
+
Ei as u,
|
|
4495
|
+
Hs as v,
|
|
4495
4496
|
Je as w,
|
|
4496
4497
|
Ze as x,
|
|
4497
4498
|
Wt as y,
|
|
4498
|
-
|
|
4499
|
+
pa as z
|
|
4499
4500
|
};
|
|
4500
|
-
//# sourceMappingURL=index-
|
|
4501
|
+
//# sourceMappingURL=index-BYerDRXA.js.map
|