@linktr.ee/messaging-react 4.0.5 → 4.0.6-rc-1786770596
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-Be81K6su.cjs +2 -0
- package/dist/{Card-415OfRhw.cjs.map → Card-Be81K6su.cjs.map} +1 -1
- package/dist/{Card-DaJtDL7m.js → Card-BzvDr-pU.js} +2 -2
- package/dist/{Card-DaJtDL7m.js.map → Card-BzvDr-pU.js.map} +1 -1
- package/dist/{Card-ywEqVYy5.js → Card-CBj04-pC.js} +3 -3
- package/dist/Card-CBj04-pC.js.map +1 -0
- package/dist/Card-_TP7bDao.cjs +2 -0
- package/dist/Card-_TP7bDao.cjs.map +1 -0
- package/dist/PurchaseStatusBadge-BmqAQEV9.cjs +2 -0
- package/dist/PurchaseStatusBadge-BmqAQEV9.cjs.map +1 -0
- package/dist/{LoadingDots-Ct3WmVlT.js → PurchaseStatusBadge-D1RRsubZ.js} +30 -30
- package/dist/PurchaseStatusBadge-D1RRsubZ.js.map +1 -0
- package/dist/index-BjkDB6yi.cjs +3 -0
- package/dist/index-BjkDB6yi.cjs.map +1 -0
- package/dist/{index-qmB9uCbU.js → index-DXlI1QQw.js} +629 -632
- package/dist/index-DXlI1QQw.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/src/components/AttachmentCard/index.tsx +1 -3
- package/src/components/AttachmentCard/utils/icons.ts +2 -2
- package/src/components/ChannelActionsMenu/index.tsx +0 -2
- package/src/components/CustomMessage/LockedAttachment/components/_shared/LockBadge.tsx +0 -2
- package/src/components/CustomMessage/LockedAttachment/index.tsx +0 -1
- package/src/components/CustomMessage/MessageTag.tsx +3 -3
- package/src/components/CustomMessage/StreamAttachmentMessage.tsx +5 -9
- package/src/components/CustomSystemMessage/index.tsx +1 -1
- package/src/components/LinkAttachment/components/_shared/CardThumbnail.tsx +3 -10
- package/src/components/MediaMessage/index.tsx +1 -1
- package/src/components/MessageAttachment/_shared/triggerDownload.ts +0 -2
- package/src/components/MessageAttachment/_shared/useCarousel.ts +0 -2
- package/src/components/MessageAttachment/_shared/useViewer.ts +0 -2
- package/src/components/MessageAttachment/stories/StoryTable.tsx +1 -1
- package/src/stories/mocks.tsx +0 -28
- package/src/testing/createMockMessagingClient.ts +4 -8
- package/src/testing/createMockStreamChatClient.ts +7 -2
- package/src/testing/index.ts +1 -1
- package/dist/Card-415OfRhw.cjs +0 -2
- package/dist/Card-AOwlWMKb.cjs +0 -2
- package/dist/Card-AOwlWMKb.cjs.map +0 -1
- package/dist/Card-ywEqVYy5.js.map +0 -1
- package/dist/LoadingDots-Ct3WmVlT.js.map +0 -1
- package/dist/LoadingDots-D9GGphgM.cjs +0 -2
- package/dist/LoadingDots-D9GGphgM.cjs.map +0 -1
- package/dist/index-C_RafNmD.cjs +0 -3
- package/dist/index-C_RafNmD.cjs.map +0 -1
- package/dist/index-qmB9uCbU.js.map +0 -1
- package/src/components/LinkAttachment/components/Composer/index.ts +0 -2
- package/src/components/LinkAttachment/components/Received/index.ts +0 -2
- package/src/components/LinkAttachment/components/Sent/index.ts +0 -2
- package/src/components/MessageBubble/components/Received/index.ts +0 -1
- package/src/components/MessageBubble/components/Sent/index.ts +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as n, jsxs as f, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import z, { createContext as je, useContext as ve, useCallback as Z, useState as B, useRef as j, useEffect as Y, useId as
|
|
3
|
-
import { StreamChatService as
|
|
4
|
-
import { StreamChat as
|
|
5
|
-
import { Chat as
|
|
2
|
+
import z, { createContext as je, useContext as ve, useCallback as Z, useState as B, useRef as j, useEffect as Y, useId as ss, Suspense as as, useMemo as le } from "react";
|
|
3
|
+
import { StreamChatService as rs } from "@linktr.ee/messaging-core";
|
|
4
|
+
import { StreamChat as is, LinkPreviewsManager as nt } from "stream-chat";
|
|
5
|
+
import { Chat as ls, useChannelStateContext as xe, useChatContext as He, DateSeparator as os, useMessageContext as he, MessageStatus as cs, MessageErrorIcon as st, MessageText as ze, areMessageUIPropsEqual as ds, useMessageReminder as us, useComponentContext as un, Attachment as ms, EditMessageModal as hs, MessageBlocked as fs, MessageBouncePrompt as gs, MessageDeleted as ps, MessageIsThreadReplyInChannelButtonIndicator as bs, MessageRepliesCountButton as vs, ReminderNotification as xs, StreamedMessageText as ws, messageHasAttachments as _s, messageHasReactions as ys, isDateSeparatorMessage as Ns, isMessageBlocked as ks, isMessageBounced as Cs, MessageBounceModal as Ss, Poll as Es, useMessageComposer as Is, useStateStore as Ts, MessageInput as Vt, useMessageInputContext as As, useMessageComposerHasSendableData as Rs, AttachmentPreviewList as Ls, QuotedMessagePreview as Ms, TextareaComposer as Ds, MessageTimestamp as Xe, AIStates as qe, useTypingContext as Os, useAIState as Ps, Channel as zs, WithComponents as Fs, Window as $s, MessageList as Gt, ChannelList as Bs, InfiniteScroll as Us } from "stream-chat-react";
|
|
6
6
|
import k from "classnames";
|
|
7
|
-
import { StarIcon as
|
|
8
|
-
import { isOfficialChannel as
|
|
9
|
-
import { MessageActions as
|
|
10
|
-
const
|
|
7
|
+
import { StarIcon as at, DotsThreeIcon as js, SpinnerGapIcon as Oe, SignOutIcon as Hs, ProhibitInsetIcon as Yt, FlagIcon as mn, CurrencyDollarIcon as Vs, CaretRightIcon as hn, ArrowLeftIcon as Gs, FileIcon as fn, ImageIcon as Ys, SpeakerHighIcon as Ws, VideoCameraIcon as gn, FileMdIcon as Xs, FileTextIcon as qs, FileZipIcon as Ks, FilePptIcon as Zs, FileCsvIcon as Js, FileXlsIcon as Qs, FileDocIcon as ea, FilePdfIcon as ta, CircleNotchIcon as pe, PlayIcon as rt, PauseIcon as na, LinkIcon as sa, DownloadSimpleIcon as Ce, GiftIcon as aa, WarningCircleIcon as ra, MegaphoneIcon as ia, ChecksIcon as la, XIcon as lt, PencilSimpleIcon as oa, CaretLeftIcon as ca, TrashSimpleIcon as da, ArrowUpIcon as ua, SparkleIcon as ma, ProhibitIcon as ha } from "@phosphor-icons/react";
|
|
8
|
+
import { isOfficialChannel as fa, OFFICIAL_SENDER_USER_ID as ga, MESSAGE_CUSTOM_TYPE as oe, isDmAgentSystemType as Wt, isAgeSafetySystemType as pa, resolveRichCardImagePresentation as ba, selectEnabledFaqs as va } from "@linktr.ee/messaging-taxonomy";
|
|
9
|
+
import { MessageActions as xa, DefaultDropdownActionButton as pn } from "stream-chat-react/experimental";
|
|
10
|
+
const bn = je({
|
|
11
11
|
service: null,
|
|
12
12
|
client: null,
|
|
13
13
|
isConnected: !1,
|
|
@@ -17,7 +17,7 @@ const pn = je({
|
|
|
17
17
|
refreshConnection: async () => {
|
|
18
18
|
},
|
|
19
19
|
debug: !1
|
|
20
|
-
}),
|
|
20
|
+
}), ot = () => ve(bn), Ql = ({
|
|
21
21
|
children: e,
|
|
22
22
|
user: t,
|
|
23
23
|
serviceConfig: s,
|
|
@@ -65,7 +65,7 @@ const pn = je({
|
|
|
65
65
|
capabilities: r
|
|
66
66
|
};
|
|
67
67
|
const $ = j(null);
|
|
68
|
-
!o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new
|
|
68
|
+
!o && a && ((S = $.current) == null ? void 0 : S.apiKey) !== a && ($.current = { apiKey: a, client: new is(a) });
|
|
69
69
|
const F = o || (a ? ((C = $.current) == null ? void 0 : C.client) ?? null : null);
|
|
70
70
|
Y(() => {
|
|
71
71
|
const A = E.current, P = _.current;
|
|
@@ -84,7 +84,7 @@ const pn = je({
|
|
|
84
84
|
renderCount: A,
|
|
85
85
|
apiKey: (a == null ? void 0 : a.substring(0, 8)) + "..."
|
|
86
86
|
});
|
|
87
|
-
const U = new
|
|
87
|
+
const U = new rs({
|
|
88
88
|
...P,
|
|
89
89
|
apiKey: a,
|
|
90
90
|
debug: T.current,
|
|
@@ -215,8 +215,8 @@ const pn = je({
|
|
|
215
215
|
renderCount: E.current,
|
|
216
216
|
willRenderChat: !!F,
|
|
217
217
|
contextValueReady: !!M
|
|
218
|
-
}), /* @__PURE__ */ n(
|
|
219
|
-
|
|
218
|
+
}), /* @__PURE__ */ n(bn.Provider, { value: M, children: F ? /* @__PURE__ */ n(
|
|
219
|
+
ls,
|
|
220
220
|
{
|
|
221
221
|
client: F,
|
|
222
222
|
customClasses: {
|
|
@@ -225,7 +225,7 @@ const pn = je({
|
|
|
225
225
|
children: e
|
|
226
226
|
}
|
|
227
227
|
) : e });
|
|
228
|
-
},
|
|
228
|
+
}, wa = () => ot(), vn = (e) => {
|
|
229
229
|
var a, r;
|
|
230
230
|
const [t, s] = B(
|
|
231
231
|
!!((r = (a = e == null ? void 0 : e.state) == null ? void 0 : a.membership) != null && r.pinned_at)
|
|
@@ -248,13 +248,13 @@ const pn = je({
|
|
|
248
248
|
};
|
|
249
249
|
}, [e]), t;
|
|
250
250
|
};
|
|
251
|
-
function
|
|
251
|
+
function xn(e, t, s) {
|
|
252
252
|
const a = Object.values(e || {});
|
|
253
|
-
if (
|
|
253
|
+
if (fa(s)) {
|
|
254
254
|
const r = a.find(
|
|
255
255
|
(i) => {
|
|
256
256
|
var o;
|
|
257
|
-
return ((o = i.user) == null ? void 0 : o.id) ===
|
|
257
|
+
return ((o = i.user) == null ? void 0 : o.id) === ga;
|
|
258
258
|
}
|
|
259
259
|
);
|
|
260
260
|
if (r) return r;
|
|
@@ -266,18 +266,18 @@ function vn(e, t, s) {
|
|
|
266
266
|
}
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
const
|
|
270
|
-
function
|
|
271
|
-
return
|
|
269
|
+
const _a = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
270
|
+
function ya(e) {
|
|
271
|
+
return _a.test(e.trim());
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Xt(e, t) {
|
|
274
274
|
const s = e == null ? void 0 : e.trim();
|
|
275
|
-
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !
|
|
275
|
+
return !s || t && s === t || t && s === `Follower ${t}` ? !1 : !ya(s);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function wn(e) {
|
|
278
|
+
return Xt(e == null ? void 0 : e.name, e == null ? void 0 : e.id) ? e.name.trim() : Xt(e == null ? void 0 : e.username, e == null ? void 0 : e.id) ? e.username.trim() : "Unknown member";
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const qt = [
|
|
281
281
|
{ emoji: "🍎", bgColor: "#FFD1DD" },
|
|
282
282
|
// Apple
|
|
283
283
|
{ emoji: "🍌", bgColor: "#FFF1C9" },
|
|
@@ -305,7 +305,7 @@ const Xt = [
|
|
|
305
305
|
{ emoji: "🍈", bgColor: "#D9F7E1" }
|
|
306
306
|
// Melon
|
|
307
307
|
];
|
|
308
|
-
function
|
|
308
|
+
function Na(e) {
|
|
309
309
|
let t = 0;
|
|
310
310
|
for (let s = 0; s < e.length; s++) {
|
|
311
311
|
const a = e.charCodeAt(s);
|
|
@@ -313,14 +313,14 @@ function ka(e) {
|
|
|
313
313
|
}
|
|
314
314
|
return Math.abs(t);
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
return
|
|
316
|
+
function _n(e) {
|
|
317
|
+
return qt[Na(e) % qt.length];
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
return
|
|
319
|
+
function ka(e) {
|
|
320
|
+
return _n(e).emoji;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
return
|
|
322
|
+
function Ca(e) {
|
|
323
|
+
return _n(e).bgColor;
|
|
324
324
|
}
|
|
325
325
|
const we = ({
|
|
326
326
|
id: e,
|
|
@@ -331,7 +331,7 @@ const we = ({
|
|
|
331
331
|
shape: i = "squircle",
|
|
332
332
|
dmAgentEnabled: o = !1
|
|
333
333
|
}) => {
|
|
334
|
-
const l =
|
|
334
|
+
const l = ka(e), d = Ca(e), u = 0.45, m = s < 32 ? Math.round(s * u) : s < 56 ? 14 : s < 120 ? 18 : 36, g = s >= 40 ? 2 : 1, c = i === "circle" ? { borderRadius: "50%" } : { borderRadius: "1rem" }, p = /* @__PURE__ */ n("div", { className: "h-full w-full overflow-hidden", style: c, children: t ? /* @__PURE__ */ n("img", { src: t, alt: "", className: "h-full w-full object-cover" }) : /* @__PURE__ */ n(
|
|
335
335
|
"div",
|
|
336
336
|
{
|
|
337
337
|
"aria-hidden": "true",
|
|
@@ -359,7 +359,7 @@ const we = ({
|
|
|
359
359
|
{
|
|
360
360
|
"aria-hidden": "true",
|
|
361
361
|
className: "absolute -left-1.5 -top-1.5 z-10 flex size-5 items-center justify-center rounded-full bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]",
|
|
362
|
-
children: /* @__PURE__ */ n(
|
|
362
|
+
children: /* @__PURE__ */ n(at, { className: "size-3 text-yellow-600", weight: "duotone" })
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
365
|
/* @__PURE__ */ n(
|
|
@@ -382,7 +382,7 @@ const we = ({
|
|
|
382
382
|
]
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
|
-
},
|
|
385
|
+
}, Sa = "https://linktr.ee/s/about/trust-center/report", Ea = ({
|
|
386
386
|
channel: e,
|
|
387
387
|
participant: t,
|
|
388
388
|
showBlockParticipant: s = !0,
|
|
@@ -396,7 +396,7 @@ const we = ({
|
|
|
396
396
|
logLabel: h = "useChannelModerationActions"
|
|
397
397
|
}) => {
|
|
398
398
|
var M;
|
|
399
|
-
const { service: m, debug: g } =
|
|
399
|
+
const { service: m, debug: g } = ot(), c = (M = t == null ? void 0 : t.user) == null ? void 0 : M.id, p = !!(a && s && m && c), [w, v] = B(!1), [x, b] = B(null), [N, _] = B(!1), [T, L] = B(!1), E = p && ((x == null ? void 0 : x.participantId) !== c || (x == null ? void 0 : x.service) !== m);
|
|
400
400
|
return Y(() => {
|
|
401
401
|
if (!p || !m || !c) {
|
|
402
402
|
v(!1), b(null);
|
|
@@ -466,7 +466,7 @@ const we = ({
|
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
handleReportUser: () => {
|
|
469
|
-
d == null || d(), u == null || u(), window.open(
|
|
469
|
+
d == null || d(), u == null || u(), window.open(Sa, "_blank", "noopener,noreferrer");
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
472
|
}, ye = ({
|
|
@@ -486,7 +486,7 @@ const we = ({
|
|
|
486
486
|
...a,
|
|
487
487
|
children: s
|
|
488
488
|
}
|
|
489
|
-
),
|
|
489
|
+
), Ia = ({
|
|
490
490
|
channel: e,
|
|
491
491
|
participant: t,
|
|
492
492
|
showDeleteConversation: s = !0,
|
|
@@ -500,7 +500,7 @@ const we = ({
|
|
|
500
500
|
customChannelActions: h,
|
|
501
501
|
triggerClassName: m
|
|
502
502
|
}) => {
|
|
503
|
-
const [g, c] = B(!1), p = j(null), w =
|
|
503
|
+
const [g, c] = B(!1), p = j(null), w = ss(), v = Z(() => c(!1), []), {
|
|
504
504
|
isParticipantBlocked: x,
|
|
505
505
|
isCheckingBlockedStatus: b,
|
|
506
506
|
isLeaving: N,
|
|
@@ -509,7 +509,7 @@ const we = ({
|
|
|
509
509
|
handleBlockUser: L,
|
|
510
510
|
handleUnblockUser: E,
|
|
511
511
|
handleReportUser: $
|
|
512
|
-
} =
|
|
512
|
+
} = Ea({
|
|
513
513
|
channel: e,
|
|
514
514
|
participant: t,
|
|
515
515
|
showBlockParticipant: a,
|
|
@@ -543,7 +543,7 @@ const we = ({
|
|
|
543
543
|
"aria-controls": g ? w : void 0,
|
|
544
544
|
onClick: () => c((R) => !R),
|
|
545
545
|
children: [
|
|
546
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(js, { className: "size-5 text-black/90" }),
|
|
547
547
|
/* @__PURE__ */ n("span", { className: "sr-only", children: "More options" })
|
|
548
548
|
]
|
|
549
549
|
}
|
|
@@ -565,7 +565,7 @@ const we = ({
|
|
|
565
565
|
disabled: N,
|
|
566
566
|
"aria-busy": N,
|
|
567
567
|
children: [
|
|
568
|
-
N ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
568
|
+
N ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Hs, { className: "h-5 w-5" }),
|
|
569
569
|
/* @__PURE__ */ n("span", { children: "Delete Conversation" })
|
|
570
570
|
]
|
|
571
571
|
}
|
|
@@ -584,7 +584,7 @@ const we = ({
|
|
|
584
584
|
disabled: _,
|
|
585
585
|
"aria-busy": _,
|
|
586
586
|
children: [
|
|
587
|
-
_ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
587
|
+
_ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Yt, { className: "h-5 w-5" }),
|
|
588
588
|
/* @__PURE__ */ n("span", { children: "Unblock" })
|
|
589
589
|
]
|
|
590
590
|
}
|
|
@@ -595,13 +595,13 @@ const we = ({
|
|
|
595
595
|
disabled: _,
|
|
596
596
|
"aria-busy": _,
|
|
597
597
|
children: [
|
|
598
|
-
_ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(
|
|
598
|
+
_ ? /* @__PURE__ */ n(Oe, { className: "h-5 w-5 animate-spin" }) : /* @__PURE__ */ n(Yt, { className: "h-5 w-5" }),
|
|
599
599
|
/* @__PURE__ */ n("span", { children: "Block" })
|
|
600
600
|
]
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
603
603
|
r && /* @__PURE__ */ n("li", { children: /* @__PURE__ */ f(ye, { variant: "danger", onClick: $, children: [
|
|
604
|
-
/* @__PURE__ */ n(
|
|
604
|
+
/* @__PURE__ */ n(mn, { className: "h-5 w-5" }),
|
|
605
605
|
/* @__PURE__ */ n("span", { children: "Report" })
|
|
606
606
|
] }) }),
|
|
607
607
|
h
|
|
@@ -609,7 +609,7 @@ const we = ({
|
|
|
609
609
|
}
|
|
610
610
|
)
|
|
611
611
|
] });
|
|
612
|
-
},
|
|
612
|
+
}, Ke = "flex size-10 flex-shrink-0 items-center justify-center rounded-full bg-white/65 shadow-[0px_4px_8px_0px_rgba(0,0,0,0.06),0px_0px_0px_1px_rgba(0,0,0,0.04)] backdrop-blur-[40px] transition-filter duration-150 hover:brightness-95 aria-expanded:brightness-95 focus-ring", Ta = "CUSTOMER_PAID", Aa = (e) => typeof e == "string" && e.trim().replace(/[\s-]+/g, "_").toUpperCase() === Ta, Ra = ({
|
|
613
613
|
className: e,
|
|
614
614
|
onBack: t,
|
|
615
615
|
showBackButton: s,
|
|
@@ -631,14 +631,14 @@ const we = ({
|
|
|
631
631
|
const { channel: v } = xe(), { client: x } = He(), b = z.useMemo(
|
|
632
632
|
() => {
|
|
633
633
|
var A;
|
|
634
|
-
return
|
|
634
|
+
return xn(
|
|
635
635
|
(A = v.state) == null ? void 0 : A.members,
|
|
636
636
|
x == null ? void 0 : x.userID,
|
|
637
637
|
v.type
|
|
638
638
|
);
|
|
639
639
|
},
|
|
640
640
|
[(I = v.state) == null ? void 0 : I.members, x == null ? void 0 : x.userID, v.type]
|
|
641
|
-
), N =
|
|
641
|
+
), N = wn(b == null ? void 0 : b.user), _ = (M = b == null ? void 0 : b.user) == null ? void 0 : M.image, T = vn(v), L = Aa((S = v.data) == null ? void 0 : S.customer_tag) && (b == null ? void 0 : b.is_follower) === !0, E = a && T, $ = L || E || !!w, F = async () => {
|
|
642
642
|
try {
|
|
643
643
|
T ? await v.unpin() : await v.pin();
|
|
644
644
|
} catch (A) {
|
|
@@ -674,7 +674,7 @@ const we = ({
|
|
|
674
674
|
{
|
|
675
675
|
"aria-label": "Paid customer",
|
|
676
676
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#34C759] text-white",
|
|
677
|
-
children: /* @__PURE__ */ n(
|
|
677
|
+
children: /* @__PURE__ */ n(Vs, { className: "size-2.5", weight: "bold" })
|
|
678
678
|
}
|
|
679
679
|
),
|
|
680
680
|
E && /* @__PURE__ */ n("span", { className: "messaging-header-star-badge flex overflow-hidden", children: /* @__PURE__ */ n(
|
|
@@ -682,11 +682,11 @@ const we = ({
|
|
|
682
682
|
{
|
|
683
683
|
"aria-label": "Starred conversation",
|
|
684
684
|
className: "flex size-4 shrink-0 items-center justify-center rounded-full bg-[#FFD60A] text-white",
|
|
685
|
-
children: /* @__PURE__ */ n(
|
|
685
|
+
children: /* @__PURE__ */ n(at, { className: "size-2.5", weight: "fill" })
|
|
686
686
|
}
|
|
687
687
|
) }),
|
|
688
688
|
w && /* @__PURE__ */ n(
|
|
689
|
-
|
|
689
|
+
hn,
|
|
690
690
|
{
|
|
691
691
|
"aria-hidden": "true",
|
|
692
692
|
className: "size-4 shrink-0 text-black/65",
|
|
@@ -710,14 +710,14 @@ const we = ({
|
|
|
710
710
|
"button",
|
|
711
711
|
{
|
|
712
712
|
className: k(
|
|
713
|
-
|
|
713
|
+
Ke,
|
|
714
714
|
"messaging-channel-view-back-button-mobile messaging-channel-view-back-button-desktop"
|
|
715
715
|
),
|
|
716
716
|
onClick: t || (() => {
|
|
717
717
|
}),
|
|
718
718
|
type: "button",
|
|
719
719
|
"aria-label": "Back to conversations",
|
|
720
|
-
children: /* @__PURE__ */ n(
|
|
720
|
+
children: /* @__PURE__ */ n(Gs, { className: "size-5 text-black/90" })
|
|
721
721
|
}
|
|
722
722
|
) }),
|
|
723
723
|
/* @__PURE__ */ n("div", { className: "flex min-w-0 justify-center", "data-dd-privacy": "mask", children: w ? /* @__PURE__ */ n(
|
|
@@ -734,13 +734,13 @@ const we = ({
|
|
|
734
734
|
a && /* @__PURE__ */ n(
|
|
735
735
|
"button",
|
|
736
736
|
{
|
|
737
|
-
className:
|
|
737
|
+
className: Ke,
|
|
738
738
|
onClick: F,
|
|
739
739
|
type: "button",
|
|
740
740
|
"aria-pressed": T,
|
|
741
741
|
"aria-label": T ? "Unstar conversation" : "Star conversation",
|
|
742
742
|
children: /* @__PURE__ */ n(
|
|
743
|
-
|
|
743
|
+
at,
|
|
744
744
|
{
|
|
745
745
|
className: k("size-5", {
|
|
746
746
|
"text-[#FFD60A]": T,
|
|
@@ -752,7 +752,7 @@ const we = ({
|
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
754
|
p && (c !== void 0 ? c : /* @__PURE__ */ n(
|
|
755
|
-
|
|
755
|
+
Ia,
|
|
756
756
|
{
|
|
757
757
|
channel: v,
|
|
758
758
|
participant: b,
|
|
@@ -765,47 +765,47 @@ const we = ({
|
|
|
765
765
|
onBlockParticipantClick: h,
|
|
766
766
|
onReportParticipantClick: m,
|
|
767
767
|
customChannelActions: g,
|
|
768
|
-
triggerClassName:
|
|
768
|
+
triggerClassName: Ke
|
|
769
769
|
}
|
|
770
770
|
))
|
|
771
771
|
] })
|
|
772
772
|
] })
|
|
773
773
|
}
|
|
774
774
|
);
|
|
775
|
-
},
|
|
776
|
-
function
|
|
775
|
+
}, La = (e) => /* @__PURE__ */ n(os, { ...e, position: "center" });
|
|
776
|
+
function Ma(e) {
|
|
777
777
|
return (e == null ? void 0 : e.trim().toLowerCase().split(/[-_]/)[0]) || void 0;
|
|
778
778
|
}
|
|
779
|
-
function
|
|
779
|
+
function yn({
|
|
780
780
|
message: e,
|
|
781
781
|
viewerLanguage: t
|
|
782
782
|
}) {
|
|
783
783
|
var r;
|
|
784
|
-
const s = e == null ? void 0 : e.text, a =
|
|
784
|
+
const s = e == null ? void 0 : e.text, a = Ma(t);
|
|
785
785
|
return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? s : s;
|
|
786
786
|
}
|
|
787
|
-
const
|
|
788
|
-
function
|
|
787
|
+
const Da = ["linktr.ee"], Kt = "messaging-attachment-v1_0";
|
|
788
|
+
function Oa(e) {
|
|
789
789
|
try {
|
|
790
790
|
return new URL(e).hostname.toLowerCase();
|
|
791
791
|
} catch {
|
|
792
792
|
return null;
|
|
793
793
|
}
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
return
|
|
795
|
+
function Pa(e) {
|
|
796
|
+
return Da.some(
|
|
797
797
|
(t) => e === t || e.endsWith(`.${t}`)
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
function ce(e) {
|
|
801
801
|
const t = e == null ? void 0 : e.trim();
|
|
802
802
|
if (!t) return;
|
|
803
|
-
const s =
|
|
804
|
-
if (!s || !
|
|
803
|
+
const s = Oa(t);
|
|
804
|
+
if (!s || !Pa(s)) return t;
|
|
805
805
|
const a = new URL(t);
|
|
806
|
-
return a.searchParams.get("io") === "true" && a.searchParams.get("size") ===
|
|
806
|
+
return a.searchParams.get("io") === "true" && a.searchParams.get("size") === Kt ? t : (a.searchParams.set("io", "true"), a.searchParams.set("size", Kt), a.toString());
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const za = [
|
|
809
809
|
[/pdf/, "pdf"],
|
|
810
810
|
[/wordprocessingml|msword|\.doc/, "doc"],
|
|
811
811
|
[/spreadsheetml|ms-excel|\.xls/, "xls"],
|
|
@@ -818,39 +818,39 @@ const Fa = [
|
|
|
818
818
|
function de(e) {
|
|
819
819
|
return e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : e.startsWith("image/") ? "image" : "document";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const t =
|
|
821
|
+
function Nn(e) {
|
|
822
|
+
const t = za.find(
|
|
823
823
|
([s]) => s.test(e)
|
|
824
824
|
);
|
|
825
825
|
return t ? t[1] : "generic";
|
|
826
826
|
}
|
|
827
|
-
const
|
|
828
|
-
video:
|
|
829
|
-
audio:
|
|
830
|
-
image:
|
|
831
|
-
document:
|
|
832
|
-
},
|
|
833
|
-
pdf:
|
|
834
|
-
doc:
|
|
835
|
-
xls:
|
|
836
|
-
csv:
|
|
837
|
-
ppt:
|
|
838
|
-
zip:
|
|
839
|
-
text:
|
|
840
|
-
markdown:
|
|
841
|
-
generic:
|
|
827
|
+
const Fa = {
|
|
828
|
+
video: gn,
|
|
829
|
+
audio: Ws,
|
|
830
|
+
image: Ys,
|
|
831
|
+
document: fn
|
|
832
|
+
}, $a = {
|
|
833
|
+
pdf: ta,
|
|
834
|
+
doc: ea,
|
|
835
|
+
xls: Qs,
|
|
836
|
+
csv: Js,
|
|
837
|
+
ppt: Zs,
|
|
838
|
+
zip: Ks,
|
|
839
|
+
text: qs,
|
|
840
|
+
markdown: Xs,
|
|
841
|
+
generic: fn
|
|
842
842
|
};
|
|
843
|
-
function
|
|
843
|
+
function Ba(e) {
|
|
844
844
|
const t = de(e);
|
|
845
|
-
return t !== "document" ?
|
|
845
|
+
return t !== "document" ? Fa[t] : $a[Nn(e)];
|
|
846
846
|
}
|
|
847
847
|
function be(e, t) {
|
|
848
|
-
return z.createElement(
|
|
848
|
+
return z.createElement(Ba(e), t);
|
|
849
849
|
}
|
|
850
|
-
const
|
|
850
|
+
const Ua = (e) => {
|
|
851
851
|
var t, s;
|
|
852
852
|
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;
|
|
853
|
-
},
|
|
853
|
+
}, ja = ({
|
|
854
854
|
source: e,
|
|
855
855
|
mimeType: t,
|
|
856
856
|
poster: s,
|
|
@@ -870,7 +870,7 @@ const ja = (e) => {
|
|
|
870
870
|
const W = D.getBoundingClientRect();
|
|
871
871
|
return Math.max(
|
|
872
872
|
0,
|
|
873
|
-
Math.min(1, (
|
|
873
|
+
Math.min(1, (Ua(y) - W.left) / W.width)
|
|
874
874
|
);
|
|
875
875
|
}, []), U = Z((y) => {
|
|
876
876
|
const D = m.current;
|
|
@@ -1009,7 +1009,7 @@ const ja = (e) => {
|
|
|
1009
1009
|
onKeyDown: (y) => {
|
|
1010
1010
|
y.key !== "Enter" && y.key !== " " || (y.preventDefault(), y.stopPropagation(), A());
|
|
1011
1011
|
},
|
|
1012
|
-
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(
|
|
1012
|
+
children: /* @__PURE__ */ n("span", { className: "flex size-16 items-center justify-center rounded-full bg-white/20 text-white backdrop-blur-sm", children: /* @__PURE__ */ n(rt, { className: "size-9 translate-x-0.5", weight: "fill" }) })
|
|
1013
1013
|
}
|
|
1014
1014
|
),
|
|
1015
1015
|
l && !o && /* @__PURE__ */ n("div", { className: "absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent", children: /* @__PURE__ */ n(
|
|
@@ -1048,7 +1048,7 @@ const ja = (e) => {
|
|
|
1048
1048
|
},
|
|
1049
1049
|
className: "shrink-0 text-white",
|
|
1050
1050
|
"aria-label": w ? "Pause" : "Play",
|
|
1051
|
-
children: w ? /* @__PURE__ */ n(
|
|
1051
|
+
children: w ? /* @__PURE__ */ n(na, { className: "size-5", weight: "fill" }) : /* @__PURE__ */ n(rt, { className: "size-5 translate-x-px", weight: "fill" })
|
|
1052
1052
|
}
|
|
1053
1053
|
),
|
|
1054
1054
|
/* @__PURE__ */ f(
|
|
@@ -1098,7 +1098,7 @@ const ja = (e) => {
|
|
|
1098
1098
|
]
|
|
1099
1099
|
}
|
|
1100
1100
|
);
|
|
1101
|
-
},
|
|
1101
|
+
}, Zt = (e) => e === "dark" ? "size-12 text-white/20" : "size-12 text-black/20", Ha = (e) => e === "dark" ? "aspect-video overflow-hidden bg-white/10" : "aspect-video overflow-hidden bg-black/5", kn = ({
|
|
1102
1102
|
mimeType: e,
|
|
1103
1103
|
sourceUrl: t,
|
|
1104
1104
|
thumbnailUrl: s,
|
|
@@ -1109,7 +1109,7 @@ const ja = (e) => {
|
|
|
1109
1109
|
}) => {
|
|
1110
1110
|
const l = de(e), [d, u] = B(!1), h = ce(t), m = ce(s);
|
|
1111
1111
|
return t && (l === "video" || l === "audio") ? /* @__PURE__ */ n(
|
|
1112
|
-
|
|
1112
|
+
ja,
|
|
1113
1113
|
{
|
|
1114
1114
|
source: t,
|
|
1115
1115
|
mimeType: e,
|
|
@@ -1156,11 +1156,11 @@ const ja = (e) => {
|
|
|
1156
1156
|
{
|
|
1157
1157
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1158
1158
|
children: be(e, {
|
|
1159
|
-
className:
|
|
1159
|
+
className: Zt(r),
|
|
1160
1160
|
weight: "regular"
|
|
1161
1161
|
})
|
|
1162
1162
|
}
|
|
1163
|
-
) : s ? /* @__PURE__ */ n("div", { className: `relative ${
|
|
1163
|
+
) : s ? /* @__PURE__ */ n("div", { className: `relative ${Ha(r)}`, children: /* @__PURE__ */ n(
|
|
1164
1164
|
"img",
|
|
1165
1165
|
{
|
|
1166
1166
|
src: m ?? s,
|
|
@@ -1173,12 +1173,12 @@ const ja = (e) => {
|
|
|
1173
1173
|
{
|
|
1174
1174
|
className: `flex aspect-video w-full items-center justify-center ${r === "dark" ? "bg-white/10" : "bg-black/5"}`,
|
|
1175
1175
|
children: be(e, {
|
|
1176
|
-
className:
|
|
1176
|
+
className: Zt(r),
|
|
1177
1177
|
weight: "regular"
|
|
1178
1178
|
})
|
|
1179
1179
|
}
|
|
1180
1180
|
);
|
|
1181
|
-
},
|
|
1181
|
+
}, Cn = ({
|
|
1182
1182
|
variant: e,
|
|
1183
1183
|
thumbnail: t,
|
|
1184
1184
|
title: s,
|
|
@@ -1244,28 +1244,28 @@ const ja = (e) => {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
);
|
|
1246
1246
|
};
|
|
1247
|
-
function
|
|
1247
|
+
function Sn(e) {
|
|
1248
1248
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function ct(e) {
|
|
1251
1251
|
return `w-[280px] select-none overflow-hidden rounded-[24px] ${e ? "bg-[#1e2330]" : "bg-[#F3F3F1]"} shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]`;
|
|
1252
1252
|
}
|
|
1253
|
-
function
|
|
1253
|
+
function Va(e) {
|
|
1254
1254
|
return e ? "bg-white/10" : "bg-black/5";
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function Ga(e) {
|
|
1257
1257
|
return e ? "text-white" : "text-black";
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1259
|
+
function Ya(e) {
|
|
1260
1260
|
return e ? "text-white/55" : "text-black/55";
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function Wa(e) {
|
|
1263
1263
|
return e ? "text-white/40" : "text-black/40";
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function Xa(e) {
|
|
1266
1266
|
return e ? "text-white/20" : "text-black/20";
|
|
1267
1267
|
}
|
|
1268
|
-
const
|
|
1268
|
+
const dt = ({ attachment: e, isMyMessage: t }) => {
|
|
1269
1269
|
const { title: s, text: a, image_url: r, og_scrape_url: i, title_link: o } = e, l = i ?? o, d = typeof l == "string" && l.trim() !== "" ? l : void 0, u = /* @__PURE__ */ f(z.Fragment, { children: [
|
|
1270
1270
|
/* @__PURE__ */ n("div", { className: "p-2", children: r ? /* @__PURE__ */ n(
|
|
1271
1271
|
"img",
|
|
@@ -1277,29 +1277,29 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1277
1277
|
) : /* @__PURE__ */ n(
|
|
1278
1278
|
"div",
|
|
1279
1279
|
{
|
|
1280
|
-
className: `aspect-video w-full rounded-[20px] ${
|
|
1281
|
-
children: /* @__PURE__ */ n(
|
|
1280
|
+
className: `aspect-video w-full rounded-[20px] ${Va(t)} flex items-center justify-center`,
|
|
1281
|
+
children: /* @__PURE__ */ n(sa, { className: `size-12 ${Xa(t)}` })
|
|
1282
1282
|
}
|
|
1283
1283
|
) }),
|
|
1284
1284
|
/* @__PURE__ */ f("div", { className: "px-3 pb-3", children: [
|
|
1285
1285
|
s && /* @__PURE__ */ n(
|
|
1286
1286
|
"p",
|
|
1287
1287
|
{
|
|
1288
|
-
className: `truncate text-[14px] font-medium leading-5 ${
|
|
1288
|
+
className: `truncate text-[14px] font-medium leading-5 ${Ga(t)}`,
|
|
1289
1289
|
children: s
|
|
1290
1290
|
}
|
|
1291
1291
|
),
|
|
1292
1292
|
a && /* @__PURE__ */ n(
|
|
1293
1293
|
"p",
|
|
1294
1294
|
{
|
|
1295
|
-
className: `truncate text-[12px] leading-4 ${
|
|
1295
|
+
className: `truncate text-[12px] leading-4 ${Ya(t)}`,
|
|
1296
1296
|
children: a
|
|
1297
1297
|
}
|
|
1298
1298
|
),
|
|
1299
1299
|
d && /* @__PURE__ */ n(
|
|
1300
1300
|
"p",
|
|
1301
1301
|
{
|
|
1302
|
-
className: `mt-1 truncate text-[12px] leading-4 ${
|
|
1302
|
+
className: `mt-1 truncate text-[12px] leading-4 ${Wa(t)}`,
|
|
1303
1303
|
children: d
|
|
1304
1304
|
}
|
|
1305
1305
|
)
|
|
@@ -1316,14 +1316,15 @@ const ct = ({ attachment: e, isMyMessage: t }) => {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
) : /* @__PURE__ */ n("div", { className: "block", children: u });
|
|
1318
1318
|
};
|
|
1319
|
-
function
|
|
1320
|
-
|
|
1319
|
+
function Ve(e) {
|
|
1320
|
+
var t;
|
|
1321
|
+
return e.type === "link" || !!((t = e.og_scrape_url) != null && t.trim()) && !e.asset_url;
|
|
1321
1322
|
}
|
|
1322
|
-
function
|
|
1323
|
+
function ut(e) {
|
|
1323
1324
|
var t;
|
|
1324
|
-
return (t = e.attachments) == null ? void 0 : t.find(
|
|
1325
|
+
return (t = e.attachments) == null ? void 0 : t.find(Ve);
|
|
1325
1326
|
}
|
|
1326
|
-
async function
|
|
1327
|
+
async function qa(e, t) {
|
|
1327
1328
|
let s;
|
|
1328
1329
|
try {
|
|
1329
1330
|
s = t ?? new URL(e).pathname.split("/").pop() ?? "download";
|
|
@@ -1335,7 +1336,7 @@ async function Ka(e, t) {
|
|
|
1335
1336
|
const r = await a.blob(), i = URL.createObjectURL(r), o = document.createElement("a");
|
|
1336
1337
|
o.href = i, o.download = s, o.style.display = "none", document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(i);
|
|
1337
1338
|
}
|
|
1338
|
-
const
|
|
1339
|
+
const Ka = ({
|
|
1339
1340
|
url: e,
|
|
1340
1341
|
filename: t
|
|
1341
1342
|
}) => {
|
|
@@ -1347,7 +1348,7 @@ const Za = ({
|
|
|
1347
1348
|
onClick: (i) => {
|
|
1348
1349
|
i.stopPropagation();
|
|
1349
1350
|
const o = window.open("", "_blank", "noopener,noreferrer");
|
|
1350
|
-
a(!0),
|
|
1351
|
+
a(!0), qa(e, t).then(() => {
|
|
1351
1352
|
o == null || o.close();
|
|
1352
1353
|
}).catch(() => {
|
|
1353
1354
|
o && (o.location.href = e);
|
|
@@ -1368,7 +1369,7 @@ const Za = ({
|
|
|
1368
1369
|
}
|
|
1369
1370
|
);
|
|
1370
1371
|
};
|
|
1371
|
-
function
|
|
1372
|
+
function mt(e) {
|
|
1372
1373
|
var m, g, c, p;
|
|
1373
1374
|
const t = (m = e.attachments) == null ? void 0 : m.find(
|
|
1374
1375
|
(w) => w.type === "video" && w.asset_url
|
|
@@ -1396,9 +1397,9 @@ const En = ({
|
|
|
1396
1397
|
fileSize: a,
|
|
1397
1398
|
thumbnailUrl: r
|
|
1398
1399
|
}) => {
|
|
1399
|
-
const i = a !== void 0 ?
|
|
1400
|
+
const i = a !== void 0 ? Sn(a) : void 0;
|
|
1400
1401
|
return /* @__PURE__ */ n(
|
|
1401
|
-
|
|
1402
|
+
Cn,
|
|
1402
1403
|
{
|
|
1403
1404
|
variant: "dark",
|
|
1404
1405
|
title: s,
|
|
@@ -1406,7 +1407,7 @@ const En = ({
|
|
|
1406
1407
|
mimeType: t,
|
|
1407
1408
|
detail: i,
|
|
1408
1409
|
thumbnail: /* @__PURE__ */ n(
|
|
1409
|
-
|
|
1410
|
+
kn,
|
|
1410
1411
|
{
|
|
1411
1412
|
mimeType: t,
|
|
1412
1413
|
sourceUrl: e,
|
|
@@ -1424,16 +1425,16 @@ const En = ({
|
|
|
1424
1425
|
fileSize: a,
|
|
1425
1426
|
thumbnailUrl: r
|
|
1426
1427
|
}) => {
|
|
1427
|
-
const i = de(t), o = a !== void 0 ?
|
|
1428
|
+
const i = de(t), o = a !== void 0 ? Sn(a) : void 0;
|
|
1428
1429
|
return /* @__PURE__ */ n(
|
|
1429
|
-
|
|
1430
|
+
Cn,
|
|
1430
1431
|
{
|
|
1431
1432
|
variant: "light",
|
|
1432
1433
|
title: s,
|
|
1433
1434
|
mimeType: t,
|
|
1434
1435
|
detail: o,
|
|
1435
1436
|
thumbnail: /* @__PURE__ */ n(
|
|
1436
|
-
|
|
1437
|
+
kn,
|
|
1437
1438
|
{
|
|
1438
1439
|
mimeType: t,
|
|
1439
1440
|
sourceUrl: e,
|
|
@@ -1443,14 +1444,14 @@ const En = ({
|
|
|
1443
1444
|
containedImage: i === "image" || i === "document"
|
|
1444
1445
|
}
|
|
1445
1446
|
),
|
|
1446
|
-
action: /* @__PURE__ */ n(
|
|
1447
|
+
action: /* @__PURE__ */ n(Ka, { url: e, filename: s })
|
|
1447
1448
|
}
|
|
1448
1449
|
);
|
|
1449
|
-
},
|
|
1450
|
+
}, Za = ({
|
|
1450
1451
|
message: e,
|
|
1451
1452
|
isMyMessage: t = !1
|
|
1452
1453
|
}) => {
|
|
1453
|
-
const s =
|
|
1454
|
+
const s = ut(e), a = mt(e);
|
|
1454
1455
|
return !s && !a ? null : /* @__PURE__ */ f("div", { className: t ? "str-chat__message str-chat__message-simple str-chat__message--me str-chat__message-simple--me" : "str-chat__message str-chat__message-simple str-chat__message--other", "data-dd-privacy": "mask", children: [
|
|
1455
1456
|
!t && e.user && /* @__PURE__ */ n(
|
|
1456
1457
|
we,
|
|
@@ -1477,8 +1478,8 @@ const En = ({
|
|
|
1477
1478
|
overflow: "visible",
|
|
1478
1479
|
background: "transparent"
|
|
1479
1480
|
},
|
|
1480
|
-
children: s ? /* @__PURE__ */ n("div", { className:
|
|
1481
|
-
|
|
1481
|
+
children: s ? /* @__PURE__ */ n("div", { className: ct(t), children: /* @__PURE__ */ n(
|
|
1482
|
+
dt,
|
|
1482
1483
|
{
|
|
1483
1484
|
attachment: s,
|
|
1484
1485
|
isMyMessage: t
|
|
@@ -1489,40 +1490,40 @@ const En = ({
|
|
|
1489
1490
|
}
|
|
1490
1491
|
)
|
|
1491
1492
|
] });
|
|
1492
|
-
},
|
|
1493
|
+
}, Ja = ({
|
|
1493
1494
|
message: e
|
|
1494
1495
|
}) => {
|
|
1495
|
-
const t =
|
|
1496
|
+
const t = ut(e);
|
|
1496
1497
|
if (t)
|
|
1497
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1498
|
-
const s =
|
|
1498
|
+
return /* @__PURE__ */ n("div", { className: ct(!0), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !0 }) });
|
|
1499
|
+
const s = mt(e);
|
|
1499
1500
|
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(En, { ...s }) }) : null;
|
|
1500
|
-
},
|
|
1501
|
+
}, Qa = ({
|
|
1501
1502
|
message: e
|
|
1502
1503
|
}) => {
|
|
1503
|
-
const t =
|
|
1504
|
+
const t = ut(e);
|
|
1504
1505
|
if (t)
|
|
1505
|
-
return /* @__PURE__ */ n("div", { className:
|
|
1506
|
-
const s =
|
|
1506
|
+
return /* @__PURE__ */ n("div", { className: ct(!1), "data-dd-privacy": "mask", children: /* @__PURE__ */ n(dt, { attachment: t, isMyMessage: !1 }) });
|
|
1507
|
+
const s = mt(e);
|
|
1507
1508
|
return s ? /* @__PURE__ */ n("div", { style: { display: "contents" }, "data-dd-privacy": "mask", children: /* @__PURE__ */ n(In, { ...s }) }) : null;
|
|
1508
|
-
},
|
|
1509
|
-
Creator:
|
|
1510
|
-
Visitor:
|
|
1511
|
-
}),
|
|
1509
|
+
}, eo = Object.assign(Za, {
|
|
1510
|
+
Creator: Ja,
|
|
1511
|
+
Visitor: Qa
|
|
1512
|
+
}), er = {
|
|
1512
1513
|
isUnlocking: () => !1
|
|
1513
|
-
},
|
|
1514
|
-
LockedAttachment:
|
|
1515
|
-
}, Tn = je({}),
|
|
1516
|
-
function
|
|
1517
|
-
return ve(Tn)[e] ??
|
|
1514
|
+
}, tr = {
|
|
1515
|
+
LockedAttachment: er
|
|
1516
|
+
}, Tn = je({}), to = Tn.Provider;
|
|
1517
|
+
function nr(e) {
|
|
1518
|
+
return ve(Tn)[e] ?? tr[e];
|
|
1518
1519
|
}
|
|
1519
|
-
const
|
|
1520
|
+
const sr = z.lazy(() => import("./Card-BzvDr-pU.js")), ar = z.lazy(() => import("./Card-CBj04-pC.js")), rr = () => /* @__PURE__ */ n(
|
|
1520
1521
|
"div",
|
|
1521
1522
|
{
|
|
1522
1523
|
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)]",
|
|
1523
1524
|
"aria-hidden": !0
|
|
1524
1525
|
}
|
|
1525
|
-
), Pe = (e) => /* @__PURE__ */ n(
|
|
1526
|
+
), Pe = (e) => /* @__PURE__ */ n(as, { fallback: /* @__PURE__ */ n(rr, {}), children: e.contentType === "text" ? /* @__PURE__ */ n(sr, { ...e }) : /* @__PURE__ */ n(ar, { ...e }) }), ir = ({ size: e = 15 }) => /* @__PURE__ */ n(
|
|
1526
1527
|
"svg",
|
|
1527
1528
|
{
|
|
1528
1529
|
width: e,
|
|
@@ -1539,7 +1540,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1539
1540
|
}
|
|
1540
1541
|
)
|
|
1541
1542
|
}
|
|
1542
|
-
),
|
|
1543
|
+
), lr = (e) => {
|
|
1543
1544
|
var t;
|
|
1544
1545
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.TIP;
|
|
1545
1546
|
}, An = (e) => {
|
|
@@ -1548,19 +1549,19 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1548
1549
|
}, Fe = (e) => {
|
|
1549
1550
|
var t;
|
|
1550
1551
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.CHATBOT;
|
|
1551
|
-
},
|
|
1552
|
+
}, ht = (e) => {
|
|
1552
1553
|
var t;
|
|
1553
1554
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) === oe.ATTACHMENT;
|
|
1554
|
-
},
|
|
1555
|
+
}, or = (e) => {
|
|
1555
1556
|
var t;
|
|
1556
|
-
return
|
|
1557
|
-
},
|
|
1557
|
+
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
|
|
1558
|
+
}, cr = (e) => {
|
|
1558
1559
|
var t;
|
|
1559
|
-
return
|
|
1560
|
-
}, Rn = (e) =>
|
|
1560
|
+
return ht(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
|
|
1561
|
+
}, Rn = (e) => lr(e) || An(e), dr = (e) => {
|
|
1561
1562
|
var t;
|
|
1562
1563
|
return Rn(e) && !((t = e.text) != null && t.trim());
|
|
1563
|
-
},
|
|
1564
|
+
}, Ze = ({
|
|
1564
1565
|
message: e,
|
|
1565
1566
|
standalone: t = !1,
|
|
1566
1567
|
isMyMessage: s = !1,
|
|
@@ -1575,11 +1576,11 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1575
1576
|
if (!c) return null;
|
|
1576
1577
|
const p = t ? "message-tip-standalone inline-flex items-center gap-1.5 px-3.5 py-2.5 rounded-[18px] text-[14px] font-medium text-[#016e1a] bg-[#dbf0e0]" : "message-tag--tip inline-flex items-center gap-1 text-[12px] leading-[2] font-medium text-[#016630]", w = An(e) ? "message" : "tip", v = t ? `${c} ${w}` : `Delivered with ${c} ${w}`;
|
|
1577
1578
|
return /* @__PURE__ */ f("div", { className: p, children: [
|
|
1578
|
-
/* @__PURE__ */ n(
|
|
1579
|
+
/* @__PURE__ */ n(aa, { size: t ? 14 : 12 }),
|
|
1579
1580
|
/* @__PURE__ */ n("span", { children: v })
|
|
1580
1581
|
] });
|
|
1581
1582
|
}
|
|
1582
|
-
const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(
|
|
1583
|
+
const o = s && a, l = o ? "Sent with AI" : "Sent by AI Assistant", d = "inline-flex items-center text-[10px] font-normal leading-4 tracking-[0.2px]", u = o ? "justify-end gap-2 text-black/30" : s ? "w-full justify-start gap-1.5 mt-3 px-4 text-white/55" : "w-full justify-start gap-1.5 mt-3 px-4 text-black/30", h = /* @__PURE__ */ n("span", { className: "text-left", children: l }), m = /* @__PURE__ */ n("span", { className: "inline-flex items-center leading-none", children: /* @__PURE__ */ n(ir, { size: o ? 12 : 15 }) });
|
|
1583
1584
|
return /* @__PURE__ */ n(
|
|
1584
1585
|
"div",
|
|
1585
1586
|
{
|
|
@@ -1594,7 +1595,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1594
1595
|
] })
|
|
1595
1596
|
}
|
|
1596
1597
|
);
|
|
1597
|
-
},
|
|
1598
|
+
}, Jt = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, ur = {
|
|
1598
1599
|
me: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
1599
1600
|
other: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
1600
1601
|
}, $e = ({ side: e }) => /* @__PURE__ */ n(
|
|
@@ -1607,24 +1608,24 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1607
1608
|
insetInlineStart: e === "other" ? "calc(-1 * 0.3125rem)" : void 0,
|
|
1608
1609
|
transform: e === "other" ? "scaleX(-1)" : void 0,
|
|
1609
1610
|
transformOrigin: "center",
|
|
1610
|
-
backgroundColor:
|
|
1611
|
-
WebkitMask:
|
|
1612
|
-
mask:
|
|
1611
|
+
backgroundColor: ur[e],
|
|
1612
|
+
WebkitMask: Jt,
|
|
1613
|
+
mask: Jt
|
|
1613
1614
|
}
|
|
1614
1615
|
}
|
|
1615
1616
|
), Ln = je(
|
|
1616
1617
|
void 0
|
|
1617
|
-
),
|
|
1618
|
+
), mr = (e) => {
|
|
1618
1619
|
var s;
|
|
1619
1620
|
const t = (s = e.metadata) == null ? void 0 : s.outbound_id;
|
|
1620
1621
|
return typeof t == "string" ? t : void 0;
|
|
1621
|
-
},
|
|
1622
|
+
}, hr = (e, t) => {
|
|
1622
1623
|
if (!t || !(e != null && e.length))
|
|
1623
1624
|
return;
|
|
1624
1625
|
const s = /* @__PURE__ */ new Set();
|
|
1625
1626
|
let a;
|
|
1626
1627
|
for (const r of e) {
|
|
1627
|
-
const i =
|
|
1628
|
+
const i = mr(r);
|
|
1628
1629
|
if (!i || s.has(i))
|
|
1629
1630
|
continue;
|
|
1630
1631
|
s.add(i);
|
|
@@ -1635,7 +1636,7 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1635
1636
|
});
|
|
1636
1637
|
}
|
|
1637
1638
|
return a;
|
|
1638
|
-
},
|
|
1639
|
+
}, fr = (e, t) => {
|
|
1639
1640
|
if (e === t)
|
|
1640
1641
|
return !0;
|
|
1641
1642
|
if (!e || !t)
|
|
@@ -1647,10 +1648,10 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1647
1648
|
return e[r].id === ((i = t[r]) == null ? void 0 : i.id) && e[r].name === ((o = t[r]) == null ? void 0 : o.name);
|
|
1648
1649
|
}
|
|
1649
1650
|
);
|
|
1650
|
-
},
|
|
1651
|
-
const s =
|
|
1652
|
-
return
|
|
1653
|
-
},
|
|
1651
|
+
}, gr = (e, t) => {
|
|
1652
|
+
const s = hr(e, t), [a, r] = B(s);
|
|
1653
|
+
return fr(a, s) ? a : (r(s), s);
|
|
1654
|
+
}, ft = () => {
|
|
1654
1655
|
const { message: e } = he("SentMessageDeliveryStatus"), { messages: t } = xe("SentMessageDeliveryStatus"), s = (() => {
|
|
1655
1656
|
if (t)
|
|
1656
1657
|
for (let a = t.length - 1; a >= 0; a -= 1) {
|
|
@@ -1660,10 +1661,10 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1660
1661
|
}
|
|
1661
1662
|
})();
|
|
1662
1663
|
return e.id === s;
|
|
1663
|
-
},
|
|
1664
|
-
/* @__PURE__ */ n(
|
|
1664
|
+
}, Je = () => ft() ? /* @__PURE__ */ f(J, { children: [
|
|
1665
|
+
/* @__PURE__ */ n(la, { weight: "bold", "aria-hidden": "true" }),
|
|
1665
1666
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-delivery-status", children: "Delivered" })
|
|
1666
|
-
] }) : null,
|
|
1667
|
+
] }) : null, pr = () => ft() ? /* @__PURE__ */ f(J, { children: [
|
|
1667
1668
|
/* @__PURE__ */ n(
|
|
1668
1669
|
pe,
|
|
1669
1670
|
{
|
|
@@ -1673,12 +1674,12 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1673
1674
|
}
|
|
1674
1675
|
),
|
|
1675
1676
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-sending-status", children: "Sending" })
|
|
1676
|
-
] }) : null,
|
|
1677
|
+
] }) : null, br = ({
|
|
1677
1678
|
outbound: e,
|
|
1678
1679
|
onOutboundClick: t
|
|
1679
1680
|
}) => {
|
|
1680
1681
|
const s = e.name || "Broadcast", r = /* @__PURE__ */ f(J, { children: [
|
|
1681
|
-
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(
|
|
1682
|
+
/* @__PURE__ */ n("span", { className: "sent-message-outbound-badge", "aria-hidden": "true", children: /* @__PURE__ */ n(ia, { weight: "fill" }) }),
|
|
1682
1683
|
/* @__PURE__ */ n(
|
|
1683
1684
|
"span",
|
|
1684
1685
|
{
|
|
@@ -1700,36 +1701,36 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1700
1701
|
children: r
|
|
1701
1702
|
}
|
|
1702
1703
|
) : r;
|
|
1703
|
-
},
|
|
1704
|
-
/* @__PURE__ */ n(
|
|
1704
|
+
}, vr = () => /* @__PURE__ */ f("span", { className: "str-chat__message-status sent-message-status--failed", children: [
|
|
1705
|
+
/* @__PURE__ */ n(ra, { weight: "bold", "aria-hidden": "true" }),
|
|
1705
1706
|
/* @__PURE__ */ n("span", { "data-testid": "sent-message-failed-status", children: "Failed to send" })
|
|
1706
|
-
] }),
|
|
1707
|
+
] }), xr = ({
|
|
1707
1708
|
onOutboundClick: e,
|
|
1708
1709
|
resolvedOutbound: t
|
|
1709
1710
|
}) => {
|
|
1710
1711
|
var h;
|
|
1711
1712
|
const { isMyMessage: s, message: a, threadList: r } = he(
|
|
1712
1713
|
"SentMessageDeliveryStatus"
|
|
1713
|
-
), i = s(), o =
|
|
1714
|
+
), i = s(), o = ft();
|
|
1714
1715
|
if (r)
|
|
1715
1716
|
return null;
|
|
1716
1717
|
if (a.status === "failed" && i && a.type !== "error")
|
|
1717
|
-
return /* @__PURE__ */ n(
|
|
1718
|
+
return /* @__PURE__ */ n(vr, {});
|
|
1718
1719
|
if (!i)
|
|
1719
1720
|
return null;
|
|
1720
1721
|
const l = (h = a.metadata) == null ? void 0 : h.outbound_id, d = a.status !== "sending" && a.status !== "failed" && l && t ? /* @__PURE__ */ n(
|
|
1721
|
-
|
|
1722
|
+
br,
|
|
1722
1723
|
{
|
|
1723
1724
|
outbound: t,
|
|
1724
1725
|
onOutboundClick: e
|
|
1725
1726
|
}
|
|
1726
1727
|
) : null, u = /* @__PURE__ */ n(
|
|
1727
|
-
|
|
1728
|
+
cs,
|
|
1728
1729
|
{
|
|
1729
|
-
MessageSentStatus:
|
|
1730
|
-
MessageDeliveredStatus:
|
|
1731
|
-
MessageReadStatus:
|
|
1732
|
-
MessageSendingStatus:
|
|
1730
|
+
MessageSentStatus: Je,
|
|
1731
|
+
MessageDeliveredStatus: Je,
|
|
1732
|
+
MessageReadStatus: Je,
|
|
1733
|
+
MessageSendingStatus: pr
|
|
1733
1734
|
}
|
|
1734
1735
|
);
|
|
1735
1736
|
return d ? /* @__PURE__ */ f("span", { className: "sent-message-status-row", children: [
|
|
@@ -1737,19 +1738,19 @@ const ar = z.lazy(() => import("./Card-DaJtDL7m.js")), rr = z.lazy(() => import(
|
|
|
1737
1738
|
o && /* @__PURE__ */ n("span", { className: "sent-message-outbound-separator", "aria-hidden": "true", children: "•" }),
|
|
1738
1739
|
d
|
|
1739
1740
|
] }) : u;
|
|
1740
|
-
},
|
|
1741
|
-
function
|
|
1741
|
+
}, wr = /^([a-z][a-z0-9+.-]*):/i, _r = /* @__PURE__ */ new Set(["http", "https", "mailto", "tel", "sms"]);
|
|
1742
|
+
function gt(e) {
|
|
1742
1743
|
if (typeof e != "string") return;
|
|
1743
1744
|
const t = e.trim();
|
|
1744
1745
|
if (t === "") return;
|
|
1745
|
-
const s =
|
|
1746
|
+
const s = wr.exec(t);
|
|
1746
1747
|
if (s) {
|
|
1747
1748
|
const a = s[1].toLowerCase();
|
|
1748
|
-
return
|
|
1749
|
+
return _r.has(a) ? t : void 0;
|
|
1749
1750
|
}
|
|
1750
1751
|
return t.startsWith("//") || t.startsWith("/") ? t : `https://${t}`;
|
|
1751
1752
|
}
|
|
1752
|
-
const
|
|
1753
|
+
const yr = {
|
|
1753
1754
|
dark: {
|
|
1754
1755
|
primary: "bg-white text-[#121110] hover:bg-white/90",
|
|
1755
1756
|
secondary: "bg-white/15 text-white hover:bg-white/25"
|
|
@@ -1768,8 +1769,8 @@ const Nr = {
|
|
|
1768
1769
|
"inline-flex h-10 items-center justify-center rounded-full px-4 text-sm font-medium leading-none transition-colors",
|
|
1769
1770
|
s ? "w-full" : "min-w-0",
|
|
1770
1771
|
!a && "mt-2",
|
|
1771
|
-
|
|
1772
|
-
), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l =
|
|
1772
|
+
yr[e][r]
|
|
1773
|
+
), o = s ? t.label : /* @__PURE__ */ n("span", { className: "min-w-0 truncate", children: t.label }), l = gt(t.href);
|
|
1773
1774
|
return l ? /* @__PURE__ */ n(
|
|
1774
1775
|
"a",
|
|
1775
1776
|
{
|
|
@@ -1795,16 +1796,16 @@ const Nr = {
|
|
|
1795
1796
|
children: o
|
|
1796
1797
|
}
|
|
1797
1798
|
);
|
|
1798
|
-
},
|
|
1799
|
+
}, Nr = {
|
|
1799
1800
|
dark: "text-white",
|
|
1800
1801
|
light: "text-black/90"
|
|
1801
|
-
},
|
|
1802
|
+
}, kr = "text-white/30", Qt = {
|
|
1802
1803
|
dark: "text-white/55",
|
|
1803
1804
|
light: "text-black/55"
|
|
1804
|
-
},
|
|
1805
|
+
}, Cr = {
|
|
1805
1806
|
dark: "bg-white/25",
|
|
1806
1807
|
light: "bg-black/15"
|
|
1807
|
-
},
|
|
1808
|
+
}, pt = ({
|
|
1808
1809
|
variant: e,
|
|
1809
1810
|
ctaSurface: t,
|
|
1810
1811
|
chinTextColor: s,
|
|
@@ -1823,19 +1824,19 @@ const Nr = {
|
|
|
1823
1824
|
return null;
|
|
1824
1825
|
const N = g && !a, _ = k(
|
|
1825
1826
|
"line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px]",
|
|
1826
|
-
s == null && (N ?
|
|
1827
|
+
s == null && (N ? kr : Nr[e])
|
|
1827
1828
|
), T = k(
|
|
1828
1829
|
"truncate text-[12px] leading-4 tracking-[0.24px]",
|
|
1829
|
-
s == null &&
|
|
1830
|
+
s == null && Qt[e]
|
|
1830
1831
|
), L = k(
|
|
1831
1832
|
"text-[12px] leading-4 tracking-[0.24px]",
|
|
1832
1833
|
o <= 1 && "truncate",
|
|
1833
|
-
s == null &&
|
|
1834
|
+
s == null && Qt[e]
|
|
1834
1835
|
);
|
|
1835
1836
|
if (m) {
|
|
1836
1837
|
const F = k(
|
|
1837
1838
|
"animate-pulse rounded",
|
|
1838
|
-
|
|
1839
|
+
Cr[e]
|
|
1839
1840
|
);
|
|
1840
1841
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: /* @__PURE__ */ f("div", { className: "flex min-w-0 flex-col gap-[2px]", children: [
|
|
1841
1842
|
/* @__PURE__ */ n("div", { className: k("h-5 w-3/4", F), "aria-hidden": !0 }),
|
|
@@ -1870,12 +1871,12 @@ const Nr = {
|
|
|
1870
1871
|
] }),
|
|
1871
1872
|
u && /* @__PURE__ */ n(Mn, { variant: t ?? e, cta: u })
|
|
1872
1873
|
] });
|
|
1873
|
-
},
|
|
1874
|
+
}, Sr = "Loading link preview", Er = k(
|
|
1874
1875
|
"relative w-[290px] select-none overflow-hidden",
|
|
1875
1876
|
// 20px corners — no token exists for it in the component-library preset,
|
|
1876
1877
|
// whose radius scale is sm .5rem / md 1rem / lg 1.5rem / xl 4rem.
|
|
1877
1878
|
"rounded-[20px]"
|
|
1878
|
-
),
|
|
1879
|
+
), Ir = "flex h-[250px] flex-col", Se = ({
|
|
1879
1880
|
variant: e,
|
|
1880
1881
|
children: t,
|
|
1881
1882
|
href: s,
|
|
@@ -1891,8 +1892,8 @@ const Nr = {
|
|
|
1891
1892
|
}) => {
|
|
1892
1893
|
const g = s != null || a != null, c = k(
|
|
1893
1894
|
"messaging-link-card",
|
|
1894
|
-
|
|
1895
|
-
u ?
|
|
1895
|
+
Er,
|
|
1896
|
+
u ? Ir : "block",
|
|
1896
1897
|
// The plain fallback fill, kept underneath the `--accent` derivation: the
|
|
1897
1898
|
// `.messaging-link-card[style*='--accent']` rule in `styles.css` outranks
|
|
1898
1899
|
// this single class, so a published accent paints over it and an unset one
|
|
@@ -1914,7 +1915,7 @@ const Nr = {
|
|
|
1914
1915
|
// tailwind preset — outline-none + a black 2px focus-visible ring
|
|
1915
1916
|
// with offset, so keyboard users can see the focused card.
|
|
1916
1917
|
g ? "cursor-pointer no-underline focus-ring" : null
|
|
1917
|
-
), p = h ? { role: "status", "aria-busy": !0, "aria-label":
|
|
1918
|
+
), p = h ? { role: "status", "aria-busy": !0, "aria-label": Sr } : void 0, w = d ? { "--accent": d } : void 0, v = o ? /* @__PURE__ */ n("div", { className: "pointer-events-auto absolute right-3 top-3 z-10", children: o }) : null;
|
|
1918
1919
|
return s ? /* @__PURE__ */ f(
|
|
1919
1920
|
"a",
|
|
1920
1921
|
{
|
|
@@ -1965,17 +1966,17 @@ const Nr = {
|
|
|
1965
1966
|
]
|
|
1966
1967
|
}
|
|
1967
1968
|
);
|
|
1968
|
-
},
|
|
1969
|
+
}, en = {
|
|
1969
1970
|
dark: "bg-white/10",
|
|
1970
1971
|
light: "bg-black/5"
|
|
1971
|
-
},
|
|
1972
|
+
}, Tr = {
|
|
1972
1973
|
dark: "size-16 text-white/25",
|
|
1973
1974
|
light: "size-16 text-black/25"
|
|
1974
|
-
}, Ie = (e, t) => !!t && !!e && de(e) === "audio",
|
|
1975
|
+
}, Ie = (e, t) => !!t && !!e && de(e) === "audio", bt = (e, t) => {
|
|
1975
1976
|
if (!t || !e) return !1;
|
|
1976
1977
|
const s = de(e);
|
|
1977
1978
|
return s === "video" || s === "audio";
|
|
1978
|
-
},
|
|
1979
|
+
}, vt = "bg-[#F2F3F4]", Ee = ({
|
|
1979
1980
|
variant: e,
|
|
1980
1981
|
thumbnailUrl: t,
|
|
1981
1982
|
sourceUrl: s,
|
|
@@ -2018,7 +2019,7 @@ const Nr = {
|
|
|
2018
2019
|
{
|
|
2019
2020
|
className: k(
|
|
2020
2021
|
"h-full w-full animate-pulse",
|
|
2021
|
-
|
|
2022
|
+
en[e]
|
|
2022
2023
|
),
|
|
2023
2024
|
"aria-hidden": !0
|
|
2024
2025
|
}
|
|
@@ -2062,10 +2063,10 @@ const Nr = {
|
|
|
2062
2063
|
{
|
|
2063
2064
|
className: k(
|
|
2064
2065
|
"flex h-full w-full items-center justify-center",
|
|
2065
|
-
|
|
2066
|
+
en[e]
|
|
2066
2067
|
),
|
|
2067
2068
|
children: be(r, {
|
|
2068
|
-
className:
|
|
2069
|
+
className: Tr[e],
|
|
2069
2070
|
weight: "regular"
|
|
2070
2071
|
})
|
|
2071
2072
|
}
|
|
@@ -2075,16 +2076,16 @@ const Nr = {
|
|
|
2075
2076
|
]
|
|
2076
2077
|
}
|
|
2077
2078
|
);
|
|
2078
|
-
},
|
|
2079
|
-
function
|
|
2079
|
+
}, Ar = /^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2080
|
+
function Rr(e) {
|
|
2080
2081
|
const t = e.trim();
|
|
2081
2082
|
return t.startsWith("#") ? t : `#${t}`;
|
|
2082
2083
|
}
|
|
2083
|
-
const
|
|
2084
|
-
dark:
|
|
2084
|
+
const Lr = "#FFFFFF", Dn = "#040403", Mr = {
|
|
2085
|
+
dark: Lr,
|
|
2085
2086
|
light: Dn
|
|
2086
2087
|
};
|
|
2087
|
-
function
|
|
2088
|
+
function Ge({
|
|
2088
2089
|
variant: e,
|
|
2089
2090
|
accentColor: t,
|
|
2090
2091
|
status: s = "ready",
|
|
@@ -2099,7 +2100,7 @@ function Ve({
|
|
|
2099
2100
|
}, [r]);
|
|
2100
2101
|
const u = z.useCallback(() => {
|
|
2101
2102
|
d(!0);
|
|
2102
|
-
}, []), h = Ie(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null &&
|
|
2103
|
+
}, []), h = Ie(i, o), c = a === "featured" && !!r && !h && !l && s === "ready" && t != null && Ar.test(t.trim()) ? Rr(t) : void 0, p = h ? Dn : Mr[e];
|
|
2103
2104
|
return {
|
|
2104
2105
|
thumbnailUrl: l ? void 0 : r,
|
|
2105
2106
|
accentHex: c,
|
|
@@ -2109,7 +2110,7 @@ function Ve({
|
|
|
2109
2110
|
onImageError: u
|
|
2110
2111
|
};
|
|
2111
2112
|
}
|
|
2112
|
-
const
|
|
2113
|
+
const Dr = "flex size-6 items-center justify-center rounded-full bg-[#121110] text-white focus-ring", Or = "relative before:absolute before:-inset-[10px] before:content-['']", Pr = ({
|
|
2113
2114
|
title: e,
|
|
2114
2115
|
placeholderTitle: t,
|
|
2115
2116
|
description: s,
|
|
@@ -2127,7 +2128,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2127
2128
|
onEditClick: p,
|
|
2128
2129
|
dismissLabel: w = "Dismiss attachment"
|
|
2129
2130
|
}) => {
|
|
2130
|
-
const v = d === "classic", x = Ie(i, l), b =
|
|
2131
|
+
const v = d === "classic", x = Ie(i, l), b = Ge({
|
|
2131
2132
|
variant: "dark",
|
|
2132
2133
|
accentColor: m,
|
|
2133
2134
|
status: g,
|
|
@@ -2142,10 +2143,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2142
2143
|
onClick: c,
|
|
2143
2144
|
"aria-label": w,
|
|
2144
2145
|
className: k(
|
|
2145
|
-
|
|
2146
|
-
!x &&
|
|
2146
|
+
Dr,
|
|
2147
|
+
!x && Or
|
|
2147
2148
|
),
|
|
2148
|
-
children: /* @__PURE__ */ n(
|
|
2149
|
+
children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
|
|
2149
2150
|
}
|
|
2150
2151
|
) : void 0, _ = p ? /* @__PURE__ */ n(
|
|
2151
2152
|
"button",
|
|
@@ -2154,10 +2155,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2154
2155
|
onClick: p,
|
|
2155
2156
|
"aria-label": "Edit attachment",
|
|
2156
2157
|
className: "flex size-10 items-center justify-center rounded-full bg-white/10 text-white hover:bg-white/15",
|
|
2157
|
-
children: /* @__PURE__ */ n(
|
|
2158
|
+
children: /* @__PURE__ */ n(oa, { className: "size-5", weight: "regular" })
|
|
2158
2159
|
}
|
|
2159
2160
|
) : void 0;
|
|
2160
|
-
return x && !b.isLoading ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName:
|
|
2161
|
+
return x && !b.isLoading ? /* @__PURE__ */ n(Se, { variant: "dark", bgClassName: vt, children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2 pr-3", children: [
|
|
2161
2162
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ n(
|
|
2162
2163
|
Ee,
|
|
2163
2164
|
{
|
|
@@ -2191,7 +2192,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2191
2192
|
}
|
|
2192
2193
|
),
|
|
2193
2194
|
/* @__PURE__ */ n(
|
|
2194
|
-
|
|
2195
|
+
pt,
|
|
2195
2196
|
{
|
|
2196
2197
|
chinTextColor: b.chinTextColor,
|
|
2197
2198
|
variant: "dark",
|
|
@@ -2210,7 +2211,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2210
2211
|
]
|
|
2211
2212
|
}
|
|
2212
2213
|
);
|
|
2213
|
-
},
|
|
2214
|
+
}, xt = ({
|
|
2214
2215
|
accentHex: e,
|
|
2215
2216
|
side: t,
|
|
2216
2217
|
visible: s,
|
|
@@ -2235,7 +2236,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2235
2236
|
}
|
|
2236
2237
|
)
|
|
2237
2238
|
] })
|
|
2238
|
-
) : /* @__PURE__ */ n(J, { children: a }),
|
|
2239
|
+
) : /* @__PURE__ */ n(J, { children: a }), zr = ({
|
|
2239
2240
|
title: e,
|
|
2240
2241
|
description: t,
|
|
2241
2242
|
descriptionLines: s,
|
|
@@ -2251,13 +2252,13 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2251
2252
|
onClick: g,
|
|
2252
2253
|
groupPosition: c = "single"
|
|
2253
2254
|
}) => {
|
|
2254
|
-
const p =
|
|
2255
|
+
const p = bt(r, o), w = gt(a), v = u == null && w != null && !p ? w : void 0, x = u == null && !p ? g : void 0, b = m !== "loading" && Ie(r, o) ? vt : void 0, N = u && g ? {
|
|
2255
2256
|
...u,
|
|
2256
2257
|
onClick: () => {
|
|
2257
2258
|
var T;
|
|
2258
2259
|
g(), (T = u.onClick) == null || T.call(u);
|
|
2259
2260
|
}
|
|
2260
|
-
} : u, _ =
|
|
2261
|
+
} : u, _ = Ge({
|
|
2261
2262
|
variant: "light",
|
|
2262
2263
|
accentColor: h,
|
|
2263
2264
|
status: m,
|
|
@@ -2267,7 +2268,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2267
2268
|
sourceUrl: o
|
|
2268
2269
|
});
|
|
2269
2270
|
return /* @__PURE__ */ n(
|
|
2270
|
-
|
|
2271
|
+
xt,
|
|
2271
2272
|
{
|
|
2272
2273
|
accentHex: _.accentHex,
|
|
2273
2274
|
side: "receiver",
|
|
@@ -2298,7 +2299,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2298
2299
|
}
|
|
2299
2300
|
),
|
|
2300
2301
|
/* @__PURE__ */ n(
|
|
2301
|
-
|
|
2302
|
+
pt,
|
|
2302
2303
|
{
|
|
2303
2304
|
chinTextColor: _.chinTextColor,
|
|
2304
2305
|
variant: "light",
|
|
@@ -2317,7 +2318,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2317
2318
|
)
|
|
2318
2319
|
}
|
|
2319
2320
|
);
|
|
2320
|
-
},
|
|
2321
|
+
}, Fr = ({
|
|
2321
2322
|
title: e,
|
|
2322
2323
|
placeholderTitle: t,
|
|
2323
2324
|
description: s,
|
|
@@ -2334,7 +2335,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2334
2335
|
onClick: c,
|
|
2335
2336
|
groupPosition: p = "single"
|
|
2336
2337
|
}) => {
|
|
2337
|
-
const w =
|
|
2338
|
+
const w = bt(i, l), v = gt(r), x = h == null && v != null && !w ? v : void 0, b = h == null && !w && x != null ? c : void 0, N = g !== "loading" && Ie(i, l), _ = Ge({
|
|
2338
2339
|
variant: "dark",
|
|
2339
2340
|
accentColor: m,
|
|
2340
2341
|
status: g,
|
|
@@ -2344,7 +2345,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2344
2345
|
sourceUrl: l
|
|
2345
2346
|
});
|
|
2346
2347
|
return /* @__PURE__ */ n(
|
|
2347
|
-
|
|
2348
|
+
xt,
|
|
2348
2349
|
{
|
|
2349
2350
|
accentHex: _.accentHex,
|
|
2350
2351
|
side: "sender",
|
|
@@ -2358,7 +2359,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2358
2359
|
fixedHeight: d === "featured" && !N,
|
|
2359
2360
|
accentHex: _.accentHex,
|
|
2360
2361
|
busy: _.isLoading,
|
|
2361
|
-
bgClassName: N ?
|
|
2362
|
+
bgClassName: N ? vt : void 0,
|
|
2362
2363
|
children: [
|
|
2363
2364
|
d === "featured" && /* @__PURE__ */ n(
|
|
2364
2365
|
Ee,
|
|
@@ -2373,7 +2374,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2373
2374
|
}
|
|
2374
2375
|
),
|
|
2375
2376
|
/* @__PURE__ */ n(
|
|
2376
|
-
|
|
2377
|
+
pt,
|
|
2377
2378
|
{
|
|
2378
2379
|
chinTextColor: _.chinTextColor,
|
|
2379
2380
|
variant: "dark",
|
|
@@ -2393,20 +2394,20 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2393
2394
|
)
|
|
2394
2395
|
}
|
|
2395
2396
|
);
|
|
2396
|
-
},
|
|
2397
|
-
Composer:
|
|
2398
|
-
Sent:
|
|
2399
|
-
Received:
|
|
2400
|
-
},
|
|
2397
|
+
}, it = {
|
|
2398
|
+
Composer: Pr,
|
|
2399
|
+
Sent: Fr,
|
|
2400
|
+
Received: zr
|
|
2401
|
+
}, $r = {
|
|
2401
2402
|
dark: "bg-[#1e2330]",
|
|
2402
2403
|
light: "bg-[#f2f1ef]"
|
|
2403
|
-
},
|
|
2404
|
+
}, Br = {
|
|
2404
2405
|
dark: "text-white",
|
|
2405
2406
|
light: "text-[#000000]"
|
|
2406
|
-
},
|
|
2407
|
+
}, Ur = {
|
|
2407
2408
|
dark: "border-white/[0.08]",
|
|
2408
2409
|
light: "border-black/[0.08]"
|
|
2409
|
-
},
|
|
2410
|
+
}, jr = (e) => e === "dark" ? "sender" : "receiver", Hr = {
|
|
2410
2411
|
sender: {
|
|
2411
2412
|
single: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[18px]",
|
|
2412
2413
|
first: "rounded-tl-[18px] rounded-tr-[18px] rounded-bl-[18px] rounded-br-[4px]",
|
|
@@ -2431,7 +2432,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2431
2432
|
children: d,
|
|
2432
2433
|
"data-testid": u
|
|
2433
2434
|
}) => {
|
|
2434
|
-
const h = t != null && t !== "", m = o ??
|
|
2435
|
+
const h = t != null && t !== "", m = o ?? Hr[jr(e)][a];
|
|
2435
2436
|
return /* @__PURE__ */ f(
|
|
2436
2437
|
"div",
|
|
2437
2438
|
{
|
|
@@ -2460,10 +2461,10 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2460
2461
|
// there is no ambiguity to resolve.
|
|
2461
2462
|
h && "pb-0",
|
|
2462
2463
|
m,
|
|
2464
|
+
$r[e],
|
|
2463
2465
|
Br[e],
|
|
2464
|
-
Ur[e],
|
|
2465
2466
|
s && "border",
|
|
2466
|
-
s &&
|
|
2467
|
+
s && Ur[e],
|
|
2467
2468
|
l
|
|
2468
2469
|
),
|
|
2469
2470
|
children: [
|
|
@@ -2507,18 +2508,18 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2507
2508
|
"flex size-6 items-center justify-center rounded-full text-white",
|
|
2508
2509
|
t === "overlay" ? "bg-[#121110]/85 backdrop-blur" : "bg-white/15 hover:bg-white/25"
|
|
2509
2510
|
),
|
|
2510
|
-
children: /* @__PURE__ */ n(
|
|
2511
|
+
children: /* @__PURE__ */ n(lt, { className: "size-3", weight: "bold" })
|
|
2511
2512
|
}
|
|
2512
|
-
), Re = (e) => e === "received" ? "light" : "dark",
|
|
2513
|
+
), Re = (e) => e === "received" ? "light" : "dark", no = ({
|
|
2513
2514
|
firstOfGroup: e,
|
|
2514
2515
|
endOfGroup: t,
|
|
2515
2516
|
groupedByUser: s
|
|
2516
|
-
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle",
|
|
2517
|
+
}) => !s || e && t ? "single" : e ? "first" : t ? "end" : "middle", Vr = ({
|
|
2517
2518
|
src: e,
|
|
2518
2519
|
mimeType: t,
|
|
2519
2520
|
filename: s,
|
|
2520
2521
|
items: a
|
|
2521
|
-
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [],
|
|
2522
|
+
}) => a && a.length > 0 ? a : e ? [{ src: e, mimeType: t, filename: s }] : [], Gr = ({ item: e, preload: t, trailingAction: s }) => /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
2522
2523
|
/* @__PURE__ */ n(
|
|
2523
2524
|
"audio",
|
|
2524
2525
|
{
|
|
@@ -2530,7 +2531,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2530
2531
|
}
|
|
2531
2532
|
),
|
|
2532
2533
|
s ?? null
|
|
2533
|
-
] }),
|
|
2534
|
+
] }), wt = ({
|
|
2534
2535
|
state: e,
|
|
2535
2536
|
src: t,
|
|
2536
2537
|
mimeType: s,
|
|
@@ -2541,7 +2542,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2541
2542
|
preload: l,
|
|
2542
2543
|
onDismiss: d
|
|
2543
2544
|
}) => {
|
|
2544
|
-
const u = Re(e), h = e === "composer" && !!d, m =
|
|
2545
|
+
const u = Re(e), h = e === "composer" && !!d, m = Vr({ src: t, mimeType: s, filename: a, items: r });
|
|
2545
2546
|
if (m.length === 0)
|
|
2546
2547
|
return null;
|
|
2547
2548
|
const g = l ?? (m.length > 1 ? "none" : "metadata");
|
|
@@ -2553,7 +2554,7 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2553
2554
|
groupPosition: o,
|
|
2554
2555
|
"data-testid": "audio-attachment",
|
|
2555
2556
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: m.map((c, p) => /* @__PURE__ */ n(
|
|
2556
|
-
|
|
2557
|
+
Gr,
|
|
2557
2558
|
{
|
|
2558
2559
|
item: c,
|
|
2559
2560
|
preload: g,
|
|
@@ -2567,15 +2568,15 @@ const Or = "flex size-6 items-center justify-center rounded-full bg-[#121110] te
|
|
|
2567
2568
|
)) })
|
|
2568
2569
|
}
|
|
2569
2570
|
);
|
|
2570
|
-
},
|
|
2571
|
-
Composer:
|
|
2572
|
-
Sent:
|
|
2573
|
-
Received:
|
|
2571
|
+
}, Yr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "composer" }), Wr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "sent" }), Xr = (e) => /* @__PURE__ */ n(wt, { ...e, state: "received" }), qr = {
|
|
2572
|
+
Composer: Yr,
|
|
2573
|
+
Sent: Wr,
|
|
2574
|
+
Received: Xr
|
|
2574
2575
|
};
|
|
2575
|
-
function
|
|
2576
|
+
function Kr(e) {
|
|
2576
2577
|
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`;
|
|
2577
2578
|
}
|
|
2578
|
-
const
|
|
2579
|
+
const Zr = {
|
|
2579
2580
|
pdf: "PDF",
|
|
2580
2581
|
doc: "DOC",
|
|
2581
2582
|
xls: "XLS",
|
|
@@ -2585,7 +2586,7 @@ const Jr = {
|
|
|
2585
2586
|
text: "TXT",
|
|
2586
2587
|
markdown: "MD"
|
|
2587
2588
|
};
|
|
2588
|
-
function
|
|
2589
|
+
function Jr(e, t) {
|
|
2589
2590
|
if (t) {
|
|
2590
2591
|
const r = t.lastIndexOf(".");
|
|
2591
2592
|
if (r > 0 && r < t.length - 1) {
|
|
@@ -2595,7 +2596,7 @@ function Qr(e, t) {
|
|
|
2595
2596
|
}
|
|
2596
2597
|
if (!e) return;
|
|
2597
2598
|
if (de(e) === "document") {
|
|
2598
|
-
const r =
|
|
2599
|
+
const r = Nn(e), i = Zr[r];
|
|
2599
2600
|
if (i) return i;
|
|
2600
2601
|
if (e === "application/octet-stream") return;
|
|
2601
2602
|
}
|
|
@@ -2603,8 +2604,8 @@ function Qr(e, t) {
|
|
|
2603
2604
|
if (!(!a || a === "*"))
|
|
2604
2605
|
return a.toUpperCase();
|
|
2605
2606
|
}
|
|
2606
|
-
function
|
|
2607
|
-
const a =
|
|
2607
|
+
function Qr(e, t, s) {
|
|
2608
|
+
const a = Jr(e, t), r = typeof s == "number" && s > 0 ? Kr(s) : void 0;
|
|
2608
2609
|
return [a, r].filter(Boolean).join(" · ") || void 0;
|
|
2609
2610
|
}
|
|
2610
2611
|
function ae(e) {
|
|
@@ -2615,13 +2616,13 @@ function ae(e) {
|
|
|
2615
2616
|
return "download";
|
|
2616
2617
|
}
|
|
2617
2618
|
}
|
|
2618
|
-
const
|
|
2619
|
+
const ei = {
|
|
2619
2620
|
dark: "text-white/55",
|
|
2620
2621
|
light: "text-black/65"
|
|
2621
|
-
},
|
|
2622
|
+
}, ti = {
|
|
2622
2623
|
dark: "bg-white/10",
|
|
2623
2624
|
light: "bg-black/5"
|
|
2624
|
-
},
|
|
2625
|
+
}, ni = {
|
|
2625
2626
|
dark: "text-white/85",
|
|
2626
2627
|
light: "text-black/85"
|
|
2627
2628
|
}, On = ({
|
|
@@ -2634,16 +2635,16 @@ const ti = {
|
|
|
2634
2635
|
activateLabel: o,
|
|
2635
2636
|
trailingAction: l
|
|
2636
2637
|
}) => {
|
|
2637
|
-
const d = s ?? t ?? "File", u =
|
|
2638
|
+
const d = s ?? t ?? "File", u = Qr(a, t, r), h = /* @__PURE__ */ n(
|
|
2638
2639
|
"div",
|
|
2639
2640
|
{
|
|
2640
2641
|
className: k(
|
|
2641
2642
|
"flex size-10 shrink-0 items-center justify-center rounded-sm",
|
|
2642
|
-
|
|
2643
|
+
ti[e]
|
|
2643
2644
|
),
|
|
2644
2645
|
"aria-hidden": !0,
|
|
2645
2646
|
children: be(a, {
|
|
2646
|
-
className: k("size-6",
|
|
2647
|
+
className: k("size-6", ni[e]),
|
|
2647
2648
|
weight: "regular"
|
|
2648
2649
|
})
|
|
2649
2650
|
}
|
|
@@ -2654,7 +2655,7 @@ const ti = {
|
|
|
2654
2655
|
{
|
|
2655
2656
|
className: k(
|
|
2656
2657
|
"truncate text-xs leading-4",
|
|
2657
|
-
|
|
2658
|
+
ei[e]
|
|
2658
2659
|
),
|
|
2659
2660
|
children: u
|
|
2660
2661
|
}
|
|
@@ -2697,14 +2698,14 @@ async function Pn(e, t) {
|
|
|
2697
2698
|
}
|
|
2698
2699
|
}
|
|
2699
2700
|
}
|
|
2700
|
-
const
|
|
2701
|
+
const si = ({
|
|
2701
2702
|
src: e,
|
|
2702
2703
|
filename: t,
|
|
2703
2704
|
fileSize: s,
|
|
2704
2705
|
mimeType: a,
|
|
2705
2706
|
title: r,
|
|
2706
2707
|
items: i
|
|
2707
|
-
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [],
|
|
2708
|
+
}) => i && i.length > 0 ? i : e ? [{ src: e, filename: t, fileSize: s, mimeType: a, title: r }] : [], ai = ({
|
|
2708
2709
|
variant: e,
|
|
2709
2710
|
item: t,
|
|
2710
2711
|
index: s,
|
|
@@ -2725,7 +2726,7 @@ const ai = ({
|
|
|
2725
2726
|
trailingAction: r
|
|
2726
2727
|
}
|
|
2727
2728
|
);
|
|
2728
|
-
},
|
|
2729
|
+
}, _t = ({
|
|
2729
2730
|
state: e,
|
|
2730
2731
|
src: t,
|
|
2731
2732
|
filename: s,
|
|
@@ -2738,7 +2739,7 @@ const ai = ({
|
|
|
2738
2739
|
onClick: u,
|
|
2739
2740
|
onDismiss: h
|
|
2740
2741
|
}) => {
|
|
2741
|
-
const m = Re(e), g = e === "composer" && !!h, c =
|
|
2742
|
+
const m = Re(e), g = e === "composer" && !!h, c = si({
|
|
2742
2743
|
src: t,
|
|
2743
2744
|
filename: s,
|
|
2744
2745
|
fileSize: a,
|
|
@@ -2773,7 +2774,7 @@ const ai = ({
|
|
|
2773
2774
|
groupPosition: d,
|
|
2774
2775
|
"data-testid": "file-attachment",
|
|
2775
2776
|
children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: c.map((v, x) => /* @__PURE__ */ n(
|
|
2776
|
-
|
|
2777
|
+
ai,
|
|
2777
2778
|
{
|
|
2778
2779
|
variant: m,
|
|
2779
2780
|
item: v,
|
|
@@ -2785,11 +2786,11 @@ const ai = ({
|
|
|
2785
2786
|
)) })
|
|
2786
2787
|
}
|
|
2787
2788
|
);
|
|
2788
|
-
},
|
|
2789
|
-
Composer:
|
|
2790
|
-
Sent:
|
|
2791
|
-
Received:
|
|
2792
|
-
}, zn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40",
|
|
2789
|
+
}, ri = (e) => /* @__PURE__ */ n(_t, { ...e, state: "composer" }), ii = (e) => /* @__PURE__ */ n(_t, { ...e, state: "sent" }), li = (e) => /* @__PURE__ */ n(_t, { ...e, state: "received" }), oi = {
|
|
2790
|
+
Composer: ri,
|
|
2791
|
+
Sent: ii,
|
|
2792
|
+
Received: li
|
|
2793
|
+
}, zn = "inline-flex size-10 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none disabled:cursor-default disabled:opacity-40", tn = "absolute top-1/2 z-[1] inline-flex size-12 -translate-y-1/2 items-center justify-center rounded-full border-0 bg-white/[0.12] p-0 text-white transition-colors duration-150 ease-[ease] hover:bg-white/[0.22] focus-visible:bg-white/[0.22] focus-visible:outline-none", yt = ({
|
|
2793
2794
|
onPrev: e,
|
|
2794
2795
|
onNext: t,
|
|
2795
2796
|
prevLabel: s = "Previous",
|
|
@@ -2801,8 +2802,8 @@ const ai = ({
|
|
|
2801
2802
|
type: "button",
|
|
2802
2803
|
onClick: e,
|
|
2803
2804
|
"aria-label": s,
|
|
2804
|
-
className: `${
|
|
2805
|
-
children: /* @__PURE__ */ n(
|
|
2805
|
+
className: `${tn} left-4`,
|
|
2806
|
+
children: /* @__PURE__ */ n(ca, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2806
2807
|
}
|
|
2807
2808
|
),
|
|
2808
2809
|
/* @__PURE__ */ n(
|
|
@@ -2811,8 +2812,8 @@ const ai = ({
|
|
|
2811
2812
|
type: "button",
|
|
2812
2813
|
onClick: t,
|
|
2813
2814
|
"aria-label": a,
|
|
2814
|
-
className: `${
|
|
2815
|
-
children: /* @__PURE__ */ n(
|
|
2815
|
+
className: `${tn} right-4`,
|
|
2816
|
+
children: /* @__PURE__ */ n(hn, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
2816
2817
|
}
|
|
2817
2818
|
)
|
|
2818
2819
|
] }), Fn = ({
|
|
@@ -2900,16 +2901,16 @@ const ai = ({
|
|
|
2900
2901
|
]
|
|
2901
2902
|
}
|
|
2902
2903
|
);
|
|
2903
|
-
},
|
|
2904
|
+
}, Qe = (e, t, s) => Math.min(Math.max(e, t), s), Nt = ({
|
|
2904
2905
|
length: e,
|
|
2905
2906
|
initialIndex: t,
|
|
2906
2907
|
open: s
|
|
2907
2908
|
}) => {
|
|
2908
|
-
const a =
|
|
2909
|
+
const a = Qe(t, 0, Math.max(e - 1, 0)), [r, i] = B(a);
|
|
2909
2910
|
Y(() => {
|
|
2910
|
-
s && i(
|
|
2911
|
+
s && i(Qe(t, 0, Math.max(e - 1, 0)));
|
|
2911
2912
|
}, [s, t, e]), Y(() => {
|
|
2912
|
-
i((d) =>
|
|
2913
|
+
i((d) => Qe(d, 0, Math.max(e - 1, 0)));
|
|
2913
2914
|
}, [e]);
|
|
2914
2915
|
const o = Z(() => {
|
|
2915
2916
|
e <= 1 || i((d) => d <= 0 ? e - 1 : d - 1);
|
|
@@ -2925,7 +2926,7 @@ const ai = ({
|
|
|
2925
2926
|
};
|
|
2926
2927
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2927
2928
|
}, [s, e, o, l]), { index: r, prev: o, next: l };
|
|
2928
|
-
},
|
|
2929
|
+
}, kt = ({
|
|
2929
2930
|
open: e,
|
|
2930
2931
|
onClose: t,
|
|
2931
2932
|
ariaLabel: s,
|
|
@@ -3006,7 +3007,7 @@ const ai = ({
|
|
|
3006
3007
|
onClick: t,
|
|
3007
3008
|
"aria-label": "Close viewer",
|
|
3008
3009
|
className: zn,
|
|
3009
|
-
children: /* @__PURE__ */ n(
|
|
3010
|
+
children: /* @__PURE__ */ n(lt, { size: 20, weight: "bold", "aria-hidden": !0 })
|
|
3010
3011
|
}
|
|
3011
3012
|
)
|
|
3012
3013
|
] })
|
|
@@ -3021,7 +3022,7 @@ const ai = ({
|
|
|
3021
3022
|
initialIndex: s = 0,
|
|
3022
3023
|
onClose: a
|
|
3023
3024
|
}) => {
|
|
3024
|
-
const { index: r, prev: i, next: o } =
|
|
3025
|
+
const { index: r, prev: i, next: o } = Nt({
|
|
3025
3026
|
length: t.length,
|
|
3026
3027
|
initialIndex: s,
|
|
3027
3028
|
open: e
|
|
@@ -3030,7 +3031,7 @@ const ai = ({
|
|
|
3030
3031
|
[l]
|
|
3031
3032
|
);
|
|
3032
3033
|
return l ? /* @__PURE__ */ f(
|
|
3033
|
-
|
|
3034
|
+
kt,
|
|
3034
3035
|
{
|
|
3035
3036
|
open: e,
|
|
3036
3037
|
onClose: a,
|
|
@@ -3059,7 +3060,7 @@ const ai = ({
|
|
|
3059
3060
|
`${r}:${l.src}`
|
|
3060
3061
|
) : null,
|
|
3061
3062
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3062
|
-
|
|
3063
|
+
yt,
|
|
3063
3064
|
{
|
|
3064
3065
|
onPrev: i,
|
|
3065
3066
|
onNext: o,
|
|
@@ -3070,7 +3071,7 @@ const ai = ({
|
|
|
3070
3071
|
]
|
|
3071
3072
|
}
|
|
3072
3073
|
) : null;
|
|
3073
|
-
},
|
|
3074
|
+
}, ci = "relative block size-full overflow-hidden bg-black/5 outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-2 focus-visible:after:ring-inset focus-visible:after:ring-white/80 focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-black", di = {
|
|
3074
3075
|
1: ["rounded-[18px]"],
|
|
3075
3076
|
2: ["rounded-l-[18px]", "rounded-r-[18px]"],
|
|
3076
3077
|
3: ["rounded-l-[18px]", "rounded-tr-[18px]", "rounded-br-[18px]"],
|
|
@@ -3080,7 +3081,7 @@ const ai = ({
|
|
|
3080
3081
|
"rounded-bl-[18px]",
|
|
3081
3082
|
"rounded-br-[18px]"
|
|
3082
3083
|
]
|
|
3083
|
-
},
|
|
3084
|
+
}, ui = "--mes-single-width-cap", mi = "[--mes-single-width-cap:309px] sm:[--mes-single-width-cap:326px]", hi = 436, Bn = ({
|
|
3084
3085
|
tiles: e,
|
|
3085
3086
|
onTileActivate: t,
|
|
3086
3087
|
maxVisible: s = 4,
|
|
@@ -3092,9 +3093,9 @@ const ai = ({
|
|
|
3092
3093
|
const o = e.slice(0, Math.min(i, s)), l = i - o.length, d = (h, m, g) => {
|
|
3093
3094
|
var p;
|
|
3094
3095
|
const c = k(
|
|
3095
|
-
|
|
3096
|
+
ci,
|
|
3096
3097
|
"h-full w-full",
|
|
3097
|
-
(p =
|
|
3098
|
+
(p = di[o.length]) == null ? void 0 : p[m]
|
|
3098
3099
|
);
|
|
3099
3100
|
return t ? /* @__PURE__ */ f(
|
|
3100
3101
|
"button",
|
|
@@ -3119,14 +3120,14 @@ const ai = ({
|
|
|
3119
3120
|
aspectRatio: a,
|
|
3120
3121
|
// Hundredths keep the emitted declaration readable in devtools;
|
|
3121
3122
|
// the rounding error is well under a device pixel.
|
|
3122
|
-
width: `min(var(${
|
|
3123
|
+
width: `min(var(${ui}), ${Math.round(hi * a * 100) / 100}px)`,
|
|
3123
3124
|
// Only bites in a container narrower than the width cap.
|
|
3124
3125
|
maxWidth: "100%"
|
|
3125
3126
|
}), o.length === 1 ? /* @__PURE__ */ n(
|
|
3126
3127
|
"div",
|
|
3127
3128
|
{
|
|
3128
3129
|
className: k(
|
|
3129
|
-
a ?
|
|
3130
|
+
a ? mi : "aspect-square w-full",
|
|
3130
3131
|
r
|
|
3131
3132
|
),
|
|
3132
3133
|
style: u,
|
|
@@ -3189,7 +3190,7 @@ const ai = ({
|
|
|
3189
3190
|
[e]
|
|
3190
3191
|
), o = Z(() => s(!1), []);
|
|
3191
3192
|
return { viewerOpen: t, viewerIndex: a, handleActivate: i, closeViewer: o };
|
|
3192
|
-
},
|
|
3193
|
+
}, fi = ({
|
|
3193
3194
|
item: e,
|
|
3194
3195
|
index: t,
|
|
3195
3196
|
totalCount: s,
|
|
@@ -3217,7 +3218,7 @@ const ai = ({
|
|
|
3217
3218
|
}
|
|
3218
3219
|
)
|
|
3219
3220
|
)
|
|
3220
|
-
}),
|
|
3221
|
+
}), gi = ({
|
|
3221
3222
|
src: e,
|
|
3222
3223
|
alt: t,
|
|
3223
3224
|
items: s
|
|
@@ -3225,7 +3226,7 @@ const ai = ({
|
|
|
3225
3226
|
src: s.src,
|
|
3226
3227
|
alt: s.alt,
|
|
3227
3228
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3228
|
-
})),
|
|
3229
|
+
})), pi = ({ src: e, alt: t, filename: s, loading: a = "lazy", onClick: r, onDismiss: i }) => {
|
|
3229
3230
|
const { viewerOpen: o, viewerIndex: l, handleActivate: d, closeViewer: u } = Le(r);
|
|
3230
3231
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3231
3232
|
/* @__PURE__ */ n(
|
|
@@ -3259,7 +3260,7 @@ const ai = ({
|
|
|
3259
3260
|
}
|
|
3260
3261
|
)
|
|
3261
3262
|
] });
|
|
3262
|
-
},
|
|
3263
|
+
}, bi = 326 / 246, vi = (e) => {
|
|
3263
3264
|
const t = e == null ? void 0 : e.src, [s, a] = z.useState(), r = z.useCallback(
|
|
3264
3265
|
(d) => {
|
|
3265
3266
|
if (!d || d.naturalWidth <= 0 || d.naturalHeight <= 0 || t === void 0) return;
|
|
@@ -3274,7 +3275,7 @@ const ai = ({
|
|
|
3274
3275
|
[r]
|
|
3275
3276
|
), o = e != null && e.width && (e != null && e.height) ? e.width / e.height : void 0, l = s && s.src === t ? s.ratio : void 0;
|
|
3276
3277
|
return {
|
|
3277
|
-
ratio: o ?? l ??
|
|
3278
|
+
ratio: o ?? l ?? bi,
|
|
3278
3279
|
imgRef: r,
|
|
3279
3280
|
onLoad: i
|
|
3280
3281
|
};
|
|
@@ -3289,11 +3290,11 @@ const ai = ({
|
|
|
3289
3290
|
loading: l = "lazy",
|
|
3290
3291
|
onClick: d
|
|
3291
3292
|
}) => {
|
|
3292
|
-
const u =
|
|
3293
|
+
const u = gi({ src: t, alt: s, items: r }), h = Re(e), { viewerOpen: m, viewerIndex: g, handleActivate: c, closeViewer: p } = Le(d), w = u.length === 1, v = vi(w ? u[0] : void 0);
|
|
3293
3294
|
if (u.length === 0)
|
|
3294
3295
|
return null;
|
|
3295
3296
|
const x = u.map(
|
|
3296
|
-
(b, N) =>
|
|
3297
|
+
(b, N) => fi({
|
|
3297
3298
|
item: b,
|
|
3298
3299
|
index: N,
|
|
3299
3300
|
totalCount: u.length,
|
|
@@ -3334,17 +3335,17 @@ const ai = ({
|
|
|
3334
3335
|
]
|
|
3335
3336
|
}
|
|
3336
3337
|
);
|
|
3337
|
-
},
|
|
3338
|
-
Composer:
|
|
3339
|
-
Sent:
|
|
3340
|
-
Received:
|
|
3341
|
-
},
|
|
3338
|
+
}, xi = (e) => /* @__PURE__ */ n(pi, { ...e }), wi = (e) => /* @__PURE__ */ n(jn, { ...e, state: "sent" }), _i = (e) => /* @__PURE__ */ n(jn, { ...e, state: "received" }), yi = {
|
|
3339
|
+
Composer: xi,
|
|
3340
|
+
Sent: wi,
|
|
3341
|
+
Received: _i
|
|
3342
|
+
}, Ni = ({
|
|
3342
3343
|
open: e,
|
|
3343
3344
|
items: t,
|
|
3344
3345
|
initialIndex: s = 0,
|
|
3345
3346
|
onClose: a
|
|
3346
3347
|
}) => {
|
|
3347
|
-
const { index: r, prev: i, next: o } =
|
|
3348
|
+
const { index: r, prev: i, next: o } = Nt({
|
|
3348
3349
|
length: t.length,
|
|
3349
3350
|
initialIndex: s,
|
|
3350
3351
|
open: e
|
|
@@ -3352,11 +3353,11 @@ const ai = ({
|
|
|
3352
3353
|
() => (l == null ? void 0 : l.filename) ?? (l ? ae(l.src) : "document"),
|
|
3353
3354
|
[l]
|
|
3354
3355
|
), u = le(
|
|
3355
|
-
() => l ?
|
|
3356
|
+
() => l ? ki(l.src) : void 0,
|
|
3356
3357
|
[l]
|
|
3357
3358
|
);
|
|
3358
3359
|
return !l || !u ? null : /* @__PURE__ */ f(
|
|
3359
|
-
|
|
3360
|
+
kt,
|
|
3360
3361
|
{
|
|
3361
3362
|
open: e,
|
|
3362
3363
|
onClose: a,
|
|
@@ -3375,7 +3376,7 @@ const ai = ({
|
|
|
3375
3376
|
`${r}:${l.src}`
|
|
3376
3377
|
),
|
|
3377
3378
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3378
|
-
|
|
3379
|
+
yt,
|
|
3379
3380
|
{
|
|
3380
3381
|
onPrev: i,
|
|
3381
3382
|
onNext: o,
|
|
@@ -3386,16 +3387,16 @@ const ai = ({
|
|
|
3386
3387
|
]
|
|
3387
3388
|
}
|
|
3388
3389
|
);
|
|
3389
|
-
},
|
|
3390
|
+
}, ki = (e) => {
|
|
3390
3391
|
const t = e.indexOf("#"), s = t === -1 ? e : e.slice(0, t), a = t === -1 ? "" : e.slice(t + 1), r = new URLSearchParams(a);
|
|
3391
3392
|
return r.has("toolbar") || r.set("toolbar", "0"), r.has("navpanes") || r.set("navpanes", "0"), `${s}#${r.toString()}`;
|
|
3392
|
-
},
|
|
3393
|
+
}, Ci = ({
|
|
3393
3394
|
src: e,
|
|
3394
3395
|
filename: t,
|
|
3395
3396
|
fileSize: s,
|
|
3396
3397
|
title: a,
|
|
3397
3398
|
items: r
|
|
3398
|
-
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [],
|
|
3399
|
+
}) => r && r.length > 0 ? r : e ? [{ src: e, filename: t, fileSize: s, title: a }] : [], Si = ({
|
|
3399
3400
|
variant: e,
|
|
3400
3401
|
item: t,
|
|
3401
3402
|
index: s,
|
|
@@ -3416,7 +3417,7 @@ const ai = ({
|
|
|
3416
3417
|
trailingAction: r
|
|
3417
3418
|
}
|
|
3418
3419
|
);
|
|
3419
|
-
},
|
|
3420
|
+
}, Ct = ({
|
|
3420
3421
|
state: e,
|
|
3421
3422
|
src: t,
|
|
3422
3423
|
filename: s,
|
|
@@ -3428,7 +3429,7 @@ const ai = ({
|
|
|
3428
3429
|
onClick: d,
|
|
3429
3430
|
onDismiss: u
|
|
3430
3431
|
}) => {
|
|
3431
|
-
const h = Re(e), m =
|
|
3432
|
+
const h = Re(e), m = Ci({ src: t, filename: s, fileSize: a, title: r, items: i }), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Le(d), v = e === "composer" && !!u;
|
|
3432
3433
|
if (m.length === 0)
|
|
3433
3434
|
return null;
|
|
3434
3435
|
const x = m.map((b) => ({
|
|
@@ -3455,7 +3456,7 @@ const ai = ({
|
|
|
3455
3456
|
}
|
|
3456
3457
|
);
|
|
3457
3458
|
return /* @__PURE__ */ n(
|
|
3458
|
-
|
|
3459
|
+
Si,
|
|
3459
3460
|
{
|
|
3460
3461
|
variant: h,
|
|
3461
3462
|
item: b,
|
|
@@ -3467,7 +3468,7 @@ const ai = ({
|
|
|
3467
3468
|
);
|
|
3468
3469
|
}) }),
|
|
3469
3470
|
/* @__PURE__ */ n(
|
|
3470
|
-
|
|
3471
|
+
Ni,
|
|
3471
3472
|
{
|
|
3472
3473
|
open: g,
|
|
3473
3474
|
items: x,
|
|
@@ -3478,17 +3479,17 @@ const ai = ({
|
|
|
3478
3479
|
]
|
|
3479
3480
|
}
|
|
3480
3481
|
);
|
|
3481
|
-
},
|
|
3482
|
-
Composer:
|
|
3483
|
-
Sent:
|
|
3484
|
-
Received:
|
|
3482
|
+
}, Ei = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "composer" }), Ii = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "sent" }), Ti = (e) => /* @__PURE__ */ n(Ct, { ...e, state: "received" }), Ai = {
|
|
3483
|
+
Composer: Ei,
|
|
3484
|
+
Sent: Ii,
|
|
3485
|
+
Received: Ti
|
|
3485
3486
|
}, Hn = ({
|
|
3486
3487
|
open: e,
|
|
3487
3488
|
items: t,
|
|
3488
3489
|
initialIndex: s = 0,
|
|
3489
3490
|
onClose: a
|
|
3490
3491
|
}) => {
|
|
3491
|
-
const { index: r, prev: i, next: o } =
|
|
3492
|
+
const { index: r, prev: i, next: o } = Nt({
|
|
3492
3493
|
length: t.length,
|
|
3493
3494
|
initialIndex: s,
|
|
3494
3495
|
open: e
|
|
@@ -3497,7 +3498,7 @@ const ai = ({
|
|
|
3497
3498
|
[l]
|
|
3498
3499
|
);
|
|
3499
3500
|
return l ? /* @__PURE__ */ f(
|
|
3500
|
-
|
|
3501
|
+
kt,
|
|
3501
3502
|
{
|
|
3502
3503
|
open: e,
|
|
3503
3504
|
onClose: a,
|
|
@@ -3521,7 +3522,7 @@ const ai = ({
|
|
|
3521
3522
|
`${r}:${l.src}`
|
|
3522
3523
|
),
|
|
3523
3524
|
t.length > 1 ? /* @__PURE__ */ n(
|
|
3524
|
-
|
|
3525
|
+
yt,
|
|
3525
3526
|
{
|
|
3526
3527
|
onPrev: i,
|
|
3527
3528
|
onNext: o,
|
|
@@ -3532,7 +3533,7 @@ const ai = ({
|
|
|
3532
3533
|
]
|
|
3533
3534
|
}
|
|
3534
3535
|
) : null;
|
|
3535
|
-
},
|
|
3536
|
+
}, Ri = () => /* @__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(rt, { className: "size-6", weight: "fill", "aria-hidden": !0 }) }) }), Vn = ({
|
|
3536
3537
|
item: e,
|
|
3537
3538
|
index: t
|
|
3538
3539
|
}) => /* @__PURE__ */ f("div", { className: "absolute inset-0 size-full bg-[#0d0d0d]", children: [
|
|
@@ -3547,18 +3548,18 @@ const ai = ({
|
|
|
3547
3548
|
className: "absolute inset-0 size-full object-cover"
|
|
3548
3549
|
}
|
|
3549
3550
|
) : /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(
|
|
3550
|
-
|
|
3551
|
+
gn,
|
|
3551
3552
|
{
|
|
3552
3553
|
className: "size-16 text-white/30",
|
|
3553
3554
|
weight: "regular",
|
|
3554
3555
|
"aria-hidden": !0
|
|
3555
3556
|
}
|
|
3556
3557
|
) }),
|
|
3557
|
-
/* @__PURE__ */ n(
|
|
3558
|
-
] }),
|
|
3558
|
+
/* @__PURE__ */ n(Ri, {})
|
|
3559
|
+
] }), Li = (e, t, s) => ({
|
|
3559
3560
|
ariaLabel: `Play video ${t + 1} of ${s}`,
|
|
3560
3561
|
content: /* @__PURE__ */ n(Vn, { item: e, index: t })
|
|
3561
|
-
}),
|
|
3562
|
+
}), Mi = ({
|
|
3562
3563
|
src: e,
|
|
3563
3564
|
poster: t,
|
|
3564
3565
|
mimeType: s,
|
|
@@ -3570,7 +3571,7 @@ const ai = ({
|
|
|
3570
3571
|
mimeType: s.mimeType,
|
|
3571
3572
|
preload: s.preload,
|
|
3572
3573
|
filename: t && e.length === 1 ? t : t ? `${t} (${a + 1})` : void 0
|
|
3573
|
-
})),
|
|
3574
|
+
})), Di = ({ src: e, poster: t, mimeType: s, filename: a, preload: r, onClick: i, onDismiss: o }) => {
|
|
3574
3575
|
const { viewerOpen: l, viewerIndex: d, handleActivate: u, closeViewer: h } = Le(i);
|
|
3575
3576
|
return /* @__PURE__ */ f("div", { className: "relative w-fit", children: [
|
|
3576
3577
|
/* @__PURE__ */ n(
|
|
@@ -3606,11 +3607,11 @@ const ai = ({
|
|
|
3606
3607
|
preload: d,
|
|
3607
3608
|
onClick: u
|
|
3608
3609
|
}) => {
|
|
3609
|
-
const h =
|
|
3610
|
+
const h = Mi({ src: t, poster: s, mimeType: a, preload: d, items: i }), m = Re(e), { viewerOpen: g, viewerIndex: c, handleActivate: p, closeViewer: w } = Le(u);
|
|
3610
3611
|
if (h.length === 0)
|
|
3611
3612
|
return null;
|
|
3612
3613
|
const v = h.map(
|
|
3613
|
-
(x, b) =>
|
|
3614
|
+
(x, b) => Li(x, b, h.length)
|
|
3614
3615
|
);
|
|
3615
3616
|
return /* @__PURE__ */ f(
|
|
3616
3617
|
Te,
|
|
@@ -3633,28 +3634,28 @@ const ai = ({
|
|
|
3633
3634
|
]
|
|
3634
3635
|
}
|
|
3635
3636
|
);
|
|
3636
|
-
},
|
|
3637
|
-
Composer:
|
|
3638
|
-
Sent:
|
|
3639
|
-
Received:
|
|
3637
|
+
}, Oi = (e) => /* @__PURE__ */ n(Di, { ...e }), Pi = (e) => /* @__PURE__ */ n(Yn, { ...e, state: "sent" }), zi = (e) => /* @__PURE__ */ n(Yn, { ...e, state: "received" }), Fi = {
|
|
3638
|
+
Composer: Oi,
|
|
3639
|
+
Sent: Pi,
|
|
3640
|
+
Received: zi
|
|
3640
3641
|
}, Ne = {
|
|
3641
|
-
Image:
|
|
3642
|
-
Video:
|
|
3643
|
-
Audio:
|
|
3644
|
-
Pdf:
|
|
3645
|
-
File:
|
|
3642
|
+
Image: yi,
|
|
3643
|
+
Video: Fi,
|
|
3644
|
+
Audio: qr,
|
|
3645
|
+
Pdf: Ai,
|
|
3646
|
+
File: oi
|
|
3646
3647
|
};
|
|
3647
3648
|
function O(e) {
|
|
3648
3649
|
const t = e == null ? void 0 : e.trim();
|
|
3649
3650
|
return t || void 0;
|
|
3650
3651
|
}
|
|
3651
|
-
function
|
|
3652
|
+
function nn(e) {
|
|
3652
3653
|
return e.trim().replace(/^https?:\/\//i, "").replace(/\/+$/, "").toLowerCase();
|
|
3653
3654
|
}
|
|
3654
|
-
function
|
|
3655
|
+
function $i(e, t) {
|
|
3655
3656
|
if (!(e != null && e.trim()) || !(t != null && t.trim()))
|
|
3656
3657
|
return !1;
|
|
3657
|
-
const s =
|
|
3658
|
+
const s = nn(e), a = nn(t);
|
|
3658
3659
|
if (s === a)
|
|
3659
3660
|
return !0;
|
|
3660
3661
|
if (!s.includes(a))
|
|
@@ -3662,7 +3663,7 @@ function Bi(e, t) {
|
|
|
3662
3663
|
const r = s.split(a).join("");
|
|
3663
3664
|
return !/[^\p{P}\p{Z}\p{C}]/u.test(r);
|
|
3664
3665
|
}
|
|
3665
|
-
function
|
|
3666
|
+
function sn(e) {
|
|
3666
3667
|
const t = O(e.og_scrape_url) ?? O(e.title_link), s = O(e.image_url) ?? O(e.thumb_url), a = O(e.asset_url), r = O(e.mime_type);
|
|
3667
3668
|
return {
|
|
3668
3669
|
title: O(e.title),
|
|
@@ -3672,7 +3673,7 @@ function nn(e) {
|
|
|
3672
3673
|
// Playable clip embedded in a link preview — lets LinkAttachment render its
|
|
3673
3674
|
// native video/audio player in the hero instead of a static thumbnail.
|
|
3674
3675
|
sourceUrl: a,
|
|
3675
|
-
layout: s ||
|
|
3676
|
+
layout: s || bt(r, a) ? "featured" : "classic",
|
|
3676
3677
|
mimeType: r,
|
|
3677
3678
|
// Dominant colour of the image, resolved by the sender at stage time and
|
|
3678
3679
|
// persisted on the attachment (`stream-custom-data.ts`), so every viewer
|
|
@@ -3684,15 +3685,11 @@ function nn(e) {
|
|
|
3684
3685
|
status: "ready"
|
|
3685
3686
|
};
|
|
3686
3687
|
}
|
|
3687
|
-
function
|
|
3688
|
+
function Bi(e) {
|
|
3688
3689
|
var t;
|
|
3689
|
-
return
|
|
3690
|
+
return Ve(e) ? null : e.type === "image" ? e.image_url || e.asset_url ? "image" : null : e.type === "video" && e.asset_url ? "video" : e.type === "audio" && e.asset_url ? "audio" : e.type === "file" && e.asset_url ? e.mime_type === "application/pdf" ? "pdf" : (t = e.mime_type) != null && t.startsWith("audio/") ? "audio" : "file" : null;
|
|
3690
3691
|
}
|
|
3691
3692
|
function Wn(e) {
|
|
3692
|
-
const t = O(e.og_scrape_url);
|
|
3693
|
-
return e.type === "link" || !!t && !e.asset_url;
|
|
3694
|
-
}
|
|
3695
|
-
function Xn(e) {
|
|
3696
3693
|
if (!(e != null && e.length)) return [];
|
|
3697
3694
|
const t = [], s = (r, i) => {
|
|
3698
3695
|
const o = t[t.length - 1];
|
|
@@ -3710,25 +3707,25 @@ function Xn(e) {
|
|
|
3710
3707
|
t.push({ type: "link", attachments: [r] });
|
|
3711
3708
|
};
|
|
3712
3709
|
for (const r of e) {
|
|
3713
|
-
if (
|
|
3710
|
+
if (Ve(r)) {
|
|
3714
3711
|
a(r);
|
|
3715
3712
|
continue;
|
|
3716
3713
|
}
|
|
3717
|
-
const i =
|
|
3714
|
+
const i = Bi(r);
|
|
3718
3715
|
i && s(i, r);
|
|
3719
3716
|
}
|
|
3720
3717
|
return t;
|
|
3721
3718
|
}
|
|
3722
|
-
function
|
|
3719
|
+
function Ui(e) {
|
|
3723
3720
|
return e.filter((t) => t.type === "media").length;
|
|
3724
3721
|
}
|
|
3725
|
-
function
|
|
3722
|
+
function ji(e, t, s) {
|
|
3726
3723
|
return t <= 1 ? s : e === 0 ? "first" : e === t - 1 ? "end" : "middle";
|
|
3727
3724
|
}
|
|
3728
|
-
function
|
|
3725
|
+
function an(e) {
|
|
3729
3726
|
return O(e.image_url) ?? O(e.asset_url) ?? "";
|
|
3730
3727
|
}
|
|
3731
|
-
function
|
|
3728
|
+
function Hi(e) {
|
|
3732
3729
|
switch (e) {
|
|
3733
3730
|
case "image":
|
|
3734
3731
|
return Ne.Image;
|
|
@@ -3742,13 +3739,13 @@ function Vi(e) {
|
|
|
3742
3739
|
return Ne.File;
|
|
3743
3740
|
}
|
|
3744
3741
|
}
|
|
3745
|
-
function
|
|
3742
|
+
function Vi(e, t) {
|
|
3746
3743
|
if (t.length > 1)
|
|
3747
3744
|
switch (e) {
|
|
3748
3745
|
case "image":
|
|
3749
3746
|
return {
|
|
3750
3747
|
items: t.map((a) => ({
|
|
3751
|
-
src:
|
|
3748
|
+
src: an(a),
|
|
3752
3749
|
alt: O(a.title)
|
|
3753
3750
|
}))
|
|
3754
3751
|
};
|
|
@@ -3793,7 +3790,7 @@ function Gi(e, t) {
|
|
|
3793
3790
|
switch (e) {
|
|
3794
3791
|
case "image":
|
|
3795
3792
|
return {
|
|
3796
|
-
src:
|
|
3793
|
+
src: an(s),
|
|
3797
3794
|
alt: O(s.title)
|
|
3798
3795
|
};
|
|
3799
3796
|
case "video":
|
|
@@ -3825,49 +3822,49 @@ function Gi(e, t) {
|
|
|
3825
3822
|
};
|
|
3826
3823
|
}
|
|
3827
3824
|
}
|
|
3828
|
-
function
|
|
3825
|
+
function Gi({
|
|
3829
3826
|
groupPosition: e,
|
|
3830
3827
|
isMyMessage: t,
|
|
3831
3828
|
segment: s
|
|
3832
3829
|
}) {
|
|
3833
|
-
const a =
|
|
3834
|
-
...
|
|
3830
|
+
const a = Hi(s.kind), r = {
|
|
3831
|
+
...Vi(s.kind, s.attachments),
|
|
3835
3832
|
groupPosition: e
|
|
3836
3833
|
};
|
|
3837
3834
|
return t ? /* @__PURE__ */ n(a.Sent, { ...r }) : /* @__PURE__ */ n(a.Received, { ...r });
|
|
3838
3835
|
}
|
|
3839
|
-
const
|
|
3836
|
+
const Yi = ({
|
|
3840
3837
|
groupPosition: e,
|
|
3841
3838
|
isMyMessage: t,
|
|
3842
3839
|
message: s,
|
|
3843
3840
|
renderText: a
|
|
3844
3841
|
}) => {
|
|
3845
3842
|
var v;
|
|
3846
|
-
const r =
|
|
3843
|
+
const r = Wn(s.attachments);
|
|
3847
3844
|
if (r.length === 0) return null;
|
|
3848
|
-
const i =
|
|
3845
|
+
const i = Ui(r), o = (v = s.text) == null ? void 0 : v.trim(), l = r.find((x) => x.type === "link"), d = (l == null ? void 0 : l.type) === "link" ? sn(l.attachments[0] ?? {}).url : void 0, u = o && $i(o, d) ? void 0 : o;
|
|
3849
3846
|
let h = 0;
|
|
3850
3847
|
const m = [], g = u ? "middle" : e, c = e === "single" || e === "end", p = (x, b, N) => {
|
|
3851
|
-
const _ = t ?
|
|
3848
|
+
const _ = t ? it.Sent : it.Received;
|
|
3852
3849
|
m.push(
|
|
3853
3850
|
/* @__PURE__ */ n(
|
|
3854
3851
|
_,
|
|
3855
3852
|
{
|
|
3856
|
-
...
|
|
3853
|
+
...sn(x),
|
|
3857
3854
|
groupPosition: N ? g : "middle"
|
|
3858
3855
|
},
|
|
3859
3856
|
b
|
|
3860
3857
|
)
|
|
3861
3858
|
);
|
|
3862
3859
|
}, w = (x, b) => {
|
|
3863
|
-
const N =
|
|
3860
|
+
const N = ji(
|
|
3864
3861
|
h,
|
|
3865
3862
|
i,
|
|
3866
3863
|
e
|
|
3867
3864
|
);
|
|
3868
3865
|
h += 1, m.push(
|
|
3869
3866
|
/* @__PURE__ */ n(
|
|
3870
|
-
|
|
3867
|
+
Gi,
|
|
3871
3868
|
{
|
|
3872
3869
|
groupPosition: N,
|
|
3873
3870
|
isMyMessage: t,
|
|
@@ -3904,7 +3901,7 @@ const Wi = ({
|
|
|
3904
3901
|
},
|
|
3905
3902
|
children: [
|
|
3906
3903
|
m,
|
|
3907
|
-
!u && /* @__PURE__ */ n(
|
|
3904
|
+
!u && /* @__PURE__ */ n(st, {})
|
|
3908
3905
|
]
|
|
3909
3906
|
}
|
|
3910
3907
|
),
|
|
@@ -3916,14 +3913,14 @@ const Wi = ({
|
|
|
3916
3913
|
}),
|
|
3917
3914
|
children: [
|
|
3918
3915
|
/* @__PURE__ */ n(ze, { message: s, renderText: a }),
|
|
3919
|
-
/* @__PURE__ */ n(
|
|
3916
|
+
/* @__PURE__ */ n(st, {}),
|
|
3920
3917
|
c && /* @__PURE__ */ n($e, { side: t ? "me" : "other" })
|
|
3921
3918
|
]
|
|
3922
3919
|
}
|
|
3923
3920
|
) : null
|
|
3924
3921
|
] });
|
|
3925
|
-
},
|
|
3926
|
-
var
|
|
3922
|
+
}, Wi = (e) => {
|
|
3923
|
+
var Lt, Mt, Dt, Ot, Pt, zt, Ft, $t, Bt, Ut;
|
|
3927
3924
|
const {
|
|
3928
3925
|
additionalMessageInputProps: t,
|
|
3929
3926
|
editing: s,
|
|
@@ -3943,46 +3940,46 @@ const Wi = ({
|
|
|
3943
3940
|
viewerLanguage: v,
|
|
3944
3941
|
onOutboundClick: x,
|
|
3945
3942
|
resolvedOutbound: b
|
|
3946
|
-
} = e, { client: N } = He("CustomMessage"), { channel: _ } = xe("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } =
|
|
3947
|
-
Attachment: M =
|
|
3948
|
-
EditMessageModal: S =
|
|
3943
|
+
} = e, { client: N } = He("CustomMessage"), { channel: _ } = xe("CustomMessage"), { isUnlocking: T, onUnlockClick: L, onFetchSource: E, onDownloadClick: $ } = nr("LockedAttachment"), [F, R] = B(!1), I = us(c.id), {
|
|
3944
|
+
Attachment: M = ms,
|
|
3945
|
+
EditMessageModal: S = hs,
|
|
3949
3946
|
MessageActions: C,
|
|
3950
|
-
MessageBlocked: A =
|
|
3951
|
-
MessageBouncePrompt: P =
|
|
3952
|
-
MessageDeleted: U =
|
|
3953
|
-
MessageIsThreadReplyInChannelButtonIndicator: H =
|
|
3954
|
-
MessageRepliesCountButton: te =
|
|
3955
|
-
ReminderNotification: Q =
|
|
3956
|
-
StreamedMessageText: V =
|
|
3947
|
+
MessageBlocked: A = fs,
|
|
3948
|
+
MessageBouncePrompt: P = gs,
|
|
3949
|
+
MessageDeleted: U = ps,
|
|
3950
|
+
MessageIsThreadReplyInChannelButtonIndicator: H = bs,
|
|
3951
|
+
MessageRepliesCountButton: te = vs,
|
|
3952
|
+
ReminderNotification: Q = xs,
|
|
3953
|
+
StreamedMessageText: V = ws,
|
|
3957
3954
|
PinIndicator: y
|
|
3958
|
-
} =
|
|
3955
|
+
} = un("CustomMessage"), D = _s(c), W = ys(c), X = le(
|
|
3959
3956
|
() => m == null ? void 0 : m(c),
|
|
3960
3957
|
[m, c]
|
|
3961
3958
|
), G = le(() => {
|
|
3962
3959
|
const me = c.attachments ?? [], ge = c.shared_location ? [c.shared_location, ...me] : me;
|
|
3963
3960
|
if (!Fe(c)) return ge;
|
|
3964
|
-
const
|
|
3965
|
-
return
|
|
3961
|
+
const jt = ge.filter((Ht) => !("type" in Ht) || !Ve(Ht));
|
|
3962
|
+
return jt.length === ge.length ? ge : jt;
|
|
3966
3963
|
}, [c]), q = le(
|
|
3967
|
-
() =>
|
|
3964
|
+
() => Wn(G),
|
|
3968
3965
|
[G]
|
|
3969
3966
|
), K = le(() => {
|
|
3970
|
-
const me =
|
|
3967
|
+
const me = yn({ message: c, viewerLanguage: v });
|
|
3971
3968
|
return me === c.text ? c : { ...c, text: me };
|
|
3972
3969
|
}, [c, v]), se = q.length > 0, Me = q.reduce(
|
|
3973
3970
|
(me, ge) => me + ge.attachments.length,
|
|
3974
3971
|
0
|
|
3975
3972
|
) === ((G == null ? void 0 : G.length) ?? 0), re = (i == null ? void 0 : i[0]) ?? "", De = re === "top" ? "first" : re === "middle" ? "middle" : re === "bottom" ? "end" : "single", ne = re === "single" || re === "bottom";
|
|
3976
|
-
if (
|
|
3973
|
+
if (Ns(c))
|
|
3977
3974
|
return null;
|
|
3978
3975
|
if (c.deleted_at || c.type === "deleted")
|
|
3979
3976
|
return /* @__PURE__ */ n(U, { message: c });
|
|
3980
|
-
if (
|
|
3977
|
+
if (ks(c))
|
|
3981
3978
|
return /* @__PURE__ */ n(A, {});
|
|
3982
|
-
const ue = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id,
|
|
3979
|
+
const ue = !w && !!c.reply_count, ie = !w && c.show_in_channel && c.parent_id, St = c.status === "failed" && ((Lt = c.error) == null ? void 0 : Lt.status) !== 403, Et = Cs(c);
|
|
3983
3980
|
let fe;
|
|
3984
|
-
|
|
3985
|
-
const ee = g(),
|
|
3981
|
+
St ? fe = () => u(c) : Et && (fe = () => R(!0));
|
|
3982
|
+
const ee = g(), es = k(
|
|
3986
3983
|
"str-chat__message str-chat__message-simple",
|
|
3987
3984
|
`str-chat__message--${c.type}`,
|
|
3988
3985
|
`str-chat__message--${c.status}`,
|
|
@@ -3993,25 +3990,25 @@ const Wi = ({
|
|
|
3993
3990
|
"str-chat__message--highlighted": h,
|
|
3994
3991
|
"str-chat__message--pinned pinned-message": c.pinned,
|
|
3995
3992
|
"str-chat__message--with-reactions": W,
|
|
3996
|
-
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((
|
|
3993
|
+
"str-chat__message-send-can-be-retried": (c == null ? void 0 : c.status) === "failed" && ((Mt = c == null ? void 0 : c.error) == null ? void 0 : Mt.status) !== 403,
|
|
3997
3994
|
"str-chat__message-with-thread-link": ue || ie,
|
|
3998
3995
|
"str-chat__virtual-message__wrapper--end": a,
|
|
3999
3996
|
"str-chat__virtual-message__wrapper--first": r,
|
|
4000
3997
|
"str-chat__virtual-message__wrapper--group": o
|
|
4001
3998
|
}
|
|
4002
|
-
),
|
|
3999
|
+
), Ye = c.poll_id && N.polls.fromState(c.poll_id), It = dr(c), _e = Fe(c), ts = ht(c), We = !!(G != null && G.length && !c.quoted_message), Tt = _e && ee && We, ns = se && Me && !c.quoted_message && !Ye && !X && !_e, At = {
|
|
4003
4000
|
contentType: "text",
|
|
4004
|
-
amountText: (
|
|
4005
|
-
paymentStatus: (
|
|
4001
|
+
amountText: (Dt = c.metadata) == null ? void 0 : Dt.amount_text,
|
|
4002
|
+
paymentStatus: (Ot = c.metadata) == null ? void 0 : Ot.payment_status,
|
|
4006
4003
|
renderedText: c.text && /* @__PURE__ */ n(ze, { message: K, renderText: p })
|
|
4007
|
-
},
|
|
4004
|
+
}, Rt = {
|
|
4008
4005
|
contentType: "media",
|
|
4009
|
-
title: (
|
|
4010
|
-
mimeType: (
|
|
4011
|
-
thumbnailUrl: (
|
|
4012
|
-
amountText: (
|
|
4013
|
-
detail: (
|
|
4014
|
-
paymentStatus: (
|
|
4006
|
+
title: (Pt = c.metadata) == null ? void 0 : Pt.attachment_title,
|
|
4007
|
+
mimeType: (zt = c.metadata) == null ? void 0 : zt.attachment_mime_type,
|
|
4008
|
+
thumbnailUrl: (Ft = c.metadata) == null ? void 0 : Ft.attachment_thumbnail,
|
|
4009
|
+
amountText: ($t = c.metadata) == null ? void 0 : $t.amount_text,
|
|
4010
|
+
detail: (Bt = c.metadata) == null ? void 0 : Bt.attachment_detail,
|
|
4011
|
+
paymentStatus: (Ut = c.metadata) == null ? void 0 : Ut.payment_status,
|
|
4015
4012
|
onFetchSource: E ? () => E(c, _) : void 0
|
|
4016
4013
|
};
|
|
4017
4014
|
return /* @__PURE__ */ f(J, { children: [
|
|
@@ -4022,7 +4019,7 @@ const Wi = ({
|
|
|
4022
4019
|
}
|
|
4023
4020
|
),
|
|
4024
4021
|
F && /* @__PURE__ */ n(
|
|
4025
|
-
|
|
4022
|
+
Ss,
|
|
4026
4023
|
{
|
|
4027
4024
|
MessageBouncePrompt: P,
|
|
4028
4025
|
onClose: () => R(!1),
|
|
@@ -4032,7 +4029,7 @@ const Wi = ({
|
|
|
4032
4029
|
/* @__PURE__ */ f(
|
|
4033
4030
|
"div",
|
|
4034
4031
|
{
|
|
4035
|
-
className:
|
|
4032
|
+
className: es,
|
|
4036
4033
|
"data-message-id": c.id,
|
|
4037
4034
|
"data-dd-privacy": "mask",
|
|
4038
4035
|
children: [
|
|
@@ -4054,7 +4051,7 @@ const Wi = ({
|
|
|
4054
4051
|
"div",
|
|
4055
4052
|
{
|
|
4056
4053
|
className: k("str-chat__message-inner", {
|
|
4057
|
-
"str-chat__simple-message--error-failed":
|
|
4054
|
+
"str-chat__simple-message--error-failed": St || Et
|
|
4058
4055
|
}),
|
|
4059
4056
|
"data-testid": "message-inner",
|
|
4060
4057
|
onClick: fe,
|
|
@@ -4067,32 +4064,32 @@ const Wi = ({
|
|
|
4067
4064
|
marginInlineEnd: 0,
|
|
4068
4065
|
marginInlineStart: 0
|
|
4069
4066
|
},
|
|
4070
|
-
children:
|
|
4067
|
+
children: It ? /* @__PURE__ */ n(Ze, { message: c, standalone: !0 }) : or(c) ? /* @__PURE__ */ n("div", { className: "str-chat__message-bubble-wrapper", children: /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4071
4068
|
ee && C && /* @__PURE__ */ n(C, {}),
|
|
4072
|
-
ee ? /* @__PURE__ */ n(Pe, { ...
|
|
4069
|
+
ee ? /* @__PURE__ */ n(Pe, { ...At, isMine: !0 }) : /* @__PURE__ */ n(
|
|
4073
4070
|
Pe,
|
|
4074
4071
|
{
|
|
4075
|
-
...
|
|
4072
|
+
...At,
|
|
4076
4073
|
isMine: !1,
|
|
4077
4074
|
isUnlocking: T(c.id),
|
|
4078
4075
|
onUnlockClick: () => L == null ? void 0 : L(c, _)
|
|
4079
4076
|
}
|
|
4080
4077
|
),
|
|
4081
4078
|
!ee && C && /* @__PURE__ */ n(C, {})
|
|
4082
|
-
] }) }) :
|
|
4079
|
+
] }) }) : cr(c) ? /* @__PURE__ */ f("div", { className: "str-chat__message-bubble-wrapper", children: [
|
|
4083
4080
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
4084
4081
|
ee && C && /* @__PURE__ */ n(C, {}),
|
|
4085
4082
|
ee ? /* @__PURE__ */ n(
|
|
4086
4083
|
Pe,
|
|
4087
4084
|
{
|
|
4088
|
-
...
|
|
4085
|
+
...Rt,
|
|
4089
4086
|
isMine: !0,
|
|
4090
4087
|
onPreviewClick: () => L ? L(c, _) : void 0
|
|
4091
4088
|
}
|
|
4092
4089
|
) : /* @__PURE__ */ n(
|
|
4093
4090
|
Pe,
|
|
4094
4091
|
{
|
|
4095
|
-
...
|
|
4092
|
+
...Rt,
|
|
4096
4093
|
isMine: !1,
|
|
4097
4094
|
isUnlocking: T(c.id),
|
|
4098
4095
|
onUnlockClick: () => L ? L(c, _) : void 0,
|
|
@@ -4119,8 +4116,8 @@ const Wi = ({
|
|
|
4119
4116
|
]
|
|
4120
4117
|
}
|
|
4121
4118
|
)
|
|
4122
|
-
] }) :
|
|
4123
|
-
|
|
4119
|
+
] }) : ns ? /* @__PURE__ */ n(
|
|
4120
|
+
Yi,
|
|
4124
4121
|
{
|
|
4125
4122
|
groupPosition: De,
|
|
4126
4123
|
isMyMessage: ee,
|
|
@@ -4141,15 +4138,15 @@ const Wi = ({
|
|
|
4141
4138
|
"relative isolate": ne
|
|
4142
4139
|
}),
|
|
4143
4140
|
children: [
|
|
4144
|
-
_e && !
|
|
4145
|
-
|
|
4141
|
+
_e && !Tt && /* @__PURE__ */ n(
|
|
4142
|
+
Ze,
|
|
4146
4143
|
{
|
|
4147
4144
|
message: c,
|
|
4148
|
-
hasAttachment:
|
|
4145
|
+
hasAttachment: We,
|
|
4149
4146
|
isMyMessage: ee
|
|
4150
4147
|
}
|
|
4151
4148
|
),
|
|
4152
|
-
|
|
4149
|
+
Ye && /* @__PURE__ */ n(Es, { poll: Ye }),
|
|
4153
4150
|
G != null && G.length && !c.quoted_message ? /* @__PURE__ */ n(
|
|
4154
4151
|
M,
|
|
4155
4152
|
{
|
|
@@ -4170,23 +4167,23 @@ const Wi = ({
|
|
|
4170
4167
|
renderText: p
|
|
4171
4168
|
}
|
|
4172
4169
|
),
|
|
4173
|
-
/* @__PURE__ */ n(
|
|
4170
|
+
/* @__PURE__ */ n(st, {}),
|
|
4174
4171
|
ne && /* @__PURE__ */ n($e, { side: ee ? "me" : "other" })
|
|
4175
4172
|
]
|
|
4176
4173
|
}
|
|
4177
4174
|
) })
|
|
4178
4175
|
}
|
|
4179
4176
|
),
|
|
4180
|
-
!
|
|
4181
|
-
|
|
4177
|
+
!ts && !It && /* @__PURE__ */ n("div", { className: "str-chat__message-footer", children: (!_e || Tt) && /* @__PURE__ */ n(
|
|
4178
|
+
Ze,
|
|
4182
4179
|
{
|
|
4183
4180
|
message: c,
|
|
4184
|
-
hasAttachment:
|
|
4181
|
+
hasAttachment: We,
|
|
4185
4182
|
isMyMessage: ee
|
|
4186
4183
|
}
|
|
4187
4184
|
) }),
|
|
4188
4185
|
/* @__PURE__ */ n(
|
|
4189
|
-
|
|
4186
|
+
xr,
|
|
4190
4187
|
{
|
|
4191
4188
|
onOutboundClick: x,
|
|
4192
4189
|
resolvedOutbound: b
|
|
@@ -4205,68 +4202,68 @@ const Wi = ({
|
|
|
4205
4202
|
c.id
|
|
4206
4203
|
)
|
|
4207
4204
|
] });
|
|
4208
|
-
},
|
|
4209
|
-
|
|
4205
|
+
}, Xi = z.memo(
|
|
4206
|
+
Wi,
|
|
4210
4207
|
(e, t) => {
|
|
4211
4208
|
var s, a, r, i;
|
|
4212
|
-
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 :
|
|
4209
|
+
return e.viewerLanguage !== t.viewerLanguage || e.onOutboundClick !== t.onOutboundClick || ((s = e.resolvedOutbound) == null ? void 0 : s.id) !== ((a = t.resolvedOutbound) == null ? void 0 : a.id) || ((r = e.resolvedOutbound) == null ? void 0 : r.name) !== ((i = t.resolvedOutbound) == null ? void 0 : i.name) ? !1 : ds(e, t);
|
|
4213
4210
|
}
|
|
4214
|
-
),
|
|
4211
|
+
), qi = (e) => {
|
|
4215
4212
|
var i;
|
|
4216
4213
|
const t = he("CustomMessage"), s = ve(Ln), a = (i = t.message.metadata) == null ? void 0 : i.outbound_id, r = typeof a == "string" ? s == null ? void 0 : s[a] : void 0;
|
|
4217
4214
|
return /* @__PURE__ */ n(
|
|
4218
|
-
|
|
4215
|
+
Xi,
|
|
4219
4216
|
{
|
|
4220
4217
|
...t,
|
|
4221
4218
|
...e,
|
|
4222
4219
|
resolvedOutbound: r
|
|
4223
4220
|
}
|
|
4224
4221
|
);
|
|
4225
|
-
},
|
|
4222
|
+
}, Ki = () => {
|
|
4226
4223
|
var s;
|
|
4227
4224
|
const { handleDelete: e, message: t } = he("CustomMessageActions");
|
|
4228
4225
|
return ((s = t.metadata) == null ? void 0 : s.payment_status) === "paid" ? null : /* @__PURE__ */ n(
|
|
4229
|
-
|
|
4226
|
+
pn,
|
|
4230
4227
|
{
|
|
4231
4228
|
onClick: e,
|
|
4232
4229
|
"aria-label": "Delete",
|
|
4233
4230
|
title: "Delete",
|
|
4234
4231
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4235
|
-
children: /* @__PURE__ */ n(
|
|
4232
|
+
children: /* @__PURE__ */ n(da, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4236
4233
|
}
|
|
4237
4234
|
);
|
|
4238
|
-
},
|
|
4235
|
+
}, Zi = () => {
|
|
4239
4236
|
const { handleFlag: e } = he("CustomMessageActions");
|
|
4240
4237
|
return /* @__PURE__ */ n(
|
|
4241
|
-
|
|
4238
|
+
pn,
|
|
4242
4239
|
{
|
|
4243
4240
|
onClick: e,
|
|
4244
4241
|
"aria-label": "Report",
|
|
4245
4242
|
title: "Report",
|
|
4246
4243
|
className: "bg-marble rounded-full p-2 hover:bg-sand transition-all",
|
|
4247
|
-
children: /* @__PURE__ */ n(
|
|
4244
|
+
children: /* @__PURE__ */ n(mn, { size: 16, weight: "light", "aria-hidden": !0 })
|
|
4248
4245
|
}
|
|
4249
4246
|
);
|
|
4250
|
-
},
|
|
4247
|
+
}, Ji = () => {
|
|
4251
4248
|
var t;
|
|
4252
4249
|
const { message: e } = he("CustomMessageActions");
|
|
4253
4250
|
return ((t = e.metadata) == null ? void 0 : t.custom_type) !== oe.ATTACHMENT ? null : /* @__PURE__ */ n(
|
|
4254
|
-
|
|
4251
|
+
xa,
|
|
4255
4252
|
{
|
|
4256
4253
|
messageActionSet: [
|
|
4257
|
-
{ Component:
|
|
4258
|
-
{ Component:
|
|
4254
|
+
{ Component: Ki, placement: "quick", type: "delete" },
|
|
4255
|
+
{ Component: Zi, placement: "quick", type: "flag" }
|
|
4259
4256
|
]
|
|
4260
4257
|
}
|
|
4261
4258
|
);
|
|
4262
|
-
},
|
|
4259
|
+
}, Qi = (e) => ({
|
|
4263
4260
|
linkPreviews: Array.from(e.previews.values()).filter(
|
|
4264
|
-
(t) =>
|
|
4261
|
+
(t) => nt.previewIsLoaded(t) || nt.previewIsLoading(t)
|
|
4265
4262
|
)
|
|
4266
|
-
}),
|
|
4267
|
-
const { linkPreviewsManager: e } =
|
|
4263
|
+
}), el = () => {
|
|
4264
|
+
const { linkPreviewsManager: e } = Is(), { linkPreviews: t } = Ts(
|
|
4268
4265
|
e.state,
|
|
4269
|
-
|
|
4266
|
+
Qi
|
|
4270
4267
|
), s = (r) => {
|
|
4271
4268
|
e.dismissPreview(r);
|
|
4272
4269
|
};
|
|
@@ -4315,9 +4312,9 @@ const Wi = ({
|
|
|
4315
4312
|
// edge lands ~6px past the fold, reachable by scrolling. That residue
|
|
4316
4313
|
// belongs to whoever owns the mobile layout contract, not to this component.
|
|
4317
4314
|
/* @__PURE__ */ n("div", { className: "messaging-link-preview-list flex flex-col items-stretch w-full gap-2", children: t.map((r) => {
|
|
4318
|
-
const i =
|
|
4315
|
+
const i = nt.previewIsLoading(r);
|
|
4319
4316
|
return /* @__PURE__ */ n(
|
|
4320
|
-
|
|
4317
|
+
it.Composer,
|
|
4321
4318
|
{
|
|
4322
4319
|
title: r.title,
|
|
4323
4320
|
url: r.og_scrape_url,
|
|
@@ -4330,7 +4327,7 @@ const Wi = ({
|
|
|
4330
4327
|
);
|
|
4331
4328
|
}) })
|
|
4332
4329
|
) : null;
|
|
4333
|
-
}, Be = z.createContext(!1),
|
|
4330
|
+
}, Be = z.createContext(!1), tl = 200, so = () => ve(Be), nl = ({ sendMessage: e, disabled: t, ...s }) => /* @__PURE__ */ n(
|
|
4334
4331
|
"button",
|
|
4335
4332
|
{
|
|
4336
4333
|
...s,
|
|
@@ -4339,13 +4336,13 @@ const Wi = ({
|
|
|
4339
4336
|
disabled: t,
|
|
4340
4337
|
onPointerDown: (a) => a.preventDefault(),
|
|
4341
4338
|
onClick: e,
|
|
4342
|
-
children: /* @__PURE__ */ n(
|
|
4339
|
+
children: /* @__PURE__ */ n(ua, { weight: "bold", className: "size-4" })
|
|
4343
4340
|
}
|
|
4344
|
-
),
|
|
4345
|
-
const e = ve(Be), { handleSubmit: t } =
|
|
4346
|
-
SendButton: r =
|
|
4347
|
-
AttachmentPreviewList: i =
|
|
4348
|
-
} =
|
|
4341
|
+
), rn = () => {
|
|
4342
|
+
const e = ve(Be), { handleSubmit: t } = As(), s = Rs(), a = e || !s, {
|
|
4343
|
+
SendButton: r = nl,
|
|
4344
|
+
AttachmentPreviewList: i = Ls
|
|
4345
|
+
} = un("CustomMessageInput"), o = z.useRef(null);
|
|
4349
4346
|
return z.useEffect(() => {
|
|
4350
4347
|
const l = o.current;
|
|
4351
4348
|
if (!l || typeof ResizeObserver > "u")
|
|
@@ -4408,13 +4405,13 @@ const Wi = ({
|
|
|
4408
4405
|
"data-dd-privacy": "mask",
|
|
4409
4406
|
children: [
|
|
4410
4407
|
/* @__PURE__ */ f("div", { className: "messaging-composer-previews empty:hidden flex flex-col gap-2 px-2 pt-2", children: [
|
|
4411
|
-
/* @__PURE__ */ n(
|
|
4412
|
-
/* @__PURE__ */ n(
|
|
4408
|
+
/* @__PURE__ */ n(Ms, {}),
|
|
4409
|
+
/* @__PURE__ */ n(el, {}),
|
|
4413
4410
|
/* @__PURE__ */ n(i, {})
|
|
4414
4411
|
] }),
|
|
4415
4412
|
/* @__PURE__ */ f("div", { className: "messaging-composer-row flex items-start", children: [
|
|
4416
4413
|
/* @__PURE__ */ n(
|
|
4417
|
-
|
|
4414
|
+
Ds,
|
|
4418
4415
|
{
|
|
4419
4416
|
"aria-disabled": e || void 0,
|
|
4420
4417
|
containerClassName: "min-w-0 flex-1 leading-[0]",
|
|
@@ -4441,7 +4438,7 @@ const Wi = ({
|
|
|
4441
4438
|
]
|
|
4442
4439
|
}
|
|
4443
4440
|
);
|
|
4444
|
-
},
|
|
4441
|
+
}, ln = ({
|
|
4445
4442
|
renderActions: e,
|
|
4446
4443
|
renderHeader: t,
|
|
4447
4444
|
renderFooter: s,
|
|
@@ -4463,7 +4460,7 @@ const Wi = ({
|
|
|
4463
4460
|
c = v;
|
|
4464
4461
|
const b = Array.from(
|
|
4465
4462
|
g.querySelectorAll(".str-chat__list")
|
|
4466
|
-
).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight <
|
|
4463
|
+
).find((_) => _.scrollHeight > _.clientHeight) ?? null, N = b ? b.scrollHeight - b.scrollTop - b.clientHeight < tl : !1;
|
|
4467
4464
|
g.style.setProperty(
|
|
4468
4465
|
"--messaging-composer-height",
|
|
4469
4466
|
`${v}px`
|
|
@@ -4525,7 +4522,7 @@ const Wi = ({
|
|
|
4525
4522
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4526
4523
|
children: [
|
|
4527
4524
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4528
|
-
/* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(
|
|
4525
|
+
/* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: i ?? rn }) })
|
|
4529
4526
|
]
|
|
4530
4527
|
}
|
|
4531
4528
|
),
|
|
@@ -4544,67 +4541,67 @@ const Wi = ({
|
|
|
4544
4541
|
className: "message-input flex min-h-0 items-end gap-4 aria-disabled:opacity-40",
|
|
4545
4542
|
children: [
|
|
4546
4543
|
e && /* @__PURE__ */ n("div", { className: "flex h-12 shrink-0 items-center justify-center", children: e() }),
|
|
4547
|
-
/* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(
|
|
4544
|
+
/* @__PURE__ */ n(Be.Provider, { value: l, children: /* @__PURE__ */ n(Vt, { Input: rn }) })
|
|
4548
4545
|
]
|
|
4549
4546
|
}
|
|
4550
4547
|
),
|
|
4551
4548
|
s == null ? void 0 : s()
|
|
4552
4549
|
] });
|
|
4553
|
-
},
|
|
4550
|
+
}, sl = {
|
|
4554
4551
|
SYSTEM_DM_AGENT_PAUSED: "DM Agent has left the conversation",
|
|
4555
4552
|
SYSTEM_DM_AGENT_RESUMED: "DM Agent has rejoined the conversation"
|
|
4556
|
-
},
|
|
4553
|
+
}, al = ["SYSTEM_AGE_SAFETY_BLOCKED"], rl = {
|
|
4557
4554
|
SYSTEM_AGE_SAFETY_BLOCKED: "This user isn’t able to reply because they don’t meet our age safety guidelines."
|
|
4558
|
-
},
|
|
4555
|
+
}, et = "age safety guidelines.", il = "https://linktr.ee/s/about/contact", ll = (e) => al.includes(
|
|
4559
4556
|
e
|
|
4560
|
-
),
|
|
4557
|
+
), ol = (e) => {
|
|
4561
4558
|
var t;
|
|
4562
|
-
return
|
|
4563
|
-
},
|
|
4559
|
+
return ll((t = e.metadata) == null ? void 0 : t.custom_type);
|
|
4560
|
+
}, cl = (e) => {
|
|
4564
4561
|
var a;
|
|
4565
4562
|
const t = (a = e.metadata) == null ? void 0 : a.custom_type;
|
|
4566
|
-
if (
|
|
4563
|
+
if (Wt(t))
|
|
4567
4564
|
return {
|
|
4568
4565
|
kind: "dm-agent",
|
|
4569
4566
|
type: t
|
|
4570
4567
|
};
|
|
4571
|
-
if (
|
|
4568
|
+
if (pa(t))
|
|
4572
4569
|
return {
|
|
4573
4570
|
kind: "age-safety",
|
|
4574
4571
|
type: t
|
|
4575
4572
|
};
|
|
4576
4573
|
const s = e.dm_agent_system_type;
|
|
4577
|
-
if (
|
|
4574
|
+
if (Wt(s))
|
|
4578
4575
|
return {
|
|
4579
4576
|
kind: "dm-agent",
|
|
4580
4577
|
type: s
|
|
4581
4578
|
};
|
|
4582
|
-
},
|
|
4583
|
-
const t = e.indexOf(
|
|
4579
|
+
}, dl = (e) => {
|
|
4580
|
+
const t = e.indexOf(et);
|
|
4584
4581
|
if (t === -1)
|
|
4585
4582
|
return e;
|
|
4586
|
-
const s = t +
|
|
4583
|
+
const s = t + et.length;
|
|
4587
4584
|
return /* @__PURE__ */ f(J, { children: [
|
|
4588
4585
|
e.slice(0, t),
|
|
4589
4586
|
/* @__PURE__ */ n(
|
|
4590
4587
|
"a",
|
|
4591
4588
|
{
|
|
4592
|
-
href:
|
|
4589
|
+
href: il,
|
|
4593
4590
|
target: "_blank",
|
|
4594
4591
|
rel: "noopener noreferrer",
|
|
4595
4592
|
className: "mes-age-safety-system-message__emphasis font-medium text-inherit underline",
|
|
4596
|
-
children:
|
|
4593
|
+
children: et
|
|
4597
4594
|
}
|
|
4598
4595
|
),
|
|
4599
4596
|
e.slice(s)
|
|
4600
4597
|
] });
|
|
4601
|
-
},
|
|
4598
|
+
}, ul = (e) => {
|
|
4602
4599
|
var a, r;
|
|
4603
|
-
const t = !
|
|
4600
|
+
const t = !ol(e.message), s = cl(
|
|
4604
4601
|
e.message
|
|
4605
4602
|
);
|
|
4606
4603
|
if ((s == null ? void 0 : s.kind) === "dm-agent") {
|
|
4607
|
-
const i = ((a = e.message.text) == null ? void 0 : a.trim()) ||
|
|
4604
|
+
const i = ((a = e.message.text) == null ? void 0 : a.trim()) || sl[s.type];
|
|
4608
4605
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4609
4606
|
/* @__PURE__ */ f(
|
|
4610
4607
|
"div",
|
|
@@ -4614,7 +4611,7 @@ const Wi = ({
|
|
|
4614
4611
|
"data-dm-agent-system-type": s.type,
|
|
4615
4612
|
children: [
|
|
4616
4613
|
/* @__PURE__ */ n(
|
|
4617
|
-
|
|
4614
|
+
ma,
|
|
4618
4615
|
{
|
|
4619
4616
|
size: 16,
|
|
4620
4617
|
weight: "regular",
|
|
@@ -4626,11 +4623,11 @@ const Wi = ({
|
|
|
4626
4623
|
]
|
|
4627
4624
|
}
|
|
4628
4625
|
),
|
|
4629
|
-
!t && /* @__PURE__ */ n(
|
|
4626
|
+
!t && /* @__PURE__ */ n(Xe, { message: e.message })
|
|
4630
4627
|
] });
|
|
4631
4628
|
}
|
|
4632
4629
|
if ((s == null ? void 0 : s.kind) === "age-safety") {
|
|
4633
|
-
const i = ((r = e.message.text) == null ? void 0 : r.trim()) ||
|
|
4630
|
+
const i = ((r = e.message.text) == null ? void 0 : r.trim()) || rl[s.type];
|
|
4634
4631
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
4635
4632
|
/* @__PURE__ */ f(
|
|
4636
4633
|
"div",
|
|
@@ -4640,7 +4637,7 @@ const Wi = ({
|
|
|
4640
4637
|
"data-age-safety-system-type": s.type,
|
|
4641
4638
|
children: [
|
|
4642
4639
|
/* @__PURE__ */ n(
|
|
4643
|
-
|
|
4640
|
+
ha,
|
|
4644
4641
|
{
|
|
4645
4642
|
size: 24,
|
|
4646
4643
|
weight: "duotone",
|
|
@@ -4649,11 +4646,11 @@ const Wi = ({
|
|
|
4649
4646
|
"data-testid": "age-safety-system-message-icon"
|
|
4650
4647
|
}
|
|
4651
4648
|
),
|
|
4652
|
-
/* @__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:
|
|
4649
|
+
/* @__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: dl(i) }) })
|
|
4653
4650
|
]
|
|
4654
4651
|
}
|
|
4655
4652
|
),
|
|
4656
|
-
!t && /* @__PURE__ */ n(
|
|
4653
|
+
!t && /* @__PURE__ */ n(Xe, { message: e.message })
|
|
4657
4654
|
] });
|
|
4658
4655
|
}
|
|
4659
4656
|
return /* @__PURE__ */ f("div", { className: "str-chat__message--system", "data-testid": "message-system", children: [
|
|
@@ -4662,9 +4659,9 @@ const Wi = ({
|
|
|
4662
4659
|
/* @__PURE__ */ n("p", { children: e.message.text }),
|
|
4663
4660
|
/* @__PURE__ */ n("div", { className: "str-chat__message--system__line" })
|
|
4664
4661
|
] }),
|
|
4665
|
-
!t && /* @__PURE__ */ n(
|
|
4662
|
+
!t && /* @__PURE__ */ n(Xe, { message: e.message })
|
|
4666
4663
|
] });
|
|
4667
|
-
},
|
|
4664
|
+
}, Xn = je(!1), tt = ({ cx: e, index: t }) => /* @__PURE__ */ n("circle", { cx: e, cy: "6.15", r: "3.9", fill: "#A0A0A0", children: /* @__PURE__ */ n(
|
|
4668
4665
|
"animateTransform",
|
|
4669
4666
|
{
|
|
4670
4667
|
attributeName: "transform",
|
|
@@ -4674,17 +4671,17 @@ const Wi = ({
|
|
|
4674
4671
|
begin: `${120 * t}ms`,
|
|
4675
4672
|
repeatCount: "indefinite"
|
|
4676
4673
|
}
|
|
4677
|
-
) }),
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
]),
|
|
4674
|
+
) }), ml = /* @__PURE__ */ new Set([
|
|
4675
|
+
qe.Thinking,
|
|
4676
|
+
qe.Generating,
|
|
4677
|
+
qe.ExternalSources
|
|
4678
|
+
]), hl = ({ threadList: e }) => {
|
|
4682
4679
|
var p, w;
|
|
4683
|
-
const { channel: t, channelConfig: s, thread: a } = xe(), { client: r } = He(), { typing: i = {} } =
|
|
4684
|
-
if (!e && l &&
|
|
4685
|
-
const v =
|
|
4680
|
+
const { channel: t, channelConfig: s, thread: a } = xe(), { client: r } = He(), { typing: i = {} } = Os(), { aiState: o } = Ps(t), l = ve(Xn);
|
|
4681
|
+
if (!e && l && ml.has(o)) {
|
|
4682
|
+
const v = fl(t, (p = r.user) == null ? void 0 : p.id);
|
|
4686
4683
|
return /* @__PURE__ */ n(
|
|
4687
|
-
|
|
4684
|
+
on,
|
|
4688
4685
|
{
|
|
4689
4686
|
avatarId: (v == null ? void 0 : v.id) ?? "ai-agent",
|
|
4690
4687
|
avatarName: (v == null ? void 0 : v.name) ?? (v == null ? void 0 : v.id) ?? "Agent",
|
|
@@ -4710,7 +4707,7 @@ const Wi = ({
|
|
|
4710
4707
|
return null;
|
|
4711
4708
|
const g = (w = m[0]) == null ? void 0 : w.user, c = g != null && g.id && t.state.members[g.id] ? t.state.members[g.id].user : void 0;
|
|
4712
4709
|
return /* @__PURE__ */ n(
|
|
4713
|
-
|
|
4710
|
+
on,
|
|
4714
4711
|
{
|
|
4715
4712
|
avatarId: (g == null ? void 0 : g.id) ?? (c == null ? void 0 : c.id) ?? "typing-user",
|
|
4716
4713
|
avatarName: (g == null ? void 0 : g.name) ?? (c == null ? void 0 : c.name) ?? (g == null ? void 0 : g.id) ?? "Typing user",
|
|
@@ -4718,7 +4715,7 @@ const Wi = ({
|
|
|
4718
4715
|
testId: "typing-indicator"
|
|
4719
4716
|
}
|
|
4720
4717
|
);
|
|
4721
|
-
},
|
|
4718
|
+
}, on = ({
|
|
4722
4719
|
avatarId: e,
|
|
4723
4720
|
avatarName: t,
|
|
4724
4721
|
avatarImage: s,
|
|
@@ -4754,9 +4751,9 @@ const Wi = ({
|
|
|
4754
4751
|
height: "13",
|
|
4755
4752
|
overflow: "visible",
|
|
4756
4753
|
children: [
|
|
4757
|
-
/* @__PURE__ */ n(
|
|
4758
|
-
/* @__PURE__ */ n(
|
|
4759
|
-
/* @__PURE__ */ n(
|
|
4754
|
+
/* @__PURE__ */ n(tt, { cx: "4", index: 0 }),
|
|
4755
|
+
/* @__PURE__ */ n(tt, { cx: "16", index: 1 }),
|
|
4756
|
+
/* @__PURE__ */ n(tt, { cx: "28", index: 2 })
|
|
4760
4757
|
]
|
|
4761
4758
|
}
|
|
4762
4759
|
) }) }),
|
|
@@ -4765,7 +4762,7 @@ const Wi = ({
|
|
|
4765
4762
|
] })
|
|
4766
4763
|
}
|
|
4767
4764
|
);
|
|
4768
|
-
function
|
|
4765
|
+
function fl(e, t) {
|
|
4769
4766
|
var a;
|
|
4770
4767
|
const s = ((a = e == null ? void 0 : e.state) == null ? void 0 : a.members) ?? {};
|
|
4771
4768
|
for (const r of Object.values(s)) {
|
|
@@ -4774,7 +4771,7 @@ function gl(e, t) {
|
|
|
4774
4771
|
return i;
|
|
4775
4772
|
}
|
|
4776
4773
|
}
|
|
4777
|
-
const
|
|
4774
|
+
const gl = () => null, pl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
4778
4775
|
"div",
|
|
4779
4776
|
{
|
|
4780
4777
|
className: k("flex items-center justify-center h-full", e),
|
|
@@ -4818,11 +4815,11 @@ const pl = () => null, bl = ({ className: e, message: t }) => /* @__PURE__ */ f(
|
|
|
4818
4815
|
]
|
|
4819
4816
|
}
|
|
4820
4817
|
), Ue = z.memo(() => /* @__PURE__ */ n("div", { className: "messaging-loading-state flex items-center justify-center h-full", children: /* @__PURE__ */ f("div", { className: "flex items-center", children: [
|
|
4821
|
-
/* @__PURE__ */ n(
|
|
4818
|
+
/* @__PURE__ */ n(pl, { className: "w-6 h-6" }),
|
|
4822
4819
|
/* @__PURE__ */ n("span", { className: "text-sm text-stone", children: "Loading messages" })
|
|
4823
4820
|
] }) }));
|
|
4824
4821
|
Ue.displayName = "LoadingState";
|
|
4825
|
-
const
|
|
4822
|
+
const bl = ({
|
|
4826
4823
|
onBack: e,
|
|
4827
4824
|
showBackButton: t,
|
|
4828
4825
|
renderMessageInputActions: s,
|
|
@@ -4857,10 +4854,10 @@ const vl = ({
|
|
|
4857
4854
|
const S = Z((Q) => {
|
|
4858
4855
|
var V;
|
|
4859
4856
|
(V = M.current) == null || V.call(M, Q);
|
|
4860
|
-
}, []), C = E ? S : void 0, A =
|
|
4857
|
+
}, []), C = E ? S : void 0, A = gr(I, $), P = R.state.messages.some(
|
|
4861
4858
|
(Q) => Q.type !== "deleted"
|
|
4862
4859
|
), U = v ? /* @__PURE__ */ n(z.Fragment, { children: v() }, "lt-channel-banner") : null, H = /* @__PURE__ */ n(
|
|
4863
|
-
|
|
4860
|
+
Ra,
|
|
4864
4861
|
{
|
|
4865
4862
|
className: "-mx-[var(--str-chat\\_\\_spacing-2)] px-[var(--str-chat\\_\\_spacing-2)] md:-mx-[min(var(--str-chat\\_\\_spacing-10),4%)] md:px-[min(var(--str-chat\\_\\_spacing-10),4%)]",
|
|
4866
4863
|
onBack: e,
|
|
@@ -4882,7 +4879,7 @@ const vl = ({
|
|
|
4882
4879
|
), te = Z(
|
|
4883
4880
|
(Q) => {
|
|
4884
4881
|
const { message: V } = he("ChannelView"), y = /* @__PURE__ */ n(
|
|
4885
|
-
|
|
4882
|
+
qi,
|
|
4886
4883
|
{
|
|
4887
4884
|
...Q,
|
|
4888
4885
|
viewerLanguage: _,
|
|
@@ -4894,15 +4891,15 @@ const vl = ({
|
|
|
4894
4891
|
[C, N, _]
|
|
4895
4892
|
);
|
|
4896
4893
|
return /* @__PURE__ */ n(Ln.Provider, { value: A, children: /* @__PURE__ */ n(
|
|
4897
|
-
|
|
4894
|
+
Fs,
|
|
4898
4895
|
{
|
|
4899
4896
|
overrides: {
|
|
4900
4897
|
Message: te,
|
|
4901
|
-
MessageActions:
|
|
4898
|
+
MessageActions: Ji,
|
|
4902
4899
|
UnreadMessagesNotification: () => null,
|
|
4903
4900
|
UnreadMessagesSeparator: () => null
|
|
4904
4901
|
},
|
|
4905
|
-
children: /* @__PURE__ */ n(
|
|
4902
|
+
children: /* @__PURE__ */ n($s, { children: F ? /* @__PURE__ */ f("div", { className: "messaging-channel-layout relative flex min-h-0 flex-1 flex-col", children: [
|
|
4906
4903
|
/* @__PURE__ */ f(
|
|
4907
4904
|
"div",
|
|
4908
4905
|
{
|
|
@@ -4913,7 +4910,7 @@ const vl = ({
|
|
|
4913
4910
|
U
|
|
4914
4911
|
] }) }),
|
|
4915
4912
|
/* @__PURE__ */ n(
|
|
4916
|
-
|
|
4913
|
+
Gt,
|
|
4917
4914
|
{
|
|
4918
4915
|
head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4919
4916
|
H,
|
|
@@ -4928,7 +4925,7 @@ const vl = ({
|
|
|
4928
4925
|
"lt-channel-message-list"
|
|
4929
4926
|
),
|
|
4930
4927
|
/* @__PURE__ */ n(
|
|
4931
|
-
|
|
4928
|
+
ln,
|
|
4932
4929
|
{
|
|
4933
4930
|
...s && {
|
|
4934
4931
|
renderActions: () => s == null ? void 0 : s(R)
|
|
@@ -4954,7 +4951,7 @@ const vl = ({
|
|
|
4954
4951
|
U
|
|
4955
4952
|
] }) }),
|
|
4956
4953
|
/* @__PURE__ */ n(
|
|
4957
|
-
|
|
4954
|
+
Gt,
|
|
4958
4955
|
{
|
|
4959
4956
|
head: P ? /* @__PURE__ */ f("div", { className: "sticky top-0 z-10", children: [
|
|
4960
4957
|
H,
|
|
@@ -4970,7 +4967,7 @@ const vl = ({
|
|
|
4970
4967
|
),
|
|
4971
4968
|
r ? /* @__PURE__ */ n(z.Fragment, { children: r(R) }, "lt-channel-conversation-footer") : null,
|
|
4972
4969
|
/* @__PURE__ */ n(
|
|
4973
|
-
|
|
4970
|
+
ln,
|
|
4974
4971
|
{
|
|
4975
4972
|
...s && {
|
|
4976
4973
|
renderActions: () => s == null ? void 0 : s(R)
|
|
@@ -4985,7 +4982,7 @@ const vl = ({
|
|
|
4985
4982
|
] }) })
|
|
4986
4983
|
}
|
|
4987
4984
|
) });
|
|
4988
|
-
},
|
|
4985
|
+
}, qn = z.memo(
|
|
4989
4986
|
({
|
|
4990
4987
|
channel: e,
|
|
4991
4988
|
onBack: t,
|
|
@@ -4996,7 +4993,7 @@ const vl = ({
|
|
|
4996
4993
|
onLeaveConversation: o,
|
|
4997
4994
|
onBlockParticipant: l,
|
|
4998
4995
|
className: d,
|
|
4999
|
-
CustomChannelEmptyState: u =
|
|
4996
|
+
CustomChannelEmptyState: u = gl,
|
|
5000
4997
|
showDeleteConversation: h = !0,
|
|
5001
4998
|
onDeleteConversationClick: m,
|
|
5002
4999
|
onBlockParticipantClick: g,
|
|
@@ -5062,20 +5059,20 @@ const vl = ({
|
|
|
5062
5059
|
"messaging-channel-view h-full flex flex-col",
|
|
5063
5060
|
d
|
|
5064
5061
|
),
|
|
5065
|
-
children: /* @__PURE__ */ n(
|
|
5066
|
-
|
|
5062
|
+
children: /* @__PURE__ */ n(Xn.Provider, { value: b ?? !1, children: /* @__PURE__ */ n(
|
|
5063
|
+
zs,
|
|
5067
5064
|
{
|
|
5068
5065
|
channel: e,
|
|
5069
|
-
MessageSystem:
|
|
5066
|
+
MessageSystem: ul,
|
|
5070
5067
|
EmptyStateIndicator: u,
|
|
5071
5068
|
LoadingIndicator: Ue,
|
|
5072
|
-
DateSeparator:
|
|
5073
|
-
TypingIndicator:
|
|
5069
|
+
DateSeparator: La,
|
|
5070
|
+
TypingIndicator: hl,
|
|
5074
5071
|
doSendMessageRequest: te,
|
|
5075
5072
|
...I ? { SendButton: I } : {},
|
|
5076
5073
|
...M ? { AttachmentPreviewList: M } : {},
|
|
5077
5074
|
children: /* @__PURE__ */ n(
|
|
5078
|
-
|
|
5075
|
+
bl,
|
|
5079
5076
|
{
|
|
5080
5077
|
onBack: t,
|
|
5081
5078
|
showBackButton: s,
|
|
@@ -5112,7 +5109,7 @@ const vl = ({
|
|
|
5112
5109
|
);
|
|
5113
5110
|
}
|
|
5114
5111
|
);
|
|
5115
|
-
|
|
5112
|
+
qn.displayName = "ChannelView";
|
|
5116
5113
|
const ke = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { className: "messaging-error-state flex items-center justify-center h-full p-8", children: /* @__PURE__ */ f("div", { className: "text-center max-w-sm", children: [
|
|
5117
5114
|
/* @__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: "⚠️" }) }),
|
|
5118
5115
|
/* @__PURE__ */ n("h2", { className: "font-semibold text-charcoal mb-2", children: "Oops!" }),
|
|
@@ -5128,7 +5125,7 @@ const ke = z.memo(({ message: e, onBack: t }) => /* @__PURE__ */ n("div", { clas
|
|
|
5128
5125
|
)
|
|
5129
5126
|
] }) }));
|
|
5130
5127
|
ke.displayName = "ErrorState";
|
|
5131
|
-
const
|
|
5128
|
+
const ao = ({
|
|
5132
5129
|
capabilities: e = {},
|
|
5133
5130
|
renderMessageInputActions: t,
|
|
5134
5131
|
renderConversationFooter: s,
|
|
@@ -5161,7 +5158,7 @@ const ro = ({
|
|
|
5161
5158
|
refreshConnection: I,
|
|
5162
5159
|
service: M,
|
|
5163
5160
|
debug: S
|
|
5164
|
-
} =
|
|
5161
|
+
} = wa(), [C, A] = B(null), [P, U] = B(null), [H, te] = B(!1), { showDeleteConversation: Q = !0 } = e, V = j(o);
|
|
5165
5162
|
V.current = o;
|
|
5166
5163
|
const y = j(a);
|
|
5167
5164
|
y.current = a;
|
|
@@ -5245,7 +5242,7 @@ const ro = ({
|
|
|
5245
5242
|
onBack: I
|
|
5246
5243
|
}
|
|
5247
5244
|
) : P ? /* @__PURE__ */ n(ke, { message: P }) : H && !C ? /* @__PURE__ */ n(ke, { message: "Conversation ended" }) : C ? /* @__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(
|
|
5248
|
-
|
|
5245
|
+
qn,
|
|
5249
5246
|
{
|
|
5250
5247
|
channel: C,
|
|
5251
5248
|
renderMessageInputActions: t,
|
|
@@ -5273,13 +5270,13 @@ const ro = ({
|
|
|
5273
5270
|
C.id
|
|
5274
5271
|
) }) }) : /* @__PURE__ */ n(Ue, {});
|
|
5275
5272
|
};
|
|
5276
|
-
function
|
|
5273
|
+
function vl(e) {
|
|
5277
5274
|
const t = e.state.pending_messages;
|
|
5278
5275
|
if (t != null && t.length)
|
|
5279
5276
|
for (const s of t)
|
|
5280
5277
|
e.state.addMessageSorted(s.message);
|
|
5281
5278
|
}
|
|
5282
|
-
const
|
|
5279
|
+
const Kn = z.createContext({
|
|
5283
5280
|
selectedChannel: void 0,
|
|
5284
5281
|
onChannelSelect: () => {
|
|
5285
5282
|
},
|
|
@@ -5287,14 +5284,14 @@ const Zn = z.createContext({
|
|
|
5287
5284
|
renderMessagePreview: void 0,
|
|
5288
5285
|
channelPreview: void 0,
|
|
5289
5286
|
viewerLanguage: void 0
|
|
5290
|
-
}),
|
|
5287
|
+
}), xl = Kn.Provider, wl = () => z.useContext(Kn), _l = (e, t) => {
|
|
5291
5288
|
const s = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), a = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
5292
5289
|
return Math.floor((a - s) / (1e3 * 60 * 60 * 24));
|
|
5293
|
-
},
|
|
5290
|
+
}, yl = (e) => {
|
|
5294
5291
|
const t = /* @__PURE__ */ new Date();
|
|
5295
5292
|
if (Math.floor((t.getTime() - e.getTime()) / 1e3) < 60)
|
|
5296
5293
|
return "Just now";
|
|
5297
|
-
const a =
|
|
5294
|
+
const a = _l(e, t);
|
|
5298
5295
|
return a === 0 ? e.toLocaleTimeString([], {
|
|
5299
5296
|
hour: "numeric",
|
|
5300
5297
|
minute: "2-digit",
|
|
@@ -5307,7 +5304,7 @@ const Zn = z.createContext({
|
|
|
5307
5304
|
day: "numeric",
|
|
5308
5305
|
year: "numeric"
|
|
5309
5306
|
});
|
|
5310
|
-
},
|
|
5307
|
+
}, Zn = z.memo(
|
|
5311
5308
|
(e) => {
|
|
5312
5309
|
var $, F, R;
|
|
5313
5310
|
const { channel: t, unread: s } = e, {
|
|
@@ -5317,7 +5314,7 @@ const Zn = z.createContext({
|
|
|
5317
5314
|
channelPreview: o,
|
|
5318
5315
|
renderMessagePreview: l,
|
|
5319
5316
|
viewerLanguage: d
|
|
5320
|
-
} =
|
|
5317
|
+
} = wl(), { client: u } = He(), h = (a == null ? void 0 : a.id) === (t == null ? void 0 : t.id), m = vn(t);
|
|
5321
5318
|
if (o)
|
|
5322
5319
|
return /* @__PURE__ */ n(
|
|
5323
5320
|
o,
|
|
@@ -5334,11 +5331,11 @@ const Zn = z.createContext({
|
|
|
5334
5331
|
}, c = (I) => {
|
|
5335
5332
|
const M = I.key === "Enter" || I.key === " ", S = I.repeat;
|
|
5336
5333
|
!M || S || (I.preventDefault(), g());
|
|
5337
|
-
}, p =
|
|
5334
|
+
}, p = xn(
|
|
5338
5335
|
($ = t == null ? void 0 : t.state) == null ? void 0 : $.members,
|
|
5339
5336
|
u == null ? void 0 : u.userID,
|
|
5340
5337
|
t == null ? void 0 : t.type
|
|
5341
|
-
), w =
|
|
5338
|
+
), w = wn(p == null ? void 0 : p.user), v = (F = p == null ? void 0 : p.user) == null ? void 0 : F.image, x = (() => {
|
|
5342
5339
|
var M;
|
|
5343
5340
|
const I = (M = t == null ? void 0 : t.state) == null ? void 0 : M.messages;
|
|
5344
5341
|
if (I != null && I.length) {
|
|
@@ -5347,7 +5344,7 @@ const Zn = z.createContext({
|
|
|
5347
5344
|
}
|
|
5348
5345
|
})(), N = (() => {
|
|
5349
5346
|
var A;
|
|
5350
|
-
const I =
|
|
5347
|
+
const I = yn({
|
|
5351
5348
|
message: x,
|
|
5352
5349
|
viewerLanguage: d
|
|
5353
5350
|
}), { custom_type: M, attachment_content_type: S } = (x == null ? void 0 : x.metadata) || {};
|
|
@@ -5364,7 +5361,7 @@ const Zn = z.createContext({
|
|
|
5364
5361
|
if (I) return I;
|
|
5365
5362
|
const C = (A = x == null ? void 0 : x.attachments) == null ? void 0 : A[0];
|
|
5366
5363
|
return C ? C.og_scrape_url ? C.og_scrape_url : C.type === "image" ? "📷 Sent an image" : C.type === "video" ? "🎥 Sent a video" : C.type === "audio" ? "🎵 Sent audio" : C.type === "file" ? "📎 Sent a file" : "📎 Sent an attachment" : "No messages yet";
|
|
5367
|
-
})(), _ = x != null && x.created_at ?
|
|
5364
|
+
})(), _ = x != null && x.created_at ? yl(new Date(x.created_at)) : "", T = x ? Fe(x) : !1, L = l ? l(x, N) : `${T ? "✨ " : ""}${N}`, E = s ?? 0;
|
|
5368
5365
|
return i && console.log("📺 [ChannelList] 📋 CHANNEL PREVIEW RENDER", {
|
|
5369
5366
|
channelId: t == null ? void 0 : t.id,
|
|
5370
5367
|
isSelected: h,
|
|
@@ -5423,18 +5420,18 @@ const Zn = z.createContext({
|
|
|
5423
5420
|
);
|
|
5424
5421
|
}
|
|
5425
5422
|
);
|
|
5426
|
-
|
|
5427
|
-
const
|
|
5423
|
+
Zn.displayName = "CustomChannelPreview";
|
|
5424
|
+
const Nl = { last_message_at: -1 }, kl = z.memo(
|
|
5428
5425
|
({
|
|
5429
5426
|
onChannelSelect: e,
|
|
5430
5427
|
selectedChannel: t,
|
|
5431
5428
|
filters: s,
|
|
5432
5429
|
allowNewMessagesFromUnfilteredChannels: a = !1,
|
|
5433
5430
|
channelRenderFilterFn: r,
|
|
5434
|
-
sort: i =
|
|
5431
|
+
sort: i = Nl,
|
|
5435
5432
|
className: o,
|
|
5436
5433
|
customEmptyStateIndicator: l,
|
|
5437
|
-
channelListPaginator: d =
|
|
5434
|
+
channelListPaginator: d = Us,
|
|
5438
5435
|
channelPreview: u,
|
|
5439
5436
|
renderMessagePreview: h,
|
|
5440
5437
|
viewerLanguage: m,
|
|
@@ -5447,10 +5444,10 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5447
5444
|
}) => {
|
|
5448
5445
|
const b = z.useRef(0);
|
|
5449
5446
|
b.current++;
|
|
5450
|
-
const { debug: N = !1 } =
|
|
5447
|
+
const { debug: N = !1 } = ot(), _ = z.useCallback(
|
|
5451
5448
|
(L) => {
|
|
5452
5449
|
for (const E of L)
|
|
5453
|
-
|
|
5450
|
+
vl(E);
|
|
5454
5451
|
return r ? r(L) : L;
|
|
5455
5452
|
},
|
|
5456
5453
|
[r]
|
|
@@ -5485,8 +5482,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5485
5482
|
"messaging-channel-list h-full flex flex-col min-w-0 overflow-hidden",
|
|
5486
5483
|
o
|
|
5487
5484
|
),
|
|
5488
|
-
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(
|
|
5489
|
-
|
|
5485
|
+
children: /* @__PURE__ */ n("div", { className: "flex-1 overflow-hidden min-w-0", children: /* @__PURE__ */ n(xl, { value: T, children: /* @__PURE__ */ n(
|
|
5486
|
+
Bs,
|
|
5490
5487
|
{
|
|
5491
5488
|
filters: s,
|
|
5492
5489
|
sort: i,
|
|
@@ -5500,7 +5497,7 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5500
5497
|
onAddedToChannel: v,
|
|
5501
5498
|
onChannelUpdated: x,
|
|
5502
5499
|
Paginator: d,
|
|
5503
|
-
Preview:
|
|
5500
|
+
Preview: Zn,
|
|
5504
5501
|
EmptyStateIndicator: l
|
|
5505
5502
|
},
|
|
5506
5503
|
`${JSON.stringify(s)}:${JSON.stringify(i)}`
|
|
@@ -5509,8 +5506,8 @@ const kl = { last_message_at: -1 }, Cl = z.memo(
|
|
|
5509
5506
|
);
|
|
5510
5507
|
}
|
|
5511
5508
|
);
|
|
5512
|
-
|
|
5513
|
-
const
|
|
5509
|
+
kl.displayName = "ChannelList";
|
|
5510
|
+
const Cl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [text-wrap:balance]", Sl = "text-[12px] leading-4 tracking-[0.24px] [text-wrap:pretty]", cn = ({ surface: e, actions: t, layout: s }) => {
|
|
5514
5511
|
if (t == null || t.length === 0) return null;
|
|
5515
5512
|
const a = s === "stacked";
|
|
5516
5513
|
return /* @__PURE__ */ n(
|
|
@@ -5536,7 +5533,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5536
5533
|
))
|
|
5537
5534
|
}
|
|
5538
5535
|
);
|
|
5539
|
-
},
|
|
5536
|
+
}, El = ({
|
|
5540
5537
|
ctaSurface: e,
|
|
5541
5538
|
chinTextColor: t,
|
|
5542
5539
|
title: s,
|
|
@@ -5560,7 +5557,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5560
5557
|
/* @__PURE__ */ n(
|
|
5561
5558
|
"p",
|
|
5562
5559
|
{
|
|
5563
|
-
className: k("min-w-0",
|
|
5560
|
+
className: k("min-w-0", Cl),
|
|
5564
5561
|
style: h,
|
|
5565
5562
|
children: s
|
|
5566
5563
|
}
|
|
@@ -5570,7 +5567,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5570
5567
|
"p",
|
|
5571
5568
|
{
|
|
5572
5569
|
className: k(
|
|
5573
|
-
|
|
5570
|
+
Sl,
|
|
5574
5571
|
r > 1 && "whitespace-pre-line",
|
|
5575
5572
|
r <= 1 && "truncate"
|
|
5576
5573
|
),
|
|
@@ -5581,11 +5578,11 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5581
5578
|
] });
|
|
5582
5579
|
return /* @__PURE__ */ n("div", { className: "shrink-0 px-4 py-3", children: g ? /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5583
5580
|
c,
|
|
5584
|
-
/* @__PURE__ */ n(
|
|
5581
|
+
/* @__PURE__ */ n(cn, { surface: e, actions: o, layout: "row" })
|
|
5585
5582
|
] }) : /* @__PURE__ */ f(J, { children: [
|
|
5586
5583
|
c,
|
|
5587
5584
|
/* @__PURE__ */ n(
|
|
5588
|
-
|
|
5585
|
+
cn,
|
|
5589
5586
|
{
|
|
5590
5587
|
surface: e,
|
|
5591
5588
|
actions: o,
|
|
@@ -5593,36 +5590,36 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5593
5590
|
}
|
|
5594
5591
|
)
|
|
5595
5592
|
] }) });
|
|
5596
|
-
},
|
|
5593
|
+
}, Il = {
|
|
5597
5594
|
dark: "bg-white/[0.06]",
|
|
5598
5595
|
light: "bg-black/[0.04]"
|
|
5599
|
-
},
|
|
5596
|
+
}, Tl = {
|
|
5600
5597
|
1: [0],
|
|
5601
5598
|
2: [-10, 10],
|
|
5602
5599
|
3: [-13, 0, 13]
|
|
5603
|
-
},
|
|
5600
|
+
}, Al = {
|
|
5604
5601
|
1: [0],
|
|
5605
5602
|
2: [-26, 26],
|
|
5606
5603
|
3: [-40, 0, 40]
|
|
5607
|
-
},
|
|
5604
|
+
}, Rl = {
|
|
5608
5605
|
1: [0],
|
|
5609
5606
|
2: [0, 1],
|
|
5610
5607
|
3: [1, 3, 2]
|
|
5611
|
-
},
|
|
5608
|
+
}, Ll = {
|
|
5612
5609
|
1: [1],
|
|
5613
5610
|
2: [1, 1],
|
|
5614
5611
|
3: [1, 1.08, 1]
|
|
5615
|
-
},
|
|
5612
|
+
}, Ml = ({ variant: e, images: t }) => {
|
|
5616
5613
|
const [s, a] = z.useState({}), r = t.join(`
|
|
5617
5614
|
`), [i, o] = z.useState(r);
|
|
5618
5615
|
r !== i && (o(r), a({}));
|
|
5619
|
-
const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u =
|
|
5616
|
+
const l = t.slice(0, 3).map((c, p) => ({ src: c, index: p })).filter(({ index: c }) => !s[c]), d = l.length >= 3 ? 3 : l.length === 2 ? 2 : 1, u = Tl[d], h = Al[d], m = Rl[d], g = Ll[d];
|
|
5620
5617
|
return /* @__PURE__ */ n(
|
|
5621
5618
|
"div",
|
|
5622
5619
|
{
|
|
5623
5620
|
className: k(
|
|
5624
5621
|
"relative flex min-h-0 w-full flex-1 items-center justify-center overflow-hidden",
|
|
5625
|
-
|
|
5622
|
+
Il[e]
|
|
5626
5623
|
),
|
|
5627
5624
|
children: l.map(({ src: c, index: p }, w) => /* @__PURE__ */ n(
|
|
5628
5625
|
"img",
|
|
@@ -5643,14 +5640,14 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5643
5640
|
))
|
|
5644
5641
|
}
|
|
5645
5642
|
);
|
|
5646
|
-
},
|
|
5643
|
+
}, Dl = "flex h-[180px] w-full shrink-0 flex-col overflow-hidden", Ol = ({
|
|
5647
5644
|
variant: e,
|
|
5648
5645
|
presentation: t,
|
|
5649
5646
|
images: s,
|
|
5650
5647
|
title: a,
|
|
5651
5648
|
heroUrl: r,
|
|
5652
5649
|
onHeroError: i
|
|
5653
|
-
}) => /* @__PURE__ */ n("div", { className:
|
|
5650
|
+
}) => /* @__PURE__ */ n("div", { className: Dl, children: t === "fan" ? /* @__PURE__ */ n(Ml, { variant: e, images: s }) : (
|
|
5654
5651
|
// `heroUrl` is the palette-tracked source: it becomes `undefined` when the
|
|
5655
5652
|
// hero image errors, so `CardThumbnail` falls through to its placeholder.
|
|
5656
5653
|
// Do NOT `?? images[0]` here — that would re-instate the failed URL.
|
|
@@ -5664,7 +5661,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5664
5661
|
onImageError: i
|
|
5665
5662
|
}
|
|
5666
5663
|
)
|
|
5667
|
-
) }),
|
|
5664
|
+
) }), Jn = ({
|
|
5668
5665
|
variant: e,
|
|
5669
5666
|
title: t,
|
|
5670
5667
|
subtitle: s,
|
|
@@ -5676,17 +5673,17 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5676
5673
|
accentColor: d,
|
|
5677
5674
|
groupPosition: u = "single"
|
|
5678
5675
|
}) => {
|
|
5679
|
-
const h =
|
|
5676
|
+
const h = ba({
|
|
5680
5677
|
imagePresentation: i,
|
|
5681
5678
|
images: r
|
|
5682
|
-
}), m = r.length > 0, g = m && h === "hero", c =
|
|
5679
|
+
}), m = r.length > 0, g = m && h === "hero", c = Ge({
|
|
5683
5680
|
variant: e,
|
|
5684
5681
|
accentColor: d,
|
|
5685
5682
|
layout: "featured",
|
|
5686
5683
|
thumbnailUrl: g ? r[0] : void 0
|
|
5687
5684
|
}), p = u === "single" || u === "end";
|
|
5688
5685
|
return /* @__PURE__ */ n(
|
|
5689
|
-
|
|
5686
|
+
xt,
|
|
5690
5687
|
{
|
|
5691
5688
|
accentHex: c.accentHex,
|
|
5692
5689
|
side: e === "dark" ? "sender" : "receiver",
|
|
@@ -5699,7 +5696,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5699
5696
|
"data-testid": "rich-card",
|
|
5700
5697
|
children: [
|
|
5701
5698
|
m && /* @__PURE__ */ n(
|
|
5702
|
-
|
|
5699
|
+
Ol,
|
|
5703
5700
|
{
|
|
5704
5701
|
variant: e,
|
|
5705
5702
|
presentation: h,
|
|
@@ -5710,7 +5707,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5710
5707
|
}
|
|
5711
5708
|
),
|
|
5712
5709
|
/* @__PURE__ */ n(
|
|
5713
|
-
|
|
5710
|
+
El,
|
|
5714
5711
|
{
|
|
5715
5712
|
ctaSurface: c.surface,
|
|
5716
5713
|
chinTextColor: c.chinTextColor,
|
|
@@ -5726,13 +5723,13 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5726
5723
|
)
|
|
5727
5724
|
}
|
|
5728
5725
|
);
|
|
5729
|
-
},
|
|
5730
|
-
Sent:
|
|
5731
|
-
Received:
|
|
5732
|
-
},
|
|
5726
|
+
}, Pl = (e) => /* @__PURE__ */ n(Jn, { ...e, variant: "dark" }), zl = (e) => /* @__PURE__ */ n(Jn, { ...e, variant: "light" }), ro = {
|
|
5727
|
+
Sent: Pl,
|
|
5728
|
+
Received: zl
|
|
5729
|
+
}, dn = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='23' fill='none'%3E%3Cpath fill='black' d='M0 0H15C15 10.1934 15.859 15.2345 19.168 21.4893C19.527 22.168 19.039 22.9917 18.274 22.9178C5.176 21.6506 0.32 6.0737 0 0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%`, Fl = {
|
|
5733
5730
|
sent: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5734
5731
|
received: "var(--str-chat__message-bubble-background-color, #f1f0ee)"
|
|
5735
|
-
},
|
|
5732
|
+
}, $l = ({ variant: e }) => /* @__PURE__ */ n(
|
|
5736
5733
|
"span",
|
|
5737
5734
|
{
|
|
5738
5735
|
"aria-hidden": "true",
|
|
@@ -5742,12 +5739,12 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5742
5739
|
insetInlineStart: e === "received" ? "calc(-1 * 0.25rem)" : void 0,
|
|
5743
5740
|
transform: e === "received" ? "scaleX(-1)" : void 0,
|
|
5744
5741
|
transformOrigin: "center",
|
|
5745
|
-
backgroundColor:
|
|
5746
|
-
WebkitMask:
|
|
5747
|
-
mask:
|
|
5742
|
+
backgroundColor: Fl[e],
|
|
5743
|
+
WebkitMask: dn,
|
|
5744
|
+
mask: dn
|
|
5748
5745
|
}
|
|
5749
5746
|
}
|
|
5750
|
-
),
|
|
5747
|
+
), Bl = {
|
|
5751
5748
|
sent: {
|
|
5752
5749
|
backgroundColor: "var(--str-chat__own-message-bubble-background-color, #1e2330)",
|
|
5753
5750
|
color: "var(--str-chat__own-message-bubble-color, #fff)"
|
|
@@ -5756,7 +5753,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5756
5753
|
backgroundColor: "var(--str-chat__message-bubble-background-color, #f1f0ee)",
|
|
5757
5754
|
color: "var(--str-chat__message-bubble-color, #000000)"
|
|
5758
5755
|
}
|
|
5759
|
-
},
|
|
5756
|
+
}, Qn = ({
|
|
5760
5757
|
variant: e,
|
|
5761
5758
|
text: t,
|
|
5762
5759
|
tail: s = !0,
|
|
@@ -5772,23 +5769,23 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5772
5769
|
r
|
|
5773
5770
|
),
|
|
5774
5771
|
style: {
|
|
5775
|
-
...
|
|
5772
|
+
...Bl[e],
|
|
5776
5773
|
borderRadius: "var(--str-chat__message-bubble-border-radius, 1.5rem)",
|
|
5777
5774
|
isolation: "isolate"
|
|
5778
5775
|
},
|
|
5779
5776
|
children: [
|
|
5780
5777
|
a != null && /* @__PURE__ */ n("div", { className: "mb-1 font-medium", "data-testid": "message-bubble-header", children: a }),
|
|
5781
5778
|
/* @__PURE__ */ n("p", { className: "m-0 whitespace-pre-wrap break-words hyphens-manual", children: t }),
|
|
5782
|
-
s && /* @__PURE__ */ n(
|
|
5779
|
+
s && /* @__PURE__ */ n($l, { variant: e })
|
|
5783
5780
|
]
|
|
5784
5781
|
}
|
|
5785
|
-
),
|
|
5782
|
+
), Ul = ({
|
|
5786
5783
|
text: e,
|
|
5787
5784
|
tail: t,
|
|
5788
5785
|
header: s,
|
|
5789
5786
|
className: a
|
|
5790
5787
|
}) => /* @__PURE__ */ n(
|
|
5791
|
-
|
|
5788
|
+
Qn,
|
|
5792
5789
|
{
|
|
5793
5790
|
variant: "received",
|
|
5794
5791
|
text: e,
|
|
@@ -5796,10 +5793,10 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5796
5793
|
header: s,
|
|
5797
5794
|
className: a
|
|
5798
5795
|
}
|
|
5799
|
-
),
|
|
5800
|
-
Sent:
|
|
5801
|
-
Received:
|
|
5802
|
-
},
|
|
5796
|
+
), jl = ({ text: e, tail: t, className: s }) => /* @__PURE__ */ n(Qn, { variant: "sent", text: e, tail: t, className: s }), io = {
|
|
5797
|
+
Sent: jl,
|
|
5798
|
+
Received: Ul
|
|
5799
|
+
}, Hl = ({
|
|
5803
5800
|
question: e,
|
|
5804
5801
|
onClick: t,
|
|
5805
5802
|
loading: s = !1,
|
|
@@ -5821,7 +5818,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5821
5818
|
),
|
|
5822
5819
|
children: e
|
|
5823
5820
|
}
|
|
5824
|
-
),
|
|
5821
|
+
), lo = ({
|
|
5825
5822
|
faqs: e,
|
|
5826
5823
|
onFaqClick: t,
|
|
5827
5824
|
loadingFaqId: s,
|
|
@@ -5830,7 +5827,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5830
5827
|
avatarImage: i,
|
|
5831
5828
|
avatarName: o
|
|
5832
5829
|
}) => {
|
|
5833
|
-
const l =
|
|
5830
|
+
const l = va(e);
|
|
5834
5831
|
return l.length === 0 ? null : /* @__PURE__ */ n("div", { className: r, children: /* @__PURE__ */ f("div", { className: "flex gap-3 items-end", children: [
|
|
5835
5832
|
(i || o) && /* @__PURE__ */ n("div", { className: "flex-none", children: /* @__PURE__ */ n(
|
|
5836
5833
|
we,
|
|
@@ -5850,7 +5847,7 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5850
5847
|
children: [
|
|
5851
5848
|
a && /* @__PURE__ */ n("p", { className: "text-md text-charcoal mb-4", children: a }),
|
|
5852
5849
|
l.map((d) => /* @__PURE__ */ n(
|
|
5853
|
-
|
|
5850
|
+
Hl,
|
|
5854
5851
|
{
|
|
5855
5852
|
question: d.question,
|
|
5856
5853
|
onClick: () => t(d.id),
|
|
@@ -5864,41 +5861,41 @@ const Sl = "line-clamp-2 text-[14px] font-medium leading-5 tracking-[0.28px] [te
|
|
|
5864
5861
|
] }) });
|
|
5865
5862
|
};
|
|
5866
5863
|
export {
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5864
|
+
kn as A,
|
|
5865
|
+
wn as B,
|
|
5866
|
+
gl as C,
|
|
5867
|
+
so as D,
|
|
5868
|
+
nr as E,
|
|
5869
|
+
lo as F,
|
|
5870
|
+
wa as G,
|
|
5871
|
+
it as L,
|
|
5872
|
+
eo as M,
|
|
5873
|
+
ro as R,
|
|
5877
5874
|
ye as a,
|
|
5878
5875
|
we as b,
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5876
|
+
kl as c,
|
|
5877
|
+
qn as d,
|
|
5878
|
+
to as e,
|
|
5879
|
+
Hl as f,
|
|
5883
5880
|
de as g,
|
|
5884
5881
|
Pe as h,
|
|
5885
5882
|
Ne as i,
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5883
|
+
io as j,
|
|
5884
|
+
Ql as k,
|
|
5885
|
+
ao as l,
|
|
5886
|
+
Qr as m,
|
|
5887
|
+
Kr as n,
|
|
5891
5888
|
ce as o,
|
|
5892
|
-
|
|
5893
|
-
|
|
5889
|
+
yl as p,
|
|
5890
|
+
Jr as q,
|
|
5894
5891
|
be as r,
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5892
|
+
yn as s,
|
|
5893
|
+
Ve as t,
|
|
5894
|
+
ya as u,
|
|
5895
|
+
no as v,
|
|
5896
|
+
Ma as w,
|
|
5897
|
+
xn as x,
|
|
5898
|
+
ut as y,
|
|
5899
|
+
mt as z
|
|
5903
5900
|
};
|
|
5904
|
-
//# sourceMappingURL=index-
|
|
5901
|
+
//# sourceMappingURL=index-DXlI1QQw.js.map
|