@linktr.ee/messaging-react 3.3.10-rc-1781645401 → 3.3.10-rc-1781868776
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-qF1fO3J4.cjs → Card-Ch3cTL6G.cjs} +2 -2
- package/dist/{Card-qF1fO3J4.cjs.map → Card-Ch3cTL6G.cjs.map} +1 -1
- package/dist/{Card-xNHR_bKY.cjs → Card-DezN34Sz.cjs} +2 -2
- package/dist/{Card-xNHR_bKY.cjs.map → Card-DezN34Sz.cjs.map} +1 -1
- package/dist/{Card-BmQYVGMq.cjs → Card-DiSXLhzw.cjs} +2 -2
- package/dist/{Card-BmQYVGMq.cjs.map → Card-DiSXLhzw.cjs.map} +1 -1
- package/dist/{Card-CG8SMxkM.js → Card-DndbBigk.js} +2 -2
- package/dist/{Card-CG8SMxkM.js.map → Card-DndbBigk.js.map} +1 -1
- package/dist/{Card-BokhtsDD.js → Card-giUAe8IB.js} +2 -2
- package/dist/{Card-BokhtsDD.js.map → Card-giUAe8IB.js.map} +1 -1
- package/dist/{Card-DaXkK4uS.js → Card-qFB_y7k3.js} +3 -3
- package/dist/{Card-DaXkK4uS.js.map → Card-qFB_y7k3.js.map} +1 -1
- package/dist/{LockedThumbnail-_5g6bxXW.js → LockedThumbnail-C9Y0oCjv.js} +2 -2
- package/dist/{LockedThumbnail-_5g6bxXW.js.map → LockedThumbnail-C9Y0oCjv.js.map} +1 -1
- package/dist/{LockedThumbnail-BZMu174W.cjs → LockedThumbnail-DkdVuMZM.cjs} +2 -2
- package/dist/{LockedThumbnail-BZMu174W.cjs.map → LockedThumbnail-DkdVuMZM.cjs.map} +1 -1
- package/dist/{index-3GF2ZDV8.cjs → index-B_8de68T.cjs} +2 -2
- package/dist/index-B_8de68T.cjs.map +1 -0
- package/dist/{index-XXoPu3F3.js → index-DGVCJzwy.js} +404 -436
- package/dist/index-DGVCJzwy.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -54
- package/dist/index.js +20 -24
- package/package.json +2 -2
- package/src/index.ts +0 -10
- package/dist/index-3GF2ZDV8.cjs.map +0 -1
- package/dist/index-XXoPu3F3.js.map +0 -1
- package/src/utils/linkAttachmentFromStream.test.ts +0 -99
- package/src/utils/linkAttachmentFromStream.ts +0 -112
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as h, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import $, { createContext as Ge, useContext as Te, useCallback as W, useState as P, useRef as H, useEffect as Y, useId as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { Chat as
|
|
5
|
-
import { StarIcon as Fe, DotsThreeIcon as
|
|
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
|
+
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, 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
|
-
const
|
|
9
|
+
const Yt = Ge({
|
|
10
10
|
service: null,
|
|
11
11
|
client: null,
|
|
12
12
|
isConnected: !1,
|
|
@@ -16,7 +16,7 @@ const qt = Ge({
|
|
|
16
16
|
refreshConnection: async () => {
|
|
17
17
|
},
|
|
18
18
|
debug: !1
|
|
19
|
-
}), qe = () => Te(
|
|
19
|
+
}), qe = () => Te(Yt), _i = ({
|
|
20
20
|
children: e,
|
|
21
21
|
user: t,
|
|
22
22
|
serviceConfig: s,
|
|
@@ -80,7 +80,7 @@ const qt = Ge({
|
|
|
80
80
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "...",
|
|
81
81
|
serviceConfigChanged: x.current.serviceConfig !== s
|
|
82
82
|
});
|
|
83
|
-
const T = new
|
|
83
|
+
const T = new Sn({
|
|
84
84
|
...s,
|
|
85
85
|
apiKey: a,
|
|
86
86
|
debug: i
|
|
@@ -207,8 +207,8 @@ const qt = Ge({
|
|
|
207
207
|
renderCount: S.current,
|
|
208
208
|
willRenderChat: !!(m && u),
|
|
209
209
|
contextValueReady: !!D
|
|
210
|
-
}), /* @__PURE__ */ n(
|
|
211
|
-
|
|
210
|
+
}), /* @__PURE__ */ n(Yt.Provider, { value: D, children: m && u ? /* @__PURE__ */ n(
|
|
211
|
+
In,
|
|
212
212
|
{
|
|
213
213
|
client: m,
|
|
214
214
|
customClasses: {
|
|
@@ -217,7 +217,7 @@ const qt = 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,15 +239,15 @@ const qt = 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
|
-
function
|
|
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";
|
|
252
252
|
}
|
|
253
253
|
const Dt = [
|
|
@@ -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 Fs(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 = ({
|
|
@@ -479,7 +479,7 @@ const ae = ({
|
|
|
479
479
|
customChannelActions: b,
|
|
480
480
|
triggerClassName: u
|
|
481
481
|
}) => {
|
|
482
|
-
const [f, c] = P(!1), g = H(null), p =
|
|
482
|
+
const [f, c] = P(!1), g = H(null), p = En(), v = W(() => c(!1), []), {
|
|
483
483
|
isParticipantBlocked: _,
|
|
484
484
|
isCheckingBlockedStatus: x,
|
|
485
485
|
isLeaving: S,
|
|
@@ -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
|
}
|
|
@@ -580,7 +580,7 @@ const ae = ({
|
|
|
580
580
|
}
|
|
581
581
|
) }),
|
|
582
582
|
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ h(he, { variant: "danger", onClick: T, children: [
|
|
583
|
-
/* @__PURE__ */ n(
|
|
583
|
+
/* @__PURE__ */ n(jt, { className: "h-5 w-5" }),
|
|
584
584
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
585
585
|
] }) }),
|
|
586
586
|
b
|
|
@@ -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,24 +619,24 @@ function Hs(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
|
-
function
|
|
625
|
+
function Xt({
|
|
626
626
|
message: e,
|
|
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-giUAe8IB.js")), qs = $.lazy(() => import("./Card-DndbBigk.js")), Ws = $.lazy(() => import("./Card-qFB_y7k3.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"],
|
|
@@ -649,39 +649,39 @@ const qs = $.lazy(() => import("./Card-BokhtsDD.js")), Ws = $.lazy(() => import(
|
|
|
649
649
|
function ne(e) {
|
|
650
650
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
const t =
|
|
652
|
+
function Zt(e) {
|
|
653
|
+
const t = Zs.find(
|
|
654
654
|
([s]) => s.test(e)
|
|
655
655
|
);
|
|
656
656
|
return t ? t[1] : "generic";
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
video:
|
|
660
|
-
audio:
|
|
661
|
-
image:
|
|
662
|
-
document:
|
|
663
|
-
},
|
|
664
|
-
pdf:
|
|
665
|
-
doc:
|
|
666
|
-
xls:
|
|
667
|
-
csv:
|
|
668
|
-
ppt:
|
|
669
|
-
zip:
|
|
670
|
-
text:
|
|
671
|
-
markdown:
|
|
672
|
-
generic:
|
|
658
|
+
const Qs = {
|
|
659
|
+
video: Gt,
|
|
660
|
+
audio: fs,
|
|
661
|
+
image: hs,
|
|
662
|
+
document: Vt
|
|
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
|
+
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 sa = (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 sa = (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 sa = (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 sa = (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 sa = (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,
|
|
@@ -1009,7 +1009,7 @@ const sa = (e) => {
|
|
|
1009
1009
|
})
|
|
1010
1010
|
}
|
|
1011
1011
|
);
|
|
1012
|
-
},
|
|
1012
|
+
}, en = ({
|
|
1013
1013
|
variant: e,
|
|
1014
1014
|
thumbnail: t,
|
|
1015
1015
|
title: s,
|
|
@@ -1075,25 +1075,25 @@ const sa = (e) => {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
);
|
|
1077
1077
|
};
|
|
1078
|
-
function
|
|
1078
|
+
function tn(e) {
|
|
1079
1079
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1080
1080
|
}
|
|
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,26 +1108,26 @@ 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 });
|
|
1122
1122
|
};
|
|
1123
|
-
function
|
|
1123
|
+
function nn(e) {
|
|
1124
1124
|
return e.type === "link" || !!e.og_scrape_url && !e.asset_url;
|
|
1125
1125
|
}
|
|
1126
1126
|
function Je(e) {
|
|
1127
1127
|
var t;
|
|
1128
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
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 ua(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 ma = ({
|
|
|
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);
|
|
@@ -1187,16 +1187,16 @@ function Ze(e) {
|
|
|
1187
1187
|
thumbnailUrl: b
|
|
1188
1188
|
};
|
|
1189
1189
|
}
|
|
1190
|
-
const
|
|
1190
|
+
const sn = ({
|
|
1191
1191
|
resolvedUrl: e,
|
|
1192
1192
|
resolvedType: t,
|
|
1193
1193
|
title: s,
|
|
1194
1194
|
fileSize: a,
|
|
1195
1195
|
thumbnailUrl: r
|
|
1196
1196
|
}) => {
|
|
1197
|
-
const i = a !== void 0 ?
|
|
1197
|
+
const i = a !== void 0 ? tn(a) : void 0;
|
|
1198
1198
|
return /* @__PURE__ */ n(
|
|
1199
|
-
|
|
1199
|
+
en,
|
|
1200
1200
|
{
|
|
1201
1201
|
variant: "dark",
|
|
1202
1202
|
title: s,
|
|
@@ -1204,7 +1204,7 @@ const an = ({
|
|
|
1204
1204
|
mimeType: t,
|
|
1205
1205
|
detail: i,
|
|
1206
1206
|
thumbnail: /* @__PURE__ */ n(
|
|
1207
|
-
|
|
1207
|
+
Qt,
|
|
1208
1208
|
{
|
|
1209
1209
|
mimeType: t,
|
|
1210
1210
|
sourceUrl: e,
|
|
@@ -1215,23 +1215,23 @@ const an = ({
|
|
|
1215
1215
|
)
|
|
1216
1216
|
}
|
|
1217
1217
|
);
|
|
1218
|
-
},
|
|
1218
|
+
}, an = ({
|
|
1219
1219
|
resolvedUrl: e,
|
|
1220
1220
|
resolvedType: t,
|
|
1221
1221
|
title: s,
|
|
1222
1222
|
fileSize: a,
|
|
1223
1223
|
thumbnailUrl: r
|
|
1224
1224
|
}) => {
|
|
1225
|
-
const i = ne(t), o = a !== void 0 ?
|
|
1225
|
+
const i = ne(t), o = a !== void 0 ? tn(a) : void 0;
|
|
1226
1226
|
return /* @__PURE__ */ n(
|
|
1227
|
-
|
|
1227
|
+
en,
|
|
1228
1228
|
{
|
|
1229
1229
|
variant: "light",
|
|
1230
1230
|
title: s,
|
|
1231
1231
|
mimeType: t,
|
|
1232
1232
|
detail: o,
|
|
1233
1233
|
thumbnail: /* @__PURE__ */ n(
|
|
1234
|
-
|
|
1234
|
+
Qt,
|
|
1235
1235
|
{
|
|
1236
1236
|
mimeType: t,
|
|
1237
1237
|
sourceUrl: e,
|
|
@@ -1241,10 +1241,10 @@ const an = ({
|
|
|
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
|
}) => {
|
|
@@ -1269,40 +1269,40 @@ const an = ({
|
|
|
1269
1269
|
{
|
|
1270
1270
|
className: "str-chat__message-bubble",
|
|
1271
1271
|
style: { padding: 0, borderRadius: 0, overflow: "visible", background: "transparent" },
|
|
1272
|
-
children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(
|
|
1272
|
+
children: s ? /* @__PURE__ */ n("div", { className: Xe(t), children: /* @__PURE__ */ n(Ke, { attachment: s, isMyMessage: t }) }) : t ? /* @__PURE__ */ n(sn, { ...a }) : /* @__PURE__ */ n(an, { ...a })
|
|
1273
1273
|
}
|
|
1274
1274
|
) })
|
|
1275
1275
|
}
|
|
1276
1276
|
)
|
|
1277
1277
|
] });
|
|
1278
|
-
},
|
|
1278
|
+
}, ha = ({
|
|
1279
1279
|
message: e
|
|
1280
1280
|
}) => {
|
|
1281
1281
|
const t = Je(e);
|
|
1282
1282
|
if (t)
|
|
1283
1283
|
return /* @__PURE__ */ n("div", { className: Xe(!0), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !0 }) });
|
|
1284
1284
|
const s = Ze(e);
|
|
1285
|
-
return s ? /* @__PURE__ */ n(
|
|
1286
|
-
},
|
|
1285
|
+
return s ? /* @__PURE__ */ n(sn, { ...s }) : null;
|
|
1286
|
+
}, fa = ({
|
|
1287
1287
|
message: e
|
|
1288
1288
|
}) => {
|
|
1289
1289
|
const t = Je(e);
|
|
1290
1290
|
if (t)
|
|
1291
1291
|
return /* @__PURE__ */ n("div", { className: Xe(!1), children: /* @__PURE__ */ n(Ke, { attachment: t, isMyMessage: !1 }) });
|
|
1292
1292
|
const s = Ze(e);
|
|
1293
|
-
return s ? /* @__PURE__ */ n(
|
|
1294
|
-
},
|
|
1295
|
-
Creator:
|
|
1296
|
-
Visitor:
|
|
1297
|
-
}),
|
|
1293
|
+
return s ? /* @__PURE__ */ n(an, { ...s }) : null;
|
|
1294
|
+
}, Ni = Object.assign(ma, {
|
|
1295
|
+
Creator: ha,
|
|
1296
|
+
Visitor: fa
|
|
1297
|
+
}), ga = {
|
|
1298
1298
|
isUnlocking: () => !1
|
|
1299
|
-
},
|
|
1300
|
-
LockedAttachment:
|
|
1301
|
-
},
|
|
1302
|
-
function
|
|
1303
|
-
return Te(
|
|
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,21 +1319,21 @@ const xa = ({ 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
|
-
},
|
|
1334
|
+
}, on = (e) => xa(e) || wa(e), Na = (e) => {
|
|
1335
1335
|
var t;
|
|
1336
|
-
return
|
|
1336
|
+
return on(e) && !((t = e.text) != null && t.trim());
|
|
1337
1337
|
}, Pe = ({
|
|
1338
1338
|
message: e,
|
|
1339
1339
|
standalone: t = !1,
|
|
@@ -1341,7 +1341,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1341
1341
|
hasAttachment: a = !1
|
|
1342
1342
|
}) => {
|
|
1343
1343
|
var u;
|
|
1344
|
-
const r =
|
|
1344
|
+
const r = on(e), i = ke(e);
|
|
1345
1345
|
if (!r && !i)
|
|
1346
1346
|
return null;
|
|
1347
1347
|
if (r) {
|
|
@@ -1349,7 +1349,7 @@ const xa = ({ 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 xa = ({ 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 xa = ({ 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 xa = ({ 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 xa = ({ 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,40 +1417,40 @@ const xa = ({ 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 } =
|
|
1421
|
-
Attachment: A =
|
|
1422
|
-
EditMessageModal: L =
|
|
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
|
+
Attachment: A = Rn,
|
|
1422
|
+
EditMessageModal: L = Ln,
|
|
1423
1423
|
MessageActions: z,
|
|
1424
|
-
MessageBlocked: V =
|
|
1425
|
-
MessageBouncePrompt: B =
|
|
1426
|
-
MessageDeleted: U =
|
|
1427
|
-
MessageIsThreadReplyInChannelButtonIndicator: X =
|
|
1428
|
-
MessageRepliesCountButton: G =
|
|
1429
|
-
ReminderNotification: O =
|
|
1430
|
-
StreamedMessageText: w =
|
|
1424
|
+
MessageBlocked: V = Dn,
|
|
1425
|
+
MessageBouncePrompt: B = Pn,
|
|
1426
|
+
MessageDeleted: U = On,
|
|
1427
|
+
MessageIsThreadReplyInChannelButtonIndicator: X = zn,
|
|
1428
|
+
MessageRepliesCountButton: G = $n,
|
|
1429
|
+
ReminderNotification: O = Fn,
|
|
1430
|
+
StreamedMessageText: w = Bn,
|
|
1431
1431
|
PinIndicator: C
|
|
1432
|
-
} =
|
|
1432
|
+
} = Ut("CustomMessage"), j = Un(c), q = jn(c), Ne = ee(
|
|
1433
1433
|
() => u == null ? void 0 : u(c),
|
|
1434
1434
|
[u, c]
|
|
1435
1435
|
), K = ee(() => {
|
|
1436
1436
|
const me = c.attachments ?? [], ye = c.shared_location ? [c.shared_location, ...me] : me;
|
|
1437
1437
|
if (!ke(c)) return ye;
|
|
1438
|
-
const St = ye.filter((It) => !("type" in It) || !
|
|
1438
|
+
const St = ye.filter((It) => !("type" in It) || !nn(It));
|
|
1439
1439
|
return St.length === ye.length ? ye : St;
|
|
1440
1440
|
}, [c]), re = ee(() => {
|
|
1441
|
-
const me =
|
|
1441
|
+
const me = Xt({ message: c, viewerLanguage: v });
|
|
1442
1442
|
return me === c.text ? c : { ...c, text: me };
|
|
1443
1443
|
}, [c, v]);
|
|
1444
|
-
if (
|
|
1444
|
+
if (Vn(c))
|
|
1445
1445
|
return null;
|
|
1446
1446
|
if (c.deleted_at || c.type === "deleted")
|
|
1447
1447
|
return /* @__PURE__ */ n(U, { message: c });
|
|
1448
|
-
if (
|
|
1448
|
+
if (Gn(c))
|
|
1449
1449
|
return /* @__PURE__ */ n(V, {});
|
|
1450
|
-
const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt =
|
|
1450
|
+
const J = !p && !!c.reply_count, se = !p && c.show_in_channel && c.parent_id, Q = c.status === "failed" && ((ht = c.error) == null ? void 0 : ht.status) !== 403, lt = Hn(c);
|
|
1451
1451
|
let ie;
|
|
1452
1452
|
Q ? ie = () => m(c) : lt && (ie = () => T(!0));
|
|
1453
|
-
const de = f(),
|
|
1453
|
+
const de = f(), kn = y(
|
|
1454
1454
|
"str-chat__message str-chat__message-simple",
|
|
1455
1455
|
`str-chat__message--${c.type}`,
|
|
1456
1456
|
`str-chat__message--${c.status}`,
|
|
@@ -1467,7 +1467,7 @@ const xa = ({ 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,
|
|
@@ -1476,7 +1476,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1476
1476
|
}
|
|
1477
1477
|
),
|
|
1478
1478
|
k && /* @__PURE__ */ n(
|
|
1479
|
-
|
|
1479
|
+
Yn,
|
|
1480
1480
|
{
|
|
1481
1481
|
MessageBouncePrompt: B,
|
|
1482
1482
|
onClose: () => T(!1),
|
|
@@ -1486,7 +1486,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1486
1486
|
/* @__PURE__ */ h(
|
|
1487
1487
|
"div",
|
|
1488
1488
|
{
|
|
1489
|
-
className:
|
|
1489
|
+
className: kn,
|
|
1490
1490
|
"data-message-id": c.id,
|
|
1491
1491
|
children: [
|
|
1492
1492
|
C && /* @__PURE__ */ n(C, {}),
|
|
@@ -1573,7 +1573,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1573
1573
|
isMyMessage: de
|
|
1574
1574
|
}
|
|
1575
1575
|
),
|
|
1576
|
-
ct && /* @__PURE__ */ n(
|
|
1576
|
+
ct && /* @__PURE__ */ n(qn, { poll: ct }),
|
|
1577
1577
|
K != null && K.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
1578
1578
|
A,
|
|
1579
1579
|
{
|
|
@@ -1594,7 +1594,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1594
1594
|
renderText: g
|
|
1595
1595
|
}
|
|
1596
1596
|
),
|
|
1597
|
-
/* @__PURE__ */ n(
|
|
1597
|
+
/* @__PURE__ */ n(Wn, {})
|
|
1598
1598
|
] }) })
|
|
1599
1599
|
}
|
|
1600
1600
|
),
|
|
@@ -1608,7 +1608,7 @@ const xa = ({ 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,50 +1629,50 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1629
1629
|
c.id
|
|
1630
1630
|
)
|
|
1631
1631
|
] });
|
|
1632
|
-
},
|
|
1633
|
-
|
|
1634
|
-
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 :
|
|
1635
|
-
),
|
|
1632
|
+
}, ka = $.memo(
|
|
1633
|
+
Ca,
|
|
1634
|
+
(e, t) => e.chatbotVotingEnabled !== t.chatbotVotingEnabled || e.viewerLanguage !== t.viewerLanguage ? !1 : An(e, t)
|
|
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(
|
|
1642
|
-
|
|
1642
|
+
Ht,
|
|
1643
1643
|
{
|
|
1644
1644
|
onClick: e,
|
|
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,
|
|
1655
1655
|
{
|
|
1656
1656
|
onClick: e,
|
|
1657
1657
|
"aria-label": "Report",
|
|
1658
1658
|
title: "Report",
|
|
1659
1659
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
1660
|
-
children: /* @__PURE__ */ n(
|
|
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 xa = ({ 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
|
-
}),
|
|
1720
|
-
const { linkPreviewsManager: e } =
|
|
1719
|
+
}), Ra = () => {
|
|
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-stretch 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
|
-
},
|
|
1734
|
+
}, ln = $.createContext(!1), La = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
1735
1735
|
"button",
|
|
1736
1736
|
{
|
|
1737
1737
|
...s,
|
|
@@ -1739,20 +1739,20 @@ const xa = ({ 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
|
-
),
|
|
1745
|
-
const e = Te(
|
|
1746
|
-
SendButton: r =
|
|
1747
|
-
AttachmentPreviewList: i =
|
|
1748
|
-
} =
|
|
1744
|
+
), Da = () => {
|
|
1745
|
+
const e = Te(ln), { handleSubmit: t } = Zn(), s = Qn(), a = e || !s, {
|
|
1746
|
+
SendButton: r = La,
|
|
1747
|
+
AttachmentPreviewList: i = es
|
|
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
|
-
/* @__PURE__ */ n(
|
|
1751
|
-
/* @__PURE__ */ n(
|
|
1750
|
+
/* @__PURE__ */ n(ts, {}),
|
|
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(
|
|
1755
|
-
|
|
1755
|
+
ns,
|
|
1756
1756
|
{
|
|
1757
1757
|
"aria-disabled": e || void 0,
|
|
1758
1758
|
className: "w-full resize-none outline-none leading-5 placeholder:text-black/30 text-sm",
|
|
@@ -1775,7 +1775,7 @@ const xa = ({ 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 xa = ({ 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(
|
|
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 xa = ({ 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 xa = ({ 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 xa = ({ 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 xa = ({ 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 xa = ({ 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 xa = ({ 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 xa = ({ 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
|
),
|
|
@@ -1915,7 +1915,7 @@ const xa = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
|
1915
1915
|
] }),
|
|
1916
1916
|
!t && /* @__PURE__ */ n(Le, { message: e.message })
|
|
1917
1917
|
] });
|
|
1918
|
-
},
|
|
1918
|
+
}, cn = Ge(!1), ze = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
1919
1919
|
"animateTransform",
|
|
1920
1920
|
{
|
|
1921
1921
|
attributeName: "transform",
|
|
@@ -1925,15 +1925,15 @@ const xa = ({ 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
|
-
const { channel: t, channelConfig: s, thread: a } = ce(), { client: r } = Ye(), { typing: i = {} } =
|
|
1935
|
-
if (!e && l &&
|
|
1936
|
-
const v =
|
|
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 && 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 xa = ({ 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 Wa(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 Xa = () => null, Ka = ({ 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,
|
|
@@ -2096,7 +2096,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2096
2096
|
return ((L = A.user) == null ? void 0 : L.id) && A.user.id !== N;
|
|
2097
2097
|
}
|
|
2098
2098
|
) : void 0;
|
|
2099
|
-
}, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v =
|
|
2099
|
+
}, [(E = g._client) == null ? void 0 : E.userID, (M = g.state) == null ? void 0 : M.members]), v = Wt(p == null ? void 0 : p.user), _ = (D = p == null ? void 0 : p.user) == null ? void 0 : D.image, x = qt(g), S = async () => {
|
|
2100
2100
|
try {
|
|
2101
2101
|
x ? await g.unpin() : await g.pin();
|
|
2102
2102
|
} catch (N) {
|
|
@@ -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,
|
|
@@ -2310,15 +2310,15 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2310
2310
|
[v, S, M]
|
|
2311
2311
|
);
|
|
2312
2312
|
return /* @__PURE__ */ n(te, { children: /* @__PURE__ */ n(
|
|
2313
|
-
|
|
2313
|
+
is,
|
|
2314
2314
|
{
|
|
2315
2315
|
overrides: {
|
|
2316
2316
|
Message: A,
|
|
2317
|
-
MessageActions:
|
|
2317
|
+
MessageActions: Ta
|
|
2318
2318
|
},
|
|
2319
|
-
children: /* @__PURE__ */ h(
|
|
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,
|
|
@@ -2341,13 +2341,13 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2341
2341
|
"div",
|
|
2342
2342
|
{
|
|
2343
2343
|
className: "flex-1 overflow-hidden relative",
|
|
2344
|
-
children: /* @__PURE__ */ n(
|
|
2344
|
+
children: /* @__PURE__ */ n(ls, { hideDeletedMessages: !0, hideNewMessageSeparator: !1 })
|
|
2345
2345
|
},
|
|
2346
2346
|
"lt-channel-message-list"
|
|
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)
|
|
@@ -2361,7 +2361,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2361
2361
|
] })
|
|
2362
2362
|
}
|
|
2363
2363
|
) });
|
|
2364
|
-
},
|
|
2364
|
+
}, dn = $.memo(
|
|
2365
2365
|
({
|
|
2366
2366
|
channel: e,
|
|
2367
2367
|
onBack: t,
|
|
@@ -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,
|
|
@@ -2434,20 +2434,20 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2434
2434
|
"messaging-channel-view h-full flex flex-col",
|
|
2435
2435
|
d
|
|
2436
2436
|
),
|
|
2437
|
-
children: /* @__PURE__ */ n(
|
|
2438
|
-
|
|
2437
|
+
children: /* @__PURE__ */ n(cn.Provider, { value: x ?? !1, children: /* @__PURE__ */ n(
|
|
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,
|
|
@@ -2481,7 +2481,7 @@ const oe = "size-10 rounded-full hover:bg-[#E5E4E1] flex items-center justify-ce
|
|
|
2481
2481
|
);
|
|
2482
2482
|
}
|
|
2483
2483
|
);
|
|
2484
|
-
|
|
2484
|
+
dn.displayName = "ChannelView";
|
|
2485
2485
|
const fe = $.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ h("div", { className: "text-center max-w-sm", children: [
|
|
2486
2486
|
/* @__PURE__ */ n("div", { className: "w-24 h-24 bg-danger-alt/20 rounded-full flex items-center justify-center mx-auto mb-6", children: /* @__PURE__ */ n("span", { className: "text-4xl", children: "⚠️" }) }),
|
|
2487
2487
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -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 Ei = ({
|
|
|
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;
|
|
@@ -2610,7 +2610,7 @@ const Ei = ({
|
|
|
2610
2610
|
onBack: k
|
|
2611
2611
|
}
|
|
2612
2612
|
) : F ? /* @__PURE__ */ n(fe, { message: F }) : L && !I ? /* @__PURE__ */ n(fe, { message: "Conversation ended" }) : I ? /* @__PURE__ */ n("div", { className: "messaging-shell h-full bg-background-primary overflow-hidden", children: /* @__PURE__ */ n("div", { className: "flex h-full min-h-0 flex-col", children: /* @__PURE__ */ n(
|
|
2613
|
-
|
|
2613
|
+
dn,
|
|
2614
2614
|
{
|
|
2615
2615
|
channel: I,
|
|
2616
2616
|
renderMessageInputActions: t,
|
|
@@ -2634,31 +2634,31 @@ const Ei = ({
|
|
|
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)
|
|
2641
2641
|
e.state.addMessageSorted(s.message);
|
|
2642
2642
|
}
|
|
2643
|
-
const
|
|
2643
|
+
const un = $.createContext({
|
|
2644
2644
|
selectedChannel: void 0,
|
|
2645
2645
|
onChannelSelect: () => {
|
|
2646
2646
|
},
|
|
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",
|
|
@@ -2668,7 +2668,7 @@ const mn = $.createContext({
|
|
|
2668
2668
|
day: "numeric",
|
|
2669
2669
|
year: "2-digit"
|
|
2670
2670
|
});
|
|
2671
|
-
},
|
|
2671
|
+
}, mn = $.memo(
|
|
2672
2672
|
({ channel: e, unread: t }) => {
|
|
2673
2673
|
var D, k, T;
|
|
2674
2674
|
const {
|
|
@@ -2677,7 +2677,7 @@ const mn = $.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;
|
|
@@ -2687,7 +2687,7 @@ const mn = $.createContext({
|
|
|
2687
2687
|
var I, R;
|
|
2688
2688
|
return ((I = N.user) == null ? void 0 : I.id) && N.user.id !== ((R = e == null ? void 0 : e._client) == null ? void 0 : R.userID);
|
|
2689
2689
|
}
|
|
2690
|
-
), f =
|
|
2690
|
+
), f = Wt(u == null ? void 0 : u.user), c = (k = u == null ? void 0 : u.user) == null ? void 0 : k.image, g = (() => {
|
|
2691
2691
|
var I;
|
|
2692
2692
|
const N = (I = e == null ? void 0 : e.state) == null ? void 0 : I.messages;
|
|
2693
2693
|
if (N != null && N.length) {
|
|
@@ -2696,7 +2696,7 @@ const mn = $.createContext({
|
|
|
2696
2696
|
}
|
|
2697
2697
|
})(), v = (() => {
|
|
2698
2698
|
var L, z, V, B;
|
|
2699
|
-
const N =
|
|
2699
|
+
const N = Xt({
|
|
2700
2700
|
message: g,
|
|
2701
2701
|
viewerLanguage: o
|
|
2702
2702
|
});
|
|
@@ -2706,7 +2706,7 @@ const mn = $.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,
|
|
@@ -2764,15 +2764,15 @@ const mn = $.createContext({
|
|
|
2764
2764
|
);
|
|
2765
2765
|
}
|
|
2766
2766
|
);
|
|
2767
|
-
|
|
2768
|
-
const
|
|
2767
|
+
mn.displayName = "CustomChannelPreview";
|
|
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 ar = { last_message_at: -1 }, rr = $.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,16 +2816,16 @@ const ar = { last_message_at: -1 }, rr = $.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(
|
|
2820
|
-
|
|
2819
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(Qa, { value: c, children: /* @__PURE__ */ n(
|
|
2820
|
+
cs,
|
|
2821
2821
|
{
|
|
2822
2822
|
filters: s,
|
|
2823
2823
|
sort: i,
|
|
2824
2824
|
options: { limit: 30 },
|
|
2825
2825
|
allowNewMessagesFromUnfilteredChannels: a,
|
|
2826
2826
|
channelRenderFilterFn: f,
|
|
2827
|
-
Paginator:
|
|
2828
|
-
Preview:
|
|
2827
|
+
Paginator: ds,
|
|
2828
|
+
Preview: mn,
|
|
2829
2829
|
EmptyStateIndicator: l
|
|
2830
2830
|
},
|
|
2831
2831
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -2834,26 +2834,26 @@ const ar = { last_message_at: -1 }, rr = $.memo(
|
|
|
2834
2834
|
);
|
|
2835
2835
|
}
|
|
2836
2836
|
);
|
|
2837
|
-
|
|
2838
|
-
const
|
|
2837
|
+
ar.displayName = "ChannelList";
|
|
2838
|
+
const rr = /^([a-z][a-z0-9+.-]*):/i, ir = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
2839
2839
|
function Qe(e) {
|
|
2840
2840
|
if (typeof e != "string") return;
|
|
2841
2841
|
const t = e.trim();
|
|
2842
2842
|
if (t === "") return;
|
|
2843
|
-
const s =
|
|
2843
|
+
const s = rr.exec(t);
|
|
2844
2844
|
if (s) {
|
|
2845
2845
|
const a = s[1].toLowerCase();
|
|
2846
|
-
return
|
|
2846
|
+
return ir.has(a) ? t : void 0;
|
|
2847
2847
|
}
|
|
2848
2848
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
2849
2849
|
}
|
|
2850
|
-
const
|
|
2850
|
+
const or = {
|
|
2851
2851
|
dark: "bg-white text-[#121110] hover:bg-white/90",
|
|
2852
2852
|
light: "bg-[#121110] text-white hover:bg-[#2a2928]"
|
|
2853
|
-
},
|
|
2853
|
+
}, lr = ({ variant: e, cta: t }) => {
|
|
2854
2854
|
const s = y(
|
|
2855
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",
|
|
2856
|
-
|
|
2856
|
+
or[e]
|
|
2857
2857
|
), a = Qe(t.href);
|
|
2858
2858
|
return a ? /* @__PURE__ */ n(
|
|
2859
2859
|
"a",
|
|
@@ -2880,10 +2880,10 @@ const lr = {
|
|
|
2880
2880
|
children: t.label
|
|
2881
2881
|
}
|
|
2882
2882
|
);
|
|
2883
|
-
},
|
|
2883
|
+
}, cr = {
|
|
2884
2884
|
dark: "text-white",
|
|
2885
2885
|
light: "text-black/90"
|
|
2886
|
-
},
|
|
2886
|
+
}, dr = "text-white/30", ur = {
|
|
2887
2887
|
dark: "text-white/55",
|
|
2888
2888
|
light: "text-black/55"
|
|
2889
2889
|
}, et = ({
|
|
@@ -2900,10 +2900,10 @@ const lr = {
|
|
|
2900
2900
|
if (!b && !u && !c && !g) return null;
|
|
2901
2901
|
const v = y(
|
|
2902
2902
|
"truncate text-base font-medium leading-6",
|
|
2903
|
-
d && !t ?
|
|
2903
|
+
d && !t ? dr : cr[e]
|
|
2904
2904
|
), _ = y(
|
|
2905
2905
|
"truncate text-xs leading-4",
|
|
2906
|
-
|
|
2906
|
+
ur[e]
|
|
2907
2907
|
);
|
|
2908
2908
|
return /* @__PURE__ */ h("div", { className: "px-4 py-3", children: [
|
|
2909
2909
|
/* @__PURE__ */ h("div", { className: "flex items-end gap-3", children: [
|
|
@@ -2919,9 +2919,9 @@ const lr = {
|
|
|
2919
2919
|
] }),
|
|
2920
2920
|
l && /* @__PURE__ */ n("div", { className: "shrink-0", children: l })
|
|
2921
2921
|
] }),
|
|
2922
|
-
o && /* @__PURE__ */ n(
|
|
2922
|
+
o && /* @__PURE__ */ n(lr, { variant: e, cta: o })
|
|
2923
2923
|
] });
|
|
2924
|
-
},
|
|
2924
|
+
}, mr = y(
|
|
2925
2925
|
"relative block w-[280px] select-none overflow-hidden rounded-md",
|
|
2926
2926
|
// 1px hairline border that sits flush with the card chrome — matches
|
|
2927
2927
|
// the messaging design system's "small border around link attachments"
|
|
@@ -2940,7 +2940,7 @@ const lr = {
|
|
|
2940
2940
|
"data-testid": d
|
|
2941
2941
|
}) => {
|
|
2942
2942
|
const m = s != null || a != null, b = y(
|
|
2943
|
-
|
|
2943
|
+
mr,
|
|
2944
2944
|
l ?? (e === "dark" ? "bg-[#121110]" : "bg-white"),
|
|
2945
2945
|
// `focus-ring` is a design-system utility from the component-library
|
|
2946
2946
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
@@ -2988,13 +2988,13 @@ const lr = {
|
|
|
2988
2988
|
]
|
|
2989
2989
|
}
|
|
2990
2990
|
);
|
|
2991
|
-
},
|
|
2991
|
+
}, hr = {
|
|
2992
2992
|
dark: "bg-white/10",
|
|
2993
2993
|
light: "bg-black/5"
|
|
2994
|
-
},
|
|
2994
|
+
}, fr = {
|
|
2995
2995
|
dark: "size-16 text-white/25",
|
|
2996
2996
|
light: "size-16 text-black/25"
|
|
2997
|
-
}, Me = (e, t) => !!t && !!e && ne(e) === "audio",
|
|
2997
|
+
}, Me = (e, t) => !!t && !!e && ne(e) === "audio", hn = (e, t) => {
|
|
2998
2998
|
if (!t || !e) return !1;
|
|
2999
2999
|
const s = ne(e);
|
|
3000
3000
|
return s === "video" || s === "audio";
|
|
@@ -3049,10 +3049,10 @@ const lr = {
|
|
|
3049
3049
|
{
|
|
3050
3050
|
className: y(
|
|
3051
3051
|
"flex h-full w-full items-center justify-center",
|
|
3052
|
-
|
|
3052
|
+
hr[e]
|
|
3053
3053
|
),
|
|
3054
3054
|
children: le(r, {
|
|
3055
|
-
className:
|
|
3055
|
+
className: fr[e],
|
|
3056
3056
|
weight: "regular"
|
|
3057
3057
|
})
|
|
3058
3058
|
}
|
|
@@ -3062,7 +3062,7 @@ const lr = {
|
|
|
3062
3062
|
]
|
|
3063
3063
|
}
|
|
3064
3064
|
);
|
|
3065
|
-
},
|
|
3065
|
+
}, gr = ({
|
|
3066
3066
|
title: e,
|
|
3067
3067
|
placeholderTitle: t,
|
|
3068
3068
|
description: s,
|
|
@@ -3092,7 +3092,7 @@ const lr = {
|
|
|
3092
3092
|
onClick: u,
|
|
3093
3093
|
"aria-label": "Edit attachment",
|
|
3094
3094
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
3095
|
-
children: /* @__PURE__ */ n(
|
|
3095
|
+
children: /* @__PURE__ */ n(Ms, { className: "size-5", weight: "regular" })
|
|
3096
3096
|
}
|
|
3097
3097
|
) : void 0;
|
|
3098
3098
|
return c ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: tt, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
@@ -3139,7 +3139,7 @@ const lr = {
|
|
|
3139
3139
|
]
|
|
3140
3140
|
}
|
|
3141
3141
|
);
|
|
3142
|
-
},
|
|
3142
|
+
}, br = ({
|
|
3143
3143
|
title: e,
|
|
3144
3144
|
description: t,
|
|
3145
3145
|
url: s,
|
|
@@ -3151,7 +3151,7 @@ const lr = {
|
|
|
3151
3151
|
cta: d,
|
|
3152
3152
|
onClick: m
|
|
3153
3153
|
}) => {
|
|
3154
|
-
const b =
|
|
3154
|
+
const b = hn(a, i), u = Qe(s), f = d == null && u != null && !b ? u : void 0, c = d == null && !b ? m : void 0, g = Me(a, i) ? tt : void 0, p = d && m ? {
|
|
3155
3155
|
...d,
|
|
3156
3156
|
onClick: () => {
|
|
3157
3157
|
var v;
|
|
@@ -3192,7 +3192,7 @@ const lr = {
|
|
|
3192
3192
|
]
|
|
3193
3193
|
}
|
|
3194
3194
|
);
|
|
3195
|
-
},
|
|
3195
|
+
}, pr = ({
|
|
3196
3196
|
title: e,
|
|
3197
3197
|
placeholderTitle: t,
|
|
3198
3198
|
description: s,
|
|
@@ -3205,7 +3205,7 @@ const lr = {
|
|
|
3205
3205
|
cta: m,
|
|
3206
3206
|
onClick: b
|
|
3207
3207
|
}) => {
|
|
3208
|
-
const u =
|
|
3208
|
+
const u = hn(r, o), f = Qe(a), c = m == null && f != null && !u ? f : void 0, g = m == null && !u && c != null ? b : void 0;
|
|
3209
3209
|
return /* @__PURE__ */ h(
|
|
3210
3210
|
Se,
|
|
3211
3211
|
{
|
|
@@ -3239,20 +3239,20 @@ const lr = {
|
|
|
3239
3239
|
]
|
|
3240
3240
|
}
|
|
3241
3241
|
);
|
|
3242
|
-
},
|
|
3243
|
-
Composer:
|
|
3244
|
-
Sent:
|
|
3245
|
-
Received:
|
|
3246
|
-
},
|
|
3242
|
+
}, ki = {
|
|
3243
|
+
Composer: gr,
|
|
3244
|
+
Sent: pr,
|
|
3245
|
+
Received: br
|
|
3246
|
+
}, vr = {
|
|
3247
3247
|
dark: "bg-[#121110]",
|
|
3248
3248
|
light: "bg-[#e9eaed]"
|
|
3249
|
-
},
|
|
3249
|
+
}, xr = {
|
|
3250
3250
|
dark: "text-white",
|
|
3251
3251
|
light: "text-[#080707]"
|
|
3252
|
-
},
|
|
3252
|
+
}, wr = {
|
|
3253
3253
|
dark: "border-white/[0.08]",
|
|
3254
3254
|
light: "border-black/[0.08]"
|
|
3255
|
-
},
|
|
3255
|
+
}, _r = (e) => e === "dark" ? "sender" : "receiver", Nr = {
|
|
3256
3256
|
sender: {
|
|
3257
3257
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
3258
3258
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -3274,7 +3274,7 @@ const lr = {
|
|
|
3274
3274
|
children: i,
|
|
3275
3275
|
"data-testid": o
|
|
3276
3276
|
}) => {
|
|
3277
|
-
const l = t != null && t !== "", d =
|
|
3277
|
+
const l = t != null && t !== "", d = Nr[_r(e)][a];
|
|
3278
3278
|
return /* @__PURE__ */ h(
|
|
3279
3279
|
"div",
|
|
3280
3280
|
{
|
|
@@ -3289,10 +3289,10 @@ const lr = {
|
|
|
3289
3289
|
// as the surrounding `CustomMessage` text bubbles.
|
|
3290
3290
|
"relative w-[280px] overflow-hidden px-2 py-2",
|
|
3291
3291
|
d,
|
|
3292
|
+
vr[e],
|
|
3292
3293
|
xr[e],
|
|
3293
|
-
wr[e],
|
|
3294
3294
|
s && "border",
|
|
3295
|
-
s &&
|
|
3295
|
+
s && wr[e],
|
|
3296
3296
|
r
|
|
3297
3297
|
),
|
|
3298
3298
|
children: [
|
|
@@ -3335,16 +3335,16 @@ const lr = {
|
|
|
3335
3335
|
),
|
|
3336
3336
|
children: /* @__PURE__ */ n(Ae, { className: "size-3", weight: "bold" })
|
|
3337
3337
|
}
|
|
3338
|
-
), we = (e) => e === "received" ? "light" : "dark",
|
|
3338
|
+
), we = (e) => e === "received" ? "light" : "dark", Ei = ({
|
|
3339
3339
|
firstOfGroup: e,
|
|
3340
3340
|
endOfGroup: t,
|
|
3341
3341
|
groupedByUser: s
|
|
3342
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
3342
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", yr = ({
|
|
3343
3343
|
src: e,
|
|
3344
3344
|
mimeType: t,
|
|
3345
3345
|
filename: s,
|
|
3346
3346
|
items: a
|
|
3347
|
-
}) => 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: [
|
|
3348
3348
|
/* @__PURE__ */ n(
|
|
3349
3349
|
"audio",
|
|
3350
3350
|
{
|
|
@@ -3367,7 +3367,7 @@ const lr = {
|
|
|
3367
3367
|
preload: l,
|
|
3368
3368
|
onDismiss: d
|
|
3369
3369
|
}) => {
|
|
3370
|
-
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 });
|
|
3371
3371
|
if (u.length === 0)
|
|
3372
3372
|
return null;
|
|
3373
3373
|
const f = l ?? (u.length > 1 ? "none" : "metadata");
|
|
@@ -3379,7 +3379,7 @@ const lr = {
|
|
|
3379
3379
|
groupPosition: o,
|
|
3380
3380
|
"data-testid": "audio-attachment",
|
|
3381
3381
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((c, g) => /* @__PURE__ */ n(
|
|
3382
|
-
|
|
3382
|
+
Cr,
|
|
3383
3383
|
{
|
|
3384
3384
|
item: c,
|
|
3385
3385
|
preload: f,
|
|
@@ -3393,15 +3393,15 @@ const lr = {
|
|
|
3393
3393
|
)) })
|
|
3394
3394
|
}
|
|
3395
3395
|
);
|
|
3396
|
-
},
|
|
3397
|
-
Composer:
|
|
3398
|
-
Sent:
|
|
3399
|
-
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
|
|
3400
3400
|
};
|
|
3401
|
-
function
|
|
3401
|
+
function Tr(e) {
|
|
3402
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`;
|
|
3403
3403
|
}
|
|
3404
|
-
const
|
|
3404
|
+
const Ar = {
|
|
3405
3405
|
pdf: "PDF",
|
|
3406
3406
|
doc: "DOC",
|
|
3407
3407
|
xls: "XLS",
|
|
@@ -3411,7 +3411,7 @@ const Mr = {
|
|
|
3411
3411
|
text: "TXT",
|
|
3412
3412
|
markdown: "MD"
|
|
3413
3413
|
};
|
|
3414
|
-
function
|
|
3414
|
+
function Mr(e, t) {
|
|
3415
3415
|
if (t) {
|
|
3416
3416
|
const r = t.lastIndexOf(".");
|
|
3417
3417
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -3421,7 +3421,7 @@ function Rr(e, t) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
if (!e) return;
|
|
3423
3423
|
if (ne(e) === "document") {
|
|
3424
|
-
const r =
|
|
3424
|
+
const r = Zt(e), i = Ar[r];
|
|
3425
3425
|
if (i) return i;
|
|
3426
3426
|
if (e === "application/octet-stream") return;
|
|
3427
3427
|
}
|
|
@@ -3429,8 +3429,8 @@ function Rr(e, t) {
|
|
|
3429
3429
|
if (!(!a || a === "*"))
|
|
3430
3430
|
return a.toUpperCase();
|
|
3431
3431
|
}
|
|
3432
|
-
function
|
|
3433
|
-
const a =
|
|
3432
|
+
function Rr(e, t, s) {
|
|
3433
|
+
const a = Mr(e, t), r = typeof s == "number" && s > 0 ? Tr(s) : void 0;
|
|
3434
3434
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
3435
3435
|
}
|
|
3436
3436
|
function Z(e) {
|
|
@@ -3441,16 +3441,16 @@ function Z(e) {
|
|
|
3441
3441
|
return "download";
|
|
3442
3442
|
}
|
|
3443
3443
|
}
|
|
3444
|
-
const
|
|
3444
|
+
const Lr = {
|
|
3445
3445
|
dark: "text-white/55",
|
|
3446
3446
|
light: "text-black/65"
|
|
3447
|
-
},
|
|
3447
|
+
}, Dr = {
|
|
3448
3448
|
dark: "bg-white/10",
|
|
3449
3449
|
light: "bg-black/5"
|
|
3450
|
-
},
|
|
3450
|
+
}, Pr = {
|
|
3451
3451
|
dark: "text-white/85",
|
|
3452
3452
|
light: "text-black/85"
|
|
3453
|
-
},
|
|
3453
|
+
}, fn = ({
|
|
3454
3454
|
variant: e,
|
|
3455
3455
|
filename: t,
|
|
3456
3456
|
title: s,
|
|
@@ -3460,16 +3460,16 @@ const Dr = {
|
|
|
3460
3460
|
activateLabel: o,
|
|
3461
3461
|
trailingAction: l
|
|
3462
3462
|
}) => {
|
|
3463
|
-
const d = s ?? t ?? "File", m =
|
|
3463
|
+
const d = s ?? t ?? "File", m = Rr(a, t, r), b = /* @__PURE__ */ n(
|
|
3464
3464
|
"div",
|
|
3465
3465
|
{
|
|
3466
3466
|
className: y(
|
|
3467
3467
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
3468
|
-
|
|
3468
|
+
Dr[e]
|
|
3469
3469
|
),
|
|
3470
3470
|
"aria-hidden": !0,
|
|
3471
3471
|
children: le(a, {
|
|
3472
|
-
className: y("size-6",
|
|
3472
|
+
className: y("size-6", Pr[e]),
|
|
3473
3473
|
weight: "regular"
|
|
3474
3474
|
})
|
|
3475
3475
|
}
|
|
@@ -3480,7 +3480,7 @@ const Dr = {
|
|
|
3480
3480
|
{
|
|
3481
3481
|
className: y(
|
|
3482
3482
|
"truncate text-xs leading-4",
|
|
3483
|
-
|
|
3483
|
+
Lr[e]
|
|
3484
3484
|
),
|
|
3485
3485
|
children: m
|
|
3486
3486
|
}
|
|
@@ -3509,7 +3509,7 @@ const Dr = {
|
|
|
3509
3509
|
l ? /* @__PURE__ */ n("div", { className: "shrink-0", children: l }) : null
|
|
3510
3510
|
] });
|
|
3511
3511
|
};
|
|
3512
|
-
async function
|
|
3512
|
+
async function gn(e, t) {
|
|
3513
3513
|
const s = t ?? Z(e);
|
|
3514
3514
|
try {
|
|
3515
3515
|
const a = await fetch(e, { mode: "cors" });
|
|
@@ -3523,14 +3523,14 @@ async function bn(e, t) {
|
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
3526
|
-
const
|
|
3526
|
+
const Or = ({
|
|
3527
3527
|
src: e,
|
|
3528
3528
|
filename: t,
|
|
3529
3529
|
fileSize: s,
|
|
3530
3530
|
mimeType: a,
|
|
3531
3531
|
title: r,
|
|
3532
3532
|
items: i
|
|
3533
|
-
}) => 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 = ({
|
|
3534
3534
|
variant: e,
|
|
3535
3535
|
item: t,
|
|
3536
3536
|
index: s,
|
|
@@ -3539,7 +3539,7 @@ const zr = ({
|
|
|
3539
3539
|
}) => {
|
|
3540
3540
|
const i = t.filename ?? Z(t.src);
|
|
3541
3541
|
return /* @__PURE__ */ n(
|
|
3542
|
-
|
|
3542
|
+
fn,
|
|
3543
3543
|
{
|
|
3544
3544
|
variant: e,
|
|
3545
3545
|
filename: i,
|
|
@@ -3564,7 +3564,7 @@ const zr = ({
|
|
|
3564
3564
|
onClick: m,
|
|
3565
3565
|
onDismiss: b
|
|
3566
3566
|
}) => {
|
|
3567
|
-
const u = we(e), f = e === "composer" && !!b, c =
|
|
3567
|
+
const u = we(e), f = e === "composer" && !!b, c = Or({
|
|
3568
3568
|
src: t,
|
|
3569
3569
|
filename: s,
|
|
3570
3570
|
fileSize: a,
|
|
@@ -3576,7 +3576,7 @@ const zr = ({
|
|
|
3576
3576
|
const _ = c[v];
|
|
3577
3577
|
if (!_) return;
|
|
3578
3578
|
const x = _.filename ?? Z(_.src);
|
|
3579
|
-
|
|
3579
|
+
gn(_.src, x);
|
|
3580
3580
|
};
|
|
3581
3581
|
if (c.length === 0)
|
|
3582
3582
|
return null;
|
|
@@ -3599,7 +3599,7 @@ const zr = ({
|
|
|
3599
3599
|
groupPosition: d,
|
|
3600
3600
|
"data-testid": "file-attachment",
|
|
3601
3601
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, _) => /* @__PURE__ */ n(
|
|
3602
|
-
|
|
3602
|
+
zr,
|
|
3603
3603
|
{
|
|
3604
3604
|
variant: u,
|
|
3605
3605
|
item: v,
|
|
@@ -3611,10 +3611,10 @@ const zr = ({
|
|
|
3611
3611
|
)) })
|
|
3612
3612
|
}
|
|
3613
3613
|
);
|
|
3614
|
-
},
|
|
3615
|
-
Composer:
|
|
3616
|
-
Sent:
|
|
3617
|
-
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
|
|
3618
3618
|
}, at = ({
|
|
3619
3619
|
onPrev: e,
|
|
3620
3620
|
onNext: t,
|
|
@@ -3628,7 +3628,7 @@ const zr = ({
|
|
|
3628
3628
|
onClick: e,
|
|
3629
3629
|
"aria-label": s,
|
|
3630
3630
|
className: "mes-media-viewer__nav mes-media-viewer__nav--prev",
|
|
3631
|
-
children: /* @__PURE__ */ n(
|
|
3631
|
+
children: /* @__PURE__ */ n(Rs, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3632
3632
|
}
|
|
3633
3633
|
),
|
|
3634
3634
|
/* @__PURE__ */ n(
|
|
@@ -3638,10 +3638,10 @@ const zr = ({
|
|
|
3638
3638
|
onClick: t,
|
|
3639
3639
|
"aria-label": a,
|
|
3640
3640
|
className: "mes-media-viewer__nav mes-media-viewer__nav--next",
|
|
3641
|
-
children: /* @__PURE__ */ n(
|
|
3641
|
+
children: /* @__PURE__ */ n(Ls, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3642
3642
|
}
|
|
3643
3643
|
)
|
|
3644
|
-
] }),
|
|
3644
|
+
] }), bn = ({
|
|
3645
3645
|
url: e,
|
|
3646
3646
|
filename: t,
|
|
3647
3647
|
variant: s = "pill",
|
|
@@ -3652,7 +3652,7 @@ const zr = ({
|
|
|
3652
3652
|
}) => {
|
|
3653
3653
|
const [l, d] = P(!1), m = W(
|
|
3654
3654
|
(c) => {
|
|
3655
|
-
c.stopPropagation(), !l && (d(!0),
|
|
3655
|
+
c.stopPropagation(), !l && (d(!0), gn(e, t).catch(() => {
|
|
3656
3656
|
}).finally(() => {
|
|
3657
3657
|
d(!1), o == null || o();
|
|
3658
3658
|
}));
|
|
@@ -3841,7 +3841,7 @@ const zr = ({
|
|
|
3841
3841
|
]
|
|
3842
3842
|
}
|
|
3843
3843
|
);
|
|
3844
|
-
},
|
|
3844
|
+
}, pn = ({
|
|
3845
3845
|
open: e,
|
|
3846
3846
|
items: t,
|
|
3847
3847
|
initialIndex: s = 0,
|
|
@@ -3863,7 +3863,7 @@ const zr = ({
|
|
|
3863
3863
|
ariaLabel: d,
|
|
3864
3864
|
counter: t.length > 1 ? `${r + 1} / ${t.length}` : void 0,
|
|
3865
3865
|
actions: /* @__PURE__ */ n(
|
|
3866
|
-
|
|
3866
|
+
bn,
|
|
3867
3867
|
{
|
|
3868
3868
|
url: l.src,
|
|
3869
3869
|
filename: d,
|
|
@@ -3897,7 +3897,7 @@ const zr = ({
|
|
|
3897
3897
|
]
|
|
3898
3898
|
}
|
|
3899
3899
|
) : null;
|
|
3900
|
-
},
|
|
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 = ({
|
|
3901
3901
|
tiles: e,
|
|
3902
3902
|
onTileActivate: t,
|
|
3903
3903
|
maxVisible: s = 4,
|
|
@@ -3906,7 +3906,7 @@ const zr = ({
|
|
|
3906
3906
|
const r = e.length;
|
|
3907
3907
|
if (r === 0) return null;
|
|
3908
3908
|
const i = e.slice(0, Math.min(r, s)), o = r - i.length, l = (d, m, b) => {
|
|
3909
|
-
const u = y(
|
|
3909
|
+
const u = y(jr, "h-full w-full");
|
|
3910
3910
|
return t ? /* @__PURE__ */ h(
|
|
3911
3911
|
"button",
|
|
3912
3912
|
{
|
|
@@ -3975,7 +3975,7 @@ const zr = ({
|
|
|
3975
3975
|
[e]
|
|
3976
3976
|
), o = W(() => s(!1), []);
|
|
3977
3977
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3978
|
-
},
|
|
3978
|
+
}, Vr = (e, t, s, a) => ({
|
|
3979
3979
|
ariaLabel: `Open image ${t + 1} of ${s}`,
|
|
3980
3980
|
content: /* @__PURE__ */ n(
|
|
3981
3981
|
"img",
|
|
@@ -3990,15 +3990,15 @@ const zr = ({
|
|
|
3990
3990
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
3991
3991
|
}
|
|
3992
3992
|
)
|
|
3993
|
-
}),
|
|
3993
|
+
}), Gr = ({
|
|
3994
3994
|
src: e,
|
|
3995
3995
|
alt: t,
|
|
3996
3996
|
items: s
|
|
3997
|
-
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [],
|
|
3997
|
+
}) => s && s.length > 0 ? s : e ? [{ src: e, alt: t }] : [], xn = (e, t) => e.map((s, a) => ({
|
|
3998
3998
|
src: s.src,
|
|
3999
3999
|
alt: s.alt,
|
|
4000
4000
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4001
|
-
})),
|
|
4001
|
+
})), Hr = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
4002
4002
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: m } = _e(
|
|
4003
4003
|
r
|
|
4004
4004
|
);
|
|
@@ -4025,16 +4025,16 @@ const zr = ({
|
|
|
4025
4025
|
),
|
|
4026
4026
|
i ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: i }) }) : null,
|
|
4027
4027
|
/* @__PURE__ */ n(
|
|
4028
|
-
|
|
4028
|
+
pn,
|
|
4029
4029
|
{
|
|
4030
4030
|
open: o,
|
|
4031
|
-
items:
|
|
4031
|
+
items: xn([{ src: e, alt: t }], s),
|
|
4032
4032
|
initialIndex: l,
|
|
4033
4033
|
onClose: m
|
|
4034
4034
|
}
|
|
4035
4035
|
)
|
|
4036
4036
|
] });
|
|
4037
|
-
},
|
|
4037
|
+
}, wn = ({
|
|
4038
4038
|
state: e,
|
|
4039
4039
|
src: t,
|
|
4040
4040
|
alt: s,
|
|
@@ -4045,13 +4045,13 @@ const zr = ({
|
|
|
4045
4045
|
loading: l = "lazy",
|
|
4046
4046
|
onClick: d
|
|
4047
4047
|
}) => {
|
|
4048
|
-
const m =
|
|
4048
|
+
const m = Gr({ src: t, alt: s, items: r }), b = we(e), { viewerOpen: u, viewerIndex: f, handleActivate: c, closeViewer: g } = _e(
|
|
4049
4049
|
d
|
|
4050
4050
|
);
|
|
4051
4051
|
if (m.length === 0)
|
|
4052
4052
|
return null;
|
|
4053
4053
|
const p = m.map(
|
|
4054
|
-
(v, _) =>
|
|
4054
|
+
(v, _) => Vr(v, _, m.length, l)
|
|
4055
4055
|
);
|
|
4056
4056
|
return /* @__PURE__ */ h(
|
|
4057
4057
|
ve,
|
|
@@ -4061,12 +4061,12 @@ const zr = ({
|
|
|
4061
4061
|
groupPosition: o,
|
|
4062
4062
|
"data-testid": "image-attachment",
|
|
4063
4063
|
children: [
|
|
4064
|
-
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4064
|
+
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(vn, { tiles: p, onTileActivate: c }) }),
|
|
4065
4065
|
/* @__PURE__ */ n(
|
|
4066
|
-
|
|
4066
|
+
pn,
|
|
4067
4067
|
{
|
|
4068
4068
|
open: u,
|
|
4069
|
-
items:
|
|
4069
|
+
items: xn(m, a),
|
|
4070
4070
|
initialIndex: f,
|
|
4071
4071
|
onClose: g
|
|
4072
4072
|
}
|
|
@@ -4074,11 +4074,11 @@ const zr = ({
|
|
|
4074
4074
|
]
|
|
4075
4075
|
}
|
|
4076
4076
|
);
|
|
4077
|
-
},
|
|
4078
|
-
Composer:
|
|
4079
|
-
Sent:
|
|
4080
|
-
Received:
|
|
4081
|
-
},
|
|
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 = ({
|
|
4082
4082
|
open: e,
|
|
4083
4083
|
items: t,
|
|
4084
4084
|
initialIndex: s = 0,
|
|
@@ -4092,7 +4092,7 @@ const zr = ({
|
|
|
4092
4092
|
() => (l == null ? void 0 : l.filename) ?? (l ? Z(l.src) : "document"),
|
|
4093
4093
|
[l]
|
|
4094
4094
|
), m = ee(
|
|
4095
|
-
() => l ?
|
|
4095
|
+
() => l ? Jr(l.src) : void 0,
|
|
4096
4096
|
[l]
|
|
4097
4097
|
);
|
|
4098
4098
|
return !l || !m ? null : /* @__PURE__ */ h(
|
|
@@ -4126,16 +4126,16 @@ const zr = ({
|
|
|
4126
4126
|
]
|
|
4127
4127
|
}
|
|
4128
4128
|
);
|
|
4129
|
-
},
|
|
4129
|
+
}, Jr = (e) => {
|
|
4130
4130
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
4131
4131
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
4132
|
-
},
|
|
4132
|
+
}, Zr = ({
|
|
4133
4133
|
src: e,
|
|
4134
4134
|
filename: t,
|
|
4135
4135
|
fileSize: s,
|
|
4136
4136
|
title: a,
|
|
4137
4137
|
items: r
|
|
4138
|
-
}) => 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 = ({
|
|
4139
4139
|
variant: e,
|
|
4140
4140
|
item: t,
|
|
4141
4141
|
index: s,
|
|
@@ -4144,7 +4144,7 @@ const zr = ({
|
|
|
4144
4144
|
}) => {
|
|
4145
4145
|
const i = t.filename ?? Z(t.src);
|
|
4146
4146
|
return /* @__PURE__ */ n(
|
|
4147
|
-
|
|
4147
|
+
fn,
|
|
4148
4148
|
{
|
|
4149
4149
|
variant: e,
|
|
4150
4150
|
filename: i,
|
|
@@ -4168,7 +4168,7 @@ const zr = ({
|
|
|
4168
4168
|
onClick: d,
|
|
4169
4169
|
onDismiss: m
|
|
4170
4170
|
}) => {
|
|
4171
|
-
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(
|
|
4172
4172
|
d
|
|
4173
4173
|
), v = e === "composer" && !!m;
|
|
4174
4174
|
if (u.length === 0)
|
|
@@ -4187,7 +4187,7 @@ const zr = ({
|
|
|
4187
4187
|
children: [
|
|
4188
4188
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: u.map((x, S) => {
|
|
4189
4189
|
const E = x.filename ?? Z(x.src), M = v && S === 0 ? /* @__PURE__ */ n(xe, { onClick: m, variant: "inline" }) : e === "composer" ? void 0 : /* @__PURE__ */ n(
|
|
4190
|
-
|
|
4190
|
+
bn,
|
|
4191
4191
|
{
|
|
4192
4192
|
url: x.src,
|
|
4193
4193
|
filename: E,
|
|
@@ -4197,7 +4197,7 @@ const zr = ({
|
|
|
4197
4197
|
}
|
|
4198
4198
|
);
|
|
4199
4199
|
return /* @__PURE__ */ n(
|
|
4200
|
-
|
|
4200
|
+
Qr,
|
|
4201
4201
|
{
|
|
4202
4202
|
variant: b,
|
|
4203
4203
|
item: x,
|
|
@@ -4209,7 +4209,7 @@ const zr = ({
|
|
|
4209
4209
|
);
|
|
4210
4210
|
}) }),
|
|
4211
4211
|
/* @__PURE__ */ n(
|
|
4212
|
-
|
|
4212
|
+
Kr,
|
|
4213
4213
|
{
|
|
4214
4214
|
open: f,
|
|
4215
4215
|
items: _,
|
|
@@ -4220,11 +4220,11 @@ const zr = ({
|
|
|
4220
4220
|
]
|
|
4221
4221
|
}
|
|
4222
4222
|
);
|
|
4223
|
-
},
|
|
4224
|
-
Composer:
|
|
4225
|
-
Sent:
|
|
4226
|
-
Received:
|
|
4227
|
-
},
|
|
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
|
|
4227
|
+
}, _n = ({
|
|
4228
4228
|
open: e,
|
|
4229
4229
|
items: t,
|
|
4230
4230
|
initialIndex: s = 0,
|
|
@@ -4274,7 +4274,7 @@ const zr = ({
|
|
|
4274
4274
|
]
|
|
4275
4275
|
}
|
|
4276
4276
|
) : null;
|
|
4277
|
-
},
|
|
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 = ({
|
|
4278
4278
|
item: e,
|
|
4279
4279
|
index: t
|
|
4280
4280
|
}) => /* @__PURE__ */ h("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -4289,30 +4289,30 @@ const zr = ({
|
|
|
4289
4289
|
className: "absolute inset-0 size-full rounded-md object-cover"
|
|
4290
4290
|
}
|
|
4291
4291
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
4292
|
-
|
|
4292
|
+
Gt,
|
|
4293
4293
|
{
|
|
4294
4294
|
className: "size-16 rounded-md text-white/30",
|
|
4295
4295
|
weight: "regular",
|
|
4296
4296
|
"aria-hidden": !0
|
|
4297
4297
|
}
|
|
4298
4298
|
) }),
|
|
4299
|
-
/* @__PURE__ */ n(
|
|
4300
|
-
] }),
|
|
4299
|
+
/* @__PURE__ */ n(ai, {})
|
|
4300
|
+
] }), ri = (e, t, s) => ({
|
|
4301
4301
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
4302
|
-
content: /* @__PURE__ */ n(
|
|
4303
|
-
}),
|
|
4302
|
+
content: /* @__PURE__ */ n(Nn, { item: e, index: t })
|
|
4303
|
+
}), ii = ({
|
|
4304
4304
|
src: e,
|
|
4305
4305
|
poster: t,
|
|
4306
4306
|
mimeType: s,
|
|
4307
4307
|
preload: a,
|
|
4308
4308
|
items: r
|
|
4309
|
-
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [],
|
|
4309
|
+
}) => r && r.length > 0 ? a ? r.map((i) => ({ ...i, preload: i.preload ?? a })) : r : e ? [{ src: e, poster: t, mimeType: s, preload: a }] : [], yn = (e, t) => e.map((s, a) => ({
|
|
4310
4310
|
src: s.src,
|
|
4311
4311
|
poster: s.poster,
|
|
4312
4312
|
mimeType: s.mimeType,
|
|
4313
4313
|
preload: s.preload,
|
|
4314
4314
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
4315
|
-
})),
|
|
4315
|
+
})), oi = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
4316
4316
|
const { viewerOpen: l, viewerIndex: d, handleActivate: m, closeViewer: b } = _e(
|
|
4317
4317
|
i
|
|
4318
4318
|
);
|
|
@@ -4324,15 +4324,15 @@ const zr = ({
|
|
|
4324
4324
|
onClick: () => m(0),
|
|
4325
4325
|
"aria-label": "Play video",
|
|
4326
4326
|
className: "relative block size-[280px] cursor-pointer overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-black/40",
|
|
4327
|
-
children: /* @__PURE__ */ n(
|
|
4327
|
+
children: /* @__PURE__ */ n(Nn, { item: { src: e, poster: t, mimeType: s }, index: 0 })
|
|
4328
4328
|
}
|
|
4329
4329
|
),
|
|
4330
4330
|
o ? /* @__PURE__ */ n("div", { className: "absolute right-2 top-2 z-10", children: /* @__PURE__ */ n(xe, { onClick: o }) }) : null,
|
|
4331
4331
|
/* @__PURE__ */ n(
|
|
4332
|
-
|
|
4332
|
+
_n,
|
|
4333
4333
|
{
|
|
4334
4334
|
open: l,
|
|
4335
|
-
items:
|
|
4335
|
+
items: yn(
|
|
4336
4336
|
[{ src: e, poster: t, mimeType: s, preload: r }],
|
|
4337
4337
|
a
|
|
4338
4338
|
),
|
|
@@ -4341,7 +4341,7 @@ const zr = ({
|
|
|
4341
4341
|
}
|
|
4342
4342
|
)
|
|
4343
4343
|
] });
|
|
4344
|
-
},
|
|
4344
|
+
}, Cn = ({
|
|
4345
4345
|
state: e,
|
|
4346
4346
|
src: t,
|
|
4347
4347
|
poster: s,
|
|
@@ -4353,13 +4353,13 @@ const zr = ({
|
|
|
4353
4353
|
preload: d,
|
|
4354
4354
|
onClick: m
|
|
4355
4355
|
}) => {
|
|
4356
|
-
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(
|
|
4357
4357
|
m
|
|
4358
4358
|
);
|
|
4359
4359
|
if (b.length === 0)
|
|
4360
4360
|
return null;
|
|
4361
4361
|
const v = b.map(
|
|
4362
|
-
(_, x) =>
|
|
4362
|
+
(_, x) => ri(_, x, b.length)
|
|
4363
4363
|
);
|
|
4364
4364
|
return /* @__PURE__ */ h(
|
|
4365
4365
|
ve,
|
|
@@ -4370,7 +4370,7 @@ const zr = ({
|
|
|
4370
4370
|
"data-testid": "video-attachment",
|
|
4371
4371
|
children: [
|
|
4372
4372
|
/* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
|
|
4373
|
-
|
|
4373
|
+
vn,
|
|
4374
4374
|
{
|
|
4375
4375
|
tiles: v,
|
|
4376
4376
|
onTileActivate: g,
|
|
@@ -4378,10 +4378,10 @@ const zr = ({
|
|
|
4378
4378
|
}
|
|
4379
4379
|
) }),
|
|
4380
4380
|
/* @__PURE__ */ n(
|
|
4381
|
-
|
|
4381
|
+
_n,
|
|
4382
4382
|
{
|
|
4383
4383
|
open: f,
|
|
4384
|
-
items:
|
|
4384
|
+
items: yn(b, r),
|
|
4385
4385
|
initialIndex: c,
|
|
4386
4386
|
onClose: p
|
|
4387
4387
|
}
|
|
@@ -4389,17 +4389,17 @@ const zr = ({
|
|
|
4389
4389
|
]
|
|
4390
4390
|
}
|
|
4391
4391
|
);
|
|
4392
|
-
},
|
|
4393
|
-
Composer:
|
|
4394
|
-
Sent:
|
|
4395
|
-
Received:
|
|
4396
|
-
},
|
|
4397
|
-
Image:
|
|
4398
|
-
Video:
|
|
4399
|
-
Audio:
|
|
4400
|
-
Pdf:
|
|
4401
|
-
File:
|
|
4402
|
-
},
|
|
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 = ({
|
|
4403
4403
|
question: e,
|
|
4404
4404
|
onClick: t,
|
|
4405
4405
|
loading: s = !1,
|
|
@@ -4421,7 +4421,7 @@ const zr = ({
|
|
|
4421
4421
|
),
|
|
4422
4422
|
children: e
|
|
4423
4423
|
}
|
|
4424
|
-
),
|
|
4424
|
+
), Ii = ({
|
|
4425
4425
|
faqs: e,
|
|
4426
4426
|
onFaqClick: t,
|
|
4427
4427
|
loadingFaqId: s,
|
|
@@ -4450,7 +4450,7 @@ const zr = ({
|
|
|
4450
4450
|
children: [
|
|
4451
4451
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
4452
4452
|
l.map((d) => /* @__PURE__ */ n(
|
|
4453
|
-
|
|
4453
|
+
mi,
|
|
4454
4454
|
{
|
|
4455
4455
|
question: d.question,
|
|
4456
4456
|
onClick: () => t(d.id),
|
|
@@ -4463,71 +4463,39 @@ const zr = ({
|
|
|
4463
4463
|
)
|
|
4464
4464
|
] }) });
|
|
4465
4465
|
};
|
|
4466
|
-
function fi(e) {
|
|
4467
|
-
const t = e, s = [t.og_scrape_url, t.title_link].find(
|
|
4468
|
-
(a) => typeof a == "string"
|
|
4469
|
-
);
|
|
4470
|
-
return s && s.trim() !== "" ? s : void 0;
|
|
4471
|
-
}
|
|
4472
|
-
function Mi(e, t) {
|
|
4473
|
-
const s = e, a = s.image_url ?? s.thumb_url, r = (t != null && t.resolveThumbnailUrl ? t.resolveThumbnailUrl(a) : a) || void 0;
|
|
4474
|
-
return {
|
|
4475
|
-
title: s.title,
|
|
4476
|
-
description: s.text,
|
|
4477
|
-
url: fi(e),
|
|
4478
|
-
thumbnailUrl: r,
|
|
4479
|
-
mimeType: s.mime_type,
|
|
4480
|
-
layout: r ? "featured" : "classic"
|
|
4481
|
-
};
|
|
4482
|
-
}
|
|
4483
|
-
function Ut(e) {
|
|
4484
|
-
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
4485
|
-
}
|
|
4486
|
-
function Ri(e, t) {
|
|
4487
|
-
if (!(e != null && e.trim()) || !(t != null && t.trim())) return !1;
|
|
4488
|
-
const s = Ut(e), a = Ut(t);
|
|
4489
|
-
if (s === a) return !0;
|
|
4490
|
-
if (!s.includes(a)) return !1;
|
|
4491
|
-
const r = s.split(a).join("");
|
|
4492
|
-
return !/[\p{L}\p{N}]/u.test(r);
|
|
4493
|
-
}
|
|
4494
4466
|
export {
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
Hs as H,
|
|
4503
|
-
Os as I,
|
|
4504
|
-
Si as L,
|
|
4505
|
-
Ci as M,
|
|
4467
|
+
Qt as A,
|
|
4468
|
+
Gs as B,
|
|
4469
|
+
Wa as C,
|
|
4470
|
+
Ps as D,
|
|
4471
|
+
Ii as F,
|
|
4472
|
+
ki as L,
|
|
4473
|
+
Ni as M,
|
|
4506
4474
|
he as a,
|
|
4507
4475
|
ae as b,
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4476
|
+
ar as c,
|
|
4477
|
+
dn as d,
|
|
4478
|
+
yi as e,
|
|
4479
|
+
mi as f,
|
|
4512
4480
|
ne as g,
|
|
4513
4481
|
Ot as h,
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
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,
|
|
4490
|
+
Xt as q,
|
|
4523
4491
|
le as r,
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4492
|
+
nn as s,
|
|
4493
|
+
zs as t,
|
|
4494
|
+
Ei as u,
|
|
4495
|
+
Hs as v,
|
|
4496
|
+
Je as w,
|
|
4497
|
+
Ze as x,
|
|
4498
|
+
Wt as y,
|
|
4499
|
+
pa as z
|
|
4532
4500
|
};
|
|
4533
|
-
//# sourceMappingURL=index-
|
|
4501
|
+
//# sourceMappingURL=index-DGVCJzwy.js.map
|